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/03 14:39:19 UTC
[isis] branch dev/2.0.0/ISIS-1742-remove-deprecations updated:
ISIS-1742: removes @CssClassFa annotation and updates facet.
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 86a366e ISIS-1742: removes @CssClassFa annotation and updates facet.
86a366e is described below
commit 86a366e892cb3806d819fe278b89152937fc0109
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 15:39:06 2017 +0100
ISIS-1742: removes @CssClassFa annotation and updates facet.
Also updates .adocs for @CssClass and @CssClassFa
---
.../guides/rgant/_rgant_aaa_deprecated.adoc | 12 -----
.../guides/rgcfg/_rgcfg_configuring-core.adoc | 4 +-
.../_ugvw_customisation_tweaking-css-classes.adoc | 3 +-
.../apache/isis/applib/annotation/CssClassFa.java | 53 ----------------------
.../annotprop/CssClassFaFacetOnMemberFactory.java | 25 +---------
5 files changed, 5 insertions(+), 92 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 03ccb06..73825d8 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
@@ -61,18 +61,6 @@ The annotations listed in the table below are still supported by Apache Isis, bu
|Domain
|
-|`@CssClass`
-|Allow visual representation of individual objects or object members layout to be customized by application-specific CSS.
-|`#cssClass()` attribute for: xref:../rgant/rgant.adoc#_rgant-DomainObjectLayout_cssClass[`@DomainObjectLayout`], xref:../rgant/rgant.adoc#_rgant-PropertyLayout_cssClass[`@PropertyLayout`], xref:../rgant/rgant.adoc#_rgant-CollectionLayout_cssClass[`@CollectionLayout`], xref:../rgant/rgant.adoc#_rgant-ActionLayout_cssClass[`@ActionLayout`] and xref:../rgant/rgant.adoc#_rgant-ParameterLayout_cssClass[`@ParameterLayout`]
-|UI
-|Yes
-
-|`@CssClassFa`
-|So that font awesome icons can be applied to action buttons/menu items and optionally as an object icon.
-|`cssClassFa()` attribute for: xref:../rgant/rgant.adoc#_rgant-ActionLayout_cssClassFa[`@ActionLayout`], xref:../rgant/rgant.adoc#_rgant-DomainObjectLayout_cssClassFa[`DomainObjectLayout`] and xref:../rgant/rgant.adoc#_rgant-ViewModelLayout_cssClassFa[`ViewModelLayout`]
-|UI
-|Yes
-
|`@Debug`
|Action only invokable in debug mode.
|Not supported by either the xref:../ugvw/ugvw.adoc#[Wicket viewer] or the xref:../ugvro/ugvro.adoc#[RestfulObjects viewer]; use prototype mode instead (xref:../rgant/rgant.adoc#_rgant-Action_restrictTo[`@Action#restrictTo()`])
diff --git a/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc b/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc
index 7b3cf1e..fcfc5d1 100644
--- a/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgcfg/_rgcfg_configuring-core.adoc
@@ -673,14 +673,14 @@ Only intended for "emergency use" as a workaround while pending fix/patch to Apa
|`isis.reflector.facet.` +
`cssClass.patterns`
|regex:css1, regex2:css2,...
-|Comma separated list of key:value pairs, where the key is a regex matching action names (eg `delete.*`) and the value is a link:http://getbootstrap.com/css/[Bootstrap] CSS button class (eg `btn-warning) to be applied (as per `@CssClass()`) to all action members matching the regex. +
+|Comma separated list of key:value pairs, where the key is a regex matching action names (eg `delete.*`) and the value is a link:http://getbootstrap.com/css/[Bootstrap] CSS button class (eg `btn-warning) to be applied (as per `@PropertyLayout(cssClass=...)` etc) to all action members matching the regex. +
See xref:../ugfun/ugfun.adoc#_ugfun_ui-hints_action-icons-and-css[UI hints] for more details.
|`isis.reflector.facet.` +
`cssClassFa.patterns`
|regex:fa-icon,regex2:fa-icon2,...
-|Comma separated list of key:value pairs, where the key is a regex matching action names (eg `create.*`) and the value is a link:http://fortawesome.github.io/Font-Awesome/icons/[font-awesome] icon name (eg `fa-plus`) to be applied (as per `@CssClassFa()`) to all action members matching the regex. +
+|Comma separated list of key:value pairs, where the key is a regex matching action names (eg `create.*`) and the value is a link:http://fortawesome.github.io/Font-Awesome/icons/[font-awesome] icon name (eg `fa-plus`) to be applied (as per `@Propertyayout(cssClassFa=...)` etc) to all action members matching the regex. +
See xref:../ugfun/ugfun.adoc#_ugfun_ui-hints_action-icons-and-css[UI hints] for more details.
diff --git a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_tweaking-css-classes.adoc b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_tweaking-css-classes.adoc
index 14921f4..07c2050 100644
--- a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_tweaking-css-classes.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_tweaking-css-classes.adoc
@@ -60,7 +60,8 @@ You can use a similar approach for collections and actions.
== Custom CSS styles
-The above technique works well if you know the class member to target, but you might instead want to apply a custom style to a set of members. For this, you can use the `@CssClass`.
+The above technique works well if you know the class member to target, but you might instead want to apply a custom style to a set of members.
+For this, you can use the `@PropertyLayout(cssClass=...)`.
For example, in the `ToDoItem` class the following annotation (indicating that this is a key, important, property) :
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClassFa.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClassFa.java
deleted file mode 100644
index f2a7ce3..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/CssClassFa.java
+++ /dev/null
@@ -1,53 +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.*;
-
-/**
- * @deprecated - see {@link ActionLayout#cssClassFa()}
- */
-@Deprecated
-@Inherited
-@Target({ ElementType.METHOD, ElementType.TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface CssClassFa {
-
- /**
- * @deprecated - see {@link DomainObjectLayout#cssClassFa(),@link ViewModelLayout#cssClassFa(), @link ActionLayout#cssClassFa()}
- */
- @Deprecated
- String value();
-
- /**
- * @deprecated - see {@link DomainObjectLayout#cssClassFaPosition()} and {@link ViewModelLayout#cssClassFaPosition()}.
- */
- @Deprecated
- CssClassFaPosition position() default CssClassFaPosition.LEFT;
-
- /**
- * @deprecated - see {@link org.apache.isis.applib.annotation.DomainObjectLayout.CssClassFaPosition} and {@link org.apache.isis.applib.annotation.ViewModelLayout.CssClassFaPosition}.
- */
- @Deprecated
- public enum CssClassFaPosition {
- LEFT, RIGHT
- }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/cssclassfa/annotprop/CssClassFaFacetOnMemberFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/cssclassfa/annotprop/CssClassFaFacetOnMemberFactory.java
index 7df2a4a..60224a9 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/cssclassfa/annotprop/CssClassFaFacetOnMemberFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/members/cssclassfa/annotprop/CssClassFaFacetOnMemberFactory.java
@@ -29,25 +29,17 @@ import java.util.regex.Pattern;
import com.google.common.base.Strings;
import com.google.common.collect.Maps;
-import org.apache.isis.applib.annotation.CssClassFa;
import org.apache.isis.core.commons.config.ConfigurationConstants;
-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.ContributeeMemberFacetFactory;
import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaFacet;
import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaPosition;
-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;
-public class CssClassFaFacetOnMemberFactory extends FacetFactoryAbstract implements ContributeeMemberFacetFactory, MetaModelValidatorRefiner {
+public class CssClassFaFacetOnMemberFactory extends FacetFactoryAbstract implements ContributeeMemberFacetFactory {
- private final MetaModelValidatorForDeprecatedAnnotation validator = new MetaModelValidatorForDeprecatedAnnotation(CssClassFa.class);
-
public CssClassFaFacetOnMemberFactory() {
super(FeatureType.ACTIONS_ONLY);
@@ -164,20 +156,5 @@ public class CssClassFaFacetOnMemberFactory extends FacetFactoryAbstract impleme
// endregion
- // //////////////////////////////////////
-
- @Override
- public void refineMetaModelValidator(final MetaModelValidatorComposite metaModelValidator, final IsisConfiguration configuration) {
- metaModelValidator.add(validator);
- }
-
-
- @Override
- public void setServicesInjector(final ServicesInjector servicesInjector) {
- super.setServicesInjector(servicesInjector);
- final IsisConfiguration configuration = getConfiguration();
- validator.setConfiguration(configuration);
- }
-
}
--
To stop receiving notification emails like this one, please contact
['"commits@isis.apache.org" <co...@isis.apache.org>'].