Geomajas Community Documentation
The interaction of the client faces with the Geomajas back-end is handled using commands.
When a command needs to be invoked (probably as result of a
user interaction), the client will build a
CommandRequest
object. This contains the name of the
command to be used, the parameters for the command, and optionally
the user authentication token and language of the user
interface.
This object is transferred to the face server. For web applications, this will typically be done using an AJAX request.
The face server will use this CommandRequest
to
invoke the CommandDispatcher
service, which can be
obtained using the Spring context.
The CommandDispatcher
will start by invoking the
SecurityManager
to check whether the execution of the
requested command is allowed. If it is allowed, the actual Command
is obtained using the Spring context. The
CommandResponse
object is created and the command is
executed.
The Command
will now do its job, writing the
results in the CommandResponse
object. When problems
occur during execution of the command, it can either write this into
the response object or throw an exception.
When the command has executed, if it threw an exception, the dispatcher will add this in the response object. It will then convert any exceptions in the response object into some messages which may be sensible to the user (put the message in the correct language in the result object, assuring the "cause" chain is also included). Some extra information is also added in the response object (like command execution time).
The CommandResponse
is returned to the face
server.
The face server serializes the CommandResponse
back to the face client.
When the command had something to do with rendering, then the
response object is likely to contain a Tile
.