Class DefaultPolicyEnforcementPoint

  • All Implemented Interfaces:
    de.fraunhofer.iese.mydata.component.interfaces.IMyDataComponent, de.fraunhofer.iese.mydata.component.interfaces.IPolicyEnforcementPoint
    Direct Known Subclasses:
    PolicyEnforcementPoint

    public class DefaultPolicyEnforcementPoint
    extends Object
    implements de.fraunhofer.iese.mydata.component.interfaces.IPolicyEnforcementPoint
    This class should be used with Spring auto registration
    • Constructor Detail

      • DefaultPolicyEnforcementPoint

        public DefaultPolicyEnforcementPoint​(IMyDataEnvironment myDataEnvironment,
                                             DecisionEnforcer decisionEnforcer)
        Constructor
        Parameters:
        myDataEnvironment - the IMyDataEnvironment the PEP belongs to
        decisionEnforcer - concrete implementation of decisionEnforcer
    • Method Detail

      • enforce

        public void enforce​(de.fraunhofer.iese.mydata.policy.event.Event event)
                     throws de.fraunhofer.iese.mydata.policy.exception.EvaluationUndecidableException,
                            de.fraunhofer.iese.mydata.policy.exception.InhibitException,
                            IOException
        Publish the event and enforce the AuthorizationDecision to Event
        Specified by:
        enforce in interface de.fraunhofer.iese.mydata.component.interfaces.IPolicyEnforcementPoint
        Parameters:
        event - The event to publish.
        Throws:
        de.fraunhofer.iese.mydata.policy.exception.EvaluationUndecidableException - if PDP can't decide.
        de.fraunhofer.iese.mydata.policy.exception.InhibitException - if event is not allowed
        IOException - if connection to PDP is not established
      • enforceDecision

        public void enforceDecision​(de.fraunhofer.iese.mydata.policy.event.Event event,
                                    de.fraunhofer.iese.mydata.policy.decision.AuthorizationDecision authorizationDecision)
                             throws de.fraunhofer.iese.mydata.policy.exception.InhibitException
        Impose the AuthorizationDecision authorizationDecision on Event event.
        Specified by:
        enforceDecision in interface de.fraunhofer.iese.mydata.component.interfaces.IPolicyEnforcementPoint
        Parameters:
        event - on which authorizationDecision to be impose
        authorizationDecision - the decision to enforce on event
        Throws:
        de.fraunhofer.iese.mydata.policy.exception.InhibitException - if event is not allowed
      • getDecision

        public de.fraunhofer.iese.mydata.policy.decision.AuthorizationDecision getDecision​(de.fraunhofer.iese.mydata.policy.event.Event event)
                                                                                    throws de.fraunhofer.iese.mydata.policy.exception.EvaluationUndecidableException,
                                                                                           IOException
        Specified by:
        getDecision in interface de.fraunhofer.iese.mydata.component.interfaces.IPolicyEnforcementPoint
        Throws:
        de.fraunhofer.iese.mydata.policy.exception.EvaluationUndecidableException
        IOException
      • getId

        public de.fraunhofer.iese.mydata.component.ComponentId getId()
        Specified by:
        getId in interface de.fraunhofer.iese.mydata.component.interfaces.IMyDataComponent
        Returns:
        The id of the component.
      • initialize

        public boolean initialize()
                           throws IOException,
                                  de.fraunhofer.iese.mydata.exception.NoSuchEntityException
        Default initializer that establishes the connection to PDP.
        Specified by:
        initialize in interface de.fraunhofer.iese.mydata.component.interfaces.IPolicyEnforcementPoint
        Throws:
        de.fraunhofer.iese.mydata.exception.NoSuchEntityException
        IOException
      • reset

        public boolean reset()
                      throws IOException,
                             de.fraunhofer.iese.mydata.exception.NoSuchEntityException
        Reset the PDP connection.
        Specified by:
        reset in interface de.fraunhofer.iese.mydata.component.interfaces.IMyDataComponent
        Returns:
        true, if successful.
        Throws:
        de.fraunhofer.iese.mydata.exception.NoSuchEntityException
        IOException
      • getHealth

        public de.fraunhofer.iese.mydata.component.health.HealthStatus getHealth()
        Specified by:
        getHealth in interface de.fraunhofer.iese.mydata.component.interfaces.IMyDataComponent