You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/10/22 04:23:06 UTC
[isis] branch master updated: ISIS-2411: remove Isis Applib's Image
(use AWT's BufferedImage instead)
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new b55e333 ISIS-2411: remove Isis Applib's Image (use AWT's BufferedImage instead)
b55e333 is described below
commit b55e33366efa5bfe731f5078ce798ac9f7fa8c29
Author: Andi Huber <ah...@apache.org>
AuthorDate: Thu Oct 22 06:22:50 2020 +0200
ISIS-2411: remove Isis Applib's Image (use AWT's BufferedImage instead)
---
.../isis/commons/internal/image/_Images.java | 12 ++++
.../dflt/ProgrammingModelFacetsJava8.java | 2 -
.../src/main/java/demoapp/dom/menubars.layout.xml | 1 -
.../java/demoapp/dom/types/isis/IsisTypesMenu.java | 7 --
.../dom/types/isis/images/IsisImages-common.adoc | 65 -----------------
.../types/isis/images/IsisImages-description.adoc | 31 --------
.../demoapp/dom/types/isis/images/IsisImages.java | 81 ---------------------
.../dom/types/isis/images/IsisImages.layout.xml | 56 ---------------
.../types/isis/images/holder/IsisImageHolder.java | 39 ----------
.../types/isis/images/holder/IsisImageHolder2.java | 80 ---------------------
.../holder/IsisImageHolder_actionReturning.java | 40 -----------
.../IsisImageHolder_actionReturningCollection.java | 50 -------------
.../holder/IsisImageHolder_mixinProperty.java | 44 ------------
...ImageHolder_updateReadOnlyOptionalProperty.java | 56 ---------------
.../IsisImageHolder_updateReadOnlyProperty.java | 51 -------------
...geHolder_updateReadOnlyPropertyWithChoices.java | 64 -----------------
.../isis/images/jdo/IsisImageJdo-description.adoc | 20 ------
.../dom/types/isis/images/jdo/IsisImageJdo.java | 82 ---------------------
.../types/isis/images/jdo/IsisImageJdo.layout.xml | 56 ---------------
.../isis/images/jdo/IsisImageJdoEntities.java | 47 ------------
.../isis/images/jdo/IsisImageJdoSeedService.java | 54 --------------
.../isis/images/samples/IsisImagesSamples.java | 50 -------------
.../isis/images/vm/IsisImageVm-description.adoc | 16 -----
.../dom/types/isis/images/vm/IsisImageVm.java | 84 ----------------------
.../types/isis/images/vm/IsisImageVm.layout.xml | 56 ---------------
...vaAwtImageHolder_actionReturningCollection.java | 6 +-
.../apache/isis/legacy}/applib/value/Image.java | 2 +-
...ageValueFacetUsingSemanticsProviderFactory.java | 6 +-
.../value/image/ImageValueSemanticsProvider.java | 5 +-
.../value/ImageValueSemanticsProviderTest.java | 6 +-
.../typeconverters/applib/IsisImageConverter.java | 58 ---------------
.../datanucleus-5/src/main/resources/plugin.xml | 15 ----
32 files changed, 25 insertions(+), 1217 deletions(-)
diff --git a/commons/src/main/java/org/apache/isis/commons/internal/image/_Images.java b/commons/src/main/java/org/apache/isis/commons/internal/image/_Images.java
index d53efa5..1e61f13 100644
--- a/commons/src/main/java/org/apache/isis/commons/internal/image/_Images.java
+++ b/commons/src/main/java/org/apache/isis/commons/internal/image/_Images.java
@@ -41,6 +41,12 @@ public class _Images {
// -- PIXELS
+ /**
+ * @return 2 dim. array of pixels defining this image,
+ * where each pixel is a 32 bit ARGB color value,
+ * with {@code A} the alpha value as highest significant 8 bits
+ * followed by {@code R} the red value and so on
+ */
public static int[][] toPixels(final @NonNull BufferedImage image){
final int width = image.getWidth();
final int height = image.getHeight();
@@ -56,6 +62,12 @@ public class _Images {
return pixels;
}
+ /**
+ * @param pixels - 2 dim. array of pixels defining this image,
+ * where each pixel is a 32 bit ARGB color value,
+ * with {@code A} the alpha value as highest significant 8 bits
+ * followed by {@code R} the red value and so on
+ */
public static BufferedImage fromPixels(final @NonNull int[][] pixels){
val raster = createRasterARGB8888(pixels);
return createImageARGB8888(raster);
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodels/dflt/ProgrammingModelFacetsJava8.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodels/dflt/ProgrammingModelFacetsJava8.java
index 53277ff..563c6fb 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodels/dflt/ProgrammingModelFacetsJava8.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodels/dflt/ProgrammingModelFacetsJava8.java
@@ -127,7 +127,6 @@ import org.apache.isis.core.metamodel.facets.value.doubles.DoublePrimitiveValueF
import org.apache.isis.core.metamodel.facets.value.doubles.DoubleWrapperValueFacetUsingSemanticsProviderFactory;
import org.apache.isis.core.metamodel.facets.value.floats.FloatPrimitiveValueFacetUsingSemanticsProviderFactory;
import org.apache.isis.core.metamodel.facets.value.floats.FloatWrapperValueFacetUsingSemanticsProviderFactory;
-import org.apache.isis.core.metamodel.facets.value.image.ImageValueFacetUsingSemanticsProviderFactory;
import org.apache.isis.core.metamodel.facets.value.imageawt.JavaAwtImageValueFacetUsingSemanticsProviderFactory;
import org.apache.isis.core.metamodel.facets.value.integer.IntPrimitiveValueFacetUsingSemanticsProviderFactory;
import org.apache.isis.core.metamodel.facets.value.integer.IntWrapperValueFacetUsingSemanticsProviderFactory;
@@ -328,7 +327,6 @@ public final class ProgrammingModelFacetsJava8 extends ProgrammingModelAbstract
addFactory(FacetProcessingOrder.G1_VALUE_TYPES, BlobValueFacetUsingSemanticsProviderFactory.class);
addFactory(FacetProcessingOrder.G1_VALUE_TYPES, ClobValueFacetUsingSemanticsProviderFactory.class);
addFactory(FacetProcessingOrder.G1_VALUE_TYPES, PasswordValueFacetUsingSemanticsProviderFactory.class);
- addFactory(FacetProcessingOrder.G1_VALUE_TYPES, ImageValueFacetUsingSemanticsProviderFactory.class);
// jodatime values
addFactory(FacetProcessingOrder.G1_VALUE_TYPES, JodaLocalDateValueFacetUsingSemanticsProviderFactory.class);
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
index e711eec..06d9f8f 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
@@ -102,7 +102,6 @@ For latest we use: https://raw.githubusercontent.com/apache/isis/master/antora/s
<mb3:named>Apache Isis Core</mb3:named>
<mb3:serviceAction objectType="demo.IsisTypesMenu" id="blobs"/>
<mb3:serviceAction objectType="demo.IsisTypesMenu" id="clobs"/>
- <mb3:serviceAction objectType="demo.IsisTypesMenu" id="images"/>
<mb3:serviceAction objectType="demo.IsisTypesMenu" id="localResourcePaths"/>
<mb3:serviceAction objectType="demo.IsisTypesMenu" id="markups"/>
<mb3:serviceAction objectType="demo.IsisTypesMenu" id="passwords"/>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/IsisTypesMenu.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/IsisTypesMenu.java
index 5671f65..345bfac 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/IsisTypesMenu.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/IsisTypesMenu.java
@@ -28,7 +28,6 @@ import org.apache.isis.applib.annotation.SemanticsOf;
import demoapp.dom.types.isis.blobs.IsisBlobs;
import demoapp.dom.types.isis.clobs.IsisClobs;
-import demoapp.dom.types.isis.images.IsisImages;
import demoapp.dom.types.isis.localresourcepaths.IsisLocalResourcePaths;
import demoapp.dom.types.isis.markups.IsisMarkups;
import demoapp.dom.types.isis.passwords.IsisPasswords;
@@ -51,12 +50,6 @@ public class IsisTypesMenu {
}
@Action(semantics = SemanticsOf.SAFE)
- @ActionLayout(cssClassFa="fa-image")
- public IsisImages images(){
- return new IsisImages();
- }
-
- @Action(semantics = SemanticsOf.SAFE)
@ActionLayout(cssClassFa="fa-external-link-alt")
public IsisLocalResourcePaths localResourcePaths(){
return new IsisLocalResourcePaths();
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/IsisImages-common.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/IsisImages-common.adoc
deleted file mode 100644
index 05631d5..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/IsisImages-common.adoc
+++ /dev/null
@@ -1,65 +0,0 @@
-: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 ag [...]
-
-== Mixin actions
-
-A number of mixin actions contribute through the `IsisImageHolder` interface, demonstrate the use of `Image` as a parameter and as a return type.
-For example:
-
-* the `updateReadOnlyProperty` action is:
-+
-[source,java]
-----
-include::holder/IsisImageHolder_updateReadOnlyProperty.java[tags=class]
-----
-
-* the `updateReadOnlyOptionalProperty` action is:
-+
-[source,java]
-----
-include::holder/IsisImageHolder_updateReadOnlyOptionalProperty.java[tags=class]
-----
-
-* the `actionReturning` action is:
-+
-[source,java]
-----
-include::holder/IsisImageHolder_actionReturning.java[tags=class]
-----
-
-
-* the `actionReturningCollection` action is:
-+
-[source,java]
-----
-include::holder/IsisImageHolder_actionReturningCollection.java[tags=class]
-----
-
-== Mixin properties
-
-We also use the interface to contribute a mixin property:
-
-* the `mixinProperty` property:
-+
-[source,java]
-----
-include::holder/IsisImageHolder_mixinProperty.java[tags=class]
-----
-
-
-== @PropertyLayout(labelPosition=...)
-
-There is also an extended interface, `IsisImageHolder2`, with default methods demonstrating the use of label positions:
-
-[source,java]
-----
-include::holder/IsisImageHolder2.java[tags=class]
-----
-
-<.> The default methods have annotations that are automatically inherited.
-<.> Position to the left
-<.> Uses `@MemberOrder` positions the properties into the appropriate `<field-set>` within the `Xxx.layout.xml` layout file.
-<.> Position label on top
-<.> Position label to the right
-+
-CAUTION: currently not supported
-<.> Hide the label compleely.
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/IsisImages-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/IsisImages-description.adoc
deleted file mode 100644
index d3ee388..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/IsisImages-description.adoc
+++ /dev/null
@@ -1,31 +0,0 @@
-: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 ag [...]
-
-The framework has built-in support for images, using the `Image` data type.
-
-NOTE: This is an Apache Isis specific data type.
-
-From here you can:
-
-* navigate to an entity that uses the `Image` datatype
-* open a view model that uses the `Image` datatype
-
-Some properties on these domain objects are mandatory, some optional.
-
-== Common interfaces
-
-The entity and view model types both implement some common interfaces.
-
-=== IsisImageHolder
-
-The `IsisImageHolder` interface is used to contribute a number of mixins to both types:
-
-[source,java]
-----
-include::holder/IsisImageHolder.java[tags=class]
-----
-
-=== IsisImageHolder2
-
-The `IsisImageHolder2` interface is used to demonstrate support for label positions using `@PropertyLayout(labelPosition=...)`.
-
-Further details, along with the effect of this annotation, can be seen on the entity and view model object pages.
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/IsisImages.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/IsisImages.java
deleted file mode 100644
index 7cea7e8..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/IsisImages.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images;
-
-import java.util.List;
-
-import javax.inject.Inject;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.applib.annotation.Collection;
-import org.apache.isis.applib.annotation.DomainObject;
-import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.Nature;
-import org.apache.isis.applib.annotation.PromptStyle;
-import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.value.Image;
-
-import lombok.extern.log4j.Log4j2;
-
-import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
-import demoapp.dom.types.Samples;
-import demoapp.dom.types.isis.images.jdo.IsisImageJdo;
-import demoapp.dom.types.isis.images.jdo.IsisImageJdoEntities;
-import demoapp.dom.types.isis.images.vm.IsisImageVm;
-
-@XmlRootElement(name = "Demo")
-@XmlType
-@XmlAccessorType(XmlAccessType.FIELD)
-@DomainObject(nature=Nature.VIEW_MODEL, objectType = "demo.IsisImages", editing=Editing.ENABLED)
-@Log4j2
-public class IsisImages implements HasAsciiDocDescription {
-
- public String title() {
- return "Image data type";
- }
-
- @Action(semantics = SemanticsOf.SAFE)
- @ActionLayout(promptStyle = PromptStyle.DIALOG_MODAL)
- public IsisImageVm openViewModel(Image initialValue) {
- return new IsisImageVm(initialValue);
- }
- public Image default0OpenViewModel() {
- return samples.single();
- }
-
- @Collection
- public List<IsisImageJdo> getEntities() {
- return entities.all();
- }
-
- @Inject
- @XmlTransient
- IsisImageJdoEntities entities;
-
- @Inject
- @XmlTransient
- Samples<Image> samples;
-
-}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/IsisImages.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/IsisImages.layout.xml
deleted file mode 100644
index 87dff68..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/IsisImages.layout.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!-- 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. -->
-<bs3:grid
- xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd"
- xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3"
- xmlns:cpt="http://isis.apache.org/applib/layout/component"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
- <bs3:row>
- <bs3:col span="10" unreferencedActions="true">
- <cpt:domainObject />
- <cpt:action id="rebuildMetamodel"/>
- </bs3:col>
- <bs3:col span="2">
- <cpt:fieldSet name="" id="sources" />
- </bs3:col>
- </bs3:row>
-
- <bs3:row>
- <bs3:col span="6">
- <bs3:row>
- <bs3:col span="12">
- <cpt:collection id="entities"/>
- </bs3:col>
- <bs3:col span="12">
- <cpt:action id="openViewModel"/>
- </bs3:col>
- </bs3:row>
- <cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
- </bs3:col>
- <bs3:col span="6">
- <cpt:fieldSet name="Description" id="description" >
- <cpt:action id="clearHints" position="PANEL" />
- <cpt:action id="downloadLayoutXml" position="PANEL_DROPDOWN"/>
- <cpt:action id="rebuildMetamodel" position="PANEL"/>
- <cpt:action id="downloadMetamodelXml" position="PANEL_DROPDOWN"/>
- <cpt:action id="inspectMetamodel" position="PANEL_DROPDOWN"/>
- <cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
- <cpt:property id="description"/>
- </cpt:fieldSet>
- </bs3:col>
- </bs3:row>
- <bs3:row>
- <bs3:col span="12" unreferencedCollections="true"/>
- </bs3:row>
-
-</bs3:grid>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder.java
deleted file mode 100644
index 666a1d1..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.holder;
-
-import org.apache.isis.applib.value.Image;
-
-//tag::class[]
-public interface IsisImageHolder {
-
- Image getReadOnlyProperty();
- void setReadOnlyProperty(Image c);
-
- Image getReadWriteProperty();
- void setReadWriteProperty(Image c);
-
- Image getReadOnlyOptionalProperty();
- void setReadOnlyOptionalProperty(Image c);
-
- Image getReadWriteOptionalProperty();
- void setReadWriteOptionalProperty(Image c);
-
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder2.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder2.java
deleted file mode 100644
index 9b57bc5..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder2.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.holder;
-
-import org.apache.isis.applib.annotation.LabelPosition;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.value.Image;
-
-//tag::class[]
-public interface IsisImageHolder2 extends IsisImageHolder {
-
- @Property // <.>
- @PropertyLayout(
- labelPosition = LabelPosition.LEFT, // <.>
- describedAs =
- "@PropertyLayout(labelPosition=LEFT)",
- hidden = Where.ALL_TABLES
- )
- @MemberOrder(name = "label-positions", sequence = "1") // <.>
- default Image getReadOnlyPropertyDerivedLabelPositionLeft() {
- return getReadOnlyProperty();
- }
-
- @Property
- @PropertyLayout(
- labelPosition = LabelPosition.TOP, // <.>
- describedAs =
- "@PropertyLayout(labelPosition=TOP)",
- hidden = Where.ALL_TABLES
- )
- @MemberOrder(name = "label-positions", sequence = "2")
- default Image getReadOnlyPropertyDerivedLabelPositionTop() {
- return getReadOnlyProperty();
- }
-
- @Property
- @PropertyLayout(
- labelPosition = LabelPosition.RIGHT, // <.>
- describedAs =
- "@PropertyLayout(labelPosition=RIGHT)",
- hidden = Where.ALL_TABLES
- )
- @MemberOrder(name = "label-positions", sequence = "3")
- default Image getReadOnlyPropertyDerivedLabelPositionRight() {
- return getReadOnlyProperty();
- }
-
- @Property
- @PropertyLayout(
- labelPosition = LabelPosition.NONE, // <.>
- describedAs =
- "@PropertyLayout(labelPosition=NONE)",
- hidden = Where.ALL_TABLES
- )
- @MemberOrder(name = "label-positions", sequence = "4")
- default Image getReadOnlyPropertyDerivedLabelPositionNone() {
- return getReadOnlyProperty();
- }
-
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_actionReturning.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_actionReturning.java
deleted file mode 100644
index 302a174..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_actionReturning.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.holder;
-
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.value.Image;
-
-import lombok.RequiredArgsConstructor;
-
-
-//tag::class[]
-@Action(semantics = SemanticsOf.SAFE)
-@RequiredArgsConstructor
-public class IsisImageHolder_actionReturning {
-
- private final IsisImageHolder holder;
-
- public Image act() {
- return holder.getReadOnlyProperty();
- }
-
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_actionReturningCollection.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_actionReturningCollection.java
deleted file mode 100644
index d4982e5..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_actionReturningCollection.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.holder;
-
-import java.util.Collection;
-import java.util.stream.Collectors;
-
-import javax.inject.Inject;
-
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.value.Image;
-
-import lombok.RequiredArgsConstructor;
-
-import demoapp.dom.types.Samples;
-
-
-//tag::class[]
-@Action(semantics = SemanticsOf.SAFE)
-@RequiredArgsConstructor
-public class IsisImageHolder_actionReturningCollection {
-
- private final IsisImageHolder holder;
-
- public Collection<Image> act() {
- return samples.stream()
- .collect(Collectors.toList());
- }
-
- @Inject
- Samples<Image> samples;
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_mixinProperty.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_mixinProperty.java
deleted file mode 100644
index e800af9..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_mixinProperty.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.holder;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.value.Image;
-
-import lombok.RequiredArgsConstructor;
-
-
-//tag::class[]
-@Property()
-@PropertyLayout(hidden = Where.ALL_TABLES)
-@RequiredArgsConstructor
-public class IsisImageHolder_mixinProperty {
-
- private final IsisImageHolder holder;
-
- @MemberOrder(name = "contributed", sequence = "1")
- public Image prop() {
- return holder.getReadOnlyProperty();
- }
-
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_updateReadOnlyOptionalProperty.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_updateReadOnlyOptionalProperty.java
deleted file mode 100644
index fb94a6d..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_updateReadOnlyOptionalProperty.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.holder;
-
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.PromptStyle;
-import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.value.Image;
-
-import lombok.RequiredArgsConstructor;
-
-
-//tag::class[]
-@Action(
- semantics = SemanticsOf.IDEMPOTENT,
- associateWith = "readOnlyOptionalProperty",
- associateWithSequence = "1"
-)
-@ActionLayout(promptStyle = PromptStyle.INLINE, named = "Update")
-@RequiredArgsConstructor
-public class IsisImageHolder_updateReadOnlyOptionalProperty {
-
- private final IsisImageHolder holder;
-
- public IsisImageHolder act(
- @Parameter(optionality = Optionality.OPTIONAL) // <.>
- Image newValue
- ) {
- holder.setReadOnlyOptionalProperty(newValue);
- return holder;
- }
- public Image default0Act() {
- return holder.getReadOnlyOptionalProperty();
- }
-
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_updateReadOnlyProperty.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_updateReadOnlyProperty.java
deleted file mode 100644
index 5b72cf0..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_updateReadOnlyProperty.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.holder;
-
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.applib.annotation.PromptStyle;
-import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.value.Image;
-
-import lombok.RequiredArgsConstructor;
-
-
-//tag::class[]
-@Action(
- semantics = SemanticsOf.IDEMPOTENT,
- associateWith = "readOnlyProperty",
- associateWithSequence = "1"
-)
-@ActionLayout(promptStyle = PromptStyle.INLINE, named = "Update")
-@RequiredArgsConstructor
-public class IsisImageHolder_updateReadOnlyProperty {
-
- private final IsisImageHolder holder;
-
- public IsisImageHolder act(Image newValue) {
- holder.setReadOnlyProperty(newValue);
- return holder;
- }
- public Image default0Act() {
- return holder.getReadOnlyProperty();
- }
-
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_updateReadOnlyPropertyWithChoices.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_updateReadOnlyPropertyWithChoices.java
deleted file mode 100644
index bd51193..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/holder/IsisImageHolder_updateReadOnlyPropertyWithChoices.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.holder;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-import javax.inject.Inject;
-
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.applib.annotation.PromptStyle;
-import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.value.Image;
-
-import lombok.RequiredArgsConstructor;
-
-import demoapp.dom.types.Samples;
-
-
-//tag::class[]
-@Action(
- semantics = SemanticsOf.IDEMPOTENT,
- associateWith = "readOnlyProperty",
- associateWithSequence = "2"
-)
-@ActionLayout(promptStyle = PromptStyle.INLINE, named = "Update with choices")
-@RequiredArgsConstructor
-public class IsisImageHolder_updateReadOnlyPropertyWithChoices {
-
- private final IsisImageHolder holder;
-
- public IsisImageHolder act(Image newValue) {
- holder.setReadOnlyProperty(newValue);
- return holder;
- }
- public Image default0Act() {
- return holder.getReadOnlyProperty();
- }
- public List<Image> choices0Act() {
- return samples.stream()
- .collect(Collectors.toList());
- }
-
- @Inject
- Samples<Image> samples;
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdo-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdo-description.adoc
deleted file mode 100644
index 1933c14..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdo-description.adoc
+++ /dev/null
@@ -1,20 +0,0 @@
-: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 ag [...]
-
-CAUTION: TODO - these notes may be incorrect.
-
-JDO supports `Image` out-of-the-box, so no special annotations are required.
-
-[source,java]
-----
-include::IsisImageJdo.java[tags=class]
-----
-<.> a no-arg constructor is introduced by JDO enhancer
-<.> required property as defined to JDO/DataNucleus.
-+
-Apache Isis assumes properties are mandatory, so no additional annotation is required.
-<.> directly editable property as defined to Apache Isis
-<.> optional property as defined to Apache Isis
-<.> optional property as defined to JDO/DataNucleus
-
-
-include::../IsisImages-common.adoc[]
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdo.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdo.java
deleted file mode 100644
index d91887a..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdo.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.jdo;
-
-import javax.jdo.annotations.Column;
-import javax.jdo.annotations.DatastoreIdentity;
-import javax.jdo.annotations.IdGeneratorStrategy;
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.PersistenceCapable;
-
-import org.apache.isis.applib.annotation.DomainObject;
-import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.Title;
-import org.apache.isis.applib.value.Image;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
-import demoapp.dom.types.isis.images.holder.IsisImageHolder2;
-
-//tag::class[]
-@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
-@DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
-@DomainObject(
- objectType = "demo.IsisImageJdo"
-)
-public class IsisImageJdo // <.>
- implements HasAsciiDocDescription, IsisImageHolder2 {
-
-//end::class[]
- public IsisImageJdo(Image initialValue) {
- this.readOnlyProperty = initialValue;
- this.readWriteProperty = initialValue;
- }
-
-//tag::class[]
- @Title(prepend = "Image JDO entity: ")
- @MemberOrder(name = "read-only-properties", sequence = "1")
- @Column(allowsNull = "false") // <.>
- @Getter @Setter
- private Image readOnlyProperty;
-
- @Property(editing = Editing.ENABLED) // <.>
- @MemberOrder(name = "editable-properties", sequence = "1")
- @Column(allowsNull = "false")
- @Getter @Setter
- private Image readWriteProperty;
-
- @Property(optionality = Optionality.OPTIONAL) // <.>
- @MemberOrder(name = "optional-properties", sequence = "1")
- @Column(allowsNull = "true") // <.>
- @Getter @Setter
- private Image readOnlyOptionalProperty;
-
- @Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
- @MemberOrder(name = "optional-properties", sequence = "2")
- @Column(allowsNull = "true")
- @Getter @Setter
- private Image readWriteOptionalProperty;
-
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdo.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdo.layout.xml
deleted file mode 100644
index b4a3b84..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdo.layout.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!-- 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. -->
-<bs3:grid
- xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd"
- xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3"
- xmlns:cpt="http://isis.apache.org/applib/layout/component"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
- <bs3:row>
- <bs3:col span="10" unreferencedActions="true">
- <cpt:domainObject />
- <cpt:action id="actionReturning"/>
- <cpt:action id="actionReturningCollection"/>
- <cpt:action id="rebuildMetamodel"/>
- </bs3:col>
- <bs3:col span="2">
- <cpt:fieldSet name="" id="sources" />
- </bs3:col>
- </bs3:row>
-
- <bs3:row>
- <bs3:col span="6">
- <cpt:fieldSet name="Read Only Properties" id="read-only-properties"/>
- <cpt:fieldSet name="Editable Properties" id="editable-properties"/>
- <cpt:fieldSet name="Optional Properties" id="optional-properties"/>
- <cpt:fieldSet name="Contributed by Mixins" id="contributed"/>
- <cpt:fieldSet name="@PropertyLayout(labelPosition=...)" id="label-positions"/>
- <cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
- </bs3:col>
- <bs3:col span="6">
- <cpt:fieldSet name="Description" id="description" >
- <cpt:action id="clearHints" position="PANEL" />
- <cpt:action id="downloadLayoutXml" position="PANEL_DROPDOWN"/>
- <cpt:action id="rebuildMetamodel" position="PANEL"/>
- <cpt:action id="downloadMetamodelXml" position="PANEL_DROPDOWN"/>
- <cpt:action id="inspectMetamodel" position="PANEL_DROPDOWN"/>
- <cpt:action id="downloadJdoMetadata" position="PANEL_DROPDOWN"/>
- <cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
- <cpt:property id="description"/>
- </cpt:fieldSet>
- </bs3:col>
- </bs3:row>
- <bs3:row>
- <bs3:col span="12" unreferencedCollections="true"/>
- </bs3:row>
-
-</bs3:grid>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdoEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdoEntities.java
deleted file mode 100644
index 4bf2375..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdoEntities.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.jdo;
-
-import java.util.List;
-import java.util.Optional;
-
-import javax.inject.Inject;
-
-import org.springframework.stereotype.Service;
-
-import org.apache.isis.applib.services.repository.RepositoryService;
-import org.apache.isis.applib.value.Image;
-
-import lombok.RequiredArgsConstructor;
-
-@Service
-@RequiredArgsConstructor(onConstructor_ = { @Inject })
-public class IsisImageJdoEntities {
-
- final RepositoryService repositoryService;
-
- public Optional<IsisImageJdo> find(final Image readOnlyProperty) {
- return repositoryService.firstMatch(IsisImageJdo.class, x -> x.getReadOnlyProperty() == readOnlyProperty);
- }
-
- public List<IsisImageJdo> all() {
- return repositoryService.allInstances(IsisImageJdo.class);
- }
-
-}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdoSeedService.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdoSeedService.java
deleted file mode 100644
index c06cc37..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/jdo/IsisImageJdoSeedService.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.jdo;
-
-import javax.inject.Inject;
-
-import org.springframework.stereotype.Service;
-
-import org.apache.isis.applib.services.repository.RepositoryService;
-import org.apache.isis.applib.value.Image;
-import org.apache.isis.testing.fixtures.applib.fixturescripts.FixtureScript;
-
-import demoapp.dom._infra.seed.SeedServiceAbstract;
-import demoapp.dom.types.Samples;
-
-@Service
-public class IsisImageJdoSeedService extends SeedServiceAbstract {
-
- public IsisImageJdoSeedService() {
- super(IsisImageJdoEntityFixture::new);
- }
-
- static class IsisImageJdoEntityFixture extends FixtureScript {
-
- @Override
- protected void execute(ExecutionContext executionContext) {
- samples.stream()
- .map(IsisImageJdo::new)
- .forEach(domainObject -> {
- repositoryService.persist(domainObject);
- executionContext.addResult(this, domainObject);
- });
- }
-
- @Inject RepositoryService repositoryService;
- @Inject Samples<Image> samples;
- }
-}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/samples/IsisImagesSamples.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/samples/IsisImagesSamples.java
deleted file mode 100644
index 71b71af..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/samples/IsisImagesSamples.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.samples;
-
-import java.util.stream.Stream;
-
-import javax.inject.Inject;
-
-import org.springframework.stereotype.Service;
-
-import org.apache.isis.applib.value.Image;
-
-import demoapp.dom.types.Samples;
-import demoapp.dom.types.javaawt.images.samples.JavaAwtImageService;
-import demoapp.dom.types.javaawt.images.samples.JavaAwtImagesSamples;
-
-@Service
-public class IsisImagesSamples implements Samples<Image> {
-
- @Override
- public Stream<Image> stream() {
- return javaAwtImagesSamples.stream()
- .map(javaAwtImageService::javaAwtImageToPixels)
- .map(org.apache.isis.applib.value.Image::new);
- }
-
-
- @Inject
- JavaAwtImagesSamples javaAwtImagesSamples;
-
- @Inject
- JavaAwtImageService javaAwtImageService;
-
-}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/vm/IsisImageVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/vm/IsisImageVm-description.adoc
deleted file mode 100644
index 102935f..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/vm/IsisImageVm-description.adoc
+++ /dev/null
@@ -1,16 +0,0 @@
-: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 ag [...]
-
-JAXB supports `Image` out-of-the-box, so no special annotations are required.
-
-[source,java]
-----
-include::IsisImageVm.java[tags=class]
-----
-<.> a no-arg constructor is required by JAXB
-<.> required property as defined to JAXB
-<.> directly editable property as defined to Apache Isis
-<.> optional property as defined to Apache Isis.
-+
-This is the default for JAXB so no additional annotation required.
-
-include::../IsisImages-common.adoc[]
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/vm/IsisImageVm.java b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/vm/IsisImageVm.java
deleted file mode 100644
index a38c02e..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/vm/IsisImageVm.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.
- */
-package demoapp.dom.types.isis.images.vm;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.apache.isis.applib.annotation.DomainObject;
-import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Nature;
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.Title;
-import org.apache.isis.applib.value.Image;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
-import demoapp.dom.types.isis.images.holder.IsisImageHolder2;
-
-//tag::class[]
-@XmlRootElement(name = "root")
-@XmlType
-@XmlAccessorType(XmlAccessType.FIELD)
-@DomainObject(
- nature=Nature.VIEW_MODEL,
- objectType = "demo.IsisImageVm"
-)
-@lombok.NoArgsConstructor // <.>
-public class IsisImageVm
- implements HasAsciiDocDescription, IsisImageHolder2 {
-
-//end::class[]
- public IsisImageVm(Image initialValue) {
- this.readOnlyProperty = initialValue;
- this.readWriteProperty = initialValue;
- }
-
-//tag::class[]
- @Title(prepend = "Image view model: ")
- @MemberOrder(name = "read-only-properties", sequence = "1")
- @XmlElement(required = true) // <.>
- @Getter @Setter
- private Image readOnlyProperty;
-
- @Property(editing = Editing.ENABLED) // <.>
- @MemberOrder(name = "editable-properties", sequence = "1")
- @XmlElement(required = true)
- @Getter @Setter
- private Image readWriteProperty;
-
- @Property(optionality = Optionality.OPTIONAL) // <.>
- @MemberOrder(name = "optional-properties", sequence = "1")
- @Getter @Setter
- private Image readOnlyOptionalProperty;
-
- @Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
- @MemberOrder(name = "optional-properties", sequence = "2")
- @Getter @Setter
- private Image readWriteOptionalProperty;
-
-}
-//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/vm/IsisImageVm.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/vm/IsisImageVm.layout.xml
deleted file mode 100644
index b4a3b84..0000000
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/isis/images/vm/IsisImageVm.layout.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!-- 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. -->
-<bs3:grid
- xsi:schemaLocation="http://isis.apache.org/applib/layout/component http://isis.apache.org/applib/layout/component/component.xsd http://isis.apache.org/applib/layout/grid/bootstrap3 http://isis.apache.org/applib/layout/grid/bootstrap3/bootstrap3.xsd"
- xmlns:bs3="http://isis.apache.org/applib/layout/grid/bootstrap3"
- xmlns:cpt="http://isis.apache.org/applib/layout/component"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
- <bs3:row>
- <bs3:col span="10" unreferencedActions="true">
- <cpt:domainObject />
- <cpt:action id="actionReturning"/>
- <cpt:action id="actionReturningCollection"/>
- <cpt:action id="rebuildMetamodel"/>
- </bs3:col>
- <bs3:col span="2">
- <cpt:fieldSet name="" id="sources" />
- </bs3:col>
- </bs3:row>
-
- <bs3:row>
- <bs3:col span="6">
- <cpt:fieldSet name="Read Only Properties" id="read-only-properties"/>
- <cpt:fieldSet name="Editable Properties" id="editable-properties"/>
- <cpt:fieldSet name="Optional Properties" id="optional-properties"/>
- <cpt:fieldSet name="Contributed by Mixins" id="contributed"/>
- <cpt:fieldSet name="@PropertyLayout(labelPosition=...)" id="label-positions"/>
- <cpt:fieldSet name="Other" id="other" unreferencedProperties="true"/>
- </bs3:col>
- <bs3:col span="6">
- <cpt:fieldSet name="Description" id="description" >
- <cpt:action id="clearHints" position="PANEL" />
- <cpt:action id="downloadLayoutXml" position="PANEL_DROPDOWN"/>
- <cpt:action id="rebuildMetamodel" position="PANEL"/>
- <cpt:action id="downloadMetamodelXml" position="PANEL_DROPDOWN"/>
- <cpt:action id="inspectMetamodel" position="PANEL_DROPDOWN"/>
- <cpt:action id="downloadJdoMetadata" position="PANEL_DROPDOWN"/>
- <cpt:action id="openRestApi" position="PANEL_DROPDOWN" />
- <cpt:property id="description"/>
- </cpt:fieldSet>
- </bs3:col>
- </bs3:row>
- <bs3:row>
- <bs3:col span="12" unreferencedCollections="true"/>
- </bs3:row>
-
-</bs3:grid>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/javaawt/images/holder/JavaAwtImageHolder_actionReturningCollection.java b/examples/demo/domain/src/main/java/demoapp/dom/types/javaawt/images/holder/JavaAwtImageHolder_actionReturningCollection.java
index 6742a41..5b42d80 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/javaawt/images/holder/JavaAwtImageHolder_actionReturningCollection.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/javaawt/images/holder/JavaAwtImageHolder_actionReturningCollection.java
@@ -18,6 +18,7 @@
*/
package demoapp.dom.types.javaawt.images.holder;
+import java.awt.image.BufferedImage;
import java.util.Collection;
import java.util.stream.Collectors;
@@ -25,7 +26,6 @@ import javax.inject.Inject;
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.applib.value.Image;
import lombok.RequiredArgsConstructor;
@@ -39,12 +39,12 @@ public class JavaAwtImageHolder_actionReturningCollection {
private final JavaAwtImageHolder holder;
- public Collection<Image> act() {
+ public Collection<BufferedImage> act() {
return samples.stream()
.collect(Collectors.toList());
}
@Inject
- Samples<Image> samples;
+ Samples<BufferedImage> samples;
}
//end::class[]
diff --git a/api/applib/src/main/java/org/apache/isis/applib/value/Image.java b/legacy/extensions/core/applib/src/main/java/org/apache/isis/legacy/applib/value/Image.java
similarity index 98%
rename from api/applib/src/main/java/org/apache/isis/applib/value/Image.java
rename to legacy/extensions/core/applib/src/main/java/org/apache/isis/legacy/applib/value/Image.java
index 4a8bf36..f333e3a 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/value/Image.java
+++ b/legacy/extensions/core/applib/src/main/java/org/apache/isis/legacy/applib/value/Image.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.isis.applib.value;
+package org.apache.isis.legacy.applib.value;
import java.io.Serializable;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/value/image/ImageValueFacetUsingSemanticsProviderFactory.java b/legacy/extensions/core/metamodel/src/main/java/org/apache/isis/legacy/metamodel/facets/value/image/ImageValueFacetUsingSemanticsProviderFactory.java
similarity index 89%
rename from core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/value/image/ImageValueFacetUsingSemanticsProviderFactory.java
rename to legacy/extensions/core/metamodel/src/main/java/org/apache/isis/legacy/metamodel/facets/value/image/ImageValueFacetUsingSemanticsProviderFactory.java
index 9e3878d..b8521f2 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/value/image/ImageValueFacetUsingSemanticsProviderFactory.java
+++ b/legacy/extensions/core/metamodel/src/main/java/org/apache/isis/legacy/metamodel/facets/value/image/ImageValueFacetUsingSemanticsProviderFactory.java
@@ -17,11 +17,11 @@
* under the License.
*/
-package org.apache.isis.core.metamodel.facets.value.image;
+package org.apache.isis.legacy.metamodel.facets.value.image;
-import org.apache.isis.applib.value.Image;
import org.apache.isis.core.metamodel.facetapi.FacetHolder;
import org.apache.isis.core.metamodel.facets.object.value.vsp.ValueFacetUsingSemanticsProviderFactory;
+import org.apache.isis.legacy.applib.value.Image;
public class ImageValueFacetUsingSemanticsProviderFactory extends ValueFacetUsingSemanticsProviderFactory<Image> {
@@ -34,7 +34,7 @@ public class ImageValueFacetUsingSemanticsProviderFactory extends ValueFacetUsin
final Class<?> type = processClassContext.getCls();
final FacetHolder holder = processClassContext.getFacetHolder();
- if (type != org.apache.isis.applib.value.Image.class) {
+ if (type != org.apache.isis.legacy.applib.value.Image.class) {
return;
}
addFacets(new ImageValueSemanticsProvider(holder));
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/value/image/ImageValueSemanticsProvider.java b/legacy/extensions/core/metamodel/src/main/java/org/apache/isis/legacy/metamodel/facets/value/image/ImageValueSemanticsProvider.java
similarity index 93%
rename from core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/value/image/ImageValueSemanticsProvider.java
rename to legacy/extensions/core/metamodel/src/main/java/org/apache/isis/legacy/metamodel/facets/value/image/ImageValueSemanticsProvider.java
index fdb88b3..9e244a5 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/value/image/ImageValueSemanticsProvider.java
+++ b/legacy/extensions/core/metamodel/src/main/java/org/apache/isis/legacy/metamodel/facets/value/image/ImageValueSemanticsProvider.java
@@ -17,15 +17,16 @@
* under the License.
*/
-package org.apache.isis.core.metamodel.facets.value.image;
+package org.apache.isis.legacy.metamodel.facets.value.image;
import java.awt.Graphics2D;
-import org.apache.isis.applib.value.Image;
import org.apache.isis.commons.internal.image._Images;
import org.apache.isis.core.metamodel.facetapi.Facet;
import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.value.image.ImageValueSemanticsProviderAbstract;
import org.apache.isis.core.metamodel.spec.ManagedObject;
+import org.apache.isis.legacy.applib.value.Image;
import lombok.val;
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/value/ImageValueSemanticsProviderTest.java b/legacy/extensions/core/metamodel/src/test/java/org/apache/isis/legacy/metamodel/facets/value/ImageValueSemanticsProviderTest.java
similarity index 92%
rename from core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/value/ImageValueSemanticsProviderTest.java
rename to legacy/extensions/core/metamodel/src/test/java/org/apache/isis/legacy/metamodel/facets/value/ImageValueSemanticsProviderTest.java
index d63fde9..81c978c 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/value/ImageValueSemanticsProviderTest.java
+++ b/legacy/extensions/core/metamodel/src/test/java/org/apache/isis/legacy/metamodel/facets/value/ImageValueSemanticsProviderTest.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.isis.core.metamodel.facets.value;
+package org.apache.isis.legacy.metamodel.facets.value;
import org.jmock.auto.Mock;
import org.junit.Before;
@@ -26,11 +26,11 @@ import org.junit.Test;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
-import org.apache.isis.applib.value.Image;
import org.apache.isis.core.internaltestsupport.jmocking.JUnitRuleMockery2;
import org.apache.isis.core.internaltestsupport.jmocking.JUnitRuleMockery2.Mode;
import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.value.image.ImageValueSemanticsProvider;
+import org.apache.isis.legacy.applib.value.Image;
+import org.apache.isis.legacy.metamodel.facets.value.image.ImageValueSemanticsProvider;
import lombok.val;
diff --git a/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/datanucleus/typeconverters/applib/IsisImageConverter.java b/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/datanucleus/typeconverters/applib/IsisImageConverter.java
deleted file mode 100644
index c8671bb..0000000
--- a/persistence/jdo/datanucleus-5/src/main/java/org/apache/isis/persistence/jdo/datanucleus5/datanucleus/typeconverters/applib/IsisImageConverter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.
- */
-package org.apache.isis.persistence.jdo.datanucleus5.datanucleus.typeconverters.applib;
-
-import org.datanucleus.exceptions.NucleusDataStoreException;
-import org.datanucleus.store.types.converters.TypeConverter;
-
-import org.apache.isis.applib.value.Image;
-import org.apache.isis.commons.internal.base._NullSafe;
-import org.apache.isis.commons.internal.image._Images;
-
-public class IsisImageConverter implements TypeConverter<Image, byte[]>{
-
- // generated
- private static final long serialVersionUID = -5699486454335966738L;
-
- @Override
- public byte[] toDatastoreType(Image image) {
- if (image == null) {
- return null;
- }
- try {
- return _Images.toBytes(_Images.fromPixels(image.getPixels()));
- } catch (Exception e) {
- throw new NucleusDataStoreException("Error serialising object of type org.apache.isis.applib.value.Image to byte array", e);
- }
- }
-
- @Override
- public Image toMemberType(byte[] datastoreValue) {
- if (_NullSafe.size(datastoreValue) == 0) {
- return null;
- }
- try {
- return new Image(_Images.toPixels(_Images.fromBytes(datastoreValue)));
- } catch (Exception e) {
- throw new NucleusDataStoreException("Error deserialising datastoreValue into org.apache.isis.applib.value.Image", e);
- }
- }
-
-
-}
diff --git a/persistence/jdo/datanucleus-5/src/main/resources/plugin.xml b/persistence/jdo/datanucleus-5/src/main/resources/plugin.xml
index 35a4c3f..af4e0ef 100644
--- a/persistence/jdo/datanucleus-5/src/main/resources/plugin.xml
+++ b/persistence/jdo/datanucleus-5/src/main/resources/plugin.xml
@@ -76,13 +76,6 @@
<extension point="org.datanucleus.java_type">
<java-type
- name="org.apache.isis.applib.value.Image"
- dfg="true" priority="10"
- converter-name="isis.image-bytearray" />
- </extension>
-
- <extension point="org.datanucleus.java_type">
- <java-type
name="java.awt.image.BufferedImage"
dfg="true" priority="10"
converter-name="isis.bufferedimage-bytearray" />
@@ -174,14 +167,6 @@
<extension point="org.datanucleus.type_converter">
<type-converter
- name="isis.image-bytearray"
- member-type="org.apache.isis.applib.value.Image"
- datastore-type="[B"
- converter-class="org.apache.isis.persistence.jdo.datanucleus5.datanucleus.typeconverters.applib.IsisImageConverter"/>
- </extension>
-
- <extension point="org.datanucleus.type_converter">
- <type-converter
name="isis.password-string"
member-type="org.apache.isis.applib.value.Password"
datastore-type="java.lang.String"