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, getOperationContext
public 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 objectsIOException
SAXException
ParserConfigurationException
public DemoResponse doGet(String objectType, String objectId) throws IOException
objectType
- id of the object typeobjectId
- id of the object to be retrievedIOException
SAXException
ParserConfigurationException
public DemoResponse doQuery(List<Map.Entry<String,String>> queryTerms, String objectType) throws IOException
queryTerms
- query filter terms for the demo serviceobjectType
- id of the object typeIOException
public 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 updateIOException
XMLStreamException
public DemoResponse doCreate(String objectType, InputStream data) throws IOException
objectType
- id of the object typedata
- object to createIOException
public DemoResponse doDelete(String objectType, String objectId) throws IOException
objectType
- id of the object typeobjectId
- id of the object to deleteIOException