Class RxPepFactory
java.lang.Object
de.fraunhofer.iese.mydata.reactive.RxPepFactory
Entry Point to define reactive Policy Enforcement Points. This Factory has the capability to
create Reactive Pep.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> RxPep<T>createRxPep(IMyDataEnvironment myDataEnvironment, ComponentId componentId, Class<T> pepDocumentationApi) Creates a new ReactivePep object, takes the componentId from parameterstatic <T> RxPep<T>createRxPep(IMyDataEnvironment myDataEnvironment, DecisionEnforcer decisionEnforcer, ComponentId componentId, Class<T> pepDocumentationApi) Creates a new ReactivePep object, takes the componentId from parameterstatic <T> RxPep<T>createRxPep(IMyDataEnvironment myDataEnvironment, DecisionEnforcer decisionEnforcer, Class<T> pepDocumentationApi) Creates a new ReactivePep object, takes the componentId from the @PepServiceDescriptionannotation.static <T> RxPep<T>createRxPep(IMyDataEnvironment myDataEnvironment, Class<T> pepDocumentationApi) Creates a new ReactivePep object, takes the componentId from the @PepServiceDescriptionannotation.static <T> PepTypefindAPIDocumentationType(Class<T> pepDocumentationApi) This method determines whether the documentation API is Valid or notstatic <T> ComponentIdgetComponentId(SolutionId solutionId, Class<T> pepDocumentationApi) Gets the component ID from the PepServiceDescription annotation included in the given Pep documentation API.
-
Method Details
-
createRxPep
public static <T> RxPep<T> createRxPep(IMyDataEnvironment myDataEnvironment, DecisionEnforcer decisionEnforcer, Class<T> pepDocumentationApi) Creates a new ReactivePep object, takes the componentId from the @PepServiceDescriptionannotation.- Type Parameters:
T- the generic type- Parameters:
myDataEnvironment- the IMyDataEnvironment the PEP belongs todecisionEnforcer- the decision enforcerpepDocumentationApi- 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 todecisionEnforcer- the decision enforcercomponentId- the componentId of the PEPpepDocumentationApi- 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 @PepServiceDescriptionannotation.- Type Parameters:
T- the generic type- Parameters:
myDataEnvironment- the IMyDataEnvironment the PEP belongs topepDocumentationApi- 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 tocomponentId- the componentId of the PEPpepDocumentationApi- the pep documentation api- Returns:
- the rx Pep of type T
-
findAPIDocumentationType
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 topepDocumentationApi- the Pep documentation API- Returns:
- the component ID
- Throws:
IncorrectPepDescriptionError- if there is no valid @PepServiceDescription annotation or the passed solutionId is invalid
-