This section gives an overview of client applications, sessions and settings.
The ClientData
class holds information
about a client application. The externalId
property is a unique identifier for the application. To avoid ID clashes the ID
should be constructed in the same way as Java packages, for example
net.sf.basedb.clients.web
is the ID for the
web client application.
A client application doesn't have to be registered with BASE to be able to use it. But we recommend it since:
The permission system allows an admin to specify exactly which users that may use a specific application.
The application can't store any context-sensitive or application-specific settings unless it is registered.
The application can store context-sensitive help in the BASE database.
A session represents the time between login and logout for a single
user. The SessionData
object is entirely
managed by the BASE core, and should be considered read-only
for client applications.
There are two types of settings: context-sensitive settings and regular settings. The regular settings are simple key-value pairs of strings and can be used for almost anything. There are four subtypes:
Global default settings: Settings that are used by all users and client applications on the BASE server. These settings are read-only except for administrators. BASE has not yet defined any settings of this type.
User default settings: Settings that are valid for a single user for any client application. BASE has not yet defined any settings of this type.
Client default settings: Settings that are valid for all users using a specific client application. Each client application is responsible for defining it's own settings. Settings are read-only except for administrators.
User client settings: Settings that are valid for a single user using a specific client application. Each client application is responsible for defining it's own settings.
The context-sensitive settings are designed to hold information about the current status of options related to the listing of items of a specific type. This includes:
Context-sensitive settings are only accessible if a client application has been registered. The settings may be named to make it possible to store several presets and to quickly switch between them. In any case, BASE maintains a current default setting with an empty name. An administrator may mark a named setting as public to allow other users to use it.