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 2018/09/26 19:46:05 UTC

[isis] branch v2 updated (105e9b5 -> 9283f47)

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a change to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git.


    from 105e9b5  ISIS-1976: cleanup 'Command' API
     new a1fdfa4  ISIS-1976: remove deprecated BookmarkService methods that don't take a FieldResetPolicy argument
     new f1a89a4  ISIS-1976: remove deprecated PropertyLayoutData.renderedAsDayBefore
     new bb045b1  ISIS-1976: remove deprecated bulk actions
     new 9283f47  ISIS-1976: remove deprecated MetaModelServce.sortOf methods not having the Mode argument

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/isis/applib/annotation/Action.java  |  31 +---
 .../apache/isis/applib/annotation/InvokeOn.java    |  66 -------
 .../layout/component/PropertyLayoutData.java       |  18 --
 .../services/actinvoc/ActionInvocationContext.java | 197 ---------------------
 .../services/bookmark/BookmarkHolder_lookup.java   |   3 +-
 .../services/bookmark/BookmarkHolder_object.java   |   3 +-
 .../applib/services/bookmark/BookmarkService.java  |  22 ---
 .../services/metamodel/MetaModelService.java       |  14 --
 ...ropertyLayoutData_renderedAsDayBefore_Test.java |  33 ----
 .../isis/core/metamodel/facets/Annotations.java    |   3 +-
 .../action/ActionAnnotationFacetFactory.java       |  20 ---
 .../action/bulk/BulkFacetForActionAnnotation.java  |  50 ------
 .../actions/action/bulk/BulkFacetObjectOnly.java   |  33 ----
 ...ctionInvocationFacetForDomainEventAbstract.java |   5 +-
 .../metamodel/facets/actions/bulk/BulkFacet.java   |  37 ----
 .../facets/actions/bulk/BulkFacetAbstract.java     |  37 ----
 .../RenderedAdjustedFacetForPropertyXml.java       |   6 +-
 .../bookmarks/BookmarkServiceInternalDefault.java  |  25 +--
 .../services/grid/GridSystemServiceAbstract.java   |   3 +-
 .../grid/bootstrap3/GridSystemServiceBS3.java      |   3 +-
 .../metamodel/MetaModelServiceDefault.java         |  13 --
 .../PersistenceSessionServiceInternal.java         |  14 --
 .../PersistenceSessionServiceInternalNoop.java     |   5 -
 .../core/metamodel/spec/feature/ObjectAction.java  |  86 +++++----
 .../specloader/specimpl/ObjectActionDefault.java   |  58 ++----
 .../action/ActionAnnotationFacetFactoryTest.java   | 101 ++---------
 .../background/CommandExecutorServiceDefault.java  |   3 +-
 .../PersistenceSessionServiceInternalDefault.java  |  11 --
 .../collection/AssociatedWithActionsHelper.java    |   1 -
 .../collection/bulk/BulkActionsHelper.java         |  81 ---------
 .../collection/bulk/BulkActionsLinkFactory.java    |  25 +--
 .../StandaloneCollectionPanel.java                 |  27 +--
 32 files changed, 102 insertions(+), 932 deletions(-)
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/annotation/InvokeOn.java
 delete mode 100644 core/applib/src/main/java/org/apache/isis/applib/services/actinvoc/ActionInvocationContext.java
 delete mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/bulk/BulkFacetForActionAnnotation.java
 delete mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/bulk/BulkFacetObjectOnly.java
 delete mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/bulk/BulkFacet.java
 delete mode 100644 core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/bulk/BulkFacetAbstract.java
 delete mode 100644 core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsHelper.java


[isis] 04/04: ISIS-1976: remove deprecated MetaModelServce.sortOf methods not having the Mode argument

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 9283f47adf2491e70da1c042f31011038f1ad591
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Sep 26 21:43:01 2018 +0200

    ISIS-1976: remove deprecated MetaModelServce.sortOf methods not having
    the Mode argument
    
    Task-Url: https://issues.apache.org/jira/browse/ISIS-1976
---
 .../isis/applib/services/metamodel/MetaModelService.java   | 14 --------------
 .../ActionInvocationFacetForDomainEventAbstract.java       |  3 ++-
 .../services/metamodel/MetaModelServiceDefault.java        | 13 -------------
 3 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/metamodel/MetaModelService.java b/core/applib/src/main/java/org/apache/isis/applib/services/metamodel/MetaModelService.java
