Class RxPepFactory


  • public class RxPepFactory
    extends Object
    Entry Point to define reactive Policy Enforcement Points. This Factory has the capability to create Reactive Pep.
    • Method Detail

      • createRxPep

        public static <T> RxPep<T> createRxPep​(IMyDataEnvironment myDataEnvironment,
                                               DecisionEnforcer decisionEnforcer,
                                               Class<T> pepDocumentationApi)
        Creates a new ReactivePep object, takes the componentId from the @PepServiceDescription annotation.
        Type Parameters:
        T - the generic type
        Parameters:
        myDataEnvironment - the IMyDataEnvironment the PEP belongs to
        decisionEnforcer - the decision enforcer
        pepDocumentationApi - the pep documentation api
        Returns:
        the rx Pep of type T
      • createRxPep

        public static <T> RxPep<T> createRxPep​(IMyDataEnvironment myDataEnvironment,
                                               DecisionEnforcer decisionEnforcer,
                                               ComponentId componentId,
                                               Class<T> pepDocumentationApi)
        Creates a new ReactivePep object, takes the componentId from parameter
        Type Parameters:
        T - the generic type
        Parameters:
        myDataEnvironment - the IMyDataEnvironment the PEP belongs to
        decisionEnforcer - the decision enforcer
        componentId - the componentId of the PEP
        pepDocumentationApi - the pep documentation api
        Returns:
        the rx Pep of type T
      • createRxPep

        public static <T> RxPep<T> createRxPep​(IMyDataEnvironment myDataEnvironment,
                                               Class<T> pepDocumentationApi)
        Creates a new ReactivePep object, takes the componentId from the @PepServiceDescription annotation.
        Type Parameters:
        T - the generic type
        Parameters:
        myDataEnvironment - the IMyDataEnvironment the PEP belongs to
        pepDocumentationApi - the pep documentation api
        Returns:
        the rx Pep of type T
      • createRxPep

        public static <T> RxPep<T> createRxPep​(IMyDataEnvironment myDataEnvironment,
                                               ComponentId componentId,
                                               Class<T> pepDocumentationApi)
        Creates a new ReactivePep object, takes the componentId from parameter
        Type Parameters:
        T - the generic type
        Parameters:
        myDataEnvironment - the IMyDataEnvironment the PEP belongs to
        componentId - the componentId of the PEP
        pepDocumentationApi - the pep documentation api
        Returns:
        the rx Pep of type T
      • findAPIDocumentationType

        public static <T> PepType findAPIDocumentationType​(Class<T> pepDocumentationApi)
        This method determines whether the documentation API is Valid or not
        Type Parameters:
        T - the generic type
        Parameters:
        pepDocumentationApi - interface of documentation API
        Returns:
        PepType
      • getComponentId

        public static <T> ComponentId getComponentId​(SolutionId solutionId,
                                                     Class<T> pepDocumentationApi)
                                              throws IncorrectPepDescriptionError
        Gets the component ID from the PepServiceDescription annotation included in the given Pep documentation API.
        Type Parameters:
        T - the generic type
        Parameters:
        solutionId - the solutionId of the solution the PEP will belong to
        pepDocumentationApi - the Pep documentation API
        Returns:
        the component ID
        Throws:
        IncorrectPepDescriptionError - if there is no valid @PepServiceDescription annotation or the passed solutionId is invalid