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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected intprotected Properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperties(Properties props) Adds all properties in props to this ConnectMessagePart properties.voidaddProperty(Object key, Object value) Adds a property to this ConnectMessagePart properties.booleancontainsProperty(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 StringvoidsetPartNumber(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, waitMethods 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:ConnectMessagePartSets 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:
setPartNumberin interfaceConnectMessagePart<T>- Parameters:
partNumber- The partnumber to set
-
getPropertyValue
Description copied from interface:ConnectMessagePartGets the value of a property as an Object. Property key will be searched in ConnectMessagePart properties.- Specified by:
getPropertyValuein 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:ConnectMessagePartAdds a property to this ConnectMessagePart properties. If the property key already exists the old value will be overwritten.- Specified by:
addPropertyin 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:ConnectMessagePartAdds 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:
addPropertiesin interfaceConnectMessagePart<T>- Parameters:
props- Properties to add
-
containsProperty
Description copied from interface:ConnectMessagePartTests if the specified key is a property in this ConnectMessagePart.- Specified by:
containsPropertyin interfaceConnectMessagePart<T>- Parameters:
key- The property key to test- Returns:
- True if the property is found, false otherwise
-
toXML
Description copied from interface:ConnectMessagePartGets 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:
toXMLin interfaceConnectMessagePart<T>- Returns:
- The simplified XML message as a String
-
printProperties
-