= Migrating from M5 to M6

: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.
:page-partial:


== Java Source Compliance Level

The minimum required JVM version was updated from Java 8 to Java 11.

A number of packages related to JavaEE were removed from the JRE, but these packages are used by the framework, specifically

* JAX-WS packages (`javax.jws`, `javax.jws.soap`, `javax.xml.soap`, and `javax.xml.ws.*`)
* JAXB packages (`javax.xml.bind.*`)


== Changes to the Programming Model

=== Removed (Programming Model)

[cols="2a,3a", options="header"]

|===

| was
| now what?

| `@Action(associateWithSequence=...)` removed
| use `@ActionLayout(sequence=...)` instead

| `@DomainObject(autoCompleteAction=...)` removed
| use `@DomainObject(autoCompleteMethod=...)` instead

| `@MemberOrder(name=...)` removed
| instead on a _Property_ use `@PropertyLayout(fieldSetId=..., fieldSetName=...)`
or on an _Action_ use `@Action(associateWith=...)`;
there is no counterpart for _Collection_

| `@MemberOrder(sequence=...)` removed
| use `@ActionLayout/@PropertyLayout/@CollectionLayout(sequence=...)` instead

| `@Model` (from extensions) removed
| use `@MemberSupport`  (Applib) instead

| `@PropertyLayout(namedEscaped=...)` removed
| (translatable) text is now always escaped

|===

== Configuration

Following configuration options changed:
[source,java]
----
isis.core.meta-model.validator.ensure-unique-object-types // removed

isis.core.meta-model.validator.explicit-object-type // renamed to ...
isis.core.meta-model.validator.explicit-logical-type-names
----

Some 'mavendeps' artifacts have been removed:

[source,xml]
----

<!-- removed
<groupId>org.apache.isis.mavendeps</groupId>
<artifactId>isis-mavendeps-jdk11</artifactId>

no replacement, no longer required
-->

<!-- removed
<groupId>org.apache.isis.mavendeps</groupId>
<artifactId>isis-mavendeps-jpa</artifactId>
-->

<!-- instead use -->
<groupId>org.apache.isis.persistence</groupId>
<artifactId>isis-persistence-jpa-eclipselink</artifactId>

<!-- removed
<groupId>org.apache.isis.mavendeps</groupId>
<artifactId>isis-mavendeps-jdo</artifactId>
-->

<!-- instead use -->
<groupId>org.apache.isis.persistence</groupId>
<artifactId>isis-persistence-jdo-datanucleus</artifactId>
----

== Other Changes

Module `IsisModuleExtCorsImpl` was renamed to `IsisModuleExtCors`.

Module `IsisModuleExtModelAnnotation` was removed and is no longer required.

Service `BookmarkService` has been improved, such that its methods return `Optional<?>` instead of nullable objects.

Service `RepositoryService.isPersistent(Object domainObject)` has been removed. Use `getEntityState(Object domainObject)` instead.

Service `RepositoryService.isDeleted(Object domainObject)` has been removed. Use `getEntityState(Object domainObject)` instead.

Enum `EntityState.PERSISTABLE_DESTROYED` and `isDestroyed()` were renamed to `PERSISTABLE_REMOVED` and `isRemoved()`. Also note: the `removed` entity life-cycle state is only supported by _JDO_,
whereas _JPA_ is indifferent to whether an entity instance was `removed` or is `detached`. The framework's JPA integration will always report `detached`.


The _Wicket Viewer_ was migrated from using _Bootstrap 3_ to _Bootstrap 4_, which might have more or less severe implications on (your) customized _CSS_ and _JavaScript_ and _Wicket_ components.

== Extensions

=== SecMan

Following SecMan artifacts have been renamed:
[source,xml]
----
<artifactId>isis-extensions-secman-model</artifactId> <!-- old -->
<artifactId>isis-extensions-secman-integration</artifactId> <!-- new -->

<artifactId>isis-extensions-secman-api</artifactId> <!-- old -->
<artifactId>isis-extensions-secman-applib</artifactId> <!-- new -->
----

Following SecMan packages have been renamed:
[source,java]
----
org.apache.isis.extensions.secman.api.*; // old
org.apache.isis.extensions.secman.applib.*; // new

org.apache.isis.extensions.secman.model.*; // old
org.apache.isis.extensions.secman.integration.*; // new
----

Following SecMan modules have been renamed:
[source]
----
IsisModuleExtSecmanApi -> IsisModuleExtSecmanApplib
IsisModuleExtSecmanModel -> IsisModuleExtSecmanIntegration
----

Following menu actions for User Management have been removed:

[source,xml]
.menubars.layout.xml
----
<!--
<mb3:serviceAction objectType="isis.ext.secman.ApplicationUserMenu" id="newLocalUser">
    <cpt:named>New Local User</cpt:named>
</mb3:serviceAction>
<mb3:serviceAction objectType="isis.ext.secman.ApplicationUserMenu" id="allUsers">
    <cpt:named>All Users</cpt:named>
</mb3:serviceAction>
<mb3:serviceAction objectType="isis.ext.secman.ApplicationUserMenu" id="newDelegateUser">
    <cpt:named>New Delegate User</cpt:named>
</mb3:serviceAction>
-->
----

Use the new User Manager View Model instead:

[source,xml]
.menubars.layout.xml
----
<mb3:serviceAction objectType="isis.ext.secman.ApplicationUserMenu" id="userManager">
    <cpt:named>User Manager</cpt:named>
</mb3:serviceAction>
----

DB schema changes:

[source,sql]
.ApplicationUser
----
-- mariadb/mysql syntax - adapt to your specific vendor, schema names omitted
UPDATE ApplicationUser set `status`='UNLOCKED' where `status` like 'ENABLED';
UPDATE ApplicationUser set `status`='LOCKED' where `status` like 'DISABLED';
----


