Annotation Type InterModuleAPI
@Target(TYPE)
@Retention(RUNTIME)
public @interface InterModuleAPI
Marks a class as an "Inter-Module API". Inter-Module APIs can be called
from Modules which do not have a compile-time dependency on one another.
See
ModuleIntegrationService.call(String, String, Object...)
for
details on how these calls are made.
To create your own Inter-Module API, you should:
- Create a java class with a no-args constructor in the "api" subpackage of your base module package. (For example if your base package is com.mycompany.mymodule, the package would be com.mycompany.mymodule.api. Next, annotate the class with @InterModuleAPI("BaseAPIName"), where BaseAPIName is the base name you want to give the API. (For example, you might give a base name of "BookReader", which would then have specific apis like "BookReader.getTitleByISBN" and "BookReader.finishBook".)
- Create one or more public methods in the class - these will all be available to callers
- Java primitives and common data types: int, double, String, Date, etc
- Other commonly understood data types, e.g. JSONObject, JSONArray, etc.
- Types from platform-api (CsvRow, SqlRow, Table, TimelineView, etc.)
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
value
Base API name
-
Element Details
-
value
java.lang.String valueBase API name
-