Class AbstractConnectMessagePart<T>

java.lang.Object
com.connectplaza.eaf.pojo.impl.AbstractConnectMessagePart<T>
All Implemented Interfaces:
ConnectMessagePart<T>, Serializable
Direct Known Subclasses:
ConnectMessagePartByteArrayImpl, ConnectMessagePartDocumentImpl, ConnectMessagePartFileImpl, ConnectMessagePartLargeFileImpl, ConnectMessagePartObjectImpl, ConnectMessagePartStringImpl

public abstract class AbstractConnectMessagePart<T> extends Object implements ConnectMessagePart<T>
See Also:
  • Field Details

    • id

      protected String id
    • partNumber

      protected int partNumber
    • properties

      protected Properties properties
    • cloneContent

      protected boolean cloneContent
  • Constructor Details

    • AbstractConnectMessagePart

      public AbstractConnectMessagePart()
  • Method Details

    • setPartNumber

      public void setPartNumber(int partNumber)
      Description copied from interface: ConnectMessagePart
      Sets the partNumber of this ConnectMessagePart. The partNumber is automatically set when adding the ConnectMessagePart to the ConnectMessage. Once set, a partNumber cannot be changed.
      Specified by:
      setPartNumber in interface ConnectMessagePart<T>
      Parameters:
      partNumber - The partnumber to set
    • getPropertyValue

      public Object getPropertyValue(Object key)
      Description copied from interface: ConnectMessagePart
      Gets the value of a property as an Object. Property key will be searched in ConnectMessagePart properties.
      Specified by:
      getPropertyValue in interface ConnectMessagePart<T>
      Parameters:
      key - Name of the property to find
      Returns:
      The found value as an Object or null if not found
    • addProperty

      public void addProperty(Object key, Object value)
      Description copied from interface: ConnectMessagePart
      Adds a property to this ConnectMessagePart properties. If the property key already exists the old value will be overwritten.
      Specified by:
      addProperty in interface ConnectMessagePart<T>
      Parameters:
      key - Key name of the property
      value - Value of the property to add. If null the property will be emptied.
    • addProperties

      public void addProperties(Properties props)
      Description copied from interface: ConnectMessagePart
      Adds all properties in props to this ConnectMessagePart properties. Any existing properties in ConnectMessagePart will be kept unless overwritten by the new properties in props.
      Specified by:
      addProperties in interface ConnectMessagePart<T>
      Parameters:
      props - Properties to add
    • containsProperty

      public boolean containsProperty(Object key)
      Description copied from interface: ConnectMessagePart
      Tests if the specified key is a property in this ConnectMessagePart.
      Specified by:
      containsProperty in interface ConnectMessagePart<T>
      Parameters:
      key - The property key to test
      Returns:
      True if the property is found, false otherwise
    • toXML

      public String toXML()
      Description copied from interface: ConnectMessagePart
      Gets a simplified XML message of this ConnectMessagePart. Must only be used for logging purposes. The returned XML does not reflect the actual (JABX) XML reference of this ConnectMessagePart.
      Specified by:
      toXML in interface ConnectMessagePart<T>
      Returns:
      The simplified XML message as a String
    • printProperties

      protected String printProperties()