Class ProcessSchemeStore


  • public abstract class ProcessSchemeStore
    extends Object
    Manages access to process schemes.

    Subclasses need to ensure that the first time the store is accessed, a default scheme is automatically created if none yet exists.

    Since:
    3.5.0
    • Constructor Detail

      • ProcessSchemeStore

        public ProcessSchemeStore()
    • Method Detail

      • setInstance

        public static void setInstance​(ProcessSchemeStore store)
        Replaces the current store instance with the given one.
        Parameters:
        store - the new store.
      • getSchemeProjectAreas

        public abstract Collection<String> getSchemeProjectAreas​(String schemeIdentifier)
                                                          throws ProcessSchemeStoreException
        Resolves the identifiers of the project areas associated to the given scheme.
        Parameters:
        schemeIdentifier - the identifier of a scheme
        Returns:
        the list of project areas identifiers which are bound to the given scheme
        Throws:
        ProcessSchemeStoreException - if an error prevents the associations from being read.
      • getProjectAreaScheme

        public abstract String getProjectAreaScheme​(String projectAreaIdentifier)
                                             throws ProcessSchemeStoreException
        Resolves the scheme identifier to which the given project area is associated. Subclasses needs to ensure the project is always associated to a given scheme, which can be the default scheme.
        Parameters:
        projectAreaIdentifier - the identifier of a project area
        Returns:
        the identifier of the scheme to which the given project area is associated.
        Throws:
        ProcessSchemeStoreException - if an error prevents the association from being read.
      • setProjectAreaScheme

        public abstract void setProjectAreaScheme​(String projectAreaIdentifier,
                                                  String schemeIdentifier)
                                           throws ProcessSchemeStoreException
        Replaces the scheme associated with the given project area.
        Parameters:
        projectAreaIdentifier - the identifier of the project area
        schemeIdentifier - the identifier of the new scheme to assign
        Throws:
        ProcessSchemeStoreException - if an error prevents the association from being created.