Class InterfaceDescriptionDiscovery
- java.lang.Object
-
- de.fraunhofer.iese.mydata.registry.InterfaceDescriptionDiscovery
-
public class InterfaceDescriptionDiscovery extends Object
Generates a List ofMethodInterfaceDescription
by introspecting a class. Therefor the discovery lists all methods that is annotated with an Annotation of TypeActionDescription
and creates an instance ofMethodInterfaceDescription
with the information provided by the MethodSignature, the annotation and theActionParameterDescription
annotations of each method parameter. For Example The Method@ActionDescription(description = "Retreives the authority (role) of an user") public String getAuthority(@ActionParameterDescription(name = "username", description = "The user the authority should be evaluated for.", mandatory = true) String username) { }
Results in an InterfaceDescription with:
- name = getAuthority
- description = Retreives the authority (role) of an user
- parameter =
- InputParameterDescription: name = username, description = The user the authority should be evaluated for, mandatory = true
-
-
Constructor Summary
Constructors Constructor Description InterfaceDescriptionDiscovery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<de.fraunhofer.iese.mydata.component.information.method.MethodInterfaceDescription,Method>
discover(Class<?> serviceClass, de.fraunhofer.iese.mydata.component.ComponentType type, de.fraunhofer.iese.mydata.solution.SolutionId solutionId)
Discover.
-
-
-
Method Detail
-
discover
public Map<de.fraunhofer.iese.mydata.component.information.method.MethodInterfaceDescription,Method> discover(Class<?> serviceClass, de.fraunhofer.iese.mydata.component.ComponentType type, de.fraunhofer.iese.mydata.solution.SolutionId solutionId) throws de.fraunhofer.iese.mydata.exception.InvalidEntityException
Discover.- Parameters:
serviceClass
- the class of the servicetype
- the typesolutionId
- the solution id- Returns:
- the map
- Throws:
de.fraunhofer.iese.mydata.exception.InvalidEntityException
- when solutionId is invalid or when the serviceClass is not a valid MyData Component (e.g. when not every parameter of an action is annotated)
-
-