Packages¶
The sdmx-core framework uses a common package structure which is described in the table below. Some of the generic modules are packaged by feature, these include high level API or utility modules; for all other modules the following package structure is followed.
| Package Name | Description |
|---|---|
| api | Contains Interfaces specific to the module. The packages under the api package mirror where the implementation can be found. For example interfaces defined in the api.manager package would have their implementations under the manager package. |
| builder | Consists of classes, typically with public static methods, that can build one object from an input (e.g. JSON to a Java object) |
| dao | Database Access Objects |
| constant | Enums and classes which provide public static final constants |
| engine | Either constructed instances or stateless singletons. Engines ‘do the work’ and are typically created by or have work delegated to them by managers. |
| factory | Factories are used by managers to create engines. The use of Factories in sdmx-core supports the plugin architecture, new factories can be registered with the framework to increase support, for example, for data formats, structure formats, validation rules and so on. |
| manager | A manager is the entry point for a unit of work. Managers are lightweight in terms of amount of code and are always stateless, with the exception of globally applicable state, for example a local cache. Managers are responsible for ensuring the correct flow of logic by delegating tasks to supporting managers, engines, and DAO interfaces. An example is a structure persistence manager, which would delegate the work for security check, validation, persistence, and notification – managing any errors. |
| model | Model objects are constructed to hold information which can be passed around the system. Model objects are immutable unless there is a strong need for mutability. Immutability ensures model objects can be passed between methods with no fear of having their state changed by an external process. Model objects do not typically provide behaviour, only state, for example a model object would not contain a saveToDao method. |
| service | Web services |
| util | Utility classes specific to the module, typically providing public static methods. |