Applib

Default configuration for applib annotations.

Property Default Description

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

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().

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

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().

isis.applib.annotation.action.
command-publishing

TODO[2464] semantic renaming audit/dispatch → publishing The default for whether action invocations 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 Action#commandPublishing().

isis.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.

isis.applib.annotation.action.
execution-publishing

TODO[2464] semantic renaming audit/dispatch → publishing The default for whether action invocations should be sent through to the ExecutionSubscriber for publishing.

The service’s publish 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#executionDispatch().

isis.applib.annotation.action.
explicit

Whether or not a public method needs to be annotated with @Action in order to be picked up as an action in the metamodel.

isis.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

isis.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().

isis.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.

isis.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.

isis.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.

isis.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.

isis.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().

isis.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.

isis.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=…​) 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.

isis.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()

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

TODO[2464] semantic renaming audit/dispatch → 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.

isis.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=…​) 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.

isis.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=…​) 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.

isis.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=…​) 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.

isis.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=…​) 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.

isis.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=…​) 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.

isis.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=…​) 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.

isis.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.

isis.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.

isis.applib.annotation.property.
command-publishing

TODO[2464] semantic renaming audit/dispatch → 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#commandDispatch().

isis.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.

isis.applib.annotation.property.
execution-publishing

TODO[2464] semantic renaming audit/dispatch → publishing The default for whether property edits should be sent through to the ExecutionSubscriber for publishing.

The service’s 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#publishing().

isis.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 @ViewModel) 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 ViewModelLayout#cssClassUiEvent() @ViewModelLayout(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.

isis.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 @ViewModel) 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 ViewModelLayout#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.

isis.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 @ViewModel) 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 ViewModelLayout#layoutUiEvent() @ViewModelLayout(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.

isis.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 @ViewModel) 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 ViewModelLayout#titleUiEvent() @ViewModelLayout(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.

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

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

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 isis.applib.annotation.domain-object.editing configuration property determines whether properties can be edited or not. By default it is disabled:

isis.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.