Class ProjectAreaStore


  • public abstract class ProjectAreaStore
    extends Object
    Manages access to OSLC project areas.
    Since:
    3.3.0
    • Constructor Detail

      • ProjectAreaStore

        public ProjectAreaStore()
    • Method Detail

      • setInstance

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

        public abstract Collection<ProjectArea> getAccessibleProjectAreas​(String userIdentifier)
                                                                   throws ProjectAreaStoreException
        Gets project areas accessible by a user. Implementations MUST set the project identifier into the dcterms:identifier extended property but are not required to set the service providers. If the application APIs do not allow access to the project area title for users without a READ permission, then this method should return an empty collection.
        Parameters:
        userIdentifier - the user identifier.
        Returns:
        a collection of accessible project areas.
        Throws:
        ProjectAreaStoreException - if an error prevents project areas from being retrieved.
      • getRestrictedProjectAreas

        public abstract Collection<ProjectArea> getRestrictedProjectAreas​(String userIdentifier)
                                                                   throws ProjectAreaStoreException
        Gets project areas not accessible by a user. Implementations MUST set the project identifier into the dcterms:identifier extended property but are not required to set the service providers. If the application APIs do not allow access to the project area title for users without a READ permission, then this method should return an empty collection.
        Parameters:
        userIdentifier - the user identifier.
        Returns:
        a collection of restricted project areas.
        Throws:
        ProjectAreaStoreException - if an error prevents project areas from being retrieved.
      • isOslcProject

        protected boolean isOslcProject​(ProjectArea projectArea)
                                 throws ProjectAreaStoreException
        Determines whether a project area is OSLC enabled or not. By default, a project area is OSLC enabled when there is at least one remote associated project area.
        Parameters:
        projectArea - the testing project area.
        Returns:
        true if the given project is OSLC enabled; false otherwise.
        Throws:
        ProjectAreaStoreException - if an error prevents the OSLC-enabled resolution.
      • getAccessibleOslcProjectAreas

        public Collection<ProjectArea> getAccessibleOslcProjectAreas​(String userIdentifier)
                                                              throws ProjectAreaStoreException
        Gets the OSLC enabled project areas accessible by a user.
        Parameters:
        userIdentifier - the user identifier.
        Returns:
        a collection of OSLC accessible project areas.
        Throws:
        ProjectAreaStoreException - if an error prevents project areas from being retrieved.
      • getRestrictedOslcProjectAreas

        public Collection<ProjectArea> getRestrictedOslcProjectAreas​(String userIdentifier)
                                                              throws ProjectAreaStoreException
        Gets the OSLC enabled project areas not accessible by a user.
        Parameters:
        userIdentifier - the user identifier.
        Returns:
        a collection of OSLC restricted project areas.
        Throws:
        ProjectAreaStoreException - if an error prevents project areas from being retrieved.