= Migrating from M6 to M7

: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:

(This page will be added to as development progresses).

== Programming Model

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

|===

| previously
| new

| `@ParameterLayout(renderDay=RenderDay.AS_DAY_BEFORE)` deprecated for removal
| use `@ValueSemantics(dateRenderAdjustDays=ValueSemantics.AS_DAY_BEFORE)` instead

| `@PropertyLayout(renderDay=RenderDay.AS_DAY_BEFORE)` deprecated for removal
| use `@ValueSemantics(dateRenderAdjustDays=ValueSemantics.AS_DAY_BEFORE)` instead

| We provided introspection control via global config option 
`isis.core.meta-model.annotation.action.explicit=true/false`.
| Use `@DomainObject(introspection=...)` instead ... 
as it allows to set the policy on a per class basis, and also introduces support 
for non-public class member introspection. 

| Imperative _Object_ method `boolean disabled(Type type)` took a single argument.
| The `Type` argument was removed, use `boolean disabled()` instead.

| `org.apache.isis.applib.jaxb.JodaTimeJaxbAdapters` 
| moved to `org.apache.isis.valuetypes.jodatime.applib.jaxb` 

| _SecMan's_ `PasswordEncryptionService` was removed
| Using Spring's `org.springframework.security.crypto.password.PasswordEncoder` instead.

| `CommandUtil` was renamed ..
| to `IdentifierUtil`

| Several `CommonDtoUtil` methods have been refactored ..
| into a new service `SchemaValueMarshaller`

|===

== Configuration

Following configuration options changed:
[cols="2a,3a", options="header"]

|===

| previously
| new

| `isis.core.meta-model.annotation.action.explicit`=`false`/`true` (removed)
| (semantic equivalent) replacement for `false`:
 
`isis.core.meta-model.introspector.policy=ANNOTATION_OPTIONAL`

(semantic equivalent) replacement for `true`:

`isis.core.meta-model.introspector.policy=ANNOTATION_REQUIRED`

| `isis.viewer.wicket.themes.provider` (removed)
| register custom `IsisWicketThemeSupport` with _Spring_ instead

| `isis.legacy.value-types.percentage` (removed)
| no replacement

| `isis.legacy.value-types.money` (removed)
| no replacement

| `isis.value-types.primitives.int` (removed)
| using localized NumberFormat instead, customize via `ValueSemanticsProvider<Integer>`

| `isis.value-types.java-lang.byte` (removed)
| using localized NumberFormat instead, customize via `ValueSemanticsProvider<Byte>`

| `isis.value-types.java-lang.double` (removed)
| using localized NumberFormat instead, customize via `ValueSemanticsProvider<Double>`

| `isis.value-types.java-lang.float` (removed)
| using localized NumberFormat instead, customize via `ValueSemanticsProvider<Float>`

| `isis.value-types.java-lang.long` (removed)
| using localized NumberFormat instead, customize via `ValueSemanticsProvider<Long>`

| `isis.value-types.java-lang.short` (removed)
| using localized NumberFormat instead, customize via `ValueSemanticsProvider<Short>`

| `isis.value-types.java-math.big-integer` (removed)
| using localized NumberFormat instead, customize via `ValueSemanticsProvider<BigInteger>`

| `isis.value-types.java-math.big-decimal` (removed)
| using localized NumberFormat instead, customize via `ValueSemanticsProvider<BigDecimal>`

| `isis.value-types.java-time.local-date-time` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific 
`@ValueSemantics(dateFormatStyle=..., timeFormatStyle=...)` 
or globally via `ValueSemanticsProvider<LocalDateTime>`

| `isis.value-types.java-time.offset-date-time` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific
`@ValueSemantics(dateFormatStyle=..., timeFormatStyle=...)` 
or globally via `ValueSemanticsProvider<OffsetDateTime>`

| `isis.value-types.java-time.offset-time` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific
`@ValueSemantics(timeFormatStyle=...)` 
or globally via `ValueSemanticsProvider<OffsetTime>`

| `isis.value-types.java-time.local-date` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific
`@ValueSemantics(dateFormatStyle=...)` 
or globally via `ValueSemanticsProvider<LocalDate>`

| `isis.value-types.java-time.local-time` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific
`@ValueSemantics(timeFormatStyle=...)` 
or globally via `ValueSemanticsProvider<LocalTime>`

| `isis.value-types.java-time.zoned-date-time` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific
`@ValueSemantics(dateFormatStyle=..., timeFormatStyle=...)` 
or globally via `ValueSemanticsProvider<ZonedDateTime>`

| `isis.value-types.java-util.date` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific
`@ValueSemantics(dateFormatStyle=..., timeFormatStyle=...)` 
or globally via `ValueSemanticsProvider<java.util.Date>`

| `isis.value-types.java-sql.date` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific
`@ValueSemantics(dateFormatStyle=...)` 
or globally via `ValueSemanticsProvider<java.sql.Date>`

| `isis.value-types.java-sql.time` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific
`@ValueSemantics(timeFormatStyle=...)` 
or globally via `ValueSemanticsProvider<java.sql.Time>`

