incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1050661 [2/3] - in /incubator/isis/trunk: alternatives/remoting/common/src/test/java/org/apache/isis/alternatives/remoting/common/client/facets/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ core/...
Date Sat, 18 Dec 2010 16:30:25 GMT
Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/ActionMethodsFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/ActionMethodsFacetFactory.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/ActionMethodsFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/ActionMethodsFacetFactory.java Sat Dec 18 16:30:23 2010
@@ -20,13 +20,13 @@
 
 package org.apache.isis.core.progmodel.facets.actions;
 
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.isis.applib.security.UserMemento;
+import java.lang.reflect.Array;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.applib.security.UserMemento;
 import org.apache.isis.core.metamodel.exceptions.ReflectionException;
 import org.apache.isis.core.metamodel.facets.Facet;
 import org.apache.isis.core.metamodel.facets.FacetHolder;
@@ -37,8 +37,8 @@ import org.apache.isis.core.metamodel.ru
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContextAware;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectFeatureType;
-import org.apache.isis.core.metamodel.specloader.internal.peer.JavaObjectActionPeer;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionParamPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 import org.apache.isis.core.metamodel.util.InvokeUtils;
 import org.apache.isis.core.metamodel.util.NameUtils;
 import org.apache.isis.core.progmodel.facets.MethodPrefixBasedFacetFactoryAbstract;
@@ -88,7 +88,7 @@ public class ActionMethodsFacetFactory e
     // ///////////////////////////////////////////////////////
 
     @Override
-    public boolean process(Class<?> cls, final Method actionMethod, final MethodRemover methodRemover, final FacetHolder action) {
+    public boolean process(Class<?> cls, final Method actionMethod, final MethodRemover methodRemover, final FacetHolder holder) {
 
         final String capitalizedName = NameUtils.capitalizeName(actionMethod.getName());
         final Class<?> returnType = actionMethod.getReturnType();
@@ -99,55 +99,62 @@ public class ActionMethodsFacetFactory e
         final ObjectSpecification typeSpec = getSpecificationLoader().loadSpecification(cls);
         final ObjectSpecification returnSpec = getSpecificationLoader().loadSpecification(returnType.getName());
         if (returnSpec != null) {
-            facets.add(new ActionInvocationFacetViaMethod(actionMethod, typeSpec, returnSpec, action, getRuntimeContext()));
-            checkForDebugPrefix(facets, capitalizedName, action);
-            checkForExplorationPrefix(facets, capitalizedName, action);
-            checkForExecutionLocationPrefix(facets, capitalizedName, action);
+            facets.add(new ActionInvocationFacetViaMethod(actionMethod, typeSpec, returnSpec, holder, getRuntimeContext()));
+            checkForDebugPrefix(facets, capitalizedName, holder);
+            checkForExplorationPrefix(facets, capitalizedName, holder);
+            checkForExecutionLocationPrefix(facets, capitalizedName, holder);
         }
 
         removeMethod(methodRemover, actionMethod);
 
         final boolean forClass = (actionMethod.getModifiers() & Modifier.STATIC) > 0;
-        findAndRemoveValidMethod(facets, methodRemover, cls, forClass, capitalizedName, returnType, paramTypes, action);
+        findAndRemoveValidMethod(facets, methodRemover, cls, forClass, capitalizedName, returnType, paramTypes, holder);
         boolean oldChoicesOrDefaultsMethodsUsed = findAndRemoveParametersDefaultsMethod(facets, methodRemover, cls, forClass,
-                capitalizedName, returnType, paramTypes, action);
+                capitalizedName, returnType, paramTypes, holder);
         oldChoicesOrDefaultsMethodsUsed = findAndRemoveParametersChoicesMethod(facets, methodRemover, cls, forClass,
-                capitalizedName, returnType, paramTypes, action)
+                capitalizedName, returnType, paramTypes, holder)
                 || oldChoicesOrDefaultsMethodsUsed;
 
-        defaultNamedFacet(facets, methodRemover, capitalizedName, action); // must be called after the checkForXxxPrefix methods
-        findAndRemoveNameMethod(facets, methodRemover, cls, capitalizedName, new Class[] {}, action);
-        findAndRemoveDescriptionMethod(facets, methodRemover, cls, capitalizedName, new Class[] {}, action);
-
-        findAndRemoveAlwaysHideMethod(facets, methodRemover, cls, capitalizedName, paramTypes, action);
-        findAndRemoveProtectMethod(facets, methodRemover, cls, capitalizedName, paramTypes, action);
-
-        findAndRemoveHideForSessionMethod(facets, methodRemover, cls, capitalizedName, UserMemento.class, action);
-        findAndRemoveDisableForSessionMethod(facets, methodRemover, cls, capitalizedName, UserMemento.class, action);
-        findAndRemoveHideMethod(facets, methodRemover, cls, forClass, capitalizedName, paramTypes, action);
-        findAndRemoveDisableMethod(facets, methodRemover, cls, forClass, capitalizedName, paramTypes, action);
-
-        if (action instanceof JavaObjectActionPeer) {
-            final JavaObjectActionPeer javaObjectActionPeer = (JavaObjectActionPeer) action;
-            // process the action's parameters names, descriptions and optional
-            // an alternative design would be to have another facet factory processing just ACTION_PARAMETER,
-            // and have it remove these
-            // supporting methods. However, the FacetFactory API doesn't allow for methods of the class to be
-            // removed while processing
-            // action parameters, only while processing Methods (ie actions)
-            final ObjectActionParamPeer[] actionParameters = javaObjectActionPeer.getParameters();
-
-            findAndRemoveOptionalForActionParametersMethod(methodRemover, cls, capitalizedName, returnType, paramTypes,
-                    actionParameters);
-            findAndRemoveNamesForActionParametersMethod(methodRemover, cls, capitalizedName, returnType, paramTypes,
-                    actionParameters);
-            findAndRemoveDescriptionsforActionParametersMethod(methodRemover, cls, capitalizedName, returnType, paramTypes,
-                    actionParameters);
-
-            findAndRemoveChoicesForActionParametersMethod(oldChoicesOrDefaultsMethodsUsed, methodRemover, cls, capitalizedName,
-                    paramTypes, actionParameters);
-            findAndRemoveDefaultForActionParametersMethod(oldChoicesOrDefaultsMethodsUsed, methodRemover, cls, capitalizedName,
-                    paramTypes, actionParameters);
+        defaultNamedFacet(facets, methodRemover, capitalizedName, holder); // must be called after the checkForXxxPrefix methods
+        findAndRemoveNameMethod(facets, methodRemover, cls, capitalizedName, new Class[] {}, holder);
+        findAndRemoveDescriptionMethod(facets, methodRemover, cls, capitalizedName, new Class[] {}, holder);
+
+        findAndRemoveAlwaysHideMethod(facets, methodRemover, cls, capitalizedName, paramTypes, holder);
+        findAndRemoveProtectMethod(facets, methodRemover, cls, capitalizedName, paramTypes, holder);
+
+        findAndRemoveHideForSessionMethod(facets, methodRemover, cls, capitalizedName, UserMemento.class, holder);
+        findAndRemoveDisableForSessionMethod(facets, methodRemover, cls, capitalizedName, UserMemento.class, holder);
+        findAndRemoveHideMethod(facets, methodRemover, cls, forClass, capitalizedName, paramTypes, holder);
+        findAndRemoveDisableMethod(facets, methodRemover, cls, forClass, capitalizedName, paramTypes, holder);
+
+        if (holder instanceof ObjectMemberPeer) {
+            final ObjectMemberPeer memberPeer = (ObjectMemberPeer) holder;
+
+            if(memberPeer.getFeatureType().isAction()) {
+                // REVIEW: it may not be necessary to do this check, because properties and collections have no "children" (parameters)
+                // and so their list will be null.
+                
+                // process the action's parameters names, descriptions and optional
+                // an alternative design would be to have another facet factory processing just ACTION_PARAMETER,
+                // and have it remove these
+                // supporting methods. However, the FacetFactory API doesn't allow for methods of the class to be
+                // removed while processing
+                // action parameters, only while processing Methods (ie actions)
+                final List<TypedHolder> children = memberPeer.getChildren();
+                
+                findAndRemoveOptionalForActionParametersMethod(methodRemover, cls, capitalizedName, returnType, paramTypes,
+                    children);
+                findAndRemoveNamesForActionParametersMethod(methodRemover, cls, capitalizedName, returnType, paramTypes,
+                    children);
+                findAndRemoveDescriptionsforActionParametersMethod(methodRemover, cls, capitalizedName, returnType, paramTypes,
+                    children);
+                
+                findAndRemoveChoicesForActionParametersMethod(oldChoicesOrDefaultsMethodsUsed, methodRemover, cls, capitalizedName,
+                    paramTypes, children);
+                findAndRemoveDefaultForActionParametersMethod(oldChoicesOrDefaultsMethodsUsed, methodRemover, cls, capitalizedName,
+                    paramTypes, children);
+            }
+            
         }
         return FacetUtil.addFacets(facets);
     }
