public class DemoConnection extends BaseConnection
| Constructor and Description |
|---|
DemoConnection(BrowseContext context) |
| Modifier and Type | Method and Description |
|---|---|
DemoResponse |
doCreate(String objectType,
InputStream data)
Creates the given object
|
DemoResponse |
doDelete(String objectType,
String objectId)
Deletes the object with the given id
|
DemoResponse |
doGet(String objectType,
String objectId)
Fetches the given object
|
DemoResponse |
doQuery(List<Map.Entry<String,String>> queryTerms,
String objectType)
Executes a query using the given query terms
|
DemoResponse |
doUpdate(boolean replace,
String objectType,
List<ObjectData> inputBatch)
Updates the given objects
|
Document |
getMetadata(String objectTypeId)
Retrieves the list of available objects types or, if objectTypeId is specified, the definition of the given type
|
generateConnectionInfo, generateConnectionInfo, getConnector, getContext, getOperationContextpublic DemoConnection(BrowseContext context)
public Document getMetadata(String objectTypeId) throws IOException, SAXException
objectTypeId - id of the object type to get the object definition for or null to get all available objectsIOExceptionSAXExceptionParserConfigurationExceptionpublic DemoResponse doGet(String objectType, String objectId) throws IOException
objectType - id of the object typeobjectId - id of the object to be retrievedIOExceptionSAXExceptionParserConfigurationExceptionpublic DemoResponse doQuery(List<Map.Entry<String,String>> queryTerms, String objectType) throws IOException
queryTerms - query filter terms for the demo serviceobjectType - id of the object typeIOExceptionpublic DemoResponse doUpdate(boolean replace, String objectType, List<ObjectData> inputBatch) throws IOException, XMLStreamException
replace - whether or not to do complete replacementobjectType - id of the object typeinputBatch - batch of objects to updateIOExceptionXMLStreamExceptionpublic DemoResponse doCreate(String objectType, InputStream data) throws IOException
objectType - id of the object typedata - object to createIOExceptionpublic DemoResponse doDelete(String objectType, String objectId) throws IOException
objectType - id of the object typeobjectId - id of the object to deleteIOException