Package com.connectplaza.eaf.pojo.impl
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
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected String
protected int
protected Properties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProperties
(Properties props) Adds all properties in props to this ConnectMessagePart properties.void
addProperty
(Object key, Object value) Adds a property to this ConnectMessagePart properties.boolean
containsProperty
(Object key) Tests if the specified key is a property in this ConnectMessagePart.getPropertyValue
(Object key) Gets the value of a property as an Object.protected String
void
setPartNumber
(int partNumber) Sets the partNumber of this ConnectMessagePart.toXML()
Gets a simplified XML message of this ConnectMessagePart.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.connectplaza.eaf.pojo.interfaces.ConnectMessagePart
getContent, getId, getPartNumber, getProperties, getStringContent, getType, isCloneContent, setCloneContent, setContent, setId, setProperties, setStringContent
-
Field Details
-
id
-
partNumber
protected int partNumber -
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 interfaceConnectMessagePart<T>
- Parameters:
partNumber
- The partnumber to set
-
getPropertyValue
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 interfaceConnectMessagePart<T>
- Parameters:
key
- Name of the property to find- Returns:
- The found value as an Object or null if not found
-
addProperty
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 interfaceConnectMessagePart<T>
- Parameters:
key
- Key name of the propertyvalue
- Value of the property to add. If null the property will be emptied.
-
addProperties
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 interfaceConnectMessagePart<T>
- Parameters:
props
- Properties to add
-
containsProperty
Description copied from interface:ConnectMessagePart
Tests if the specified key is a property in this ConnectMessagePart.- Specified by:
containsProperty
in interfaceConnectMessagePart<T>
- Parameters:
key
- The property key to test- Returns:
- True if the property is found, false otherwise
-
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 interfaceConnectMessagePart<T>
- Returns:
- The simplified XML message as a String
-
printProperties
-