Skip to main content

Service Documentation

The following Java annotations are used to document the service of the Micro Executor

@DocsService

This is the annotation used to document the service at class level.

The attributes of this annotatios are:

  • name: service name
  • description: service description
Example
@DocsService(name = "JA_TST_00", description = "Test Service description")
public class JA_TST_00 extends KokosService {}

@DocsServiceMethod

This is the annotation used to document a method of a service.

The attributes of this annotations are:

  • component: data structure returned from the method
  • function: the name of the method
  • obj1: parameter that can be passed in the Object1 field of the fun (this is an instance of @DocsServiceParam)
  • obj2: parameter that can be passed in the Object2 field of the fun (this is an instance of @DocsServiceParam)
  • obj3: parameter that can be passed in the Object3 field of the fun (this is an instance of @DocsServiceParam)
  • obj4: parameter that can be passed in the Object4 field of the fun (this is an instance of @DocsServiceParam)
  • obj5: parameter that can be passed in the Object5 field of the fun (this is an instance of @DocsServiceParam)
  • obj6: parameter that can be passed in the Object6 field of the fun (this is an instance of @DocsServiceParam)
  • p: parameters that can be passed in the P field of the fun (this is an array of @DocsServiceParam intances)
  • input: parameters that can be passed in the INPUT field of the fun (this is an array of @DocsServiceParam intances)
  • description: description of the method
Example
@DocsServiceMethod(component = "TRE", function = "GET", obj1 = @DocsServiceParam(param = "[T1];[P1];[K1]", optional = false), p = {}, input = {}, description = "Service method description")
@ServiceMethod("GET")
public void getTRE(Fun fun, ExecutionContext context) throws Exception {}

@DocsServiceParam

This is the annotation used to document a parameter that can be passed to a method of a service.

The attributes of this annotation are:

  • param: the parameter that can be passed to the mthod
  • optional: if the parameter is optional (boolean)
  • description: parameter description
Example
@DocsServiceParam(param = "[T1];[P1];[K1]", optional = false, description = "parameter description")