com.highdeal.pnr.hci
Class InMacroPropertyModel

java.lang.Object
  extended by com.highdeal.pnr.hci.InMacroPropertyModel
All Implemented Interfaces:
XMLMarshallable

public class InMacroPropertyModel
extends java.lang.Object
implements 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:
PricingMacroModel

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
InMacroPropertyModel()
          Constructs an empty input property model.
InMacroPropertyModel(java.lang.String name, java.lang.String description, int type)
          Constructs an input property with a name, a description and a type.
 
Method Summary
 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.
 boolean checkValidity()
          Returns true if the property is valid.
 java.util.List<AdditionalInfoModel> getAdditionalInfoList()
          Gets the list of Additional Informations.
 java.lang.String getDescription()
          Returns the description of the input property.
 java.lang.String getName()
          Returns the name of the input property.
 int getType()
          Gets the type of the input property.
 boolean isPersistentCounter()
          Returns true if the input property must be a persistent counter.
 boolean isTransientCounter()
          Returns true if the input property must be a transient counter.
 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 setDescription(java.lang.String d)
          Sets the description of the input property.
 void setName(java.lang.String n)
          Sets the name of the input property.
 void setNotCounter()
          Sets if the input property must be neither a persistent nor a transient counter.
 void setPersistentCounter(boolean c)
          Sets if the input property must be a persistent counter.
 void setTransientCounter(boolean c)
          Sets if the input property must be a transient counter.
 void setType(int t)
          Sets the type of the input property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMacroPropertyModel

public InMacroPropertyModel()
Constructs an empty input property model.


InMacroPropertyModel

public InMacroPropertyModel(java.lang.String name,
                            java.lang.String description,
                            int type)
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 Detail

getName

public java.lang.String getName()
Returns the name of the input property.

Returns:
the name of the input property.

setName

public void setName(java.lang.String n)
Sets the name of the input property.

Parameters:
n - the name of the input property.

getDescription

public java.lang.String getDescription()
Returns the description of the input property.

Returns:
the description of the input property.

setDescription

public void setDescription(java.lang.String d)
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

public java.util.List<AdditionalInfoModel> getAdditionalInfoList()
Gets the list of Additional 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 (see setType(int).

Returns:
true if the property is valid, false otherwise.

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

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

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

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)