incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1059813 [5/10] - in /incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets: ./ actcoll/typeof/ actions/ actions/choices/ actions/debug/ actions/debug/annotation/ actions/defaults/ actions/describedas/ acti...
Date Mon, 17 Jan 2011 08:48:56 GMT
Added: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetAlways.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetAlways.java?rev=1059813&view=auto
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetAlways.java (added)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetAlways.java Mon Jan 17 08:48:40 2011
@@ -0,0 +1,43 @@
+/*
+ *  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.members.hide.staticmethod;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.When;
+import org.apache.isis.core.progmodel.facets.members.hide.HiddenFacetAbstract;
+
+
+public class HiddenFacetAlways extends HiddenFacetAbstract {
+
+    public HiddenFacetAlways(final FacetHolder holder) {
+        super(When.ALWAYS, holder);
+    }
+
+    /**
+     * Always returns <i>Always hidden</i>.
+     */
+    public String hiddenReason(final ObjectAdapter target) {
+        return "Always hidden";
+    }
+
+}
+

Added: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetViaAlwaysHideMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetViaAlwaysHideMethodFacetFactory.java?rev=1059813&view=auto
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetViaAlwaysHideMethodFacetFactory.java (added)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetViaAlwaysHideMethodFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -0,0 +1,96 @@
+/*
+ *  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.members.hide.staticmethod;
+
+import java.lang.reflect.Method;
+
+import org.apache.isis.core.commons.lang.NameUtils;
+import org.apache.isis.core.metamodel.adapter.util.InvokeUtils;
+import org.apache.isis.core.metamodel.exceptions.MetaModelException;
+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;
+
+public class HiddenFacetViaAlwaysHideMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
+
+    private static final String[] PREFIXES = { MethodPrefixConstants.HIDE_PREFIX };
+
+    /**
+     * Note that the {@link Facet}s registered are the generic ones from noa-architecture (where they exist)
+     */
+    public HiddenFacetViaAlwaysHideMethodFacetFactory() {
+        super(FeatureType.PROPERTIES_COLLECTIONS_AND_ACTIONS, PREFIXES);
+    }
+
+    // ///////////////////////////////////////////////////////
+    // Actions
+    // ///////////////////////////////////////////////////////
+
+    @Override
+    public void process(ProcessMethodContext processMethodContext) {
+        // alwaysHideXxx()
+        attachHiddenFacetIfAlwaysHideMethodIsFound(processMethodContext);
+
+    }
+
+    public static void attachHiddenFacetIfAlwaysHideMethodIsFound(final ProcessMethodContext processMethodContext) {
+
+        Class<?> type = processMethodContext.getCls();
+        final Method method = processMethodContext.getMethod();
+
+        final String capitalizedName = NameUtils.javaBaseNameStripAccessorPrefixIfRequired(method.getName());
+
+        final Method alwaysHideMethod =
+            MethodFinderUtils.findMethod(type, MethodScope.CLASS,
+                MethodPrefixConstants.ALWAYS_HIDE_PREFIX + capitalizedName, boolean.class, new Class[] {});
+        if (alwaysHideMethod == null) {
+            return;
+        }
+
+        processMethodContext.removeMethod(alwaysHideMethod);
+        Boolean alwaysHideMethodReturnValue = invokeAlwaysHideMethod(alwaysHideMethod);
+        if (!alwaysHideMethodReturnValue.booleanValue()) {
+            return;
+        }
+
+        final FacetHolder facetedMethod = processMethodContext.getFacetHolder();
+        FacetUtil.addFacet(new HiddenFacetAlways(facetedMethod));
+    }
+
+    private static Boolean invokeAlwaysHideMethod(final Method alwaysHideMethod) {
+        Boolean alwaysHideMethodReturnValue = null;
+        try {
+            alwaysHideMethodReturnValue = (Boolean) InvokeUtils.invokeStatic(alwaysHideMethod);
+        } catch (ClassCastException ex) {
+            // ignore
+        }
+        if(alwaysHideMethodReturnValue == null) {
+            throw new MetaModelException("method " + alwaysHideMethod + "must return a boolean");
+        }
+        return alwaysHideMethodReturnValue;
+    }
+
+
+}

Added: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/name/staticmethod/NamedFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/name/staticmethod/NamedFacetViaMethod.java?rev=1059813&view=auto
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/name/staticmethod/NamedFacetViaMethod.java (added)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/name/staticmethod/NamedFacetViaMethod.java Mon Jan 17 08:48:40 2011
@@ -0,0 +1,60 @@
+/*
+ *  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.members.name.staticmethod;
+
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facets.ImperativeFacet;
+import org.apache.isis.core.metamodel.facets.naming.named.NamedFacetAbstract;
+
+
+public class NamedFacetViaMethod extends NamedFacetAbstract implements ImperativeFacet {
+
+    private final Method method;
+
+    public NamedFacetViaMethod(
+    		final String value, 
+    		final Method method, 
+    		final FacetHolder holder) {
+        super(value, holder);
+        this.method = method;
+    }
+
+    /**
+     * Returns a singleton list of the {@link Method} provided in the constructor. 
+     */
+    public List<Method> getMethods() {
+    	return Collections.singletonList(method);
+    }
+
+	public boolean impliesResolve() {
+		return true;
+	}
+
+	public boolean impliesObjectChanged() {
+		return false;
+	}
+
+}
+

