Applib

Default configuration for applib annotations.

Property Default Description

causeway.applib.annotation.
action-layout.css-class-fa.
patterns

[all.:fa-solid fa-list, list.
*:fa-solid fa-list, find.
*:fa-search, lookup.
*:fa-search, search.
*:fa-search, send.
*:fa-regular fa-paper-plane, open.
*:fa-solid fa-arrow-up-right-from-
square, close.
*:fa-solid fa-regular fa-rectangle-
xmark, recent.
*:fa-solid fa-clock-rotate-
left, lock.
*:fa-solid fa-lock, unlock.
*:fa-solid fa-unlock, permit.
*:fa-solid fa-unlock, review.
*:fa-solid fa-eye, add.
*:fa-regular fa-square-plus, plus.
*:fa-regular fa-square-
plus, remove.
*:fa-regular fa-square-
minus, minus.
*:fa-regular fa-square-minus, sign.
*:fa-solid fa-signature, clear.
*:fa-solid fa-broom, create.
*:fa-regular fa-square-plus, new.
*:fa-regular fa-square-
plus, delete.
*:fa-solid fa-trash, change.
*:fa-regular fa-pen-to-
square, edit.
*:fa-regular fa-pen-to-
square, maintain.
*:fa-regular fa-pen-to-
square, update.
*:fa-regular fa-pen-to-square, cut.
*:fa-solid fa-scissors, move.
*:fa-solid fa-angles-right, copy.
*:fa-regular fa-copy, duplicate.
*:fa-solid fa-clone, clone.
*:fa-solid fa-clone, categorise.
*:fa-regular fa-folder-
open, download.
*:fa-solid fa-download, upload.
*:fa-solid fa-upload, execute.
*:fa-solid fa-bolt, run.
*:fa-solid fa-bolt, trigger.
*:fa-solid fa-bolt, link.
*:fa-solid fa-link, unlink.
*:fa-solid fa-link-slash, start.
*:fa-solid fa-play, play.
*:fa-solid fa-play, resume.
*:fa-solid fa-play, pause.
*:fa-solid fa-pause, suspend.
*:fa-solid fa-pause, stop.
*:fa-solid fa-stop, terminate.
*:fa-solid fa-stop, previous.
*:fa-backward-step, next.
*:fa-forward-step, approve.
*:fa-regular fa-thumbs-up, reject.
*:fa-regular fa-thumbs-
down, verify.
*:fa-solid fa-check, decline.
*:fa-solid fa-xmark, cancel.
*:fa-solid fa-xmark, discard.
*:fa-regular fa-trash-can, assign.
*:fa-regular fa-hand-point-
right, calculate.
*:fa-calculator, import.
*:fa-solid fa-file-import, export.
*:fa-solid fa-file-export, first.
*:fa-regular fa-star, install.
*:fa-solid fa-wrench, setup.
*:fa-solid fa-gear, configure.
*:fa-solid fa-gear, refresh.
*:fa-sync, renew.
*:fa-rotate-right, reset.
*:fa-rotate-left, save.
*:fa-regular fa-floppy-
disk, switch.
:fa-exchange, random.
*:fa-shuffle, view.
*:fa-regular fa-eye, wizard.
*:fa-solid fa-wand-magic-sparkles]

Provides a mapping of patterns to font-awesome CSS classes, where the pattern is used to match against the name of the action method in order to determine a CSS class to use, for example on the action’s menu icon if rendered by the Wicket viewer.

Providing a default set of patterns encourages a common set of verbs to be used.

The font awesome class for individual actions can be overridden using ActionLayout#cssClassFa().

causeway.applib.annotation.
action-layout.css-class-fa.
patterns-as-map

null

causeway.applib.annotation.
action-layout.css-class.patterns

[add.:btn-info, remove.
*:btn-warning, start.
*:btn-info, play.
:btn-info, stop.
:btn-warning, reset.
*:btn-warning, new.
*:btn-info, create.
*:btn-info, delete.
*:btn-danger, verify.
*:btn-success, decline.
*:btn-danger, save.
*:btn-success, approve.
*:btn-success, reject.
:btn-danger]

Provides a mapping of patterns to CSS classes, where the pattern is used to match against the name of the action method in order to determine a CSS class to use, for example on the action’s button if rendered by the Wicket viewer.

Providing a default set of patterns encourages a common set of verbs to be used.

