Package com.boomi.connector.testutil
Class SimpleOperationContext
- java.lang.Object
-
- com.boomi.connector.testutil.SimpleAtomContext
-
- com.boomi.connector.testutil.SimpleBrowseContext
-
- com.boomi.connector.testutil.SimpleOperationContext
-
- All Implemented Interfaces:
AtomContext
,BrowseContext
,ConnectorContext
,OperationContext
,PayloadMetadataFactory
public class SimpleOperationContext extends SimpleBrowseContext implements OperationContext
Simple implementation of OperationContext.
-
-
Constructor Summary
Constructors Constructor Description SimpleOperationContext(AtomConfig config, Connector connector, OperationType opType, Map<String,Object> connProps, Map<String,Object> opProps, String objectTypeId, Map<ObjectDefinitionRole,String> cookies)
Constructs a new SimpleOperationContext.SimpleOperationContext(AtomConfig config, Connector connector, OperationType opType, Map<String,Object> connProps, Map<String,Object> opProps, String objectTypeId, Map<ObjectDefinitionRole,String> cookies, List<String> selectedFields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PayloadMetadata
createMetadata()
String
getObjectDefinitionCookie(ObjectDefinitionRole role)
Returns an object definition cookie constructed by the object profile retrieval during a browsing request.String
getObjectTypeId()
Returns the id of the object type for which this operation is being executed.List<String>
getSelectedFields()
Returns a field list describing the fields to be retrieved.-
Methods inherited from class com.boomi.connector.testutil.SimpleBrowseContext
getConnectionProperties, getConnector, getConnectorCache, getCustomOperationType, getOperationProperties, getOperationType, getSSLContext
-
Methods inherited from class com.boomi.connector.testutil.SimpleAtomContext
createSSLContext, createTempOutputStream, getConfig, tempOutputStreamToInputStream, tempOutputStreamToPayload
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.boomi.connector.api.AtomContext
createTempOutputStream, getConfig, tempOutputStreamToInputStream, tempOutputStreamToPayload
-
Methods inherited from interface com.boomi.connector.api.BrowseContext
getCustomOperationType, getOperationProperties, getOperationType, getSSLContext
-
Methods inherited from interface com.boomi.connector.api.ConnectorContext
getConnectionProperties, getConnector, getConnectorCache
-
-
-
-
Constructor Detail
-
SimpleOperationContext
public SimpleOperationContext(AtomConfig config, Connector connector, OperationType opType, Map<String,Object> connProps, Map<String,Object> opProps, String objectTypeId, Map<ObjectDefinitionRole,String> cookies)
Constructs a new SimpleOperationContext.- Parameters:
config
- the basic config for for operation executionopType
- the type of operation for operation executionconnProps
- the connection properties for operation execution, may benull
opProps
- the operation properties for operation execution, may benull
objectTypeId
- the type of the object for operation executioncookies
- any cookies from the ObjectDefinition for the relevant object type, may benull
-
SimpleOperationContext
public SimpleOperationContext(AtomConfig config, Connector connector, OperationType opType, Map<String,Object> connProps, Map<String,Object> opProps, String objectTypeId, Map<ObjectDefinitionRole,String> cookies, List<String> selectedFields)
-
-
Method Detail
-
getObjectTypeId
public String getObjectTypeId()
Description copied from interface:OperationContext
Returns the id of the object type for which this operation is being executed.- Specified by:
getObjectTypeId
in interfaceOperationContext
-
getObjectDefinitionCookie
public String getObjectDefinitionCookie(ObjectDefinitionRole role)
Description copied from interface:OperationContext
Returns an object definition cookie constructed by the object profile retrieval during a browsing request.- Specified by:
getObjectDefinitionCookie
in interfaceOperationContext
- Parameters:
role
- the role identifying the profile for which the profile is desired- Returns:
- the stored cookie, or
null
if no cookie was stored for the profile
-
getSelectedFields
public List<String> getSelectedFields()
Description copied from interface:OperationContext
Returns a field list describing the fields to be retrieved. This may benull
, indicating that all fields should be retrieved- Specified by:
getSelectedFields
in interfaceOperationContext
-
createMetadata
public PayloadMetadata createMetadata()
- Specified by:
createMetadata
in interfacePayloadMetadataFactory
-
-