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 boolean
equals(Object o)
InputStream
getData()
Returns a non-null
stream containing the document data passed into the connector shape.long
getDataSize()
Returns the size of the stream containing the document data passed into the connector shape.MutableDynamicPropertyMap
getDynamicOperationProperties()
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
).QueryFilter
getFilter()
Returns a query filter describing the object to be retrieved.Logger
getLogger()
Returns a logger which should be used to log information specific to this tracked data.String
getObjectId()
Returns a non-null
object id.Object
getTrackingId()
Returns a "tracking" id for this tracked data.Object
getUniqueId()
Returns a unique id for this tracked data.Map<String,String>
getUserDefinedProperties()
Returns any user-defined properties for this tracked data (always non-null
).int
hashCode()
String
toString()
-
-
-
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:TrackedData
Returns 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:
getUniqueId
in interfaceTrackedData
-
getTrackingId
public Object getTrackingId()
Description copied from interface:TrackedData
Returns 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:
getTrackingId
in interfaceTrackedData
-
getUserDefinedProperties
public Map<String,String> getUserDefinedProperties()
Description copied from interface:TrackedData
Returns 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:
getUserDefinedProperties
in interfaceTrackedData
-
getDynamicProperties
public Map<String,String> getDynamicProperties()
Description copied from interface:TrackedData
Returns 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:
getDynamicProperties
in interfaceTrackedData
-
getDynamicOperationProperties
public MutableDynamicPropertyMap getDynamicOperationProperties()
Description copied from interface:TrackedData
Returns dynamic operation properties for this tracked data (always non-null
). ThisDynamicPropertyMap
contains String variants of all values fromBrowseContext.getOperationProperties()
with any overridden values applied- Specified by:
getDynamicOperationProperties
in interfaceTrackedData
-
getLogger
public Logger getLogger()
Description copied from interface:TrackedData
Returns a logger which should be used to log information specific to this tracked data.- Specified by:
getLogger
in interfaceTrackedData
-
getFilter
public QueryFilter getFilter()
Description copied from interface:FilterData
Returns 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:
getFilter
in interfaceFilterData
-
getDataSize
public long getDataSize() throws IOException
Description copied from interface:ObjectData
Returns the size of the stream containing the document data passed into the connector shape.- Specified by:
getDataSize
in interfaceObjectData
- Throws:
IOException
-
getData
public InputStream getData()
Description copied from interface:ObjectData
Returns a non-null
stream 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:
getData
in interfaceObjectData
-
getObjectId
public String getObjectId()
Description copied from interface:ObjectIdData
Returns a non-null
object id.- Specified by:
getObjectId
in interfaceObjectIdData
-
-