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 2021/11/19 06:18:29 UTC
[isis] 02/02: ISIS-2882: remove Bookmark- and OidDtoConverterWkt, as we can now use a generic one
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
commit 570508c6c6431dda9cdc958462923373c996ee9f
Author: andi-huber <ah...@apache.org>
AuthorDate: Fri Nov 19 07:16:16 2021 +0100
ISIS-2882: remove Bookmark- and OidDtoConverterWkt, as we can now use a
generic one
---
.../model/converter/BookmarkConverterWkt.java | 38 ----------------------
.../wicket/model/converter/OidDtoConverterWkt.java | 38 ----------------------
...arPanelTextFieldWithValueSemanticsAbstract.java | 2 +-
.../components/scalars/bookmark/BookmarkPanel.java | 18 ++--------
.../ui/components/scalars/oiddto/OidDtoPanel.java | 18 ++--------
5 files changed, 5 insertions(+), 109 deletions(-)
diff --git a/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/converter/BookmarkConverterWkt.java b/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/converter/BookmarkConverterWkt.java
deleted file mode 100644
index 00de35a..0000000
--- a/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/converter/BookmarkConverterWkt.java
+++ /dev/null
@@ -1,38 +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.viewer.wicket.model.converter;
-
-import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.core.metamodel.commons.ScalarRepresentation;
-import org.apache.isis.core.metamodel.spec.feature.ObjectFeature;
-
-import lombok.NonNull;
-
-public class BookmarkConverterWkt
-extends ConverterBasedOnValueSemantics<Bookmark> {
-
- private static final long serialVersionUID = 1L;
-
- public BookmarkConverterWkt(
- final @NonNull ObjectFeature objFeature,
- final @NonNull ScalarRepresentation scalarRepresentation) {
- super(objFeature, scalarRepresentation);
- }
-
-}
\ No newline at end of file
diff --git a/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/converter/OidDtoConverterWkt.java b/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/converter/OidDtoConverterWkt.java
deleted file mode 100644
index a0b36cd..0000000
--- a/viewers/wicket/model/src/main/java/org/apache/isis/viewer/wicket/model/converter/OidDtoConverterWkt.java
+++ /dev/null
@@ -1,38 +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.viewer.wicket.model.converter;
-
-import org.apache.isis.core.metamodel.commons.ScalarRepresentation;
-import org.apache.isis.core.metamodel.spec.feature.ObjectFeature;
-import org.apache.isis.schema.common.v2.OidDto;
-
-import lombok.NonNull;
-
-public class OidDtoConverterWkt
-extends ConverterBasedOnValueSemantics<OidDto> {
-
- private static final long serialVersionUID = 1L;
-
- public OidDtoConverterWkt(
- final @NonNull ObjectFeature objFeature,
- final @NonNull ScalarRepresentation scalarRepresentation) {
- super(objFeature, scalarRepresentation);
- }
-
-}
\ No newline at end of file
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldWithValueSemanticsAbstract.java b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldWithValueSemanticsAbstract.java
index b8301a9..a947caa 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldWithValueSemanticsAbstract.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldWithValueSemanticsAbstract.java
@@ -47,7 +47,7 @@ extends ScalarPanelTextFieldAbstract<T> {
}
@Override
- protected IConverter<T> getConverter(
+ protected final IConverter<T> getConverter(
final @NonNull ObjectFeature propOrParam,
final @NonNull ScalarRepresentation scalarRepresentation) {
return new ConverterBasedOnValueSemantics<>(propOrParam, scalarRepresentation);
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/bookmark/BookmarkPanel.java b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/bookmark/BookmarkPanel.java
index e5a633d..4a65dde 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/bookmark/BookmarkPanel.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/bookmark/BookmarkPanel.java
@@ -18,22 +18,15 @@
*/
package org.apache.isis.viewer.wicket.ui.components.scalars.bookmark;
-import org.apache.wicket.util.convert.IConverter;
-
import org.apache.isis.applib.services.bookmark.Bookmark;
-import org.apache.isis.core.metamodel.commons.ScalarRepresentation;
-import org.apache.isis.core.metamodel.spec.feature.ObjectFeature;
-import org.apache.isis.viewer.wicket.model.converter.BookmarkConverterWkt;
import org.apache.isis.viewer.wicket.model.models.ScalarModel;
-import org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelTextFieldAbstract;
-
-import lombok.NonNull;
+import org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelTextFieldWithValueSemanticsAbstract;
/**
* Panel for rendering scalars of type {@link Bookmark}.
*/
public class BookmarkPanel
-extends ScalarPanelTextFieldAbstract<Bookmark> {
+extends ScalarPanelTextFieldWithValueSemanticsAbstract<Bookmark> {
private static final long serialVersionUID = 1L;
@@ -41,11 +34,4 @@ extends ScalarPanelTextFieldAbstract<Bookmark> {
super(id, scalarModel, Bookmark.class);
}
- @Override
- protected IConverter<Bookmark> getConverter(
- final @NonNull ObjectFeature propOrParam,
- final @NonNull ScalarRepresentation scalarRepresentation) {
- return new BookmarkConverterWkt(propOrParam, scalarRepresentation);
- }
-
}
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/oiddto/OidDtoPanel.java b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/oiddto/OidDtoPanel.java
index 4be9eff..4b8359d 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/oiddto/OidDtoPanel.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/oiddto/OidDtoPanel.java
@@ -18,22 +18,15 @@
*/
package org.apache.isis.viewer.wicket.ui.components.scalars.oiddto;
-import org.apache.wicket.util.convert.IConverter;
-
-import org.apache.isis.core.metamodel.commons.ScalarRepresentation;
-import org.apache.isis.core.metamodel.spec.feature.ObjectFeature;
import org.apache.isis.schema.common.v2.OidDto;
-import org.apache.isis.viewer.wicket.model.converter.OidDtoConverterWkt;
import org.apache.isis.viewer.wicket.model.models.ScalarModel;
-import org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelTextFieldAbstract;
-
-import lombok.NonNull;
+import org.apache.isis.viewer.wicket.ui.components.scalars.ScalarPanelTextFieldWithValueSemanticsAbstract;
/**
* Panel for rendering scalars of type {@link org.apache.isis.schema.common.v2.OidDto}.
*/
public class OidDtoPanel
-extends ScalarPanelTextFieldAbstract<OidDto> {
+extends ScalarPanelTextFieldWithValueSemanticsAbstract<OidDto> {
private static final long serialVersionUID = 1L;
@@ -41,11 +34,4 @@ extends ScalarPanelTextFieldAbstract<OidDto> {
super(id, scalarModel, OidDto.class);
}
- @Override
- protected IConverter<OidDto> getConverter(
- final @NonNull ObjectFeature propOrParam,
- final @NonNull ScalarRepresentation scalarRepresentation) {
- return new OidDtoConverterWkt(propOrParam, scalarRepresentation);
- }
-
}