Interface IPolicyDecisionPoint

  • All Superinterfaces:
    IMyDataComponent

    public interface IPolicyDecisionPoint
    extends IMyDataComponent
    The PolicyDecisionPoint draws decisions based on the currently deployed policies.
    Author:
    Fraunhofer IESE
    • Method Detail

      • addToBlacklist

        boolean addToBlacklist​(Set<SolutionId> ids)
                        throws IOException
        Adds a solution the to blacklist.
        Parameters:
        ids - the ids
        Returns:
        true, if successful
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • clearAllCaches

        boolean clearAllCaches​(@Nullable
                               SolutionId solutionId)
                        throws IOException
        Clears all caches of the PDP (response and connector caches) about data related to the specified solution or any if solutionId==null.
        Parameters:
        solutionId - can be null to clear any data from the caches
        Returns:
        true, if cache was cleaned
        Throws:
        IOException - if there occurs a connection problem.
      • decisionRequests

        List<AuthorizationDecision> decisionRequests​(List<Event> events)
                                              throws IOException
        Notifies the PDP about multiple events. Based on the events, the policies are evaluated and decision is drawn.
        Parameters:
        events - the occurred events
        Returns:
        the AuthorizationDecisions with respect to the event and deployed policies
        Throws:
        IOException - if there occurs a connection problem.
      • deploy

        boolean deploy​(Policy policy,
                       java.time.ZoneId zoneIdOfSolution)
                throws IOException,
                       ConflictingPolicyException
        Deploys a policy.
        Parameters:
        policy - the policy to deploy
        zoneIdOfSolution - zoneId of solution
        Returns:
        true if the policy is deployed, false otherwise
        Throws:
        IOException - if there occurs a connection problem.
        ConflictingPolicyException - if multiple policy with same component_id are found in PMP
      • evaluate

        boolean evaluate​(Event event)
                  throws IOException
        Evaluate an event.
        Parameters:
        event - the event
        Returns:
        true, if successful
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • evaluate

        boolean evaluate​(Set<Event> events)
                  throws IOException
        Evaluate multiple events.
        Parameters:
        events - the events
        Returns:
        true, if successful
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • listDeployedPolicies

        Set<String> listDeployedPolicies()
                                  throws IOException
        Provides a list of currently deployed policy names.
        Returns:
        list of currently deployed policy names
        Throws:
        IOException - if there occurs a connection problem.
      • removeFromBlacklist

        boolean removeFromBlacklist​(Set<SolutionId> ids)
                             throws IOException
        Removes a solution from the blacklist.
        Parameters:
        ids - the ids
        Returns:
        true, if successful
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • isInFailureMode

        boolean isInFailureMode()
      • setFailureMode

        void setFailureMode​(boolean active)
                     throws IOException
        Sets the failure mode.
        Parameters:
        active - the new failure mode
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • updatePolicyAndId

        boolean updatePolicyAndId​(Policy policyWithNewId,
                                  java.time.ZoneId zoneIdOfSolution,
                                  PolicyId oldPolicyId)
                           throws IOException,
                                  ResourceUpdateException
        Update policyId
        Parameters:
        policyWithNewId - the policy with the new id
        zoneIdOfSolution - zoneId of solution
        oldPolicyId - the previous policy id
        Returns:
        true, if successful
        Throws:
        IOException - Signals that an I/O exception has occurred.
        ResourceUpdateException - the policy update exception
      • isWhitelistModeEnabled

        boolean isWhitelistModeEnabled()
        Whitelist mode
        Returns:
        true if whitelist mode is enabled, false is blacklist mode