public interface RemoteSession
Modifier and Type | Method and Description |
---|---|
RemoteRevision |
commit(RemoteRevision revision,
RemoteOperation operation)
Commit some changes to the repository.
|
RemoteOperation |
createAddOperation(String path,
Map<String,RemoteValue> properties)
Create an operation to represent the addition of a new node in the
repository.
|
RemoteOperation |
createAggregateOperation(List<RemoteOperation> operations)
Create an operation that represents the aggregation of multiple, simpler
operations.
|
RemoteOperation |
createCopyOperation(String source,
String target)
Create an operation to represent the copy of a subtree into another
location into the repository.
|
RemoteOperation |
createMoveOperation(String source,
String target)
Create an operation to represent the move of a subtree into another
location into the repository.
|
RemoteOperation |
createRemoveOperation(String path)
Create an operation representing the removal of an existing node from the
repository.
|
RemoteOperation |
createSetOperation(String path,
String name,
RemoteValue value)
Create an operation representing the creation or modification of a
property of an existing node.
|
RemoteOperation |
createUnsetOperation(String path,
String name)
Create an operation to represent the removal of an existing property from
an existing node in the repository.
|
InputStream |
readBinary(RemoteBinaryId binaryId,
RemoteBinaryFilters filters)
Read a binary object from the repository according to the given filters.
|
RemoteBinaryId |
readBinaryId(String binaryId)
Read a binary ID given a string representation of the binary ID itself.
|
long |
readBinaryLength(RemoteBinaryId binaryId)
Read the length of a binary object from the repository.
|
RemoteRevision |
readLastRevision()
Read the latest revision in the repository.
|
RemoteRevision |
readRevision(String revision)
Read a revision given a string representation of the revision itself.
|
RemoteTree |
readTree(RemoteRevision revision,
String path,
RemoteTreeFilters filters)
Read a sub-tree from the repository at the given revision.
|
RemoteResults |
search(RemoteRevision revision,
String query,
String language,
long offset,
long limit)
Performs a search in the content and returns a set of search results.
|
RemoteBinaryId |
writeBinary(InputStream stream)
Write a binary object into the repository and return a binary ID
referencing to it.
|
RemoteRevision readLastRevision()
RemoteRevision readRevision(String revision)
revision
- The string representation of the revision.null
if the string representation is invalid.RemoteTree readTree(RemoteRevision revision, String path, RemoteTreeFilters filters)
revision
- The revision representing the state of the repository to
read from.path
- The path of the root of the subtree to read.filters
- Filters to apply to the returned tree.null
if the root of the
tree is not found in the repository for the given revision.RemoteOperation createAddOperation(String path, Map<String,RemoteValue> properties)
path
- Path of the new node to create.properties
- Initial set of properties attached to the new node.RemoteOperation createRemoveOperation(String path)
path
- Path of the node to remove.RemoteOperation createSetOperation(String path, String name, RemoteValue value)
path
- Path of the node where the property is or will be attached
to.name
- Name of the property to set.value
- Value of the property.RemoteOperation createUnsetOperation(String path, String name)
path
- Path of the node where the property is attached to.name
- Name of the property to remove.RemoteOperation createCopyOperation(String source, String target)
source
- Path of the root of the subtree to copy.target
- Path where the subtree should be copied to.RemoteOperation createMoveOperation(String source, String target)
source
- Path of the root of the source subtree to move.target
- Path where the subtree should be moved to.RemoteOperation createAggregateOperation(List<RemoteOperation> operations)
operations
- Sequence of operations to aggregate.RemoteRevision commit(RemoteRevision revision, RemoteOperation operation) throws RemoteCommitException
revision
- Revision where the changes should be applied to.operation
- Operation to change the state of the repository.RemoteCommitException
- if the provided operation can't be
performed on the provided repository
state.RemoteBinaryId readBinaryId(String binaryId)
binaryId
- String representation of the binary ID.null
if the string representation of the binary ID is not valid.InputStream readBinary(RemoteBinaryId binaryId, RemoteBinaryFilters filters)
binaryId
- Binary ID referring to the binary object to read.filters
- Filters to apply to the returned binary object.long readBinaryLength(RemoteBinaryId binaryId)
binaryId
- Binary ID referring to the binary object whose length
should be read.RemoteBinaryId writeBinary(InputStream stream)
stream
- Stream representing the binary object to write.RemoteResults search(RemoteRevision revision, String query, String language, long offset, long limit) throws RemoteQueryParseException
revision
- The revision that should be used when searching the
content.query
- The query. It may contain placeholders that are to be
substituted with the actual parameters.language
- The language the query is written in. It identifies the
syntax of the query.offset
- How many rows to skip when returning the results.limit
- How many results to return.RemoteQueryParseException
- if the query can't be correctly
parsed.Copyright © 2012-2015 The Apache Software Foundation. All Rights Reserved.