com.ibm.as400.resource
Class ProgramAttributeGetter

java.lang.Object
  |
  +--com.ibm.as400.resource.ProgramAttributeGetter
All Implemented Interfaces:
java.io.Serializable

public class ProgramAttributeGetter
extends java.lang.Object
implements java.io.Serializable

The ProgramAttributeGetter class gets attribute values by calling an AS/400 program. The program call is specified using Program Call Markup Language (PCML).

This class uses a ProgramMap object to define how attribute values are specified in the PCML definition. This class is intended as a helper class for implementing subclasses of Resource.

See Also:
Serialized Form

Constructor Summary
ProgramAttributeGetter(AS400 system, ProgramCallDocument document, ProgramMap attributeMap)
          Constructs a ProgramAttributeGetter object.
 
Method Summary
 void clearBuffer()
          Clears any buffered attribute values.
 java.lang.Object getValue(java.lang.Object attributeID)
          Returns an attribute value.
 java.lang.Object getValue(java.lang.Object attributeID, int bidiStringType)
          Returns an attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgramAttributeGetter

public ProgramAttributeGetter(AS400 system,
                              ProgramCallDocument document,
                              ProgramMap attributeMap)
Constructs a ProgramAttributeGetter object.
Parameters:
system - The system.
document - The PCML document.
attributeMap - The attribute map.
Method Detail

clearBuffer

public void clearBuffer()
Clears any buffered attribute values. Calling this method ensures that subsequent calls to getValues() are current.

getValue

public java.lang.Object getValue(java.lang.Object attributeID)
                          throws ResourceException
Returns an attribute value.
Parameters:
attributeID - The attribute ID.
Returns:
The attribute value.
Throws:
ResourceException - If an error occurs.

getValue

public java.lang.Object getValue(java.lang.Object attributeID,
                                 int bidiStringType)
                          throws ResourceException
Returns an attribute value.
Parameters:
attributeID - The attribute ID.
bidiStringType - The bidi string type as defined by the CDRA (Character Data Representataion Architecture). See BidiStringType for more information and valid values.
Returns:
The attribute value.
Throws:
ResourceException - If an error occurs.