Class InterfaceDescriptionDiscovery
java.lang.Object
de.fraunhofer.iese.mydata.registry.InterfaceDescriptionDiscovery
Generates a List of
MethodInterfaceDescription
by introspecting a class. Therefor the
discovery lists all methods that is annotated with an Annotation of Type
ActionDescription
and creates an instance of MethodInterfaceDescription
with the
information provided by the MethodSignature, the annotation and the
ActionParameterDescription
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
-
Method Summary
Modifier and TypeMethodDescriptiondiscover
(Class<?> serviceClass, ComponentType type, SolutionId solutionId) Discover.
-
Constructor Details
-
InterfaceDescriptionDiscovery
public InterfaceDescriptionDiscovery()
-
-
Method Details
-
discover
public Map<MethodInterfaceDescription,Method> discover(Class<?> serviceClass, ComponentType type, SolutionId solutionId) throws InvalidEntityException Discover.- Parameters:
serviceClass
- the class of the servicetype
- the typesolutionId
- the solution id- Returns:
- the map
- Throws:
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)
-