@@ -288,7 +295,7 @@ public class ActionMethodsFacetFactory e
             final String capitalizedName,
             final Class<?> returnType,
             final Class<?>[] params,
-            final FacetHolder[] parameters) {
+            final List<TypedHolder> parameters) {
         if (params.length == 0) {
             return;
         }
@@ -305,7 +312,7 @@ public class ActionMethodsFacetFactory e
         for (int i = 0; i < names.length; i++) {
             if (names[i]) {
                 // add facets directly to parameters, not to actions
-                FacetUtil.addFacet(new MandatoryFacetOverriddenByMethod(parameters[i]));
+                FacetUtil.addFacet(new MandatoryFacetOverriddenByMethod(parameters.get(i)));
             }
         }
     }
@@ -316,7 +323,7 @@ public class ActionMethodsFacetFactory e
             final String capitalizedName,
             final Class<?> returnType,
             final Class<?>[] params,
-            final FacetHolder[] parameters) {
+            final List<TypedHolder> parameters) {
         Method method = findMethodWithOrWithoutParameters(cls, CLASS, PARAMETER_NAMES_PREFIX + capitalizedName,
                 String[].class, params);
         if (method == null) {
@@ -326,13 +333,13 @@ public class ActionMethodsFacetFactory e
 
         final Object[] parameterObjects = new Object[method.getParameterTypes().length];
         final String[] names = (String[]) InvokeUtils.invokeStatic(method, parameterObjects);
-        if (names.length != parameters.length) {
-            throw new ReflectionException("Invalid number of parameter names, expected " + parameters.length + ", but got "
+        if (names.length != parameters.size()) {
+            throw new ReflectionException("Invalid number of parameter names, expected " + parameters.size() + ", but got "
                     + names.length + ", on " + method);
         }
         for (int i = 0; i < names.length; i++) {
             // add facets directly to parameters, not to actions
-            FacetUtil.addFacet(new NamedFacetViaMethod(names[i], method, parameters[i]));
+            FacetUtil.addFacet(new NamedFacetViaMethod(names[i], method, parameters.get(i)));
         }
     }
 
@@ -342,7 +349,7 @@ public class ActionMethodsFacetFactory e
             final Class<?> cls,
             final String capitalizedName,
             final Class<?>[] params,
-            final FacetHolder[] parameters) {
+            final List<TypedHolder> parameters) {
 
         for (int i = 0; i < params.length; i++) {
             final Class<?> returnType = (Array.newInstance(params[i], 0)).getClass();
@@ -362,7 +369,7 @@ public class ActionMethodsFacetFactory e
                 removeMethod(methodRemover, method);
 
                 // add facets directly to parameters, not to actions
-                FacetUtil.addFacet(new ActionParameterChoicesFacetViaMethod(method, returnType, parameters[i], getSpecificationLoader(), getRuntimeContext()));
+                FacetUtil.addFacet(new ActionParameterChoicesFacetViaMethod(method, returnType, parameters.get(i), getRuntimeContext()));
             }
         }
     }
@@ -373,7 +380,7 @@ public class ActionMethodsFacetFactory e
             final Class<?> cls,
             final String capitalizedName,
             final Class<?>[] params,
-            final FacetHolder[] parameters) {
+            final List<TypedHolder> parameters) {
 
         for (int i = 0; i < params.length; i++) {
 
@@ -387,7 +394,7 @@ public class ActionMethodsFacetFactory e
 
                 removeMethod(methodRemover, method);
                 // add facets directly to parameters, not to actions
-                FacetUtil.addFacet(new ActionParameterDefaultsFacetViaMethod(method, parameters[i]));
+                FacetUtil.addFacet(new ActionParameterDefaultsFacetViaMethod(method, parameters.get(i)));
             }
         }
     }
@@ -398,7 +405,7 @@ public class ActionMethodsFacetFactory e
             final String capitalizedName,
             final Class<?> returnType,
             final Class<?>[] params,
