Interface OperationManager
-
public interface OperationManager
This interface provides the means for managingOperation
s which includes retrieval, creation, updating and managing the states ofOperation
s. Operations are identified by their name and the name of their executable component description. Their name is therefore unique with respect to the executable component description.If the provided entity (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 Operation
getDevelopmentOperation(SessionToken session, String ecName, String operationName, long branch)
Gets the (full-fledged object representing the) development version of the designated operation in the designated branch.Collection<OperationReference>
getDevelopmentOperationReferencesOfECD(SessionToken session, String ecName, long branch)
Gets lightweight objects representing the development versions of all operations of the designated executable component description in the designated branch known by this manager.RemoteIterator<List<OperationReference>>
getDevelopmentOperationReferencesOfECDIterator(SessionToken session, String ecName, long branch)
The same asgetDevelopmentOperationReferencesOfECD(SessionToken, String, long)
but with partial retrieval of the references.Operation
getLatestOperation(SessionToken session, String ecName, String operationName)
Gets the (full-fledged object representing the) latest revision of the designated operation.OperationReference
getLatestOperationReference(SessionToken session, String ecName, String operationName)
Gets a lightweight object representing the latest revision of the designated operation.Collection<OperationReference>
getLatestOperationReferencesOfECD(SessionToken session, String ecName, boolean productionOnly)
Gets lightweight objects representing the latest revisions (IN_PRODUCTION
and/orOUTDATED
) of all operations of the designated executable component description known by this manager.RemoteIterator<List<OperationReference>>
getLatestOperationReferencesOfECDIterator(SessionToken session, String ecName, boolean productionOnly)
The same asgetLatestOperationReferencesOfECD(SessionToken, String, boolean)
but with partial retrieval of the references.List<OperationReference>
getOperationReferenceRevisions(SessionToken session, String ecName, String operationName)
Gets lightweight objects representing all revisions of the designated operation or an empty list in case there are no revisions yet.RemoteIterator<List<OperationReference>>
getOperationReferenceRevisionsIterator(SessionToken session, String ecName, String operationName)
The same asgetOperationReferenceRevisions(SessionToken, String, String)
but with partial retrieval of the references.Collection<OperationReference>
getOperationReferencesRevisionOfECD(SessionToken session, String ecName, long revision)
Gets lightweight objects representing all operations of the designated revision of the designated executable component description known by this manager.RemoteIterator<List<OperationReference>>
getOperationReferencesRevisionOfECDIterator(SessionToken session, String ecName, long revision)
The same asgetOperationReferencesRevisionOfECD(SessionToken, String, long)
but with partial retrieval of the references.Operation
getOperationRevision(SessionToken session, String ecName, String operationName, long revision)
Gets the (full-fledged object representing the) designated revision of the designated operation.void
outdateOperation(SessionToken session, String ecName, String operationName)
Outdates the latest revision of the designated operation explicitly which prevents its usage afterwards.void
revertDevelopmentOperation(SessionToken session, String ecName, String operationName, long branch)
Reverts the designated development operation in the designated branch that is all changes will be undone and the operation will logically be the same as the base revision of the branch.CheckReport
simulateUpdateOfDevelopmentOperation(SessionToken session, String ecName, String operationName, long branch)
Simulates updating of the designated operation in the designated branch, that is only the designated operation of the branch is checked for whether it can be updated to the latest revision.void
storeDevelopmentOperation(SessionToken session, StorageOperation operation, long branch)
Stores the designated (storage representation of the) operation in the designated branch and sets itIN_DEVELOPMENT
if not done yet.
-
-
-
Method Detail
-
getLatestOperationReferencesOfECD
Collection<OperationReference> getLatestOperationReferencesOfECD(SessionToken session, String ecName, boolean productionOnly)
Gets lightweight objects representing the latest revisions (IN_PRODUCTION
and/orOUTDATED
) of all operations of the designated executable component description known by this manager.- Parameters:
session
- The session which is used to check for access rights on this method.ecName
- The name of the executable component description of which to retrieve all latest revisions of the operations.productionOnly
- Whether only the revisionsIN_PRODUCTCION
should be retrieved.- Returns:
- Lightweight representations of the latest revisions of operations of the designated
executable component description
IN_PRODUCTION
and/orOUTDATED
known by this manager. - Throws:
UnknownEntityException
- If the designated executable component description does not exist, anUnknownEntityException
will be thrown.
-
getLatestOperationReferencesOfECDIterator
RemoteIterator<List<OperationReference>> getLatestOperationReferencesOfECDIterator(SessionToken session, String ecName, boolean productionOnly)
The same asgetLatestOperationReferencesOfECD(SessionToken, String, boolean)
but with partial retrieval of the references.- Parameters:
session
- The session which is used to check for access rights on this method.ecName
- The name of the executable component description of which to retrieve all latest revisions of the operations.productionOnly
- Whether only the revisionsIN_PRODUCTCION
should be retrieved.- Returns:
- Lightweight representations of the latest revisions of operations of the designated
executable component description
IN_PRODUCTION
and/orOUTDATED
known by this manager as iterator. The caller is responsible for closing. - Throws:
UnknownEntityException
- If the designated executable component description does not exist, anUnknownEntityException
will be thrown.
-
getOperationReferencesRevisionOfECD
Collection<OperationReference> getOperationReferencesRevisionOfECD(SessionToken session, String ecName, long revision)
Gets lightweight objects representing all operations of the designated revision of the designated executable component description 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.ecName
- The name of the executable component description of which to retrieve all operations of the designated revision.revision
- The revision of which to retrieve all operations of the designated executable component descriptions known by this manager.- Returns:
- Lightweight representations of all operations of the designated executable component descriptions of the designated revision known by this manager.
-
getOperationReferencesRevisionOfECDIterator
RemoteIterator<List<OperationReference>> getOperationReferencesRevisionOfECDIterator(SessionToken session, String ecName, long revision)
The same asgetOperationReferencesRevisionOfECD(SessionToken, String, long)
but with partial retrieval of the references.- Parameters:
session
- The session which is used to check for access rights on this method.ecName
- The name of the executable component description of which to retrieve all operations of the designated revision.revision
- The revision of which to retrieve all operations of the designated executable component descriptions known by this manager as iterator.- Returns:
- Lightweight representations of all operations of the designated executable component descriptions of the designated revision known by this manager. The caller is responsible for closing.
-
getLatestOperationReference
OperationReference getLatestOperationReference(SessionToken session, String ecName, String operationName)
Gets a lightweight object representing the latest revision of the designated operation.- Parameters:
session
- The session which is used to check for access rights on this method.ecName
- The name of the executable component description of the operation of which to retrieve a lightweight representation.operationName
- The name of the operation of which to retrieve a lightweight representation.- Returns:
- A lightweight representation of the latest revision of the operation having the designated name.
- Throws:
UnknownEntityException
- If the designated operation (or the executable component description) does not exist, anUnknownEntityException
will be thrown.
-
getOperationReferenceRevisions
List<OperationReference> getOperationReferenceRevisions(SessionToken session, String ecName, String operationName)
Gets lightweight objects representing all revisions of the designated operation 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.ecName
- The name of the executable component description of the operation of which to retrieve all revisions as lightweight representation.operationName
- The name of the operation of which to retrieve all revisions as lightweight representation.- Returns:
- Lightweight representation of all revisions of the operation having the designated name.
- Throws:
UnknownEntityException
- If the designated operation (or the executable component description) does not exist, anUnknownEntityException
will be thrown.
-
getOperationReferenceRevisionsIterator
RemoteIterator<List<OperationReference>> getOperationReferenceRevisionsIterator(SessionToken session, String ecName, String operationName)
The same asgetOperationReferenceRevisions(SessionToken, String, String)
but with partial retrieval of the references.- Parameters:
session
- The session which is used to check for access rights on this method.ecName
- The name of the executable component description of the operation of which to retrieve all revisions as lightweight representation.operationName
- The name of the operation of which to retrieve all revisions as lightweight representation.- Returns:
- Lightweight representation of all revisions of the operation having the designated name as iterator. The caller is responsible for closing.
- Throws:
UnknownEntityException
- If the designated operation (or the executable component description) does not exist, anUnknownEntityException
will be thrown.
-
getLatestOperation
Operation getLatestOperation(SessionToken session, String ecName, String operationName)
Gets the (full-fledged object representing the) latest revision of the designated operation.- Parameters:
session
- The session which is used to check for access rights on this method.ecName
- The name of the executable component description of the operation of which to retrieve the latest revision.operationName
- The name of the operation of which to retrieve the latest revision.- Returns:
- The latest revision of the operation having the designated name.
- Throws:
UnknownEntityException
- If the designated operation (or the executable component description) does not exist, anUnknownEntityException
will be thrown.
-
getOperationRevision
Operation getOperationRevision(SessionToken session, String ecName, String operationName, long revision)
Gets the (full-fledged object representing the) designated revision of the designated operation.- Parameters:
session
- The session which is used to check for access rights on this method.ecName
- The name of the executable component description of the operation of which to retrieve a specific revision.operationName
- The name of operation of which to retrieve a specific revision.revision
- The revision of the operation which to retrieve.- Returns:
- The designated revision of the operation having the designated name.
- Throws:
UnknownEntityException
- If the designated operation (or the executable component description) or the revision does not exist, anUnknownEntityException
will be thrown.
-
getDevelopmentOperationReferencesOfECD
Collection<OperationReference> getDevelopmentOperationReferencesOfECD(SessionToken session, String ecName, long branch)
Gets lightweight objects representing the development versions of all operations of the designated executable component description 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.ecName
- The name of the executable component description of which to retrieve all development versions of the operations.branch
- The branch of which to retrieve lightweight objects representing the operations of the designated executable component description.- Returns:
- Lightweight representations of the development versions of all operations of the designated executable component description in the designated branch (changed or unchanged entities) known by this manager.
- Throws:
UnknownEntityException
- If the designated executable component description does not exist or the designated branch is currently unused, anUnknownEntityException
will be thrown.
-
getDevelopmentOperationReferencesOfECDIterator
RemoteIterator<List<OperationReference>> getDevelopmentOperationReferencesOfECDIterator(SessionToken session, String ecName, long branch)
The same asgetDevelopmentOperationReferencesOfECD(SessionToken, String, long)
but with partial retrieval of the references.- Parameters:
session
- The session which is used to check for access rights on this method.ecName
- The name of the executable component description of which to retrieve all development versions of the operations.branch
- The branch of which to retrieve lightweight objects representing the operations of the designated executable component description.- Returns:
- Lightweight representations of the development versions of all operations of the designated executable component description 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 executable component description does not exist or the designated branch is currently unused, anUnknownEntityException
will be thrown.
-
getDevelopmentOperation
Operation getDevelopmentOperation(SessionToken session, String ecName, String operationName, long branch)
Gets the (full-fledged object representing the) development version of the designated operation 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.ecName
- The name of the executable component description of the operation of which to retrieve the development version of the designated branch.operationName
- The name of the operation of which to retrieve the development version of the designated branch.branch
- The branch of which to retrieve the corresponding operation (or a new copy of the corresponding base revision entity in case it has not been changed before in this branch).- Returns:
- The development version of the operation in the designated branch.
- Throws:
UnknownEntityException
- If the designated operation (or the executable component description) does not exist or the designated branch is currently unused, anUnknownEntityException
will be thrown.
-
storeDevelopmentOperation
void storeDevelopmentOperation(SessionToken session, StorageOperation operation, long branch)
Stores the designated (storage representation of the) operation 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 operation 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 activity template definition just set its primary key to a non-existing one and store it. If the key exists, the activity template definition will be updated instead of added!When storing an operation, the
IDs
of all correspondingActivityTemplateDefinition
s will be changed.- 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.operation
- The operation providing the new attributes to be set. Operations are identified by their name, therefore the name will not be able to be changed if there is at least one production revision.branch
- The branch in which to store the corresponding operation.- Throws:
UnknownEntityException
- If the designated branch is currently unused, anUnknownEntityException
will be thrown.
-
revertDevelopmentOperation
void revertDevelopmentOperation(SessionToken session, String ecName, String operationName, long branch)
Reverts the designated development operation in the designated branch that is all changes will be undone and the operation 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.ecName
- The name of the executable component description of the operation of which to revert the development version in the designated branch.operationName
- The name of the operation of which to delete the development version in the designated branch.branch
- The branch in which to revert the designated operation and therefore undoing made changes.- Throws:
UnknownEntityException
- If the designated operation (or the executable component description) does not exist in the designated branch or does not exist at all or the designated branch is currently unused, anUnknownEntityException
will be thrown.
-
simulateUpdateOfDevelopmentOperation
CheckReport simulateUpdateOfDevelopmentOperation(SessionToken session, String ecName, String operationName, long branch)
Simulates updating of the designated operation in the designated branch, that is only the designated operation 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 operation instead of checking the whole branch will provide a much simpler way to resolve these conflicts.
When checking an operation 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.ecName
- The name of the executable component description of the operation which to check for versioning conflicts due to updating to the latest revision.operationName
- The name of the operation which to check for versioning conflicts due to updating to the latest revision.branch
- The branch in which to check the designated operation for versioning conflicts when updating.- Returns:
- A check report providing information on versioning on the designated operation only.
- Throws:
UnknownEntityException
- If the designated operation (or the executable component description) does not exist in the designated branch or does not exist at all, anUnknownEntityException
will be thrown.
-
outdateOperation
void outdateOperation(SessionToken session, String ecName, String operationName)
Outdates the latest revision of the designated operation explicitly which prevents its usage afterwards. This state will indirectly outdate child entities. However, their state will not be changed explicitly, rather before using them the states of their parent entities have to be checked. The latest revision may be used for a development version which in turn may be released later.
Outdating anOUTDATED
operation 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.ecName
- The name of the executable component description of the operation of which to explicitly outdate the latest revision.operationName
- The name of the operation of which to explicitly outdate the latest revision.- Throws:
UnknownEntityException
- If the designated operation (or the executable component description) does not exist, anUnknownEntityException
will be thrown.
-
-