Application Structure
Controllers
Overview
Reference
AbstractController
AbstractController
- Full name :
org.jspresso.framework.application.AbstractController
- Super-type :
AbstractPropertyChangeCapable
- Sub-types :
AbstractBackendController
,AbstractFrontendController
Abstract base class for controllers. Controllers role is to adapt the application to its environment. Jspresso relies on two different types of controllers :
- The frontend controller is responsible for managing UI interactions. Naturally, the type of frontend controller used depends on the UI channel.
- The backend controller is responsible for managing the application session as well as transactions and persistence operations.
Property | Description |
---|---|
customExceptionHandler
|
Configures a custom exception handler on the controller. The controller itself is an exception handler and is used as such across most of the application layers. Jspresso philosophy is to use unchecked exceptions in services, business rules, and so on, so that, whenever an exception occurs, it climbs the call stack up to an exception handler (usually one of the controller). Whenever a custom exception handler is configured, the exception handling is delegated to it, allowing the exceptions to be refined or handled differently than for the built-in case. The exception handler can either :
|
liveDebugUI
|
Sets live debug ui. |
loginContextName
|
Configures the name of the JAAS login context to use to authenticate users.
It must reference a valid JAAS context that is installed in the JVM, either
through setting the |
AbstractBackendController
- Full name :
org.jspresso.framework.application.backend.AbstractBackendController
- Super-type :
AbstractController
- Sub-types :
HibernateBackendController
Base class for backend application controllers. Backend controllers are responsible for :
- keeping a reference to the application session
- keeping a reference to the application workspaces and their state
- keeping a reference to the application clipboard
- keeping a reference to the entity registry that guarantees the in-memory entity reference unicity in the user session
- keeping a reference to the entity dirt recorder that keeps track of entity changes to afterwards optimize the ORM operations
- keeping a reference to the Spring transaction template and its peer "Unit of Work" -aka UOW- that is responsible to manage application transactions and adapt the underlying transaction system (Hibernate, JTA, ...)
Property | Description |
---|---|
actionMonitoringPlugin
|
Sets action monitoring plugin. |
applicationSession
|
Assigns the application session to this backend controller. This property can only be set once and should only be used by the DI container. It will rarely be changed from built-in defaults unless you need to specify a custom implementation instance to be used. |
asyncActionsThreadGroup
|
Sets async actions thread group. |
asyncExecutorsMaxCount
|
Configures the maximum count of concurrent asynchronous action executors.
It defaults to |
carbonEntityCloneFactory
|
Configures the entity clone factory used to carbon-copy entities. An entity carbon-copy is an technical copy of an entity, including id and version but excluding relationship properties. This mechanism is used by the controller when duplicating entities into the UOW to allow for memory state aware transactions. This property should only be used by the DI container. It will rarely be changed from built-in defaults unless you need to specify a custom implementation instance to be used. |
clientTimeZone
|
Sets client time zone. |
collectionFactory
|
Configures the factory responsible for creating entities (or components) collections that are held by domain relationship properties. This property should only be used by the DI container. It will rarely be changed from built-in defaults unless you need to specify a custom implementation instance to be used. |
customSecurityPlugin
|
Configures a custom security plugin on the controller. The controller itself is a security handler and is used as such across most of the application layers. Before delegating to the custom security handler, the controller will apply role-based security rules that cannot be disabled. |
customTranslationPlugin
|
Configures a custom translation plugin on the controller. The controller itself is a translation provider and is used as such across most of the application layers. The custom translation plugin is used to override the default static, bundle-based, i18n scheme. |
dirtyTrackingEnabled
|
{@inheritDoc} |
entityFactory
|
Configures the entity factory to use to create new entities. Backend
controllers only accept instances of
|
modelConnectorFactory
|
Configures the model connector factory to use to create new model connectors. Connectors are adapters used by the binding layer to access domain model values. |
referenceTimeZoneId
|
Sets reference time zone id. |
slaveControllerFactory
|
Sets the slaveControllerFactory. |
throwExceptionOnBadUsage
|
Configures the backend controller to throw or not an exception whenever a bad usage is detected like manually merging a dirty entity from an ongoing UOW. |
transactionTemplate
|
Assigns the Spring transaction template to this backend controller. This property can only be set once and should only be used by the DI container. It will rarely be changed from built-in defaults unless you need to specify a custom implementation instance to be used.
The configured instance is the one that will be returned by the
controller's |
translationProvider
|
Configures the translation provider used to compute internationalized messages and labels. |
userPreferencesStore
|
Sets the user preference store. |
HibernateBackendController
- Full name :
org.jspresso.framework.application.backend.persistence.hibernate.HibernateBackendController
- Super-type :
AbstractBackendController
This is the default Jspresso implementation of Hibernate-based backend controller.
Property | Description |
---|---|
defaultTxFlushMode
|
Sets the default Hibernate flush mode to apply to the Hibernate session when it is bound to a transaction. Defaults to {@link FlushMode#COMMIT}. |
entityFactory
|
Configures the entity factory to use to create new entities. Backend
controllers only accept instances of
|
hibernateSessionFactory
|
Sets the hibernateSessionFactory. |
noTxDataSource
|
Sets the noTxDataSource. |
AbstractFrontendController
- Full name :
org.jspresso.framework.application.frontend.controller.AbstractFrontendController
- Super-type :
AbstractController
- Sub-types :
AbstractRemoteController
,DefaultSwingController
Base class for frontend application controllers. Frontend controllers are responsible for adapting the Jspresso application to the UI channel. Although this generic abstract class centralizes most of the controller's configuration, it will be subclassed by concrete, UI dependent subclasses to implement polymorphic behaviour.
More than a behavioural adapter, the frontend controller will also be the place where you define the top-level application structure like the workspace list, the name, the application-wide actions, ...
Property | Description |
---|---|
actionMap
|
Configures an application-wide action map that will be installed in the main application frame. These actions are available at any time from the UI and thus, do not depend on the active workspace. General purpose actions like "Change password" action should be installed here. |
checkActionThreadSafety
|
Sets the checkActionThreadSafety. |
clientPreferencesStore
|
Sets the clientPreferenceStore. |
description
|
Sets the application description i18n key. The way this description is actually leveraged depends on the UI channel. |
exitAction
|
Configures the exit action to be executed whenever the user wants to quit the application. The default installed exit action first checks for started module(s) dirty state(s), then notifies user of pending persistent changes. When no flush is needed or the user bypasses them, the actual exit is performed. |
forcedStartingLocale
|
Configures the locale used to initiate the login process. Whenever the
forced starting locale is As soon as the user logs-in, his locale is then used to translate the UI. Whenever the login process is disabled, then the forced starting locale is kept as the UI i18n locale. |
frameHeight
|
Sets the preferred application frame height. How this dimension is leveraged depends on the UI channel. |
frameWidth
|
Sets the preferred application frame width. How this dimension is leveraged depends on the UI channel. |
helpActionMap
|
Configures the help action map. The help action map should contain actions that are related to helping the user (online help, reference manual, tutorial, version dialog...). The help action map is visually distinguished from the regular application action map. For instance elp actions can be represented in a menu that is right-aligned in the menu bar. |
i18nDescription
|
Sets i 18 n description. |
i18nName
|
Sets i 18 n name. |
iconImageURL
|
Sets the icon image URL that is used as the application icon. Supported URL protocols include :
|
loginAction
|
Configures an action to be executed just after the user has successfully logged-in but before any UI initialization has begun. An example of such an action would be constructing a map of dynamic user right based on some arbitrary data store so that the UI construction can actually depend on these extracted values. |
loginViewDescriptor
|
Configures the view descriptor used to create the login dialog. The default built-in login view descriptor includes a standard login/password form. |
mvcBinder
|
Configures the MVC binder used to apply model-view bindings. There is hardly any reason for the developer to change the default binder but it can be customized here. |
name
|
Sets the application name i18n key. The way this name is actually leveraged depends on the UI channel but it typically generates (part of the) frame title. |
navigationActionMap
|
Configures the navigation action map. The navigation action map should contain actions that are related to navigating the modules and workspace history, e.g. previous, next, home, and so on. |
onModuleEnterAction
|
Configures an action to be executed each time a module of the application is entered. The action is executed in the context of the module the user enters. |
onModuleExitAction
|
Configures an action to be executed each time a module of the application is exited. The action is executed in the context of the module the user exits. Default frontend controller configuration installs an action that checks current module dirty state. |
onModuleStartupAction
|
Configures an action to be executed each time a module of the application is started. The action is executed in the context of the module the user starts. |
secondaryActionMap
|
Assigns the view secondary action map. Same rules as the primary action map apply except that actions in this map should be visually distinguished from the main action map, e.g. placed in another toolbar. |
startupAction
|
Configures an action to be executed on an empty UI context when the application starts. The action executes once the user has logged-in and the main UI has been constructed based on its access rights.An example of such an action would be a default workspace/module opening and selection, a "tip of the day" like action, ... |
viewFactory
|
Configures the view factory used to create views from view descriptors. Using a custom view factory is typically needed for extending Jspresso to use custom view descriptors / UI components. Of course, there is a view factory concrete type per UI channel. |
workspaces
|
Configures the workspaces that are available in the application. Workspaces are application entry-points and are hierarchically composed of modules / sub-modules. |
workspacesMenuIconImageUrl
|
Sets the icon image URL that is used as the workspace menu icon. Supported URL protocols include :
|
AbstractRemoteController
- Full name :
org.jspresso.framework.application.frontend.controller.remote.AbstractRemoteController
- Super-type :
AbstractFrontendController
- Sub-types :
DefaultRemoteController
,MobileRemoteController
This is is the base implementation of all "remotable" frontend controller.
Property | Description |
---|---|
description
|
|
name
|
|
statusInfo
|
{@inheritDoc} |
DefaultRemoteController
- Full name :
org.jspresso.framework.application.frontend.controller.remote.DefaultRemoteController
- Super-type :
AbstractRemoteController
This is is the default implementation of a "remotable" frontend controller. It will implement a 3-tier architecture. The remote controller lives on server-side and communicates with generic UI engines that are deployed on client side. As of now, the remote frontend controller is used by the Flex and qooxdoo frontends. Communication happens through the use of generic UI commands that are produced/consumed on both sides of the network.
Property | Description |
---|---|
clipboardContent
|
{@inheritDoc} |
MobileRemoteController
- Full name :
org.jspresso.framework.application.frontend.controller.remote.mobile.MobileRemoteController
- Super-type :
AbstractRemoteController
This is is the mobile implementation of a "remotable" frontend controller.
Property | Description |
---|---|
clipboardContent
|
Not supported in mobile environment. {@inheritDoc} |
singleModuleWorkspaceShortcut
|
Sets single module workspace shortcut. |
DefaultSwingController
- Full name :
org.jspresso.framework.application.frontend.controller.swing.DefaultSwingController
- Super-type :
AbstractFrontendController
This is is the default implementation of the Swing frontend controller. It will implement a 2-tier architecture that is particularly useful for the development/debugging phases. Workspaces are displayed using an MDI UI using internal frames.
Property | Description |
---|---|
clipboardContent
|
{@inheritDoc} |
name
|
{@inheritDoc} |
statusInfo
|
{@inheritDoc} |
Modules
Overview
Reference
Workspace
Workspace
- Full name :
org.jspresso.framework.application.model.Workspace
- Super-type :
AbstractPropertyChangeCapable
- Sub-types :
MobileWorkspace
A workspace is an group of functional application modules. You may decide arbitrarily how to group modules into workspaces but a good approach might be to design the workspaces based on roles (i.e. business activities). This helps to clearly separates tasks-unrelated modules and eases authorization management since a workspace can be granted or forbidden as a whole by Jspresso security.
Workspaces might be graphically represented differently depending on the UI technology used. For instance, the Swing and ULC channels use a MDI UI in which each workspace is represented as an internal frame (document). On the other hand, Flex and qooxdoo channels represent workspaces stacked in an accordion. Whatever the graphical representation is, there is at most one workspace active at a time for a user session - either the active (focused) internal frame or the expanded accordion section.
Property | Description |
---|---|
description
|
Configures the key used to translate actual internationalized workspace description. The resulting translation will generally be leveraged as a toolTip on the UI side but its use may be extended for online help. |
grantedRoles
|
Assigns the roles that are authorized to start this workspace. It supports
"!" prefix to negate the role(s). Whenever the user is not
granted sufficient privileges, the workspace is not installed at all in the
application frame. Setting the collection of granted roles to
|
headerDescription
|
Configures the key used to translate actual internationalized workspace header description. The resulting translation will generally be leveraged as a text header on the UI side. |
i18nHeaderDescription
|
Sets i 18 n header description. |
i18nPageHeaderDescription
|
Sets i 18 n page header description. |
iconImageURL
|
Sets the icon image URL of this workspace. Supported URL protocols include :
|
iconPreferredHeight
|
Sets the icon preferred width. |
iconPreferredWidth
|
Sets the icon preferred width. |
iconProvider
|
Since a workspace is represented as a tree view of modules, this property
can be used to customize an icon image URL provider on the created tree
view (see |
itemSelectionAction
|
Configures the action to be installed as item selection action on the
rendered module tree view - see
|
modules
|
Installs a list of module(s) into this workspace. Each module may own sub-modules that form a (potentially complex and dynamic) hierarchy, that is visually rendered as a tree view. |
name
|
Configures the key used to translate actual internationalized workspace name. The resulting translation will be leveraged as the workspace label on the UI side. |
pageHeaderDescription
|
Configures the key used to translate actual internationalized workspace page header description. The resulting translation will generally be leveraged as a textual section that explains the workspace goal. |
permId
|
Sets the permanent identifier to this application element. Permanent identifiers are used by different framework parts, like dynamic security or record/replay controllers to uniquely identify an application element. Permanent identifiers are generated by the SJS build based on the element id but must be explicitly set if Spring XML is used. |
startExpanded
|
Sets expanded. |
startupAction
|
Configures an action to be executed the first time the workspace is "started" by the user. The action will execute in the context of the workspace but with no specific module selected. It will help initializing workspace values, notify user, ... |
MobileWorkspace
- Full name :
org.jspresso.framework.application.model.mobile.MobileWorkspace
- Super-type :
Workspace
A workspace is an group of functional application modules. You may decide arbitrarily how to group modules into workspaces but a good approach might be to design the workspaces based on roles (i.e. business activities). This helps to clearly separates tasks-unrelated modules and eases authorization management since a workspace can be granted or forbidden as a whole by Jspresso security.
Workspaces might be graphically represented differently depending on the UI technology used. For instance, the Swing and ULC channels use a MDI UI in which each workspace is represented as an internal frame (document). On the other hand, Flex and qooxdoo channels represent workspaces stacked in an accordion. Whatever the graphical representation is, there is at most one workspace active at a time for a user session - either the active (focused) internal frame or the expanded accordion section.
Property | Description |
---|---|
This class does not have any specific property. |
Module
Module
- Full name :
org.jspresso.framework.application.model.Module
- Super-type :
AbstractPropertyChangeCapable
- Sub-types :
BeanCollectionModule
,BeanModule
A module is an entry point in the application. Modules are organized in bi-directional, parent-children hierarchy. As such, they can be viewed (and they are materialized in the UI) as trees. Modules can be (re)organized dynamically by changing their parent-children relationship and their owning workspace UI will reflect the change seamlessly, as with any Jspresso model (in fact workspaces and modules are regular beans that are used as model in standard Jspresso views).
Modules, among other features, are capable of providing a view to be installed in the UI wen they are selected. This makes Jspresso applications really modular and their architecture flexible enough to embed and run a large variety of different module types.
A module can also be as simple as a grouping structure for other modules (intermediary nodes).
Property | Description |
---|---|
description
|
Configures the key used to translate actual internationalized module description. The resulting translation will generally be leveraged as a toolTip on the UI side but its use may be extended for online help. |
displayDirtyState
|
Sets display dirty state. |
entryAction
|
Configures an action to be executed every time the module becomes the current selected module (either through a user explicit navigation or a programmatic selection). The action will execute in the context of the current workspace, this module being the current selected module. |
exitAction
|
Configures an action to be executed every time the module becomes unselected (either through a user explicit navigation or a programmatic deselection). The action will execute in the context of the current workspace, this module being the current selected module (i.e. the action occurs before the module is actually left). |
grantedRoles
|
Assigns the roles that are authorized to start this module. It supports
"!" prefix to negate the role(s). Whenever the user is not
granted sufficient privileges, the module is simply not installed in the
workspace. Setting the collection of granted roles to
Some specific modules that are component/entity model based i.e.
|
i18nPageHeaderDescription
|
Sets i 18 n header description. |
icon
|
Sets the icon. |
iconImageURL
|
Sets the icon image URL of this descriptor. Supported URL protocols include :
|
iconPreferredHeight
|
Sets the icon preferred width. |
iconPreferredWidth
|
Sets the icon preferred width. |
name
|
Configures the key used to translate actual internationalized module name. The resulting translation will be leveraged as the module label on the UI side. |
pageHeaderDescription
|
Configures the key used to translate actual internationalized module header description. The resulting translation will generally be leveraged as a text header on the UI side. |
permId
|
Sets the permanent identifier to this application element. Permanent identifiers are used by different framework parts, like dynamic security or record/replay controllers to uniquely identify an application element. Permanent identifiers are generated by the SJS build based on the element id but must be explicitly set if Spring XML is used. |
projectedViewDescriptor
|
Configures the view descriptor used to construct the view that will be displayed when this module is selected. |
startupAction
|
Configures an action to be executed the first time the module is "started" by the user. The action will execute in the context of the current workspace, this module being the current selected module. It will help initializing module values, notify user, .... |
BeanCollectionModule
- Full name :
org.jspresso.framework.application.model.BeanCollectionModule
- Super-type :
Module
- Sub-types :
FilterableBeanCollectionModule
,MobileBeanCollectionModule
This type of module keeps a reference on a beans collection. There is no assumption made on whether these beans are actually persistent entities or any other type of java beans.
Simple bean collection modules must have their collection of referenced beans initialized somehow. There is no standard built-in action to do so, since it is highly dependent on what's needed. So it's rather common to have the module content initialized through a startup action depending on the session state.
Property | Description |
---|---|
detailViewIncluded
|
This property allows to automatically include the detail view in a tab of the main collection module view. A complementary action list is installed to navigate between module objects. Default value is false. * |
elementComponentDescriptor
|
Configures the type of bean element this collection module manages. A bunch of default values are inferred from this element component descriptor. For instance, paging size (if used) will default to the component one unless explicitly set. Same goes for icon image URL, default ordering properties or even granted roles. The latter means that bean collection modules based on forbidden entities will automatically be excluded from the workspace of the logged-in user. if not explicitly configured, the element component descriptor can be inferred from the collection view descriptor configured as projected view descriptor. |
elementViewDescriptor
|
This property is not used by the module itself, but by built-in actions
that maybe registered on this module. One of these actions is
This property indicates the view to use whenever the user requests a "form-like" view on a collection element. Naturally the configured element view descriptor must be backed by a model matching the type of the module managed beans. |
moduleObjects
|
Assigns the list of beans this module manages. The projected view will automatically reflect this change since a "moduleObjects" property change will be fired. |
navigateModuleObjectsActionList
|
Sets navigate module objects action list. |
FilterableBeanCollectionModule
- Full name :
org.jspresso.framework.application.model.FilterableBeanCollectionModule
- Super-type :
BeanCollectionModule
- Sub-types :
MobileFilterableBeanCollectionModule
This is a specialized type of bean collection module that provides a filter (
an instance of IQueryComponent
). This type of module, coupled
with a generic, built-in, action map is perfectly suited for CRUD-like
operations.
Property | Description |
---|---|
criteriaFactory
|
Sets criteria factory. Depending on the persistence layer used, it should be an instance of :
|
criteriaRefiner
|
Sets criteria refiner. Depending on the persistence layer used, it should be an instance of :
|
displayPageIndex
|
Delegates to filter. {@inheritDoc} |
filter
|
Assigns the filter to this module instance. It is by default assigned by
the module startup action (see |
filterComponentDescriptor
|
This property allows to configure a custom filter model descriptor. If not set, which is the default value, the filter model is built out of the element component descriptor (QBE filter model). |
filterExtraViewDescriptor
|
This property allow to refine the filter view. If this field is not empty the filter view will be replaced by a tab view containing this view and the view defined bu the {@link #setFilterViewDescriptor(IViewDescriptor)} method. If the extra filter view or the filter view is already a tab view, then tab views will be merged to a single tab view. |
filterViewDescriptor
|
This property allows to refine the default filter view to re-arrange the filter fields. Custom filter view descriptors assigned here must not be assigned a model descriptor since they will be at runtime. This is because the filter component descriptor must be reworked - to adapt comparable field structures for instance. |
findOnSet
|
Whenever setting findOnSet to |
findOnType
|
Whenever setting findOnType to |
orderingProperties
|
Configures a custom map of ordering properties for the result set. If not set, which is the default, the elements ordering properties is used.
This property consist of a
|
page
|
Delegates to filter. {@inheritDoc} |
pageSize
|
Configures a custom page size for the result set. If not set, which is the default, the elements default page size is used. |
paginationViewDescriptor
|
Configures the sub view used to navigate between the pages. |
pagingAction
|
Sets the pagingAction. |
queryComponentDescriptorFactory
|
Sets the queryComponentDescriptorFactory. |
queryComponentRefiner
|
Sets query component refiner. |
queryExtraViewDescriptorFactory
|
Sets the queryExtraViewDescriptorFactory. |
queryViewDescriptorFactory
|
Sets the queryViewDescriptorFactory. |
recordCount
|
Delegates to filter. {@inheritDoc} |
selectedRecordCount
|
Delegates to filter. {@inheritDoc} |
stickyResults
|
Delegates to filter. {@inheritDoc} |
MobileFilterableBeanCollectionModule
- Full name :
org.jspresso.framework.application.model.mobile.MobileFilterableBeanCollectionModule
- Super-type :
FilterableBeanCollectionModule
This is a specialized type of filterable bean collection module that provides a filter (
an instance of IQueryComponent
). This type of module, coupled
with a generic, built-in, action map is perfectly suited for CRUD-like
operations.
Property | Description |
---|---|
elementViewDescriptor
|
Mobile filterable bean collection module views only support page views as element views descriptors. {@inheritDoc} |
filterViewDescriptor
|
Mobile filterable bean collection module views only support mobile component views as filter views descriptors. {@inheritDoc} |
paginationViewDescriptor
|
Not supported in mobile environment. {@inheritDoc} |
projectedViewDescriptor
|
Mobile filter bean collection module views only support list views as projected view descriptors. {@inheritDoc} |
queryModuleFilterAction
|
Sets query module filter action. |
MobileBeanCollectionModule
- Full name :
org.jspresso.framework.application.model.mobile.MobileBeanCollectionModule
- Super-type :
BeanCollectionModule
This type of module keeps a reference on a beans collection. There is no assumption made on whether these beans are actually persistent entities or any other type of java beans.
Simple bean collection modules must have their collection of referenced beans initialized somehow. There is no standard built-in action to do so, since it is highly dependent on what's needed. So it's rather common to have the module content initialized through a startup action depending on the session state.
Property | Description |
---|---|
elementViewDescriptor
|
Mobile bean collection module views only support page views as element views descriptors. {@inheritDoc} |
projectedViewDescriptor
|
Mobile bean collection module views only support list views as projected view descriptors. {@inheritDoc} |
BeanModule
- Full name :
org.jspresso.framework.application.model.BeanModule
- Super-type :
Module
- Sub-types :
MobileBeanModule
This type of module keeps a reference on a single bean. There is no assumption made on whether this bean is actually a persistent entity or any other type of java bean.
Bean modules must have their referenced bean initialized somehow. So it's
rather common to have the module content initialized through a startup action
depending on the session state or dynamically constructed by a standard
action like AddBeanAsSubModuleAction
.
This type of module is definitely the one that offers maximum flexibility to handle arbitrary models.
Property | Description |
---|---|
componentDescriptor
|
Configures the type of bean this module manages. A bunch of default values are inferred from this component descriptor. For instance, icon image URL or even granted roles can be inferred from the configured component descriptor. The latter means that bean modules based on forbidden entities will automatically be excluded from the workspace of the logged-in user. However, when not set, the component descriptor it self can be inferred from the configured projected view descriptor model. |
moduleObject
|
Assigns the bean this module manages. The projected view will automatically reflect this change since a "moduleObject" property change will be fired. |
MobileBeanModule
- Full name :
org.jspresso.framework.application.model.mobile.MobileBeanModule
- Super-type :
BeanModule
This type of module keeps a reference on a single bean. There is no assumption made on whether this bean is actually a persistent entity or any other type of java bean.
Bean modules must have their referenced bean initialized somehow. So it's
rather common to have the module content initialized through a startup action
depending on the session state or dynamically constructed by a standard
action like AddBeanAsSubModuleAction
.
This type of module is definitely the one that offers maximum flexibility to handle arbitrary models.
Property | Description |
---|---|
projectedViewDescriptor
|
Mobile bean module only support page views as projected views descriptors. {@inheritDoc} |
Enabling/Disabling
Jspresso goes beyond static, role-based, authorization by introducing the concept of gate. A gate is a simple monitor that can open or close based on certain (dynamic) rules. Jspresso relies on gates to implement dynamic authorization that are most often based on some kind of model sate.
There are various places in Jspresso where dynamic authorization can be implemented :
model writability : once a model instance is determined to be read-only, all views on this model are also made.
view writability : same as above but only applies to a single view.
action enablement : enables / disable actions based on the model of the view they are installed in.
Wherever you want to use dynamic authorization, you can always combine gates. The combination is conjunctive, meaning that all gates must be open for the property (writability, actionability) to be allowed. In other words, a single closed gate is sufficient to forbid the property.
Overview
Reference
AbstractGate
AbstractGate
- Full name :
org.jspresso.framework.util.gate.AbstractGate
- Super-type :
AbstractPropertyChangeCapable
- Sub-types :
AbstractModelGate
,ClosedGate
,GrantedRolesGate
This is the base abstract class of all Jspresso built-in gates. Open/close rule is delegated to concrete implementations.
Property | Description |
---|---|
This class does not have any specific property. |
AbstractModelGate
- Full name :
org.jspresso.framework.util.gate.AbstractModelGate
- Super-type :
AbstractGate
- Sub-types :
AbstractPropertyModelGate
,ServiceModelGate
This is the base abstract implementation for gates that are model-based.
Property | Description |
---|---|
collectionBased
|
Sets the collectionBased. |
AbstractPropertyModelGate
- Full name :
org.jspresso.framework.model.gate.AbstractPropertyModelGate
- Super-type :
AbstractModelGate
- Sub-types :
BooleanPropertyModelGate
,EnumerationPropertyModelGate
,RegexPropertyModelGate
This is the base abstract class of gates whose opening rules are based on a single model property value.
Property | Description |
---|---|
accessorFactory
|
Configures the accessor factory to use to access the underlying model property. |
grantedRoles
|
Configures the roles for which the gate is installed. It supports "!" prefix to negate the role(s). |
openOnTrue
|
This property allows to revert the standard behaviour of the gate, i.e. close when it should normally have opened and the other way around. |
propertyName
|
Configures the model property name to which this gate is attached. How the property value is actually linked to the gate state is delegated to the concrete implementations. |
BooleanPropertyModelGate
- Full name :
org.jspresso.framework.model.gate.BooleanPropertyModelGate
- Super-type :
AbstractPropertyModelGate
- Sub-types :
This gate opens and closes based on the value of a boolean property of the assigned model.
Property | Description |
---|---|
propertyName
|
Configures the boolean property name to use. Unless the
|
EnumerationPropertyModelGate
- Full name :
org.jspresso.framework.model.gate.EnumerationPropertyModelGate
- Super-type :
AbstractPropertyModelGate
- Sub-types :
This gate opens and closes based on the value of an enumeration property matching a set of allowed values.
Property | Description |
---|---|
openingValues
|
Configures the enumeration values for which the gate is to be open, unless
the |
RegexPropertyModelGate
- Full name :
org.jspresso.framework.model.gate.RegexPropertyModelGate
- Super-type :
AbstractPropertyModelGate
- Sub-types :
This gate opens and closes based on the value of a string property matching a regular expression.
Property | Description |
---|---|
regexpPattern
|
Configures the regular expression to match the property value against. The
gate will open if the property value matches the regex unless the
|
ServiceModelGate
- Full name :
org.jspresso.framework.model.gate.ServiceModelGate
- Super-type :
AbstractModelGate
This is a gate whose opening rules are based on an arbitrary method returning a boolean value.
Property | Description |
---|---|
accessorFactory
|
Configures the accessor factory to use to access the underlying model properties. |
context
|
Sets context. |
grantedRoles
|
Configures the roles for which the gate is installed. It supports "!" prefix to negate the role(s). |
methodName
|
Configures the model service method name to which this gate is attached. |
openOnTrue
|
This property allows to revert the standard behaviour of the gate, i.e. close when it should normally have opened and the other way around. |
ClosedGate
- Full name :
org.jspresso.framework.util.gate.ClosedGate
- Super-type :
AbstractGate
An always closed gate.
Property | Description |
---|---|
This class does not have any specific property. |
GrantedRolesGate
- Full name :
org.jspresso.framework.security.GrantedRolesGate
- Super-type :
AbstractGate
This is a role based gate. The gate depends only on the roles of the logged-in user. The difference between using a roles gate and directly assigning the granted roles on the authorized artifact, is that the gate only disables the artifact whereas the artifact granted roles prevent the artifact from being created at all.
Property | Description |
---|---|
grantedRoles
|
Configures the roles for which the gate is open. It supports "!" prefix to negate the role(s). If at least one of the role is satisfied, then the gate is open. |