public interface ResourceManager
ResourceDescriptors which includes retrieval, creation, updating
and managing the states of ResourceDescriptorss. Resources and
resource descriptors are identified by an ID which is therefore system-wide
unique.
If the provided resource (or its identifying attributes) of a method does not
exist, an UnknownEntityException will be thrown.
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getDevelopmentResource(SessionToken session,
java.util.UUID resourceID,
long branch)
Gets the development version of the designated resource in the designated
branch.
|
ChangeableResourceDescriptor |
getDevelopmentResourceDescriptor(SessionToken session,
java.util.UUID resourceID,
long branch)
Gets the development version of the resource descriptors for the designated
resource ID in the designated branch.
|
java.util.Collection<ChangeableResourceDescriptor> |
getDevelopmentResourceDescriptors(SessionToken session,
long branch)
Gets the development versions of all resource descriptors in the designated
branch known by this manager.
|
RemoteIterator<java.util.List<ChangeableResourceDescriptor>> |
getDevelopmentResourceDescriptorsIterator(SessionToken session,
long branch)
The same as
getDevelopmentResourceDescriptors(SessionToken, long)
but with partial retrieval of the descriptors. |
byte[] |
getLatestResource(SessionToken session,
java.util.UUID resourceID)
Gets the (latest revision of the) designated resource.
|
ResourceDescriptor |
getLatestResourceDescriptor(SessionToken session,
java.util.UUID resourceID)
Gets the latest revision of the designated resource descriptor.
|
java.util.Collection<ResourceDescriptor> |
getLatestResourceDescriptors(SessionToken session,
boolean productionOnly)
Gets the latest revisions (
IN_PRODUCTION and/or
OUTDATED) of all resource descriptors known by this manager. |
RemoteIterator<java.util.List<ResourceDescriptor>> |
getLatestResourceDescriptorsIterator(SessionToken session,
boolean productionOnly)
The same as
getLatestResourceDescriptors(SessionToken, boolean)
but with partial retrieval of the descriptors. |
ServerStream |
getLatestResourceIncrementally(SessionToken session,
java.util.UUID resourceID)
Gets the (latest revision of the) designated resource as
ServerStream. |
ResourceDescriptor |
getResourceDescriptorRevision(SessionToken session,
java.util.UUID resourceID,
long revision)
Gets the designated revision of the designated resource descriptor.
|
java.util.List<ResourceDescriptor> |
getResourceDescriptorRevisions(SessionToken session,
java.util.UUID resourceID)
Gets all revisions of the designated resource descriptor or an empty list
in case there are no revisions yet.
|
RemoteIterator<java.util.List<ResourceDescriptor>> |
getResourceDescriptorRevisionsIterator(SessionToken session,
java.util.UUID resourceID)
The same
getResourceDescriptorRevisions(SessionToken, UUID) but
with partial retrieval of the descriptors. |
java.util.Collection<ResourceDescriptor> |
getResourceDescriptorsRevision(SessionToken session,
long revision)
Gets all resource descriptors of the designated revision known by this
manager.
|
RemoteIterator<java.util.List<ResourceDescriptor>> |
getResourceDescriptorsRevisionIterator(SessionToken session,
long revision)
The same as
getResourceDescriptorsRevision(SessionToken, long) but
with partial retrieval of the descriptors. |
byte[] |
getResourceRevision(SessionToken session,
java.util.UUID resourceID,
long revision)
Gets the designated revision of the designated resource.
|
ServerStream |
getResourceRevisionIncrementally(SessionToken session,
java.util.UUID resourceID,
long revision)
Gets the designated revision of the designated resource as
ServerStream. |
void |
outdateResource(SessionToken session,
java.util.UUID resourceID)
Outdates the latest revision of the designated resource explicitly which
prevents its usage afterwards.
|
void |
revertDevelopmentResource(SessionToken session,
java.util.UUID resourceID,
long branch)
Reverts the designated development resource (and its descriptor) in the
designated branch that is all changes will be undone and the resource will
logically be the same as the base revision of the branch.
|
CheckReport |
simulateUpdateOfDevelopmentResource(SessionToken session,
java.util.UUID resourceID,
long branch)
Simulates updating of the designated resource (and its descriptor) in the
designated branch, that is only the designated resource of the branch is
checked for whether it can be updated to the latest revision.
|
void |
storeDevelopmentResourceDescriptor(SessionToken session,
ResourceDescriptor resourceDescriptor,
byte[] resource,
long branch)
Stores the designated resource descriptor in the designated branch and sets
it
IN_DEVELOPMENT if not done yet. |
java.util.Collection<ResourceDescriptor> getLatestResourceDescriptors(SessionToken session, boolean productionOnly)
IN_PRODUCTION and/or
OUTDATED) of all resource descriptors known by this manager.session - The session which is used to check for access rights on this
method.productionOnly - Whether only the revisions
IN_PRODUCTCION should be retrieved.IN_PRODUCTION and/or OUTDATED known by
this manager.RemoteIterator<java.util.List<ResourceDescriptor>> getLatestResourceDescriptorsIterator(SessionToken session, boolean productionOnly)
getLatestResourceDescriptors(SessionToken, boolean)
but with partial retrieval of the descriptors.session - The session which is used to check for access rights on this
method.productionOnly - Whether only the revisions
IN_PRODUCTCION should be retrieved.IN_PRODUCTION and/or OUTDATED known by
this manager as iterator.ResourceDescriptor getLatestResourceDescriptor(SessionToken session, java.util.UUID resourceID)
session - The session which is used to check for access rights on this
method.resourceID - The ID of the resource descriptor of which to retrieve
the latest revision.UnknownEntityException - If the
designated resource does not exist, an
UnknownEntityException will be thrown.byte[] getLatestResource(SessionToken session, java.util.UUID resourceID)
session - The session which is used to check for access rights on this
method.resourceID - The ID of the resource of which to retrieve the latest
revision.UnknownEntityException - If the
designated resource does not exist, an
UnknownEntityException will be thrown.ServerStream getLatestResourceIncrementally(SessionToken session, java.util.UUID resourceID)
ServerStream. The server input stream does not provide the
complete content of the underlying resource but a proxy object requesting
the content incrementally when transfered via the communication.session - The session which is used to check for access rights on this
method.resourceID - The ID of the resource of which to retrieve the latest
revision.ServerStream, that is, clients do not retrieve all of
the content of the stream at once but incrementally.UnknownEntityException - If the designated
resource does not exist, an UnknownEntityException
will be thrown.java.util.Collection<ResourceDescriptor> getResourceDescriptorsRevision(SessionToken session, long revision)
IN_PRODUCTION or
OUTDATED depending on whether they have been changed or set to
outdated from the designated to the latest revision.session - The session which is used to check for access rights on this
method.revision - The revision of which to retrieve all resource descriptors
known by this manager.RemoteIterator<java.util.List<ResourceDescriptor>> getResourceDescriptorsRevisionIterator(SessionToken session, long revision)
getResourceDescriptorsRevision(SessionToken, long) but
with partial retrieval of the descriptors.session - The session which is used to check for access rights on this
method.revision - The revision of which to retrieve all resource descriptors
known by this manager as iterator.java.util.List<ResourceDescriptor> getResourceDescriptorRevisions(SessionToken session, java.util.UUID resourceID)
session - The session which is used to check for access rights on this
method.resourceID - The ID of the resource descriptor of which to retrieve
all revisions.UnknownEntityException - If the
designated resource ID does not exist, an
UnknownEntityException will be thrown.RemoteIterator<java.util.List<ResourceDescriptor>> getResourceDescriptorRevisionsIterator(SessionToken session, java.util.UUID resourceID)
getResourceDescriptorRevisions(SessionToken, UUID) but
with partial retrieval of the descriptors.session - The session which is used to check for access rights on this
method.resourceID - The ID of the resource descriptor of which to retrieve
all revisions.UnknownEntityException - If the designated
resource ID does not exist, an
UnknownEntityException will be thrown.ResourceDescriptor getResourceDescriptorRevision(SessionToken session, java.util.UUID resourceID, long revision)
session - The session which is used to check for access rights on this
method.resourceID - The ID of the resource descriptor of which to retrieve a
specific revision.revision - The revision of the resource descriptor which to retrieve.UnknownEntityException - If the
designated resource ID or the revision does not exist, an
UnknownEntityException will be thrown.byte[] getResourceRevision(SessionToken session, java.util.UUID resourceID, long revision)
session - The session which is used to check for access rights on this
method.resourceID - The ID of the resource of which to retrieve a specific
revision.revision - The revision of the resource which to retrieve.UnknownEntityException - If the
designated resource ID or the revision does not exist, an
UnknownEntityException will be thrown.ServerStream getResourceRevisionIncrementally(SessionToken session, java.util.UUID resourceID, long revision)
ServerStream. The server input stream does not provide the
complete content of the underlying resource but a proxy object requesting
the content incrementally when transfered via the communication.session - The session which is used to check for access rights on this
method.resourceID - The ID of the resource of which to retrieve a specific
revision.revision - The revision of the resource which to retrieve.ServerStream, that is, clients do not retrieve all of
the content of the stream at once but incrementally.UnknownEntityException - If the designated
resource ID or the revision does not exist, an
UnknownEntityException will be thrown.java.util.Collection<ChangeableResourceDescriptor> getDevelopmentResourceDescriptors(SessionToken session, long branch)
IN_DEVELOPMENT (changed entities),
IN_PRODUCTION (unchanged entities whereas the base revision is
the latest revision) or OUTDATED (unchanged entities).session - The session which is used to check for access rights on this
method.branch - The branch of which to retrieve all resource descriptors.UnknownEntityException - If the
designated branch is currently unused, an
UnknownEntityException will be thrown.RemoteIterator<java.util.List<ChangeableResourceDescriptor>> getDevelopmentResourceDescriptorsIterator(SessionToken session, long branch)
getDevelopmentResourceDescriptors(SessionToken, long)
but with partial retrieval of the descriptors.session - The session which is used to check for access rights on this
method.branch - The branch of which to retrieve all resource descriptors.UnknownEntityException - If the
designated branch is currently unused, an
UnknownEntityException will be thrown.ChangeableResourceDescriptor getDevelopmentResourceDescriptor(SessionToken session, java.util.UUID resourceID, long branch)
IN_DEVELOPMENT (changed), IN_PRODUCTION
(unchanged whereas the base revision is the latest revision) or
OUTDATED (unchanged).session - The session which is used to check for access rights on this
method.resourceID - The ID of the resource of which to retrieve the
development version of the resource descriptor of the designated
branch.branch - The branch of which to retrieve the resource descriptor of
the designated icon ID.UnknownEntityException - If the
designated branch is currently unused or the designated resource
ID is unknown, an UnknownEntityException will be
thrown.byte[] getDevelopmentResource(SessionToken session, java.util.UUID resourceID, long branch)
IN_DEVELOPMENT if it
has already been changed with respect to its base revision. Otherwise the
entity will be a copy of the base revision of the branch and therefore
IN_PRODUCTION (in case the base revision is the latest
revision) or OUTDATED (in case the base revision is already
outdated). This copy will be set IN_DEVELOPMENT as soon as
the resource
stored the first time.session - The session which is used to check for access rights on this
method.resourceID - The ID of the resource of which to retrieve the
development version of the designated branch.branch - The branch of which to retrieve the corresponding resource
(or a new copy of the corresponding base revision entity in case
it has not been changed before in this branch).UnknownEntityException - If the
designated resource ID or the designated branch does not exist,
an UnknownEntityException will be thrown.void storeDevelopmentResourceDescriptor(SessionToken session, ResourceDescriptor resourceDescriptor, byte[] resource, long branch)
IN_DEVELOPMENT if not done yet. All changes are
therefore persisted. The branch is usually the same as specified when
retrieving the
resource for development. However, it can be changed but the content of the
target branch will be overwritten. This can be used to copy changes between
branches. session - The session which is used to check for access rights on this
method and to identify the storing agent and the corresponding
organisational position.resourceDescriptor - The resource descriptor providing the new
attributes to be set. Resource descriptors are identified by their
ID, therefore the ID will not be able to be changed if there is at
least one production revision.resource - The (binary) resource to be stored to the designated
branch. If null, only the descriptor will be updated.branch - The branch in which to store the corresponding resource
descriptor.UnknownEntityException - If the
designated branch is currently unused, an
UnknownEntityException will be thrown.void revertDevelopmentResource(SessionToken session, java.util.UUID resourceID, long branch)
session - The session which is used to check for access rights on this
method.resourceID - The ID of the resource of which to delete the development
version in the designated branch.branch - The branch in which to revert the designated resource and
therefore undoing made changes.UnknownEntityException - If the
designated resource does not exist in the designated branch or
does not exist at all or the designated branch is currently
unused, an UnknownEntityException will be
thrown.CheckReport simulateUpdateOfDevelopmentResource(SessionToken session, java.util.UUID resourceID, long branch)
session - The session which is used to check for access rights on this
method.resourceID - The ID of the resource which to check for versioning
conflicts due to updating to the latest revision.branch - The branch in which to check the designated resource for
versioning conflicts when updating.UnknownEntityException - If the
designated resource does not exist in the designated branch or
does not exist at all, an UnknownEntityException
will be thrown.void outdateResource(SessionToken session, java.util.UUID resourceID)
OUTDATED resource will be ignored.session - The session which is used to check for access rights on this
method and to identify the outdating agent and the corresponding
organisational position.resourceID - The ID of the resource of which to explicitly outdate the
latest revision.UnknownEntityException - If the
designated resource does not exist, an
UnknownEntityException will be thrown.