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 2014/07/11 12:56:30 UTC

[18/61] [partial] ISIS-831: digression: moving progmodel/facets into metamodel/facets

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/semantics/IdempotentFacetAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/semantics/IdempotentFacetAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/semantics/IdempotentFacetAnnotation.java
deleted file mode 100644
index 5b5e8db..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/semantics/IdempotentFacetAnnotation.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.progmodel.facets.actions.semantics;
-
-import org.apache.isis.applib.annotation.ActionSemantics;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.actions.semantics.ActionSemanticsFacetAbstract;
-
-public class IdempotentFacetAnnotation extends ActionSemanticsFacetAbstract {
-
-    public IdempotentFacetAnnotation(final FacetHolder holder) {
-        super(ActionSemantics.Of.IDEMPOTENT, holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/semantics/QueryOnlyAnnotationFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/semantics/QueryOnlyAnnotationFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/semantics/QueryOnlyAnnotationFacetFactory.java
deleted file mode 100644
index 7a2379a..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/semantics/QueryOnlyAnnotationFacetFactory.java
+++ /dev/null
@@ -1,45 +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.progmodel.facets.actions.semantics;
-
-import org.apache.isis.applib.annotation.QueryOnly;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facets.Annotations;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.FacetedMethod;
-
-public class QueryOnlyAnnotationFacetFactory extends FacetFactoryAbstract {
-
-    public QueryOnlyAnnotationFacetFactory() {
-        super(FeatureType.ACTIONS_ONLY);
-    }
-
-    @Override
-    public void process(final ProcessMethodContext processMethodContext) {
-        final QueryOnly annotation = Annotations.getAnnotation(processMethodContext.getMethod(), QueryOnly.class);
-        if (annotation == null) {
-            return;
-        }
-        final FacetedMethod facetHolder = processMethodContext.getFacetHolder();
-        FacetUtil.addFacet(new QueryOnlyFacetAnnotation(facetHolder));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/semantics/QueryOnlyFacetAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/semantics/QueryOnlyFacetAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/semantics/QueryOnlyFacetAnnotation.java
deleted file mode 100644
index 3b0c72d..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/semantics/QueryOnlyFacetAnnotation.java
+++ /dev/null
@@ -1,31 +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.progmodel.facets.actions.semantics;
-
-import org.apache.isis.applib.annotation.ActionSemantics;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.actions.semantics.ActionSemanticsFacetAbstract;
-
-public class QueryOnlyFacetAnnotation extends ActionSemanticsFacetAbstract {
-
-    public QueryOnlyFacetAnnotation(final FacetHolder holder) {
-        super(ActionSemantics.Of.SAFE, holder);
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java
deleted file mode 100644
index 8ab6fef..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfAnnotationForActionsFacetFactory.java
+++ /dev/null
@@ -1,120 +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.progmodel.facets.actions.typeof.annotation;
-
-import java.lang.reflect.GenericDeclaration;
-import java.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
-
-import org.apache.isis.applib.annotation.TypeOf;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facets.Annotations;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromArray;
-import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromGenerics;
-import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistry;
-import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistryAware;
-
-public class TypeOfAnnotationForActionsFacetFactory extends FacetFactoryAbstract implements CollectionTypeRegistryAware {
-    private CollectionTypeRegistry collectionTypeRegistry;
-
-    public TypeOfAnnotationForActionsFacetFactory() {
-        super(FeatureType.ACTIONS_ONLY);
-    }
-
-    @Override
-    public void process(final ProcessMethodContext processMethodContext) {
-
-        final Method method = processMethodContext.getMethod();
-        final Class<?> methodReturnType = method.getReturnType();
-        if (!collectionTypeRegistry.isCollectionType(methodReturnType) && !collectionTypeRegistry.isArrayType(methodReturnType)) {
-            return;
-        }
-
-        final Class<?> returnType = method.getReturnType();
-        if (returnType.isArray()) {
-            final Class<?> componentType = returnType.getComponentType();
-            FacetUtil.addFacet(new TypeOfFacetInferredFromArray(componentType, processMethodContext.getFacetHolder(), getSpecificationLoader()));
-            return;
-        }
-
-        final TypeOf annotation = Annotations.getAnnotation(method, TypeOf.class);
-        if (annotation != null) {
-            FacetUtil.addFacet(new TypeOfFacetAnnotationForAction(annotation.value(), processMethodContext.getFacetHolder(), getSpecificationLoader()));
-            return;
-        }
-
-        final Type type = method.getGenericReturnType();
-        if (!(type instanceof ParameterizedType)) {
-            return;
-        }
-
-        final ParameterizedType methodParameterizedType = (ParameterizedType) type;
-        final Type[] methodActualTypeArguments = methodParameterizedType.getActualTypeArguments();
-        if (methodActualTypeArguments.length == 0) {
-            return;
-        }
-
-        final Object methodActualTypeArgument = methodActualTypeArguments[0];
-        if (methodActualTypeArgument instanceof Class) {
-            final Class<?> actualType = (Class<?>) methodActualTypeArgument;
-            FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualType, processMethodContext.getFacetHolder(), getSpecificationLoader()));
-            return;
-        }
-
-        if (methodActualTypeArgument instanceof TypeVariable) {
-
-            TypeVariable<?> methodTypeVariable = (TypeVariable<?>) methodActualTypeArgument;
-            final GenericDeclaration methodGenericClassDeclaration = methodTypeVariable.getGenericDeclaration();
-            
-            // try to match up with the actual type argument of the generic superclass.
-            final Type genericSuperclass = processMethodContext.getCls().getGenericSuperclass();
-            if(genericSuperclass instanceof ParameterizedType) {
-                final ParameterizedType parameterizedTypeOfSuperclass = (ParameterizedType)genericSuperclass;
-                if(parameterizedTypeOfSuperclass.getRawType() == methodGenericClassDeclaration) {
-                    final Type[] genericSuperClassActualTypeArguments = parameterizedTypeOfSuperclass.getActualTypeArguments();
-                    // simplification: if there's just one, then use it.
-                    if(methodActualTypeArguments.length == 1) {
-                        final Type actualType = genericSuperClassActualTypeArguments[0];
-                        if(actualType instanceof Class) {
-                            // just being safe
-                            Class<?> actualCls = (Class<?>) actualType;
-                            FacetUtil.addFacet(new TypeOfFacetInferredFromGenerics(actualCls, processMethodContext.getFacetHolder(), getSpecificationLoader()));
-                            return;
-                        }
-                    }
-                }
-            }
-            
-            // TODO: otherwise, what to do?
-            return;
-        }
-
-    }
-
-    @Override
-    public void setCollectionTypeRegistry(final CollectionTypeRegistry collectionTypeRegistry) {
-        this.collectionTypeRegistry = collectionTypeRegistry;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfFacetAnnotationForAction.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfFacetAnnotationForAction.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfFacetAnnotationForAction.java
deleted file mode 100644
index 9f34bd4..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/typeof/annotation/TypeOfFacetAnnotationForAction.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.progmodel.facets.actions.typeof.annotation;
-
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetAbstract;
-import org.apache.isis.core.metamodel.spec.SpecificationLoader;
-
-public class TypeOfFacetAnnotationForAction extends TypeOfFacetAbstract {
-
-    public TypeOfFacetAnnotationForAction(final Class<?> type, final FacetHolder holder, final SpecificationLoader specificationLookup) {
-        super(type, holder, specificationLookup);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/ActionValidationFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/ActionValidationFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/ActionValidationFacet.java
deleted file mode 100644
index 1872aff..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/ActionValidationFacet.java
+++ /dev/null
@@ -1,47 +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.progmodel.facets.actions.validate;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facets.actions.invoke.ActionInvocationFacet;
-import org.apache.isis.core.metamodel.interactions.ValidatingInteractionAdvisor;
-
-/**
- * The mechanism by which the set of parameters of the action can be validated
- * before the action itself is invoked.
- * 
- * <p>
- * In the standard Apache Isis Programming Model, corresponds to invoking the
- * <tt>validateXxx</tt> support method for an action.
- * 
- * <p>
- * Note that the parameters may be validated independently first (eg a range
- * check on a numeric parameter).
- * 
- * @see ActionInvocationFacet
- */
-public interface ActionValidationFacet extends Facet, ValidatingInteractionAdvisor {
-
-    /**
-     * Reason why the validation has failed, or <tt>null</tt> if okay.
-     */
-    public String invalidReason(ObjectAdapter target, ObjectAdapter[] arguments);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/ActionValidationFacetAbstract.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/ActionValidationFacetAbstract.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/ActionValidationFacetAbstract.java
deleted file mode 100644
index 858e5e6..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/ActionValidationFacetAbstract.java
+++ /dev/null
@@ -1,47 +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.progmodel.facets.actions.validate;
-
-import org.apache.isis.applib.events.ValidityEvent;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facetapi.FacetAbstract;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.interactions.ActionInvocationContext;
-import org.apache.isis.core.metamodel.interactions.ValidityContext;
-
-public abstract class ActionValidationFacetAbstract extends FacetAbstract implements ActionValidationFacet {
-
-    public static Class<? extends Facet> type() {
-        return ActionValidationFacet.class;
-    }
-
-    public ActionValidationFacetAbstract(final FacetHolder holder) {
-        super(type(), holder, Derivation.NOT_DERIVED);
-    }
-
-    @Override
-    public String invalidates(final ValidityContext<? extends ValidityEvent> context) {
-        if (!(context instanceof ActionInvocationContext)) {
-            return null;
-        }
-        final ActionInvocationContext actionInvocationContext = (ActionInvocationContext) context;
-        return invalidReason(actionInvocationContext.getTarget(), actionInvocationContext.getArgs());
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaMethod.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaMethod.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaMethod.java
deleted file mode 100644
index f4769a2..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaMethod.java
+++ /dev/null
@@ -1,75 +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.progmodel.facets.actions.validate.method;
-
-import java.lang.reflect.Method;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.util.AdapterInvokeUtils;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.ImperativeFacet;
-import org.apache.isis.core.progmodel.facets.actions.validate.ActionValidationFacetAbstract;
-
-public class ActionValidationFacetViaMethod extends ActionValidationFacetAbstract implements ImperativeFacet {
-
-    private final Method method;
-
-    public ActionValidationFacetViaMethod(final Method method, final FacetHolder holder) {
-        super(holder);
-        this.method = method;
-    }
-
-    /**
-     * Returns a singleton list of the {@link Method} provided in the
-     * constructor.
-     */
-    @Override
-    public List<Method> getMethods() {
-        return Collections.singletonList(method);
-    }
-
-    @Override
-    public Intent getIntent(final Method method) {
-        return Intent.CHECK_IF_VALID;
-    }
-
-    @Override
-    public boolean impliesResolve() {
-        return true;
-    }
-
-    @Override
-    public boolean impliesObjectChanged() {
-        return false;
-    }
-
-    @Override
-    public String invalidReason(final ObjectAdapter owningAdapter, final ObjectAdapter[] proposedArgumentAdapters) {
-        return (String) AdapterInvokeUtils.invoke(method, owningAdapter, proposedArgumentAdapters);
-    }
-
-    @Override
-    protected String toStringValues() {
-        return "method=" + method;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaValidateMethodFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaValidateMethodFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaValidateMethodFacetFactory.java
deleted file mode 100644
index 10b3d5b..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/validate/method/ActionValidationFacetViaValidateMethodFacetFactory.java
+++ /dev/null
@@ -1,78 +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.progmodel.facets.actions.validate.method;
-
-import java.lang.reflect.Method;
-
-import org.apache.isis.core.commons.lang.StringExtensions;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-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.methodutils.MethodScope;
-import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
-import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
-import org.apache.isis.core.progmodel.facets.MethodPrefixConstants;
-import org.apache.isis.core.progmodel.facets.actions.validate.ActionValidationFacet;
-
-/**
- * Sets up {@link ActionValidationFacet}.
- */
-public class ActionValidationFacetViaValidateMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
-
-    private static final String[] PREFIXES = { MethodPrefixConstants.VALIDATE_PREFIX };
-
-    /**
-     * Note that the {@link Facet}s registered are the generic ones from
-     * noa-architecture (where they exist)
-     */
-    public ActionValidationFacetViaValidateMethodFacetFactory() {
-        super(FeatureType.ACTIONS_ONLY, OrphanValidation.VALIDATE, PREFIXES);
-    }
-
-    // ///////////////////////////////////////////////////////
-    // Actions
-    // ///////////////////////////////////////////////////////
-
-    @Override
-    public void process(final ProcessMethodContext processMethodContext) {
-        attachValidatingAdvisorFacetForValidateMethodIfFound(processMethodContext);
-    }
-
-    private void attachValidatingAdvisorFacetForValidateMethodIfFound(final ProcessMethodContext processMethodContext) {
-
-        final Class<?> cls = processMethodContext.getCls();
-        final Method actionMethod = processMethodContext.getMethod();
-
-        final String capitalizedName = StringExtensions.asCapitalizedName(actionMethod.getName());
-        final Class<?>[] paramTypes = actionMethod.getParameterTypes();
-        final MethodScope onClass = MethodScope.scopeFor(actionMethod);
-
-        final Method validateMethod = MethodFinderUtils.findMethod(cls, onClass, MethodPrefixConstants.VALIDATE_PREFIX + capitalizedName, String.class, paramTypes);
-        if (validateMethod == null) {
-            return;
-        }
-        processMethodContext.removeMethod(validateMethod);
-
-        final FacetHolder facetedMethod = processMethodContext.getFacetHolder();
-        FacetUtil.addFacet(new ActionValidationFacetViaMethod(validateMethod, facetedMethod));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetFactory.java
deleted file mode 100644
index 6696c26..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetFactory.java
+++ /dev/null
@@ -1,106 +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.progmodel.facets.collections.accessor;
-
-import java.lang.reflect.Method;
-import java.util.List;
-
-import org.apache.isis.core.metamodel.facetapi.Facet;
-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.MethodRemover;
-import org.apache.isis.core.metamodel.methodutils.MethodScope;
-import org.apache.isis.core.progmodel.facets.MethodPrefixConstants;
-import org.apache.isis.core.progmodel.facets.PropertyOrCollectionIdentifyingFacetFactoryAbstract;
-
-public class CollectionAccessorFacetFactory extends PropertyOrCollectionIdentifyingFacetFactoryAbstract {
-
-    private static final String[] PREFIXES = { MethodPrefixConstants.GET_PREFIX };
-
-    public CollectionAccessorFacetFactory() {
-        super(FeatureType.COLLECTIONS_ONLY, PREFIXES);
-    }
-
-    @Override
-    public void process(final ProcessMethodContext processMethodContext) {
-
-        attachAccessorFacetForAccessorMethod(processMethodContext);
-    }
-
-    private void attachAccessorFacetForAccessorMethod(final ProcessMethodContext processMethodContext) {
-        final Method accessorMethod = processMethodContext.getMethod();
-        processMethodContext.removeMethod(accessorMethod);
-
-        final FacetHolder holder = processMethodContext.getFacetHolder();
-        final Facet facet = new CollectionAccessorFacetViaAccessor(accessorMethod, holder);
-        FacetUtil.addFacet(facet);
-    }
-
-    // ///////////////////////////////////////////////////////////////
-    // PropertyOrCollectionIdentifyingFacetFactory impl.
-    // ///////////////////////////////////////////////////////////////
-
-    @Override
-    public boolean isPropertyOrCollectionAccessorCandidate(final Method method) {
-        return method.getName().startsWith(MethodPrefixConstants.GET_PREFIX);
-    }
-
-    @Override
-    public boolean isCollectionAccessor(final Method method) {
-        if (!isPropertyOrCollectionAccessorCandidate(method)) {
-            return false;
-        }
-        final Class<?> methodReturnType = method.getReturnType();
-        return isCollectionOrArray(methodReturnType);
-    }
-
-    /**
-     * The method way well represent a reference property, but this facet
-     * factory does not have any opinion on the matter.
-     */
-    @Override
-    public boolean isPropertyAccessor(final Method method) {
-        return false;
-    }
-
-    /**
-     * The method way well represent a value property, but this facet factory
-     * does not have any opinion on the matter.
-     */
-    public boolean isValuePropertyAccessor(final Method method) {
-        return false;
-    }
-
-    @Override
-    public void findAndRemoveCollectionAccessors(final MethodRemover methodRemover, final List<Method> methodListToAppendTo) {
-        final Class<?>[] collectionClasses = getCollectionTypeRepository().getCollectionType();
-        for (final Class<?> returnType : collectionClasses) {
-            final List<Method> list = methodRemover.removeMethods(MethodScope.OBJECT, MethodPrefixConstants.GET_PREFIX, returnType, false, 0);
-            methodListToAppendTo.addAll(list);
-        }
-    }
-
-    @Override
-    public void findAndRemovePropertyAccessors(final MethodRemover methodRemover, final List<Method> methodListToAppendTo) {
-        // does nothing
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetViaAccessor.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetViaAccessor.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetViaAccessor.java
deleted file mode 100644
index 3417e35..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/accessor/CollectionAccessorFacetViaAccessor.java
+++ /dev/null
@@ -1,83 +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.progmodel.facets.collections.accessor;
-
-import java.lang.reflect.Method;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.isis.applib.DomainObjectContainer;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.util.AdapterInvokeUtils;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.ImperativeFacet;
-import org.apache.isis.core.metamodel.facets.ImperativeFacet.Intent;
-import org.apache.isis.core.metamodel.facets.accessor.PropertyOrCollectionAccessorFacetAbstract;
-
-public class CollectionAccessorFacetViaAccessor extends PropertyOrCollectionAccessorFacetAbstract implements ImperativeFacet {
-
-    private final Method method;
-
-    public CollectionAccessorFacetViaAccessor(final Method method, final FacetHolder holder) {
-        super(holder);
-        this.method = method;
-    }
-
-    /**
-     * Returns a singleton list of the {@link Method} provided in the
-     * constructor.
-     */
-    @Override
-    public List<Method> getMethods() {
-        return Collections.singletonList(method);
-    }
-
-    @Override
-    public Intent getIntent(final Method method) {
-        return Intent.ACCESSOR;
-    }
-
-    @Override
-    public boolean impliesResolve() {
-        return true;
-    }
-
-    /**
-     * Bytecode cannot automatically call
-     * {@link DomainObjectContainer#objectChanged(Object)} because cannot
-     * distinguish whether interacting with accessor to read it or to modify its
-     * contents.
-     */
-    @Override
-    public boolean impliesObjectChanged() {
-        return false;
-    }
-
-    @Override
-    public Object getProperty(final ObjectAdapter owningAdapter) {
-        return AdapterInvokeUtils.invoke(method, owningAdapter);
-    }
-
-    @Override
-    protected String toStringValues() {
-        return "method=" + method;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/aggregated/ParentedFacetSinceCollection.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/aggregated/ParentedFacetSinceCollection.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/aggregated/ParentedFacetSinceCollection.java
deleted file mode 100644
index 4b002fe..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/aggregated/ParentedFacetSinceCollection.java
+++ /dev/null
@@ -1,31 +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.progmodel.facets.collections.aggregated;
-
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.object.aggregated.ParentedFacetAbstract;
-
-public class ParentedFacetSinceCollection extends ParentedFacetAbstract {
-
-    public ParentedFacetSinceCollection(final FacetHolder holder) {
-        super(holder);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/aggregated/ParentedSinceCollectionFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/aggregated/ParentedSinceCollectionFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/aggregated/ParentedSinceCollectionFacetFactory.java
deleted file mode 100644
index 001f50f..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/aggregated/ParentedSinceCollectionFacetFactory.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.core.progmodel.facets.collections.aggregated;
-
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
-import org.apache.isis.core.metamodel.facets.object.aggregated.ParentedFacet;
-import org.apache.isis.core.metamodel.progmodel.ProgrammingModel;
-import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistry;
-import org.apache.isis.core.progmodel.facets.collections.collection.CollectionFacetFactory;
-
-/**
- * All {@link CollectionTypeRegistry collection types} are intrinsically
- * {@link ParentedFacet parented}.
- * 
- * <p> 
- * Must be registered in the {@link ProgrammingModel} after
- * {@link CollectionFacetFactory}.
- */
-public class ParentedSinceCollectionFacetFactory extends FacetFactoryAbstract {
-
-    public ParentedSinceCollectionFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(final ProcessClassContext processClassContaxt) {
-        if (!processClassContaxt.getFacetHolder().containsFacet(CollectionFacet.class)) {
-            return;
-        }
-        FacetUtil.addFacet(new ParentedFacetSinceCollection(processClassContaxt.getFacetHolder()));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetFactory.java
deleted file mode 100644
index 8d87e40..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetFactory.java
+++ /dev/null
@@ -1,98 +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.progmodel.facets.collections.clear;
-
-import java.lang.reflect.Method;
-
-import org.apache.isis.core.commons.lang.StringExtensions;
-import org.apache.isis.core.metamodel.adapter.ObjectDirtier;
-import org.apache.isis.core.metamodel.adapter.ObjectDirtierAware;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManagerAware;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionClearFacet;
-import org.apache.isis.core.metamodel.methodutils.MethodScope;
-import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
-import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
-import org.apache.isis.core.progmodel.facets.MethodPrefixConstants;
-
-public class CollectionClearFacetFactory extends MethodPrefixBasedFacetFactoryAbstract implements AdapterManagerAware, ObjectDirtierAware {
-
-    private static final String[] PREFIXES = { MethodPrefixConstants.CLEAR_PREFIX };
-
-    private AdapterManager adapterManager;
-    private ObjectDirtier objectDirtier;
-
-    public CollectionClearFacetFactory() {
-        super(FeatureType.COLLECTIONS_ONLY, OrphanValidation.VALIDATE, PREFIXES);
-    }
-
-    @Override
-    public void process(final ProcessMethodContext processMethodContext) {
-        attachCollectionClearFacets(processMethodContext);
-
-    }
-
-    private void attachCollectionClearFacets(final ProcessMethodContext processMethodContext) {
-
-        final Method getMethod = processMethodContext.getMethod();
-        final String capitalizedName = StringExtensions.asJavaBaseName(getMethod.getName());
-
-        final Class<?> cls = processMethodContext.getCls();
-        final Method method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.CLEAR_PREFIX + capitalizedName, void.class, null);
-        processMethodContext.removeMethod(method);
-
-        final FacetHolder collection = processMethodContext.getFacetHolder();
-        FacetUtil.addFacet(createCollectionClearFacet(method, getMethod, collection));
-    }
-
-    private CollectionClearFacet createCollectionClearFacet(final Method clearMethodIfAny, final Method accessorMethod, final FacetHolder collection) {
-        if (clearMethodIfAny != null) {
-            return new CollectionClearFacetViaMethod(clearMethodIfAny, collection);
-        } else {
-            return new CollectionClearFacetViaAccessor(accessorMethod, collection, getAdapterManager(), getObjectDirtier());
-        }
-    }
-
-    // ///////////////////////////////////////////////////////
-    // Dependencies (injected)
-    // ///////////////////////////////////////////////////////
-
-    protected AdapterManager getAdapterManager() {
-        return adapterManager;
-    }
-
-    @Override
-    public void setAdapterManager(final AdapterManager adapterManager) {
-        this.adapterManager = adapterManager;
-    }
-
-    protected ObjectDirtier getObjectDirtier() {
-        return objectDirtier;
-    }
-
-    @Override
-    public void setObjectDirtier(final ObjectDirtier objectDirtier) {
-        this.objectDirtier = objectDirtier;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaAccessor.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaAccessor.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaAccessor.java
deleted file mode 100644
index 79633c4..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaAccessor.java
+++ /dev/null
@@ -1,105 +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.progmodel.facets.collections.clear;
-
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.isis.applib.DomainObjectContainer;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.ObjectDirtier;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.adapter.util.AdapterInvokeUtils;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.ImperativeFacet;
-import org.apache.isis.core.metamodel.facets.ImperativeFacet.Intent;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionClearFacetAbstract;
-
-public class CollectionClearFacetViaAccessor extends CollectionClearFacetAbstract implements ImperativeFacet {
-
-    private final Method method;
-    private final AdapterManager adapterManager;
-    private final ObjectDirtier objectDirtier;
-
-    public CollectionClearFacetViaAccessor(final Method method, final FacetHolder holder, final AdapterManager adapterManager, final ObjectDirtier objectDirtier) {
-        super(holder);
-        this.method = method;
-        this.adapterManager = adapterManager;
-        this.objectDirtier = objectDirtier;
-    }
-
-    /**
-     * Returns a singleton list of the {@link Method} provided in the
-     * constructor.
-     */
-    @Override
-    public List<Method> getMethods() {
-        return Collections.singletonList(method);
-    }
-
-    @Override
-    public Intent getIntent(final Method method) {
-        return Intent.ACCESSOR;
-    }
-
-    @Override
-    public boolean impliesResolve() {
-        return true;
-    }
-
-    /**
-     * Bytecode cannot automatically call
-     * {@link DomainObjectContainer#objectChanged(Object)} because cannot
-     * distinguish whether interacting with accessor to read it or to modify its
-     * contents.
-     */
-    @Override
-    public boolean impliesObjectChanged() {
-        return false;
-    }
-
-    @Override
-    public void clear(final ObjectAdapter owningAdapter) {
-        final Collection<?> collection = (Collection<?>) AdapterInvokeUtils.invoke(method, owningAdapter);
-        collection.clear();
-        final ObjectAdapter adapter = getAdapterManager().getAdapterFor(owningAdapter);
-        getObjectDirtier().objectChanged(adapter);
-    }
-
-    @Override
-    protected String toStringValues() {
-        return "method=" + method;
-    }
-
-    // /////////////////////////////////////////////////////////
-    // Dependencies (from constructor)
-    // /////////////////////////////////////////////////////////
-
-    protected AdapterManager getAdapterManager() {
-        return adapterManager;
-    }
-
-    protected ObjectDirtier getObjectDirtier() {
-        return objectDirtier;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaMethod.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaMethod.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaMethod.java
deleted file mode 100644
index c9deb4b..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/clear/CollectionClearFacetViaMethod.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.progmodel.facets.collections.clear;
-
-import java.lang.reflect.Method;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.util.AdapterInvokeUtils;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.ImperativeFacet;
-import org.apache.isis.core.metamodel.facets.ImperativeFacet.Intent;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionClearFacetAbstract;
-
-public class CollectionClearFacetViaMethod extends CollectionClearFacetAbstract implements ImperativeFacet {
-
-    private final Method method;
-
-    public CollectionClearFacetViaMethod(final Method method, final FacetHolder holder) {
-        super(holder);
-        this.method = method;
-    }
-
-    /**
-     * Returns a singleton list of the {@link Method} provided in the
-     * constructor.
-     */
-    @Override
-    public List<Method> getMethods() {
-        return Collections.singletonList(method);
-    }
-
-    @Override
-    public Intent getIntent(final Method method) {
-        return Intent.MODIFY_COLLECTION_ADD;
-    }
-
-    @Override
-    public boolean impliesResolve() {
-        return true;
-    }
-
-    @Override
-    public boolean impliesObjectChanged() {
-        return true;
-    }
-
-    @Override
-    public void clear(final ObjectAdapter owningAdapter) {
-        AdapterInvokeUtils.invoke(method, owningAdapter);
-    }
-
-    @Override
-    protected String toStringValues() {
-        return "method=" + method;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java
deleted file mode 100644
index 9b4b4a5..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/CollectionFacetFactory.java
+++ /dev/null
@@ -1,98 +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.progmodel.facets.collections.collection;
-
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManagerAware;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacet;
-import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetDefaultToObject;
-import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromArray;
-import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacetInferredFromGenerics;
-import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistry;
-import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistryAware;
-
-public class CollectionFacetFactory extends FacetFactoryAbstract implements CollectionTypeRegistryAware, AdapterManagerAware {
-
-    private CollectionTypeRegistry collectionTypeRegistry;
-    private AdapterManager adapterManager;
-
-    public CollectionFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
-    }
-
-    @Override
-    public void process(final ProcessClassContext processClassContaxt) {
-
-        if (collectionTypeRegistry.isCollectionType(processClassContaxt.getCls())) {
-            processCollectionType(processClassContaxt);
-        } else if (collectionTypeRegistry.isArrayType(processClassContaxt.getCls())) {
-            processAsArrayType(processClassContaxt);
-        }
-
-    }
-
-    private void processCollectionType(final ProcessClassContext processClassContext) {
-        final FacetHolder facetHolder = processClassContext.getFacetHolder();
-        final TypeOfFacet typeOfFacet = facetHolder.getFacet(TypeOfFacet.class);
-        if (typeOfFacet == null) {
-            final Class<?> collectionElementType = collectionElementType(processClassContext.getCls());
-            facetHolder.addFacet(collectionElementType != Object.class ? new TypeOfFacetInferredFromGenerics(collectionElementType, facetHolder, getSpecificationLoader()) : new TypeOfFacetDefaultToObject(facetHolder, getSpecificationLoader()));
-        } else {
-            // nothing
-        }
-        facetHolder.addFacet(new JavaCollectionFacet(facetHolder, getAdapterManager()));
-        return;
-    }
-
-    private void processAsArrayType(final ProcessClassContext processClassContaxt) {
-        final FacetHolder facetHolder = processClassContaxt.getFacetHolder();
-        facetHolder.addFacet(new JavaArrayFacet(facetHolder, getAdapterManager()));
-        facetHolder.addFacet(new TypeOfFacetInferredFromArray(processClassContaxt.getCls().getComponentType(), facetHolder, getSpecificationLoader()));
-    }
-
-    private Class<?> collectionElementType(final Class<?> cls) {
-        return Object.class;
-    }
-
-    // //////////////////////////////////////////////////////////////
-    // Dependencies (injected)
-    // //////////////////////////////////////////////////////////////
-
-    /**
-     * Injected since {@link CollectionTypeRegistryAware}.
-     */
-    @Override
-    public void setCollectionTypeRegistry(final CollectionTypeRegistry collectionTypeRegistry) {
-        this.collectionTypeRegistry = collectionTypeRegistry;
-    }
-
-    public AdapterManager getAdapterManager() {
-        return adapterManager;
-    }
-
-    @Override
-    public void setAdapterManager(final AdapterManager adapterManager) {
-        this.adapterManager = adapterManager;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/JavaArrayFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/JavaArrayFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/JavaArrayFacet.java
deleted file mode 100644
index 2cf11a1..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/JavaArrayFacet.java
+++ /dev/null
@@ -1,95 +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.progmodel.facets.collections.collection;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.collections.CollectionFacetAbstract;
-
-public class JavaArrayFacet extends CollectionFacetAbstract {
-
-    private final AdapterManager adapterManager;
-
-    public JavaArrayFacet(final FacetHolder holder, final AdapterManager adapterManager) {
-        super(holder);
-        this.adapterManager = adapterManager;
-    }
-
-    /**
-     * Expected to be called with a {@link ObjectAdapter} wrapping an array.
-     */
-    @Override
-    public void init(final ObjectAdapter collectionAdapter, final ObjectAdapter[] initData) {
-        final int length = initData.length;
-        final Object[] array = new Object[length];
-        for (int i = 0; i < length; i++) {
-            array[i] = initData[i].getObject();
-        }
-        collectionAdapter.replacePojo(array);
-    }
-
-    /**
-     * Expected to be called with a {@link ObjectAdapter} wrapping an array.
-     */
-    @Override
-    public Collection<ObjectAdapter> collection(final ObjectAdapter collectionAdapter) {
-        final Object[] array = array(collectionAdapter);
-        final ArrayList<ObjectAdapter> objectCollection = new ArrayList<ObjectAdapter>(array.length);
-        for (final Object element2 : array) {
-            final ObjectAdapter element = getAdapterManager().getAdapterFor(element2);
-            objectCollection.add(element);
-        }
-        return objectCollection;
-    }
-
-    /**
-     * Expected to be called with a {@link ObjectAdapter} wrapping an array.
-     */
-    @Override
-    public ObjectAdapter firstElement(final ObjectAdapter collectionAdapter) {
-        final Object[] array = array(collectionAdapter);
-        return array.length > 0 ? getAdapterManager().getAdapterFor(array[0]) : null;
-    }
-
-    /**
-     * Expected to be called with a {@link ObjectAdapter} wrapping an array.
-     */
-    @Override
-    public int size(final ObjectAdapter collectionAdapter) {
-        return array(collectionAdapter).length;
-    }
-
-    private Object[] array(final ObjectAdapter collectionAdapter) {
-        return (Object[]) collectionAdapter.getObject();
-    }
-
-    // /////////////////////////////////////////////////////
-    // Dependencies (from constructor)
-    // /////////////////////////////////////////////////////
-
-    private AdapterManager getAdapterManager() {
-        return adapterManager;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/JavaCollectionFacet.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/JavaCollectionFacet.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/JavaCollectionFacet.java
deleted file mode 100644
index fc524b2..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/JavaCollectionFacet.java
+++ /dev/null
@@ -1,85 +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.progmodel.facets.collections.collection;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-import com.google.common.collect.Collections2;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.collections.CollectionFacetAbstract;
-
-public class JavaCollectionFacet extends CollectionFacetAbstract {
-
-    private final AdapterManager adapterManager;
-
-    public JavaCollectionFacet(final FacetHolder holder, final AdapterManager adapterManager) {
-        super(holder);
-        this.adapterManager = adapterManager;
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public Collection<ObjectAdapter> collection(final ObjectAdapter wrappedCollection) {
-        final Collection<?> collectionOfUnderlying = collectionOfUnderlying(wrappedCollection);
-        return Collections2.transform(collectionOfUnderlying, new ObjectToAdapterFunction(getAdapterManager()));
-    }
-
-    @Override
-    public ObjectAdapter firstElement(final ObjectAdapter collection) {
-        final Iterator<ObjectAdapter> iterator = iterator(collection);
-        return iterator.hasNext() ? iterator.next() : null;
-    }
-
-    @Override
-    public int size(final ObjectAdapter collection) {
-        return collectionOfUnderlying(collection).size();
-    }
-
-    @Override
-    public void init(final ObjectAdapter collection, final ObjectAdapter[] initData) {
-        final Collection<? super Object> javaCollection = collectionOfUnderlying(collection);
-        javaCollection.clear();
-        for (final ObjectAdapter element : initData) {
-            final Object pojo = element.getObject();
-            javaCollection.add(pojo);
-        }
-    }
-
-    /**
-     * The underlying collection of objects (not {@link ObjectAdapter}s).
-     */
-    @SuppressWarnings("unchecked")
-    private Collection<? super Object> collectionOfUnderlying(final ObjectAdapter wrappedCollection) {
-        return (Collection<? super Object>) wrappedCollection.getObject();
-    }
-
-    // //////////////////////////////////////////////////////////////////////
-    // Dependencies (from constructor)
-    // //////////////////////////////////////////////////////////////////////
-
-    private AdapterManager getAdapterManager() {
-        return adapterManager;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/ObjectToAdapterFunction.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/ObjectToAdapterFunction.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/ObjectToAdapterFunction.java
deleted file mode 100644
index eb011ca..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/collection/ObjectToAdapterFunction.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.core.progmodel.facets.collections.collection;
-
-import com.google.common.base.Function;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-
-/**
- * Uses the Commons Collection API to transform {@link Object}s into
- * {@link ObjectAdapter} adapters.
- * 
- */
-public final class ObjectToAdapterFunction implements Function<Object,ObjectAdapter> {
-
-    private final AdapterManager adapterManager;
-
-    public ObjectToAdapterFunction(final AdapterManager adapterManager) {
-        this.adapterManager = adapterManager;
-    }
-
-    @Override
-    public ObjectAdapter apply(final Object object) {
-        return object != null? getAdapterManager().adapterFor(object): null;
-    }
-
-    // //////////////////////////////////////////////////////////////////
-    // Dependencies (from constructor)
-    // //////////////////////////////////////////////////////////////////
-
-    public AdapterManager getAdapterManager() {
-        return adapterManager;
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutable.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutable.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutable.java
deleted file mode 100644
index 2bf1924..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutable.java
+++ /dev/null
@@ -1,39 +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.progmodel.facets.collections.disabled.fromimmutable;
-
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.object.immutable.ImmutableFacet;
-import org.apache.isis.core.progmodel.facets.members.disabled.DisabledFacetAbstract;
-
-public class DisabledFacetForCollectionDerivedFromImmutable extends DisabledFacetAbstract {
-
-    public DisabledFacetForCollectionDerivedFromImmutable(final ImmutableFacet immutableFacet, final FacetHolder holder) {
-        super(immutableFacet.when(), Where.ANYWHERE, holder);
-    }
-
-    @Override
-    public String disabledReason(final ObjectAdapter target) {
-        return when().appliesTo(target) ? "Immutable" : null;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java
deleted file mode 100644
index 5bf55c9..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory.java
+++ /dev/null
@@ -1,51 +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.progmodel.facets.collections.disabled.fromimmutable;
-
-import org.apache.isis.core.metamodel.facetapi.FacetUtil;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facets.FacetFactory;
-import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
-import org.apache.isis.core.metamodel.facets.FacetedMethod;
-import org.apache.isis.core.metamodel.facets.object.immutable.ImmutableFacet;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
-/**
- * REVIEW: I'm not sure this {@link FacetFactory} actually makes sense. Just
- * because a type is immutable, doesn't imply that the property can't change the
- * instance that it refers to?
- */
-public class DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory extends FacetFactoryAbstract {
-
-    public DisabledFacetForCollectionDerivedFromImmutableTypeFacetFactory() {
-        super(FeatureType.COLLECTIONS_ONLY);
-    }
-
-    @Override
-    public void process(final ProcessMethodContext processMethodContext) {
-        final ObjectSpecification spec = getSpecificationLoader().loadSpecification(processMethodContext.getMethod().getDeclaringClass());
-        if (spec.containsDoOpFacet(ImmutableFacet.class)) {
-            final ImmutableFacet immutableFacet = spec.getFacet(ImmutableFacet.class);
-            final FacetedMethod facetHolder = processMethodContext.getFacetHolder();
-            FacetUtil.addFacet(new DisabledFacetForCollectionDerivedFromImmutable(immutableFacet, facetHolder));
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/event/InteractionWithCollectionFacetAddDefault.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/event/InteractionWithCollectionFacetAddDefault.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/event/InteractionWithCollectionFacetAddDefault.java
deleted file mode 100644
index 6eb8fc4..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/event/InteractionWithCollectionFacetAddDefault.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.progmodel.facets.collections.event;
-
-import org.apache.isis.applib.services.eventbus.CollectionInteractionEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.facets.collections.event.InteractionWithCollectionFacetAddAbstract;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionAddToFacet;
-import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
-
-public class InteractionWithCollectionFacetAddDefault
-        extends InteractionWithCollectionFacetAddAbstract {
-
-	public InteractionWithCollectionFacetAddDefault(
-            final Class<? extends CollectionInteractionEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final CollectionAddToFacet collectionAddToFacet,
-            final ServicesInjector servicesInjector,
-            final FacetHolder holder) {
-		super(eventType, getterFacet, collectionAddToFacet, servicesInjector, holder);
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/event/InteractionWithCollectionFacetAddForAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/event/InteractionWithCollectionFacetAddForAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/event/InteractionWithCollectionFacetAddForAnnotation.java
deleted file mode 100644
index 806030a..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/event/InteractionWithCollectionFacetAddForAnnotation.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.core.progmodel.facets.collections.event;
-
-import org.apache.isis.applib.services.eventbus.CollectionInteractionEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.facets.collections.event.InteractionWithCollectionFacetAddAbstract;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionAddToFacet;
-import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
-
-public class InteractionWithCollectionFacetAddForAnnotation
-        extends InteractionWithCollectionFacetAddAbstract {
-
-	public InteractionWithCollectionFacetAddForAnnotation(
-            final Class<? extends CollectionInteractionEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final CollectionAddToFacet collectionAddToFacet,
-            final ServicesInjector servicesInjector,
-            final FacetHolder holder) {
-		super(eventType, getterFacet, collectionAddToFacet, servicesInjector, holder);
-	}
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/7227418b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/event/InteractionWithCollectionFacetAddPostsCollectionAddedToEventAnnotation.java
----------------------------------------------------------------------
diff --git a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/event/InteractionWithCollectionFacetAddPostsCollectionAddedToEventAnnotation.java b/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/event/InteractionWithCollectionFacetAddPostsCollectionAddedToEventAnnotation.java
deleted file mode 100644
index 8132928..0000000
--- a/core/metamodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/event/InteractionWithCollectionFacetAddPostsCollectionAddedToEventAnnotation.java
+++ /dev/null
@@ -1,41 +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.progmodel.facets.collections.event;
-
-import org.apache.isis.applib.services.eventbus.CollectionAddedToEvent;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.facets.accessor.PropertyOrCollectionAccessorFacet;
-import org.apache.isis.core.metamodel.facets.collections.event.InteractionWithCollectionFacetAddAbstract;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionAddToFacet;
-import org.apache.isis.core.metamodel.runtimecontext.ServicesInjector;
-
-public class InteractionWithCollectionFacetAddPostsCollectionAddedToEventAnnotation
-        extends InteractionWithCollectionFacetAddAbstract {
-
-	public InteractionWithCollectionFacetAddPostsCollectionAddedToEventAnnotation(
-            final Class<? extends CollectionAddedToEvent<?, ?>> eventType,
-            final PropertyOrCollectionAccessorFacet getterFacet,
-            final CollectionAddToFacet collectionAddToFacet,
-            final ServicesInjector servicesInjector,
-            final FacetHolder holder) {
-		super(eventType, getterFacet, collectionAddToFacet, servicesInjector, holder);
-	}
-
-}