From v1.16.x to 2.0.0-M1
Meta annotations
Most of the Apache Isis annotations can now be associated with meta-annotations. Coupled with the fact that DataNucleus 5.x also supports meta annotations, this therefore allows a degree of reuse.
For example, instead of:
@Column(length=30)
@Property(regex=...)
@Getter @Setter
private String name;
public Customer updateName(
@Parameter(maxLength=30, regex=...)
String name ) {
setName(name);
}
we can instead define a @Name
annotation:
@Column(length=30)
@Property(regex=...)
@Parameter(maxLength=30, regex=...)
public @interface @Name {}
and then use this annotation:
@Name
@Getter @Setter
private String name;
public Customer updateName(
@Name
String name ) {
setName(name);
}
The full list of Apache Isis annotations that can be used in meta-annotations is shown in the table below.
Domain layer | UI layer | |
---|---|---|
domain service |
||
domain object |
||
Action |
||
action parameter |
||
property |
||
collection |
Updated annotations
Prior to v2.0.0, several annotation attributes were defined as booleans.
In order to support meta annotations, these have been replaced by enums which also include a NOT_SPECIFIED
value.
Other enums have been extended (where necessary) to also have a NOT_SPECIFIED
value.
In all cases NOT_SPECIFIED
is the new default.
Annotation | Updated attribute | Nature of change |
---|---|---|
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Replaces |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Replaces |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Replaces |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Default changed from |
||
Replaces |
||
Replaces |
||
Removed annotations/attributes
The following annotations, or attributes of annotations, have been removed
Annotation | Attribute | Use instead |
---|---|---|
|
|
Removed, use the simpler PublisherService SPI instead. |
|
||
|
||
|
Never implemented internally in Isis 1.x so no replacement. |
|
|
||
|
||
|
||
|
||
|
||
|
||
|
Similarly, the |
|
|
|
Removed, no replacement. |
|
||
|
|
|
|
||
|
||
|
||
|
||
|
||
|
||
|
|
Deleted (was a boolean attribute), replaced by @Property#bounding |
|
Removed, use the simpler PublisherService SPI instead. |
|
|
||
|
||
|
For actions by either @Action#hidden() or @ActionLayout#hidden(), for properties by either @Property#hidden() or @PropertyLayout#hidden(), for collections by either @Collection#hidden() or @CollectionLayout#hidden(). |
|
|
||
|
||
|
||
|
Either @Property#optionality() or @Parameter#optionality(). For properties, can also use @Column#allowsNull() Can also use @Nullable for either properties or parameters. |
|
|
Removed, never implemented internally in Isis 1.x so no replacement. |
|
|
Either @Property#maxLength() or @Parameter#maxLength(). For properties, can also use @Column#length() |
|
|
.layout.xml file instead. |
|
|
||
|
Either @Property#mustSatisfy() or @Parameter#mustSatisfy(). |
|
|
||
|
Either @Property#optionality() or @Parameter#optionality(). For properties, can also use @Column#allowsNull() Can also use @Nullable for either properties or parameters. |
|
|
||
|
Specify nature of |
|
|
Specify nature of |
|
|
Never implemented internally in Isis 1.x so no replacement. |
|
|
Alternatively, for domain entities either:
|
|
|
|
Never implemented internally in Isis 1.x so no replacement. Note that the @MinLength annotation is for use with autocomplete supporting methods (specifying the minimum number of characters to enter before an auto-complete search is performed). |
|
Either @CollectionLayout#paged() (for parented collections), or @DomainObject#paged() (for standalone collections) |
|
|
renderedAsDayBefore |
Deleted (was a boolean attribute), replaced by @ParameterLayout#renderDay. |
|
||
|
||
|
||
|
||
|
||
|
|
Removed, replaced with @Property#snapshot() |
|
||
|
|
Deleted (was a boolean attribute), replaced by @PropertyLayout#renderDay. |
|
Deleted (was a boolean attribute), replaced by @PropertyLayout#repainting. |
|
|
||
|
Removed, use @Action#publishing() |
|
|
Removed, use @DomainObject#publishing() |
|
|
Removed, use the simpler PublisherService SPI instead. |
|
|
Removed, use the simpler PublisherService SPI instead. |
|
|
||
|
||
|
Supporting |
|
|
Either @Property#renderDay() or @Parameter#renderDay(). |
|
|
||
|
||
|
Either @CollectionLayout#typeOf() (for parented collections), or @ActionLayout#typeOf() (for actions returning a standalone collection). |
|
|
Moved types
The following applib types have been moved.
Description | Type(s) | From | To |
---|---|---|---|
Events emitted by |
|
|
|
Interface types for mixins |
|
|
|
|
|
|
|
Lifecycle events, domain events & UI events |
|
o.a.i.applib.services.eventbus |
|
Removed configuration properties
The following configuration properties are no longer recognised.
Configuration property | Description |
---|---|
|
|
Updated classes
The following classes have been updated.
Updated class | Method | Nature of change |
---|---|---|
|
N-arg constructor |
removed; just use the 0-arg ones |
|
N-arg constructor |
removed; just use the 0-arg ones |
|
N-arg constructor |
removed; just use the 0-arg ones |
|
|
Removed; this shouldn’t have had public visibility. |
|
|
All removed or no longer public; use |
|
|
Removed; use |
|
|
Removed; use |
|
deprecated constructors |
Removed |
|
|
Removed, use |
Removed types
Adapter classes
The following adapter classes have been removed.
Removed class | Replaced with |
---|---|
|
No replacement. |
|
No replacement. |
|
No replacement. |
|
No replacement. |
Filter classes/interfaces
Also, all classes and interfaces in org.apache.isis.applib.filter
have been removed.
Instead, the java.util.Predicate<T>
interface is used.
For example, RepositoryService#allMatches(…)
method, which allows client-side filtering of results (typically during prototyping), now has the signature:
public interface RepositoryService {
...
<T> List<T> allMatches(
final Class<T> ofType,
final Predicate<? super T> predicate,
long... range);
}
Removed interfaces
The following interfaces have been removed.
Removed interface | Replaced with |
---|---|
|
|
|
|
|
Never implemented internally in Isis 1.x so no replacement. |
|
Never implemented fully in Isis 1.x so no replacement. |
|
Never implemented fully in Isis 1.x so no replacement. |
|
Never implemented fully in Isis 1.x so no replacement. |
|
Never implemented fully in Isis 1.x so no replacement. |
|
Never implemented fully in Isis 1.x so no replacement. |
Other Changes
View model URLs
The default implementation of UrlEncodingService
provided by the framework has changed:
-
in 1.16.x the implementation is
o.a.i.applib.services.urlencoding.UrlEncodingServiceUsingBaseEncoding
-
in 2.0.0-M1 this is changed to
o.a.i.applib.services.urlencoding.UrlEncodingServiceWithCompression
This new implementation increases the state that can be encoded within the URL (approx 8000 characters) by first gzipping the state prior to base64 encoding the characters.
However, this does mean that any persisted URLs for view models will be invalid.
Removed dependencies
The Apache Isis applib (o.a.i.core:isis-core-applib
) no longer depends on the google guava library.
Likewise the Apache Isis Unit Test Support module (o.a.i.core:isis-core-unittestsupport
) no longer depends on guava either.
Do note however that the core framework does still depend on guava (though the intention is to remove this over time).
New isis-core-commons module
The new org.apache.isis.core:isis-core-commons
module provides a set of utility classes that are not API but that are depended upon by the applib.
Because these are not API, they should not be used by application code, even though they will be on the applications classpath.
To help prevent accidental usage:
-
the package is
org.apache.isis.core.commons.internal
-
all of the types in this module are prefixed "_".
For example, o.a.i.commons.internal.resources._Resource
provides utilities for loading static resources from the classpath.
This module performs many of the responsibilities that were previously provided by the dependency on guava. |
This module also defines a number of plugin interface types, discussed in the section below.
Plugins
The framework introduces a plugin architecture whereby variations on the configuration are automatically enabled just by the presence of the Maven module on the classpath.
For example, the framework can be run using either DataNucleus 4 or DataNucleus 5. Including the relevant module will configure the rest of the framework accordingly.
The plugin architecture uses the JDK ServiceLoader
API, whereby a Maven module can optionally provide an implementation of a well-known plugin interface type.
The plugin interface types themselves are defined in various of the Maven modules, broadly depending on what consumes them.
Defined in | Plugin type | Used for | Implementations |
---|---|---|---|
|
|
Obtain a plugin to finding types on the classpath with certain characteristics, eg annotated with certain annotations Include only one implementation on classpath. |
|
|
Obtain a plugin acting as a factory to proxy types (as used by the Include only one implementation on classpath, |
|
|
|
Obtain a plugin for finding event bus implementations. This removes the need to explicitly specify the implementation using the |
|
|
|
|
Obtain plugins that can provide implementations of Isis' own There can be multiple implementations on the classpath. |
|
|
Obtain plugins that can provide implementations of Isis' own There can be multiple implementations on the classpath. |
|
|
|
Decouples the metamodel module from a particular implementation of DataNucleus. Include only one implementation on classpath, |
|
|
|
|
Decouples the runtime module from a particular implementation of DataNucleus. Include only one implementation on classpath, |
|
|
|
Plugin to obtain a Include only one implementation on classpath, |
or
|
|
|
Plugin to configure the JAX-RS runtime. Include only one implementation on classpath. |
or
|
The two JDO/DataNucleus plugins are not independent of each other, because (as the table above shows) the same class implements both plugin interface types. These plugins allow the framework to run either using DataNucleus 4 (JDO 3.1 API) or using DataNucleus 5 (JDO 3.2 API).
Similarly, the two RestfulObjects plugins are also not independent of each other; again the pattern is for a single class implements both plugin interface types. These plugins support alternate implementations of JAX-RS API. JAX-RS 2.0 (one of the JavaEE 7.0 specifications) is implemented by RestEasy 3 whereas JAX-RS 2.1 is implemented by RestEasy 4 (part of JavaEE 8).
IsisJdoSupport domain service
In 1.16.x the IsisJdoSupport domain service exposed the DataNucleus 4 org.datanucleus.query.typesafe.TypesafeQuery
type in one of its signatures.
However, in DataNucleus 5 this type was removed and replaced by javax.jdo.JDOQLTypedQuery
, reflecting the fact that type-safe queries are now part of JDO 3.2.
Consequently in 2.0.0-M1 this API has been split into three:
-
IsisJdoSupport
(defined inisis-core-applib
) is independent of JDO APIs -
IsisJdoSupport_v3_1
(defined inisis-core-plugins-jdo-datanucleus-4
) extendsIsisJdoSupport
with DataNucleus 4/JDO 3.1-specific APIs -
IsisJdoSupport_v3_2
(defined inisis-core-plugins-jdo-datanucleus-5
) extendsIsisJdoSupport
with JDO 3.2-specific APIs