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/05 11:20:44 UTC

[isis] 01/02: ISIS-1742: removes @Aggregated annotation, updates .adocs

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 df537139162fea5897f9529aea771a15f149d7ab
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Oct 5 14:15:56 2017 +0300

    ISIS-1742: removes @Aggregated annotation, updates .adocs
---
 .../asciidoc/guides/rgant/_rgant_aaa_partial.adoc  |  7 --
 .../applib/adapters/ValueSemanticsProvider.java    |  1 -
 .../apache/isis/applib/annotation/Aggregated.java  | 36 ----------
 .../aggregated/AggregatedAnnotationFactory.java    | 76 ----------------------
 .../dflt/ProgrammingModelFacetsJava5.java          |  3 -
 .../AggregatedAnnotationFactory.java               |  1 -
 .../ViewModelSemanticCheckingFacetFactoryTest.java |  1 +
 .../AggregatedAnnotationFactoryTest.java           | 58 -----------------
 .../runtime/persistence/AggregatedFacetAlways.java | 32 ---------
 example/application/helloworld/pom.xml             |  2 +-
 example/application/simpleapp/pom.xml              |  2 +-
 todo-deprecation-list.txt                          |  6 +-
 12 files changed, 8 insertions(+), 217 deletions(-)

diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_partial.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_partial.adoc
index 41b7ab9..ee0c0f6 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_partial.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_partial.adoc
@@ -15,13 +15,6 @@ These annotations have only incomplete/partial support, primarily relating to th
 |Purpose
 |Layer
 
-|`@Aggregated`
-|Indicates that the object is aggregated, or wholly owned, by a root object. +
-
-This information could in theory provide useful semantics for some object store implementations, eg to store the aggregated objects "inline".  +
-
-Currently neither the JDO ObjectStore nor any of the viewers exploit this metadata.
-|Domain, Persistence
 
 |`@Defaulted`
 |Indicates that a (value) class has a default value. +
diff --git a/core/applib/src/main/java/org/apache/isis/applib/adapters/ValueSemanticsProvider.java b/core/applib/src/main/java/org/apache/isis/applib/adapters/ValueSemanticsProvider.java
index c062cba..7bc6e5f 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/adapters/ValueSemanticsProvider.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/adapters/ValueSemanticsProvider.java
@@ -21,7 +21,6 @@ package org.apache.isis.applib.adapters;
 
 import java.math.BigDecimal;
 
