Package com.boomi.connector.testutil
Class SimpleBrowseContext
- java.lang.Object
-
- com.boomi.connector.testutil.SimpleAtomContext
-
- com.boomi.connector.testutil.SimpleBrowseContext
-
- All Implemented Interfaces:
AtomContext
,BrowseContext
,ConnectorContext
- Direct Known Subclasses:
SimpleOperationContext
public class SimpleBrowseContext extends SimpleAtomContext implements BrowseContext
Simple implementation of BrowseContext.
-
-
Constructor Summary
Constructors Constructor Description SimpleBrowseContext(AtomConfig config, Connector connector, OperationType opType, String customOpType, Map<String,Object> connProps, Map<String,Object> opProps)
Constructs a new SimpleBrowseContextSimpleBrowseContext(AtomConfig config, Connector connector, OperationType opType, Map<String,Object> connProps, Map<String,Object> opProps)
Constructs a new SimpleBrowseContext
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertyMap
getConnectionProperties()
Returns the relevant connection properties if this connector has therequireConnectionForBrowse
flag enabled in the connector's descriptor.Connector
getConnector()
Returns the connector instance with which this context is associated.ConcurrentMap<Object,Object>
getConnectorCache()
Returns the current connector cache.String
getCustomOperationType()
Returns the custom type of the operation that is currently being configured.PropertyMap
getOperationProperties()
Returns any operation properties flagged asincludeInBrowse
for the current OperationType in the connector's descriptor.OperationType
getOperationType()
Returns the currently configured OperationTypeSSLContext
getSSLContext(PublicKeyStore publicKeyStore, PrivateKeyStore privateKeyStore)
TODO CON-601 pull up in 2.1 Returns aSSLContext
.-
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
-
-
-
-
Constructor Detail
-
SimpleBrowseContext
public SimpleBrowseContext(AtomConfig config, Connector connector, OperationType opType, Map<String,Object> connProps, Map<String,Object> opProps)
Constructs a new SimpleBrowseContext- Parameters:
config
- the basic config for browsingopType
- the type of operation for browsingconnProps
- the connection properties for browsing, may benull
opProps
- the operation properties for browsing, may benull
-
SimpleBrowseContext
public SimpleBrowseContext(AtomConfig config, Connector connector, OperationType opType, String customOpType, Map<String,Object> connProps, Map<String,Object> opProps)
Constructs a new SimpleBrowseContext- Parameters:
config
- the basic config for browsingopType
- the type of operation for browsingcustomOpType
- the custom type of operation for browsingconnProps
- the connection properties for browsing, may benull
opProps
- the operation properties for browsing, may benull
-
-
Method Detail
-
getConnector
public Connector getConnector()
Description copied from interface:ConnectorContext
Returns the connector instance with which this context is associated.- Specified by:
getConnector
in interfaceConnectorContext
-
getOperationType
public OperationType getOperationType()
Description copied from interface:BrowseContext
Returns the currently configured OperationType- Specified by:
getOperationType
in interfaceBrowseContext
-
getCustomOperationType
public String getCustomOperationType()
Description copied from interface:BrowseContext
Returns the custom type of the operation that is currently being configured. This is the customTypeId field from the connector descriptor.- Specified by:
getCustomOperationType
in interfaceBrowseContext
- Returns:
- customTypeId field from the connector descriptor.
-
getConnectionProperties
public PropertyMap getConnectionProperties()
Description copied from interface:ConnectorContext
Returns the relevant connection properties if this connector has therequireConnectionForBrowse
flag enabled in the connector's descriptor.- Specified by:
getConnectionProperties
in interfaceConnectorContext
-
getOperationProperties
public PropertyMap getOperationProperties()
Description copied from interface:BrowseContext
Returns any operation properties flagged asincludeInBrowse
for the current OperationType in the connector's descriptor.- Specified by:
getOperationProperties
in interfaceBrowseContext
-
getConnectorCache
public ConcurrentMap<Object,Object> getConnectorCache()
Description copied from interface:ConnectorContext
Returns the current connector cache. This is the preferred means for caching any Connector resources for use across operation calls. This cache is Boomi account specific, so login/credential based information may be put in this cache. Note, however that a given Boomi account may still have multiple connector service accounts, so the cache information should take that into account (e.g. by caching information based on the service username). The lifetime of this cache is defined by the lifetime of the Connector instance (so, essentially indefinite), and, among other things, the objects in this cache must be used in a thread-safe manner.- Specified by:
getConnectorCache
in interfaceConnectorContext
-
getSSLContext
public SSLContext getSSLContext(PublicKeyStore publicKeyStore, PrivateKeyStore privateKeyStore) throws GeneralSecurityException
Description copied from interface:BrowseContext
TODO CON-601 pull up in 2.1 Returns aSSLContext
. Passingnull
for public and private key stores will make an attempt to configure it to use trusted JVM and deployed atom certificates if called during an operation execution.- Specified by:
getSSLContext
in interfaceBrowseContext
- Throws:
GeneralSecurityException
-
-