Package com.boomi.connector.testutil
Class SimpleTrackedData
- java.lang.Object
-
- com.boomi.connector.testutil.SimpleTrackedData
-
- All Implemented Interfaces:
FilterData,ObjectData,ObjectIdData,TrackedData
public class SimpleTrackedData extends Object implements TrackedData, ObjectData, ObjectIdData, FilterData
Simple implementation of TrackedData for all necessary data types.
-
-
Constructor Summary
Constructors Constructor Description SimpleTrackedData(int id, Object data)SimpleTrackedData(int id, Object data, Map<String,String> userDefProps)SimpleTrackedData(int id, Object data, Map<String,String> userDefProps, Map<String,String> dynamicProps)SimpleTrackedData(int id, Object data, Map<String,String> userDefProps, Map<String,String> dynamicProps, MutableDynamicPropertyMap dynamicOpProps)Creates a new instance of tracked data for testing
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)InputStreamgetData()Returns a non-nullstream containing the document data passed into the connector shape.longgetDataSize()Returns the size of the stream containing the document data passed into the connector shape.MutableDynamicPropertyMapgetDynamicOperationProperties()Returns dynamic operation properties for this tracked data (always non-null).Map<String,String>getDynamicProperties()Returns any dynamic connector properties for this tracked data (always non-null).QueryFiltergetFilter()Returns a query filter describing the object to be retrieved.LoggergetLogger()Returns a logger which should be used to log information specific to this tracked data.StringgetObjectId()Returns a non-nullobject id.ObjectgetTrackingId()Returns a "tracking" id for this tracked data.ObjectgetUniqueId()Returns a unique id for this tracked data.Map<String,String>getUserDefinedProperties()Returns any user-defined properties for this tracked data (always non-null).inthashCode()StringtoString()
-
-
-
Constructor Detail
-
SimpleTrackedData
public SimpleTrackedData(int id, Object data)
-
SimpleTrackedData
public SimpleTrackedData(int id, Object data, Map<String,String> userDefProps, Map<String,String> dynamicProps)
-
SimpleTrackedData
public SimpleTrackedData(int id, Object data, Map<String,String> userDefProps, Map<String,String> dynamicProps, MutableDynamicPropertyMap dynamicOpProps)Creates a new instance of tracked data for testing- Parameters:
id- this tracked data's iddata- this tracked data's inputuserDefProps- User defined properties for this tracked datadynamicProps- Map of overrideable connection properties for this tracked datadynamicOpProps- Overrideable Operation properties for this tracked data
-
-
Method Detail
-
getUniqueId
public Object getUniqueId()
Description copied from interface:TrackedDataReturns a unique id for this tracked data. The returned object will have validObject.toString(),Object.hashCode(), andObject.equals(java.lang.Object)method implementations and may therefore be used for things like log statements or Map keys during an operation execution, but may not otherwise be relied upon (the implementations are free to change in future atom implementations).- Specified by:
getUniqueIdin interfaceTrackedData
-
getTrackingId
public Object getTrackingId()
Description copied from interface:TrackedDataReturns a "tracking" id for this tracked data. This id links this data to data being tracked by the atom (multiple TrackedData instances may be linked to the same tracked document). This value does not uniquely identify this data, and should only be used for things like log statements, and may not otherwise be relied upon (the implementation is free to change in future atom implementations).- Specified by:
getTrackingIdin interfaceTrackedData
-
getUserDefinedProperties
public Map<String,String> getUserDefinedProperties()
Description copied from interface:TrackedDataReturns any user-defined properties for this tracked data (always non-null). User-defined properties may be set dynamically for each tracked data during process execution.- Specified by:
getUserDefinedPropertiesin interfaceTrackedData
-
getDynamicProperties
public Map<String,String> getDynamicProperties()
Description copied from interface:TrackedDataReturns any dynamic connector properties for this tracked data (always non-null). Dynamic connector properties may be set dynamically for each tracked data during process execution.- Specified by:
getDynamicPropertiesin interfaceTrackedData
-
getDynamicOperationProperties
public MutableDynamicPropertyMap getDynamicOperationProperties()
Description copied from interface:TrackedDataReturns dynamic operation properties for this tracked data (always non-null). ThisDynamicPropertyMapcontains String variants of all values fromBrowseContext.getOperationProperties()with any overridden values applied- Specified by:
getDynamicOperationPropertiesin interfaceTrackedData
-
getLogger
public Logger getLogger()
Description copied from interface:TrackedDataReturns a logger which should be used to log information specific to this tracked data.- Specified by:
getLoggerin interfaceTrackedData
-
getFilter
public QueryFilter getFilter()
Description copied from interface:FilterDataReturns a query filter describing the object to be retrieved. This may benull(generally in start shapes), indicating that all objects of the relevant request type should be retrieved.- Specified by:
getFilterin interfaceFilterData
-
getDataSize
public long getDataSize() throws IOExceptionDescription copied from interface:ObjectDataReturns the size of the stream containing the document data passed into the connector shape.- Specified by:
getDataSizein interfaceObjectData- Throws:
IOException
-
getData
public InputStream getData()
Description copied from interface:ObjectDataReturns a non-nullstream containing the document data passed into the connector shape. This stream MUST be closed by the consumer. Since this stream contains the actual data, it can be very large and should NOT be loaded directly into memory without putting any safeguards in place to limit the amount of memory that can be consumed. This stream can be reset to the beginning if the data needs to be replayed.- Specified by:
getDatain interfaceObjectData
-
getObjectId
public String getObjectId()
Description copied from interface:ObjectIdDataReturns a non-nullobject id.- Specified by:
getObjectIdin interfaceObjectIdData
-
-