| `isis.value-types.java-sql.timestamp` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific
`@ValueSemantics(dateFormatStyle=..., timeFormatStyle=...)` 
or globally via `ValueSemanticsProvider<java.sql.Timestamp>`

| `isis.value-types.joda.local-date-time` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific
`@ValueSemantics(dateFormatStyle=..., timeFormatStyle=...)` 
or globally via `ValueSemanticsProvider<org.joda.time.LocalDateTime>`

| `isis.value-types.joda.local-date` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific
`@ValueSemantics(dateFormatStyle=...)` 
or globally via `ValueSemanticsProvider<org.joda.time.LocalDate>`

| `isis.value-types.joda.date-time` (removed)
| defaults to `FormatStyle.MEDIUM`, customize via feature specific
`@ValueSemantics(timeFormatStyle=...)` 
or globally via `ValueSemanticsProvider<org.joda.time.DateTime>`

| `isis.viewer.wicket.date-pattern` (removed)
| defaults to (canonical) `yyyy-MM-dd` editing format,
use `isis.value-types.temporal.editing.date-pattern` instead or
customize via `ValueSemanticsProvider<T>`

| `isis.viewer.wicket.date-time-pattern` (removed)
| defaults to concatenation of `date-pattern` with a blank `" "` and with a `time-pattern` editing format,
use `isis.value-types.temporal.editing.*-pattern` instead or
customize via `ValueSemanticsProvider<T>`

| _SecMan's_ `SecmanConfiguration` bean was removed
| use `org.apache.isis.core.config.IsisConfiguration.Extensions.Secman` (immutable) instead.

|===

=== Password Hashing

_SecMan_ provides a _Jbcrypt_ based password encryption service. 
We added an alternative based on _Spring-Security_.
To switch out the old vs the new replace `IsisModuleExtSecmanEncryptionJbcrypt` with 
`IsisModuleExtSecmanEncryptionSpring`. However note, that the new password hashes are 
not compatible with the old ones. 

[source,xml]
.IsisModuleExtSecmanEncryptionJbcrypt
----
<dependency>
  <groupId>org.apache.isis.extensions</groupId>
  <artifactId>isis-extensions-secman-encryption-jbcrypt</artifactId>
</dependency>
----

[source,xml]
.IsisModuleExtSecmanEncryptionSpring
----
<dependency>
  <groupId>org.apache.isis.extensions</groupId>
  <artifactId>isis-extensions-secman-encryption-spring</artifactId>
</dependency>
----

== Security Integration

_Wicket Viewer_ default authorized user role was renamed for generic reuse. 

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

|===

| previously
| new

| `org.apache.isis.viewer.wicket.roles.USER` renamed
| use `org.apache.isis.security.AUTHORIZED_USER_ROLE` instead

|===

== Maven Artifacts

`-dn5` suffix was removed from artifacts, because we migrated DataNucleus 5.x to 6.x

[source,xml]
----
<!--
<dependency>
	<groupId>org.apache.isis.valuetypes</groupId>
	<artifactId>isis-valuetypes-asciidoc-persistence-jdo-dn5</artifactId>
</dependency>
-->
<dependency>
	<groupId>org.apache.isis.valuetypes</groupId>
	<artifactId>isis-valuetypes-asciidoc-persistence-jdo</artifactId>
</dependency>

<!--
<dependency>
	<groupId>org.apache.isis.valuetypes</groupId>
	<artifactId>isis-valuetypes-markdown-persistence-jdo-dn5</artifactId>
</dependency>
-->
<dependency>
	<groupId>org.apache.isis.valuetypes</groupId>
	<artifactId>isis-valuetypes-markdown-persistence-jdo</artifactId>
</dependency>
----

== Extensions

=== SecMan

New fields where added to the `ApplicationUser`:

[source,sql]
.SQL update script - your mileage may vary!
----
ALTER TABLE [isisExtensionsSecman].[ApplicationUser] ADD [language] VARCHAR(120) NULL
ALTER TABLE [isisExtensionsSecman].[ApplicationUser] ADD [numberFormat] VARCHAR(120) NULL
ALTER TABLE [isisExtensionsSecman].[ApplicationUser] ADD [timeFormat] VARCHAR(120) NULL
----

Following menu actions for roles have been removed:

[source,xml]
.menubars.layout.xml
----
<!--
<mb3:serviceAction objectType="isis.ext.secman.ApplicationRoleMenu" id="newRole"/>
<mb3:serviceAction objectType="isis.ext.secman.ApplicationRoleMenu" id="allRoles"/>

<mb3:serviceAction objectType="isis.ext.secman.ApplicationRoleMenu" id="newTenancy"/>
<mb3:serviceAction objectType="isis.ext.secman.ApplicationRoleMenu" id="allTenancies"/>
-->
----

Use the new Role Manager View Model instead:

[source,xml]
.menubars.layout.xml
----
<!-- Roles -->
<mb3:serviceAction objectType="isis.ext.secman.ApplicationRoleMenu" id="roleManager"/>

<!-- Tenancies -->
<mb3:serviceAction objectType="isis.ext.secman.ApplicationTenancyMenu" id="tenancyManager"/>
----