index b4213ee..5c7494a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/metamodel/MetaModelService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/metamodel/MetaModelService.java
@@ -62,20 +62,6 @@ public interface MetaModelService {
     @Programmatic
     List<DomainMember> export();
 
-    /**
-     * @deprecated - use {@link #sortOf(Class, MetaModelService.Mode)}
-     */
-    @Deprecated
-    @Programmatic
-    Sort sortOf(Class<?> domainType);
-
-    /**
-     * @deprecated - use {@link #sortOf(Bookmark, MetaModelService.Mode)}
-     */
-    @Deprecated
-    @Programmatic
-    Sort sortOf(Bookmark bookmark);
-
     @Programmatic
     Sort sortOf(Class<?> domainType, Mode mode);
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
index bd8d99d..97c268e 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
@@ -49,6 +49,7 @@ import org.apache.isis.applib.services.command.spi.CommandService;
 import org.apache.isis.applib.services.iactn.Interaction;
 import org.apache.isis.applib.services.iactn.InteractionContext;
 import org.apache.isis.applib.services.metamodel.MetaModelService;
+import org.apache.isis.applib.services.metamodel.MetaModelService.Mode;
 import org.apache.isis.applib.services.queryresultscache.QueryResultsCache;
 import org.apache.isis.applib.services.repository.RepositoryService;
 import org.apache.isis.applib.services.xactn.TransactionService;
@@ -440,7 +441,7 @@ implements ImperativeFacet {
         }
 
         final Class<?> domainType = resultAdapter.getSpecification().getCorrespondingClass();
-        final MetaModelService.Sort sort = getMetaModelService().sortOf(domainType);
+        final MetaModelService.Sort sort = getMetaModelService().sortOf(domainType, Mode.STRICT);
         switch (sort) {
         case JDO_ENTITY:
             final Object domainObject = resultAdapter.getObject();
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java
index 7025a0b..a295174 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/metamodel/MetaModelServiceDefault.java
@@ -177,17 +177,9 @@ public class MetaModelServiceDefault implements MetaModelService {
         return className.startsWith("java") || className.startsWith("org.joda");
     }
 
-
-
     // //////////////////////////////////////
 
     @Override
-    public Sort sortOf(final Class<?> domainType) {
-        return sortOf(domainType, Mode.STRICT);
-    }
-
-
-    @Override
     public Sort sortOf(
             final Class<?> domainType, final Mode mode) {
         if(domainType == null) {
@@ -224,11 +216,6 @@ public class MetaModelServiceDefault implements MetaModelService {
     }
 
     @Override
-    public Sort sortOf(final Bookmark bookmark) {
-        return sortOf(bookmark, Mode.STRICT);
-    }
-
-    @Override
     public Sort sortOf(final Bookmark bookmark, final Mode mode) {
         if(bookmark == null) {
             return null;


[isis] 03/04: ISIS-1976: remove deprecated bulk actions

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git

commit bb045b1ae3be3b0689f6def9c0c87282bcdbd982
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Sep 26 21:33:44 2018 +0200

    ISIS-1976: remove deprecated bulk actions
    
    Task-Url: https://issues.apache.org/jira/browse/ISIS-1976
---
 .../org/apache/isis/applib/annotation/Action.java  |  31 +---
 .../apache/isis/applib/annotation/InvokeOn.java    |  66 -------
 .../services/actinvoc/ActionInvocationContext.java | 197 ---------------------
 .../isis/core/metamodel/facets/Annotations.java    |   3 +-
 .../action/ActionAnnotationFacetFactory.java       |  20 ---
 .../action/bulk/BulkFacetForActionAnnotation.java  |  50 ------
 .../actions/action/bulk/BulkFacetObjectOnly.java   |  33 ----
 ...ctionInvocationFacetForDomainEventAbstract.java |   2 -
 .../metamodel/facets/actions/bulk/BulkFacet.java   |  37 ----
 .../facets/actions/bulk/BulkFacetAbstract.java     |  37 ----
 .../grid/bootstrap3/GridSystemServiceBS3.java      |   3 +-
 .../core/metamodel/spec/feature/ObjectAction.java  |  86 +++++----
 .../specloader/specimpl/ObjectActionDefault.java   |  58 ++----
 .../action/ActionAnnotationFacetFactoryTest.java   | 101 ++---------
 .../collection/AssociatedWithActionsHelper.java    |   1 -
 .../collection/bulk/BulkActionsHelper.java         |  81 ---------
 .../collection/bulk/BulkActionsLinkFactory.java    |  25 +--
 .../StandaloneCollectionPanel.java                 |  27 +--
 18 files changed, 87 insertions(+), 771 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
index 6a8bb57..1005f22 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Action.java
@@ -89,10 +89,8 @@ public @interface Action {
      */
     Where hidden() default Where.NOT_SPECIFIED;
 
-
     // //////////////////////////////////////
 
-
     /**
      * The action semantics, either {@link SemanticsOf#SAFE_AND_REQUEST_CACHEABLE cached}, {@link SemanticsOf#SAFE safe} (query-only),
      * {@link SemanticsOf#IDEMPOTENT idempotent} or
@@ -100,35 +98,8 @@ public @interface Action {
      */
     SemanticsOf semantics() default SemanticsOf.NOT_SPECIFIED;
 
-
-    // //////////////////////////////////////
-
-
-    /**
-     * Whether an action can be invoked on a single object and/or on many objects in a collection.
-     *
-     * <p>
-     * Actions to be invoked on collection (currently) have a number of constraints:
-     * <ul>
-     * <li>It must take no arguments
-     * <li>It cannot be hidden (any annotations or supporting methods to that effect will be
-     *     ignored).
-     * <li>It cannot be disabled (any annotations or supporting methods to that effect will be
-     *     ignored).
-     * </ul>
-     *
-     * <p>
-     * Has no meaning if annotated on an action of a domain service.
-     * </p>
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    InvokeOn invokeOn() default InvokeOn.NOT_SPECIFIED;
-
     // //////////////////////////////////////
 
-
     /**
      * Whether the action invocation should be reified into a {@link org.apache.isis.applib.services.command.Command} object.
      */
@@ -161,7 +132,7 @@ public @interface Action {
      * </p>
      *
      * <p>
-     *     Tprocessor itself is used by {@link ContentMappingServiceForCommandDto} and
+     *     The processor itself is used by {@link ContentMappingServiceForCommandDto} and
      *     {@link ContentMappingServiceForCommandsDto} to dynamically transform the DTOs.
      * </p>
      */
diff --git a/core/applib/src/main/java/org/apache/isis/applib/annotation/InvokeOn.java b/core/applib/src/main/java/org/apache/isis/applib/annotation/InvokeOn.java
deleted file mode 100644
index 8f6f4de..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/InvokeOn.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.applib.annotation;
-
-/**
- * Whether an action can be invoked on a single object and/or on many objects in a collection.
- *
- * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
- */
-@Deprecated
-public enum InvokeOn {
-    /**
-     * The action can only be invoked on a single object.  This is the default.
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    OBJECT_ONLY,
-    /**
-     * The action can be invoked either on a single object or on a collection of objects (each in turn).
-     *
-     * <p>
-     *     Corresponds to (the deprecated) <code>@Bulk(appliesTo=BULK_AND_REGULAR)</code> annotation.
-     * </p>
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    OBJECT_AND_COLLECTION,
-    /**
-     * The action is intended to be invoked only on a collection of objects (each in turn).
-     *
-     * <p>
-     *     Corresponds to (the deprecated) <code>@Bulk(appliesTo=BULK_ONLY)</code> annotation.
-     * </p>
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    COLLECTION_ONLY,
-    /**
-     * Ignore the value provided by this annotation (meaning that the framework will keep searching, in meta
-     * annotations or superclasses/interfaces).
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    NOT_SPECIFIED;
-
-}
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/actinvoc/ActionInvocationContext.java b/core/applib/src/main/java/org/apache/isis/applib/services/actinvoc/ActionInvocationContext.java
deleted file mode 100644
index 056f24e..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/actinvoc/ActionInvocationContext.java
+++ /dev/null
@@ -1,197 +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.services.actinvoc;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import javax.enterprise.context.RequestScoped;
-
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.InvokedOn;
-import org.apache.isis.applib.annotation.NatureOfService;
-import org.apache.isis.applib.annotation.Programmatic;
-
-/**
- * This service (API and implementation) provides access to context information about a bulk action invocation.
- *
- * <p>
- * This implementation has no UI and there is only one implementation (this class) in applib, so it is annotated
- * with {@link org.apache.isis.applib.annotation.DomainService}.  This means that it is automatically registered
- * and available for use; no further configuration is required.
- * </p>
- *
- * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
- */
-@Deprecated
-@DomainService(
-        nature = NatureOfService.DOMAIN,
-        menuOrder = "" + Integer.MAX_VALUE
-        )
-@RequestScoped
-public class ActionInvocationContext {
-
-    /**
-     * Intended only to support unit testing.
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    public static ActionInvocationContext onObject(final Object domainObject) {
-        ActionInvocationContext aic = new ActionInvocationContext();
-        aic.setInvokedOn(InvokedOn.OBJECT);
-        aic.setDomainObjects(Collections.singletonList(domainObject));
-        return aic;
-    }
-
-    /**
-     * Intended only to support unit testing.
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    public static ActionInvocationContext onCollection(final Object... domainObjects) {
-        return onCollection(Arrays.asList(domainObjects));
-    }
-
-    /**
-     * Intended only to support unit testing.
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    public static ActionInvocationContext onCollection(final List<Object> domainObjects) {
-        ActionInvocationContext aic = new ActionInvocationContext();
-        aic.setInvokedOn(InvokedOn.COLLECTION);
-        aic.setDomainObjects(domainObjects);
-        return aic;
-    }
-
-    // //////////////////////////////////////
-
-
-    private InvokedOn invokedOn;
-    private List<Object> domainObjects;
-
-    private int index;
-
-
-    // //////////////////////////////////////
-
-    /**
-     * <b>NOT API</b>: intended to be called only by the framework.
-     */
-    @Programmatic
-    public void setInvokedOn(final InvokedOn invokedOn) {
-        this.invokedOn = invokedOn;
-    }
-
-    /**
-     * <b>NOT API</b>: intended to be called only by the framework.
-     */
-    @Programmatic
-    public void setDomainObjects(final List<Object> domainObjects) {
-        this.domainObjects = domainObjects;
-    }
-
-    /**
-     * <b>NOT API</b>: intended to be called only by the framework.
-     */
-    @Programmatic
-    public void setIndex(final int index) {
-        this.index = index;
-    }
-
-    // //////////////////////////////////////
-
-
-    /**
-     * Whether this particular {@link ActionInvocationContext} was applied as a {@link InvokedOn#COLLECTION bulk} action
-     * (against each domain object in a list of domain objects) or as a {@link InvokedOn#OBJECT regular}
-     * action (against a single domain object).
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    @Programmatic
-    public InvokedOn getInvokedOn() {
-        return invokedOn;
-    }
-
-
-    /**
-     * The list of domain objects which are being acted upon.
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    @Programmatic
-    public List<Object> getDomainObjects() {
-        return domainObjects;
-    }
-
-    /**
-     * The number of {@link #domainObjects domain objects} being acted upon.
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    @Programmatic
-    public int getSize() {
-        return domainObjects.size();
-    }
-
-    /**
-     * The 0-based index to the object being acted upon.
-     *
-     * <p>
-     * Will be a value in range [0, {@link #getSize() size}).
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    @Programmatic
-    public int getIndex() {
-        return index;
-    }
-
-    /**
-     * Whether this object being acted upon is the first such.
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    @Programmatic
-    public boolean isFirst() {
-        return this.index == 0;
-    }
-
-    /**
-     * Whether this object being acted upon is the last such.
-     *
-     * @deprecated - instead of bulk actions, use view models with collection parameters and {@link Action#associateWith()}.
-     */
-    @Deprecated
-    @Programmatic
-    public boolean isLast() {
-        return this.index == (getSize()-1);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/Annotations.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/Annotations.java
index a67640a..b104d13 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/Annotations.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/Annotations.java
@@ -42,6 +42,7 @@ import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Property;
 import org.apache.isis.applib.annotation.PropertyLayout;
 import org.apache.isis.applib.annotation.Title;
+import org.apache.isis.commons.internal.base._Casts;
 import org.apache.isis.commons.internal.collections._Lists;
 import org.apache.isis.core.commons.lang.ThrowableExtensions;
 import org.apache.isis.core.commons.reflection.Reflect;
@@ -210,7 +211,7 @@ public final class Annotations  {
 
         // directly annotated
         if(annotationClass.isAssignableFrom(annotationType)) {
-            annotationAndDepths.add(new AnnotationAndDepth<>((T) annotation, depth));
+            annotationAndDepths.add(new AnnotationAndDepth<>(_Casts.uncheckedCast(annotation), depth));
         }
 
         // if meta-annotation
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
index 67263ad..9e5f4fd 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactory.java
@@ -35,8 +35,6 @@ import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.FacetedMethod;
 import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacet;
 import org.apache.isis.core.metamodel.facets.actions.action.associateWith.AssociatedWithFacetForActionAnnotation;
-import org.apache.isis.core.metamodel.facets.actions.action.bulk.BulkFacetForActionAnnotation;
-import org.apache.isis.core.metamodel.facets.actions.action.bulk.BulkFacetObjectOnly;
 import org.apache.isis.core.metamodel.facets.actions.action.command.CommandFacetForActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.hidden.HiddenFacetForActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionDomainEventFacetAbstract;
@@ -49,7 +47,6 @@ import org.apache.isis.core.metamodel.facets.actions.action.prototype.PrototypeF
 import org.apache.isis.core.metamodel.facets.actions.action.publishing.PublishedActionFacetForActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.semantics.ActionSemanticsFacetForActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.typeof.TypeOfFacetForActionAnnotation;
-import org.apache.isis.core.metamodel.facets.actions.bulk.BulkFacet;
 import org.apache.isis.core.metamodel.facets.actions.command.CommandFacet;
 import org.apache.isis.core.metamodel.facets.actions.prototype.PrototypeFacet;
 import org.apache.isis.core.metamodel.facets.actions.publish.PublishedActionFacet;
@@ -74,7 +71,6 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract {
         processHidden(processMethodContext);
         processRestrictTo(processMethodContext);
         processSemantics(processMethodContext);
-        processBulk(processMethodContext);
 
         // must come after processing semantics
         processCommand(processMethodContext);
@@ -186,22 +182,6 @@ public class ActionAnnotationFacetFactory extends FacetFactoryAbstract {
         FacetUtil.addFacet(facet);
     }
 
-    void processBulk(final ProcessMethodContext processMethodContext) {
-        final Method method = processMethodContext.getMethod();
-        final List<Action> actions = Annotations.getAnnotations(method, Action.class);
-        final FacetHolder holder = processMethodContext.getFacetHolder();
-
-        // check for @Action(invokeOn=...)
-        BulkFacet facet = BulkFacetForActionAnnotation.create(actions, holder);
-
-        // fallback
-        if(facet == null) {
-            facet = new BulkFacetObjectOnly(holder);
-        }
-
-        FacetUtil.addFacet(facet);
-    }
-
     void processCommand(final ProcessMethodContext processMethodContext) {
 
         //final Class<?> cls = processMethodContext.getCls();
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/bulk/BulkFacetForActionAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/bulk/BulkFacetForActionAnnotation.java
deleted file mode 100644
index 07c159d..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/bulk/BulkFacetForActionAnnotation.java
+++ /dev/null
@@ -1,50 +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.actions.action.bulk;
-
-import java.util.List;
-
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.InvokeOn;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.actions.bulk.BulkFacet;
-import org.apache.isis.core.metamodel.facets.actions.bulk.BulkFacetAbstract;
-
-public class BulkFacetForActionAnnotation extends BulkFacetAbstract {
-
-    public static BulkFacet create(
-            final List<Action> actions,
-            final FacetHolder holder) {
-
-        return actions.stream()
-                .map(Action::invokeOn)
-                .filter(invokeOn -> invokeOn != null && invokeOn != InvokeOn.NOT_SPECIFIED)
-                .findFirst()
-                .map(invokeOn -> new BulkFacetForActionAnnotation(invokeOn, holder))
-                .orElse(null);
-    }
-
-    private BulkFacetForActionAnnotation(
-            final InvokeOn appliesTo,
-            final FacetHolder holder) {
-        super(appliesTo, holder);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/bulk/BulkFacetObjectOnly.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/bulk/BulkFacetObjectOnly.java
deleted file mode 100644
index d101ca3..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/bulk/BulkFacetObjectOnly.java
+++ /dev/null
@@ -1,33 +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.actions.action.bulk;
-
-import org.apache.isis.applib.annotation.InvokeOn;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.actions.bulk.BulkFacetAbstract;
-
-public class BulkFacetObjectOnly extends BulkFacetAbstract {
-
-    public BulkFacetObjectOnly(
-            final FacetHolder holder) {
-        super(InvokeOn.OBJECT_ONLY, holder);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
index cd030b2..bd8d99d 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/action/invocation/ActionInvocationFacetForDomainEventAbstract.java
@@ -201,8 +201,6 @@ implements ImperativeFacet {
             // otherwise, go ahead and execute action in the 'foreground'
             final ObjectAdapter mixinElseRegularAdapter = mixedInAdapter != null ? mixedInAdapter : targetAdapter;
 
-            owningAction.setupBulkActionInvocationContext(mixinElseRegularAdapter);
-
             final Object mixinElseRegularPojo = ObjectAdapter.Util.unwrap(mixinElseRegularAdapter);
 
             final List<ObjectAdapter> argumentAdapterList = Arrays.asList(argumentAdapters);
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/bulk/BulkFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/bulk/BulkFacet.java
deleted file mode 100644
index 610cdb0..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/bulk/BulkFacet.java
+++ /dev/null
@@ -1,37 +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.actions.bulk;
-
-import org.apache.isis.applib.annotation.InvokeOn;
-import org.apache.isis.core.metamodel.facets.SingleValueFacet;
-
-/**
- * Indicates that the action (entity or service) can also be used as a bulk
- * action against collections of objects.
- *
- * <p>
- * In the standard Apache Isis Programming Model, corresponds to annotating the
- * action method using <tt>@Bulk</tt>.
- */
-public interface BulkFacet extends SingleValueFacet<InvokeOn> {
-
-    @Override
-    public InvokeOn value();
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/bulk/BulkFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/bulk/BulkFacetAbstract.java
deleted file mode 100644
index c7822d7..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/actions/bulk/BulkFacetAbstract.java
+++ /dev/null
@@ -1,37 +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.actions.bulk;
-
-import org.apache.isis.applib.annotation.InvokeOn;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.SingleValueFacetAbstract;
-
-public abstract class BulkFacetAbstract extends SingleValueFacetAbstract<InvokeOn> implements BulkFacet {
-
-    public static Class<? extends Facet> type() {
-        return BulkFacet.class;
-    }
-
-    public BulkFacetAbstract(InvokeOn appliesTo, final FacetHolder holder) {
-        super(type(), appliesTo, holder);
-    }
-
-}
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridSystemServiceBS3.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridSystemServiceBS3.java
index d1b3567..2be41aa 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridSystemServiceBS3.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/bootstrap3/GridSystemServiceBS3.java
@@ -155,8 +155,7 @@ public class GridSystemServiceBS3 extends GridSystemServiceAbstract<BS3Grid> {
                 ObjectMember.Util.mapById(getOneToManyAssociations(objectSpec));
         final Map<String, ObjectAction> objectActionById =
                 ObjectMember.Util.mapById(
-                        objectSpec.streamObjectActions(Contributed.INCLUDED)
-                        .filter(ObjectAction.Predicates.notBulkOnly()));
+                        objectSpec.streamObjectActions(Contributed.INCLUDED));
 
         final BS3Grid bs3Grid = (BS3Grid) grid;
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java
index eb4956e..23a8af0 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java
@@ -29,7 +29,6 @@ import com.google.common.collect.FluentIterable;
 
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.ActionLayout;
-import org.apache.isis.applib.annotation.InvokeOn;
 import org.apache.isis.applib.annotation.PromptStyle;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.annotation.Where;
@@ -44,7 +43,6 @@ import org.apache.isis.core.metamodel.consent.InteractionInitiatedBy;
 import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
 import org.apache.isis.core.metamodel.facets.actions.action.associateWith.AssociatedWithFacet;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacet;
-import org.apache.isis.core.metamodel.facets.actions.bulk.BulkFacet;
 import org.apache.isis.core.metamodel.facets.actions.position.ActionPositionFacet;
 import org.apache.isis.core.metamodel.facets.all.named.NamedFacet;
 import org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet;
@@ -194,13 +192,13 @@ public interface ObjectAction extends ObjectMember {
 
 
 
-    // -- setupBulkActionInvocationContext
-    /**
-     * internal API, called by {@link ActionInvocationFacet} if the action is actually executed (ie in the foreground).
-     */
-    void setupBulkActionInvocationContext(
-            final ObjectAdapter targetAdapter);
-
+//    // -- setupBulkActionInvocationContext
+//    /**
+//     * internal API, called by {@link ActionInvocationFacet} if the action is actually executed (ie in the foreground).
+//     */
+//    void setupBulkActionInvocationContext(
+//            final ObjectAdapter targetAdapter);
+//
 
 
 
@@ -308,7 +306,7 @@ public interface ObjectAction extends ObjectMember {
                     ObjectAction.Predicates.memberOrderNotAssociationOf(adapterSpec)
                     .and(ObjectAction.Predicates.dynamicallyVisible(adapter, 
                             InteractionInitiatedBy.USER, Where.ANYWHERE))
-                    .and(ObjectAction.Predicates.notBulkOnly())
+//                    .and(ObjectAction.Predicates.notBulkOnly())
                     .and(ObjectAction.Predicates.excludeWizardActions(adapterSpec));
 
             final Stream<ObjectAction> userActions = 
@@ -350,7 +348,7 @@ public interface ObjectAction extends ObjectMember {
 
             Predicate<ObjectAction> predicate = 
                 ObjectAction.Predicates.memberOrderOf(association)
-                .and(ObjectAction.Predicates.notBulkOnly())
+//                .and(ObjectAction.Predicates.notBulkOnly())
                 .and(ObjectAction.Predicates.excludeWizardActions(objectSpecification));
 
             final Stream<ObjectAction> userActions = 
@@ -442,33 +440,33 @@ public interface ObjectAction extends ObjectMember {
             return (ObjectAction oa) -> oa.getType() == type;
         }
 
-        public static Predicate<ObjectAction> bulk() {
-            return new Predicate<ObjectAction>() {
-
-                @Override
-                public boolean test(ObjectAction oa) {
-
-                    final BulkFacet bulkFacet = oa.getFacet(BulkFacet.class);
-                    if(bulkFacet == null || bulkFacet.isNoop() || bulkFacet.value() == InvokeOn.OBJECT_ONLY) {
-                        return false;
-                    }
-                    if (oa.getParameterCount() != 0) {
-                        return false;
-                    }
-
-                    // currently don't support returning Blobs or Clobs
-                    // (because haven't figured out how to rerender the current page, but also to do a download)
-                    ObjectSpecification returnSpec = oa.getReturnType();
-                    if (returnSpec != null) {
-                        Class<?> returnType = returnSpec.getCorrespondingClass();
-                        if (returnType == Blob.class || returnType == Clob.class) {
-                            return false;
-                        }
-                    }
-                    return true;
-                }
-            };
-        }
+//        public static Predicate<ObjectAction> bulk() {
+//            return new Predicate<ObjectAction>() {
+//
+//                @Override
+//                public boolean test(ObjectAction oa) {
+//
+//                    final BulkFacet bulkFacet = oa.getFacet(BulkFacet.class);
+//                    if(bulkFacet == null || bulkFacet.isNoop() || bulkFacet.value() == InvokeOn.OBJECT_ONLY) {
+//                        return false;
+//                    }
+//                    if (oa.getParameterCount() != 0) {
+//                        return false;
+//                    }
+//
+//                    // currently don't support returning Blobs or Clobs
+//                    // (because haven't figured out how to rerender the current page, but also to do a download)
+//                    ObjectSpecification returnSpec = oa.getReturnType();
+//                    if (returnSpec != null) {
+//                        Class<?> returnType = returnSpec.getCorrespondingClass();
+//                        if (returnType == Blob.class || returnType == Clob.class) {
+//                            return false;
+//                        }
+//                    }
+//                    return true;
+//                }
+//            };
+//        }
 
         public static Predicate<ObjectAction> dynamicallyVisible(
                 final ObjectAdapter target,
@@ -480,12 +478,12 @@ public interface ObjectAction extends ObjectMember {
             };
         }
 
-        public static Predicate<ObjectAction> notBulkOnly() {
-            return (ObjectAction t) -> {
-                    BulkFacet facet = t.getFacet(BulkFacet.class);
-                    return facet == null || facet.value() != InvokeOn.COLLECTION_ONLY;
-            };
-        }
+//        public static Predicate<ObjectAction> notBulkOnly() {
+//            return (ObjectAction t) -> {
+//                    BulkFacet facet = t.getFacet(BulkFacet.class);
+//                    return facet == null || facet.value() != InvokeOn.COLLECTION_ONLY;
+//            };
+//        }
 
         public static Predicate<ObjectAction> excludeWizardActions(final ObjectSpecification objectSpecification) {
             return wizardActions(objectSpecification).negate();
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionDefault.java
index 92e67fc..1d8f59f 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionDefault.java
@@ -25,12 +25,8 @@ import java.util.Objects;
 import java.util.concurrent.Callable;
 import java.util.function.Predicate;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import org.apache.isis.applib.ApplicationException;
 import org.apache.isis.applib.RecoverableException;
-import org.apache.isis.applib.annotation.InvokedOn;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.services.command.Command;
@@ -48,7 +44,6 @@ import org.apache.isis.core.metamodel.facets.FacetedMethod;
 import org.apache.isis.core.metamodel.facets.FacetedMethodParameter;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacet;
 import org.apache.isis.core.metamodel.facets.actions.action.invocation.CommandUtil;
-import org.apache.isis.core.metamodel.facets.actions.bulk.BulkFacet;
 import org.apache.isis.core.metamodel.facets.actions.defaults.ActionDefaultsFacet;
 import org.apache.isis.core.metamodel.facets.actions.prototype.PrototypeFacet;
 import org.apache.isis.core.metamodel.facets.actions.semantics.ActionSemanticsFacet;
@@ -73,7 +68,7 @@ import org.apache.isis.schema.cmd.v1.CommandDto;
 
 public class ObjectActionDefault extends ObjectMemberAbstract implements ObjectAction {
 
-    private final static Logger LOG = LoggerFactory.getLogger(ObjectActionDefault.class);
+    //private final static Logger LOG = LoggerFactory.getLogger(ObjectActionDefault.class);
 
     public static ActionType getType(final String typeStr) {
         final ActionType type = ActionType.valueOf(typeStr);
@@ -549,24 +544,24 @@ public class ObjectActionDefault extends ObjectMemberAbstract implements ObjectA
     }
 
 
-    /**
-     * Internal API
-     */
-    @Override
-    public void setupBulkActionInvocationContext(final ObjectAdapter targetAdapter) {
-
-        final Object targetPojo = ObjectAdapter.Util.unwrap(targetAdapter);
-
-        final BulkFacet bulkFacet = getFacetHolder().getFacet(BulkFacet.class);
-        if (bulkFacet != null) {
-            final org.apache.isis.applib.services.actinvoc.ActionInvocationContext actionInvocationContext = getActionInvocationContext();
-            if (actionInvocationContext != null && actionInvocationContext.getInvokedOn() == null) {
-
-                actionInvocationContext.setInvokedOn(InvokedOn.OBJECT);
-                actionInvocationContext.setDomainObjects(Collections.singletonList(targetPojo));
-            }
-        }
-    }
+//    /**
+//     * Internal API
+//     */
+//    @Override
+//    public void setupBulkActionInvocationContext(final ObjectAdapter targetAdapter) {
+//
+//        final Object targetPojo = ObjectAdapter.Util.unwrap(targetAdapter);
+//
+//        final BulkFacet bulkFacet = getFacetHolder().getFacet(BulkFacet.class);
+//        if (bulkFacet != null) {
+//            final org.apache.isis.applib.services.actinvoc.ActionInvocationContext actionInvocationContext = getActionInvocationContext();
+//            if (actionInvocationContext != null && actionInvocationContext.getInvokedOn() == null) {
+//
+//                actionInvocationContext.setInvokedOn(InvokedOn.OBJECT);
+//                actionInvocationContext.setDomainObjects(Collections.singletonList(targetPojo));
+//            }
+//        }
+//    }
 
     @Override
     public boolean isPrototype() {
@@ -611,9 +606,6 @@ public class ObjectActionDefault extends ObjectMemberAbstract implements ObjectA
 
     }
 
-
-
-
     // -- toString
 
     @Override
@@ -636,16 +628,4 @@ public class ObjectActionDefault extends ObjectMemberAbstract implements ObjectA
         return sb.toString();
     }
 
-
-
-    // -- services (lookup)
-
-
-    protected org.apache.isis.applib.services.actinvoc.ActionInvocationContext getActionInvocationContext() {
-        return lookupService(org.apache.isis.applib.services.actinvoc.ActionInvocationContext.class);
-    }
-
-
-
-
 }
diff --git a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
index ac6004f..2752c1f 100644
--- a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
+++ b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/actions/action/ActionAnnotationFacetFactoryTest.java
@@ -30,11 +30,17 @@ import java.lang.reflect.Method;
 import java.util.Collection;
 import java.util.UUID;
 
+import org.jmock.Expectations;
+import org.jmock.auto.Mock;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
 import org.apache.isis.applib.annotation.Action;
 import org.apache.isis.applib.annotation.CommandExecuteIn;
 import org.apache.isis.applib.annotation.CommandPersistence;
 import org.apache.isis.applib.annotation.CommandReification;
-import org.apache.isis.applib.annotation.InvokeOn;
 import org.apache.isis.applib.annotation.SemanticsOf;
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.events.domain.ActionDomainEvent;
@@ -62,7 +68,6 @@ import org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInv
 import org.apache.isis.core.metamodel.facets.actions.action.publishing.PublishedActionFacetForActionAnnotation;
 import org.apache.isis.core.metamodel.facets.actions.action.publishing.PublishedActionFacetFromConfiguration;
 import org.apache.isis.core.metamodel.facets.actions.action.typeof.TypeOfFacetForActionAnnotation;
-import org.apache.isis.core.metamodel.facets.actions.bulk.BulkFacet;
 import org.apache.isis.core.metamodel.facets.actions.command.CommandFacet;
 import org.apache.isis.core.metamodel.facets.actions.prototype.PrototypeFacet;
 import org.apache.isis.core.metamodel.facets.actions.publish.PublishedActionFacet;
@@ -70,13 +75,6 @@ import org.apache.isis.core.metamodel.facets.actions.semantics.ActionSemanticsFa
 import org.apache.isis.core.metamodel.facets.actions.semantics.ActionSemanticsFacetAbstract;
 import org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.jmock.Expectations;
-import org.jmock.auto.Mock;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
 
 @SuppressWarnings({"hiding", "serial"})
 public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4TestCase {
@@ -284,6 +282,7 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
         public void withDefaultEvent() {
 
             class Customer {
+                @SuppressWarnings("unused")
                 public void someAction() {
                 }
             }
@@ -406,6 +405,7 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
         public void whenNotPresent() {
 
             class Customer {
+                @SuppressWarnings("unused")
                 public void someAction() {
                 }
             }
@@ -478,6 +478,7 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
         public void whenNoAnnotation() {
 
             class Customer {
+                @SuppressWarnings("unused")
                 public void someAction() {
                 }
             }
@@ -498,82 +499,6 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
 
     }
 
-    @Deprecated
-    public static class Bulk extends ActionAnnotationFacetFactoryTest {
-
-        @Test @Ignore // deprecated use
-        public void whenObjectOnly() {
-
-            class Customer {
-                @Action(invokeOn = InvokeOn.OBJECT_ONLY)
-                public void someAction() {
-                }
-            }
-
-            // given
-            final Class<?> cls = Customer.class;
-            actionMethod = findMethod(cls, "someAction");
-
-            // when
-            final ProcessMethodContext processMethodContext = new ProcessMethodContext(cls, null, actionMethod, mockMethodRemover, facetedMethod);
-            facetFactory.processBulk(processMethodContext);
-
-            // then
-            final BulkFacet facet = facetedMethod.getFacet(BulkFacet.class);
-            assertNull(facet); 
-
-        }
-
-        @Test @Ignore // deprecated use
-        public void whenCollectionOnly() {
-
-            class Customer {
-                @Action(invokeOn = InvokeOn.COLLECTION_ONLY)
-                public void someAction() {
-                }
-            }
-
-            // given
-            final Class<?> cls = Customer.class;
-            actionMethod = findMethod(cls, "someAction");
-
-            // when
-            final ProcessMethodContext processMethodContext = new ProcessMethodContext(cls, null, actionMethod, mockMethodRemover, facetedMethod);
-            facetFactory.processBulk(processMethodContext);
-
-            // then
-            final BulkFacet facet = facetedMethod.getFacet(BulkFacet.class);
-            Assert.assertNotNull(facet);
-            assertThat(facet.value(), is(InvokeOn.COLLECTION_ONLY));
-
-        }
-
-        @Test @Ignore // deprecated use
-        public void whenObjectAndCollection() {
-
-            class Customer {
-                @Action(invokeOn = InvokeOn.OBJECT_AND_COLLECTION)
-                public void someAction() {
-                }
-            }
-
-            // given
-            final Class<?> cls = Customer.class;
-            actionMethod = findMethod(cls, "someAction");
-
-            // when
-            final ProcessMethodContext processMethodContext = new ProcessMethodContext(cls, null, actionMethod, mockMethodRemover, facetedMethod);
-            facetFactory.processBulk(processMethodContext);
-
-            // then
-            final BulkFacet facet = facetedMethod.getFacet(BulkFacet.class);
-            Assert.assertNotNull(facet);
-            assertThat(facet.value(), is(InvokeOn.OBJECT_AND_COLLECTION));
-
-        }
-
-    }
-
     public static class Command extends ActionAnnotationFacetFactoryTest {
 
         @Test
@@ -1116,9 +1041,8 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
         @Test
         public void whenDeprecatedTypeOfAnnotationOnActionNotReturningCollection() {
 
-            class Order {
-            }
             class Customer {
+                @SuppressWarnings("unused")
                 public Customer someAction() {
                     return null;
                 }
@@ -1143,6 +1067,7 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
             class Order {
             }
             class Customer {
+                @SuppressWarnings("rawtypes")
                 @Action(typeOf = Order.class)
                 public Collection someAction() {
                     return null;
@@ -1195,6 +1120,7 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
             class Order {
             }
             class Customer {
+                @SuppressWarnings("unused")
                 public Order[] someAction() {
                     return null;
                 }
@@ -1221,6 +1147,7 @@ public class ActionAnnotationFacetFactoryTest extends AbstractFacetFactoryJUnit4
             class Order {
             }
             class Customer {
+                @SuppressWarnings("unused")
                 public Collection<Order> someAction() {
                     return null;
                 }
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/AssociatedWithActionsHelper.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/AssociatedWithActionsHelper.java
index 04a54c9..59c27a7 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/AssociatedWithActionsHelper.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/AssociatedWithActionsHelper.java
@@ -36,7 +36,6 @@ import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
 import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.models.EntityCollectionModel;
-import org.apache.isis.viewer.wicket.ui.components.collection.bulk.BulkActionsHelper;
 
 /**
  * See also {@link BulkActionsHelper}.
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsHelper.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsHelper.java
deleted file mode 100644
index 056b8f7..0000000
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsHelper.java
+++ /dev/null
@@ -1,81 +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.ui.components.collection.bulk;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import org.apache.isis.commons.internal.collections._Lists;
-
-import org.apache.isis.core.metamodel.deployment.DeploymentCategory;
-import org.apache.isis.core.metamodel.spec.ActionType;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.Contributed;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
-import org.apache.isis.viewer.wicket.model.models.EntityCollectionModel;
-import org.apache.isis.viewer.wicket.ui.components.collection.AssociatedWithActionsHelper;
-
-/**
- * See also {@link AssociatedWithActionsHelper}.
- */
-public class BulkActionsHelper implements Serializable {
-
-    private final EntityCollectionModel collectionModel;
-
-    private static final long serialVersionUID = 1L;
-
-    public BulkActionsHelper(final EntityCollectionModel collectionModel) {
-        this.collectionModel = collectionModel;
-    }
-
-    public List<ObjectAction> getBulkActions(final IsisSessionFactory isisSessionFactory) {
-
-        if(collectionModel.isParented()) {
-            return Collections.emptyList();
-        }
-
-        final ObjectSpecification objectSpec = getObjectSpecification(isisSessionFactory);
-
-        final List<ActionType> actionTypes = inferActionTypes(isisSessionFactory);
-        final Stream<ObjectAction> objectActions = objectSpec.streamObjectActions(actionTypes, Contributed.INCLUDED);
-
-        return objectActions
-                .filter(ObjectAction.Predicates.bulk())
-                .collect(Collectors.toList());
-    }
-
-    private ObjectSpecification getObjectSpecification(final IsisSessionFactory isisSessionFactory) {
-        return collectionModel.getTypeOfSpecification();
-    }
-
-    private List<ActionType> inferActionTypes(final IsisSessionFactory isisSessionFactory) {
-        final List<ActionType> actionTypes = _Lists.newArrayList();
-        actionTypes.add(ActionType.USER);
-        final DeploymentCategory deploymentCategory = isisSessionFactory.getDeploymentCategory();
-        if ( !deploymentCategory.isProduction()) {
-            actionTypes.add(ActionType.PROTOTYPE);
-        }
-        return actionTypes;
-    }
-
-}
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsLinkFactory.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsLinkFactory.java
index 38fe8e9..799051f 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsLinkFactory.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collection/bulk/BulkActionsLinkFactory.java
@@ -21,9 +21,13 @@ package org.apache.isis.viewer.wicket.ui.components.collection.bulk;
 import java.util.List;
 import java.util.stream.Collectors;
 
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+
+import org.apache.wicket.markup.html.link.AbstractLink;
+import org.apache.wicket.markup.html.link.Link;
+
 import org.apache.isis.applib.RecoverableException;
-import org.apache.isis.applib.annotation.InvokedOn;
-import org.apache.isis.applib.services.actinvoc.ActionInvocationContext;
 import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.applib.services.command.Command.Executor;
 import org.apache.isis.applib.services.command.CommandContext;
@@ -52,12 +56,6 @@ import org.apache.isis.viewer.wicket.ui.actionresponse.ActionResultResponseType;
 import org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.columns.ObjectAdapterToggleboxColumn;
 import org.apache.isis.viewer.wicket.ui.components.widgets.linkandlabel.ActionLinkFactory;
 import org.apache.isis.viewer.wicket.ui.errors.JGrowlBehaviour;
-import org.apache.wicket.markup.html.link.AbstractLink;
-import org.apache.wicket.markup.html.link.Link;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
-import org.apache.isis.commons.internal.collections._Lists;
 
 public final class BulkActionsLinkFactory implements ActionLinkFactory {
 
@@ -100,17 +98,8 @@ public final class BulkActionsLinkFactory implements ActionLinkFactory {
                                     concurrencyChecking, getPersistenceSession(), getSpecificationLoader()))
                             .collect(Collectors.toList());
 
-                    final List<Object> domainObjects =
-                            _Lists.map(toggledAdapters, ObjectAdapter.Functions.getObject());
-
-                    final ActionInvocationContext actionInvocationContext = getServicesInjector().lookupService(ActionInvocationContext.class);
-                    if (actionInvocationContext != null) {
-                        actionInvocationContext.setInvokedOn(InvokedOn.COLLECTION);
-                        actionInvocationContext.setDomainObjects(domainObjects);
-                    }
-
                     ObjectAdapter lastReturnedAdapter = null;
-                    int i=0;
+                    
                     for(final ObjectAdapter adapter : toggledAdapters) {
 
                         final CommandContext commandContext = getServicesInjector().lookupService(CommandContext.class);
diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/standalonecollection/StandaloneCollectionPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/standalonecollection/StandaloneCollectionPanel.java
index 2197bbd..8584c00 100644
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/standalonecollection/StandaloneCollectionPanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/standalonecollection/StandaloneCollectionPanel.java
@@ -41,7 +41,6 @@ import org.apache.isis.viewer.wicket.ui.ComponentType;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistry;
 import org.apache.isis.viewer.wicket.ui.components.actionmenu.entityactions.AdditionalLinksPanel;
 import org.apache.isis.viewer.wicket.ui.components.actionprompt.ActionPromptModalWindow;
-import org.apache.isis.viewer.wicket.ui.components.collection.bulk.BulkActionsHelper;
 import org.apache.isis.viewer.wicket.ui.components.collection.bulk.BulkActionsLinkFactory;
 import org.apache.isis.viewer.wicket.ui.components.collection.bulk.BulkActionsProvider;
 import org.apache.isis.viewer.wicket.ui.components.collection.count.CollectionCountProvider;
@@ -69,7 +68,6 @@ implements CollectionCountProvider, CollectionSelectorProvider, BulkActionsProvi
 
     private final ActionPromptModalWindow actionPromptModalWindow;
     private final CollectionSelectorPanel selectorDropdownPanel;
-    private final BulkActionsHelper bulkActionsHelper;
 
     private boolean additionalLinksAdded;
 
@@ -124,8 +122,6 @@ implements CollectionCountProvider, CollectionSelectorProvider, BulkActionsProvi
 
         final ComponentFactoryRegistry componentFactoryRegistry = getComponentFactoryRegistry();
         componentFactoryRegistry.addOrReplaceComponent(outerDiv, ComponentType.COLLECTION_CONTENTS, entityCollectionModel);
-
-        bulkActionsHelper = new BulkActionsHelper(entityCollectionModel);
     }
 
     // -- ActionPromptModalWindowProvider
@@ -145,10 +141,9 @@ implements CollectionCountProvider, CollectionSelectorProvider, BulkActionsProvi
     public ObjectAdapterToggleboxColumn getToggleboxColumn() {
 
         if (toggleboxColumn == null) {
-            final List<ObjectAction> bulkActions = bulkActionsHelper.getBulkActions(getIsisSessionFactory());
 
             final EntityCollectionModel entityCollectionModel = getModel();
-            if(bulkActions.isEmpty() || entityCollectionModel.isParented()) {
+            if(entityCollectionModel.isParented()) {
                 return null;
             }
 
@@ -174,29 +169,9 @@ implements CollectionCountProvider, CollectionSelectorProvider, BulkActionsProvi
 
     @Override
     public void configureBulkActions(final ObjectAdapterToggleboxColumn toggleboxColumn) {
-
-        if(additionalLinksAdded) {
-            return;
-        }
-        final BulkActionsLinkFactory linkFactory =
-                new BulkActionsLinkFactory(getModel(), toggleboxColumn);
-
-        final List<ObjectAction> bulkActions = bulkActionsHelper.getBulkActions(getIsisSessionFactory());
-
-        final List<LinkAndLabel> linkAndLabels = _Lists.map(bulkActions, (ObjectAction objectAction) ->
-                linkFactory.newLink(objectAction, ID_ADDITIONAL_LINK, null));
-
-        AdditionalLinksPanel.addAdditionalLinks(
-                outerDiv, ID_ADDITIONAL_LINKS, linkAndLabels, AdditionalLinksPanel.Style.INLINE_LIST);
-        additionalLinksAdded = true;
-
     }
 
 
-
-
-
-
     // -- CollectionSelectorProvider
 
     @Override


[isis] 02/04: ISIS-1976: remove deprecated PropertyLayoutData.renderedAsDayBefore

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git

commit f1a89a43c71fd3b370102bca456677355bd92f58
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Sep 26 21:04:31 2018 +0200

    ISIS-1976: remove deprecated PropertyLayoutData.renderedAsDayBefore
    
    fixes GridSystemServiceAbstract.setRenderedAsDayBeforeIfAny being
    ignored
    
    Task-Url: https://issues.apache.org/jira/browse/ISIS-1976
---
 .../layout/component/PropertyLayoutData.java       | 18 ------------
 ...ropertyLayoutData_renderedAsDayBefore_Test.java | 33 ----------------------
 .../RenderedAdjustedFacetForPropertyXml.java       |  6 ++--
 .../services/grid/GridSystemServiceAbstract.java   |  3 +-
 4 files changed, 6 insertions(+), 54 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java b/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
index 606f74e..6c66a32 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/layout/component/PropertyLayoutData.java
@@ -187,24 +187,6 @@ HasCssClass, HasDescribedAs, HasHidden, HasNamed  {
         this.promptStyle = promptStyle;
     }
 
-
-
-    /**
-     * @deprecated - use {@link #getRenderDay()} instead.
-     */
-    @Deprecated
-    @XmlAttribute(required = false)
-    public Boolean getRenderedAsDayBefore() {
-        return getRenderDay() != null ? getRenderDay() == RenderDay.AS_DAY_BEFORE : null;
-    }
-
-    public void setRenderedAsDayBefore(Boolean renderedAsDayBefore) {
-        if(getRenderDay() == null && renderedAsDayBefore != null) {
-            setRenderDay(renderedAsDayBefore ? RenderDay.AS_DAY_BEFORE : RenderDay.AS_DAY);
-        }
-    }
-
-
     private RenderDay renderDay;
 
     @XmlAttribute(required = false)
diff --git a/core/applib/src/test/java/org/apache/isis/applib/layout/component/PropertyLayoutData_renderedAsDayBefore_Test.java b/core/applib/src/test/java/org/apache/isis/applib/layout/component/PropertyLayoutData_renderedAsDayBefore_Test.java
index 2f1afb6..a818792 100644
--- a/core/applib/src/test/java/org/apache/isis/applib/layout/component/PropertyLayoutData_renderedAsDayBefore_Test.java
+++ b/core/applib/src/test/java/org/apache/isis/applib/layout/component/PropertyLayoutData_renderedAsDayBefore_Test.java
@@ -32,46 +32,17 @@ public class PropertyLayoutData_renderedAsDayBefore_Test {
     public void setUp() throws Exception {
         data = new PropertyLayoutData();
 
-        assertThat(data.getRenderedAsDayBefore(), is(nullValue()));
         assertThat(data.getRenderDay(), is(nullValue()));
     }
 
     @Test
-    public void derive_from_setRenderedAsDayBefore_TRUE_when_null() throws Exception {
-
-        // when
-        data.setRenderedAsDayBefore(true);
-
-        // then
-        assertThat(data.getRenderDay(), is(RenderDay.AS_DAY_BEFORE));
-        assertThat(data.getRenderedAsDayBefore(), is(true));
-
-    }
-
-    @Test
-    public void derive_from_setRenderedAsDayBefore_FALSE_when_null() throws Exception {
-
-        // when
-        data.setRenderedAsDayBefore(false);
-
-        // then
-        assertThat(data.getRenderDay(), is(RenderDay.AS_DAY));
-        assertThat(data.getRenderedAsDayBefore(), is(false));
-
-    }
-
-    @Test
     public void ignore_from_setRenderedAsDayBefore_once_set_to_DAY_BEFORE() throws Exception {
 
         // given
         data.setRenderDay(RenderDay.AS_DAY_BEFORE);
 
-        // when
-        data.setRenderedAsDayBefore(false);
-
         // then (ignored)
         assertThat(data.getRenderDay(), is(RenderDay.AS_DAY_BEFORE));
-        assertThat(data.getRenderedAsDayBefore(), is(true));
     }
 
     @Test
@@ -80,12 +51,8 @@ public class PropertyLayoutData_renderedAsDayBefore_Test {
         // given
         data.setRenderDay(RenderDay.AS_DAY);
 
-        // when
-        data.setRenderedAsDayBefore(true);
-
         // then (ignored)
         assertThat(data.getRenderDay(), is(RenderDay.AS_DAY));
-        assertThat(data.getRenderedAsDayBefore(), is(false));
     }
 
 }
\ No newline at end of file
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyXml.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyXml.java
index cb4c346..2d8bb39 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyXml.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/propertylayout/RenderedAdjustedFacetForPropertyXml.java
@@ -19,6 +19,7 @@
 
 package org.apache.isis.core.metamodel.facets.properties.propertylayout;
 
+import org.apache.isis.applib.annotation.RenderDay;
 import org.apache.isis.applib.layout.component.PropertyLayoutData;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.objectvalue.renderedadjusted.RenderedAdjustedFacet;
@@ -30,8 +31,9 @@ public class RenderedAdjustedFacetForPropertyXml extends RenderedAdjustedFacetAb
         if(propertyLayout == null) {
             return null;
         }
-        final Boolean renderedAsDayBefore = propertyLayout.getRenderedAsDayBefore();
-        return renderedAsDayBefore != null && renderedAsDayBefore ? new RenderedAdjustedFacetForPropertyXml(holder) : null;
+        final RenderDay renderDay = propertyLayout.getRenderDay();
+        return renderDay != null && renderDay == RenderDay.AS_DAY_BEFORE 
+                ? new RenderedAdjustedFacetForPropertyXml(holder) : null;
     }
 
     public static final int ADJUST_BY = -1;
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridSystemServiceAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridSystemServiceAbstract.java
index f19ea99..32b913b 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridSystemServiceAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/grid/GridSystemServiceAbstract.java
@@ -30,6 +30,7 @@ import org.apache.isis.applib.annotation.ActionLayout;
 import org.apache.isis.applib.annotation.BookmarkPolicy;
 import org.apache.isis.applib.annotation.LabelPosition;
 import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.annotation.RenderDay;
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.layout.component.ActionLayoutData;
 import org.apache.isis.applib.layout.component.ActionLayoutDataOwner;
@@ -630,7 +631,7 @@ public abstract class GridSystemServiceAbstract<G extends org.apache.isis.applib
         final RenderedAdjustedFacet renderedAdjustedFacet = facetHolder.getFacet(RenderedAdjustedFacet.class);
         if(isDoOp(renderedAdjustedFacet)) {
             final int adjusted = renderedAdjustedFacet.value();
-            propertyLayoutData.setRenderedAsDayBefore(adjusted != 0);
+            propertyLayoutData.setRenderDay(adjusted != 0 ? RenderDay.AS_DAY_BEFORE : RenderDay.AS_DAY);
         }
     }
 


[isis] 01/04: ISIS-1976: remove deprecated BookmarkService methods that don't take a FieldResetPolicy argument

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/isis.git

commit a1fdfa45fddd0a8bcf9781a222d5e63a7fdb903d
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Sep 26 20:35:11 2018 +0200

    ISIS-1976: remove deprecated BookmarkService methods that don't take a
    FieldResetPolicy argument
    
    Task-Url: https://issues.apache.org/jira/browse/ISIS-1976
---
 .../services/bookmark/BookmarkHolder_lookup.java   |  3 ++-
 .../services/bookmark/BookmarkHolder_object.java   |  3 ++-
 .../applib/services/bookmark/BookmarkService.java  | 22 -------------------
 .../bookmarks/BookmarkServiceInternalDefault.java  | 25 +---------------------
 .../PersistenceSessionServiceInternal.java         | 14 ------------
 .../PersistenceSessionServiceInternalNoop.java     |  5 -----
 .../background/CommandExecutorServiceDefault.java  |  3 ++-
 .../PersistenceSessionServiceInternalDefault.java  | 11 ----------
 8 files changed, 7 insertions(+), 79 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkHolder_lookup.java b/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkHolder_lookup.java
index a1e2bd6..447bd6a 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkHolder_lookup.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkHolder_lookup.java
@@ -24,6 +24,7 @@ import org.apache.isis.applib.annotation.ActionLayout;
 import org.apache.isis.applib.annotation.Contributed;
 import org.apache.isis.applib.annotation.Mixin;
 import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.services.bookmark.BookmarkService.FieldResetPolicy;
 
 @Mixin(method = "act")
 public class BookmarkHolder_lookup {
@@ -45,7 +46,7 @@ public class BookmarkHolder_lookup {
             cssClassFa = "fa-bookmark"
             )
     public Object act() {
-        return bookmarkService.lookup(bookmarkHolder);
+        return bookmarkService.lookup(bookmarkHolder, FieldResetPolicy.RESET);
     }
 
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkHolder_object.java b/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkHolder_object.java
index 0d58834..8cab173 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkHolder_object.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkHolder_object.java
@@ -24,6 +24,7 @@ import org.apache.isis.applib.annotation.ActionLayout;
 import org.apache.isis.applib.annotation.Contributed;
 import org.apache.isis.applib.annotation.Mixin;
 import org.apache.isis.applib.annotation.SemanticsOf;
+import org.apache.isis.applib.services.bookmark.BookmarkService.FieldResetPolicy;
 
 @Mixin(method = "prop")
 public class BookmarkHolder_object {
@@ -44,7 +45,7 @@ public class BookmarkHolder_object {
             contributed = Contributed.AS_ASSOCIATION
             )
     public Object prop() {
-        return bookmarkService.lookup(bookmarkHolder);
+        return bookmarkService.lookup(bookmarkHolder, FieldResetPolicy.RESET);
     }
 
 
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkService.java b/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkService.java
index fa026ca..8650a42 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkService.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkService.java
@@ -19,7 +19,6 @@
 package org.apache.isis.applib.services.bookmark;
 
 import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.commons.internal.memento._Mementos.SerializingAdapter;
 
 /**
  * This service enables a serializable &quot;bookmark&quot; to be created for an entity.
@@ -32,27 +31,6 @@ import org.apache.isis.commons.internal.memento._Mementos.SerializingAdapter;
  */
 public interface BookmarkService {
 
-    /**
-     * @deprecated - use {@link BookmarkService#lookup(BookmarkHolder, BookmarkService.FieldResetPolicy)} instead.
-     */
-    @Deprecated
-    @Programmatic
-    Object lookup(BookmarkHolder bookmarkHolder);
-
-    /**
-     * @deprecated - use {@link BookmarkService#lookup(Bookmark, BookmarkService.FieldResetPolicy)} instead.
-     */
-    @Deprecated
-    @Programmatic
-    Object lookup(Bookmark bookmark);
-
-    /**
-     * @deprecated - use {@link BookmarkService#lookup(Bookmark, BookmarkService.FieldResetPolicy, Class)} instead.
-     */
-    @Deprecated
-    @Programmatic
-    <T> T lookup(Bookmark bookmark, Class<T> cls);
-
     @Programmatic
     Bookmark bookmarkFor(Object domainObject);
 
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/bookmarks/BookmarkServiceInternalDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/bookmarks/BookmarkServiceInternalDefault.java
index 42d6095..f7e12f3 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/bookmarks/BookmarkServiceInternalDefault.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/bookmarks/BookmarkServiceInternalDefault.java
@@ -68,13 +68,6 @@ public class BookmarkServiceInternalDefault implements BookmarkService, Serializ
         return bookmark != null? lookup(bookmark, fieldResetPolicy): null;
     }
 
-    @Programmatic
-    @Override
-    public Object lookup(final BookmarkHolder bookmarkHolder) {
-        return lookup(bookmarkHolder, FieldResetPolicy.RESET);
-    }
-
-
     private Object lookupInternal(
             final Bookmark bookmark,
             final FieldResetPolicy fieldResetPolicy) {
@@ -105,15 +98,6 @@ public class BookmarkServiceInternalDefault implements BookmarkService, Serializ
         return lookupInternal(bookmark, fieldResetPolicy);
     }
 
-
-
-    @Programmatic
-    @Override
-    public Object lookup(final Bookmark bookmark) {
-        return lookup(bookmark, FieldResetPolicy.RESET);
-    }
-
-
     @SuppressWarnings("unchecked")
     @Programmatic
     @Override
@@ -126,13 +110,6 @@ public class BookmarkServiceInternalDefault implements BookmarkService, Serializ
 
     @Programmatic
     @Override
-    public <T> T lookup(final Bookmark bookmark, Class<T> cls) {
-        return (T) lookup(bookmark, FieldResetPolicy.RESET, cls);
-    }
-
-
-    @Programmatic
-    @Override
     public Bookmark bookmarkFor(final Object domainObject) {
         if(domainObject == null) {
             return null;
@@ -184,7 +161,7 @@ public class BookmarkServiceInternalDefault implements BookmarkService, Serializ
 
         if(Bookmark.class.isAssignableFrom(value.getClass())) {
             final Bookmark valueBookmark = (Bookmark) value;
-            return _Casts.uncheckedCast(lookup(valueBookmark));
+            return _Casts.uncheckedCast(lookup(valueBookmark, FieldResetPolicy.RESET));
         }
 
         return _Casts.uncheckedCast(value);
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/persistsession/PersistenceSessionServiceInternal.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/persistsession/PersistenceSessionServiceInternal.java
index 65509a9..11b2c98 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/persistsession/PersistenceSessionServiceInternal.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/persistsession/PersistenceSessionServiceInternal.java
@@ -62,18 +62,6 @@ public interface PersistenceSessionServiceInternal extends ObjectAdapterProvider
      * Provided by <tt>PersistenceSession</tt> when used by framework.
      *
      * <p>
-     * Called by <tt>DomainObjectContainerDefault</tt>.
-     *
-     * @deprecated - left over from manual object resolving.
-     */
-    @Deprecated
-    @Programmatic
-    void resolve(Object parent, Object field);
-
-    /**
-     * Provided by <tt>PersistenceSession</tt> when used by framework.
-     *
-     * <p>
      * Called by <tt>BookmarkServicesDefault</tt>.
      * @return
      */
@@ -86,8 +74,6 @@ public interface PersistenceSessionServiceInternal extends ObjectAdapterProvider
     @Programmatic
     Bookmark bookmarkFor(Class<?> cls, String identifier);
 
-
-
     // -- beginTran, flush, commit, currentTransaction
 
     @Programmatic
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/persistsession/PersistenceSessionServiceInternalNoop.java b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/persistsession/PersistenceSessionServiceInternalNoop.java
index 3bc7c55..2d1abe8 100644
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/persistsession/PersistenceSessionServiceInternalNoop.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/persistsession/PersistenceSessionServiceInternalNoop.java
@@ -73,11 +73,6 @@ public class PersistenceSessionServiceInternalNoop implements PersistenceSession
     }
 
     @Override
-    public void resolve(final Object parent, final Object field) {
-        throw new UnsupportedOperationException("Not supported by this implementation of PersistenceSessionServiceInternal");
-    }
-
-    @Override
     public void resolve(final Object parent) {
         throw new UnsupportedOperationException("Not supported by this implementation of PersistenceSessionServiceInternal");
     }
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/CommandExecutorServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/CommandExecutorServiceDefault.java
index f9a24bd..cf1ae4b 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/CommandExecutorServiceDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/background/CommandExecutorServiceDefault.java
@@ -30,6 +30,7 @@ import org.apache.isis.applib.annotation.NatureOfService;
 import org.apache.isis.applib.annotation.Programmatic;
 import org.apache.isis.applib.services.bookmark.Bookmark;
 import org.apache.isis.applib.services.bookmark.BookmarkService;
+import org.apache.isis.applib.services.bookmark.BookmarkService.FieldResetPolicy;
 import org.apache.isis.applib.services.clock.ClockService;
 import org.apache.isis.applib.services.command.Command;
 import org.apache.isis.applib.services.command.CommandContext;
@@ -202,7 +203,7 @@ public class CommandExecutorServiceDefault implements CommandExecutorService {
                         for (OidDto targetOidDto : targetOidDtos) {
 
                             final Bookmark bookmark = Bookmark.from(targetOidDto);
-                            final Object targetObject = bookmarkService.lookup(bookmark);
+                            final Object targetObject = bookmarkService.lookup(bookmark, FieldResetPolicy.RESET);
 
                             final ObjectAdapter targetAdapter = adapterFor(targetObject);
 
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/persistsession/PersistenceSessionServiceInternalDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/persistsession/PersistenceSessionServiceInternalDefault.java
index 5c0800c..2004846 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/persistsession/PersistenceSessionServiceInternalDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/persistsession/PersistenceSessionServiceInternalDefault.java
@@ -141,17 +141,6 @@ public class PersistenceSessionServiceInternalDefault implements PersistenceSess
         getPersistenceSession().refreshRootInTransaction(parent);
     }
 
-    /**
-     * @deprecated - left over from manual object resolving.
-     */
-    @Deprecated
-    @Override
-    public void resolve(final Object parent, final Object field) {
-        if (field == null) {
-            resolve(parent);
-        }
-    }
-
     @Override
     public void beginTran() {
         beginTran(null);