public class NodeIdRepresentation extends Object
Constructor and Description |
---|
NodeIdRepresentation(IStorage pDatabase)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSubResource(String resourceName,
long nodeId,
InputStream input,
EIdAccessType type)
This method is responsible to perform a POST request to a node id.
|
void |
deleteResource(String resourceName,
long nodeId)
This method is responsible to delete an XML resource addressed through a
unique node id (except root node id).
|
javax.ws.rs.core.StreamingOutput |
getResource(String resourceName,
long nodeId,
Map<QueryParameter,String> queryParams)
This method is responsible to deliver the whole XML resource addressed by
a unique node id.
|
javax.ws.rs.core.StreamingOutput |
getResourceByAT(String resourceName,
long nodeId,
Map<QueryParameter,String> queryParams,
EIdAccessType accessType)
This method is responsible to deliver the whole XML resource addressed by
a unique node id.
|
void |
modifyResource(String resourceName,
long nodeId,
InputStream newValue)
This method is responsible to modify the XML resource, which is addressed
through a unique node id.
|
javax.ws.rs.core.StreamingOutput |
performQueryOnResource(String resourceName,
long nodeId,
String query,
Map<QueryParameter,String> queryParams)
This method is responsible to perform a XPath query expression on the XML
resource which is addressed through a unique node id.
|
public NodeIdRepresentation(IStorage pDatabase)
pDatabase
- storage to be setpublic javax.ws.rs.core.StreamingOutput getResource(String resourceName, long nodeId, Map<QueryParameter,String> queryParams) throws JaxRxException
resourceName
- The name of the database, where the node id belongs.nodeId
- The unique node id of the requested resource.queryParams
- The optional query parameters.JaxRxException
- The exception occurred.public javax.ws.rs.core.StreamingOutput getResourceByAT(String resourceName, long nodeId, Map<QueryParameter,String> queryParams, EIdAccessType accessType) throws JaxRxException
resourceName
- The name of the database, where the node id belongs.nodeId
- The unique node id of the requested resource.queryParams
- The optional query parameters.accessType
- The id access type to access a resource by a relative method
type defined in EIdAccessType
.JaxRxException
- The exception occurred.public javax.ws.rs.core.StreamingOutput performQueryOnResource(String resourceName, long nodeId, String query, Map<QueryParameter,String> queryParams)
resourceName
- The name of the database, the node id belongs to.nodeId
- The node id of the requested resource.query
- The XPath expression.queryParams
- The optional query parameters (output, wrap, revision).public void deleteResource(String resourceName, long nodeId) throws JaxRxException
resourceName
- The name of the database, which the node id belongs to.nodeId
- The unique node id.JaxRxException
- The exception occurred.public void modifyResource(String resourceName, long nodeId, InputStream newValue) throws JaxRxException
resourceName
- The name of the database, where the node id belongs to.nodeId
- The node id.newValue
- The new value of the node that has to be replaced.JaxRxException
- The exception occurred.public void addSubResource(String resourceName, long nodeId, InputStream input, EIdAccessType type) throws JaxRxException
resourceName
- The name of the database, the node id belongs to.nodeId
- The node id.input
- The new XML subtree.type
- The type which indicates if the new subtree has to be inserted
as right sibling or as first child.JaxRxException
- The exception occurred.Copyright © 2013. All Rights Reserved.