The CSS class for individual actions can be overridden using ActionLayout#cssClass().

causeway.applib.annotation.
action-layout.css-class.
patterns-as-map

null

causeway.applib.annotation.action.
command-publishing

The default for whether action invocations should be reified as a Command, to be sent to any registered CommandSubscribers, typically for auditing purposes.

This setting can be overridden on a case-by-case basis using Action#commandPublishing().

causeway.applib.annotation.action.
domain-event.post-for-default

true

Influences whether an ActionDomainEvent should be published (on the internal EventBusService) whenever an action is being interacted with.

Up to five different events can be fired during an interaction, with the event’s phase determining which (hide, disable, validate, executing and executed). Subscribers can influence the behaviour at each of these phases.

The algorithm for determining whether (and what type of) an event is actually sent depends on the value of the Action#domainEvent() for the action in question

  • If set to some subtype of ActionDomainEvent.Noop, then no event is sent.

  • If set to some subtype of ActionDomainEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

causeway.applib.annotation.action.
execution-publishing

The default for whether action invocations should be sent through to the ExecutionSubscriber for publishing.

The service’s onExecution method is called only once per transaction, with Execution collecting details of the identity of the target object, the action invoked, the action arguments and the returned object (if any).

This setting can be overridden on a case-by-case basis using Action#executionPublishing() Action#executionPublishing().

causeway.applib.annotation.
collection-layout.default-view

Defines the initial view to display collections when rendered.

The value of this can be overridden on a case-by-case basis using CollectionLayout#defaultView(). Note that this default configuration property is an enum and so defines only a fixed number of values, whereas the annotation returns a string; this is to allow for flexibility that individual viewers might support their own additional types. For example, the Wicket viewer supports

causeway.applib.annotation.
collection-layout.paged

12

Defines the default number of objects that are shown in a "parented" collection of a domain object, result of invoking an action.

This can be overridden on a case-by-case basis using CollectionLayout#paged().

causeway.applib.annotation.
collection-layout.
sequence-policy-if-unreferenced

How CollectionLayout#sequence() should be handled when calculating the slot-in order for unreferenced Collections. \{@code AS_PER_SEQUENCE} will use Dewey order based on available 'sequence' attributes, whereas \{@code ALPHABETICALLY} will use alphabetical order based on member names.

default: \{@code AS_PER_SEQUENCE}

causeway.applib.annotation.
collection-layout.table-decorator

Defines whether the table representation of a collection should be decorated using a client-side Javascript library, eg for client-side paging and filtering.

causeway.applib.annotation.
collection.domain-event.
post-for-default

true

Influences whether an CollectionDomainEvent should be published (on the internal EventBusService) whenever a collection is being interacted with.

Up to two different events can be fired during an interaction, with the event’s phase determining which (hide, disable)Subscribers can influence the behaviour at each of these phases.

The algorithm for determining whether (and what type of) an event is actually sent depends on the value of the Collection#domainEvent() for the collection action in question:

  • If set to some subtype of CollectionDomainEvent.Noop, then no event is sent.

  • If set to some subtype of CollectionDomainEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

causeway.applib.annotation.
domain-object-layout.
css-class-ui-event.
post-for-default

Influences whether an CssClassUiEvent should be published (on the internal EventBusService) whenever a domain object is about to be rendered in the UI - thereby allowing subscribers to optionally CssClassUiEvent#setCssClass(String) change) the CSS classes that are used.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObjectLayout#cssClassUiEvent() @DomainObjectLayout(cssClassEvent=…​)} for the domain object in question.

  • If set to some subtype of CssClassUiEvent.Noop, then no event is sent.

  • If set to some subtype of CssClassUiEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

The default is false, because otherwise the mere presence of @DomainObjectLayout (perhaps for some attribute other than this one) will cause any imperative cssClass() method to be ignored.

causeway.applib.annotation.
domain-object-layout.icon-ui-event.
post-for-default

Influences whether an IconUiEvent should be published (on the internal EventBusService) whenever a domain object is about to be rendered in the UI - thereby allowing subscribers to optionally IconUiEvent#setIconName(String) change) the icon that is used.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObjectLayout#iconUiEvent() @DomainObjectLayout(iconEvent=…​)} for the domain object in question.

  • If set to some subtype of IconUiEvent.Noop, then no event is sent.

  • If set to some subtype of IconUiEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

