Class InMacroPropertyModel

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

public class InMacroPropertyModel extends 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:

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 Details

    • InMacroPropertyModel

      public InMacroPropertyModel()
      Constructs an empty input property model.
    • InMacroPropertyModel

      public InMacroPropertyModel(String name, 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 Details

    • getName

      public String getName()
      Returns the name of the input property.
      Returns:
      the name of the input property.
    • setName

      public void setName(String n)
      Sets the name of the input property.
      Parameters:
      n - the name of the input property.
    • getDescription

      public String getDescription()
      Returns the description of the input property.
      Returns:
      the description of the input property.
    • setDescription

      public void setDescription(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 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(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(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