Class RxPepFactory
- java.lang.Object
-
- de.fraunhofer.iese.mydata.reactive.RxPepFactory
-
public class RxPepFactory extends Object
Entry Point to define reactive Policy Enforcement Points. This Factory has the capability to create Reactive Pep.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> RxPep<T>createRxPep(IMyDataEnvironment myDataEnvironment, de.fraunhofer.iese.mydata.component.ComponentId componentId, Class<T> pepDocumentationApi)Creates a new ReactivePep object, takes the componentId from parameterstatic <T> RxPep<T>createRxPep(IMyDataEnvironment myDataEnvironment, DecisionEnforcer decisionEnforcer, de.fraunhofer.iese.mydata.component.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> de.fraunhofer.iese.mydata.component.ComponentIdgetComponentId(de.fraunhofer.iese.mydata.solution.SolutionId solutionId, Class<T> pepDocumentationApi)Gets the component ID from the PepServiceDescription annotation included in the given Pep documentation API.
-
-
-
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 @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, de.fraunhofer.iese.mydata.component.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, de.fraunhofer.iese.mydata.component.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
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> de.fraunhofer.iese.mydata.component.ComponentId getComponentId(de.fraunhofer.iese.mydata.solution.SolutionId solutionId, Class<T> pepDocumentationApi) throws IncorrectPepDescriptionErrorGets 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
-
-