Interface ConfigurationSetManager


  • public interface ConfigurationSetManager
    This interface provides the means for managing ConfigurationSets which includes retrieval, creation, updating and managing the states of ConfigurationSets. Configuration sets are identified by their name which is therefore system-wide unique.

    If the provided entity (or its identifying attributes) of a method does not exist, an UnknownEntityException will be thrown.

    • Method Detail

      • getLatestCSReferences

        Collection<CSReference> getLatestCSReferences​(SessionToken session,
                                                      boolean productionOnly)
        Gets lightweight objects representing the latest revisions ( IN_PRODUCTION and/or OUTDATED) of all configuration sets known by this manager.
        Parameters:
        session - The session which is used to check for access rights on this method.
        productionOnly - Whether only the revisions IN_PRODUCTCION should be retrieved.
        Returns:
        Lightweight representations of the latest revisions of all configuration sets IN_PRODUCTION and/or OUTDATED known by this manager.
      • getLatestCSReferencesIterator

        RemoteIterator<List<CSReference>> getLatestCSReferencesIterator​(SessionToken session,
                                                                        boolean productionOnly)
        The same as getLatestCSReferences(SessionToken, boolean) but with partial retrieval of the references.
        Parameters:
        session - The session which is used to check for access rights on this method.
        productionOnly - Whether only the revisions IN_PRODUCTCION should be retrieved.
        Returns:
        Lightweight representations of the latest revisions of all configuration sets IN_PRODUCTION and/or OUTDATED known by this manager as iterator. The caller is responsible for closing.
      • getCSReferencesRevision

        Collection<CSReference> getCSReferencesRevision​(SessionToken session,
                                                        long revision)
        Gets lightweight objects representing all configuration sets of the designated revision known by this manager. These are either IN_PRODUCTION or OUTDATED 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 configuration sets known by this manager.
        Returns:
        Lightweight representations of all configuration sets of the designated revision known by this manager.
      • getCSReferencesRevisionIterator

        RemoteIterator<List<CSReference>> getCSReferencesRevisionIterator​(SessionToken session,
                                                                          long revision)
        The same as getCSReferencesRevision(SessionToken, long) but with partial retrieval of the references.
        Parameters:
        session - The session which is used to check for access rights on this method.
        revision - The revision of which to retrieve all configuration sets known by this manager.
        Returns:
        Lightweight representations of all configuration sets of the designated revision known by this manager as iterator. The caller is responsible for closing.
      • getLatestCSReference

        CSReference getLatestCSReference​(SessionToken session,
                                         String csName)
        Gets a lightweight object representing the latest revision of the designated configuration set.
        Parameters:
        session - The session which is used to check for access rights on this method.
        csName - The name of the configuration set of which to retrieve a lightweight representation.
        Returns:
        A lightweight representation of the latest revision of the configuration set having the designated name.
        Throws:
        UnknownEntityException - If the designated configuration set does not exist, an UnknownEntityException will be thrown.
      • getCSReferenceRevisions

        List<CSReference> getCSReferenceRevisions​(SessionToken session,
                                                  String csName)
        Gets lightweight objects representing all revisions of the designated configuration set, 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.
        csName - The name of the configuration set of which to retrieve all revisions as lightweight representation.
        Returns:
        Lightweight representation of all revisions of the configuration set having the designated name.
        Throws:
        UnknownEntityException - If the designated configuration set does not exist, an UnknownEntityException will be thrown.
      • getCSReferenceRevisionsIterator

        RemoteIterator<List<CSReference>> getCSReferenceRevisionsIterator​(SessionToken session,
                                                                          String csName)
        The same as getCSReferenceRevisions(SessionToken, String) but with partial retrieval of the references.
        Parameters:
        session - The session which is used to check for access rights on this method.
        csName - The name of the configuration set of which to retrieve all revisions as lightweight representation.
        Returns:
        Lightweight representation of all revisions of the configuration set having the designated name as iterator. The caller is responsible for closing.
        Throws:
        UnknownEntityException - If the designated configuration set does not exist, an UnknownEntityException will be thrown.
      • getLatestCS

        ConfigurationSet getLatestCS​(SessionToken session,
                                     String csName)
        Gets the (full-fledged object representing the) latest revision of the designated configuration set.
        Parameters:
        session - The session which is used to check for access rights on this method.
        csName - The name of the configuration set of which to retrieve the latest revision.
        Returns:
        The latest revision of the configuration set having the designated name.
        Throws:
        UnknownEntityException - If the designated configuration set does not exist, an UnknownEntityException will be thrown.
      • getCSRevision

        ConfigurationSet getCSRevision​(SessionToken session,
                                       String csName,
                                       long revision)
        Gets the (full-fledged object representing the) designated revision of the designated configuration set.
        Parameters:
        session - The session which is used to check for access rights on this method.
        csName - The name of the configuration set of which to retrieve a specific revision.
        revision - The revision of the configuration set which to retrieve.
        Returns:
        The designated revision of the configuration set having the designated name.
        Throws:
        UnknownEntityException - If the designated configuration set or the revision does not exist, an UnknownEntityException will be thrown.
      • getDevelopmentCSReferences

        Collection<CSReference> getDevelopmentCSReferences​(SessionToken session,
                                                           long branch)
        Gets lightweight objects representing the development versions of all configuration sets 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 be IN_DEVELOPMENT (changed entities), IN_PRODUCTION (unchanged entities whereas the base revision is the latest revision) or OUTDATED (unchanged entities).
        Parameters:
        session - The session which is used to check for access rights on this method.
        branch - The branch of which to retrieve lightweight objects for the configuration sets.
        Returns:
        Lightweight representations of the development versions of all configuration sets in the designated branch (changed or unchanged entities) known by this manager.
        Throws:
        UnknownEntityException - If the designated branch is currently unused, an UnknownEntityException will be thrown.
      • getDevelopmentCSReferencesIterator

        RemoteIterator<List<CSReference>> getDevelopmentCSReferencesIterator​(SessionToken session,
                                                                             long branch)
        The same as getCSRevision(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.
        branch - The branch of which to retrieve lightweight objects for the configuration sets.
        Returns:
        Lightweight representations of the development versions of all configuration sets 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, an UnknownEntityException will be thrown.
      • getDevelopmentCS

        ConfigurationSet getDevelopmentCS​(SessionToken session,
                                          String csName,
                                          long branch)
        Gets the (full-fledged object representing the) development version of the designated configuration set in the designated branch. The returned entity will be IN_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 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 it is stored the first time.
        Parameters:
        session - The session which is used to check for access rights on this method.
        csName - The name of the configuration set of which to retrieve the development version of the designated branch.
        branch - The branch of which to retrieve the corresponding configuration set (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 configuration set in the designated branch.
        Throws:
        UnknownEntityException - If the designated configuration set does not exist or the designated branch is currently unused, an UnknownEntityException will be thrown.
      • storeDevelopmentCS

        void storeDevelopmentCS​(SessionToken session,
                                StorageConfigurationSet cs,
                                long branch)
        Stores the designated (storage representation of the) configuration set in the designated branch and sets it IN_DEVELOPMENT if not done yet. All changes are therefore persisted. The branch is usually the same as specified when retrieving the configuration set 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 configuration set just set its primary key to a non-existing one and store it. If the key exists, the configuration set will be updated instead of added!

        When storing a configuration set, the IDs of all corresponding ActivityTemplateDefinitions 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.
        cs - The configuration set providing the new attributes to be set. Configuration sets 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 configuration set.
        Throws:
        UnknownEntityException - If the designated branch is currently unused, an UnknownEntityException will be thrown.
      • revertDevelopmentCS

        void revertDevelopmentCS​(SessionToken session,
                                 String csName,
                                 long branch)
        Reverts the designated development configuration set in the designated branch that is all changes will be undone and the configuration set 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.
        csName - The name of the configuration set of which to delete the development version in the designated branch.
        branch - The branch in which to revert the designated configuration set and therefore undoing made changes.
        Throws:
        UnknownEntityException - If the designated configuration set 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.
      • simulateUpdateOfDevelopmentCS

        CheckReport simulateUpdateOfDevelopmentCS​(SessionToken session,
                                                  String csName,
                                                  long branch)
        Simulates updating of the designated configuration set in the designated branch, that is only the designated configuration set 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 configuration set instead of checking the whole branch will provide a much simpler way to resolve these conflicts.
        When checking a configuration set 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.
        csName - The name of the configuration set which to check for versioning conflicts due to updating to the latest revision.
        branch - The branch in which to check the designated configuration set for versioning conflicts when updating.
        Returns:
        A check report providing information on versioning on the designated configuration set only.
        Throws:
        UnknownEntityException - If the designated configuration set does not exist in the designated branch or does not exist at all, an UnknownEntityException will be thrown.
      • outdateCS

        void outdateCS​(SessionToken session,
                       String csName)
        Outdates the latest revision of the designated configuration set 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 an OUTDATED configuration set 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.
        csName - The name of the configuration set of which to explicitly outdate the latest revision.
        Throws:
        UnknownEntityException - If the designated configuration set does not exist, an UnknownEntityException will be thrown.