com.ibm.etill.framework.xdm
Class PSServerAdminObject

java.lang.Object
  |
  +--com.ibm.etill.framework.xdm.PSServerObject
        |
        +--com.ibm.etill.framework.xdm.PSServerAdminObject
All Implemented Interfaces:
com.ibm.etill.framework.payapi.PaymentAPIConstants, PSServerAdminConstants, com.ibm.etill.framework.clientapi.XDMConstants
Direct Known Subclasses:
PSServerPaymentSystem

public abstract class PSServerAdminObject
extends PSServerObject
implements PSServerAdminConstants

There is a distinction between administrative and query commands. Administrative commands excecute under the Payment Engine JVM and alter state variables. Query commands on the other hand, execute in the Payment Servlet JVM and merely retrieve persistent state variables. The PSServerAdminObject entends this capability to cassettes. Cassettes extend this class to represent their primary administration objects through the query commands. PSServerAdminObject supports all of the basic attributes of a primary administration object such as enabled, active, pending, and valid.


Fields inherited from interface com.ibm.etill.framework.xdm.PSServerAdminConstants
COL_ACTIVE, COL_ENABLED, COL_MESSAGESKEY, COL_PENDING, COL_VALID
 
Constructor Summary
PSServerAdminObject()
          A default constructor that sets view attributes to constants in PSServerAdminConstants.
PSServerAdminObject(String view_enabled, String view_active, String view_valid, String view_pending, String view_messageskey)
          Constructor uses the following input parameters to intialize state variables.
 
Method Summary
 void addCassetteConfigObject(CassetteConfigObject object)
          Adds a CassetteConfigObject.
protected  int getApproximateXDMKeySize()
          It is not implemented, throws an ETillFrameworkException exception.
protected  int getApproximateXDMObjectSize()
          It is not implemented, returns a negative one (-1).
 int getApproximateXDMSize()
          Retrieves the approximate XDM size in bytes.
protected  Enumeration getCassetteMessages()
          Retrieves the cassette messages for this Cassette object.
protected  String getCassetteMessagesString()
          Retrieves the cassette messages for this Cassette object.
protected  Enumeration getFrameworkMessages()
          Retrieves the framework messages for this PSServerAdminObject.
protected  String getFrameworkMessagesString()
          Retrieves the framework messages for this PSServerAdminObject.
 XDMMessages getMessages()
          Retrieves the current messages.
protected  void initializeAdminObject(ResultSet rs)
          Initializes object properties if object was created with the default constructor.
 boolean isActive()
          Retrieves the current state of the active variable.
 boolean isEnabled()
          Retrieves the current state of the enabled variable.
 boolean isPending()
          Retrieves the current state of the pending variable.
 boolean isValid()
          Retrieves the current state of the valid variable.
 void setCassetteExtensionObject(CassetteExtensionObject extension)
          Sets the Cassette extension object.
protected  void toXml(com.ibm.etill.xml.parser.TXElement xml)
          Converts this object properties to XML document.
 
Methods inherited from class com.ibm.etill.framework.xdm.PSServerObject
getPaymentType, setOptionalAttribute, setRequiredAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PSServerAdminObject

public PSServerAdminObject(String view_enabled,
                           String view_active,
                           String view_valid,
                           String view_pending,
                           String view_messageskey)
Constructor uses the following input parameters to intialize state variables.
Parameters:
view_enabled - a string indicating whether a view is enabled
view_active - a string indicating whether a view is active
view_valid - a string indicating whether a view is valid
view_pending - a string indicating whether a view is pending
view_messageskey - a string indicating view messages key

PSServerAdminObject

public PSServerAdminObject()
A default constructor that sets view attributes to constants in PSServerAdminConstants.
Method Detail

getFrameworkMessagesString

protected String getFrameworkMessagesString()
Retrieves the framework messages for this PSServerAdminObject.
Returns:
result a message string

getFrameworkMessages

protected Enumeration getFrameworkMessages()
Retrieves the framework messages for this PSServerAdminObject.
Returns:
result a vector of messages

getCassetteMessagesString

protected String getCassetteMessagesString()
Retrieves the cassette messages for this Cassette object.
Returns:
result a string of messages

getCassetteMessages

protected Enumeration getCassetteMessages()
Retrieves the cassette messages for this Cassette object.
Returns:
result a vector of messages

isEnabled

public boolean isEnabled()
Retrieves the current state of the enabled variable.
Returns:
enabled a boolean property

isActive

public boolean isActive()
Retrieves the current state of the active variable.
Returns:
active a boolean property

isValid

public boolean isValid()
Retrieves the current state of the valid variable.
Returns:
valid a boolean property

isPending

public boolean isPending()
Retrieves the current state of the pending variable.
Returns:
pending a boolean property

getMessages

public XDMMessages getMessages()
Retrieves the current messages.
Returns:
messages this XDMMessages

initializeAdminObject

protected void initializeAdminObject(ResultSet rs)
                              throws SQLException,
                                     com.ibm.etill.framework.payapi.ETillAbortOperation
Initializes object properties if object was created with the default constructor. Uses result set from a DB query to initialize object.
Throws:
SQLException - thrown by the DB manager
com.ibm.etill.framework.payapi.ETillAbortOperation - thrown if severe errors are encountered

setCassetteExtensionObject

public void setCassetteExtensionObject(CassetteExtensionObject extension)
Sets the Cassette extension object. A cassette writer uses this method to populate a CassetteExtensionObject object and then associates it with the generic PSServerAdminObject.
Parameters:
extension - a CassetteExtensionObject

addCassetteConfigObject

public void addCassetteConfigObject(CassetteConfigObject object)
Adds a CassetteConfigObject.
Returns:
object a CassetteConfigObject

toXml

protected void toXml(com.ibm.etill.xml.parser.TXElement xml)
Converts this object properties to XML document.

getApproximateXDMSize

public int getApproximateXDMSize()
Retrieves the approximate XDM size in bytes.
Overrides:
getApproximateXDMSize in class PSServerObject
Returns:
size an integer representing the size of the XDM object in bytes

getApproximateXDMKeySize

protected int getApproximateXDMKeySize()
It is not implemented, throws an ETillFrameworkException exception.
Overrides:
getApproximateXDMKeySize in class PSServerObject
Returns:
int No value is explicitly returned, therefore, don't rely on the return value, it's bogus.
Throws:
com.ibm.etill.framework.log.ETillFrameworkException - is always thrown when this method is called

getApproximateXDMObjectSize

protected int getApproximateXDMObjectSize()
It is not implemented, returns a negative one (-1).
Returns:
int It returns negative one (-1).