Package com.boomi.connector.testutil
Class SimplePayloadMetadata
- java.lang.Object
-
- com.boomi.connector.testutil.SimplePayloadMetadata
-
- All Implemented Interfaces:
PayloadMetadata
public class SimplePayloadMetadata extends Object implements PayloadMetadata
Simple implementation of TrackedData for all necessary data types. Created by victortch on 6/13/16.
-
-
Constructor Summary
Constructors Constructor Description SimplePayloadMetadata()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Map<String,String>>
getTrackedGroups()
Map<String,String>
getTrackedProps()
Map<String,String>
getUserDefProps()
void
setTrackedGroupProperties(String groupId, Map<String,String> properties)
Sets the document level connector trackedGroup.void
setTrackedGroupProperty(String groupId, String name, String value)
Adds a single property to a trackedGroup based on groupId.void
setTrackedProperty(String name, String value)
Sets a connector tracked property.void
setUserDefinedProperty(String name, String value)
Sets a user defined / dynamic document property.
-
-
-
Method Detail
-
setTrackedProperty
public void setTrackedProperty(String name, String value)
Description copied from interface:PayloadMetadata
Sets a connector tracked property. The name should ideally correspond to tracked property declaration in the connector descriptor. This is not required to add the property but the property will not appear in process reporting or be accessible by any shapes that can read predefined connector properties. This method should be preferred overPayloadMetadata.setUserDefinedProperty(String, String)
whenever possible.- Specified by:
setTrackedProperty
in interfacePayloadMetadata
- Parameters:
name
- the name of the property as defined in the descriptorvalue
- the value of the property
-
setUserDefinedProperty
public void setUserDefinedProperty(String name, String value)
Description copied from interface:PayloadMetadata
Sets a user defined / dynamic document property. Process designers will need to match the name and case of this property exactly in order to access the value. Additionally, dynamic document properties can cause issues with downstream connectors/shapes that may be accessing the properties as there's no supported way for process designers to remove unwanted properties. Connector developers should preferPayloadMetadata.setTrackedProperty(String, String)
over this method whenever possible. Note: This method is not currently supported for LISTEN operations. Any user defined properties set by the operation will be ignored.- Specified by:
setUserDefinedProperty
in interfacePayloadMetadata
- Parameters:
name
- the name of the propertyvalue
- the value of the property
-
setTrackedGroupProperties
public void setTrackedGroupProperties(String groupId, Map<String,String> properties)
Description copied from interface:PayloadMetadata
Sets the document level connector trackedGroup. The groupId should correspond to the tracked group declaration in the connector descriptor. The name / value property is stored only for the connector and is not mandatory to add, but the properties will not appear in process reporting or be accessible by any shapes that execute a get on connector properties based off of the groupId and the name. If there are duplicate name / value properties, then the last one will be accessible to the process developer.- Specified by:
setTrackedGroupProperties
in interfacePayloadMetadata
- Parameters:
groupId
- the group id for properties.properties
- the properties associated with the groupId
-
setTrackedGroupProperty
public void setTrackedGroupProperty(String groupId, String name, String value)
Description copied from interface:PayloadMetadata
Adds a single property to a trackedGroup based on groupId. The groupId should correspond to the tracked group declaration in the connector descriptor. The name / value is stored only for the connector and is not mandatory to add, but the properties will not appear in process reporting or be accessible by any shapes that execute a get on connector properties based off of the groupId and the name. If there are duplicate name / value properties, then the last one will be accessible to the process developer.- Specified by:
setTrackedGroupProperty
in interfacePayloadMetadata
-
-