-            final FacetHolder[] parameters) {
+            final List<TypedHolder> parameters) {
         final Method method = findMethodWithOrWithoutParameters(cls, CLASS, PARAMETER_DESCRIPTIONS_PREFIX + capitalizedName,
                 String[].class, params);
         if (method == null) {
@@ -410,7 +417,7 @@ public class ActionMethodsFacetFactory e
         final String[] names = (String[]) InvokeUtils.invokeStatic(method, parameterObjects);
         for (int i = 0; i < names.length; i++) {
             // add facets directly to parameters, not to actions
-            FacetUtil.addFacet(new DescribedAsFacetViaMethod(names[i], method, parameters[i]));
+            FacetUtil.addFacet(new DescribedAsFacetViaMethod(names[i], method, parameters.get(i)));
         }
         methodRemover.removeMethod(method);
     }
@@ -449,7 +456,8 @@ public class ActionMethodsFacetFactory e
     /**
      * Injected because {@link RuntimeContextAware}
      */
-	public void setRuntimeContext(final RuntimeContext runtimeContext) {
+	@Override
+    public void setRuntimeContext(final RuntimeContext runtimeContext) {
 		this.runtimeContext = runtimeContext;
 	}
 

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetAbstract.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetAbstract.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetAbstract.java Sat Dec 18 16:30:23 2010
@@ -24,6 +24,7 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.FacetAbstract;
 import org.apache.isis.core.metamodel.facets.FacetHolder;
 import org.apache.isis.core.metamodel.facets.actions.choices.ActionParameterChoicesFacet;
+import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 
 
 public abstract class ActionParameterChoicesFacetAbstract extends FacetAbstract implements ActionParameterChoicesFacet {
@@ -32,9 +33,17 @@ public abstract class ActionParameterCho
         return ActionParameterChoicesFacet.class;
     }
 
-    public ActionParameterChoicesFacetAbstract(final FacetHolder holder) {
-        super(type(), holder, false);
-    }
+    private final RuntimeContext runtimeContext;
+    
+    public ActionParameterChoicesFacetAbstract(final FacetHolder holder, final RuntimeContext runtimeContext) {
+        super(type(), holder, false);
+        this.runtimeContext = runtimeContext;
+    }
+
+    protected RuntimeContext getRuntimeContext() {
+        return runtimeContext;
+    }
+
 
 }
 

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetNone.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetNone.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetNone.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetNone.java Sat Dec 18 16:30:23 2010
@@ -22,14 +22,16 @@ package org.apache.isis.core.progmodel.f
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.FacetHolder;
+import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 
 
 public class ActionParameterChoicesFacetNone extends ActionParameterChoicesFacetAbstract {
 
-    public ActionParameterChoicesFacetNone(final FacetHolder holder) {
-        super(holder);
+    public ActionParameterChoicesFacetNone(final FacetHolder holder, final RuntimeContext runtimeContext) {
+        super(holder, runtimeContext);
     }
 
+    @Override
     public Object[] getChoices(final ObjectAdapter inObject) {
         return new ObjectAdapter[0];
     }

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetViaMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetViaMethod.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetViaMethod.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetViaMethod.java Sat Dec 18 16:30:23 2010
@@ -30,7 +30,6 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.java5.ImperativeFacet;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
 import org.apache.isis.core.metamodel.util.ObjectAdapterUtils;
 import org.apache.isis.core.metamodel.util.ObjectInvokeUtils;
 
@@ -40,38 +39,37 @@ public class ActionParameterChoicesFacet
 
     private final Method method;
     private final Class<?> choicesType;
-	private final SpecificationLoader specificationLoader;
-	private final RuntimeContext runtimeContext;
 
     public ActionParameterChoicesFacetViaMethod(
     		final Method method, 
     		final Class<?> choicesType, 
     		final FacetHolder holder, 
-    		final SpecificationLoader specificationLoader, 
     		final RuntimeContext runtimeContext) {
-        super(holder);
+        super(holder, runtimeContext);
         this.method = method;
         this.choicesType = choicesType;
-        this.specificationLoader = specificationLoader;
-        this.runtimeContext = runtimeContext;
     }
 
     /**
      * Returns a singleton list of the {@link Method} provided in the constructor. 
      */
+    @Override
     public List<Method> getMethods() {
     	return Collections.singletonList(method);
     }
 
-	public boolean impliesResolve() {
+	@Override
+    public boolean impliesResolve() {
 		return true;
 	}
 
-	public boolean impliesObjectChanged() {
+	@Override
+    public boolean impliesObjectChanged() {
 		return false;
 	}
 	
 
+    @Override
     public Object[] getChoices(final ObjectAdapter owningAdapter) {
         final Object options = ObjectInvokeUtils.invoke(method, owningAdapter);
         if (options == null) {
@@ -81,7 +79,7 @@ public class ActionParameterChoicesFacet
             return ArrayUtils.getObjectAsObjectArray(options);
         }
         else {
-            final ObjectSpecification specification = getSpecificationLoader().loadSpecification(choicesType);
+            final ObjectSpecification specification = getRuntimeContext().getSpecificationLoader().loadSpecification(choicesType);
             return ObjectAdapterUtils.getCollectionAsObjectArray(options, specification, getRuntimeContext());
         }
     }
@@ -93,17 +91,7 @@ public class ActionParameterChoicesFacet
 
 
 	
-	////////////////////////////////////////////////////////////////////
-	// Dependencies (from constructor)
-	////////////////////////////////////////////////////////////////////
 
-    private RuntimeContext getRuntimeContext() {
-		return runtimeContext;
-	}
-
-	private SpecificationLoader getSpecificationLoader() {
-		return specificationLoader;
-	}
 
 }
 

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/CollectionFieldMethodsFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/CollectionFieldMethodsFacetFactory.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/CollectionFieldMethodsFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/CollectionFieldMethodsFacetFactory.java Sat Dec 18 16:30:23 2010
@@ -36,7 +36,7 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContextAware;
 import org.apache.isis.core.metamodel.spec.feature.ObjectFeatureType;
-import org.apache.isis.core.metamodel.specloader.internal.peer.JavaObjectAssociationPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeerImpl;
 import org.apache.isis.core.metamodel.util.NameUtils;
 import org.apache.isis.core.progmodel.facets.PropertyOrCollectionIdentifyingFacetFactoryAbstract;
 import org.apache.isis.core.progmodel.facets.actcoll.typeof.TypeOfFacetInferredFromSupportingMethods;
@@ -250,7 +250,7 @@ public class CollectionFieldMethodsFacet
             final Class<?> cls,
             final String capitalizedName,
             final Class<?> returnType,
-            final JavaObjectAssociationPeer collection) {
+            final ObjectMemberPeerImpl collection) {
         final Method method = findMethod(cls, OBJECT, CHOICES_PREFIX + capitalizedName, Object[].class, NO_PARAMETERS_TYPES);
         removeMethod(methodRemover, method);
         if (method == null) {

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/propparam/enums/ActionParameterChoicesFacetDerivedFromChoicesFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/propparam/enums/ActionParameterChoicesFacetDerivedFromChoicesFacet.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/propparam/enums/ActionParameterChoicesFacetDerivedFromChoicesFacet.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/propparam/enums/ActionParameterChoicesFacetDerivedFromChoicesFacet.java Sat Dec 18 16:30:23 2010
@@ -22,24 +22,29 @@ package org.apache.isis.core.progmodel.f
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.FacetHolder;
+import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionParamPeer;
+import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 import org.apache.isis.core.progmodel.facets.actions.choices.ActionParameterChoicesFacetAbstract;
 
 public class ActionParameterChoicesFacetDerivedFromChoicesFacet extends ActionParameterChoicesFacetAbstract {
 
-    public ActionParameterChoicesFacetDerivedFromChoicesFacet(FacetHolder holder) {
-        super(holder);
+    public ActionParameterChoicesFacetDerivedFromChoicesFacet(FacetHolder holder, final RuntimeContext runtimeContext) {
+        super(holder, runtimeContext);
     }
 
+    @Override
     public Object[] getChoices(ObjectAdapter adapter) {
         FacetHolder facetHolder = getFacetHolder();
-        ObjectActionParamPeer noapp = (ObjectActionParamPeer) facetHolder;
-        ObjectSpecification noSpec = noapp.getSpecification();
+        final SpecificationLoader specificationLoader = getRuntimeContext().getSpecificationLoader();
+        TypedHolder paramPeer = (TypedHolder) facetHolder;
+        ObjectSpecification noSpec = paramPeer.getSpecification(specificationLoader);
         ChoicesFacet choicesFacet = noSpec.getFacet(ChoicesFacet.class);
         if (choicesFacet == null)
             return new Object[0];
         return choicesFacet.getChoices(adapter);
     }
 
+
 }

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/propparam/enums/PropertyAndParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/propparam/enums/PropertyAndParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/propparam/enums/PropertyAndParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/propparam/enums/PropertyAndParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java Sat Dec 18 16:30:23 2010
@@ -26,12 +26,16 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.FacetHolder;
 import org.apache.isis.core.metamodel.facets.FacetUtil;
 import org.apache.isis.core.metamodel.facets.MethodRemover;
+import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
+import org.apache.isis.core.metamodel.runtimecontext.RuntimeContextAware;
 import org.apache.isis.core.metamodel.spec.feature.ObjectFeatureType;
 
 public class PropertyAndParameterChoicesFacetDerivedFromChoicesFacetFacetFactory extends
-    FacetFactoryAbstract {
+    FacetFactoryAbstract implements RuntimeContextAware {
 
 
+    private RuntimeContext runtimeContext;
+
     public PropertyAndParameterChoicesFacetDerivedFromChoicesFacetFacetFactory() {
         super(ObjectFeatureType.PROPERTIES_AND_PARAMETERS);
     }
@@ -58,8 +62,21 @@ public class PropertyAndParameterChoices
             return false;
         }
         
-        FacetUtil.addFacet(new ActionParameterChoicesFacetDerivedFromChoicesFacet(holder));
+        FacetUtil.addFacet(new ActionParameterChoicesFacetDerivedFromChoicesFacet(holder, runtimeContext));
         return true;
     }
 
+
+    ///////////////////////////////////////////////
+    // Injected
+    ///////////////////////////////////////////////
+    
+    /**
+     * Injected since {@link RuntimeContextAware}.
+     */
+    @Override
+    public void setRuntimeContext(RuntimeContext runtimeContext) {
+        this.runtimeContext = runtimeContext;
+    }
+
 }

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/spec/JavaSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/spec/JavaSpecification.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/spec/JavaSpecification.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/spec/JavaSpecification.java Sat Dec 18 16:30:23 2010
@@ -70,8 +70,7 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.specloader.internal.ObjectActionImpl;
 import org.apache.isis.core.metamodel.specloader.internal.OneToManyAssociationImpl;
 import org.apache.isis.core.metamodel.specloader.internal.OneToOneAssociationImpl;
-import org.apache.isis.core.metamodel.specloader.internal.peer.JavaObjectActionPeer;
-import org.apache.isis.core.metamodel.specloader.internal.peer.JavaObjectAssociationPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeerImpl;
 import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeer;
 import org.apache.isis.core.metamodel.util.CallbackUtils;
 import org.apache.isis.core.metamodel.util.NameUtils;
@@ -551,10 +550,12 @@ public class JavaSpecification extends I
         int actionCnt = 0;
         while (elements.hasMoreElements()) {
             final Object element = elements.nextElement();
-            if (element instanceof JavaObjectAssociationPeer) {
-                final JavaObjectAssociationPeer javaObjectAssociationPeer = (JavaObjectAssociationPeer) element;
-                final ObjectAssociation objectAssociation = createObjectField(javaObjectAssociationPeer);
-                fields[actionCnt++] = objectAssociation;
+            if (element instanceof ObjectMemberPeerImpl) {
+                ObjectMemberPeerImpl javaObjectMemberPeer = (ObjectMemberPeerImpl) element;
+                if (javaObjectMemberPeer.getFeatureType().isPropertyOrCollection()) {
+                    final ObjectAssociation objectAssociation = createObjectAssociation(javaObjectMemberPeer);
+                    fields[actionCnt++] = objectAssociation;
+                }
             } else if (element instanceof OrderSet) {
                 // Not supported at present
             } else {
@@ -576,11 +577,13 @@ public class JavaSpecification extends I
         int actionCnt = 0;
         while (elements.hasMoreElements()) {
             final Object element = elements.nextElement();
-            if (element instanceof JavaObjectActionPeer) {
-                final JavaObjectActionPeer javaObjectActionPeer = (JavaObjectActionPeer) element;
-                final String actionId = javaObjectActionPeer.getIdentifier().getMemberName();
-                final ObjectAction objectAction = new ObjectActionImpl(actionId, javaObjectActionPeer, getRuntimeContext());
-                actions[actionCnt++] = objectAction;
+            if (element instanceof ObjectMemberPeerImpl) {
+                final ObjectMemberPeerImpl memberPeer = (ObjectMemberPeerImpl) element;
+                if(memberPeer.getFeatureType().isAction()) {
+                    final String actionId = memberPeer.getIdentifier().getMemberName();
+                    final ObjectAction objectAction = new ObjectActionImpl(actionId, memberPeer, getRuntimeContext());
+                    actions[actionCnt++] = objectAction;
+                }
             } else if (element instanceof OrderSet) {
                 final OrderSet set = ((OrderSet) element);
                 actions[actionCnt++] = new ObjectActionSet("", set.getGroupFullName(), orderActions(set), getRuntimeContext());
@@ -597,8 +600,8 @@ public class JavaSpecification extends I
         return actions;
     }
 
-    private ObjectAssociation createObjectField(final ObjectMemberPeer peer) {
-        if (peer.isCollection()) {
+    private ObjectAssociation createObjectAssociation(final ObjectMemberPeer peer) {
+        if (peer.getFeatureType().isCollection()) {
             return new OneToManyAssociationImpl(peer, getRuntimeContext());
 
         } else {

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/specloader/internal/introspector/JavaIntrospector.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/specloader/internal/introspector/JavaIntrospector.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/specloader/internal/introspector/JavaIntrospector.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/specloader/internal/introspector/JavaIntrospector.java Sat Dec 18 16:30:23 2010
@@ -49,12 +49,9 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.specloader.classsubstitutor.ClassSubstitutor;
 import org.apache.isis.core.metamodel.specloader.internal.facetprocessor.FacetProcessor;
 import org.apache.isis.core.metamodel.specloader.internal.introspector.MethodFinderUtils;
-import org.apache.isis.core.metamodel.specloader.internal.peer.JavaObjectActionParamPeer;
-import org.apache.isis.core.metamodel.specloader.internal.peer.JavaObjectActionPeer;
-import org.apache.isis.core.metamodel.specloader.internal.peer.JavaObjectAssociationPeer;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionParamPeer;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeerImpl;
 import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 import org.apache.isis.core.metamodel.specloader.traverser.SpecificationTraverser;
 import org.apache.isis.core.metamodel.util.NameUtils;
 import org.apache.isis.core.progmodel.facets.object.facets.FacetsFacet;
@@ -363,7 +360,7 @@ public class JavaIntrospector {
             }
 
             // create property and add facets
-            final JavaObjectAssociationPeer collection = JavaObjectAssociationPeer.createCollectionPeer(type, getMethod, getSpecificationLoader());
+            final ObjectMemberPeer collection = ObjectMemberPeerImpl.createCollectionPeer(type, getMethod, getSpecificationLoader());
             getFacetProcessor().process(type, getMethod, new JavaIntrospectorMethodRemover(), collection,
                     ObjectFeatureType.COLLECTION);
 
@@ -398,7 +395,7 @@ public class JavaIntrospector {
             }
 
             // create a 1:1 association peer
-            final JavaObjectAssociationPeer associationPeer = JavaObjectAssociationPeer.createPropertyPeer(type, getMethod, returnType, getSpecificationLoader());
+            final ObjectMemberPeer associationPeer = ObjectMemberPeerImpl.createPropertyPeer(type, getMethod, returnType, getSpecificationLoader());
 
             // process facets for the 1:1 association
             getFacetProcessor().process(type, getMethod, new JavaIntrospectorMethodRemover(), associationPeer,
@@ -442,7 +439,7 @@ public class JavaIntrospector {
             if (method == null) {
                 continue;
             }
-            ObjectActionPeer actionPeer = findActionMethodPeer(methodScope, skipRecognisedHelpers, method);
+            ObjectMemberPeer actionPeer = findActionMethodPeer(methodScope, skipRecognisedHelpers, method);
             if (actionPeer != null) {
             	methods.set(i, null);
             	actionPeers.add(actionPeer);
@@ -452,7 +449,7 @@ public class JavaIntrospector {
         return actionPeers;
     }
 
-    private ObjectActionPeer findActionMethodPeer(final MethodScope methodScope, RecognisedHelpersStrategy skipRecognisedHelpers, final Method actionMethod) {
+    private ObjectMemberPeer findActionMethodPeer(final MethodScope methodScope, RecognisedHelpersStrategy skipRecognisedHelpers, final Method actionMethod) {
 
     	if (!representsAction(methodScope, skipRecognisedHelpers, actionMethod)) {
     		return null;
@@ -462,22 +459,22 @@ public class JavaIntrospector {
         return createAction(actionMethod);
     }
 
-	private ObjectActionPeer createAction(final Method actionMethod) {
+	private ObjectMemberPeer createAction(final Method actionMethod) {
 	    
 		if (!isAllParamTypesValid(actionMethod)) {
 		    return null;
 		}
         
         Class<?> returnType = actionMethod.getReturnType();
-        final JavaObjectActionPeer action = new JavaObjectActionPeer(type, actionMethod, returnType, reflector);
+        final ObjectMemberPeer action = ObjectMemberPeerImpl.createActionPeer(type, actionMethod, returnType, reflector);
 
         // process facets on the action & parameters
         getFacetProcessor()
                 .process(type, actionMethod, new JavaIntrospectorMethodRemover(), action, ObjectFeatureType.ACTION);
 
-        ObjectActionParamPeer[] actionParams = action.getParameters();
-        for (int j = 0; j < actionParams.length; j++) {
-            getFacetProcessor().processParams(actionMethod, j, actionParams[j]);
+        List<TypedHolder> actionParams = action.getChildren();
+        for (int j = 0; j < actionParams.size(); j++) {
+            getFacetProcessor().processParams(actionMethod, j, actionParams.get(j));
         }
 
         return action;
@@ -487,7 +484,7 @@ public class JavaIntrospector {
         return Util.isAllParamTypesValid(actionMethod, getSpecificationLoader());
     }
 
-    private JavaObjectActionParamPeer[] getParamPeersFor(final Method actionMethod) {
+    private List<TypedHolder> getParamPeersFor(final Method actionMethod) {
         return Util.getParamPeers(actionMethod, getSpecificationLoader());
     }
 
@@ -542,8 +539,8 @@ public class JavaIntrospector {
 		return true;
 	}
 
-	private ObjectActionPeer[] convertToArray(final List<ObjectActionPeer> actions) {
-        return actions.toArray(new ObjectActionPeer[] {});
+	private ObjectMemberPeer[] convertToArray(final List<ObjectMemberPeer> actions) {
+        return actions.toArray(new ObjectMemberPeer[] {});
     }
 
     // ////////////////////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/actions/ActionMethodsFacetFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/actions/ActionMethodsFacetFactoryTest.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/actions/ActionMethodsFacetFactoryTest.java (original)
+++ incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/actions/ActionMethodsFacetFactoryTest.java Sat Dec 18 16:30:23 2010
@@ -41,8 +41,8 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.naming.named.NamedFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectFeatureType;
-import org.apache.isis.core.metamodel.specloader.internal.peer.JavaObjectActionPeer;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeerImpl;
+import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeer;
 import org.apache.isis.core.metamodel.testspec.TestProxySpecification;
 import org.apache.isis.core.progmodel.facets.AbstractFacetFactoryTest;
 import org.apache.isis.core.progmodel.facets.actions.choices.ActionChoicesFacetViaMethod;
@@ -649,13 +649,13 @@ public class ActionMethodsFacetFactoryTe
         Method default0Method = findMethod(Customer.class, "default0SomeAction", new Class[] {});
         Method default1Method = findMethod(Customer.class, "default1SomeAction", new Class[] {});
 
-        ObjectActionPeer facetHolderWithParms = new JavaObjectActionPeer(Customer.class, actionMethod, void.class, reflector);
+        ObjectMemberPeer facetHolderWithParms = ObjectMemberPeerImpl.createActionPeer(Customer.class, actionMethod, void.class, reflector);
 
         reflector.setLoadSpecificationStringReturn(voidNoSpec);
 
         facetFactory.process(Customer.class, actionMethod, methodRemover, facetHolderWithParms);
 
-        final Facet facet0 = facetHolderWithParms.getParameters()[0].getFacet(ActionParameterDefaultsFacet.class);
+        final Facet facet0 = facetHolderWithParms.getChildren().get(0).getFacet(ActionParameterDefaultsFacet.class);
         assertNotNull(facet0);
         assertTrue(facet0 instanceof ActionParameterDefaultsFacetViaMethod);
         final ActionParameterDefaultsFacetViaMethod actionDefaultFacetViaMethod0 = (ActionParameterDefaultsFacetViaMethod) facet0;
@@ -663,7 +663,7 @@ public class ActionMethodsFacetFactoryTe
 
         assertTrue(methodRemover.getRemoveMethodMethodCalls().contains(default0Method));
 
-        final Facet facet1 = facetHolderWithParms.getParameters()[1].getFacet(ActionParameterDefaultsFacet.class);
+        final Facet facet1 = facetHolderWithParms.getChildren().get(1).getFacet(ActionParameterDefaultsFacet.class);
         assertNotNull(facet1);
         assertTrue(facet1 instanceof ActionParameterDefaultsFacetViaMethod);
         final ActionParameterDefaultsFacetViaMethod actionDefaultFacetViaMethod1 = (ActionParameterDefaultsFacetViaMethod) facet1;
@@ -696,13 +696,13 @@ public class ActionMethodsFacetFactoryTe
         Method choices0Method = findMethod(Customer.class, "choices0SomeAction", new Class[] {});
         Method choices1Method = findMethod(Customer.class, "choices1SomeAction", new Class[] {});
 
-        ObjectActionPeer facetHolderWithParms = new JavaObjectActionPeer(Customer.class, actionMethod, void.class, reflector);
+        ObjectMemberPeer facetHolderWithParms = ObjectMemberPeerImpl.createActionPeer(Customer.class, actionMethod, void.class, reflector);
 
         reflector.setLoadSpecificationStringReturn(voidNoSpec);
 
         facetFactory.process(Customer.class, actionMethod, methodRemover, facetHolderWithParms);
 
-        final Facet facet0 = facetHolderWithParms.getParameters()[0].getFacet(ActionParameterChoicesFacet.class);
+        final Facet facet0 = facetHolderWithParms.getChildren().get(0).getFacet(ActionParameterChoicesFacet.class);
         assertNotNull(facet0);
         assertTrue(facet0 instanceof ActionParameterChoicesFacetViaMethod);
         final ActionParameterChoicesFacetViaMethod actionChoicesFacetViaMethod0 = (ActionParameterChoicesFacetViaMethod) facet0;
@@ -710,7 +710,7 @@ public class ActionMethodsFacetFactoryTe
 
         assertTrue(methodRemover.getRemoveMethodMethodCalls().contains(choices0Method));
 
-        final Facet facet1 = facetHolderWithParms.getParameters()[1].getFacet(ActionParameterChoicesFacet.class);
+        final Facet facet1 = facetHolderWithParms.getChildren().get(1).getFacet(ActionParameterChoicesFacet.class);
         assertNotNull(facet1);
         assertTrue(facet1 instanceof ActionParameterChoicesFacetViaMethod);
         final ActionParameterChoicesFacetViaMethod actionChoicesFacetViaMethod1 = (ActionParameterChoicesFacetViaMethod) facet1;
@@ -734,7 +734,7 @@ public class ActionMethodsFacetFactoryTe
         Method actionMethod = findMethod(CustomerEx.class, "someAction", new Class[] { int.class, long.class });
 
 
-        ObjectActionPeer facetHolderWithParms = new JavaObjectActionPeer(CustomerEx.class, actionMethod, void.class, reflector);
+        ObjectMemberPeer facetHolderWithParms = ObjectMemberPeerImpl.createActionPeer(CustomerEx.class, actionMethod, void.class, reflector);
 
         reflector.setLoadSpecificationStringReturn(voidNoSpec);
 
@@ -782,7 +782,7 @@ public class ActionMethodsFacetFactoryTe
         Method disableMethod = findMethod(CustomerEx.class, "disableSomeAction", new Class[] {});
 
 
-        ObjectActionPeer facetHolderWithParms = new JavaObjectActionPeer(CustomerEx.class, actionMethod, void.class, reflector);
+        ObjectMemberPeer facetHolderWithParms = ObjectMemberPeerImpl.createActionPeer(CustomerEx.class, actionMethod, void.class, reflector);
 
         reflector.setLoadSpecificationStringReturn(voidNoSpec);
 
@@ -791,13 +791,13 @@ public class ActionMethodsFacetFactoryTe
         final Facet facet0 = facetHolderWithParms.getFacet(ActionInvocationFacet.class);
         assertNotNull(facet0);
 
-        final Facet facet1 = facetHolderWithParms.getParameters()[0].getFacet(ActionParameterChoicesFacet.class);
+        final Facet facet1 = facetHolderWithParms.getChildren().get(0).getFacet(ActionParameterChoicesFacet.class);
         assertNotNull(facet1);
         assertTrue(facet1 instanceof ActionParameterChoicesFacetViaMethod);
         final ActionParameterChoicesFacetViaMethod actionChoicesFacetViaMethod0 = (ActionParameterChoicesFacetViaMethod) facet1;
         assertEquals(choices0Method, actionChoicesFacetViaMethod0.getMethods().get(0));
 
-        final Facet facet2 = facetHolderWithParms.getParameters()[1].getFacet(ActionParameterChoicesFacet.class);
+        final Facet facet2 = facetHolderWithParms.getChildren().get(1).getFacet(ActionParameterChoicesFacet.class);
         assertNotNull(facet2);
         assertTrue(facet2 instanceof ActionParameterChoicesFacetViaMethod);
         final ActionParameterChoicesFacetViaMethod actionChoicesFacetViaMethod1 = (ActionParameterChoicesFacetViaMethod) facet2;
@@ -837,7 +837,7 @@ public class ActionMethodsFacetFactoryTe
         }
 
         Method actionMethod = findMethod(Customer.class, "someAction", new Class[] { int.class, long.class });
-        ObjectActionPeer facetHolderWithParms = new JavaObjectActionPeer(Customer.class, actionMethod, void.class, reflector);
+        ObjectMemberPeer facetHolderWithParms = ObjectMemberPeerImpl.createActionPeer(Customer.class, actionMethod, void.class, reflector);
         reflector.setLoadSpecificationStringReturn(voidNoSpec);
 
         try {
@@ -871,7 +871,7 @@ public class ActionMethodsFacetFactoryTe
         }
 
         Method actionMethod = findMethod(Customer.class, "someAction", new Class[] { int.class, long.class });
-        ObjectActionPeer facetHolderWithParms = new JavaObjectActionPeer(Customer.class, actionMethod, void.class, reflector);
+        ObjectMemberPeer facetHolderWithParms = ObjectMemberPeerImpl.createActionPeer(Customer.class, actionMethod, void.class, reflector);
         reflector.setLoadSpecificationStringReturn(voidNoSpec);
 
         try {
@@ -905,7 +905,7 @@ public class ActionMethodsFacetFactoryTe
         }
 
         Method actionMethod = findMethod(Customer.class, "someAction", new Class[] { int.class, long.class });
-        ObjectActionPeer facetHolderWithParms = new JavaObjectActionPeer(Customer.class, actionMethod, void.class, reflector);
+        ObjectMemberPeer facetHolderWithParms = ObjectMemberPeerImpl.createActionPeer(Customer.class, actionMethod, void.class, reflector);
         reflector.setLoadSpecificationStringReturn(voidNoSpec);
 
         try {
@@ -939,7 +939,7 @@ public class ActionMethodsFacetFactoryTe
         }
 
         Method actionMethod = findMethod(Customer.class, "someAction", new Class[] { int.class, long.class });
-        ObjectActionPeer facetHolderWithParms = new JavaObjectActionPeer(Customer.class, actionMethod, void.class, reflector);
+        ObjectMemberPeer facetHolderWithParms = ObjectMemberPeerImpl.createActionPeer(Customer.class, actionMethod, void.class, reflector);
         reflector.setLoadSpecificationStringReturn(voidNoSpec);
 
         try {

Modified: incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/ordering/memberorder/MemberPeerStub.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/ordering/memberorder/MemberPeerStub.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/ordering/memberorder/MemberPeerStub.java (original)
+++ incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/ordering/memberorder/MemberPeerStub.java Sat Dec 18 16:30:23 2010
@@ -20,6 +20,9 @@
 
 package org.apache.isis.core.progmodel.facets.ordering.memberorder;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -27,31 +30,32 @@ import org.apache.isis.core.metamodel.au
 import org.apache.isis.core.metamodel.consent.Allow;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.facets.NamedAndDescribedFacetHolderImpl;
-import org.apache.isis.core.metamodel.runtimecontext.spec.feature.MemberType;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
 import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 
 
 final class MemberPeerStub extends NamedAndDescribedFacetHolderImpl implements ObjectMemberPeer {
 
     public static MemberPeerStub createProperty(final String name) {
-        return new MemberPeerStub(MemberType.PROPERTY, name);
+        return new MemberPeerStub(FeatureType.PROPERTY, name);
     }
 
     public static MemberPeerStub createCollection(final String name) {
-        return new MemberPeerStub(MemberType.COLLECTION, name);
+        return new MemberPeerStub(FeatureType.COLLECTION, name);
     }
 
     public static MemberPeerStub createAction(final String name) {
-        return new MemberPeerStub(MemberType.ACTION, name);
+        return new MemberPeerStub(FeatureType.ACTION, name);
     }
 
-    private final MemberType memberType;
+    private final FeatureType featureType;
 
-    private MemberPeerStub(final MemberType collection, final String name) {
+    private MemberPeerStub(final FeatureType collection, final String name) {
         super(name);
-        this.memberType = collection;
+        this.featureType = collection;
     }
 
 
@@ -92,6 +96,15 @@ final class MemberPeerStub extends Named
     }
 
     @Override
+    public Class<?> getType() {
+        return null;
+    }
+
+    @Override
+    public void setType(Class<?> type) {
+    }
+
+    @Override
     public ObjectSpecification getSpecification(final SpecificationLoader specificationLoader) {
         return null;
     }
@@ -101,23 +114,17 @@ final class MemberPeerStub extends Named
         return getName();
     }
 
-    protected MemberType getMemberType() {
-        return memberType;
-    }
-    
-    @Override
-    public boolean isProperty() {
-        return getMemberType().isProperty();
-    }
-
     @Override
-    public boolean isCollection() {
-        return getMemberType().isCollection();
+    public FeatureType getFeatureType() {
+        return featureType;
     }
 
+    /* (non-Javadoc)
+     * @see org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeer#getChildren()
+     */
     @Override
-    public boolean isAction() {
-        return getMemberType().isAction();
+    public List<TypedHolder> getChildren() {
+        return Collections.emptyList();
     }
 
 }

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmTest.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmTest.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmTest.java Sat Dec 18 16:30:23 2010
@@ -26,6 +26,7 @@ import java.util.List;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
 import org.apache.isis.core.metamodel.consent.Consent;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.Persistability;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
@@ -33,7 +34,6 @@ import org.apache.isis.core.metamodel.te
 import org.apache.isis.core.runtime.persistence.NotPersistableException;
 import org.apache.isis.core.runtime.persistence.adapterfactory.pojo.PojoAdapter;
 import org.apache.isis.core.runtime.persistence.objectstore.algorithm.ToPersistObjectSet;
-import org.apache.isis.core.runtime.persistence.objectstore.algorithm.dflt.DefaultPersistAlgorithm;
 import org.apache.isis.core.runtime.persistence.oidgenerator.simple.SerialOid;
 import org.apache.isis.core.runtime.testspec.OneToOneAssociationTest;
 import org.apache.isis.core.runtime.testsystem.ProxyJunit3TestCase;
@@ -50,10 +50,12 @@ public class DefaultPersistAlgorithmTest
             return persistedObjects;
         }
 
+        @Override
         public void addPersistedObject(final ObjectAdapter object) {
             persistedObjects.add(object);
         }
 
+        @Override
         public void remapAsPersistent(final ObjectAdapter object) {
             object.changeState(ResolveState.RESOLVED);
         }
@@ -76,36 +78,50 @@ public class DefaultPersistAlgorithmTest
         final TestProxySpecification spec = system.getSpecification(object);
         final ObjectAssociation[] fields = new ObjectAssociation[] { new OneToOneAssociationTest() {
 
+            @Override
             public void initAssociation(ObjectAdapter inObject, ObjectAdapter associate) {}
 
+            @Override
             public Consent isAssociationValid(ObjectAdapter inObject, ObjectAdapter associate) {
                 return null;
             }
 
+            @Override
             public void setAssociation(ObjectAdapter inObject, ObjectAdapter associate) {}
 
+            @Override
             public void set(ObjectAdapter owner, ObjectAdapter newValue) {}
 
+            @Override
             public ObjectAdapter get(ObjectAdapter target) {
                 return null;
             }
 
+            @Override
             public ObjectSpecification getSpecification() {
                 return null;
             }
 
+            @Override
             public String debugData() {
                 return null;
             }
 
+            @Override
             public String getId() {
                 return null;
             }
 
+            @Override
             public String getName() {
                 return null;
             }
 
+            @Override
+            public FeatureType getFeatureType() {
+                return FeatureType.PROPERTY;
+            }
+
         } };
         spec.setupFields(fields);
 

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionImplTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionImplTest.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionImplTest.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionImplTest.java Sat Dec 18 16:30:23 2010
@@ -29,13 +29,14 @@ import org.jmock.integration.junit4.JUni
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.actions.invoke.ActionInvocationFacet;
 import org.apache.isis.core.metamodel.facets.naming.named.NamedFacet;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.specloader.internal.ObjectActionImpl;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeer;
 import org.apache.isis.core.progmodel.facets.actions.invoke.ActionInvocationFacetAbstract;
 import org.apache.isis.core.progmodel.facets.naming.named.NamedFacetAbstract;
 import org.apache.isis.core.runtime.testsystem.ProxyJunit3TestCase;
@@ -52,7 +53,7 @@ public class ObjectActionImplTest extend
     private final Mockery mockery = new JUnit4Mockery();
 
     private ObjectActionImpl action;
-    private ObjectActionPeer mockObjectActionPeer;
+    private ObjectMemberPeer mockObjectActionPeer;
     private RuntimeContext mockRuntimeContext;
 
 
@@ -61,7 +62,7 @@ public class ObjectActionImplTest extend
     public void setUp() throws Exception {
         super.setUp();
 
-        mockObjectActionPeer = mockery.mock(ObjectActionPeer.class);
+        mockObjectActionPeer = mockery.mock(ObjectMemberPeer.class);
         mockRuntimeContext = mockery.mock(RuntimeContext.class);
 
         action = new ObjectActionImpl("reduceheadcount", mockObjectActionPeer, mockRuntimeContext);
@@ -75,14 +76,17 @@ public class ObjectActionImplTest extend
 
         final TestProxyAdapter result = new TestProxyAdapter();
         final ActionInvocationFacet facet = new ActionInvocationFacetAbstract(mockObjectActionPeer) {
+            @Override
             public ObjectAdapter invoke(ObjectAdapter target, ObjectAdapter[] parameters) {
                 return result;
             }
 
+            @Override
             public ObjectSpecification getReturnType() {
                 return null;
             }
 
+            @Override
             public ObjectSpecification getOnType() {
                 return new TestSpecification();
             }

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectMemberAbstractTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectMemberAbstractTest.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectMemberAbstractTest.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectMemberAbstractTest.java Sat Dec 18 16:30:23 2010
@@ -41,7 +41,7 @@ import org.apache.isis.core.metamodel.in
 import org.apache.isis.core.metamodel.interactions.VisibilityContext;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 import org.apache.isis.core.metamodel.runtimecontext.noruntime.RuntimeContextNoRuntime;
-import org.apache.isis.core.metamodel.runtimecontext.spec.feature.MemberType;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.runtimecontext.spec.feature.ObjectMemberAbstract;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.identifier.IdentifiedImpl;
@@ -191,11 +191,11 @@ public class ObjectMemberAbstractTest {
 class ObjectMemberAbstractImpl extends ObjectMemberAbstract {
 
     protected ObjectMemberAbstractImpl(final String id) {
-        super(id, new IdentifiedImpl(), MemberType.PROPERTY, new RuntimeContextNoRuntime());
+        super(id, new IdentifiedImpl(), FeatureType.PROPERTY, new RuntimeContextNoRuntime());
     }
 
     protected ObjectMemberAbstractImpl(final String id, final RuntimeContext runtimeContext) {
-        super(id, new IdentifiedImpl(), MemberType.PROPERTY, runtimeContext);
+        super(id, new IdentifiedImpl(), FeatureType.PROPERTY, runtimeContext);
     }
 
 

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/OneToManyAssociationImplTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/OneToManyAssociationImplTest.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/OneToManyAssociationImplTest.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/OneToManyAssociationImplTest.java Sat Dec 18 16:30:23 2010
@@ -25,7 +25,7 @@ import org.apache.isis.core.metamodel.ru
 import org.apache.isis.core.metamodel.runtimecontext.noruntime.RuntimeContextNoRuntime;
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
 import org.apache.isis.core.metamodel.specloader.internal.OneToManyAssociationImpl;
-import org.apache.isis.core.runtime.system.specpeer.DummyOneToManyPeer;
+import org.apache.isis.core.runtime.system.specpeer.DummyCollectionPeer;
 import org.apache.isis.core.runtime.testsystem.ProxyJunit3TestCase;
 
 
@@ -38,7 +38,7 @@ public class OneToManyAssociationImplTes
 //    private ObjectAdapter associate;
     private OneToManyAssociation association;
 //    private TestSpecification type;
-    private DummyOneToManyPeer associationDelegate;
+    private DummyCollectionPeer associationDelegate;
 	private RuntimeContext runtimeContext;
 
     @Override
@@ -49,7 +49,7 @@ public class OneToManyAssociationImplTes
 //        associate = system.createPersistentTestObject();
         runtimeContext = new RuntimeContextNoRuntime();
 
-        associationDelegate = new DummyOneToManyPeer(system.getSpecification(String.class));
+        associationDelegate = new DummyCollectionPeer(system.getSpecification(String.class));
         association = new OneToManyAssociationImpl(associationDelegate, runtimeContext);
     }
 

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyActionParamPeer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyActionParamPeer.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyActionParamPeer.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyActionParamPeer.java Sat Dec 18 16:30:23 2010
@@ -21,14 +21,31 @@
 package org.apache.isis.core.runtime.system.specpeer;
 
 import org.apache.isis.core.metamodel.facets.FacetHolderImpl;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionParamPeer;
+import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 
 
-public class DummyActionParamPeer extends FacetHolderImpl implements ObjectActionParamPeer {
+public class DummyActionParamPeer extends FacetHolderImpl implements TypedHolder {
 
-    public ObjectSpecification getSpecification() {
+    @Override
+    public ObjectSpecification getSpecification(SpecificationLoader specificationLoader) {
         return null;
+    }
+
+    @Override
+    public Class<?> getType() {
+        return null;
+    }
+
+    @Override
+    public void setType(Class<?> type) {
+    }
+
+    @Override
+    public FeatureType getFeatureType() {
+        return FeatureType.ACTION_PARAMETER;
     }
 
 }

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyActionPeer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyActionPeer.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyActionPeer.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyActionPeer.java Sat Dec 18 16:30:23 2010
@@ -20,6 +20,9 @@
 
 package org.apache.isis.core.runtime.system.specpeer;
 
+import java.util.Arrays;
+import java.util.List;
+
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -27,18 +30,17 @@ import org.apache.isis.core.metamodel.au
 import org.apache.isis.core.metamodel.consent.Allow;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.facets.FacetHolderImpl;
-import org.apache.isis.core.metamodel.runtimecontext.spec.feature.MemberType;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.Target;
-import org.apache.isis.core.metamodel.spec.feature.ObjectActionType;
 import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionParamPeer;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 import org.apache.isis.core.runtime.testsystem.TestSpecification;
 
 
 
-public final class DummyActionPeer extends FacetHolderImpl implements ObjectActionPeer {
+public final class DummyActionPeer extends FacetHolderImpl implements ObjectMemberPeer {
 
     private final ExpectedSet expectedActions = new ExpectedSet();
     private String name;
@@ -116,10 +118,15 @@ public final class DummyActionPeer exten
         return null;
     }
 
-    public ObjectActionType getType() {
+    @Override
+    public Class<?> getType() {
         return null;
     }
 
+    @Override
+    public void setType(Class<?> type) {
+    }
+
     public boolean isVisibleDeclaratively() {
         return true;
     }
@@ -189,9 +196,9 @@ public final class DummyActionPeer exten
     }
 
     @Override
-    public ObjectActionParamPeer[] getParameters() {
-        return new ObjectActionParamPeer[] { new DummyActionParamPeer(), new DummyActionParamPeer(),
-                new DummyActionParamPeer(), };
+    public List<TypedHolder> getChildren() {
+        return Arrays.asList( (TypedHolder)new DummyActionParamPeer(), new DummyActionParamPeer(),
+                new DummyActionParamPeer() );
     }
 
     @Override
@@ -199,22 +206,9 @@ public final class DummyActionPeer exten
         return null;
     }
 
-    protected MemberType getMemberType() {
-        return MemberType.ACTION;
-    }
-
-    @Override
-    public boolean isProperty() {
-        return getMemberType().isProperty();
-    }
-
     @Override
-    public boolean isCollection() {
-        return getMemberType().isCollection();
+    public FeatureType getFeatureType() {
+        return FeatureType.ACTION;
     }
 
-    @Override
-    public boolean isAction() {
-        return getMemberType().isAction();
-    }
 }

Copied: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyCollectionPeer.java (from r1050630, incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyOneToManyPeer.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyCollectionPeer.java?p2=incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyCollectionPeer.java&p1=incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyOneToManyPeer.java&r1=1050630&r2=1050661&rev=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyOneToManyPeer.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyCollectionPeer.java Sat Dec 18 16:30:23 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.core.runtime.system.specpeer;
 
+import java.util.Collections;
+import java.util.List;
 import java.util.Vector;
 
 import junit.framework.Assert;
@@ -28,14 +30,15 @@ import org.apache.isis.applib.Identifier
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.FacetHolderImpl;
-import org.apache.isis.core.metamodel.runtimecontext.spec.feature.MemberType;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
 import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 import org.apache.isis.core.metamodel.testspec.TestProxySpecification;
 
 
-public class DummyOneToManyPeer extends FacetHolderImpl implements ObjectMemberPeer {
+public class DummyCollectionPeer extends FacetHolderImpl implements ObjectMemberPeer {
 
     Vector<String> actions = new Vector<String>();
     private final ExpectedSet expectedActions = new ExpectedSet();
@@ -45,7 +48,7 @@ public class DummyOneToManyPeer extends 
     // String name;
     private final TestProxySpecification specification;
 
-    public DummyOneToManyPeer(final TestProxySpecification specification) {
+    public DummyCollectionPeer(final TestProxySpecification specification) {
         this.specification = specification;
     }
 
@@ -81,6 +84,16 @@ public class DummyOneToManyPeer extends 
         return Identifier.classIdentifier("SomeClassName");
     }
 
+
+    @Override
+    public Class<?> getType() {
+        return null;
+    }
+
+    @Override
+    public void setType(Class<?> type) {
+    }
+
     @Override
     public ObjectSpecification getSpecification(final SpecificationLoader specificationLoader) {
         return specification;
@@ -104,23 +117,14 @@ public class DummyOneToManyPeer extends 
         expectedActions.verify();
     }
 
-    protected MemberType getMemberType() {
-        return MemberType.COLLECTION;
-    }
-
-    @Override
-    public boolean isProperty() {
-        return getMemberType().isProperty();
-    }
-
     @Override
-    public boolean isCollection() {
-        return getMemberType().isCollection();
+    public FeatureType getFeatureType() {
+        return FeatureType.COLLECTION;
     }
 
     @Override
-    public boolean isAction() {
-        return getMemberType().isAction();
+    public List<TypedHolder> getChildren() {
+        return Collections.emptyList();
     }
 
 }

Copied: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyPropertyPeer.java (from r1050630, incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyOneToOnePeer.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyPropertyPeer.java?p2=incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyPropertyPeer.java&p1=incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyOneToOnePeer.java&r1=1050630&r2=1050661&rev=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyOneToOnePeer.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyPropertyPeer.java Sat Dec 18 16:30:23 2010
@@ -20,20 +20,23 @@
 
 package org.apache.isis.core.runtime.system.specpeer;
 
+import java.util.Collections;
+import java.util.List;
 import java.util.Vector;
 
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.FacetHolderImpl;
-import org.apache.isis.core.metamodel.runtimecontext.spec.feature.MemberType;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
 import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 
 
 @SuppressWarnings("unchecked")
-public class DummyOneToOnePeer extends FacetHolderImpl implements ObjectMemberPeer {
+public class DummyPropertyPeer extends FacetHolderImpl implements ObjectMemberPeer {
 	
     private final ExpectedSet expectedActions = new ExpectedSet();
     Vector actions = new Vector();
@@ -61,6 +64,15 @@ public class DummyOneToOnePeer extends F
     }
 
     @Override
+    public Class<?> getType() {
+        return null;
+    }
+
+    @Override
+    public void setType(Class<?> type) {
+    }
+
+    @Override
     public ObjectSpecification getSpecification(final SpecificationLoader specificationLoader) {
         return null;
     }
@@ -84,23 +96,14 @@ public class DummyOneToOnePeer extends F
     @Override
     public void debugData(final DebugString debugString) {}
 
-    protected MemberType getMemberType() {
-        return MemberType.PROPERTY;
-    }
-
-    @Override
-    public boolean isProperty() {
-        return getMemberType().isProperty();
-    }
-
     @Override
-    public boolean isCollection() {
-        return getMemberType().isCollection();
+    public FeatureType getFeatureType() {
+        return FeatureType.PROPERTY;
     }
 
     @Override
-    public boolean isAction() {
-        return getMemberType().isAction();
+    public List<TypedHolder> getChildren() {
+        return Collections.emptyList();
     }
 
 }

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java Sat Dec 18 16:30:23 2010
@@ -26,6 +26,7 @@ import org.apache.isis.core.metamodel.co
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
 import org.apache.isis.core.metamodel.interactions.InteractionContext;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionType;
@@ -45,10 +46,12 @@ class MovieDirectorField extends OneToOn
         getMovie(inObject).setDirector(null);
     }
 
+    @Override
     public String debugData() {
         return "";
     }
 
+    @Override
     public ObjectAdapter get(final ObjectAdapter fromObject) {
         final Person director = getMovie(fromObject).getDirector();
         if (director == null) {
@@ -58,6 +61,7 @@ class MovieDirectorField extends OneToOn
         }
     }
 
+    @Override
     public String getId() {
         return "director";
     }
@@ -66,45 +70,64 @@ class MovieDirectorField extends OneToOn
         return (Movie) inObject.getObject();
     }
 
+    @Override
     public String getName() {
         return "Director";
     }
 
+    @Override
     public ObjectSpecification getSpecification() {
         return IsisContext.getSpecificationLoader().loadSpecification(Person.class);
     }
 
+    @Override
     public void initAssociation(final ObjectAdapter inObject, final ObjectAdapter associate) {
         getMovie(inObject).setDirector(associate == null ? null : (Person) associate.getObject());
     }
 
+    @Override
     public Consent isAssociationValid(final ObjectAdapter inObject, final ObjectAdapter associate) {
         return Allow.DEFAULT;
     }
 
+    @Override
     public void setAssociation(final ObjectAdapter inObject, final ObjectAdapter associate) {
         getMovie(inObject).setDirector((Person) associate.getObject());
     }
 
+    @Override
     public void set(ObjectAdapter owner, ObjectAdapter newValue) {
         setAssociation(owner, newValue);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.isis.core.metamodel.spec.feature.ObjectFeature#getFeatureType()
+     */
+    @Override
+    public FeatureType getFeatureType() {
+        // TODO Auto-generated method stub
+        return null;
     }
 
 }
 
 class MovieNameField extends ValueFieldTest {
     
+    @Override
     public boolean isOneToManyAssociation() {
         return false;
     }
+    @Override
     public void clearAssociation(final ObjectAdapter inObject) {
         getMovie(inObject).setName("");
     }
 
+    @Override
     public String debugData() {
         return "";
     }
 
+    @Override
     public ObjectAdapter get(final ObjectAdapter fromObject) {
         final TestProxyAdapter adapter = new TestProxyAdapter();
         final String object = getMovie(fromObject).getName();
@@ -112,6 +135,7 @@ class MovieNameField extends ValueFieldT
         return adapter;
     }
 
+    @Override
     public String getId() {
         return "name";
     }
@@ -120,28 +144,39 @@ class MovieNameField extends ValueFieldT
         return (Movie) inObject.getObject();
     }
 
+    @Override
     public String getName() {
         return "Name";
     }
 
+    @Override
     public ObjectSpecification getSpecification() {
         return new TestProxySpecification("java.lang.String");
     }
 
+    @Override
     public void initAssociation(final ObjectAdapter inObject, final ObjectAdapter association) {
         getMovie(inObject).setName((String) association.getObject());
     }
 
+    @Override
     public Consent isAssociationValid(final ObjectAdapter inObject, final ObjectAdapter association) {
         return Allow.DEFAULT;
     }
 
+    @Override
     public void setAssociation(final ObjectAdapter inObject, final ObjectAdapter association) {
         getMovie(inObject).setName((String) association.getObject());
     }
 
+    @Override
     public void set(ObjectAdapter owner, ObjectAdapter newValue) {
         setAssociation(owner, newValue);
+    }
+
+    @Override
+    public FeatureType getFeatureType() {
+        return FeatureType.PROPERTY;
     }
 
 }

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/OneToOneAssociationTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/OneToOneAssociationTest.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/OneToOneAssociationTest.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/OneToOneAssociationTest.java Sat Dec 18 16:30:23 2010
@@ -153,7 +153,7 @@ public abstract class OneToOneAssociatio
         return false;
     }
 
-    public boolean isAssociation() {
+    public boolean isPropertyOrCollection() {
         return true;
     }
 

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java Sat Dec 18 16:30:23 2010
@@ -23,6 +23,7 @@ package org.apache.isis.core.runtime.tes
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Allow;
 import org.apache.isis.core.metamodel.consent.Consent;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionType;
@@ -36,24 +37,29 @@ import org.apache.isis.core.testsupport.
 
 class PersonNameField extends ValueFieldTest {
 
+    @Override
     public void clearAssociation(final ObjectAdapter inObject) {
         getPerson(inObject).setName("");
     }
 
+    @Override
     public String debugData() {
         return "";
     }
 
+    @Override
     public ObjectAdapter get(final ObjectAdapter fromObject) {
         final TestProxyAdapter adapter = new TestProxyAdapter();
         adapter.setupObject(getPerson(fromObject).getName());
         return adapter;
     }
 
+    @Override
     public String getId() {
         return "name";
     }
 
+    @Override
     public String getName() {
         return "Name";
     }
@@ -62,24 +68,34 @@ class PersonNameField extends ValueField
         return (Person) inObject.getObject();
     }
 
+    @Override
     public ObjectSpecification getSpecification() {
         return new TestSpecification("java.lang.String");
     }
 
+    @Override
     public void initAssociation(final ObjectAdapter inObject, final ObjectAdapter association) {
         getPerson(inObject).setName((String) association.getObject());
     }
 
+    @Override
     public Consent isAssociationValid(final ObjectAdapter inObject, final ObjectAdapter association) {
         return Allow.DEFAULT;
     }
 
+    @Override
     public void setAssociation(final ObjectAdapter inObject, final ObjectAdapter association) {
         getPerson(inObject).setName((String) association.getObject());
     }
 
+    @Override
     public void set(ObjectAdapter owner, ObjectAdapter newValue) {
         setAssociation(owner, newValue);
+    }
+
+    @Override
+    public FeatureType getFeatureType() {
+        return FeatureType.PROPERTY;
     }
 
 }

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/ValueFieldTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/ValueFieldTest.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/ValueFieldTest.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/ValueFieldTest.java Sat Dec 18 16:30:23 2010
@@ -185,7 +185,7 @@ public abstract class ValueFieldTest ext
         return false;
     }
 
-    public boolean isAssociation() {
+    public boolean isPropertyOrCollection() {
         return true;
     }
 

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/ObjectAssociationNoop.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/ObjectAssociationNoop.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/ObjectAssociationNoop.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/ObjectAssociationNoop.java Sat Dec 18 16:30:23 2010
@@ -28,7 +28,7 @@ import org.apache.isis.core.metamodel.co
 import org.apache.isis.core.metamodel.interactions.UsabilityContext;
 import org.apache.isis.core.metamodel.interactions.VisibilityContext;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
-import org.apache.isis.core.metamodel.runtimecontext.spec.feature.MemberType;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.runtimecontext.spec.feature.ObjectAssociationAbstract;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.identifier.IdentifiedImpl;
@@ -40,7 +40,7 @@ public class ObjectAssociationNoop exten
     		final String name, 
     		final ObjectSpecification spec, 
     		final RuntimeContext runtimeContext) {
-        super(name, spec, MemberType.PROPERTY, new IdentifiedImpl(), runtimeContext);
+        super(name, spec, FeatureType.PROPERTY, new IdentifiedImpl(), runtimeContext);
     }
 
     public String debugData() {



Mime
View raw message