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/04 03:37:34 UTC
[isis] branch dev/2.0.0/ISIS-1742-remove-deprecations updated:
ISIS-1742: deletes @Plural annotatoin and supporting facets and factories.
Updates .adoc
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
The following commit(s) were added to refs/heads/dev/2.0.0/ISIS-1742-remove-deprecations by this push:
new d5b939b ISIS-1742: deletes @Plural annotatoin and supporting facets and factories. Updates .adoc
d5b939b is described below
commit d5b939b2cc55a6e3226e340b5db458dfd25dd291
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Oct 4 04:37:20 2017 +0100
ISIS-1742: deletes @Plural annotatoin and supporting facets and factories. Updates .adoc
---
.../guides/rgant/_rgant_aaa_deprecated.adoc | 7 ---
.../org/apache/isis/applib/annotation/Plural.java | 42 -------------
.../annotation/PluralAnnotationFacetFactory.java | 73 ----------------------
.../plural/annotation/PluralFacetAnnotation.java | 35 -----------
.../dflt/ProgrammingModelFacetsJava5.java | 3 -
.../plural/PluralAnnotationFacetFactoryTest.java | 63 -------------------
todo-deprecation-list.txt | 3 +-
7 files changed, 2 insertions(+), 224 deletions(-)
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_deprecated.adoc b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_deprecated.adoc
index 7dd8182..575e019 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_deprecated.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant_aaa_deprecated.adoc
@@ -170,13 +170,6 @@ Also part of the toString representation of bookmarks, if using the Bookmark Ser
|UI
|Yes
-|`@Plural`
-|For the irregular plural form of an entity type.
-|xref:../rgant/rgant.adoc#_rgant-DomainObject_plural[`@DomainObjectLayout` +
-`#plural()`]
-|UI
-|
-
|`@Prototype`
|Indicates that an action should only be visible in 'prototype' mode.
|xref:../rgant/rgant.adoc#_rgant-Action_restrictTo[`@Action#restrictTo()`]
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Plural.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Plural.java
deleted file mode 100644
index f860839..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Plural.java
+++ /dev/null
@@ -1,42 +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 - use {@link DomainObjectLayout#plural()}.
- */
-@Deprecated
-@Inherited
-@Target({ ElementType.TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Plural {
-
- /**
- * @deprecated - use {@link DomainObjectLayout#plural()}.
- */
- @Deprecated
- String value();
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/plural/annotation/PluralAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/plural/annotation/PluralAnnotationFacetFactory.java
deleted file mode 100644
index 31a22d8..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/plural/annotation/PluralAnnotationFacetFactory.java
+++ /dev/null
@@ -1,73 +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.plural.annotation;
-
-import org.apache.isis.applib.annotation.Plural;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-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.facetapi.MetaModelValidatorRefiner;
-import org.apache.isis.core.metamodel.facets.Annotations;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.object.plural.PluralFacet;
-import org.apache.isis.core.metamodel.progmodel.DeprecatedMarker;
-import org.apache.isis.core.metamodel.services.ServicesInjector;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorComposite;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidatorForDeprecatedAnnotation;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class PluralAnnotationFacetFactory extends FacetFactoryAbstract implements MetaModelValidatorRefiner, DeprecatedMarker {
-
- private final MetaModelValidatorForDeprecatedAnnotation validator = new MetaModelValidatorForDeprecatedAnnotation(Plural.class);
-
- public PluralAnnotationFacetFactory() {
- super(FeatureType.OBJECTS_ONLY);
- }
-
- @Override
- public void process(final ProcessClassContext processClassContext) {
- final Plural annotation = Annotations.getAnnotation(processClassContext.getCls(), Plural.class);
- final PluralFacet facet = create(annotation, processClassContext.getFacetHolder());
- FacetUtil.addFacet(validator.flagIfPresent(facet, null));
- }
-
- private PluralFacet create(final Plural annotation, final FacetHolder holder) {
- return annotation == null ? null : new PluralFacetAnnotation(annotation.value(), holder);
- }
-
-
- @Override
- public void refineMetaModelValidator(final MetaModelValidatorComposite metaModelValidator, final IsisConfiguration configuration) {
- metaModelValidator.add(validator);
- }
-
- @Override
- public void setServicesInjector(final ServicesInjector servicesInjector) {
- super.setServicesInjector(servicesInjector);
- IsisConfiguration configuration = servicesInjector.getConfigurationServiceInternal();
- validator.setConfiguration(configuration);
- }
-
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/plural/annotation/PluralFacetAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/plural/annotation/PluralFacetAnnotation.java
deleted file mode 100644
index 9b706ba..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/plural/annotation/PluralFacetAnnotation.java
+++ /dev/null
@@ -1,35 +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.plural.annotation;
-
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.object.plural.PluralFacetAbstract;
-
-/**
- * @deprecated
- */
-@Deprecated
-public class PluralFacetAnnotation extends PluralFacetAbstract {
-
- public PluralFacetAnnotation(final String value, final FacetHolder holder) {
- super(value, holder);
- }
-
-}
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 24d7f69..7bb040d 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
@@ -106,7 +106,6 @@ import org.apache.isis.core.metamodel.facets.object.objectvalidprops.impl.Object
import org.apache.isis.core.metamodel.facets.object.paged.annotation.PagedFacetOnTypeAnnotationFactory;
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.annotation.PluralAnnotationFacetFactory;
import org.apache.isis.core.metamodel.facets.object.plural.staticmethod.PluralFacetStaticMethodFactory;
import org.apache.isis.core.metamodel.facets.object.recreatable.DisabledFacetOnCollectionDerivedFromViewModelFacetFactory;
import org.apache.isis.core.metamodel.facets.object.recreatable.DisabledFacetOnPropertyDerivedFromRecreatableObjectFacetFactory;
@@ -409,8 +408,6 @@ public final class ProgrammingModelFacetsJava5 extends ProgrammingModelAbstract
addFactory(new ParseableFacetAnnotationElseConfigurationFactory());
- addFactory(new PluralAnnotationFacetFactory());
-
addFactory(new PagedFacetOnTypeAnnotationFactory());
addFactory(new PagedFacetOnCollectionFactory());
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/ident/plural/PluralAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/ident/plural/PluralAnnotationFacetFactoryTest.java
deleted file mode 100644
index dde718b..0000000
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/object/ident/plural/PluralAnnotationFacetFactoryTest.java
+++ /dev/null
@@ -1,63 +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.ident.plural;
-
-import org.apache.isis.applib.annotation.Plural;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessClassContext;
-import org.apache.isis.core.metamodel.facets.object.plural.PluralFacet;
-import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryTest;
-import org.apache.isis.core.metamodel.facets.object.plural.annotation.PluralAnnotationFacetFactory;
-import org.apache.isis.core.metamodel.facets.object.plural.annotation.PluralFacetAnnotation;
-
-public class PluralAnnotationFacetFactoryTest extends AbstractFacetFactoryTest {
-
- private PluralAnnotationFacetFactory facetFactory;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
-
- facetFactory = new PluralAnnotationFacetFactory();
- }
-
- @Override
- protected void tearDown() throws Exception {
- facetFactory = null;
- super.tearDown();
- }
-
- public void testPluralAnnotationMethodPickedUpOnClass() {
- @Plural("Some plural name")
- class Customer {
- }
-
- facetFactory.process(new ProcessClassContext(Customer.class, methodRemover, facetedMethod));
-
- final Facet facet = facetedMethod.getFacet(PluralFacet.class);
- assertNotNull(facet);
- assertTrue(facet instanceof PluralFacetAnnotation);
- final PluralFacetAnnotation pluralFacet = (PluralFacetAnnotation) facet;
- assertEquals("Some plural name", pluralFacet.value());
-
- assertNoMethodsRemoved();
- }
-
-}
diff --git a/todo-deprecation-list.txt b/todo-deprecation-list.txt
index 04b1ad2..d6c3112 100644
--- a/todo-deprecation-list.txt
+++ b/todo-deprecation-list.txt
@@ -49,6 +49,7 @@ org.apache.isis.applib.annotation
MaxLength.java - entire annotation, use @Property(maxLength=...) and @Parameter(maxLength=...)
MultiLine.java - entire annotation, use @PropertyLayout(multiLine=...) and @ParameterLayout(multiLine=...) instead.
Named.java - entire annotation, use @XxxLayout(named=...) instead, where Xxx is Property, Collection, Action, Parameter, DomainObject, ViewModel
+ Plural.java - entire annotation, use @DomainObjectLayout(plural=...) instead
@@ -106,7 +107,6 @@ org.apache.isis.applib.annotation
MemberGroups.java - entire annotation, use Xxx.layout.xml instead
MustSatisfy.java - entire annotation, use @Property(mustSatisfy=....) or @Parameter(mustSatisfy=...) instead
- Plural.java - entire annotation, use @DomainObjectLayout(plural=...) instead
RegEx.java - entire annotation, use @Property(regexPatternFlags=...) or @Parameter(regexPatternFlags=...) instead
RenderedAsDayBefore.java - entire annotation, use @PropertyLayout(renderedAsDayBefore=...) and @ParameterLayout(renderedAsDayBefore=...)
SortedBy.java - entire annotation, use @CollectionLayout(sortedBy=...) instead
@@ -298,6 +298,7 @@ OTHER STUFF:
inline paraname8 from incode platform
remove named static method
+remove plural static method
--
To stop receiving notification emails like this one, please contact
['"commits@isis.apache.org" <co...@isis.apache.org>'].