Added: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/name/staticmethod/NamedFacetViaNameMethodFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/name/staticmethod/NamedFacetViaNameMethodFacetFactory.java?rev=1059813&view=auto
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/name/staticmethod/NamedFacetViaNameMethodFacetFactory.java (added)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/name/staticmethod/NamedFacetViaNameMethodFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -0,0 +1,97 @@
+/*
+ *  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.members.name.staticmethod;
+
+import java.lang.reflect.Method;
+
+import org.apache.isis.core.commons.lang.NameUtils;
+import org.apache.isis.core.metamodel.adapter.util.InvokeUtils;
+import org.apache.isis.core.metamodel.exceptions.MetaModelException;
+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.facets.naming.named.NamedFacet;
+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;
+
+/**
+ * Sets up a {@link NamedFacet} if a {@value MethodPrefixConstants#NAME_PREFIX}-prefixed method is present.
+ */
+public class NamedFacetViaNameMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
+
+
+    private static final String[] PREFIXES = { MethodPrefixConstants.NAME_PREFIX };
+
+    /**
+     * Note that the {@link Facet}s registered are the generic ones from noa-architecture (where they exist)
+     */
+    public NamedFacetViaNameMethodFacetFactory() {
+        super(FeatureType.PROPERTIES_COLLECTIONS_AND_ACTIONS, PREFIXES);
+    }
+
+    // ///////////////////////////////////////////////////////
+    // Actions
+    // ///////////////////////////////////////////////////////
+
+    @Override
+    public void process(ProcessMethodContext processMethodContext) {
+
+        // namedXxx()
+        attachNamedFacetIfNamedMethodIsFound(processMethodContext);
+
+    }
+
+    public static void attachNamedFacetIfNamedMethodIsFound(final ProcessMethodContext processMethodContext) {
+        final Method method = processMethodContext.getMethod();
+        final String capitalizedName = NameUtils.javaBaseNameStripAccessorPrefixIfRequired(method.getName());
+
+        Class<?> cls = processMethodContext.getCls();
+        final Method nameMethod =
+            MethodFinderUtils.findMethod(cls, MethodScope.CLASS,
+                MethodPrefixConstants.NAME_PREFIX + capitalizedName, String.class, new Class[0]);
+
+        if (nameMethod == null) {
+            return;
+        }
+
+        processMethodContext.removeMethod(nameMethod);
+        String name = invokeNameMethod(nameMethod);
+        
+        final FacetHolder facetHolder = processMethodContext.getFacetHolder();
+        FacetUtil.addFacet(new NamedFacetViaMethod(name, nameMethod, facetHolder));
+    }
+
+    private static String invokeNameMethod(final Method nameMethod) {
+        String name = null;
+        try {
+            name = (String) InvokeUtils.invokeStatic(nameMethod);
+        } catch (ClassCastException e) {
+            // ignore
+        }
+        if (name == null) {
+            throw new MetaModelException("method " + nameMethod + "must return a string");
+        }
+        return name;
+    }
+
+}

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/NamedFacetImpl.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/naming/named/NamedFacetImpl.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/NamedFacetImpl.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/NamedFacetImpl.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/naming/named/NamedFacetImpl.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/naming/named/NamedFacetImpl.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/NamedFacetImpl.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.naming.named;
+package org.apache.isis.core.progmodel.facets.named;
 
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.naming.named.NamedFacetAbstract;

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/NamedFacetNone.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/naming/named/NamedFacetNone.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/NamedFacetNone.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/NamedFacetNone.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/naming/named/NamedFacetNone.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/naming/named/NamedFacetNone.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/NamedFacetNone.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.naming.named;
+package org.apache.isis.core.progmodel.facets.named;
 
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.naming.named.NamedFacetAbstract;

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/annotation/NamedAnnotationFacetFactory.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/naming/named/NamedAnnotationFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/annotation/NamedAnnotationFacetFactory.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/annotation/NamedAnnotationFacetFactory.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/naming/named/NamedAnnotationFacetFactory.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/naming/named/NamedAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/annotation/NamedAnnotationFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -18,16 +18,14 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.naming.named;
+package org.apache.isis.core.progmodel.facets.named.annotation;
 
 import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
 
 import org.apache.isis.applib.annotation.Named;
 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.facets.AnnotationBasedFacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.naming.named.NamedFacet;
 
@@ -39,27 +37,27 @@ public class NamedAnnotationFacetFactory
     }
 
     @Override
