Class InterfaceDescriptionDiscovery


  • public class InterfaceDescriptionDiscovery
    extends Object
    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 Detail

      • InterfaceDescriptionDiscovery

        public InterfaceDescriptionDiscovery()
    • 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 service
        type - the type
        solutionId - 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)