= Applib
:page-role: -toc -narrow


:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

include::../section-hooks/isis.applib~pre.adoc[]

[cols="3a,2a,5a", options="header"]
|===
|Property
|Default
|Description
|
[[isis.applib.annotation.action-layout.css-class-fa.patterns]]
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-fa.patterns-as-map]]
isis.applib.annotation. +
action-layout.css-class-fa. +
patterns-as-map

| 
| null


|
[[isis.applib.annotation.action-layout.css-class.patterns]]
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-layout.css-class.patterns-as-map]]
isis.applib.annotation. +
action-layout.css-class. +
patterns-as-map

| 
| null


|
[[isis.applib.annotation.action.command-publishing]]
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 ``CommandSubscriber``s, 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]]
isis.applib.annotation.action. +
domain-event.post-for-default

| 
| 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]]
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.collection-layout.default-view]]
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]]
isis.applib.annotation. +
collection-layout.paged

| 
| 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]]
isis.applib.annotation.collection. +
domain-event.post-for-default

| 
| 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]]
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]]
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]]
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]]
isis.applib.annotation. +
domain-object-layout.paged

| 
| 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]]
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]]
isis.applib.annotation. +
domain-object. +
created-lifecycle-event. +
post-for-default

| 
| 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]]
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]]
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 ``EntityChangesSubscriber``s 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]]
isis.applib.annotation. +
domain-object. +
loaded-lifecycle-event. +
post-for-default

| 
| 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]]
isis.applib.annotation. +
domain-object. +
persisted-lifecycle-event. +
post-for-default

| 
| 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]]
isis.applib.annotation. +
domain-object. +
persisting-lifecycle-event. +
post-for-default

| 
| 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]]
isis.applib.annotation. +
domain-object. +
removing-lifecycle-event. +
post-for-default

| 
| 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]]
isis.applib.annotation. +
domain-object. +
updated-lifecycle-event. +
post-for-default

| 
| 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]]
isis.applib.annotation. +
domain-object. +
updating-lifecycle-event. +
post-for-default

| 
| 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]]
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]]
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]]
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 ``CommandSubscriber``s, 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]]
isis.applib.annotation.property. +
domain-event.post-for-default

| 
| 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]]
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]]
isis.applib.annotation. +
view-model-layout. +
css-class-ui-event. +
post-for-default

| 
| 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]]
isis.applib.annotation. +
view-model-layout.icon-ui-event. +
post-for-default

| 
| 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]]
isis.applib.annotation. +
view-model-layout.layout-ui-event. +
post-for-default

| 
| 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]]
isis.applib.annotation. +
view-model-layout.title-ui-event. +
post-for-default

| 
| 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]]
isis.applib.annotation.view-model. +
validation.semantic-checking. +
enable

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



|===

include::../section-hooks/isis.applib~post.adoc[]
