Migrating from M7 to M8

Programming Model

previously new

For Domain Objects we had support for (direct) Collection modification (addTo, removeFrom).

As this is part of Restful Object Specification 1.0, it was implemented for the RO Viewer and also the WrapperFactory.

Specifically REST endpoints (removed):

DomainObjectResource
  addToSet(...)
  addToList(...)
  removeFromCollection(...)

Events (removed)

CollectionAddToEvent
CollectionRemoveFromEvent

Has been removed without replacement. (An updated Restful Object Specification 2.0 is in preparation.)

It has proven difficulty to define what an "execution" would mean for Collection changes, hence we finally removed that notion.

In some situations it however makes sense to limit which objects can be added to or removed from a Collection. Thus, one would make the Collection read only and then define Actions that encapsulate the required business logic.

@DomainService.logicalTypeName deprecated for removal

use @Named or any other semantics supported by Spring

+ Behavioral change: @DomainService.logicalTypeName can now be left empty, which is interpreted as unspecified/indifferent

RecreatableDomainObject interface removed

use ViewModel interface instead

ViewModel.viewModelInit(String memento) removed

use a single (String) argument constructor instead; this will allow Java Records to be used as viewmodels (future work)

MetamodelEvent as provided with metamodel moved

moved to applib; we introduced interface MetamodelListener for convenience to maybe use instead

Example
@Service
public class SeedService implements MetamodelListener {
/..
    @Override
    public void onMetamodelLoaded() {
        // seed database entities
    }
}

Factory method Identifier.propertyOrCollectionIdentifier(..)

was slit up into Identifier.propertyIdentifier(..) and Identifier.collectionIdentifier(..)

Commons

The following changed:

previously new

Result<T> removed

replaced by Try<T>; also promoting Either<L, R> to non-internal, and introducing Railway<F, S>

Configuration

The following changed:

previously new

(non-essential) object meta-data mixins were split out of IsisModuleApplib

need to be explicitly imported via IsisModuleApplibObjectMetadataMixins

default logging subscribers were split out of IsisModuleApplib

need to be explicitly imported via IsisModuleApplibChangeAndExecutionLoggers

Other

Placeholder Rendering (UI)

The UI now renders placeholders (none) when representing null references. To customize behavior you may want to implement your own PlaceholderRenderService. (See PlaceholderRenderServiceDefault, the default implementation.)

Bill of Material / Parent POM

Folder moved /isis-parent/bom

Bill of Material
<!-- renamed
	<groupId>org.apache.isis</groupId>
	<artifactId>isis-parent</artifactId>
-->

<groupId>org.apache.isis</groupId>
<artifactId>isis-bom</artifactId>

Extensions

secman
<!-- renamed
	<groupId>org.apache.isis.extensions</groupId>
	<artifactId>isis-extensions-secman-shiro-realm</artifactId>
-->
<!-- instead use ... -->
<artifactId>isis-extensions-secman-delegated-shiro</artifactId>

Classes IsisModuleExtSecmanShiroRealm and AuthenticationStrategyForIsisModuleSecurityRealm were moved and renamed. (see shiro.ini)

shiro.ini
## renamed
#authenticationStrategy=org.apache.isis.extensions.secman.shiro.AuthenticationStrategyForIsisModuleSecurityRealm
#isisModuleSecurityRealm=org.apache.isis.extensions.secman.shiro.IsisModuleExtSecmanShiroRealm
## instead use
authenticationStrategy=org.apache.isis.extensions.secman.delegated.shiro.realm.AuthenticationStrategyForSecMan
isisModuleSecurityRealm=org.apache.isis.extensions.secman.delegated.shiro.realm.IsisModuleExtSecmanShiroRealm

Restclient

Restclient Package Names
// renamed ...
//import org.apache.isis.extensions.restclient.RestfulClient;
//import org.apache.isis.extensions.restclient.RestfulClientConfig;
import org.apache.isis.viewer.restfulobjects.client.RestfulClient;
import org.apache.isis.viewer.restfulobjects.client.RestfulClientConfig;
Restclient Artifacts
<!-- renamed
	<groupId>org.apache.isis.mappings</groupId>
	<artifactId>isis-mappings-restclient-applib</artifactId>
-->

<groupId>org.apache.isis.viewer</groupId>
<artifactId>isis-viewer-restfulobjects-client</artifactId>
Restclient Usage
// DigestResponse is no longer publicly visible, instead returning Try<T>
<T> Try<T> digest(Response response, Class<T> entityType);

// DigestResponse is no longer publicly visible, instead returning Try<Can<T>>
<T> Try<Can<T>> digestList(Response response, Class<T> entityType, GenericType<List<T>> genericType);

Mappings

Mappings
<!-- all removed
	<groupId>org.apache.isis.mappings</groupId>
	<artifactId>isis-mappings-...</artifactId>
-->

Mavendeps

integtests
<!-- removed
	<groupId>org.apache.isis.mavendeps</groupId>
	<artifactId>isis-mavendeps-integtests</artifactId>
	<type>pom</type>
-->

<!-- instead use directly as required ... -->

<groupId>org.apache.isis.testing</groupId>
<artifactId>isis-testing-integtestsupport-applib</artifactId>

<groupId>org.apache.isis.testing</groupId>
<artifactId>isis-testing-fakedata-applib</artifactId>

<groupId>org.apache.isis.testing</groupId>
<artifactId>isis-testing-fixtures-applib</artifactId>
unittests
<!-- removed
	<groupId>org.apache.isis.mavendeps</groupId>
	<artifactId>isis-mavendeps-unittests</artifactId>
	<type>pom</type>
-->

<!-- instead use directly as required ... -->

<groupId>org.apache.isis.testing</groupId>
<artifactId>isis-testing-unittestsupport-applib</artifactId>

<groupId>org.apache.isis.testing</groupId>
<artifactId>isis-testing-fakedata-applib</artifactId>
valuetypes
<!-- removed
	<groupId>org.apache.isis.valuetypes</groupId>
	<artifactId>isis-valuetypes-prism</artifactId>
-->

<!-- removed
	<groupId>org.apache.isis.valuetypes</groupId>
	<artifactId>isis-valuetypes-resources</artifactId>
-->

<!-- removed
	<groupId>org.apache.isis.valuetypes</groupId>
	<artifactId>isis-valuetypes-prism-wicket</artifactId>
-->

<!-- removed
	<groupId>org.apache.isis.valuetypes</groupId>
	<artifactId>isis-valuetypes-prism-vaadin</artifactId>
-->

<!-- instead use ... -->

<groupId>org.apache.isis.viewer.commons</groupId>
<artifactId>isis-viewer-commons-prism</artifactId>

<!-- moved
	<groupId>org.apache.isis.valuetypes</groupId>
	<artifactId>isis-valuetypes-sse*</artifactId>
-->

<!-- instead use ... -->
<groupId>org.apache.isis.extensions</groupId>
<artifactId>isis-extensions-sse*</artifactId>

IsisModuleValSseApplib renamed to IsisModuleExtSseApplib
IsisModuleValSseMetaModel renamed to IsisModuleExtSseMetaModel
IsisModuleValSseUiWkt renamed to IsisModuleExtSseWicket