You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2017/10/06 08:35:46 UTC
[isis] 05/13: ISIS-1742: removes Bounded marker interface
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 2cef4b7c1dec6bee1a41ae98d84d80c3abbae996
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Oct 5 15:55:21 2017 +0300
ISIS-1742: removes Bounded marker interface
---
.../org/apache/isis/applib/marker/Bounded.java | 32 -----------
.../choices/ChoicesFacetFromBoundedAbstract.java | 1 -
.../ChoicesFacetFromBoundedMarkerInterface.java | 38 -------------
...icesFacetFromBoundedMarkerInterfaceFactory.java | 66 ----------------------
.../dflt/ProgrammingModelFacetsJava5.java | 2 -
...FacetFromBoundedMarkerInterfaceFactoryTest.java | 61 --------------------
todo-deprecation-list.txt | 3 +-
7 files changed, 2 insertions(+), 201 deletions(-)
diff --git a/core/applib/src/main/java/org/apache/isis/applib/marker/Bounded.java b/core/applib/src/main/java/org/apache/isis/applib/marker/Bounded.java
deleted file mode 100644
index 15be01f..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/marker/Bounded.java
+++ /dev/null
@@ -1,32 +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.applib.marker;
-
-/**
- * Marker interface to indicate that a class has a static set of instances; they
- * are loaded on first use and are not refreshed.
- *
- * Use {@link Bounded} annotation in preference to this marker interface.
- *
- * @deprecated
- */
-@Deprecated
-public interface Bounded {
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/choices/ChoicesFacetFromBoundedAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/choices/ChoicesFacetFromBoundedAbstract.java
index 99a605b..a7b675d 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/choices/ChoicesFacetFromBoundedAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/choices/ChoicesFacetFromBoundedAbstract.java
@@ -25,7 +25,6 @@ import com.google.common.collect.Lists;
import org.apache.isis.applib.events.UsabilityEvent;
import org.apache.isis.applib.events.ValidityEvent;
-import org.apache.isis.applib.marker.Bounded;
import org.apache.isis.applib.query.Query;
import org.apache.isis.applib.query.QueryFindAllInstances;
import org.apache.isis.core.commons.authentication.AuthenticationSession;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/choices/boundedmarkerifc/ChoicesFacetFromBoundedMarkerInterface.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/choices/boundedmarkerifc/ChoicesFacetFromBoundedMarkerInterface.java
deleted file mode 100644
index 4e27bac..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/choices/boundedmarkerifc/ChoicesFacetFromBoundedMarkerInterface.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.core.metamodel.facets.object.choices.boundedmarkerifc;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSessionProvider;
-import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.object.choices.ChoicesFacetFromBoundedAbstract;
-import org.apache.isis.core.metamodel.services.persistsession.PersistenceSessionServiceInternal;
-
-public class ChoicesFacetFromBoundedMarkerInterface extends ChoicesFacetFromBoundedAbstract {
-
- public ChoicesFacetFromBoundedMarkerInterface(
- final FacetHolder holder,
- final DeploymentCategory deploymentCategory,
- final AuthenticationSessionProvider authenticationSessionProvider,
- final PersistenceSessionServiceInternal persistenceSessionServiceInternal) {
- super(holder, deploymentCategory, authenticationSessionProvider, persistenceSessionServiceInternal);
- }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/choices/boundedmarkerifc/ChoicesFacetFromBoundedMarkerInterfaceFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/choices/boundedmarkerifc/ChoicesFacetFromBoundedMarkerInterfaceFactory.java
deleted file mode 100644
index 756dbf8..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/choices/boundedmarkerifc/ChoicesFacetFromBoundedMarkerInterfaceFactory.java
+++ /dev/null
@@ -1,66 +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.core.metamodel.facets.object.choices.boundedmarkerifc;
-
-import java.lang.reflect.Method;
-
-import org.apache.isis.applib.marker.Bounded;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.objectvalue.choices.ChoicesFacet;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.services.persistsession.PersistenceSessionServiceInternal;
-
-public class ChoicesFacetFromBoundedMarkerInterfaceFactory extends FacetFactoryAbstract {
-
- private PersistenceSessionServiceInternal persistenceSessionServiceInternal;
-
- public ChoicesFacetFromBoundedMarkerInterfaceFactory() {
- super(FeatureType.OBJECTS_ONLY);
- }
-
- @Override
- public void process(final ProcessClassContext processClassContaxt) {
- final boolean implementsMarker = Bounded.class.isAssignableFrom(processClassContaxt.getCls());
- FacetUtil.addFacet(create(implementsMarker, processClassContaxt.getFacetHolder()));
- }
-
- private ChoicesFacet create(
- final boolean implementsMarker,
- final FacetHolder holder) {
- return implementsMarker
- ? new ChoicesFacetFromBoundedMarkerInterface(
- holder, getDeploymentCategory(), getAuthenticationSessionProvider(),
- persistenceSessionServiceInternal) : null;
- }
-
- public boolean recognizes(final Method method) {
- return false;
- }
-
- @Override
- public void setServicesInjector(final ServicesInjector servicesInjector) {
- super.setServicesInjector(servicesInjector);
- this.persistenceSessionServiceInternal = servicesInjector.getPersistenceSessionServiceInternal();
- }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java b/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
index fa124cc..ac13063 100644
--- a/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
+++ b/core/metamodel/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
@@ -64,7 +64,6 @@ import org.apache.isis.core.metamodel.facets.object.callbacks.PersistCallbackFac
import org.apache.isis.core.metamodel.facets.object.callbacks.PersistCallbackViaSaveMethodFacetFactory;
import org.apache.isis.core.metamodel.facets.object.callbacks.RemoveCallbackFacetFactory;
import org.apache.isis.core.metamodel.facets.object.callbacks.UpdateCallbackFacetFactory;
-import org.apache.isis.core.metamodel.facets.object.choices.boundedmarkerifc.ChoicesFacetFromBoundedMarkerInterfaceFactory;
import org.apache.isis.core.metamodel.facets.object.choices.enums.EnumFacetUsingValueFacetUsingSemanticsProviderFactory;
import org.apache.isis.core.metamodel.facets.object.cssclass.method.CssClassFacetMethodFactory;
import org.apache.isis.core.metamodel.facets.object.defaults.annotcfg.DefaultedFacetAnnotationElseConfigurationFactory;
@@ -282,7 +281,6 @@ public final class ProgrammingModelFacetsJava5 extends ProgrammingModelAbstract
addFactory(new BookmarkPolicyFacetViaBookmarkableAnnotationElseFallbackFactory());
addFactory(new HomePageFacetAnnotationFactory());
- addFactory(new ChoicesFacetFromBoundedMarkerInterfaceFactory());
addFactory(new DefaultedFacetAnnotationElseConfigurationFactory());
addFactory(new PropertyDefaultFacetDerivedFromTypeFactory());
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/bounded/ChoicesFacetFromBoundedMarkerInterfaceFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/bounded/ChoicesFacetFromBoundedMarkerInterfaceFactoryTest.java
deleted file mode 100644
index f8db4f9..0000000
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/bounded/ChoicesFacetFromBoundedMarkerInterfaceFactoryTest.java
+++ /dev/null
@@ -1,61 +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.core.metamodel.facets.object.bounded;
-
-import org.apache.isis.applib.marker.Bounded;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryTest;
-import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessClassContext;
-import org.apache.isis.core.metamodel.facets.object.choices.ChoicesFacetFromBoundedAbstract;
-import org.apache.isis.core.metamodel.facets.object.choices.boundedmarkerifc.ChoicesFacetFromBoundedMarkerInterfaceFactory;
-import org.apache.isis.core.metamodel.facets.objectvalue.choices.ChoicesFacet;
-
-public class ChoicesFacetFromBoundedMarkerInterfaceFactoryTest extends AbstractFacetFactoryTest {
-
- private ChoicesFacetFromBoundedMarkerInterfaceFactory facetFactory;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- facetFactory = new ChoicesFacetFromBoundedMarkerInterfaceFactory();
- facetFactory.setServicesInjector(stubServicesInjector);
- }
-
- @Override
- protected void tearDown() throws Exception {
- facetFactory = null;
- super.tearDown();
- }
-
- public void testBoundedInterfaceAnnotationPickedUpOnClass() {
- class Customer implements Bounded {
- }
-
- facetFactory.process(new ProcessClassContext(Customer.class, methodRemover, facetedMethod));
-
- final Facet facet = facetedMethod.getFacet(ChoicesFacet.class);
- assertNotNull(facet);
- assertTrue(facet instanceof ChoicesFacetFromBoundedAbstract);
-
- assertNoMethodsRemoved();
- }
-
-}
diff --git a/todo-deprecation-list.txt b/todo-deprecation-list.txt
index 79373c9..4976002 100644
--- a/todo-deprecation-list.txt
+++ b/todo-deprecation-list.txt
@@ -81,6 +81,8 @@ org.apache.isis.applib.annotation
org.apache.isis.applib.marker
+ Bounded.java
+
NotPersistable.java
ProgramPersistable.java
@@ -176,7 +178,6 @@ org.apache.isis.applib.fixturescripts
org.apache.isis.applib.marker - remove these marker interaces (tend to use annotations in preference)
Auditable.java
- Bounded.java
org.apache.isis.applib.services.actinvoc
--
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.