Class ProcessSchemePolicySet


  • public class ProcessSchemePolicySet
    extends Object
    Provides facilities to lookup existing scheme policies from the store and to perform updates. Developer is recommended to use this class whenever possible, rather than interacting with the lower level ProcessSchemePolicyStore.
    Since:
    3.5.0
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Returns true if there's no policies in the store for the underlying scheme.
        Returns:
        true if there's no policies in the store for the underlying scheme.
      • getSchemePolicy

        public Optional<ProcessSchemePolicy> getSchemePolicy()
        Returns the existing policy for the scheme, if any.
        Returns:
        the existing policy for the scheme, an empty Optional if none.
      • getFriendPolicy

        public Optional<FriendPolicy> getFriendPolicy​(Friend friend)
        Returns the existing policy for a friend, if any.
        Parameters:
        friend - the friend application.
        Returns:
        the existing policy for a friend, an empty Optional if none.
      • getResourceTypePolicy

        public Optional<ResourceTypePolicy> getResourceTypePolicy​(Friend friend,
                                                                  URI resourceType)
        Returns the existing policy for the given resource type, if any.
        Parameters:
        friend - the friend application.
        resourceType - the resource type
        Returns:
        the existing policy for the given resource type, an empty Optional if none.
      • getLinkTypePolicy

        public Optional<LinkTypePolicy> getLinkTypePolicy​(Friend friend,
                                                          URI resourceType,
                                                          URI linkType)
        Returns the existing policy for the given link type, if any.
        Parameters:
        friend - the friend application.
        resourceType - the resource type
        linkType - the link type
        Returns:
        the existing policy for the given link type, an empty Optional if none.