The default is false, because otherwise the mere presence of @DomainObjectLayout (perhaps for some attribute other than this one) will cause any imperative iconName() method to be ignored.

causeway.applib.annotation.
domain-object-layout.
layout-ui-event.post-for-default

Influences whether an LayoutUiEvent should be published (on the internal EventBusService) whenever a domain object is about to be rendered in the UI - thereby allowing subscribers to optionally LayoutUiEvent#setLayout(String) change) the layout that is used.

If a different layout value has been set, then a layout in the form xml use used (where zzz is the name of the layout).

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObjectLayout#layoutUiEvent() @DomainObjectLayout(layoutEvent=…​)} for the domain object in question.

  • If set to some subtype of LayoutUiEvent.Noop, then no event is sent.

  • If set to some subtype of LayoutUiEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

The default is false, because otherwise the mere presence of @DomainObjectLayout (perhaps for some attribute other than this one) will cause any imperative layout() method to be ignored.

causeway.applib.annotation.
domain-object-layout.paged

25

Defines the default number of objects that are shown in a "standalone" collection obtained as the result of invoking an action.

This can be overridden on a case-by-case basis using DomainObjectLayout#paged().

causeway.applib.annotation.
domain-object-layout.
table-decorator

Defines whether the table representation of a standalone collection of this domain class should be decorated using a client-side Javascript library, eg for client-side paging and filtering.

causeway.applib.annotation.
domain-object-layout.
title-ui-event.post-for-default

Influences whether an TitleUiEvent should be published (on the internal EventBusService) whenever a domain object is about to be rendered in the UI - thereby allowing subscribers to optionally TitleUiEvent#setTitle(String) change) the title that is used.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObjectLayout#titleUiEvent() @DomainObjectLayout(titleEvent=…​)} for the domain object in question.

  • If set to some subtype of TitleUiEvent.Noop, then no event is sent.

  • If set to some subtype of TitleUiEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

The default is false, because otherwise the mere presence of @DomainObjectLayout (perhaps for some attribute other than this one) will cause any imperative title() method to be ignored.

causeway.applib.annotation.
domain-object.
created-lifecycle-event.
post-for-default

true

Influences whether an ObjectCreatedEvent should be published (on the internal EventBusService) whenever a domain object has been created using FactoryService.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObject#createdLifecycleEvent() @DomainObject(createdLifecycleEvent=…​) for the domain object in question.

  • If set to some subtype of ObjectCreatedEvent.Noop, then no event is sent.

  • If set to some subtype of ObjectCreatedEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

causeway.applib.annotation.
domain-object.editing

The default for whether the properties of domain objects can be edited, or whether instead they can be modified only using actions (or programmatically as a side-effect of actions on other objects).

This setting can be overridden on a case-by-case basis using DomainObject#getEditing() DomainObject#getEditing()

causeway.applib.annotation.
domain-object.
entity-change-publishing