-import org.apache.isis.applib.annotation.Aggregated;
 import org.apache.isis.applib.annotation.Defaulted;
 import org.apache.isis.applib.annotation.Encodable;
 import org.apache.isis.applib.annotation.EqualByContent;
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Aggregated.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Aggregated.java
deleted file mode 100644
index 802016b..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Aggregated.java
+++ /dev/null
@@ -1,36 +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.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * @deprecated - this annotation is no longer supported; the framework will throw a validation exception (and fail-fast) if the annotation is found.
- */
-@Deprecated
-@Inherited
-@Target({ ElementType.TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Aggregated {
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/parented/aggregated/AggregatedAnnotationFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/parented/aggregated/AggregatedAnnotationFactory.java
deleted file mode 100644
index 0780302..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/parented/aggregated/AggregatedAnnotationFactory.java
+++ /dev/null
@@ -1,76 +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.parented.aggregated;
-
-import java.util.List;
-
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.annotation.Aggregated;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facetapi.MetaModelValidatorRefiner;
-import org.apache.isis.core.metamodel.facets.Annotations;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.progmodel.DeprecatedMarker;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorAbstract;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorComposite;
-import org.apache.isis.core.metamodel.specloader.validator.ValidationFailures;
-
-/**
- * The {@link Aggregated @Aggregated} annotation is no longer supported; this facet factory prevents its use.
- *
- * @deprecated
- */
-@Deprecated
-public class AggregatedAnnotationFactory extends FacetFactoryAbstract implements
-        MetaModelValidatorRefiner, DeprecatedMarker {
-
-    public AggregatedAnnotationFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    final List<String> classesWithAnnotation = Lists.newArrayList();
-
-    @Override
-    public void process(final ProcessClassContext processClassContext) {
-        final Class<?> cls = processClassContext.getCls();
-        final Aggregated annotation = Annotations.getAnnotation(cls, Aggregated.class);
-        if(annotation != null) {
-            classesWithAnnotation.add(cls.getName());
-        }
-    }
-
-    @Override
-    public void refineMetaModelValidator(
-            final MetaModelValidatorComposite metaModelValidator,
-            final IsisConfiguration configuration) {
-
-        metaModelValidator.add(new MetaModelValidatorAbstract() {
-            @Override
-            public void validate(final ValidationFailures validationFailures) {
-                for (String className : classesWithAnnotation) {
-                    validationFailures.add("%s has @Aggregated annotation, which is no longer supported.",
-                            className);
-                }
-            }
-        });
-    }
-}
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 3a8739d..cb592dd 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
@@ -95,7 +95,6 @@ import org.apache.isis.core.metamodel.facets.object.notpersistable.notpersistabl
 import org.apache.isis.core.metamodel.facets.object.notpersistable.notpersistablemarkerifc.NotPersistableFacetMarkerInterfaceFactory;
 import org.apache.isis.core.metamodel.facets.object.objectspecid.classname.ObjectSpecIdFacetDerivedFromClassNameFactory;
 import org.apache.isis.core.metamodel.facets.object.objectvalidprops.impl.ObjectValidPropertiesFacetImplFactory;
-import org.apache.isis.core.metamodel.facets.object.parented.aggregated.AggregatedAnnotationFactory;
 import org.apache.isis.core.metamodel.facets.object.parseable.annotcfg.ParseableFacetAnnotationElseConfigurationFactory;
 import org.apache.isis.core.metamodel.facets.object.plural.staticmethod.PluralFacetStaticMethodFactory;
 import org.apache.isis.core.metamodel.facets.object.recreatable.DisabledFacetOnCollectionDerivedFromViewModelFacetFactory;
@@ -284,8 +283,6 @@ public final class ProgrammingModelFacetsJava5 extends ProgrammingModelAbstract
         
         addFactory(new MemberGroupLayoutFacetFactory());
 
-        addFactory(new AggregatedAnnotationFactory());
-        
         addFactory(new BookmarkPolicyFacetViaBookmarkableAnnotationElseFallbackFactory());
         addFactory(new HomePageFacetAnnotationFactory());
         addFactory(new ChoicesFacetFromBoundedMarkerInterfaceFactory());
diff --git a/core/metamodel/src/main/src-archived/progmodel-facets/AggregatedAnnotationFactory.java b/core/metamodel/src/main/src-archived/progmodel-facets/AggregatedAnnotationFactory.java
index e80d504..98b8083 100644
--- a/core/metamodel/src/main/src-archived/progmodel-facets/AggregatedAnnotationFactory.java
+++ b/core/metamodel/src/main/src-archived/progmodel-facets/AggregatedAnnotationFactory.java
@@ -20,7 +20,6 @@
 
 
 
-import org.apache.isis.applib.annotation.Aggregated;
 import org.apache.isis.noa.annotations.AggregatedAnnotation;
 import org.apache.isis.noa.annotations.Annotation;
 
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/ViewModelSemanticCheckingFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/ViewModelSemanticCheckingFacetFactoryTest.java
index 4f601c3..f006ed1 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/ViewModelSemanticCheckingFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/ViewModelSemanticCheckingFacetFactoryTest.java
@@ -46,6 +46,7 @@ public class ViewModelSemanticCheckingFacetFactoryTest {
     @Mock
     private IsisConfigurationDefault mockConfiguration;
 
+
     @Mock
     private ServicesInjector mockServicesInjector;
 
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/parented/aggregated/AggregatedAnnotationFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/parented/aggregated/AggregatedAnnotationFactoryTest.java
deleted file mode 100644
index 4103c26..0000000
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/parented/aggregated/AggregatedAnnotationFactoryTest.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.core.metamodel.facets.object.parented.aggregated;
-
-import org.apache.isis.applib.annotation.Aggregated;
-import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryTest;
-import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessClassContext;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class AggregatedAnnotationFactoryTest extends AbstractFacetFactoryTest {
-
-    private AggregatedAnnotationFactory facetFactory;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        facetFactory = new AggregatedAnnotationFactory();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        facetFactory = null;
-        super.tearDown();
-    }
-
-    public void testAggregatedAnnotationPickedUpOnClass() {
-        @Aggregated
-        class Customer {
-        }
-
-        facetFactory.process(new ProcessClassContext(Customer.class, methodRemover, facetedMethod));
-
-        assertThat(facetFactory.classesWithAnnotation.size(), is(1));
-    }
-
-
-
-}
diff --git a/core/runtime/src/test/java/org/apache/isis/core/runtime/persistence/AggregatedFacetAlways.java b/core/runtime/src/test/java/org/apache/isis/core/runtime/persistence/AggregatedFacetAlways.java
deleted file mode 100644
index 7d175d3..0000000
--- a/core/runtime/src/test/java/org/apache/isis/core/runtime/persistence/AggregatedFacetAlways.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.core.runtime.persistence;
-
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.MarkerFacetAbstract;
-import org.apache.isis.core.metamodel.facets.object.parented.ParentedCollectionFacet;
-
-public class AggregatedFacetAlways extends MarkerFacetAbstract {
-
-    public AggregatedFacetAlways(final FacetHolder holder) {
-        super(ParentedCollectionFacet.class, holder);
-    }
-
-}
diff --git a/example/application/helloworld/pom.xml b/example/application/helloworld/pom.xml
index 646de10..ecbd029 100644
--- a/example/application/helloworld/pom.xml
+++ b/example/application/helloworld/pom.xml
@@ -36,7 +36,7 @@
     <packaging>war</packaging>
 
     <properties>
-        <isis.version>1.15.1</isis.version>
+        <isis.version>1.16.0-SNAPSHOT</isis.version>
 
         <lombok.version>1.16.18</lombok.version>
 
diff --git a/example/application/simpleapp/pom.xml b/example/application/simpleapp/pom.xml
index 9ee473a..bbe8d71 100644
--- a/example/application/simpleapp/pom.xml
+++ b/example/application/simpleapp/pom.xml
@@ -40,7 +40,7 @@
     </prerequisites>
 
     <properties>
-        <isis.version>1.15.1</isis.version>
+        <isis.version>1.16.0-SNAPSHOT</isis.version>
 
         <lombok.version>1.16.18</lombok.version>
 
diff --git a/todo-deprecation-list.txt b/todo-deprecation-list.txt
index d02c1bd..2e0a877 100644
--- a/todo-deprecation-list.txt
+++ b/todo-deprecation-list.txt
@@ -15,6 +15,8 @@ org.apache.isis.applib
         CollectionDomainEvent - the N arg constructors (just use the 0-arg ones)
         PropertyDomainEvent  - the N arg constructors (just use the 0-arg ones)
 
+
+
 org.apache.isis.applib.annotation
 
     ActionInteraction.java  - entire annotation, use @Action(domainEvent=...)
@@ -41,6 +43,9 @@ org.apache.isis.applib.annotation
     ActionOrder.java - entire annotation, use @MemberOrder instead
     FieldOrder.java - entire annotation, use @MemberOrder instead
 
+    Aggregated.java - entire annotation, not supported internally
+
+
     CollectionLayout.java
         render() - use @CollectionLayout(defaultView=...) instead
     RenderType.java - supporting enum for @Render annotation
@@ -88,7 +93,6 @@ org.apache.isis.applib.annotation
 
 
 
-    Aggregated.java - entire annotation, not supported internally
     NotPersistable.java - entire annotation, not supported and does nothing
 
     AutoComplete.java - entire annotation, use @DomainObject(autoComplete...=...)

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.