Interface IdentifierManager
-
public interface IdentifierManager
This interface provides the means for managingIdentifier
s which includes retrieval, creation, updating and managing the states ofIdentifier
s. Identifiers are identified by an ID which is therefore system-wide unique.If the provided identifier (or its identifying attributes) of a method does not exist, an
UnknownEntityException
will be thrown.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Identifier
getDevelopmentIdentifier(SessionToken session, UUID identifierID, long branch)
Gets the development version of the designated identifier in the designated branch.Collection<Identifier>
getDevelopmentIdentifiers(SessionToken session, long branch)
Gets the development versions of all identifiers in the designated branch known by this manager.RemoteIterator<List<Identifier>>
getDevelopmentIdentifiersIterator(SessionToken session, long branch)
The same asgetDevelopmentIdentifiers(SessionToken, long)
but with partial retrieval of the identifiers.Identifier
getIdentifierRevision(SessionToken session, UUID identifierID, long revision)
Gets the designated revision of the designated identifier.List<Identifier>
getIdentifierRevisions(SessionToken session, UUID identifierID)
Gets all revisions of the designated identifier or an empty list in case there are no revisions yet.RemoteIterator<List<Identifier>>
getIdentifierRevisionsIterator(SessionToken session, UUID identifierID)
The same asgetIdentifierRevisions(SessionToken, UUID)
but with partial retrieval of the identifiers.Collection<Identifier>
getIdentifiersRevision(SessionToken session, long revision)
Gets all identifiers the designated revision known by this manager.RemoteIterator<List<Identifier>>
getIdentifiersRevisionIterator(SessionToken session, long revision)
The same asgetIdentifiersRevision(SessionToken, long)
but with partial retrieval of the identifiers.Identifier
getLatestIdentifier(SessionToken session, UUID identifierID)
Gets the latest revision of the designated identifier.Collection<Identifier>
getLatestIdentifiers(SessionToken session, boolean productionOnly)
Gets the latest revisions (IN_PRODUCTION
and/orOUTDATED
) of all identifiers known by this manager.RemoteIterator<List<Identifier>>
getLatestIdentifiersIterator(SessionToken session, boolean productionOnly)
The same asgetLatestIdentifiers(SessionToken, boolean)
but with partial retrieval of the identifiers.void
outdateIdentifier(SessionToken session, UUID identifierID)
Outdates the latest revision of the designated identifier explicitly which prevents its usage afterwards.void
revertDevelopmentIdentifier(SessionToken session, UUID identifierID, long branch)
Reverts the designated development identifier in the designated branch that is all changes will be undone and the identifier will logically be the same as the base revision of the branch.CheckReport
simulateUpdateOfDevelopmentIdentifier(SessionToken session, UUID identifierID, long branch)
Simulates updating of the designated identifier in the designated branch, that is only the designated identifier of the branch is checked for whether it can be updated to the latest revision.void
storeDevelopmentIdentifier(SessionToken session, Identifier identifier, long branch)
Stores the designated identifier in the designated branch and sets itIN_DEVELOPMENT
if not done yet.
-
-
-
Method Detail
-
getLatestIdentifiers
Collection<Identifier> getLatestIdentifiers(SessionToken session, boolean productionOnly)
Gets the latest revisions (IN_PRODUCTION
and/orOUTDATED
) of all identifiers known by this manager.- Parameters:
session
- The session which is used to check for access rights on this method.productionOnly
- Whether only the revisionsIN_PRODUCTCION
should be retrieved.- Returns:
- The latest revisions of all identifiers
IN_PRODUCTION
and/orOUTDATED
known by this manager.
-
getLatestIdentifiersIterator
RemoteIterator<List<Identifier>> getLatestIdentifiersIterator(SessionToken session, boolean productionOnly)
The same asgetLatestIdentifiers(SessionToken, boolean)
but with partial retrieval of the identifiers.- Parameters:
session
- The session which is used to check for access rights on this method.productionOnly
- Whether only the revisionsIN_PRODUCTCION
should be retrieved.- Returns:
- The latest revisions of all identifiers
IN_PRODUCTION
and/orOUTDATED
known by this manager as iterator. The caller is responsible for closing.
-
getIdentifiersRevision
Collection<Identifier> getIdentifiersRevision(SessionToken session, long revision)
Gets all identifiers the designated revision known by this manager. These are eitherIN_PRODUCTION
orOUTDATED
depending on whether they have been changed or set to outdated from the designated to the latest revision.- Parameters:
session
- The session which is used to check for access rights on this method.revision
- The revision of which to retrieve all identifiers known by this manager.- Returns:
- All identifiers of the designated revision known by this manager.
-
getIdentifiersRevisionIterator
RemoteIterator<List<Identifier>> getIdentifiersRevisionIterator(SessionToken session, long revision)
The same asgetIdentifiersRevision(SessionToken, long)
but with partial retrieval of the identifiers.- Parameters:
session
- The session which is used to check for access rights on this method.revision
- The revision of which to retrieve all identifiers known by this manager as iterator.- Returns:
- All identifiers of the designated revision known by this manager. The caller is responsible for closing.
-
getLatestIdentifier
Identifier getLatestIdentifier(SessionToken session, UUID identifierID)
Gets the latest revision of the designated identifier.- Parameters:
session
- The session which is used to check for access rights on this method.identifierID
- The ID of the identifier of which to retrieve the latest revision.- Returns:
- The latest revision of the identifier having the designated ID.
- Throws:
UnknownEntityException
- If the designated identifier does not exist, anUnknownEntityException
will be thrown.
-
getIdentifierRevision
Identifier getIdentifierRevision(SessionToken session, UUID identifierID, long revision)
Gets the designated revision of the designated identifier.- Parameters:
session
- The session which is used to check for access rights on this method.identifierID
- The ID of the identifier of which to retrieve a specific revision.revision
- The revision of the identifier which to retrieve.- Returns:
- The designated revision of the designated identifier.
- Throws:
UnknownEntityException
- If the designated identifier or the revision does not exist, anUnknownEntityException
will be thrown.
-
getIdentifierRevisions
List<Identifier> getIdentifierRevisions(SessionToken session, UUID identifierID)
Gets all revisions of the designated identifier or an empty list in case there are no revisions yet.- Parameters:
session
- The session which is used to check for access rights on this method.identifierID
- The ID of the identifier of which to retrieve all revisions.- Returns:
- All revisions of the designated identifier.
- Throws:
UnknownEntityException
- If the designated identifier does not exist, anUnknownEntityException
will be thrown.
-
getIdentifierRevisionsIterator
RemoteIterator<List<Identifier>> getIdentifierRevisionsIterator(SessionToken session, UUID identifierID)
The same asgetIdentifierRevisions(SessionToken, UUID)
but with partial retrieval of the identifiers.- Parameters:
session
- The session which is used to check for access rights on this method.identifierID
- The ID of the identifier of which to retrieve all revisions.- Returns:
- All revisions of the designated identifier as iterator. The caller is responsible for closing.
- Throws:
UnknownEntityException
- If the designated identifier does not exist, anUnknownEntityException
will be thrown.
-
getDevelopmentIdentifiers
Collection<Identifier> getDevelopmentIdentifiers(SessionToken session, long branch)
Gets the development versions of all identifiers in the designated branch known by this manager. The development versions stem from the base revision of the designated branch, that is, unchanged entities are copies of the corresponding base revisions while changed entities are modified with respect to the base revision. Therefore the returned (referenced) entities may beIN_DEVELOPMENT
(changed entities),IN_PRODUCTION
(unchanged entities whereas the base revision is the latest revision) orOUTDATED
(unchanged entities).- Parameters:
session
- The session which is used to check for access rights on this method.branch
- The branch of which to retrieve all identifiers.- Returns:
- The development versions of all identifiers in the designated branch (changed or unchanged entities) known by this manager.
- Throws:
UnknownEntityException
- If the designated branch is currently unused, anUnknownEntityException
will be thrown.
-
getDevelopmentIdentifiersIterator
RemoteIterator<List<Identifier>> getDevelopmentIdentifiersIterator(SessionToken session, long branch)
The same asgetDevelopmentIdentifiers(SessionToken, long)
but with partial retrieval of the identifiers.- Parameters:
session
- The session which is used to check for access rights on this method.branch
- The branch of which to retrieve all identifiers.- Returns:
- The development versions of all identifiers in the designated branch (changed or unchanged entities) known by this manager as iterator. The caller is responsible for closing.
- Throws:
UnknownEntityException
- If the designated branch is currently unused, anUnknownEntityException
will be thrown.
-
getDevelopmentIdentifier
Identifier getDevelopmentIdentifier(SessionToken session, UUID identifierID, long branch)
Gets the development version of the designated identifier in the designated branch. The returned entity will beIN_DEVELOPMENT
if it has already been changed with respect to its base revision. Otherwise the entity will a copy of the base revision of the branch and thereforeIN_PRODUCTION
(in case the base revision is the latest revision) orOUTDATED
(in case the base revision is already outdated). This copy will be setIN_DEVELOPMENT
as soon as it isstored
the first time.- Parameters:
session
- The session which is used to check for access rights on this method.identifierID
- The ID of the identifier of which to retrieve the development version of the designated branch.branch
- The branch of which to retrieve the corresponding identifier (or a new copy of the corresponding base revision entity in case it has not been changed before in this branch).- Returns:
- The development revision of the identifier in the designated branch.
- Throws:
UnknownEntityException
- If the designated identifier does not exist or the designated branch is currently unused, anUnknownEntityException
will be thrown.
-
storeDevelopmentIdentifier
void storeDevelopmentIdentifier(SessionToken session, Identifier identifier, long branch)
Stores the designated identifier in the designated branch and sets itIN_DEVELOPMENT
if not done yet. All changes are therefore persisted. The branch is usually the same as specified whenretrieving
the identifier 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.
To store a new identifier just set its primary key to a non-existing one and store it. If the key exists, the identifier will be updated instead of added!- Parameters:
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.identifier
- The identifier providing the new attributes to be set. Identifiers are identified by their ID, therefore the ID will not be able to be changed if there is at least one production revision.branch
- The branch in which to store the corresponding identifier.- Throws:
UnknownEntityException
- If the designated branch is currently unused, anUnknownEntityException
will be thrown.
-
revertDevelopmentIdentifier
void revertDevelopmentIdentifier(SessionToken session, UUID identifierID, long branch)
Reverts the designated development identifier in the designated branch that is all changes will be undone and the identifier will logically be the same as the base revision of the branch.- Parameters:
session
- The session which is used to check for access rights on this method.identifierID
- The ID of the identifier of which to delete the development version in the designated branch.branch
- The branch in which to revert the designated identifier and therefore undoing made changes.- Throws:
UnknownEntityException
- If the designated identifier does not exist in the designated branch or does not exist at all or the designated branch is currently unused, anUnknownEntityException
will be thrown.
-
simulateUpdateOfDevelopmentIdentifier
CheckReport simulateUpdateOfDevelopmentIdentifier(SessionToken session, UUID identifierID, long branch)
Simulates updating of the designated identifier in the designated branch, that is only the designated identifier of the branch is checked for whether it can be updated to the latest revision. The returned check report therefore contains all conflicts due to versioning. These occur for concurrent changes in the designated branch and changing the latest revision (by releasing a new one). If conflicts occur, checking only for one identifier instead of checking the whole branch will provide a much simpler way to resolve these conflicts.
When checking an identifier that does not have any changes in the designated branch, the check report will contain no entries, indicating that there will be no problems when updating.- Parameters:
session
- The session which is used to check for access rights on this method.identifierID
- The ID of the identifier which to check for versioning conflicts due to updating to the latest revision.branch
- The branch in which to check the designated identifier for versioning conflicts when updating.- Returns:
- A check report providing information on versioning on the designated identifier only.
- Throws:
UnknownEntityException
- If the designated identifier does not exist in the designated branch or does not exist at all, anUnknownEntityException
will be thrown.
-
outdateIdentifier
void outdateIdentifier(SessionToken session, UUID identifierID)
Outdates the latest revision of the designated identifier explicitly which prevents its usage afterwards. This state will indirectly outdate using entities (operations and activity template definitions). However, their state will not be changed explicitly, rather before using them the states of their identifiers have to be checked. The latest revision may be used for a development version which in turn may be released later.
Outdating anOUTDATED
identifier will be ignored.- Parameters:
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.identifierID
- The ID of the identifier of which to explicitly outdate the latest revision.- Throws:
UnknownEntityException
- If the designated identifier does not exist, anUnknownEntityException
will be thrown.
-
-