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 [1/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
Author: danhaywood
Date: Sat Dec 18 16:30:23 2010
New Revision: 1050661

URL: http://svn.apache.org/viewvc?rev=1050661&view=rev
Log:
more on simplifying the MemberPeer hierarchy (down to a single interface/class); also more on replacing arrays with lists in APIs (ISISIS-59, ISIS-58)

Added:
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/FeatureType.java
      - copied, changed from r1050630, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/MemberType.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/ObjectMemberPeerImpl.java
      - copied, changed from r1050630, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/JavaObjectMemberPeer.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/TypedHolder.java
      - copied, changed from r1050630, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/FacetHolderAndSpec.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/TypedHolderImpl.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyCollectionPeer.java
      - copied, changed from r1050630, incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyOneToManyPeer.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyPropertyPeer.java
      - copied, changed from r1050630, incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyOneToOnePeer.java
Removed:
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/MemberType.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/FacetHolderAndSpec.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/JavaObjectActionParamPeer.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/JavaObjectActionPeer.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/JavaObjectAssociationPeer.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/JavaObjectMemberPeer.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/ObjectActionParamPeer.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/ObjectActionPeer.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyOneToManyPeer.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyOneToOnePeer.java
Modified:
    incubator/isis/trunk/alternatives/remoting/common/src/test/java/org/apache/isis/alternatives/remoting/common/client/facets/ProxyAction_ExecuteRemotelyTest.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectActionSet.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectAssociationAbstract.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectMemberAbstract.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFilters.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectFeature.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionImpl.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionParameterAbstract.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionParameterParseable.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToManyAssociationImpl.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToOneActionParameterImpl.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToOneAssociationImpl.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/ObjectMemberPeer.java
    incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ObjectActionNoop.java
    incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectAssociationAbstractTest.java
    incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/FallbackFacetFactory.java
    incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/ActionMethodsFacetFactory.java
    incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetAbstract.java
    incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetNone.java
    incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/actions/choices/ActionParameterChoicesFacetViaMethod.java
    incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/CollectionFieldMethodsFacetFactory.java
    incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/propparam/enums/ActionParameterChoicesFacetDerivedFromChoicesFacet.java
    incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/propparam/enums/PropertyAndParameterChoicesFacetDerivedFromChoicesFacetFacetFactory.java
    incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/spec/JavaSpecification.java
    incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/specloader/internal/introspector/JavaIntrospector.java
    incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/actions/ActionMethodsFacetFactoryTest.java
    incubator/isis/trunk/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/ordering/memberorder/MemberPeerStub.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/persistence/objectstore/algorithm/dflt/DefaultPersistAlgorithmTest.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectActionImplTest.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/ObjectMemberAbstractTest.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/OneToManyAssociationImplTest.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyActionParamPeer.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/system/specpeer/DummyActionPeer.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/OneToOneAssociationTest.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/ValueFieldTest.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/ObjectAssociationNoop.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestProxyAction.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestProxyAssociation.java
    incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestProxyField.java

Modified: incubator/isis/trunk/alternatives/remoting/common/src/test/java/org/apache/isis/alternatives/remoting/common/client/facets/ProxyAction_ExecuteRemotelyTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/alternatives/remoting/common/src/test/java/org/apache/isis/alternatives/remoting/common/client/facets/ProxyAction_ExecuteRemotelyTest.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/alternatives/remoting/common/src/test/java/org/apache/isis/alternatives/remoting/common/client/facets/ProxyAction_ExecuteRemotelyTest.java (original)
+++ incubator/isis/trunk/alternatives/remoting/common/src/test/java/org/apache/isis/alternatives/remoting/common/client/facets/ProxyAction_ExecuteRemotelyTest.java Sat Dec 18 16:30:23 2010
@@ -27,7 +27,13 @@ import static org.junit.Assert.assertEqu
 
 import java.util.List;
 
-import org.apache.isis.alternatives.remoting.common.client.facets.ActionInvocationFacetWrapProxy;
+import org.apache.log4j.BasicConfigurator;
+import org.apache.log4j.Level;
+import org.apache.log4j.LogManager;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
 import org.apache.isis.alternatives.remoting.common.data.Data;
 import org.apache.isis.alternatives.remoting.common.data.DummyNullValue;
 import org.apache.isis.alternatives.remoting.common.data.DummyReferenceData;
@@ -39,22 +45,16 @@ import org.apache.isis.alternatives.remo
 import org.apache.isis.alternatives.remoting.common.protocol.ObjectEncoderDecoder;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionType;
-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.runtime.context.IsisContext;
 import org.apache.isis.core.runtime.testsystem.TestProxySystem;
-import org.apache.log4j.BasicConfigurator;
-import org.apache.log4j.Level;
-import org.apache.log4j.LogManager;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
 
 public class ProxyAction_ExecuteRemotelyTest {
 
     //private Mockery mockery = new JUnit4Mockery();
 
     private ActionInvocationFacetWrapProxy proxy;
-    private ObjectActionPeer mockObjectActionPeer;
+    private ObjectMemberPeer mockObjectActionPeer;
     private ObjectEncoderDecoder mockEncoder;
     private ServerFacade mockDistribution;
     private ObjectAdapter target;

Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/FeatureType.java (from r1050630, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/MemberType.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/FeatureType.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/FeatureType.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/MemberType.java&r1=1050630&r2=1050661&rev=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/MemberType.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/FeatureType.java Sat Dec 18 16:30:23 2010
@@ -3,20 +3,30 @@ package org.apache.isis.core.metamodel.r
 /**
  * powertype for subclasses.
  */
-public enum MemberType {
+public enum FeatureType {
     PROPERTY,
     COLLECTION,
-    ACTION;
-    public boolean isAction() {
-        return this == ACTION;
-    }
-    public boolean isAssociation() {
-        return !isAction();
+    ACTION,
+    ACTION_PARAMETER;
+    
+    public boolean isProperty() {
+        return this == PROPERTY;
     }
     public boolean isCollection() {
         return this == COLLECTION;
     }
-    public boolean isProperty() {
-        return this == PROPERTY;
+    public boolean isAction() {
+        return this == ACTION;
+    }
+    public boolean isActionParameter() {
+        return this == ACTION_PARAMETER;
+    }
+
+    /**
+     * Convenience.
+     */
+    public boolean isPropertyOrCollection() {
+        return isProperty() || isCollection();
     }
+
 }
\ No newline at end of file

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectActionSet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectActionSet.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectActionSet.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectActionSet.java Sat Dec 18 16:30:23 2010
@@ -20,9 +20,9 @@
 
 package org.apache.isis.core.metamodel.runtimecontext.spec.feature;
 
-import java.util.List;
-
-import org.apache.isis.applib.Identifier;
+import java.util.List;
+
+import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.commons.exceptions.UnexpectedCallException;
 import org.apache.isis.core.commons.filters.Filter;
 import org.apache.isis.core.metamodel.adapter.Instance;
@@ -69,55 +69,72 @@ public class ObjectActionSet implements 
     		final RuntimeContext runtimeContext) {
         this(id, name, actions.toArray(new ObjectAction[]{}), runtimeContext);
     }
-
+
+    @Override
+    public String getId() {
+        return id;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public FeatureType getFeatureType() {
+        return FeatureType.ACTION;
+    }
+    
     // /////////////////////////////////////////////////////////////
     // description, actions
-    // /////////////////////////////////////////////////////////////
+    // /////////////////////////////////////////////////////////////
 
+    @Override
     public ObjectAction[] getActions() {
         return actions;
     }
 
+    @Override
     public String getDescription() {
         return "";
     }
 
+    @Override
     public Identifier getIdentifier() {
         return null;
     }
 
+    @Override
     public String getHelp() {
         return "";
     }
 
-    public String getId() {
-        return id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
+    @Override
     public ObjectSpecification getOnType() {
         return null;
     }
 
+    @Override
     public ObjectSpecification getReturnType() {
         return null;
     }
 
+    @Override
     public Target getTarget() {
         return Target.DEFAULT;
     }
 
+    @Override
     public ObjectActionType getType() {
         return ObjectActionType.SET;
     }
 
+    @Override
     public boolean hasReturn() {
         return false;
     }
 
+    @Override
     public boolean isContributed() {
         return false;
     }
@@ -125,6 +142,7 @@ public class ObjectActionSet implements 
     /**
      * Always returns <tt>null</tt>.
      */
+    @Override
     public ObjectSpecification getSpecification() {
         return null;
     }
@@ -133,6 +151,7 @@ public class ObjectActionSet implements 
     // target
     // /////////////////////////////////////////////////////////////
 
+    @Override
     public ObjectAdapter realTarget(final ObjectAdapter target) {
         return null;
     }
@@ -141,6 +160,7 @@ public class ObjectActionSet implements 
     // execute
     // /////////////////////////////////////////////////////////////
 
+    @Override
     public ObjectAdapter execute(final ObjectAdapter target, final ObjectAdapter[] parameters) {
         throw new UnexpectedCallException();
     }
@@ -152,6 +172,7 @@ public class ObjectActionSet implements 
     /**
      * Does nothing
      */
+    @Override
     public <T extends Facet> T getFacet(final Class<T> cls) {
         return null;
     }
@@ -159,6 +180,7 @@ public class ObjectActionSet implements 
     /**
      * Does nothing
      */
+    @Override
     public Class<? extends Facet>[] getFacetTypes() {
         return new Class[0];
     }
@@ -166,6 +188,7 @@ public class ObjectActionSet implements 
     /**
      * Does nothing
      */
+    @Override
     public Facet[] getFacets(final Filter<Facet> filter) {
         return new Facet[0];
     }
@@ -173,21 +196,25 @@ public class ObjectActionSet implements 
     /**
      * Does nothing
      */
+    @Override
     public void addFacet(final Facet facet) {}
 
     /**
      * Does nothing
      */
+    @Override
     public void addFacet(final MultiTypedFacet facet) {}
 
     /**
      * Does nothing
      */
+    @Override
     public void removeFacet(final Facet facet) {}
 
     /**
      * Does nothing
      */
+    @Override
     public boolean containsFacet(final Class<? extends Facet> facetType) {
         return false;
     }
@@ -195,29 +222,35 @@ public class ObjectActionSet implements 
     /**
      * Does nothing
      */
+    @Override
     public void removeFacet(final Class<? extends Facet> facetType) {}
 
     // /////////////////////////////////////////////////////////////
     // parameters
     // /////////////////////////////////////////////////////////////
 
+    @Override
     public int getParameterCount() {
         return 0;
     }
 
+    @Override
     public ObjectActionParameter[] getParameters() {
         return new ObjectActionParameter[0];
     }
 
+    @Override
     public ObjectSpecification[] getParameterTypes() {
         return new ObjectSpecification[0];
     }
 
 
+    @Override
     public ObjectActionParameter[] getParameters(final Filter<ObjectActionParameter> filter) {
         return new ObjectActionParameter[0];
     }
 
+    @Override
     public boolean promptForParameters(final ObjectAdapter target) {
         return false;
     }
@@ -226,6 +259,7 @@ public class ObjectActionSet implements 
     // visibility
     // /////////////////////////////////////////////////////////////
 
+    @Override
     public boolean isAlwaysHidden() {
         return false;
     }
@@ -233,6 +267,7 @@ public class ObjectActionSet implements 
     /**
      * Does nothing, but shouldn't be called.
      */
+    @Override
     public VisibilityContext<?> createVisibleInteractionContext(
             final AuthenticationSession session,
             final InteractionInvocationMethod invocationMethod,
@@ -240,6 +275,7 @@ public class ObjectActionSet implements 
         return null;
     }
 
+    @Override
     public Consent isVisible(final AuthenticationSession session, final ObjectAdapter target) {
         return Allow.DEFAULT;
     }
@@ -248,6 +284,7 @@ public class ObjectActionSet implements 
     // usability
     // /////////////////////////////////////////////////////////////
 
+    @Override
     public UsabilityContext<?> createUsableInteractionContext(
             final AuthenticationSession session,
             final InteractionInvocationMethod invocationMethod,
@@ -255,6 +292,7 @@ public class ObjectActionSet implements 
         return null;
     }
 
+    @Override
     public Consent isUsable(final AuthenticationSession session, final ObjectAdapter target) {
         return Allow.DEFAULT;
     }
@@ -263,6 +301,7 @@ public class ObjectActionSet implements 
     // validity
     // /////////////////////////////////////////////////////////////
 
+    @Override
     public ActionInvocationContext createActionInvocationInteractionContext(
             final AuthenticationSession session,
             final InteractionInvocationMethod invocationMethod,
@@ -271,6 +310,7 @@ public class ObjectActionSet implements 
         return null;
     }
 
+    @Override
     public Consent isProposedArgumentSetValid(final ObjectAdapter object, final ObjectAdapter[] parameters) {
         throw new UnexpectedCallException();
     }
@@ -279,6 +319,7 @@ public class ObjectActionSet implements 
     // defaults
     // /////////////////////////////////////////////////////////////
 
+    @Override
     public ObjectAdapter[] getDefaults(final ObjectAdapter target) {
         throw new UnexpectedCallException();
     }
@@ -287,6 +328,7 @@ public class ObjectActionSet implements 
     // options
     // /////////////////////////////////////////////////////////////
 
+    @Override
     public ObjectAdapter[][] getChoices(final ObjectAdapter target) {
         throw new UnexpectedCallException();
     }
@@ -296,16 +338,20 @@ public class ObjectActionSet implements 
     // isAction, isAssociation
     // /////////////////////////////////////////////////////////////
 
+    @Override
     public boolean isAction() {
         return true;
     }
 
-    public boolean isAssociation() {
+    @Override
+    public boolean isPropertyOrCollection() {
         return false;
     }
+    @Override
     public boolean isOneToManyAssociation() {
         return false;
     }
+    @Override
     public boolean isOneToOneAssociation() {
         return false;
     }
@@ -315,6 +361,7 @@ public class ObjectActionSet implements 
     // debug
     // /////////////////////////////////////////////////////////////
 
+    @Override
     public String debugData() {
         return "";
     }
@@ -324,6 +371,7 @@ public class ObjectActionSet implements 
     // getInstance
     // /////////////////////////////////////////////////////////////
     
+    @Override
     public Instance getInstance(ObjectAdapter adapter) {
         ObjectAction specification = this;
         return adapter.getInstance(specification);
@@ -336,6 +384,7 @@ public class ObjectActionSet implements 
 
 	public RuntimeContext getRuntimeContext() {
 		return runtimeContext;
-	}
+	}
+
 
 }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectAssociationAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectAssociationAbstract.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectAssociationAbstract.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectAssociationAbstract.java Sat Dec 18 16:30:23 2010
@@ -33,12 +33,13 @@ import org.apache.isis.core.metamodel.sp
 
 // TODO need to pull up the common methods. like getName(), from subclasses
 public abstract class ObjectAssociationAbstract extends ObjectMemberAbstract implements ObjectAssociation {
+    
     private final ObjectSpecification specification;
 
     public ObjectAssociationAbstract(
             final String associationId,
             final ObjectSpecification specification,
-            final MemberType memberType,
+            final FeatureType memberType,
             final Identified facetHolder, 
             final RuntimeContext runtimeContext) {
         super(associationId, facetHolder, memberType, runtimeContext);
@@ -48,6 +49,7 @@ public abstract class ObjectAssociationA
         this.specification = specification;
     }
 
+    @Override
     public abstract ObjectAdapter get(final ObjectAdapter fromObject);
 
     /**
@@ -55,29 +57,36 @@ public abstract class ObjectAssociationA
      * reference this will be type that the accessor returns. For a collection it will be the type of element,
      * not the type of collection.
      */
+    @Override
     public ObjectSpecification getSpecification() {
         return specification;
     }
 
+    @Override
     public boolean isNotPersisted() {
         return containsFacet(NotPersistedFacet.class);
     }
     
+    @Override
     public boolean hasChoices() {
         return containsFacet(PropertyChoicesFacet.class);
     }
 
+    @Override
     public boolean isMandatory() {
     	final MandatoryFacet mandatoryFacet = getFacet(MandatoryFacet.class);
     	return mandatoryFacet != null && !mandatoryFacet.isInvertedSemantics();
     }
     
+    @Override
     public abstract boolean isEmpty(final ObjectAdapter adapter);
 
+    @Override
     public boolean isOneToOneAssociation() {
         return !isOneToManyAssociation();
     }
 
+    @Override
     public String getBusinessKeyName() {
         throw new NotYetImplementedException();
     }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectMemberAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectMemberAbstract.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectMemberAbstract.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectMemberAbstract.java Sat Dec 18 16:30:23 2010
@@ -50,13 +50,13 @@ public abstract class ObjectMemberAbstra
     protected final String defaultName;
     private final String id;
     private final Identified facetHolder;
-    private final MemberType memberType;
+    private final FeatureType featureType;
 	private RuntimeContext runtimeContext;
 
     protected ObjectMemberAbstract(
     		final String id, 
     		final Identified facetHolder, 
-    		final MemberType memberType, 
+    		final FeatureType memberType, 
     		final RuntimeContext runtimeContext) {
         if (id == null) {
             throw new IllegalArgumentException("Name must always be set");
@@ -64,10 +64,11 @@ public abstract class ObjectMemberAbstra
         this.id = id;
         this.defaultName = NameUtils.naturalName(id);
         this.facetHolder = facetHolder;
-        this.memberType = memberType;
+        this.featureType = memberType;
         this.runtimeContext = runtimeContext;
     }
 
+
     // /////////////////////////////////////////////////////////////
     // Identifiers
     // /////////////////////////////////////////////////////////////
@@ -82,11 +83,13 @@ public abstract class ObjectMemberAbstra
         return facetHolder.getIdentifier();
     }
 
-    protected SpecificationLoader getSpecificationLoader() {
-        return runtimeContext.getSpecificationLoader();
+    @Override
+    public FeatureType getFeatureType() {
+        return featureType;
     }
+    
 
-
+    
     // /////////////////////////////////////////////////////////////
     // Facets
     // /////////////////////////////////////////////////////////////
@@ -217,22 +220,22 @@ public abstract class ObjectMemberAbstra
 
     @Override
     public boolean isAction() {
-        return memberType.isAction();
+        return featureType.isAction();
     }
 
     @Override
-    public boolean isAssociation() {
-        return memberType.isAssociation();
+    public boolean isPropertyOrCollection() {
+        return featureType.isPropertyOrCollection();
     }
 
     @Override
     public boolean isOneToManyAssociation() {
-        return memberType.isCollection();
+        return featureType.isCollection();
     }
 
     @Override
     public boolean isOneToOneAssociation() {
-        return memberType.isProperty();
+        return featureType.isProperty();
     }
 
 
@@ -257,6 +260,10 @@ public abstract class ObjectMemberAbstra
         return getRuntimeContext().getAuthenticationSession();
     }
 
+    protected SpecificationLoader getSpecificationLoader() {
+        return getRuntimeContext().getSpecificationLoader();
+    }
+
     
 
 }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFilters.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFilters.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFilters.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFilters.java Sat Dec 18 16:30:23 2010
@@ -36,8 +36,8 @@ public class ObjectAssociationFilters {
      */
     public final static Filter<ObjectAssociation> PROPERTIES = new AbstractFilter<ObjectAssociation>() {
         @Override
-        public boolean accept(final ObjectAssociation property) {
-            return property.isOneToOneAssociation();
+        public boolean accept(final ObjectAssociation association) {
+            return association.isOneToOneAssociation();
         }
     };
 

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectFeature.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectFeature.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectFeature.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectFeature.java Sat Dec 18 16:30:23 2010
@@ -20,6 +20,7 @@
 
 package org.apache.isis.core.metamodel.spec.feature;
 
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.spec.NamedAndDescribed;
 import org.apache.isis.core.metamodel.spec.TypedSpecification;
 
@@ -29,6 +30,7 @@ import org.apache.isis.core.metamodel.sp
  * 
  */
 public interface ObjectFeature extends TypedSpecification, NamedAndDescribed {
-
+
+    FeatureType getFeatureType();
 
 }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java Sat Dec 18 16:30:23 2010
@@ -129,7 +129,7 @@ public interface ObjectMember extends Ob
      * <p>
      * If so, can be safely downcast to {@link ObjectAssociation}.
      */
-    boolean isAssociation();
+    boolean isPropertyOrCollection();
 
     /**
      * Whether this member represents a {@link OneToManyAssociation}.

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionImpl.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionImpl.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionImpl.java Sat Dec 18 16:30:23 2010
@@ -23,6 +23,8 @@ package org.apache.isis.core.metamodel.s
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.log4j.Logger;
+
 import org.apache.isis.applib.query.QueryFindAllInstances;
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.commons.exceptions.IsisException;
@@ -50,7 +52,7 @@ import org.apache.isis.core.metamodel.in
 import org.apache.isis.core.metamodel.interactions.ValidityContext;
 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.ObjectMemberAbstract;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationFacets;
@@ -58,9 +60,8 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionType;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionParamPeer;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionPeer;
-import org.apache.log4j.Logger;
+import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 
 
 public class ObjectActionImpl extends ObjectMemberAbstract implements ObjectAction {
@@ -74,7 +75,7 @@ public class ObjectActionImpl extends Ob
     	return type;
     }
 
-    private final ObjectActionPeer objectActionPeer;
+    private final ObjectMemberPeer memberPeer;
     /**
      * Lazily initialized by {@link #getParameters()} (so don't use directly!)
      */
@@ -97,10 +98,10 @@ public class ObjectActionImpl extends Ob
 
     public ObjectActionImpl(
     		final String methodId, 
-    		final ObjectActionPeer objectActionPeer, 
+    		final ObjectMemberPeer memberPeer, 
     		final RuntimeContext runtimeContext) {
-        super(methodId, objectActionPeer, MemberType.ACTION, runtimeContext);
-        this.objectActionPeer = objectActionPeer;
+        super(methodId, memberPeer, FeatureType.ACTION, runtimeContext);
+        this.memberPeer = memberPeer;
     }
 
     // //////////////////////////////////////////////////////////////////
@@ -201,7 +202,7 @@ public class ObjectActionImpl extends Ob
 
     @Override
     public int getParameterCount() {
-        return objectActionPeer.getParameters().length;
+        return memberPeer.getChildren().size();
     }
 
     @Override
@@ -226,13 +227,14 @@ public class ObjectActionImpl extends Ob
         if (this.parameters == null) {
             final int parameterCount = getParameterCount();
             final ObjectActionParameter[] parameters = new ObjectActionParameter[parameterCount];
-            final ObjectActionParamPeer[] paramPeers = objectActionPeer.getParameters();
+            final List<TypedHolder> paramPeers = memberPeer.getChildren();
             for (int i = 0; i < parameterCount; i++) {
-                final ObjectSpecification specification = paramPeers[i].getSpecification();
+                TypedHolder paramPeer = paramPeers.get(i);
+                final ObjectSpecification specification = paramPeer.getSpecification(getSpecificationLoader());
                 if (specification.isParseable()) {
-                    parameters[i] = new ObjectActionParameterParseable(i, this, paramPeers[i]);
+                    parameters[i] = new ObjectActionParameterParseable(i, this, paramPeer);
                 } else if (specification.isNotCollection()) {
-                    parameters[i] = new OneToOneActionParameterImpl(i, this, paramPeers[i]);
+                    parameters[i] = new OneToOneActionParameterImpl(i, this, paramPeer);
                 } else if (specification.isCollection()) {
                     throw new UnknownTypeException("collections not supported as parameters: " + getIdentifier());
                 } else {
@@ -374,7 +376,7 @@ public class ObjectActionImpl extends Ob
     }
 
     private ActionInvocationFacet getActionInvocationFacet() {
-        return objectActionPeer.getFacet(ActionInvocationFacet.class);
+        return memberPeer.getFacet(ActionInvocationFacet.class);
     }
 
     /**
@@ -564,7 +566,7 @@ public class ObjectActionImpl extends Ob
     @Override
     public String debugData() {
         final DebugString debugString = new DebugString();
-        objectActionPeer.debugData(debugString);
+        memberPeer.debugData(debugString);
         return debugString.toString();
     }
 

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionParameterAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionParameterAbstract.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionParameterAbstract.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionParameterAbstract.java Sat Dec 18 16:30:23 2010
@@ -45,19 +45,19 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.SpecificationFacets;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionParamPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 
 
 public abstract class ObjectActionParameterAbstract implements ObjectActionParameter {
 
     private final int number;
     private final ObjectActionImpl parentAction;
-    private final ObjectActionParamPeer peer;
+    private final TypedHolder peer;
 
     protected ObjectActionParameterAbstract(
             final int number,
             final ObjectActionImpl objectAction,
-            final ObjectActionParamPeer peer) {
+            final TypedHolder peer) {
         this.number = number;
         this.parentAction = objectAction;
         this.peer = peer;
@@ -94,7 +94,7 @@ public abstract class ObjectActionParame
 
     @Override
     public ObjectSpecification getSpecification() {
-        return peer.getSpecification();
+        return peer.getSpecification(getRuntimeContext().getSpecificationLoader());
     }
 
     @Override
@@ -106,7 +106,7 @@ public abstract class ObjectActionParame
     public String getName() {
         final NamedFacet facet = getFacet(NamedFacet.class);
         String name = facet == null ? null : facet.value();
-        name = name == null ? peer.getSpecification().getSingularName() : name;
+        name = name == null ? peer.getSpecification(getRuntimeContext().getSpecificationLoader()).getSingularName() : name;
         return name;
     }
 

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionParameterParseable.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionParameterParseable.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionParameterParseable.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/ObjectActionParameterParseable.java Sat Dec 18 16:30:23 2010
@@ -31,11 +31,12 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.propparam.validate.maxlength.MaxLengthFacet;
 import org.apache.isis.core.metamodel.interactions.InteractionUtils;
 import org.apache.isis.core.metamodel.interactions.ValidityContext;
+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.ObjectActionParameter;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneActionParameter;
 import org.apache.isis.core.metamodel.spec.feature.ParseableEntryActionParameter;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionParamPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 
 
 public class ObjectActionParameterParseable extends ObjectActionParameterAbstract implements
@@ -44,25 +45,29 @@ public class ObjectActionParameterParsea
     public ObjectActionParameterParseable(
             final int index,
             final ObjectActionImpl action,
-            final ObjectActionParamPeer peer) {
+            final TypedHolder peer) {
         super(index, action, peer);
     }
 
+    @Override
     public int getNoLines() {
         final MultiLineFacet facet = getFacet(MultiLineFacet.class);
         return facet.numberOfLines();
     }
 
+    @Override
     public boolean canWrap() {
         final MultiLineFacet facet = getFacet(MultiLineFacet.class);
         return !facet.preventWrapping();
     }
 
+    @Override
     public int getMaximumLength() {
         final MaxLengthFacet facet = getFacet(MaxLengthFacet.class);
         return facet.value();
     }
 
+    @Override
     public int getTypicalLineLength() {
         final TypicalLengthFacet facet = getFacet(TypicalLengthFacet.class);
         return facet.value();
@@ -74,6 +79,7 @@ public class ObjectActionParameterParsea
      * <p>
      * Assumed to be invoked {@link InteractionInvocationMethod#BY_USER by user}.
      */
+    @Override
     public String isValid(final ObjectAdapter adapter, final Object proposedValue) {
 
         if (!(proposedValue instanceof String)) {
@@ -123,6 +129,7 @@ public class ObjectActionParameterParsea
     // getInstance
     // /////////////////////////////////////////////////////////////
     
+    @Override
     public Instance getInstance(ObjectAdapter adapter) {
         OneToOneActionParameter specification = this;
         return adapter.getInstance(specification);
@@ -138,6 +145,7 @@ public class ObjectActionParameterParsea
      * Gets the proposed value of the {@link Instance} (downcast as a
      * {@link MutableProposed}, wrapping the proposed value into a {@link ObjectAdapter}.
      */
+    @Override
     public ObjectAdapter get(ObjectAdapter owner) {
         MutableProposedHolder proposedHolder = getProposedHolder(owner);
         Object proposed = proposedHolder.getProposed();
@@ -161,6 +169,14 @@ public class ObjectActionParameterParsea
         }
         MutableProposedHolder proposedHolder = (MutableProposedHolder) instance;
         return proposedHolder;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.isis.core.metamodel.spec.feature.ObjectFeature#getFeatureType()
+     */
+    @Override
+    public FeatureType getFeatureType() {
+        return FeatureType.ACTION_PARAMETER;
     }
 
 

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToManyAssociationImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToManyAssociationImpl.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToManyAssociationImpl.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToManyAssociationImpl.java Sat Dec 18 16:30:23 2010
@@ -43,7 +43,7 @@ import org.apache.isis.core.metamodel.in
 import org.apache.isis.core.metamodel.interactions.ValidityContext;
 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.feature.OneToManyAssociation;
 import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeer;
@@ -57,7 +57,7 @@ public class OneToManyAssociationImpl ex
     public OneToManyAssociationImpl(
     		final ObjectMemberPeer association, 
     		final RuntimeContext runtimeContext) {
-        super(association.getIdentifier().getMemberName(), association.getSpecification(runtimeContext.getSpecificationLoader()), MemberType.COLLECTION, association, runtimeContext);
+        super(association.getIdentifier().getMemberName(), association.getSpecification(runtimeContext.getSpecificationLoader()), FeatureType.COLLECTION, association, runtimeContext);
         this.reflectiveAdapter = association;
     }
 

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToOneActionParameterImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToOneActionParameterImpl.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToOneActionParameterImpl.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToOneActionParameterImpl.java Sat Dec 18 16:30:23 2010
@@ -23,15 +23,22 @@ package org.apache.isis.core.metamodel.s
 import org.apache.isis.core.metamodel.adapter.Instance;
 import org.apache.isis.core.metamodel.adapter.MutableProposedHolder;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneActionParameter;
-import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionParamPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 
 
 public class OneToOneActionParameterImpl extends ObjectActionParameterAbstract implements OneToOneActionParameter {
 
-    public OneToOneActionParameterImpl(final int index, final ObjectActionImpl actionImpl, final ObjectActionParamPeer peer) {
+    public OneToOneActionParameterImpl(final int index, final ObjectActionImpl actionImpl, final TypedHolder peer) {
         super(index, actionImpl, peer);
     }
+
+    @Override
+    public FeatureType getFeatureType() {
+        return FeatureType.ACTION_PARAMETER;
+    }
+
 
     @Override
     public boolean isObject() {
@@ -42,6 +49,7 @@ public class OneToOneActionParameterImpl
      * TODO: need to be able to validate parameters individually, eg if have <tt>RegEx</tt> annotation;
      * should delegate to the Check framework instead.
      */
+    @Override
     public String isValid(final ObjectAdapter adapter, final Object proposedValue) {
         return null;
     }
@@ -50,6 +58,7 @@ public class OneToOneActionParameterImpl
     // getInstance
     // /////////////////////////////////////////////////////////////
     
+    @Override
     public Instance getInstance(ObjectAdapter adapter) {
         OneToOneActionParameter specification = this;
         return adapter.getInstance(specification);
@@ -64,6 +73,7 @@ public class OneToOneActionParameterImpl
      * Gets the proposed value of the {@link Instance} (downcast as a
      * {@link MutableProposed}, wrapping the proposed value into a {@link ObjectAdapter}.
      */
+    @Override
     public ObjectAdapter get(ObjectAdapter owner) {
         MutableProposedHolder proposedHolder = getProposedHolder(owner);
         Object proposed = proposedHolder.getProposed();
@@ -87,7 +97,6 @@ public class OneToOneActionParameterImpl
         }
         MutableProposedHolder proposedHolder = (MutableProposedHolder) instance;
         return proposedHolder;
-    }
-
-
+    }
+
 }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToOneAssociationImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToOneAssociationImpl.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToOneAssociationImpl.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/OneToOneAssociationImpl.java Sat Dec 18 16:30:23 2010
@@ -48,7 +48,7 @@ import org.apache.isis.core.metamodel.in
 import org.apache.isis.core.metamodel.interactions.ValidityContext;
 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.SpecificationFacets;
 import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
@@ -62,7 +62,7 @@ public class OneToOneAssociationImpl ext
     public OneToOneAssociationImpl(
     		final ObjectMemberPeer association, 
     		final RuntimeContext runtimeContext) {
-        super(association.getIdentifier().getMemberName(), association.getSpecification(runtimeContext.getSpecificationLoader()), MemberType.PROPERTY, association, runtimeContext);
+        super(association.getIdentifier().getMemberName(), association.getSpecification(runtimeContext.getSpecificationLoader()), FeatureType.PROPERTY, association, runtimeContext);
         this.associationPeer = association;
     }
 

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/ObjectMemberPeer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/ObjectMemberPeer.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/ObjectMemberPeer.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/ObjectMemberPeer.java Sat Dec 18 16:30:23 2010
@@ -20,32 +20,24 @@
 
 package org.apache.isis.core.metamodel.specloader.internal.peer;
 
+import java.util.List;
+
 import org.apache.isis.core.commons.debug.Debuggable;
-import org.apache.isis.core.metamodel.runtimecontext.spec.feature.MemberType;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
 import org.apache.isis.core.metamodel.spec.identifier.Identified;
-import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
 
 
 /**
  * Details about action and field members gained via reflection.
- * 
- * @see org.apache.isis.core.metamodel.specloader.internal.peer.ObjectActionPeer
  */
-public interface ObjectMemberPeer extends Identified, Debuggable {
-
+public interface ObjectMemberPeer extends Identified, TypedHolder, Debuggable {
 
-    /**
-     * The type of a {@link MemberType#PROPERTY}, the return type of an 
-     * {@link MemberType#ACTION}, the referenced
-     * type of a {@link MemberType#COLLECTION}.
+    /**
+     * Associated {@link TypedHolder}s.
+     * 
+     * Only {@link FeatureType#ACTION action}s have a non-empty list, 
+     * namely their parameters.
      */
-    ObjectSpecification getSpecification(SpecificationLoader specificationLoader);
-
-
-    boolean isProperty();
-    boolean isCollection();
-    boolean isAction();
-
+    List<TypedHolder> getChildren();
 
 }

Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/ObjectMemberPeerImpl.java (from r1050630, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/JavaObjectMemberPeer.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/ObjectMemberPeerImpl.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/ObjectMemberPeerImpl.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/JavaObjectMemberPeer.java&r1=1050630&r2=1050661&rev=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/JavaObjectMemberPeer.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/ObjectMemberPeerImpl.java Sat Dec 18 16:30:23 2010
@@ -20,128 +20,93 @@
 
 package org.apache.isis.core.metamodel.specloader.internal.peer;
 
+import java.beans.Introspector;
 import java.lang.reflect.Method;
+import java.util.ArrayList;
+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.commons.filters.Filter;
-import org.apache.isis.core.metamodel.facets.Facet;
-import org.apache.isis.core.metamodel.facets.FacetHolder;
-import org.apache.isis.core.metamodel.facets.FacetHolderImpl;
-import org.apache.isis.core.metamodel.facets.MultiTypedFacet;
-import org.apache.isis.core.metamodel.runtimecontext.spec.feature.MemberType;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.runtimecontext.spec.feature.FeatureType;
+import org.apache.isis.core.metamodel.spec.identifier.Util;
 import org.apache.isis.core.metamodel.specloader.SpecificationLoader;
+import org.apache.isis.core.metamodel.util.NameUtils;
 
 
-public abstract class JavaObjectMemberPeer implements FacetHolder,ObjectMemberPeer {
+public class ObjectMemberPeerImpl extends TypedHolderImpl implements ObjectMemberPeer {
 
-    private final FacetHolderImpl holder = new FacetHolderImpl();
-    
-    private final MemberType memberType;
-    private final Class<?> owningType;
-    private final Method method;
-    private final Identifier identifier;
-    private final SpecificationLoader specificationLoader;
-    private Class<?> type;
+    ////////////////////////////////////////////////////
+    // Factory methods
+    ////////////////////////////////////////////////////
 
-    public JavaObjectMemberPeer(final MemberType memberType, final Class<?> owningType, final Method method, final Identifier identifier, Class<?> type, SpecificationLoader specificationLoader) {
-        this.memberType = memberType;
-        this.owningType = owningType;
-        this.method = method;
-        this.identifier = identifier;
-        this.setType(type);
-        this.specificationLoader = specificationLoader;
+    public static ObjectMemberPeer createCollectionPeer(Class<?> type, Method method,
+        SpecificationLoader specificationLoader) {
+        return new ObjectMemberPeerImpl(FeatureType.COLLECTION, type, method, propertyOrCollectionIdentifierFor(type, method), null, emptyListOfTypedHolder(), specificationLoader);
     }
 
-    protected MemberType getMemberType() {
-        return memberType;
+    public static ObjectMemberPeer createActionPeer(Class<?> type, Method method, Class<?> returnType,
+        SpecificationLoader specificationLoader) {
+        return new ObjectMemberPeerImpl(FeatureType.ACTION, type, method, actionIdentifierFor(type, method), returnType, Util.getParamPeers(method, specificationLoader), specificationLoader);
     }
 
-    
-    /**
-     * @return the method
-     */
-    public Method getMethod() {
-        return method;
-    }
 
-    @Override
-    public Identifier getIdentifier() {
-        return identifier;
+    private static Identifier propertyOrCollectionIdentifierFor(Class<?> type, Method method) {
+        final String capitalizedName = NameUtils.javaBaseName(method.getName());
+        final String beanName = Introspector.decapitalize(capitalizedName);
+        return Identifier.propertyOrCollectionIdentifier(type.getName(), beanName);
     }
-
     
-    //////////////////////////////////////////////////////////////////////
-    // Specification (derived from type)
-    //////////////////////////////////////////////////////////////////////
-
-    /**
-     * return the object type, as a Class object, that the method returns.
-     */
-    @Override
-    public ObjectSpecification getSpecification(final SpecificationLoader specificationLoader) {
-        return getType() == null ? null : specificationLoader.loadSpecification(getType());
+    private static Identifier actionIdentifierFor(Class<?> type, Method method) {
+        final String fullMethodName = method.getName();
+        final Class<?>[] parameterTypes = method.getParameterTypes();
+        return Identifier.actionIdentifier(type.getName(), fullMethodName, parameterTypes);
     }
 
+    ////////////////////////////////////////////////////
+    // Constructor
+    ////////////////////////////////////////////////////
 
-    //////////////////////////////////////////////////////////////////////
-    // type
-    //////////////////////////////////////////////////////////////////////
-
-    /**
-     * Required for associations because this may not be known from the
-     * accessor alone (might return a raw type such as <tt>java.util.List</tt>,
-     * rather than a generic one such as <tt>java.util.List&lt;Customer&gt;</tt>).
-     */
-    public void setType(final Class<?> type) {
-        this.type = type;
-    }
-    
-
-
-    //////////////////////////////////////////////////////////////////////
-    // facets
-    //////////////////////////////////////////////////////////////////////
-
-    @Override
-    public Class<? extends Facet>[] getFacetTypes() {
-        return holder.getFacetTypes();
-    }
+    private final Class<?> owningType;
+    private final Method method;
+    private final Identifier identifier;
+    private final SpecificationLoader specificationLoader;
+    private final List<TypedHolder> children;
 
     @Override
-    public boolean containsFacet(Class<? extends Facet> facetType) {
-        return holder.containsFacet(facetType);
+    public List<TypedHolder> getChildren() {
+        return children;
     }
 
-    @Override
-    public <T extends Facet> T getFacet(Class<T> cls) {
-        return holder.getFacet(cls);
+    public static List<TypedHolder> emptyListOfTypedHolder() {
+        return Collections.unmodifiableList(new ArrayList<TypedHolder>());
     }
 
-    @Override
-    public Facet[] getFacets(Filter<Facet> filter) {
-        return holder.getFacets(filter);
+    public static ObjectMemberPeer createPropertyPeer(Class<?> type, Method method, Class<?> returnType,
+        SpecificationLoader specificationLoader) {
+        return new ObjectMemberPeerImpl(FeatureType.PROPERTY, type, method, propertyOrCollectionIdentifierFor(type, method), returnType, emptyListOfTypedHolder(), specificationLoader);
     }
 
-    @Override
-    public void addFacet(Facet facet) {
-        holder.addFacet(facet);
-    }
 
-    @Override
-    public void addFacet(MultiTypedFacet facet) {
-        holder.addFacet(facet);
+    public ObjectMemberPeerImpl(final FeatureType featureType, final Class<?> owningType, final Method method, final Identifier identifier, Class<?> type, final List<TypedHolder> children, SpecificationLoader specificationLoader) {
+        super(featureType, type);
+        this.owningType = owningType;
+        this.method = method;
+        this.identifier = identifier;
+        this.children = children;
+        this.specificationLoader = specificationLoader;
     }
 
-    @Override
-    public void removeFacet(Facet facet) {
-        holder.removeFacet(facet);
+    /**
+     * @return the method
+     */
+    public Method getMethod() {
+        return method;
     }
 
     @Override
-    public void removeFacet(Class<? extends Facet> facetType) {
-        holder.removeFacet(facetType);
+    public Identifier getIdentifier() {
+        return identifier;
     }
 
 
@@ -150,8 +115,14 @@ public abstract class JavaObjectMemberPe
     //////////////////////////////////////////////////////////////////////
 
     @Override
+    public String toString() {
+        return getFeatureType().name() + " Peer [identifier=\"" + getIdentifier() + "\",type=" + getType().getName() + " ]";
+    }
+
+    @Override
     public void debugData(final DebugString debug) {
-    // debug.appendln("Identifier", identifier.toString());
+        // TODO: reinstate
+        // debug.appendln("Identifier", identifier.toString());
     }
 
 
@@ -163,28 +134,5 @@ public abstract class JavaObjectMemberPe
         return specificationLoader;
     }
 
-    /**
-     * @return the type
-     */
-    public Class<?> getType() {
-        return type;
-    }
-
-    @Override
-    public boolean isProperty() {
-        return getMemberType().isProperty();
-    }
-
-    @Override
-    public boolean isCollection() {
-        return getMemberType().isCollection();
-    }
-
-    @Override
-    public boolean isAction() {
-        return getMemberType().isAction();
-    }
-
-
 }
 

Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/TypedHolder.java (from r1050630, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/FacetHolderAndSpec.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/TypedHolder.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/TypedHolder.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/FacetHolderAndSpec.java&r1=1050630&r2=1050661&rev=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/FacetHolderAndSpec.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/TypedHolder.java Sat Dec 18 16:30:23 2010
@@ -21,11 +21,41 @@
 package org.apache.isis.core.metamodel.specloader.internal.peer;
 
 import org.apache.isis.core.metamodel.facets.FacetHolder;
+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;
 
-
-public interface FacetHolderAndSpec extends FacetHolder {
-
-    ObjectSpecification getSpecification();
+
+/**
+ * A {@link FacetHolder} that also has a {@link ObjectSpecification type}.
+ * 
+ * <p>
+ * Used to represent class members when building up the metamodel.
+ */
+public interface TypedHolder extends FacetHolder {
+
+    public Class<?> getType();
+    
+    /**
+     * Type may not be known initially (eg {@link FeatureType#COLLECTION}s).
+     * 
+     * <p>
+     * For example, the accessor might return a raw type such as 
+     * <tt>java.util.List</tt>, rather than a generic one such as 
+     * <tt>java.util.List&lt;Customer&gt;</tt>.
+     */
+    public void setType(Class<?> type);
+
+    /**
+     * The {@link ObjectSpecification} corresponding to {@link #getType()}
+     * (or null if not yet {@link #setType(Class)}).
+     */
+    ObjectSpecification getSpecification(SpecificationLoader specificationLoader);
+
+    /**
+     * @return
+     */
+    public FeatureType getFeatureType();
+
 
 }

Added: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/TypedHolderImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/TypedHolderImpl.java?rev=1050661&view=auto
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/TypedHolderImpl.java (added)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/internal/peer/TypedHolderImpl.java Sat Dec 18 16:30:23 2010
@@ -0,0 +1,54 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.isis.core.metamodel.specloader.internal.peer;
+
+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.SpecificationLoader;
+
+public class TypedHolderImpl extends FacetHolderImpl implements TypedHolder {
+
+    private final FeatureType featureType;
+    private Class<?> type;
+    
+    public TypedHolderImpl(FeatureType featureType ,Class<?> type) {
+        this.featureType = featureType;
+        this.type = type;
+    }
+
+    @Override
+    public FeatureType getFeatureType() {
+        return featureType;
+    }
+
+    @Override
+    public Class<?> getType() {
+        return type;
+    }
+
+    @Override
+    public ObjectSpecification getSpecification(final SpecificationLoader specificationLoader) {
+        return getType() == null ? null : specificationLoader.loadSpecification(getType());
+    }
+
+    @Override
+    public void setType(Class<?> type) {
+        this.type = type;
+    }
+
+}

Modified: incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ObjectActionNoop.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ObjectActionNoop.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ObjectActionNoop.java (original)
+++ incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ObjectActionNoop.java Sat Dec 18 16:30:23 2010
@@ -22,8 +22,6 @@ package org.apache.isis.core.metamodel.a
 
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.commons.filters.Filter;
-import org.apache.isis.core.metamodel.adapter.Instance;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.consent.Allow;
 import org.apache.isis.core.metamodel.consent.Consent;
@@ -34,6 +32,7 @@ import org.apache.isis.core.metamodel.in
 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.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.ObjectAction;
@@ -53,110 +52,139 @@ public class ObjectActionNoop implements
         return null;
     }
 
+    @Override
     public String debugData() {
         return null;
     }
 
+    @Override
     public ObjectAdapter execute(final ObjectAdapter target, final ObjectAdapter[] parameters) {
         return null;
     }
 
+    @Override
     public ObjectAction[] getActions() {
         return null;
     }
 
+    @Override
     public ObjectAdapter[] getDefaults(final ObjectAdapter target) {
         return null;
     }
 
+    @Override
     public String getDescription() {
         return null;
     }
 
+    @Override
     public boolean containsFacet(final Class<? extends Facet> facetType) {
         return false;
     }
 
+    @Override
     public <T extends Facet> T getFacet(final Class<T> cls) {
         return null;
     }
 
+    @Override
     public Class<? extends Facet>[] getFacetTypes() {
         return new Class[0];
     }
 
+    @Override
     public Facet[] getFacets(final Filter<Facet> filter) {
         return null;
     }
 
+    @Override
     public void addFacet(final Facet facet) {}
 
+    @Override
     public void addFacet(final MultiTypedFacet facet) {}
 
+    @Override
     public void removeFacet(final Facet facet) {}
 
+    @Override
     public void removeFacet(final Class<? extends Facet> facetType) {}
 
+    @Override
     public Identifier getIdentifier() {
         return null;
     }
 
+    @Override
     public String getHelp() {
         return null;
     }
 
+    @Override
     public String getId() {
         return null;
     }
 
+    @Override
     public String getName() {
         return null;
     }
 
+    @Override
     public ObjectSpecification getOnType() {
         return null;
     }
 
+    @Override
     public ObjectAdapter[][] getChoices(final ObjectAdapter target) {
         return null;
     }
 
+    @Override
     public int getParameterCount() {
         return 0;
     }
 
+    @Override
     public ObjectActionParameter[] getParameters() {
         return null;
     }
 
+    @Override
     public ObjectActionParameter[] getParameters(final Filter<ObjectActionParameter> filter) {
         return null;
     }
 
+    @Override
     public ObjectSpecification getReturnType() {
         return null;
     }
 
+    @Override
     public Target getTarget() {
         return null;
     }
 
+    @Override
     public ObjectActionType getType() {
         return null;
     }
 
+    @Override
     public boolean hasReturn() {
         return false;
     }
 
+    @Override
     public boolean isContributed() {
         return false;
     }
 
+    @Override
     public boolean promptForParameters(final ObjectAdapter target) {
         return false;
     }
 
+    @Override
     public VisibilityContext<?> createVisibleInteractionContext(
             final AuthenticationSession session,
             final InteractionInvocationMethod invocationMethod,
@@ -164,30 +192,37 @@ public class ObjectActionNoop implements
         return null;
     }
 
+    @Override
     public boolean isAlwaysHidden() {
         return false;
     }
     
+    @Override
     public Consent isVisible(final AuthenticationSession session, final ObjectAdapter target) {
         return Allow.DEFAULT;
     }
 
+    @Override
     public Consent isUsable(final AuthenticationSession session, final ObjectAdapter target) {
         return Allow.DEFAULT;
     }
 
+    @Override
     public Consent isProposedArgumentSetValid(final ObjectAdapter object, final ObjectAdapter[] parameters) {
         return Allow.DEFAULT;
     }
 
+    @Override
     public ObjectAdapter realTarget(final ObjectAdapter target) {
         return target;
     }
 
+    @Override
     public ObjectSpecification getSpecification() {
         return null;
     }
 
+    @Override
     public UsabilityContext<?> createUsableInteractionContext(
             final AuthenticationSession session,
             final InteractionInvocationMethod invocationMethod,
@@ -195,6 +230,7 @@ public class ObjectActionNoop implements
         return null;
     }
 
+    @Override
     public ActionInvocationContext createActionInvocationInteractionContext(
             final AuthenticationSession session,
             final InteractionInvocationMethod invocationMethod,
@@ -208,17 +244,21 @@ public class ObjectActionNoop implements
     // isAction, isAssociation
     // /////////////////////////////////////////////////////////////
 
+    @Override
     public boolean isAction() {
         return true;
     }
 
-    public boolean isAssociation() {
+    @Override
+    public boolean isPropertyOrCollection() {
         return false;
     }
     
+    @Override
     public boolean isOneToManyAssociation() {
         return false;
     }
+    @Override
     public boolean isOneToOneAssociation() {
         return false;
     }
@@ -228,11 +268,13 @@ public class ObjectActionNoop implements
     // getInstance
     // /////////////////////////////////////////////////////////////
     
+    @Override
     public Instance getInstance(ObjectAdapter adapter) {
         ObjectAction specification = this;
         return adapter.getInstance(specification);
     }
 
+    @Override
     public ObjectSpecification[] getParameterTypes() {
         return null;
     }
@@ -242,6 +284,14 @@ public class ObjectActionNoop implements
 		return null;
 	}
 
+    /* (non-Javadoc)
+     * @see org.apache.isis.core.metamodel.spec.feature.ObjectFeature#getFeatureType()
+     */
+    @Override
+    public FeatureType getFeatureType() {
+        return FeatureType.ACTION;
+    }
+
 
 
 }

Modified: incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectAssociationAbstractTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectAssociationAbstractTest.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectAssociationAbstractTest.java (original)
+++ incubator/isis/trunk/core/metamodel/src/test/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectAssociationAbstractTest.java Sat Dec 18 16:30:23 2010
@@ -58,7 +58,7 @@ public class ObjectAssociationAbstractTe
     public void setup() {
         facetHolder = new IdentifiedImpl();
         objectAssociation = new ObjectAssociationAbstract("id", new TestProxySpecification("test"),
-                MemberType.PROPERTY, facetHolder, null) {
+                FeatureType.PROPERTY, facetHolder, null) {
 
             public ObjectAdapter get(ObjectAdapter fromObject) {
                 return null;

Modified: incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/FallbackFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/FallbackFacetFactory.java?rev=1050661&r1=1050660&r2=1050661&view=diff
==============================================================================
--- incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/FallbackFacetFactory.java (original)
+++ incubator/isis/trunk/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/FallbackFacetFactory.java Sat Dec 18 16:30:23 2010
@@ -31,8 +31,8 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.FacetUtil;
 import org.apache.isis.core.metamodel.facets.MethodRemover;
 import org.apache.isis.core.metamodel.spec.feature.ObjectFeatureType;
-import org.apache.isis.core.metamodel.specloader.internal.peer.JavaObjectActionParamPeer;
-import org.apache.isis.core.metamodel.specloader.internal.peer.JavaObjectMemberPeer;
+import org.apache.isis.core.metamodel.specloader.internal.peer.ObjectMemberPeerImpl;
+import org.apache.isis.core.metamodel.specloader.internal.peer.TypedHolder;
 import org.apache.isis.core.progmodel.facets.actions.choices.ActionChoicesFacetNone;
 import org.apache.isis.core.progmodel.facets.actions.defaults.ActionDefaultsFacetNone;
 import org.apache.isis.core.progmodel.facets.actions.executed.ExecutedFacetAtDefault;
@@ -91,17 +91,17 @@ public class FallbackFacetFactory extend
         final FacetHolder holder) {
         final List<Facet> facets = new ArrayList<Facet>();
 
-        if (holder instanceof JavaObjectMemberPeer) {
+        if (holder instanceof ObjectMemberPeerImpl) {
             facets.add(new NamedFacetNone(holder));
             facets.add(new DescribedAsFacetNone(holder));
             facets.add(new HelpFacetNone(holder));
             
-            JavaObjectMemberPeer objectMemberPeer = (JavaObjectMemberPeer) holder;
-            if (objectMemberPeer.isProperty()) {
+            ObjectMemberPeerImpl objectMemberPeer = (ObjectMemberPeerImpl) holder;
+            if (objectMemberPeer.getFeatureType().isProperty()) {
                 facets.add(new MaxLengthFacetUnlimited(holder));
                 facets.add(new MultiLineFacetNone(true, holder));
             }
-            if (objectMemberPeer.isAction()) {
+            if (objectMemberPeer.getFeatureType().isAction()) {
                 facets.add(new ExecutedFacetAtDefault(holder));
                 facets.add(new ActionDefaultsFacetNone(holder));
                 facets.add(new ActionChoicesFacetNone(holder));
@@ -115,14 +115,17 @@ public class FallbackFacetFactory extend
     public boolean processParams(final Method method, final int paramNum, final FacetHolder holder) {
         final List<Facet> facets = new ArrayList<Facet>();
 
-        if (holder instanceof JavaObjectActionParamPeer) {
+        if (holder instanceof TypedHolder) {
 
-            facets.add(new NamedFacetNone(holder));
-            facets.add(new DescribedAsFacetNone(holder));
-            facets.add(new HelpFacetNone(holder));
-            facets.add(new MultiLineFacetNone(false, holder));
-
-            facets.add(new MaxLengthFacetUnlimited(holder));
+            TypedHolder typedHolder = (TypedHolder) holder;
+            if (typedHolder.getFeatureType().isActionParameter()) {
+                facets.add(new NamedFacetNone(holder));
+                facets.add(new DescribedAsFacetNone(holder));
+                facets.add(new HelpFacetNone(holder));
+                facets.add(new MultiLineFacetNone(false, holder));
+                
+                facets.add(new MaxLengthFacetUnlimited(holder));
+            }
         }
 
         return FacetUtil.addFacets(facets);



Mime
View raw message