-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Description
The library should use the Whiteflag message schema of the protocol specification as a resource for validation of messages, interpretation of subject and object codes, etc.
Rationale
The Whiteflag message schema is a structured representation of the protocol specification that is machine readable. By using the message schema instead of hardcoding as much as possible, it is ensured that the WFJL implementation is correct, that the code is better maintainable, and that protocol updates can be implemented faster and without errors.
Solution
Specification
No further specification available.
Affected components
The Whiteflag message specification is a JSON schema which might be imported using a WfJsonSchema class in the org.whiteflagprotocol.java.util package. As the message schema contains core protocol features, it also affects the org.whiteflagprotocol.java.core package, including the following classes:
WfMessageDefinitions, the static utility class with message and message field definitions.
Additional classes may be added, for example:
WfSubjectTypes, a static utility class with all valid subject codes and names by sign/signal type.WfObjectTypes, a static utility class with all valid object codes and names.
Alternatives
Alternatively, all message details are hardcoded. This may lead to more errors and is not easily maintainable.