The default for whether domain entities should be audited or not (meaning that any changes are sent through to EntityChangesSubscribers and sent through to EntityPropertyChangeSubscriber.

This setting can be overridden on a case-by-case basis using DomainObject#entityChangePublishing()

Note: this applies only to domain entities, not view models.

causeway.applib.annotation.
domain-object.
loaded-lifecycle-event.
post-for-default

true

Influences whether an ObjectLoadedEvent should be published (on the internal EventBusService) whenever a domain entity has been loaded from the persistence store.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObject#loadedLifecycleEvent() @DomainObject(loadedLifecycleEvent=…​) for the domain object in question.

  • If set to some subtype of ObjectLoadedEvent.Noop, then no event is sent.

  • If set to some subtype of ObjectCreatedEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

Note: this applies only to domain entities, not to view models.

causeway.applib.annotation.
domain-object.
persisted-lifecycle-event.
post-for-default

true

Influences whether an ObjectPersistedEvent should be published (on the internal EventBusService) whenever a domain entity has been persisted (for the first time) to the persistence store.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObject#persistedLifecycleEvent() @DomainObject(persistedLifecycleEvent=…​) for the domain object in question.

  • If set to some subtype of ObjectPersistedEvent.Noop, then no event is sent.

  • If set to some subtype of ObjectCreatedEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

Note: this applies only to domain entities, not to view models.

causeway.applib.annotation.
domain-object.
persisting-lifecycle-event.
post-for-default

true

Influences whether an ObjectPersistingEvent should be published (on the internal EventBusService) whenever a domain entity is about to be persisting (for the first time) to the persistence store.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObject#persistingLifecycleEvent() @DomainObject(persistingLifecycleEvent=…​) for the domain object in question.

  • If set to some subtype of ObjectPersistingEvent.Noop, then no event is sent.

  • If set to some subtype of ObjectCreatedEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

Note: this applies only to domain entities, not to view models.

causeway.applib.annotation.
domain-object.
removing-lifecycle-event.
post-for-default

true

Influences whether an ObjectRemovingEvent should be published (on the internal EventBusService) whenever a persistent domain entity is about to be removed (that is, deleted) from the persistence store.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObject#removingLifecycleEvent() @DomainObject(removingLifecycleEvent=…​) for the domain object in question.

  • If set to some subtype of ObjectRemovingEvent.Noop, then no event is sent.

  • If set to some subtype of ObjectCreatedEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

Note: this applies only to domain entities, not to view models.

Note: There is no corresponding removed callback, because (for the JDO persistence store at least) it is not possible to interact with a domain entity once it has been deleted.

causeway.applib.annotation.
domain-object.
updated-lifecycle-event.
post-for-default

true

Influences whether an ObjectUpdatedEvent should be published (on the internal EventBusService) whenever a persistent domain entity has been updated in the persistence store.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObject#updatedLifecycleEvent() @DomainObject(updatedLifecycleEvent=…​) for the domain object in question.

  • If set to some subtype of ObjectUpdatedEvent.Noop, then no event is sent.

  • If set to some subtype of ObjectCreatedEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

Note: this applies only to domain entities, not to view models.

causeway.applib.annotation.
domain-object.
updating-lifecycle-event.
post-for-default

true

Influences whether an ObjectUpdatingEvent should be published (on the internal EventBusService) whenever a persistent domain entity is about to be updated in the persistence store.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObject#updatingLifecycleEvent() @DomainObject(updatingLifecycleEvent=…​) for the domain object in question.

  • If set to some subtype of ObjectUpdatingEvent.Noop, then no event is sent.

  • If set to some subtype of ObjectCreatedEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

Note: this applies only to domain entities, not to view models.

causeway.applib.annotation.
parameter-layout.label-position

Defines the default position for the label for an action parameter.

Can be overridden on a case-by-case basis using ParameterLayout#labelPosition().

If left as LabelPosition#NOT_SPECIFIED and not overridden, then the position depends upon the viewer implementation.

causeway.applib.annotation.
parameter.
preceding-parameters-policy

Whether parameters should be reset to their default if an earlier parameter changes its value, or whether instead a parameter value, once changed by the end-user, should never be overwritten even if the end-user changes an earlier parameter value.

This setting can be overridden on a case-by-case basis using Parameter#precedingParamsPolicy() Parameter#precedingParametersPolicy().

causeway.applib.annotation.
property-layout.label-position

Defines the default position for the label for a domain object property.

Can be overridden on a case-by-case basis using ParameterLayout#labelPosition().

If left as LabelPosition#NOT_SPECIFIED and not overridden, then the position depends upon the viewer implementation.

causeway.applib.annotation.
property-layout.
sequence-policy-if-unreferenced

How PropertyLayout#sequence() should be handled when calculating the slot-in order for unreferenced Properties. \{@code AS_PER_SEQUENCE} will use Dewey order based on available 'sequence' attributes, whereas \{@code ALPHABETICALLY} will use alphabetical order based on member names.

default: \{@code AS_PER_SEQUENCE}

causeway.applib.annotation.
property.command-publishing

The default for whether property edits should be reified as a Command, to be sent to any registered CommandSubscribers, either for auditing or for replayed against a secondary system, eg for regression testing.

This setting can be overridden on a case-by-case basis using Property#commandPublishing().

causeway.applib.annotation.
property.domain-event.
post-for-default

true

Influences whether an PropertyDomainEvent should be published (on the internal EventBusService) whenever an property is being interacted with.

Up to five different events can be fired during an interaction, with the event’s phase determining which (hide, disable, validate, executing and executed). Subscribers can influence the behaviour at each of these phases.

The algorithm for determining whether (and what type of) an event is actually sent depends on the value of the Property#domainEvent() for the property in question:

  • If set to some subtype of propertyDomainEvent.Noop, then no event is sent.

  • If set to some subtype of propertyDomainEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

causeway.applib.annotation.
property.execution-publishing

The default for whether property edits should be sent through to the ExecutionSubscriber for publishing.

The service’s ExecutionSubscriber#onExecution(Execution) publish} method is called only once per transaction, with Execution collecting details of the identity of the target object, the property edited, and the new value of the property.

This setting can be overridden on a case-by-case basis using Property#executionPublishing().

causeway.applib.annotation.
view-model-layout.
css-class-ui-event.
post-for-default

true

Influences whether an CssClassUiEvent should be published (on the internal EventBusService) whenever a view model (annotated with @DomainObject#nature of Nature#VIEW_MODEL) is about to be rendered in the UI - thereby allowing subscribers to optionally CssClassUiEvent#setCssClass(String) change) the CSS classes that are used.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObjectLayout#cssClassUiEvent() @DomainObjectLayout(cssClassEvent=…​) for the domain object in question:

  • If set to some subtype of CssClassUiEvent.Noop, then no event is sent.

  • If set to some subtype of CssClassUiEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

causeway.applib.annotation.
view-model-layout.icon-ui-event.
post-for-default

true

Influences whether an IconUiEvent should be published (on the internal EventBusService) whenever a view model (annotated with @DomainObject#nature of Nature#VIEW_MODEL) is about to be rendered in the UI - thereby allowing subscribers to optionally IconUiEvent#setIconName(String) change) the icon that is used.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObjectLayout#iconUiEvent() @ViewModelLayout(iconEvent=…​) for the domain object in question:

  • If set to some subtype of IconUiEvent.Noop, then no event is sent.

  • If set to some subtype of IconUiEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

causeway.applib.annotation.
view-model-layout.layout-ui-event.
post-for-default

true

Influences whether an LayoutUiEvent should be published (on the internal EventBusService) whenever a view model (annotated with @DomainObject#nature of Nature#VIEW_MODEL) is about to be rendered in the UI - thereby allowing subscribers to optionally LayoutUiEvent#setLayout(String) change) the layout that is used.

If a different layout value has been set, then a layout in the form xml use used (where zzz is the name of the layout).

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObjectLayout#layoutUiEvent() @DomainObjectLayout(layoutEvent=…​) for the domain object in question:

  • If set to some subtype of LayoutUiEvent.Noop, then no event is sent.

  • If set to some subtype of LayoutUiEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

causeway.applib.annotation.
view-model-layout.title-ui-event.
post-for-default

true

Influences whether an TitleUiEvent should be published (on the internal EventBusService) whenever a view model (annotated with @DomainObject#nature of Nature#VIEW_MODEL) is about to be rendered in the UI - thereby allowing subscribers to optionally TitleUiEvent#setTitle(String) change) the title that is used.

The algorithm for determining whether (and what type of) an event is sent depends on the value of the DomainObjectLayout#titleUiEvent() @DomainObjectLayout(titleEvent=…​) for the domain object in question:

  • If set to some subtype of TitleUiEvent.Noop, then no event is sent.

  • If set to some subtype of TitleUiEvent.Default, then an event is sent if and only if this configuration setting is set.

  • If set to any other subtype, then an event is sent.

causeway.applib.annotation.
view-model.validation.
semantic-checking.enable

Whether to check for inconsistencies between the usage of DomainObject and DomainObjectLayout.

Events

Note:

  • In order for the lifecycle events to fire (persisting, loaded etc) the class must be annotated using @DomainObject (even if no attributes on that annotation are set).

  • Similarly, for UI events to fire (title, icon etc) the class must be annotated using @DomainObjectLayout (even if no attributes on that annotation are set).

  • Similarly, for domain events to fire (title, icon etc) the action/property/collection must be annotated using the appropriate @XxxLayout (even if no attributes on that annotation are set).

Non-editable Objects

The causeway.applib.annotation.domain-object.editing configuration property determines whether properties can be edited or not. By default it is disabled:

causeway.applib.annotation.domain-object.editing=false

We recommend leaving this at its default, and only selectively enabling property editing where there are likely to be no business rules, such as "notes" or "comments" properties. Doing so will help drive out the underlying business operations (processes and procedures) that require objects to change; these can then be captured as actions.