-    public boolean process(final Class<?> cls, final MethodRemover methodRemover, final FacetHolder holder) {
-        final Named annotation = getAnnotation(cls, Named.class);
-        return FacetUtil.addFacet(create(annotation, holder));
+    public void process(ProcessClassContext processClassContaxt) {
+        final Named annotation = getAnnotation(processClassContaxt.getCls(), Named.class);
+        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
     }
 
     @Override
-    public boolean process(Class<?> cls, final Method method, final MethodRemover methodRemover, final FacetHolder holder) {
-        final Named annotation = getAnnotation(method, Named.class);
-        return FacetUtil.addFacet(create(annotation, holder));
+    public void process(ProcessMethodContext processMethodContext) {
+        final Named annotation = getAnnotation(processMethodContext.getMethod(), Named.class);
+        FacetUtil.addFacet(create(annotation, processMethodContext.getFacetHolder()));
     }
 
     @Override
-    public boolean processParams(final Method method, final int paramNum, final FacetHolder holder) {
-        final Annotation[] parameterAnnotations = getParameterAnnotations(method)[paramNum];
+    public void processParams(ProcessParameterContext processParameterContext) {
+        final Annotation[] parameterAnnotations = getParameterAnnotations(processParameterContext.getMethod())[processParameterContext.getParamNum()];
         for (int j = 0; j < parameterAnnotations.length; j++) {
             if (parameterAnnotations[j] instanceof Named) {
                 final Named annotation = (Named) parameterAnnotations[j];
-                return FacetUtil.addFacet(create(annotation, holder));
+                FacetUtil.addFacet(create(annotation, processParameterContext.getFacetHolder()));
+                return;
             }
         }
-        return false;
     }
 
     private NamedFacet create(final Named annotation, final FacetHolder holder) {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/annotation/NamedFacetAnnotation.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/naming/named/NamedFacetAnnotation.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/annotation/NamedFacetAnnotation.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/annotation/NamedFacetAnnotation.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/naming/named/NamedFacetAnnotation.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/naming/named/NamedFacetAnnotation.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/named/annotation/NamedFacetAnnotation.java Mon Jan 17 08:48:40 2011
@@ -18,9 +18,10 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.naming.named;
+package org.apache.isis.core.progmodel.facets.named.annotation;
 
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.progmodel.facets.named.NamedFacetImpl;
 
 
 public class NamedFacetAnnotation extends NamedFacetImpl {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/IteratorFilteringFacetFactory.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/IteratorFilteringFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/IteratorFilteringFacetFactory.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/IteratorFilteringFacetFactory.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/IteratorFilteringFacetFactory.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/IteratorFilteringFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/IteratorFilteringFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -18,17 +18,15 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.actions;
+package org.apache.isis.core.progmodel.facets.object;
 
 import java.lang.reflect.Method;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facetapi.MethodRemover;
-import org.apache.isis.core.metamodel.facetapi.MethodScope;
+import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.MethodFilteringFacetFactory;
-import org.apache.isis.core.metamodel.spec.FacetFactoryAbstract;
+import org.apache.isis.core.metamodel.methodutils.MethodScope;
 
 
 /**
@@ -44,11 +42,11 @@ public class IteratorFilteringFacetFacto
     }
 
     @Override
-    public boolean process(final Class<?> type, final MethodRemover methodRemover, final FacetHolder holder) {
-        methodRemover.removeMethod(MethodScope.OBJECT, "iterator", java.util.Iterator.class, new Class[] {});
-        return false;
+    public void process(ProcessClassContext processClassContaxt) {
+        processClassContaxt.removeMethod(MethodScope.OBJECT, "iterator", java.util.Iterator.class, new Class[] {});
     }
 
+    @Override
     public boolean recognizes(final Method method) {
         if (method.toString().equals("public abstract java.util.Iterator java.lang.Iterable.iterator()")) {
             return true;

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/SyntheticMethodFilteringFacetFactory.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/SyntheticMethodFilteringFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/SyntheticMethodFilteringFacetFactory.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/SyntheticMethodFilteringFacetFactory.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/SyntheticMethodFilteringFacetFactory.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/SyntheticMethodFilteringFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/SyntheticMethodFilteringFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.actions;
+package org.apache.isis.core.progmodel.facets.object;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -26,8 +26,8 @@ import java.util.ArrayList;
 import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
+import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.MethodFilteringFacetFactory;
-import org.apache.isis.core.metamodel.spec.FacetFactoryAbstract;
 
 
 /**

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/annotation/AggregatedAnnotationFacetFactory.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/AggregatedAnnotationFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/annotation/AggregatedAnnotationFacetFactory.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/annotation/AggregatedAnnotationFacetFactory.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/AggregatedAnnotationFacetFactory.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/AggregatedAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/annotation/AggregatedAnnotationFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -18,13 +18,12 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.aggregated;
+package org.apache.isis.core.progmodel.facets.object.aggregated.annotation;
 
 import org.apache.isis.applib.annotation.Aggregated;
 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.facets.AnnotationBasedFacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.object.aggregated.AggregatedFacet;
 
@@ -36,9 +35,9 @@ public class AggregatedAnnotationFacetFa
     }
 
     @Override
-    public boolean process(final Class<?> cls, final MethodRemover methodRemover, final FacetHolder holder) {
-        final Aggregated annotation = (Aggregated) getAnnotation(cls, Aggregated.class);
-        return FacetUtil.addFacet(create(annotation, holder));
+    public void process(ProcessClassContext processClassContaxt) {
+        final Aggregated annotation = getAnnotation(processClassContaxt.getCls(), Aggregated.class);
+        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
     }
 
     private AggregatedFacet create(final Aggregated annotation, final FacetHolder holder) {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/annotation/AggregatedFacetAnnotation.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/AggregatedFacetAnnotation.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/annotation/AggregatedFacetAnnotation.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/annotation/AggregatedFacetAnnotation.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/AggregatedFacetAnnotation.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/AggregatedFacetAnnotation.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/aggregated/annotation/AggregatedFacetAnnotation.java Mon Jan 17 08:48:40 2011
@@ -18,9 +18,10 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.aggregated;
+package org.apache.isis.core.progmodel.facets.object.aggregated.annotation;
 
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.progmodel.facets.object.aggregated.AggregatedFacetImpl;
 
 
 public class AggregatedFacetAnnotation extends AggregatedFacetImpl {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/annotation/BoundedAnnotationFacetFactory.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/BoundedAnnotationFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/annotation/BoundedAnnotationFacetFactory.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/annotation/BoundedAnnotationFacetFactory.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/BoundedAnnotationFacetFactory.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/BoundedAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/annotation/BoundedAnnotationFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -18,13 +18,12 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.bounded;
+package org.apache.isis.core.progmodel.facets.object.bounded.annotation;
 
 import org.apache.isis.applib.annotation.Bounded;
 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.facets.AnnotationBasedFacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.object.bounded.BoundedFacet;
 
@@ -36,9 +35,9 @@ public class BoundedAnnotationFacetFacto
     }
 
     @Override
-    public boolean process(final Class<?> cls, final MethodRemover methodRemover, final FacetHolder holder) {
-        final Bounded annotation = (Bounded) getAnnotation(cls, Bounded.class);
-        return FacetUtil.addFacet(create(annotation, holder));
+    public void process(ProcessClassContext processClassContaxt) {
+        final Bounded annotation = getAnnotation(processClassContaxt.getCls(), Bounded.class);
+        FacetUtil.addFacet(create(annotation, processClassContaxt.getFacetHolder()));
     }
 
     private BoundedFacet create(final Bounded annotation, final FacetHolder holder) {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/annotation/BoundedFacetAnnotation.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/BoundedFacetAnnotation.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/annotation/BoundedFacetAnnotation.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/annotation/BoundedFacetAnnotation.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/BoundedFacetAnnotation.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/BoundedFacetAnnotation.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/annotation/BoundedFacetAnnotation.java Mon Jan 17 08:48:40 2011
@@ -18,9 +18,10 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.bounded;
+package org.apache.isis.core.progmodel.facets.object.bounded.annotation;
 
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.progmodel.facets.object.bounded.BoundedFacetImpl;
 
 
 public class BoundedFacetAnnotation extends BoundedFacetImpl {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/markerifc/BoundedFacetMarkerInterface.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/BoundedFacetMarkerInterface.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/markerifc/BoundedFacetMarkerInterface.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/markerifc/BoundedFacetMarkerInterface.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/BoundedFacetMarkerInterface.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/BoundedFacetMarkerInterface.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/markerifc/BoundedFacetMarkerInterface.java Mon Jan 17 08:48:40 2011
@@ -18,9 +18,10 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.bounded;
+package org.apache.isis.core.progmodel.facets.object.bounded.markerifc;
 
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.progmodel.facets.object.bounded.BoundedFacetImpl;
 
 
 public class BoundedFacetMarkerInterface extends BoundedFacetImpl {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/markerifc/BoundedMarkerInterfaceFacetFactory.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/BoundedMarkerInterfaceFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/markerifc/BoundedMarkerInterfaceFacetFactory.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/markerifc/BoundedMarkerInterfaceFacetFactory.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/BoundedMarkerInterfaceFacetFactory.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/BoundedMarkerInterfaceFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/bounded/markerifc/BoundedMarkerInterfaceFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.bounded;
+package org.apache.isis.core.progmodel.facets.object.bounded.markerifc;
 
 import java.lang.reflect.Method;
 
@@ -26,9 +26,8 @@ import org.apache.isis.applib.marker.Bou
 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.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.object.bounded.BoundedFacet;
-import org.apache.isis.core.metamodel.spec.FacetFactoryAbstract;
 
 
 public class BoundedMarkerInterfaceFacetFactory extends FacetFactoryAbstract {
@@ -38,9 +37,9 @@ public class BoundedMarkerInterfaceFacet
     }
 
     @Override
-    public boolean process(final Class<?> clazz, final MethodRemover methodRemover, final FacetHolder holder) {
-        final boolean implementsMarker = Bounded.class.isAssignableFrom(clazz);
-        return FacetUtil.addFacet(create(implementsMarker, holder));
+    public void process(ProcessClassContext processClassContaxt) {
+        final boolean implementsMarker = Bounded.class.isAssignableFrom(processClassContaxt.getCls());
+        FacetUtil.addFacet(create(implementsMarker, processClassContaxt.getFacetHolder()));
     }
 
     private BoundedFacet create(final boolean implementsMarker, final FacetHolder holder) {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/create/CreatedCallbackFacetAbstract.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/CreatedCallbackFacetAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/create/CreatedCallbackFacetAbstract.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/create/CreatedCallbackFacetAbstract.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/CreatedCallbackFacetAbstract.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/CreatedCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/create/CreatedCallbackFacetAbstract.java Mon Jan 17 08:48:40 2011
@@ -18,11 +18,12 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.create;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.callbacks.CreatedCallbackFacet;
+import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
 
 public abstract class CreatedCallbackFacetAbstract extends CallbackFacetAbstract implements CreatedCallbackFacet {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/create/CreatedCallbackFacetFactory.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/CreatedCallbackFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/create/CreatedCallbackFacetFactory.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/create/CreatedCallbackFacetFactory.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/CreatedCallbackFacetFactory.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/CreatedCallbackFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/create/CreatedCallbackFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.create;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -28,7 +28,8 @@ import org.apache.isis.core.metamodel.fa
 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.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
 
 
@@ -39,23 +40,26 @@ public class CreatedCallbackFacetFactory
     private static final String[] PREFIXES = { CREATED_PREFIX, };
 
     public CreatedCallbackFacetFactory() {
-        super(PREFIXES, FeatureType.OBJECTS_ONLY);
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
     }
 
     @Override
-    public boolean process(final Class<?> cls, final MethodRemover remover, final FacetHolder facetHolder) {
+    public void process(ProcessClassContext processClassContext) {
+        final Class<?> cls = processClassContext.getCls();
+        final FacetHolder holder = processClassContext.getFacetHolder();
+
         final List<Facet> facets = new ArrayList<Facet>();
         final List<Method> methods = new ArrayList<Method>();
 
         Method method = null;
-        method = findMethod(cls, OBJECT, CREATED_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, CREATED_PREFIX, void.class, NO_PARAMETERS_TYPES);
         if (method != null) {
             methods.add(method);
-            facets.add(new CreatedCallbackFacetViaMethod(method, facetHolder));
+            facets.add(new CreatedCallbackFacetViaMethod(method, holder));
         }
 
-        remover.removeMethods(methods);
-        return FacetUtil.addFacets(facets);
+        processClassContext.removeMethods(methods);
+        FacetUtil.addFacets(facets);
     }
 
 }

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/create/CreatedCallbackFacetViaMethod.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/CreatedCallbackFacetViaMethod.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/create/CreatedCallbackFacetViaMethod.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/create/CreatedCallbackFacetViaMethod.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/CreatedCallbackFacetViaMethod.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/CreatedCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/create/CreatedCallbackFacetViaMethod.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.create;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadCallbackFacetFactory.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadCallbackFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadCallbackFacetFactory.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadCallbackFacetFactory.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadCallbackFacetFactory.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadCallbackFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadCallbackFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.load;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -28,7 +28,8 @@ import org.apache.isis.core.metamodel.fa
 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.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
 
 
@@ -40,29 +41,32 @@ public class LoadCallbackFacetFactory ex
     private static final String[] PREFIXES = { LOADED_PREFIX, LOADING_PREFIX, };
 
     public LoadCallbackFacetFactory() {
-        super(PREFIXES, FeatureType.OBJECTS_ONLY);
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
     }
 
     @Override
-    public boolean process(final Class<?> cls, final MethodRemover remover, final FacetHolder facetHolder) {
+    public void process(ProcessClassContext processClassContext) {
+        final Class<?> cls = processClassContext.getCls();
+        final FacetHolder facetHolder = processClassContext.getFacetHolder();
+
         final List<Facet> facets = new ArrayList<Facet>();
         final List<Method> methods = new ArrayList<Method>();
 
         Method method = null;
-        method = findMethod(cls, OBJECT, LOADING_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, LOADING_PREFIX, void.class, NO_PARAMETERS_TYPES);
         if (method != null) {
             methods.add(method);
             facets.add(new LoadingCallbackFacetViaMethod(method, facetHolder));
         }
 
-        method = findMethod(cls, OBJECT, LOADED_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, LOADED_PREFIX, void.class, NO_PARAMETERS_TYPES);
         if (method != null) {
             methods.add(method);
             facets.add(new LoadedCallbackFacetViaMethod(method, facetHolder));
         }
 
-        remover.removeMethods(methods);
-        return FacetUtil.addFacets(facets);
+        processClassContext.removeMethods(methods);
+        FacetUtil.addFacets(facets);
     }
 
 }

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadedCallbackFacetAbstract.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadedCallbackFacetAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadedCallbackFacetAbstract.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadedCallbackFacetAbstract.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadedCallbackFacetAbstract.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadedCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadedCallbackFacetAbstract.java Mon Jan 17 08:48:40 2011
@@ -18,11 +18,12 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.load;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.callbacks.LoadedCallbackFacet;
+import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
 
 public abstract class LoadedCallbackFacetAbstract extends CallbackFacetAbstract implements LoadedCallbackFacet {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadedCallbackFacetViaMethod.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadedCallbackFacetViaMethod.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadedCallbackFacetViaMethod.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadedCallbackFacetViaMethod.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadedCallbackFacetViaMethod.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadedCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadedCallbackFacetViaMethod.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.load;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadingCallbackFacetAbstract.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadingCallbackFacetAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadingCallbackFacetAbstract.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadingCallbackFacetAbstract.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadingCallbackFacetAbstract.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadingCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadingCallbackFacetAbstract.java Mon Jan 17 08:48:40 2011
@@ -18,11 +18,12 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.load;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.callbacks.LoadingCallbackFacet;
+import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
 
 public abstract class LoadingCallbackFacetAbstract extends CallbackFacetAbstract implements LoadingCallbackFacet {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadingCallbackFacetViaMethod.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadingCallbackFacetViaMethod.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadingCallbackFacetViaMethod.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadingCallbackFacetViaMethod.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadingCallbackFacetViaMethod.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/LoadingCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/load/LoadingCallbackFacetViaMethod.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.load;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackFacetFactory.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistCallbackFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackFacetFactory.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackFacetFactory.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistCallbackFacetFactory.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistCallbackFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -28,9 +28,10 @@ import org.apache.isis.core.metamodel.fa
 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.facets.object.callbacks.PersistedCallbackFacet;
 import org.apache.isis.core.metamodel.facets.object.callbacks.PersistingCallbackFacet;
+import org.apache.isis.core.metamodel.methodutils.MethodScope;
+import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
 
 
@@ -42,16 +43,19 @@ public class PersistCallbackFacetFactory
     private static final String[] PREFIXES = { PERSISTED_PREFIX, PERSISTING_PREFIX, };
 
     public PersistCallbackFacetFactory() {
-        super(PREFIXES, FeatureType.OBJECTS_ONLY);
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
     }
 
     @Override
-    public boolean process(final Class<?> cls, final MethodRemover remover, final FacetHolder facetHolder) {
+    public void process(ProcessClassContext processClassContext) {
+        final Class<?> cls = processClassContext.getCls();
+        final FacetHolder facetHolder = processClassContext.getFacetHolder();
+
         final List<Facet> facets = new ArrayList<Facet>();
         final List<Method> methods = new ArrayList<Method>();
 
         Method method = null;
-        method = findMethod(cls, OBJECT, PERSISTING_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, PERSISTING_PREFIX, void.class, NO_PARAMETERS_TYPES);
         if (method != null) {
             methods.add(method);
             PersistingCallbackFacet facet = facetHolder.getFacet(PersistingCallbackFacet.class);
@@ -62,7 +66,7 @@ public class PersistCallbackFacetFactory
             }
         }
 
-        method = findMethod(cls, OBJECT, PERSISTED_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, PERSISTED_PREFIX, void.class, NO_PARAMETERS_TYPES);
         if (method != null) {
             methods.add(method);
             PersistedCallbackFacet facet = facetHolder.getFacet(PersistedCallbackFacet.class);
@@ -73,8 +77,8 @@ public class PersistCallbackFacetFactory
             }
         }
 
-        remover.removeMethods(methods);
-        return FacetUtil.addFacets(facets);
+        processClassContext.removeMethods(methods);
+        FacetUtil.addFacets(facets);
     }
 
 }

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackViaSaveMethodFacetFactory.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/SaveCallbackFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackViaSaveMethodFacetFactory.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackViaSaveMethodFacetFactory.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/SaveCallbackFacetFactory.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/SaveCallbackFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistCallbackViaSaveMethodFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -28,30 +28,34 @@ import org.apache.isis.core.metamodel.fa
 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.facets.object.callbacks.PersistedCallbackFacet;
 import org.apache.isis.core.metamodel.facets.object.callbacks.PersistingCallbackFacet;
+import org.apache.isis.core.metamodel.methodutils.MethodScope;
+import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
 
 
-public class SaveCallbackFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
+public class PersistCallbackViaSaveMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
 
     private static final String SAVED_PREFIX = "saved";
     private static final String SAVING_PREFIX = "saving";
 
     private static final String[] PREFIXES = { SAVED_PREFIX, SAVING_PREFIX, };
 
-    public SaveCallbackFacetFactory() {
-        super(PREFIXES, FeatureType.OBJECTS_ONLY);
+    public PersistCallbackViaSaveMethodFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
     }
 
     @Override
-    public boolean process(final Class<?> cls, final MethodRemover remover, final FacetHolder facetHolder) {
+    public void process(ProcessClassContext processClassContext) {
+        final Class<?> cls = processClassContext.getCls();
+        final FacetHolder facetHolder = processClassContext.getFacetHolder();
+
         final List<Facet> facets = new ArrayList<Facet>();
         final List<Method> methods = new ArrayList<Method>();
 
         Method method = null;
-        method = findMethod(cls, OBJECT, SAVING_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, SAVING_PREFIX, void.class, NO_PARAMETERS_TYPES);
         if (method != null) {
             methods.add(method);
             PersistingCallbackFacet facet = facetHolder.getFacet(PersistingCallbackFacet.class);
@@ -62,7 +66,7 @@ public class SaveCallbackFacetFactory ex
             }
         }
 
-        method = findMethod(cls, OBJECT, SAVED_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, SAVED_PREFIX, void.class, NO_PARAMETERS_TYPES);
         if (method != null) {
             methods.add(method);
             PersistedCallbackFacet facet = facetHolder.getFacet(PersistedCallbackFacet.class);
@@ -73,8 +77,8 @@ public class SaveCallbackFacetFactory ex
             }
         }
 
-        remover.removeMethods(methods);
-        return FacetUtil.addFacets(facets);
+        processClassContext.removeMethods(methods);
+        FacetUtil.addFacets(facets);
     }
 
 }

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetAbstract.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistedCallbackFacetAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetAbstract.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetAbstract.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistedCallbackFacetAbstract.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistedCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetAbstract.java Mon Jan 17 08:48:40 2011
@@ -18,11 +18,12 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.callbacks.PersistedCallbackFacet;
+import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
 
 public abstract class PersistedCallbackFacetAbstract extends CallbackFacetAbstract implements PersistedCallbackFacet {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetViaMethod.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistedCallbackFacetViaMethod.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetViaMethod.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetViaMethod.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistedCallbackFacetViaMethod.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistedCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistedCallbackFacetViaMethod.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetAbstract.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistingCallbackFacetAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetAbstract.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetAbstract.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistingCallbackFacetAbstract.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistingCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetAbstract.java Mon Jan 17 08:48:40 2011
@@ -18,11 +18,12 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.callbacks.PersistingCallbackFacet;
+import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
 
 public abstract class PersistingCallbackFacetAbstract extends CallbackFacetAbstract implements PersistingCallbackFacet {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetViaMethod.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistingCallbackFacetViaMethod.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetViaMethod.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetViaMethod.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistingCallbackFacetViaMethod.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/PersistingCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/persist/PersistingCallbackFacetViaMethod.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.persist;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackFacetFactory.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemoveCallbackFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackFacetFactory.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackFacetFactory.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemoveCallbackFacetFactory.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemoveCallbackFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -28,9 +28,10 @@ import org.apache.isis.core.metamodel.fa
 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.facets.object.callbacks.RemovedCallbackFacet;
 import org.apache.isis.core.metamodel.facets.object.callbacks.RemovingCallbackFacet;
+import org.apache.isis.core.metamodel.methodutils.MethodScope;
+import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
 
 
@@ -42,16 +43,19 @@ public class RemoveCallbackFacetFactory 
     private static final String[] PREFIXES = { REMOVED_PREFIX, REMOVING_PREFIX, };
 
     public RemoveCallbackFacetFactory() {
-        super(PREFIXES, FeatureType.OBJECTS_ONLY);
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
     }
 
     @Override
-    public boolean process(final Class<?> cls, final MethodRemover remover, final FacetHolder facetHolder) {
+    public void process(ProcessClassContext processClassContext) {
+        final Class<?> cls = processClassContext.getCls();
+        final FacetHolder facetHolder = processClassContext.getFacetHolder();
+
         final List<Facet> facets = new ArrayList<Facet>();
         final List<Method> methods = new ArrayList<Method>();
 
         Method method = null;
-        method = findMethod(cls, OBJECT, REMOVING_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, REMOVING_PREFIX, void.class, NO_PARAMETERS_TYPES);
         if (method != null) {
             methods.add(method);
             RemovingCallbackFacet facet = facetHolder.getFacet(RemovingCallbackFacet.class);
@@ -62,7 +66,7 @@ public class RemoveCallbackFacetFactory 
             }
         }
 
-        method = findMethod(cls, OBJECT, REMOVED_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, REMOVED_PREFIX, void.class, NO_PARAMETERS_TYPES);
         if (method != null) {
             methods.add(method);
             RemovedCallbackFacet facet = facetHolder.getFacet(RemovedCallbackFacet.class);
@@ -73,8 +77,8 @@ public class RemoveCallbackFacetFactory 
             }
         }
 
-        remover.removeMethods(methods);
-        return FacetUtil.addFacets(facets);
+        processClassContext.removeMethods(methods);
+        FacetUtil.addFacets(facets);
     }
 
 }

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackViaDeleteMethodFacetFactory.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/DeleteCallbackFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackViaDeleteMethodFacetFactory.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackViaDeleteMethodFacetFactory.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/DeleteCallbackFacetFactory.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/DeleteCallbackFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemoveCallbackViaDeleteMethodFacetFactory.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -28,53 +28,57 @@ import org.apache.isis.core.metamodel.fa
 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.facets.object.callbacks.RemovedCallbackFacet;
 import org.apache.isis.core.metamodel.facets.object.callbacks.RemovingCallbackFacet;
+import org.apache.isis.core.metamodel.methodutils.MethodScope;
+import org.apache.isis.core.progmodel.facets.MethodFinderUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
 
 
-public class DeleteCallbackFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
+public class RemoveCallbackViaDeleteMethodFacetFactory extends MethodPrefixBasedFacetFactoryAbstract {
 
     private static final String DELETED_PREFIX = "deleted";
     private static final String DELETING_PREFIX = "deleting";
 
     private static final String[] PREFIXES = { DELETED_PREFIX, DELETING_PREFIX, };
 
-    public DeleteCallbackFacetFactory() {
-        super(PREFIXES, FeatureType.OBJECTS_ONLY);
+    public RemoveCallbackViaDeleteMethodFacetFactory() {
+        super(FeatureType.OBJECTS_ONLY, PREFIXES);
     }
 
     @Override
-    public boolean process(final Class<?> cls, final MethodRemover remover, final FacetHolder facetHolder) {
+    public void process(ProcessClassContext processClassContext) {
+        final Class<?> cls = processClassContext.getCls();
+        final FacetHolder holder = processClassContext.getFacetHolder();
+
         final List<Facet> facets = new ArrayList<Facet>();
         final List<Method> methods = new ArrayList<Method>();
 
         Method method = null;
-        method = findMethod(cls, OBJECT, DELETING_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, DELETING_PREFIX, void.class, NO_PARAMETERS_TYPES);
         if (method != null) {
             methods.add(method);
-            RemovingCallbackFacet facet = facetHolder.getFacet(RemovingCallbackFacet.class);
+            RemovingCallbackFacet facet = holder.getFacet(RemovingCallbackFacet.class);
             if (facet == null) {
-            	facets.add(new RemovingCallbackFacetViaMethod(method, facetHolder));
+            	facets.add(new RemovingCallbackFacetViaMethod(method, holder));
             } else {
             	facet.addMethod(method);
             }
         }
 
-        method = findMethod(cls, OBJECT, DELETED_PREFIX, void.class, NO_PARAMETERS_TYPES);
+        method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, DELETED_PREFIX, void.class, NO_PARAMETERS_TYPES);
         if (method != null) {
             methods.add(method);
-            RemovedCallbackFacet facet = facetHolder.getFacet(RemovedCallbackFacet.class);
+            RemovedCallbackFacet facet = holder.getFacet(RemovedCallbackFacet.class);
             if (facet == null) {
-            	facets.add(new RemovedCallbackFacetViaMethod(method, facetHolder));
+            	facets.add(new RemovedCallbackFacetViaMethod(method, holder));
             } else {
             	facet.addMethod(method);
             }
         }
 
-        remover.removeMethods(methods);
-        return FacetUtil.addFacets(facets);
+        processClassContext.removeMethods(methods);
+        FacetUtil.addFacets(facets);
     }
 
 }

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetAbstract.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemovedCallbackFacetAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetAbstract.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetAbstract.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemovedCallbackFacetAbstract.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemovedCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetAbstract.java Mon Jan 17 08:48:40 2011
@@ -18,11 +18,12 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.callbacks.RemovedCallbackFacet;
+import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
 
 public abstract class RemovedCallbackFacetAbstract extends CallbackFacetAbstract implements RemovedCallbackFacet {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetViaMethod.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemovedCallbackFacetViaMethod.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetViaMethod.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetViaMethod.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemovedCallbackFacetViaMethod.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemovedCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovedCallbackFacetViaMethod.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetAbstract.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemovingCallbackFacetAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetAbstract.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetAbstract.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemovingCallbackFacetAbstract.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemovingCallbackFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetAbstract.java Mon Jan 17 08:48:40 2011
@@ -18,11 +18,12 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.callbacks.RemovingCallbackFacet;
+import org.apache.isis.core.progmodel.facets.object.callbacks.CallbackFacetAbstract;
 
 
 public abstract class RemovingCallbackFacetAbstract extends CallbackFacetAbstract implements RemovingCallbackFacet {

Copied: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetViaMethod.java (from r1056813, incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemovingCallbackFacetViaMethod.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetViaMethod.java?p2=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetViaMethod.java&p1=incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemovingCallbackFacetViaMethod.java&r1=1056813&r2=1059813&rev=1059813&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/RemovingCallbackFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/callbacks/remove/RemovingCallbackFacetViaMethod.java Mon Jan 17 08:48:40 2011
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.progmodel.facets.object.callbacks;
+package org.apache.isis.core.progmodel.facets.object.callbacks.remove;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;



Mime
View raw message