com.highdeal.admin.hci
Class InstanceStatus

java.lang.Object
  extended by com.highdeal.admin.hci.InstanceStatus
All Implemented Interfaces:
XMLMarshallable

public class InstanceStatus
extends java.lang.Object
implements XMLMarshallable

This Java class represents an instance status that describes the running status (on, off, waiting) of a specific instance of the SAP CC system; It contains a list of instance properties.

See Also:
InstanceProperty, SystemStatus

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="instanceStatus">
   <xs:complexType>
     <xs:sequence>
        <xs:element ref="instanceProperty" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="instanceId" use="required">
       <xs:simpleType>
         <xs:restriction base="xs:string">
           <xs:pattern value="((dispatcher|updater|rater|guider|bulkLoader|taxer)#\d)"/>
         </xs:restriction>
       </xs:simpleType>
     </xs:attribute>
     <xs:attribute name="status" use="required">
       <xs:simpleType>
         <xs:restriction base="xs:string">
           <xs:pattern value="(on|off|waiting)"/>
         </xs:restriction>
       </xs:simpleType>
     </xs:attribute>
   </xs:complexType>
 </xs:element>


Field Summary
static java.lang.String TAG_NAME
          The XML tag name of this class: "instanceStatus"
 
Constructor Summary
InstanceStatus()
          InstanceStatus default constructor
InstanceStatus(InstanceId instanceId, InstanceInfo instanceInfo)
          Builds a new InstanceStatus instance from an InstanceId and an InstanceInfo
 
Method Summary
 void addBooleanProperty(java.lang.String name, boolean value)
          Add a property the instance given its name and value as the boolean
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 void addDateProperty(java.lang.String name, java.util.Date value)
          Add a property the instance given its name and value as the date
 void addDecimalProperty(java.lang.String name, java.math.BigDecimal value)
          Add a property the instance given its name and value as the big decimal
 void addIntegerProperty(java.lang.String name, int value)
          Add a property the instance given its name and value as the integer
 void addLongProperty(java.lang.String name, long value)
          Add a property the instance given its name and value as the long
 void addProperty(java.lang.String name, java.lang.String value)
          Add a property the instance given its name and value as the string
 java.util.List<java.lang.String> getAllPropertyNames()
          Get the names of all the properties defined in this object
 boolean getBooleanProperty(java.lang.String name)
          Get an instance property as a boolean given its name
 java.util.Date getDateProperty(java.lang.String name)
          Get an instance property as a date given its name
 java.math.BigDecimal getDecimalProperty(java.lang.String name)
          Get an instance property as a big decimal given its name
 InstanceId getInstanceId()
          Get the instance identifier
 InstanceInfo getInstanceInfo()
          Get the instance info
 java.lang.Integer getIntegerProperty(java.lang.String name)
          Get an instance property as an integer given its name
 java.lang.Long getLongProperty(java.lang.String name)
          Get an instance property as a long given its name
 java.lang.String getProperty(java.lang.String name)
          Get an instance property as a string given its name
 ServerStatus getStatus()
          Returns the status of the instance of the SAP CC system
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setStatus(ServerStatus status)
          Set the instance status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
The XML tag name of this class: "instanceStatus"

See Also:
Constant Field Values
Constructor Detail

InstanceStatus

public InstanceStatus()
InstanceStatus default constructor


InstanceStatus

public InstanceStatus(InstanceId instanceId,
                      InstanceInfo instanceInfo)
Builds a new InstanceStatus instance from an InstanceId and an InstanceInfo

Parameters:
instanceId - The specified InstanceId
instanceInfo - The specified InstanceInfo
Method Detail

getStatus

public ServerStatus getStatus()
Returns the status of the instance of the SAP CC system

Returns:
The instance status

setStatus

public void setStatus(ServerStatus status)
Set the instance status

Parameters:
status - The instance status to set

getInstanceId

public InstanceId getInstanceId()
Get the instance identifier

Returns:
The instance identifier

getInstanceInfo

public InstanceInfo getInstanceInfo()
Get the instance info

Returns:
The InstanceInfo

getProperty

public java.lang.String getProperty(java.lang.String name)
Get an instance property as a string given its name

Parameters:
name - The property name
Returns:
The property value as a string or null

getAllPropertyNames

public java.util.List<java.lang.String> getAllPropertyNames()
Get the names of all the properties defined in this object

Returns:
The names of all the properties defined in this object

getDecimalProperty

public java.math.BigDecimal getDecimalProperty(java.lang.String name)
Get an instance property as a big decimal given its name

Parameters:
name - The property name
Returns:
The property value as a big decimal or null

getDateProperty

public java.util.Date getDateProperty(java.lang.String name)
Get an instance property as a date given its name

Parameters:
name - The property name
Returns:
The property value as a date or null

getBooleanProperty

public boolean getBooleanProperty(java.lang.String name)
Get an instance property as a boolean given its name

Parameters:
name - The property name
Returns:
The property value as a boolean or null

getIntegerProperty

public java.lang.Integer getIntegerProperty(java.lang.String name)
Get an instance property as an integer given its name

Parameters:
name - The property name
Returns:
The property value as an integer or null

getLongProperty

public java.lang.Long getLongProperty(java.lang.String name)
Get an instance property as a long given its name

Parameters:
name - The property name
Returns:
The property value as a long or null

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String value)
Add a property the instance given its name and value as the string

Parameters:
name - The property name to add
value - The property value as a string to add

addDecimalProperty

public void addDecimalProperty(java.lang.String name,
                               java.math.BigDecimal value)
Add a property the instance given its name and value as the big decimal

Parameters:
name - The property name to add
value - The property value as a big decimal to add

addDateProperty

public void addDateProperty(java.lang.String name,
                            java.util.Date value)
Add a property the instance given its name and value as the date

Parameters:
name - The property name to add
value - The property value as a date to add

addBooleanProperty

public void addBooleanProperty(java.lang.String name,
                               boolean value)
Add a property the instance given its name and value as the boolean

Parameters:
name - The property name to add
value - The property value as a boolean to add

addIntegerProperty

public void addIntegerProperty(java.lang.String name,
                               int value)
Add a property the instance given its name and value as the integer

Parameters:
name - The property name to add
value - The property value as a integer to add

addLongProperty

public void addLongProperty(java.lang.String name,
                            long value)
Add a property the instance given its name and value as the long

Parameters:
name - The property name to add
value - The property value as a long to add

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)