Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Authentication filter is a servlet filter that is applied to most repository service URLs.  The filters only function is to authenticate the caller.  There are several mechanism with which a user may authenticate including a Session Token added to the header of the request or signing the request using their API key.  For more information about authentication see: Authentication Controller. Once the filter authenticates a user, the user's ID is passed along with the request.

Controllers

The controller's layer simply maps all of the components of an HTTP request into a Java method call.  This includes the URL path, query parameters, request and response body marshaling, error handling and other response codes. Each controller also groups calls in the same category into a single file.  The javadocs of each controller also serves as the source for the REST API documentation generation.  Each controller is a very thin layer that depends on the service layer.

All request and response bodies for the repository services is in JSON.  The controller layer is also where all  Plain Old Java Objects (POJOs) are marshaled to/from JSON.  Every request and response objects is defined by a JSON schema, which is then

Services/Manager

Ideally the services/managers layer encapsulates all repository services "business logic".  This business logic includes any object composition/decomposition.  For example, while a WikiPage is a single