Package com.connectplaza.eaf.pojo.impl
Class ConnectMessageImpl
java.lang.Object
com.connectplaza.eaf.pojo.impl.ConnectMessageImpl
- All Implemented Interfaces:
ConnectMessage,Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPart(String id, ConnectMessagePart<?> part) CallsConnectMessage.addPart(String, ConnectMessagePart, boolean)with boolean = truevoidaddPart(String id, ConnectMessagePart<?> part, boolean overwrite) Adds a ConnectMessagePart to this ConnectMessage.voidaddProperties(Map<Object, Object> props) Adds all properties in a map to this ConnectMessage properties.voidaddProperties(Properties props) Adds all properties in props to this ConnectMessage properties.voidaddProperty(Object key, Object value) Adds a property to this ConnectMessage properties.booleanTests if the specified key is a property in this ConnectMessage.booleancontainsProperty(Object key) Deprecated.voidCopies a ConnectMessagePart.Gets the first (oldest) ConnectMessagePart.Gets the last (newest) ConnectMessagePart.Gets the value of a property as an Object.intGets the number of ConnectMessageParts in this ConnectMessage.getPartById(String id) Gets the ConnectMessagePart identified by id in this ConnectMessage.getPartByPartNumber(int partNumber) Gets the ConnectMessagePart with a certain partNumber.getPropertyValue(Object key) Deprecated.Gets the value of a property as a String.Deprecated.voidMoves a ConnectMessagePart to another partId.voidsetProperties(Properties properties) Sets (and replaces!) the Properties of this ConnectMessage.toString()toXML()Gets a simplified XML message of this ConnectMessage.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.connectplaza.eaf.pojo.interfaces.ConnectMessage
getParts, getProperties, setParts
-
Constructor Details
-
ConnectMessageImpl
public ConnectMessageImpl()
-
-
Method Details
-
setProperties
Description copied from interface:ConnectMessageSets (and replaces!) the Properties of this ConnectMessage.- Specified by:
setPropertiesin interfaceConnectMessage- Parameters:
properties- The Properties object to insert into this ConnectMessage.
-
getPropertyValue
Deprecated.Description copied from interface:ConnectMessageGets the value of a property as an Object. Property key will be searched in ConnectMessage properties. When not found the search will be extended to the properties of the contained ConnectMessageParts.- Specified by:
getPropertyValuein interfaceConnectMessage- Parameters:
key- Name of the property to find- Returns:
- The found value as an Object or null if not found
-
getMessagePropertyValue
Description copied from interface:ConnectMessageGets the value of a property as an Object. Property key will be searched in ConnectMessage properties only.- Specified by:
getMessagePropertyValuein interfaceConnectMessage- Parameters:
key- Name of the property to find- Returns:
- The found value as an Object or null if not found
-
getStringPropertyValue
Deprecated.Description copied from interface:ConnectMessageGets the value of a property as a String.- Specified by:
getStringPropertyValuein interfaceConnectMessage- Parameters:
key- Name of the property to find- Returns:
- The found value as a String or an empty String if not found or value cannot be cast to String
- See Also:
-
getStringMessagePropertyValue
Description copied from interface:ConnectMessageGets the value of a property as a String.- Specified by:
getStringMessagePropertyValuein interfaceConnectMessage- Parameters:
key- Name of the property to find- Returns:
- The found value as a String or an empty String if not found or value cannot be cast to String
- See Also:
-
getPartById
Description copied from interface:ConnectMessageGets the ConnectMessagePart identified by id in this ConnectMessage.- Specified by:
getPartByIdin interfaceConnectMessage- Parameters:
id- Name or id of the wanted ConnectMessagePart- Returns:
- The requested ConnectMessagePart or null if not found.
-
getFirstPart
Description copied from interface:ConnectMessageGets the first (oldest) ConnectMessagePart. The part with partnumber 0 is the first part that was added to this ConnectMessage. Because parts can be removed and partnumbers can not be changed on ConnectMessageParts the first part will not automatically be part with partnumber 0.- Specified by:
getFirstPartin interfaceConnectMessage- Returns:
- The ConnectMessagePart with the lowest partNumber
-
getLastPart
Description copied from interface:ConnectMessageGets the last (newest) ConnectMessagePart.- Specified by:
getLastPartin interfaceConnectMessage- Returns:
- The ConnectMessagePart with the highest partNumber
-
getPartByPartNumber
Description copied from interface:ConnectMessageGets the ConnectMessagePart with a certain partNumber. Each ConnectMessagePart gets a subsequent partNumber when it is stored in a ConnectMessage. PartNumbers start at 0 for the first ConnectMessagePart stored.- Specified by:
getPartByPartNumberin interfaceConnectMessage- Parameters:
partNumber- The number of the part to retrieve.- Returns:
- The ConnectMessagePart with partNumer or null when not found
-
addPart
Description copied from interface:ConnectMessageCallsConnectMessage.addPart(String, ConnectMessagePart, boolean)with boolean = true- Specified by:
addPartin interfaceConnectMessage- Parameters:
id- PartId to store this ConnectMessagePartpart- The ConnectMessagePart to add.
-
addPart
Description copied from interface:ConnectMessageAdds a ConnectMessagePart to this ConnectMessage. The ConnectMessagePart is mapped with the id into the ConnectMessage. The boolean defines if the ConnectMessagePart will be overwritten if it already exists.- Specified by:
addPartin interfaceConnectMessage- Parameters:
id- PartId to store this ConnectMessagePartpart- The ConnectMessagePart to add.overwrite- Defines the overwrite mode.
-
movePart
Description copied from interface:ConnectMessageMoves a ConnectMessagePart to another partId. The partId of a ConnectMessagePart is renamed. If the new partId already exists the overwrite boolean decides if the rename will actually occur.- Specified by:
movePartin interfaceConnectMessage- Parameters:
oldId- partid of the existing ConnectMessagePartnewId- new partId to rename the oldIdoverwrite- Defines the overwrite mode.
-
copyPart
Description copied from interface:ConnectMessageCopies a ConnectMessagePart. The new ConnectMessagePart is stored under the newId. The copy of the part is NOT a clone but just a reference copy. The boolean decides if the copy will overwrite an existing ConnectMessagePart.- Specified by:
copyPartin interfaceConnectMessage- Parameters:
oldId- partid of the existing ConnectMessagePartnewId- new partId to copy the exiting ConnectMessagePart to.clone- Defines if the content of the ConnectMessagePart will be cloned.overwrite- Defines the overwrite mode.
-
toString
-
toXML
Description copied from interface:ConnectMessageGets a simplified XML message of this ConnectMessage. Must only be used for logging purposes. The returned XML does not reflect the actual (JABX) XML reference of this ConnectMessage.- Specified by:
toXMLin interfaceConnectMessage- Returns:
- The simplified XML message as a String
-
addProperty
Description copied from interface:ConnectMessageAdds a property to this ConnectMessage properties. If the property key already exists the old value will be overwritten.- Specified by:
addPropertyin interfaceConnectMessage- Parameters:
key- Key name of the propertyvalue- Value of the property to add
-
addProperties
Description copied from interface:ConnectMessageAdds all properties in props to this ConnectMessage properties. Any existing properties in ConnectMessage will be kept unless overwritten by the new properties in props.- Specified by:
addPropertiesin interfaceConnectMessage- Parameters:
props- Properties to add
-
addProperties
Description copied from interface:ConnectMessageAdds all properties in a map to this ConnectMessage properties. Any existing properties in ConnectMessage will be kept unless overwritten by the new proprties in the map.- Specified by:
addPropertiesin interfaceConnectMessage- Parameters:
props- Map of properties to add
-
getNumberOfParts
public int getNumberOfParts()Description copied from interface:ConnectMessageGets the number of ConnectMessageParts in this ConnectMessage.- Specified by:
getNumberOfPartsin interfaceConnectMessage- Returns:
- The number of parts.
-
containsProperty
Deprecated.Description copied from interface:ConnectMessageTests if the specified key is a property in this ConnectMessage or any of its ConnectMessageParts.- Specified by:
containsPropertyin interfaceConnectMessage- Parameters:
key- The property key to test- Returns:
- True if the property is found, false otherwise
-
containsMessageProperty
Description copied from interface:ConnectMessageTests if the specified key is a property in this ConnectMessage.- Specified by:
containsMessagePropertyin interfaceConnectMessage- Parameters:
key- The property key to test- Returns:
- True if the property is found, false otherwise
-