public class DemoConnector extends BaseConnector
Modifier and Type | Field and Description |
---|---|
static String |
ECHO_OPERATION_TYPE
Name of custom operation that requires special handling
|
protected static String |
LIST_EL_NAME
name of wrapper element for multiple object request/response
|
protected static String |
OFFSET_PARAM
query parameter for getting more results
|
Constructor and Description |
---|
DemoConnector() |
Modifier and Type | Method and Description |
---|---|
Browser |
createBrowser(BrowseContext context)
Returns a Browser for this connector.
|
protected Operation |
createCreateOperation(OperationContext context)
Creates a new CREATE operation.
|
protected Operation |
createDeleteOperation(OperationContext context)
Creates a new DELETE operation.
|
protected Operation |
createExecuteOperation(OperationContext context)
Creates a new EXECUTE operation.
|
protected Operation |
createGetOperation(OperationContext context)
Creates a new GET operation.
|
protected Operation |
createQueryOperation(OperationContext context)
Creates a new QUERY operation.
|
protected Operation |
createUpdateOperation(OperationContext context)
Creates a new UPDATE operation.
|
createOperation, createUpsertOperation, getContext, initialize, setContext
protected static final String OFFSET_PARAM
protected static final String LIST_EL_NAME
public static final String ECHO_OPERATION_TYPE
public Browser createBrowser(BrowseContext context)
Connector
ConnectorContext.getConnectionProperties()
if the configuration is marked "requireConnectionForBrowse"
and all operation fields marked "includeInBrowse will be provided in
BrowseContext.getOperationProperties()
(where the keys will be the relevant field's "id" and the values
will be of the appropriate Java type for the relevant field's "type").
This call should be relatively cheap as Browsers are only ever created for a single invocation. Any resource
caching should be handled at the Connector level or via the ConnectorContext.getConnectorCache()
.
context
- the context for this browse operation. this context is considered to be owned by the Browser
after this call and may be held by the Browser for use in subsequent method calls.protected Operation createGetOperation(OperationContext context)
BaseConnector
Default implementation throws UnsupportedOperationException.
createGetOperation
in class BaseConnector
context
- the new operation's contextprotected Operation createCreateOperation(OperationContext context)
BaseConnector
Default implementation throws UnsupportedOperationException.
createCreateOperation
in class BaseConnector
context
- the new operation's contextprotected Operation createUpdateOperation(OperationContext context)
BaseConnector
Default implementation throws UnsupportedOperationException.
createUpdateOperation
in class BaseConnector
context
- the new operation's contextprotected Operation createDeleteOperation(OperationContext context)
BaseConnector
Default implementation throws UnsupportedOperationException.
createDeleteOperation
in class BaseConnector
context
- the new operation's contextprotected Operation createQueryOperation(OperationContext context)
BaseConnector
Default implementation throws UnsupportedOperationException.
createQueryOperation
in class BaseConnector
context
- the new operation's contextprotected Operation createExecuteOperation(OperationContext context)
BaseConnector
Default implementation throws UnsupportedOperationException.
createExecuteOperation
in class BaseConnector
context
- the new operation's context