Package com.highdeal.pnr.hci
Class InMacroPropertyModel
java.lang.Object
com.highdeal.pnr.hci.InMacroPropertyModel
- All Implemented Interfaces:
XMLMarshallable
This class represents an input property of a macro and
contains a name, a description and the required type of the property.
The type of an input property must be
string,
number, or date.- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="inProperty">
<xs:complexType>
<xs:sequence>
<xs:element ref="additionalInformation" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="description" type="xs:string"/>
</xs:complexType>
</xs:element>
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty input property model.InMacroPropertyModel(String name, String description, int type) Constructs an input property with a name, a description and a type. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.booleanReturns true if the property is valid.Gets the list ofAdditional Informations.Returns the description of the input property.getName()Returns the name of the input property.intgetType()Gets the type of the input property.booleanReturns true if the input property must be a persistent counter.booleanReturns true if the input property must be a transient counter.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidSets the description of the input property.voidSets the name of the input property.voidSets if the input property must be neither a persistent nor a transient counter.voidsetPersistentCounter(boolean c) Sets if the input property must be a persistent counter.voidsetTransientCounter(boolean c) Sets if the input property must be a transient counter.voidsetType(int t) Sets the type of the input property.
-
Constructor Details
-
InMacroPropertyModel
public InMacroPropertyModel()Constructs an empty input property model. -
InMacroPropertyModel
Constructs an input property with a name, a description and a type.- Parameters:
name- the name of the property.description- the description of the property.type- the type of the property.
-
-
Method Details
-
getName
Returns the name of the input property.- Returns:
- the name of the input property.
-
setName
Sets the name of the input property.- Parameters:
n- the name of the input property.
-
getDescription
Returns the description of the input property.- Returns:
- the description of the input property.
-
setDescription
Sets the description of the input property.- Parameters:
d- the description of the input property.
-
getType
public int getType()Gets the type of the input property. Returned values are :- Returns:
- the type of the input property.
-
setType
public void setType(int t) Sets the type of the input property. Allowed values are :- Parameters:
t- the type of the input property.
-
setNotCounter
public void setNotCounter()Sets if the input property must be neither a persistent nor a transient counter. -
isPersistentCounter
public boolean isPersistentCounter()Returns true if the input property must be a persistent counter.- Returns:
- true if the input property must be a persistent counter, false otherwise.
-
setPersistentCounter
public void setPersistentCounter(boolean c) Sets if the input property must be a persistent counter.- Parameters:
c- true if the input property must be a persistent counter, false otherwise.
-
isTransientCounter
public boolean isTransientCounter()Returns true if the input property must be a transient counter.- Returns:
- true if the input property must be a transient counter, false otherwise.
-
setTransientCounter
public void setTransientCounter(boolean c) Sets if the input property must be a transient counter.- Parameters:
c- true if the input property must be a transient counter, false otherwise.
-
getAdditionalInfoList
Gets the list ofAdditional Informations.- Returns:
- The list of Additional Informations
-
checkValidity
public boolean checkValidity()Returns true if the property is valid. Property is valid if its name is not null or empty and if its type is valid (seesetType(int).- Returns:
- true if the property is valid, false otherwise.
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-