[
https://issues.apache.org/jira/browse/ISIS-970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan Haywood updated ISIS-970:
-----------------------------
Description:
specifically:
{code}
@DomainObject(
auditing = ENABLED etc. (AuditingPolicy) // instead of @Audited
publishing = ENABLED etc. (PublishingPolicy) // instead of
@PublishedObject
publishingPayloadFactory = SomePayloadFactory.class // instead of
@PublishedObject(payloadFactory=...)
autoCompleteRepository = SomeRepository.class // instead of
@AutoComplete(repository=...)
autoCompleteAction = "autoComplete" // instead of
@AutoComplete(action=...)
bounded = true|false // instead of @Bounded.
takes precedence over autoComplete
editing = ENABLED etc (EditingPolicy) // instead of @Immutable
editingDisabledReason = "..." // instead of "Always
disabled" message inferred from @Immutable
objectType = "CUS" // instead of
@ObjectType
nature = JDO_ENTITY | EXTERNAL_ENTITY | VIEW_MODEL // instead of
@ViewModel, defaults to JDO_ENTITY
)
{code}
and
{code}
@Property(
interaction = ToDoItem.DueBy.class // instead of @PropertyInteraction
hidden = Where.NOWHERE etc // instead of @Hidden(where=...);
ignore the When enum
editing = ENABLED etc (EditingPolicy) // instead of @Disabled; ignore
Where and When enums
editingDisabledReason = "..." // instead of
@Disabled(reason=...)
maxLength = 20 // instead of @MaxLength; default
of -1 indicates not specified
mustSatisfy = {SomeSpecification.class} // instead of @MustSatisfy
notPersisted = true|false // instead of @NotPersisted;
defaults to false
optional = DEFAULT|TRUE|FALSE // instead of @Optional and
@Mandatory.
regexPattern = ".+\@.+" // instead of
@RegEx(validation=...)
regexPatternFlags = 1 // superset of
@RegEx(caseSensitive=...)
)
{code}
where cardinality defaults to mandatory unless Column(allowsNull="true") is set.
and
{code}
@Collection(
interaction = ToDoItem.Dependencies.class // instead of
@CollectionInteraction
hidden = Where.NOWHERE etc // instead of @Hidden(where=...);
ignore the When enum
editing = ENABLED etc (EditingPolicy) // instead of @Disabled; ignore
Where and When enums
editingDisabledReason = "..." // instead of
@Disabled(reason=...)
typeOf = OrderLine.class // instead of @TypeOf
)
{code}
and
{code}
@Action(
interaction = ToDoItem.Completed.class // instead of
@ActionInteraction
hidden = Where.NOWHERE etc // instead of
@Hidden(where=...); ignore the When enum
semantics = Semantics.SAFE etc. // instead of
@ActionSemantics
invokeOn = InvokeOn.OBJECTS_AND_COLLECTIONS // instead of @Bulk and
@Bulk(appliesTo=...)
command = ENABLED|DISABLED|AS_CONFIGURED // instead of @Command
commandPersistence = Persistence.PERSISTED // instead of
@Command(persistence=...)
commandExecuteIn = ExecuteIn.FOREGROUND // instead of
@Command(executeIn=...)
publishing = ENABLED etc. (PublishingPolicy) // instead of
@PublishedAction
publishingPayloadFactory = SomePayloadFactory.class // instead of
@PublishedAction(payloadFactory=...)
restrictTo = Environment.DEVELOPMENT // instead of @Prototype
typeOf = OrderLine.class // instead of @TypeOf
)
{code}
nb: @Disabled is no longer provided for actions (use imperative disableXxx()
method instead if required)
and
{code}
@Parameter(
maxLength = 20 // instead of @MaxLength; default
of -1 indicates not specified
minLength = 3 // instead of @MinLength
mustSatisfy = {SomeSpecification.class} // instead of @MustSatisfy
optional = DEFAULT|TRUE|FALSE // instead of @Optional and
@Mandatory.
regexPattern = ".+\@.+" // instead of
@RegEx(validation=...)
regexPatternFlags = 1 // superset of
@RegEx(caseSensitive=...)
)
{code}
for ISIS-964:
{code}
@DomainObjectLayout {
bookmarking = NEVER (BookmarkingPolicy) // instead of @BookmarkPolicy
}
{code}
and
{code}
@ActionLayout {
bookmarking = NEVER (BookmarkingPolicy) // instead of @BookmarkPolicy
}
{code}
and remove
@ActionLayout {
prototype = true|false
}
This would result in the fully supported non-deprecated Isis annotations
reducing substantially:
- @DomainService and @DomainServiceLayout
- @DomainObject and @DomainObjectLayout
- @Property and @PropertyLayout
- @Collection and @CollectionLayout
- @Action and @ActionLayout
- @Parameter and @ParameterLayout
with two further additional UI hints:
- @Title
- @MemberGroupLayout
All the above @XxxLayout annotations can instead be specified using a
.layout.json file.
The following 3rd-party annotations also supported:
- @javax.validation.constraints.Digits
- @javax.enterprise.context.RequestScoped
- @javax.jdo.annotations.*
There are also some annotations that need sorting out for contributed actions,
specifically:
- @NotContributed(As.xxx)
- @NotInServiceMenu
... for these, see ISIS-968
Also need to figure out the best way to capture the semantics of properties and
collections that are contributees (whose semantics are inferred from the
contributing action)
~~~
There are still a number of partially supported annotations, mostly pertaining
to value types and other DDD ideas). Need to decide what to do with them;
deprecate/remove or keep and fully implement? They are:
- @Value
- @Defaulted
- @Encodeable
- @EqualByContent
- @Parseable
- @Aggregated
- @NotPersistable
- @Facets
was:
specifically:
{code}
@DomainObject(
auditing = ENABLED etc. (AuditingPolicy) // instead of @Audited
publishing = ENABLED etc. (PublishingPolicy) // instead of
@PublishedObject
publishingPayloadFactory = SomePayloadFactory.class // instead of
@PublishedObject(payloadFactory=...)
autoCompleteRepository = SomeRepository.class // instead of
@AutoComplete(repository=...)
autoCompleteAction = "autoComplete" // instead of
@AutoComplete(action=...)
bounded = true|false // instead of @Bounded.
takes precedence over autoComplete
editing = ENABLED etc (EditingPolicy) // instead of @Immutable
editingDisabledReason = "..." // instead of "Always
disabled" message inferred from @Immutable
objectType = "CUS" // instead of
@ObjectType
viewModel = true|false // instead of
@ViewModel, defaults to false
)
{code}
and
{code}
@Property(
interaction = ToDoItem.DueBy.class // instead of @PropertyInteraction
hidden = Where.NOWHERE etc // instead of @Hidden(where=...);
ignore the When enum
editing = ENABLED etc (EditingPolicy) // instead of @Disabled; ignore
Where and When enums
editingDisabledReason = "..." // instead of
@Disabled(reason=...)
maxLength = 20 // instead of @MaxLength; default
of -1 indicates not specified
mustSatisfy = {SomeSpecification.class} // instead of @MustSatisfy
notPersisted = true|false // instead of @NotPersisted;
defaults to false
cardinality = DEFAULT|OPTIONAL|MANDATORY // instead of @Optional and
@Mandatory.
regexPattern = ".+\@.+" // instead of
@RegEx(validation=...)
regexPatternReplacement = "email address" // instead of @RegEx(format=...)
regexPatternFlags = 1 // superset of
@RegEx(caseSensitive=...)
)
{code}
where cardinality defaults to mandatory unless Column(allowsNull="true") is set.
and
{code}
@Collection(
interaction = ToDoItem.Dependencies.class // instead of
@CollectionInteraction
hidden = Where.NOWHERE etc // instead of @Hidden(where=...);
ignore the When enum
editing = ENABLED etc (EditingPolicy) // instead of @Disabled; ignore
Where and When enums
editingDisabledReason = "..." // instead of
@Disabled(reason=...)
typeOf = OrderLine.class // instead of @TypeOf
)
{code}
and
{code}
@Action(
interaction = ToDoItem.Completed.class // instead of
@ActionInteraction
hidden = Where.NOWHERE etc // instead of
@Hidden(where=...); ignore the When enum
semantics = Semantics.SAFE etc. // instead of
@ActionSemantics
appliesToPolicy = AppliesTo.COLLECTION // instead of @Bulk and
@Bulk(appliesTo=...)
command = ENABLED|DISABLED|AS_CONFIGURED // instead of @Command
commandPersistence = Persistence.PERSISTED // instead of
@Command(persistence=...)
commandExecuteIn = ExecuteIn.FOREGROUND // instead of
@Command(executeIn=...)
publishing = ENABLED etc. (PublishingPolicy) // instead of
@PublishedAction
publishingPayloadFactory = SomePayloadFactory.class // instead of
@PublishedAction(payloadFactory=...)
)
{code}
nb: @Disabled is no longer provided for actions (use imperative disableXxx()
method instead if required)
and
{code}
@Parameter(
minLength = 3 // instead of @MinLength
mustSatisfy = {SomeSpecification.class} // instead of @MustSatisfy
cardinality = DEFAULT|OPTIONAL|MANDATORY // instead of @Optional and
@Mandatory.
regexPattern = ".+\@.+" // instead of
@RegEx(validation=...)
regexPatternReplacement = "email address" // instead of
@RegEx(format=...)
regexPatternFlags = 1 // superset of
@RegEx(caseSensitive=...)
)
{code}
for ISIS-964:
{code}
@DomainObjectLayout {
bookmarking = NEVER (BookmarkingPolicy) // instead of @BookmarkPolicy
}
{code}
This would result in the fully supported non-deprecated Isis annotations
reducing down to just 14. The first 12 are:
- @DomainService and @DomainServiceLayout
- @DomainObject and @DomainObjectLayout
- @Property and @PropertyLayout
- @Collection and @CollectionLayout
- @Action and @ActionLayout
- @Parameter and @ParameterLayout
with two further additional UI hints:
- @Title
- @MemberGroupLayout
All the above @XxxLayout annotations can instead be specified using a
.layout.json file.
The following 3rd-party annotations also supported:
- @javax.validation.constraints.Digits
- @javax.enterprise.context.RequestScoped
- @javax.jdo.annotations.*
~~~
There are still a number of partially supported annotations, mostly pertaining
to value types and other DDD ideas). Need to decide what to do with them;
deprecate/remove or keep and fully implement? They are:
- @Value
- @Defaulted
- @Encodeable
- @EqualByContent
- @Parseable
- @Aggregated
- @NotPersistable
- @Facets
> Introduce new annotations to collect together all non-UI (layout) hints, and
> deprecate old annotations
> ------------------------------------------------------------------------------------------------------
>
> Key: ISIS-970
> URL: https://issues.apache.org/jira/browse/ISIS-970
> Project: Isis
> Issue Type: Improvement
> Components: Core
> Affects Versions: core-1.7.0
> Reporter: Dan Haywood
> Assignee: Dan Haywood
> Fix For: core-1.8.0
>
>
> specifically:
> {code}
> @DomainObject(
> auditing = ENABLED etc. (AuditingPolicy) // instead of @Audited
> publishing = ENABLED etc. (PublishingPolicy) // instead of
> @PublishedObject
> publishingPayloadFactory = SomePayloadFactory.class // instead of
> @PublishedObject(payloadFactory=...)
> autoCompleteRepository = SomeRepository.class // instead of
> @AutoComplete(repository=...)
> autoCompleteAction = "autoComplete" // instead of
> @AutoComplete(action=...)
> bounded = true|false // instead of
> @Bounded. takes precedence over autoComplete
> editing = ENABLED etc (EditingPolicy) // instead of
> @Immutable
> editingDisabledReason = "..." // instead of "Always
> disabled" message inferred from @Immutable
> objectType = "CUS" // instead of
> @ObjectType
> nature = JDO_ENTITY | EXTERNAL_ENTITY | VIEW_MODEL // instead of
> @ViewModel, defaults to JDO_ENTITY
> )
> {code}
> and
> {code}
> @Property(
> interaction = ToDoItem.DueBy.class // instead of
> @PropertyInteraction
> hidden = Where.NOWHERE etc // instead of
> @Hidden(where=...); ignore the When enum
> editing = ENABLED etc (EditingPolicy) // instead of @Disabled; ignore
> Where and When enums
> editingDisabledReason = "..." // instead of
> @Disabled(reason=...)
> maxLength = 20 // instead of @MaxLength;
> default of -1 indicates not specified
> mustSatisfy = {SomeSpecification.class} // instead of @MustSatisfy
> notPersisted = true|false // instead of @NotPersisted;
> defaults to false
> optional = DEFAULT|TRUE|FALSE // instead of @Optional and
> @Mandatory.
> regexPattern = ".+\@.+" // instead of
> @RegEx(validation=...)
> regexPatternFlags = 1 // superset of
> @RegEx(caseSensitive=...)
> )
> {code}
> where cardinality defaults to mandatory unless Column(allowsNull="true") is
> set.
> and
> {code}
> @Collection(
> interaction = ToDoItem.Dependencies.class // instead of
> @CollectionInteraction
> hidden = Where.NOWHERE etc // instead of
> @Hidden(where=...); ignore the When enum
> editing = ENABLED etc (EditingPolicy) // instead of @Disabled; ignore
> Where and When enums
> editingDisabledReason = "..." // instead of
> @Disabled(reason=...)
> typeOf = OrderLine.class // instead of @TypeOf
> )
> {code}
> and
> {code}
> @Action(
> interaction = ToDoItem.Completed.class // instead of
> @ActionInteraction
> hidden = Where.NOWHERE etc // instead of
> @Hidden(where=...); ignore the When enum
> semantics = Semantics.SAFE etc. // instead of
> @ActionSemantics
> invokeOn = InvokeOn.OBJECTS_AND_COLLECTIONS // instead of @Bulk
> and @Bulk(appliesTo=...)
> command = ENABLED|DISABLED|AS_CONFIGURED // instead of @Command
> commandPersistence = Persistence.PERSISTED // instead of
> @Command(persistence=...)
> commandExecuteIn = ExecuteIn.FOREGROUND // instead of
> @Command(executeIn=...)
> publishing = ENABLED etc. (PublishingPolicy) // instead of
> @PublishedAction
> publishingPayloadFactory = SomePayloadFactory.class // instead of
> @PublishedAction(payloadFactory=...)
> restrictTo = Environment.DEVELOPMENT // instead of
> @Prototype
> typeOf = OrderLine.class // instead of @TypeOf
> )
> {code}
> nb: @Disabled is no longer provided for actions (use imperative disableXxx()
> method instead if required)
> and
> {code}
> @Parameter(
> maxLength = 20 // instead of @MaxLength;
> default of -1 indicates not specified
> minLength = 3 // instead of @MinLength
> mustSatisfy = {SomeSpecification.class} // instead of @MustSatisfy
> optional = DEFAULT|TRUE|FALSE // instead of @Optional and
> @Mandatory.
> regexPattern = ".+\@.+" // instead of
> @RegEx(validation=...)
> regexPatternFlags = 1 // superset of
> @RegEx(caseSensitive=...)
> )
> {code}
> for ISIS-964:
> {code}
> @DomainObjectLayout {
> bookmarking = NEVER (BookmarkingPolicy) // instead of @BookmarkPolicy
> }
> {code}
> and
> {code}
> @ActionLayout {
> bookmarking = NEVER (BookmarkingPolicy) // instead of @BookmarkPolicy
> }
> {code}
> and remove
> @ActionLayout {
> prototype = true|false
> }
> This would result in the fully supported non-deprecated Isis annotations
> reducing substantially:
> - @DomainService and @DomainServiceLayout
> - @DomainObject and @DomainObjectLayout
> - @Property and @PropertyLayout
> - @Collection and @CollectionLayout
> - @Action and @ActionLayout
> - @Parameter and @ParameterLayout
> with two further additional UI hints:
> - @Title
> - @MemberGroupLayout
> All the above @XxxLayout annotations can instead be specified using a
> .layout.json file.
> The following 3rd-party annotations also supported:
> - @javax.validation.constraints.Digits
> - @javax.enterprise.context.RequestScoped
> - @javax.jdo.annotations.*
> There are also some annotations that need sorting out for contributed
> actions, specifically:
> - @NotContributed(As.xxx)
> - @NotInServiceMenu
> ... for these, see ISIS-968
> Also need to figure out the best way to capture the semantics of properties
> and collections that are contributees (whose semantics are inferred from the
> contributing action)
> ~~~
> There are still a number of partially supported annotations, mostly
> pertaining to value types and other DDD ideas). Need to decide what to do
> with them; deprecate/remove or keep and fully implement? They are:
> - @Value
> - @Defaulted
> - @Encodeable
> - @EqualByContent
> - @Parseable
> - @Aggregated
> - @NotPersistable
> - @Facets
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)