isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1053871 [6/22] - in /incubator/isis/trunk: alternatives/bytecode/javassist/src/main/java/org/apache/isis/alternatives/bytecode/javassist/classsubstitutor/ alternatives/bytecode/javassist/src/main/java/org/apache/isis/alternatives/bytecode/...
Date Thu, 30 Dec 2010 12:30:25 GMT
Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/peer/ObjectAssociationAbstract.java (from r1051972, 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/peer/ObjectAssociationAbstract.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/peer/ObjectAssociationAbstract.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectAssociationAbstract.java&r1=1051972&r2=1053871&rev=1053871&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/peer/ObjectAssociationAbstract.java Thu Dec 30 12:29:53 2010
@@ -18,21 +18,17 @@
  */
 
 
-package org.apache.isis.core.metamodel.runtimecontext.spec.feature;
+package org.apache.isis.core.metamodel.peer;
 
 import org.apache.isis.core.commons.exceptions.NotYetImplementedException;
-import org.apache.isis.core.metamodel.adapter.AdapterMap;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.QuerySubmitter;
-import org.apache.isis.core.metamodel.authentication.AuthenticationSessionProvider;
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.propcoll.notpersisted.NotPersistedFacet;
 import org.apache.isis.core.metamodel.facets.properties.choices.PropertyChoicesFacet;
 import org.apache.isis.core.metamodel.facets.propparam.validate.mandatory.MandatoryFacet;
-import org.apache.isis.core.metamodel.feature.FeatureType;
-import org.apache.isis.core.metamodel.feature.IdentifiedHolder;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.SpecificationLookup;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
+import org.apache.isis.core.metamodel.spec.feature.ObjectMemberContext;
 
 
 // TODO need to pull up the common methods. like getName(), from subclasses
@@ -41,17 +37,13 @@ public abstract class ObjectAssociationA
     private final ObjectSpecification specification;
 
     public ObjectAssociationAbstract(
-            final String associationId,
-            final ObjectSpecification specification,
+            final FacetedMethod facetedMethod,
             final FeatureType featureType,
-            final IdentifiedHolder facetHolder, 
-            final AuthenticationSessionProvider authenticationSessionProvider,
-            final SpecificationLookup specificationLookup,
-            final AdapterMap adapterManager,
-            final QuerySubmitter querySubmitter) {
-        super(associationId, facetHolder, featureType, authenticationSessionProvider, specificationLookup, adapterManager, querySubmitter);
+            final ObjectSpecification specification,
+            final ObjectMemberContext parameterObject) {
+        super(facetedMethod, featureType, parameterObject);
         if (specification == null) {
-            throw new IllegalArgumentException("field type for '" + associationId + "' must exist");
+            throw new IllegalArgumentException("field type for '" + getId() + "' must exist");
         }
         this.specification = specification;
     }

Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/peer/ObjectMemberAbstract.java (from r1051972, 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/peer/ObjectMemberAbstract.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/peer/ObjectMemberAbstract.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/spec/feature/ObjectMemberAbstract.java&r1=1051972&r2=1053871&rev=1053871&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/peer/ObjectMemberAbstract.java Thu Dec 30 12:29:53 2010
@@ -18,35 +18,35 @@
  */
 
 
-package org.apache.isis.core.metamodel.runtimecontext.spec.feature;
+package org.apache.isis.core.metamodel.peer;
 
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.commons.filters.Filter;
-import org.apache.isis.core.metamodel.adapter.AdapterMap;
+import org.apache.isis.core.commons.lang.NameUtils;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.QuerySubmitter;
+import org.apache.isis.core.metamodel.adapter.map.AdapterMap;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSessionProvider;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-import org.apache.isis.core.metamodel.consent.InteractionResult;
-import org.apache.isis.core.metamodel.facets.Facet;
-import org.apache.isis.core.metamodel.facets.MultiTypedFacet;
+import org.apache.isis.core.metamodel.consent2.Consent;
+import org.apache.isis.core.metamodel.consent2.InteractionInvocationMethod;
+import org.apache.isis.core.metamodel.consent2.InteractionResult;
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
+import org.apache.isis.core.metamodel.facetapi.MultiTypedFacet;
 import org.apache.isis.core.metamodel.facets.help.HelpFacet;
 import org.apache.isis.core.metamodel.facets.hide.HiddenFacet;
 import org.apache.isis.core.metamodel.facets.naming.describedas.DescribedAsFacet;
 import org.apache.isis.core.metamodel.facets.naming.named.NamedFacet;
-import org.apache.isis.core.metamodel.feature.FeatureType;
-import org.apache.isis.core.metamodel.feature.IdentifiedHolder;
-import org.apache.isis.core.metamodel.interactions.DisablingInteractionAdvisor;
-import org.apache.isis.core.metamodel.interactions.HidingInteractionAdvisor;
-import org.apache.isis.core.metamodel.interactions.InteractionUtils;
-import org.apache.isis.core.metamodel.interactions.UsabilityContext;
-import org.apache.isis.core.metamodel.interactions.VisibilityContext;
+import org.apache.isis.core.metamodel.interactions2.DisablingInteractionAdvisor;
+import org.apache.isis.core.metamodel.interactions2.HidingInteractionAdvisor;
+import org.apache.isis.core.metamodel.interactions2.InteractionUtils;
+import org.apache.isis.core.metamodel.interactions2.UsabilityContext;
+import org.apache.isis.core.metamodel.interactions2.VisibilityContext;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLookup;
 import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
-import org.apache.isis.core.metamodel.util.NameUtils;
+import org.apache.isis.core.metamodel.spec.feature.ObjectMemberContext;
 
 
 public abstract class ObjectMemberAbstract implements ObjectMember {
@@ -57,7 +57,7 @@ public abstract class ObjectMemberAbstra
 
     protected final String defaultName;
     private final String id;
-    private final IdentifiedHolder facetHolder;
+    private final FacetedMethod facetedMethod;
     private final FeatureType featureType;
     private final AuthenticationSessionProvider authenticationSessionProvider;
     private final SpecificationLookup specificationLookup;
@@ -65,24 +65,22 @@ public abstract class ObjectMemberAbstra
     private final QuerySubmitter querySubmitter;
 
     protected ObjectMemberAbstract(
-    		final String id, 
-    		final IdentifiedHolder facetHolder, 
+    		final FacetedMethod facetedMethod, 
     		final FeatureType featureType, 
-            final AuthenticationSessionProvider authenticationSessionProvider,
-    		final SpecificationLookup specificationLookup,
-            final AdapterMap adapterManager,
-            final QuerySubmitter querySubmitter) {
+    		ObjectMemberContext objectMembercontext) {
+        final String id = facetedMethod.getIdentifier().getMemberName();
         if (id == null) {
             throw new IllegalArgumentException("Name must always be set");
         }
-        this.id = id;
-        this.defaultName = NameUtils.naturalName(id);
-        this.facetHolder = facetHolder;
+        this.facetedMethod = facetedMethod;
         this.featureType = featureType;
-        this.authenticationSessionProvider = authenticationSessionProvider;
-        this.specificationLookup = specificationLookup;
-        this.adapterMap = adapterManager;
-        this.querySubmitter = querySubmitter;
+        this.id = id;
+        this.defaultName = NameUtils.naturalName(this.id);
+        
+        this.authenticationSessionProvider = objectMembercontext.authenticationSessionProvider;
+        this.specificationLookup = objectMembercontext.specificationLookup;
+        this.adapterMap = objectMembercontext.adapterManager;
+        this.querySubmitter = objectMembercontext.querySubmitter;
     }
 
 
@@ -95,9 +93,16 @@ public abstract class ObjectMemberAbstra
         return id;
     }
 
+    /**
+     * @return the facetedMethod
+     */
+    public FacetedMethod getFacetedMethod() {
+        return facetedMethod;
+    }
+
     @Override
     public Identifier getIdentifier() {
-        return facetHolder.getIdentifier();
+        return getFacetedMethod().getIdentifier();
     }
 
     @Override
@@ -113,42 +118,42 @@ public abstract class ObjectMemberAbstra
 
     @Override
     public boolean containsFacet(final Class<? extends Facet> facetType) {
-        return facetHolder.containsFacet(facetType);
+        return getFacetedMethod().containsFacet(facetType);
     }
 
     @Override
     public <T extends Facet> T getFacet(final Class<T> cls) {
-        return facetHolder.getFacet(cls);
+        return getFacetedMethod().getFacet(cls);
     }
 
     @Override
     public Class<? extends Facet>[] getFacetTypes() {
-        return facetHolder.getFacetTypes();
+        return getFacetedMethod().getFacetTypes();
     }
 
     @Override
     public Facet[] getFacets(final Filter<Facet> filter) {
-        return facetHolder.getFacets(filter);
+        return getFacetedMethod().getFacets(filter);
     }
 
     @Override
     public void addFacet(final Facet facet) {
-        facetHolder.addFacet(facet);
+        getFacetedMethod().addFacet(facet);
     }
 
     @Override
     public void addFacet(final MultiTypedFacet facet) {
-        facetHolder.addFacet(facet);
+        getFacetedMethod().addFacet(facet);
     }
 
     @Override
     public void removeFacet(final Facet facet) {
-        facetHolder.removeFacet(facet);
+        getFacetedMethod().removeFacet(facet);
     }
 
     @Override
     public void removeFacet(final Class<? extends Facet> facetType) {
-        facetHolder.removeFacet(facetType);
+        getFacetedMethod().removeFacet(facetType);
     }
 
     // /////////////////////////////////////////////////////////////
@@ -298,4 +303,6 @@ public abstract class ObjectMemberAbstra
         return querySubmitter;
     }
 
+
+
 }

Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java (from r1051972, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/progmodelfacets/ProgrammingModelFacets.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/progmodelfacets/ProgrammingModelFacets.java&r1=1051972&r2=1053871&rev=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/progmodelfacets/ProgrammingModelFacets.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModel.java Thu Dec 30 12:29:53 2010
@@ -18,14 +18,14 @@
  */
 
 
-package org.apache.isis.core.metamodel.specloader.progmodelfacets;
+package org.apache.isis.core.metamodel.progmodel;
 
 import java.util.List;
 
-import org.apache.isis.core.metamodel.facets.FacetFactory;
+import org.apache.isis.core.metamodel.facetapi.FacetFactory;
 
 
-public interface ProgrammingModelFacets {
+public interface ProgrammingModel {
 
     void init();
 

Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java (from r1051972, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/progmodelfacets/ProgrammingModelFacetsAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/progmodelfacets/ProgrammingModelFacetsAbstract.java&r1=1051972&r2=1053871&rev=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/progmodelfacets/ProgrammingModelFacetsAbstract.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/progmodel/ProgrammingModelAbstract.java Thu Dec 30 12:29:53 2010
@@ -18,17 +18,17 @@
  */
 
 
-package org.apache.isis.core.metamodel.specloader.progmodelfacets;
+package org.apache.isis.core.metamodel.progmodel;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
 import org.apache.isis.core.commons.factory.InstanceFactory;
-import org.apache.isis.core.metamodel.facets.FacetFactory;
+import org.apache.isis.core.metamodel.facetapi.FacetFactory;
 
 
-public abstract class ProgrammingModelFacetsAbstract implements ProgrammingModelFacets {
+public abstract class ProgrammingModelAbstract implements ProgrammingModel {
 
     private final List<FacetFactory> facetFactories = new ArrayList<FacetFactory>();
     private final List<Class<? extends FacetFactory>> facetFactoryClasses = new ArrayList<Class<? extends FacetFactory>>();

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContext.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContext.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContext.java Thu Dec 30 12:29:53 2010
@@ -22,12 +22,12 @@ package org.apache.isis.core.metamodel.r
 
 import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.core.commons.components.Injectable;
-import org.apache.isis.core.metamodel.adapter.AdapterMap;
 import org.apache.isis.core.metamodel.adapter.DomainObjectServices;
 import org.apache.isis.core.metamodel.adapter.ObjectDirtier;
 import org.apache.isis.core.metamodel.adapter.ObjectPersistor;
 import org.apache.isis.core.metamodel.adapter.QuerySubmitter;
 import org.apache.isis.core.metamodel.adapter.ServicesProvider;
+import org.apache.isis.core.metamodel.adapter.map.AdapterMap;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.metamodel.spec.ObjectInstantiator;

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/noruntime/RuntimeContextNoRuntime.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/noruntime/RuntimeContextNoRuntime.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/noruntime/RuntimeContextNoRuntime.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/noruntime/RuntimeContextNoRuntime.java Thu Dec 30 12:29:53 2010
@@ -23,7 +23,6 @@ package org.apache.isis.core.metamodel.r
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.isis.core.metamodel.adapter.AdapterMap;
 import org.apache.isis.core.metamodel.adapter.DomainObjectServices;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ObjectDirtier;
@@ -31,6 +30,7 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.adapter.QuerySubmitter;
 import org.apache.isis.core.metamodel.adapter.ServicesProvider;
 import org.apache.isis.core.metamodel.adapter.ServicesProviderAbstract;
+import org.apache.isis.core.metamodel.adapter.map.AdapterMap;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjectorAbstract;

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/container/DomainObjectContainerDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/container/DomainObjectContainerDefault.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/container/DomainObjectContainerDefault.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/services/container/DomainObjectContainerDefault.java Thu Dec 30 12:29:53 2010
@@ -31,9 +31,6 @@ import org.apache.isis.applib.query.Quer
 import org.apache.isis.applib.security.RoleMemento;
 import org.apache.isis.applib.security.UserMemento;
 import org.apache.isis.core.commons.ensure.Assert;
-import org.apache.isis.core.metamodel.adapter.AdapterMap;
-import org.apache.isis.core.metamodel.adapter.AdapterMapAware;
-import org.apache.isis.core.metamodel.adapter.AdapterUtils;
 import org.apache.isis.core.metamodel.adapter.DomainObjectServices;
 import org.apache.isis.core.metamodel.adapter.DomainObjectServicesAware;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -43,10 +40,13 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.adapter.ObjectPersistorAware;
 import org.apache.isis.core.metamodel.adapter.QuerySubmitter;
 import org.apache.isis.core.metamodel.adapter.QuerySubmitterAware;
+import org.apache.isis.core.metamodel.adapter.map.AdapterMap;
+import org.apache.isis.core.metamodel.adapter.map.AdapterMapAware;
+import org.apache.isis.core.metamodel.adapter.util.AdapterUtils;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSessionProviderAware;
-import org.apache.isis.core.metamodel.consent.InteractionResult;
+import org.apache.isis.core.metamodel.consent2.InteractionResult;
 import org.apache.isis.core.metamodel.services.container.query.QueryFindByPattern;
 import org.apache.isis.core.metamodel.services.container.query.QueryFindByTitle;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;

Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ActionType.java (from r1051972, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionType.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ActionType.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ActionType.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionType.java&r1=1051972&r2=1053871&rev=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionType.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ActionType.java Thu Dec 30 12:29:53 2010
@@ -18,16 +18,11 @@
  */
 
 
-package org.apache.isis.core.metamodel.spec.feature;
+package org.apache.isis.core.metamodel.spec;
 
-import org.apache.isis.core.metamodel.facets.Facet;
-import org.apache.isis.core.metamodel.facets.FacetHolder;
-import org.apache.isis.core.metamodel.facets.actions.debug.DebugFacet;
-import org.apache.isis.core.metamodel.facets.actions.exploration.ExplorationFacet;
-import org.apache.isis.core.metamodel.facets.actions.prototype.PrototypeFacet;
 
 
-public enum ObjectActionType {
+public enum ActionType {
 	DEBUG,
 	SET,
 	EXPLORATION,
@@ -36,21 +31,5 @@ public enum ObjectActionType {
 	
     public String getName() {
         return name();
-    }
-
-	public static ObjectActionType getType(FacetHolder facetHolder) {
-		Facet facet = facetHolder.getFacet(DebugFacet.class);
-        if (facet != null) {
-            return DEBUG;
-        }
-        facet = facetHolder.getFacet(ExplorationFacet.class);
-        if (facet != null) {
-            return EXPLORATION;
-        }
-        facet = facetHolder.getFacet(PrototypeFacet.class);
-        if (facet != null) {
-            return PROTOTYPE;
-        }
-        return USER;
-	}
+    }
 }

Added: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Described.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Described.java?rev=1053871&view=auto
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Described.java (added)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Described.java Thu Dec 30 12:29:53 2010
@@ -0,0 +1,35 @@
+/*
+ *  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.spec;
+
+/**
+ * Anything in the metamodel that has a description.
+ */
+public interface Described {
+
+    /**
+     * Returns a description of how the member is used - this complements the help text.
+     * 
+     * @see #getHelp()
+     */
+    String getDescription();
+
+}

Added: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ElementSpecificationProvider.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ElementSpecificationProvider.java?rev=1053871&view=auto
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ElementSpecificationProvider.java (added)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ElementSpecificationProvider.java Thu Dec 30 12:29:53 2010
@@ -0,0 +1,30 @@
+/**
+ *  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.spec;
+
+/**
+ * A mechanism to provide the {@link ObjectSpecification type}
+ * of a (stand-alone) collection.
+ * 
+ * <p>
+ * Introduced to decouple the <tt>facets</tt> package from
+ * the <tt>spec</tt> package.
+ */
+public interface ElementSpecificationProvider {
+
+    public ObjectSpecification getElementType();
+}

Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/FacetFactoryAbstract.java (from r1051972, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactoryAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/FacetFactoryAbstract.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/FacetFactoryAbstract.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactoryAbstract.java&r1=1051972&r2=1053871&rev=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/FacetFactoryAbstract.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/FacetFactoryAbstract.java Thu Dec 30 12:29:53 2010
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.metamodel.facets;
+package org.apache.isis.core.metamodel.spec;
 
 
 import java.lang.reflect.Method;
@@ -26,9 +26,10 @@ import java.util.List;
 
 import com.google.common.collect.ImmutableList;
 
-import org.apache.isis.core.metamodel.feature.FeatureType;
-import org.apache.isis.core.metamodel.spec.SpecificationLookup;
-import org.apache.isis.core.metamodel.spec.SpecificationLookupAware;
+import org.apache.isis.core.metamodel.facetapi.FacetFactory;
+import org.apache.isis.core.metamodel.facetapi.FacetHolder;
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
+import org.apache.isis.core.metamodel.facetapi.MethodRemover;
 
 
 public abstract class FacetFactoryAbstract implements FacetFactory, SpecificationLookupAware {

Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Instance.java (from r1051972, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/Instance.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Instance.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Instance.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/Instance.java&r1=1051972&r2=1053871&rev=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/Instance.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Instance.java Thu Dec 30 12:29:53 2010
@@ -18,22 +18,17 @@
  */
 
 
-package org.apache.isis.core.metamodel.adapter;
+package org.apache.isis.core.metamodel.spec;
 
-import org.apache.isis.core.metamodel.spec.Specification;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 
 /**
  * Represents an instance of some element of the meta-model.
  * 
  * <p>
- * The most significant sub-interface is {@link ObjectAdapter}.  However, 
- * can also be used directly to represent associations, actions and 
- * action parameters.
- * 
- * <p>
- * Note also: in the optional <tt>no-architecture-x</tt> project there
- * is a sub-interface that allows listeners to be attached to the
- * instance.
+ * Currently the only sub-interface is {@link ObjectAdapter}.  However, 
+ * the intention is for associations, actions and action parameters to also
+ * inherit from this interface.
  */
 public interface Instance {
 
@@ -47,12 +42,7 @@ public interface Instance {
      * 
      * <p>
      * In the case of the {@link ObjectAdapter} interface, just returns <tt>null</tt>.
-     * 
-     * @return
      */
     ObjectAdapter getOwner();
-
-
-
     
 }

Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/InstanceAbstract.java (from r1051972, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/InstanceAbstract.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/InstanceAbstract.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/InstanceAbstract.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/InstanceAbstract.java&r1=1051972&r2=1053871&rev=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/InstanceAbstract.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/InstanceAbstract.java Thu Dec 30 12:29:53 2010
@@ -18,9 +18,9 @@
  */
 
 
-package org.apache.isis.core.metamodel.adapter;
+package org.apache.isis.core.metamodel.spec;
 
-import org.apache.isis.core.metamodel.spec.Specification;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 
 
 public abstract class InstanceAbstract implements Instance {
@@ -42,10 +42,12 @@ public abstract class InstanceAbstract i
         this.specification = specification;
     }
 
+    @Override
     public final ObjectAdapter getOwner() {
         return owner;
     }
 
+    @Override
     public Specification getSpecification() {
         if (specification == null) {
             specification = loadSpecification();
@@ -69,7 +71,4 @@ public abstract class InstanceAbstract i
         return specification;
     }
 
-
-
-
 }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java Thu Dec 30 12:29:53 2010
@@ -26,21 +26,19 @@ 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;
 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;
-import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-import org.apache.isis.core.metamodel.facets.Facet;
-import org.apache.isis.core.metamodel.facets.MultiTypedFacet;
-import org.apache.isis.core.metamodel.feature.FeatureType;
-import org.apache.isis.core.metamodel.interactions.ActionInvocationContext;
-import org.apache.isis.core.metamodel.interactions.UsabilityContext;
-import org.apache.isis.core.metamodel.interactions.VisibilityContext;
+import org.apache.isis.core.metamodel.consent2.Allow;
+import org.apache.isis.core.metamodel.consent2.Consent;
+import org.apache.isis.core.metamodel.consent2.InteractionInvocationMethod;
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
+import org.apache.isis.core.metamodel.facetapi.MultiTypedFacet;
+import org.apache.isis.core.metamodel.interactions2.ActionInvocationContext;
+import org.apache.isis.core.metamodel.interactions2.UsabilityContext;
+import org.apache.isis.core.metamodel.interactions2.VisibilityContext;
 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;
 
 
 public class ObjectActionSet implements ObjectAction {
@@ -113,8 +111,8 @@ public class ObjectActionSet implements 
     }
 
     @Override
-    public ObjectActionType getType() {
-        return ObjectActionType.SET;
+    public ActionType getType() {
+        return ActionType.SET;
     }
 
     @Override

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectInstantiator.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectInstantiator.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectInstantiator.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectInstantiator.java Thu Dec 30 12:29:53 2010
@@ -17,6 +17,7 @@
 package org.apache.isis.core.metamodel.spec;
 
 import org.apache.isis.core.commons.components.Injectable;
+import org.apache.isis.core.metamodel.specloader.internal.spec.dflt.ObjectSpecificationDefault;
 
 public interface ObjectInstantiator extends Injectable {
 
@@ -24,7 +25,7 @@ public interface ObjectInstantiator exte
      * Provided by the <tt>ObjectFactory</tt> when used by framework.
      * 
      * <p>
-     * Called by <tt>JavaSpecification</tt>.
+     * Called by {@link ObjectSpecificationDefault}.
      */
     Object instantiate(Class<?> cls) throws ObjectInstantiationException;
 

Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectList.java (from r1051972, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ObjectList.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectList.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectList.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ObjectList.java&r1=1051972&r2=1053871&rev=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ObjectList.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectList.java Thu Dec 30 12:29:53 2010
@@ -18,7 +18,7 @@
  */
 
 
-package org.apache.isis.core.metamodel.adapter;
+package org.apache.isis.core.metamodel.spec;
 
 import java.util.AbstractList;
 import java.util.Arrays;
@@ -29,7 +29,7 @@ import java.util.List;
 import org.apache.commons.collections.iterators.IteratorEnumeration;
 
 import org.apache.isis.core.commons.lang.ToString;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 
 
 public class ObjectList extends AbstractList<ObjectAdapter> {
@@ -80,7 +80,7 @@ public class ObjectList extends Abstract
     @Override
     public String toString() {
         final ToString s = new ToString(this);
-        s.append("elements", instanceSpecification.getFullName());
+        s.append("elements", instanceSpecification.getFullIdentifier());
 
         // title
         String title;

Copied: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectMetaModel.java (from r1051972, incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ObjectMetaModel.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectMetaModel.java?p2=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectMetaModel.java&p1=incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ObjectMetaModel.java&r1=1051972&r2=1053871&rev=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ObjectMetaModel.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectMetaModel.java Thu Dec 30 12:29:53 2010
@@ -17,11 +17,10 @@
  *  under the License.
  */
 
-package org.apache.isis.core.metamodel.adapter;
+package org.apache.isis.core.metamodel.spec;
 
-import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacet;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.Specification;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.ResolveState;
 
 /**
  * Adapters to domain objects, where the application is written in terms of domain objects and those objects are
@@ -100,21 +99,26 @@ public interface ObjectMetaModel extends
      */
     void replacePojo(Object pojo);
 
+
     /**
-     * Gets the type of facet for this object, defaulting to the facet held by the underlying specification. This is
-     * needed by collections that can have an element type but is not held by the collection, such as generic
-     * collections that lose the type information through type erasure.
+     * For (stand-alone) collections, returns the element type.
+     * 
+     * <p>
+     * For owned (aggregated) collections, the element type can be determined
+     * from the <tt>TypeOfFacet</tt> associated with the <tt>ObjectAssociation</tt>
+     * representing the collection.
      * 
-     * REVIEW should this and the {@link #setTypeOfFacet(TypeOfFacet)} be more generic allowing other facets to be added
-     * to adapters.
+     * @see #setElementSpecificationProvider(ElementSpecificationProvider)
      */
-    TypeOfFacet getTypeOfFacet();
+    ObjectSpecification getElementSpecification();
 
     /**
-     * Sets the element type facet, typically by copying it from the method or association information.
-     * 
-     * @see #getTypeOfFacet()
+     * For (stand-alone) collections, returns the element type.
+     *
+     * @see #getElementSpecification()
      */
-    void setTypeOfFacet(TypeOfFacet typeOfFacet);
+    void setElementSpecificationProvider(ElementSpecificationProvider elementSpecificationProvider);
+
+
 
 }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java Thu Dec 30 12:29:53 2010
@@ -26,68 +26,116 @@ import java.util.List;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-import org.apache.isis.core.metamodel.consent.InteractionResult;
+import org.apache.isis.core.metamodel.consent2.Consent;
+import org.apache.isis.core.metamodel.consent2.InteractionInvocationMethod;
+import org.apache.isis.core.metamodel.consent2.InteractionResult;
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
 import org.apache.isis.core.metamodel.facets.hide.HiddenFacet;
+import org.apache.isis.core.metamodel.facets.naming.describedas.DescribedAsFacet;
+import org.apache.isis.core.metamodel.facets.naming.named.NamedFacet;
 import org.apache.isis.core.metamodel.facets.object.aggregated.AggregatedFacet;
 import org.apache.isis.core.metamodel.facets.object.callbacks.CreatedCallbackFacet;
 import org.apache.isis.core.metamodel.facets.object.encodeable.EncodableFacet;
+import org.apache.isis.core.metamodel.facets.object.ident.icon.IconFacet;
+import org.apache.isis.core.metamodel.facets.object.ident.plural.PluralFacet;
+import org.apache.isis.core.metamodel.facets.object.ident.title.TitleFacet;
 import org.apache.isis.core.metamodel.facets.object.immutable.ImmutableFacet;
 import org.apache.isis.core.metamodel.facets.object.parseable.ParseableFacet;
 import org.apache.isis.core.metamodel.facets.object.value.ValueFacet;
-import org.apache.isis.core.metamodel.interactions.InteractionContext;
-import org.apache.isis.core.metamodel.interactions.ObjectTitleContext;
-import org.apache.isis.core.metamodel.interactions.ObjectValidityContext;
+import org.apache.isis.core.metamodel.interactions2.InteractionContext;
+import org.apache.isis.core.metamodel.interactions2.ObjectTitleContext;
+import org.apache.isis.core.metamodel.interactions2.ObjectValidityContext;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionContainer;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationContainer;
 
-
+/**
+ * Represents an entity or value (cf {@link java.lang.Class}) within the 
+ * metamodel.
+ * 
+ * <p>
+ * As specifications are cyclic (specifically a class will reference its 
+ * subclasses, which in turn reference their superclass) they need be created 
+ * first, and then later work out its internals.  Hence we create 
+ * {@link ObjectSpecification}s as we need them, and then introspect them later.
+ * 
+ * <p>
+ * REVIEW: why is there no Help method for classes?
+ */
 public interface ObjectSpecification extends Specification, ObjectActionContainer, ObjectAssociationContainer, Hierarchical, Dirtiable, DefaultProvider {
 
-    // REVIEW why is there no Help method for classes?
-
     public final static List<ObjectSpecification> EMPTY_LIST = Collections.emptyList();
 
 
     /**
-     * Returns the name of this specification. This will be the fully qualified name of the Class object that
-     * this object represents (i.e. it includes the package name).
+     * @return
      */
-    String getFullName();
+    Class<?> getCorrespondingClass();
 
     /**
-     * Returns the name of an icon to use for the specified object.
+     * Returns an (immutable) "full" identifier for this specification.
+     * 
+     * <p>
+     * This will be the fully qualified name of the Class object that
+     * this object represents (i.e. it includes the package name).
      */
-    String getIconName(ObjectAdapter object);
-
+    String getFullIdentifier();
+    
     /**
-     * Returns the plural name for objects of this specification.
+     * Returns an (immutable) "short" identifier for this specification.
+     * 
+     * <p>
+     * This will be the class name without the package; any text up to and 
+     * including the last period is removed.
      */
-    String getPluralName();
+    String getShortIdentifier();
 
     /**
-     * Returns the class name without the package. Removes the text up to, and including the last period
-     * (".").
+     * Returns the (singular) name for objects of this specification.
+     * 
+     * <p>
+     * Corresponds to the {@link NamedFacet#value()} of {@link NamedFacet}; 
+     * is not necessarily immutable. 
      */
-    String getShortName();
+    String getSingularName();
 
     /**
-     * Returns the (singular) name for objects of this specification.
+     * Returns the plural name for objects of this specification.
+     * 
+     * <p>
+     * Corresponds to the {@link PluralFacet#value() value} of {@link PluralFacet}; 
+     * is not necessarily immutable. 
      */
-    String getName();
+    String getPluralName();
     
     /**
      * Returns the description, if any, of the specification.
+     * 
+     * <p>
+     * Corresponds to the {@link DescribedAsFacet#value()) value} of {@link DescribedAsFacet}; 
+     * is not necessarily immutable. 
      */
+    @Override
     String getDescription();
 
     /**
      * Returns the title string for the specified object.
+     * 
+     * <p>
+     * Corresponds to the {@link TitleFacet#value()) value} of {@link TitleFacet}; 
+     * is not necessarily immutable. 
      */
     String getTitle(ObjectAdapter adapter);
 
+    /**
+     * Returns the name of an icon to use for the specified object.
+     * 
+     * <p>
+     * Corresponds to the {@link IconFacet#iconName(ObjectAdapter)) icon name} 
+     * returned by the {@link IconFacet}; 
+     * is not necessarily immutable. 
+     */
+    String getIconName(ObjectAdapter object);
+    
     boolean isAbstract();
 
 
@@ -249,11 +297,35 @@ public interface ObjectSpecification ext
 
     boolean isService();
 
+    public void markAsService();
 
 
     ////////////////////////////////////////////////////////////////
     // Introspection
     ////////////////////////////////////////////////////////////////
 
+    /**
+     * Builds actions and associations.
+     * 
+     * <p>
+     * Is called prior to running the <tt>FacetDecoratorSet</tt>
+     */
+    public void introspectTypeHierarchyAndMembers();
+
+    /**
+     * Is called after to running the <tt>FacetDecoratorSet</tt>.
+     * 
+     * <p>
+     * TODO: it's possible that this could be merged with {@link #introspectTypeHierarchyAndMembers()};
+     * need to check though, because this would cause facets to be decorated at the end of
+     * introspection, rather than midway as is currently.
+     * 
+     */
+    public void updateFromFacetValues();
+
+    public boolean isIntrospected();
+
+
+
 
 }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Specification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Specification.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Specification.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/Specification.java Thu Dec 30 12:29:53 2010
@@ -20,10 +20,9 @@
 
 package org.apache.isis.core.metamodel.spec;
 
-import org.apache.isis.core.metamodel.adapter.Instance;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.feature.FeatureType;
-import org.apache.isis.core.metamodel.feature.IdentifiedHolder;
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
+import org.apache.isis.core.metamodel.facetapi.IdentifiedHolder;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectFeature;
 import org.apache.isis.core.metamodel.spec.feature.ObjectMember;
@@ -41,10 +40,17 @@ import org.apache.isis.core.metamodel.sp
  * Introduces so that viewers can deal with abstract Instances of said.
  * 
  */
-public interface Specification extends IdentifiedHolder, NamedAndDescribed {
-
+public interface Specification extends IdentifiedHolder {
     
+
     FeatureType getFeatureType();
+
+    /**
+     * Returns a description of how the member is used - this complements the help text.
+     * 
+     * @see #getHelp()
+     */
+    String getDescription();
 
     /**
      * Return an {@link Instance} of this {@link Specification} with respect

Added: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationContext.java?rev=1053871&view=auto
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationContext.java (added)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationContext.java Thu Dec 30 12:29:53 2010
@@ -0,0 +1,40 @@
+/**
+ *  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.spec;
+
+import org.apache.isis.core.metamodel.adapter.ServicesProvider;
+import org.apache.isis.core.metamodel.authentication.AuthenticationSessionProvider;
+
+/**
+ * @version  $Rev$ $Date$
+ */
+public class SpecificationContext {
+    
+    public AuthenticationSessionProvider authenticationSessionProvider;
+    public ServicesProvider servicesProvider;
+    public ObjectInstantiator objectInstantiator;
+    public SpecificationLookup specificationLookup;
+
+    public SpecificationContext(AuthenticationSessionProvider authenticationSessionProvider,
+        ServicesProvider servicesProvider, ObjectInstantiator objectInstantiator,
+        SpecificationLookup specificationLookup) {
+        this.authenticationSessionProvider = authenticationSessionProvider;
+        this.servicesProvider = servicesProvider;
+        this.objectInstantiator = objectInstantiator;
+        this.specificationLookup = specificationLookup;
+    }
+}
\ No newline at end of file

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoader.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoader.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoader.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoader.java Thu Dec 30 12:29:53 2010
@@ -37,6 +37,13 @@ public interface SpecificationLoader ext
     ObjectSpecification loadSpecification(Class<?> cls);
 
     /**
+     * Loads the specifications of the specified types except the one specified
+     * (to prevent an infinite loop).
+     */
+    public boolean loadSpecifications(List<Class<?>> typesToLoad,
+        final Class<?> typeToIgnore);
+    
+    /**
      * Return the specification for the specified class of object.
      * 
      * <p>
@@ -60,4 +67,9 @@ public interface SpecificationLoader ext
      */
 	void setServiceClasses(List<Class<?>> serviceClasses);
 
+    /**
+     * Loads the specifications of the specified types.
+     */
+    boolean loadSpecifications(List<Class<?>> typesToLoad);
+
 }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAction.java Thu Dec 30 12:29:53 2010
@@ -25,10 +25,11 @@ import java.util.List;
 import org.apache.isis.core.commons.filters.Filter;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-import org.apache.isis.core.metamodel.interactions.AccessContext;
-import org.apache.isis.core.metamodel.interactions.ActionInvocationContext;
+import org.apache.isis.core.metamodel.consent2.Consent;
+import org.apache.isis.core.metamodel.consent2.InteractionInvocationMethod;
+import org.apache.isis.core.metamodel.interactions2.AccessContext;
+import org.apache.isis.core.metamodel.interactions2.ActionInvocationContext;
+import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.Target;
 
@@ -70,9 +71,9 @@ public interface ObjectAction extends Ob
     // //////////////////////////////////////////////////////////////////
 
     /**
-     * Returns the {@link ObjectActionType type} of action: user, exploration, prototype or debug, or that it is a set of actions.
+     * Returns the {@link ActionType type} of action: user, exploration, prototype or debug, or that it is a set of actions.
      */
-    ObjectActionType getType();
+    ActionType getType();
 
     // //////////////////////////////////////////////////////////////////
     // ReturnType

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionContainer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionContainer.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionContainer.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionContainer.java Thu Dec 30 12:29:53 2010
@@ -23,6 +23,7 @@ package org.apache.isis.core.metamodel.s
 import java.util.List;
 
 import org.apache.isis.applib.Identifier;
+import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 
 
@@ -31,12 +32,12 @@ public interface ObjectActionContainer {
     /**
      * TODO: convert to relatedResourceActions
      */
-    List<ObjectAction> getServiceActionsReturning(ObjectActionType... type);
+    List<ObjectAction> getServiceActionsReturning(ActionType... type);
 
     /**
      * Returns the action of the specified type with the specified signature.
      */
-    ObjectAction getObjectAction(ObjectActionType type, String id, List<ObjectSpecification> parameters);
+    ObjectAction getObjectAction(ActionType type, String id, List<ObjectSpecification> parameters);
 
     /**
      * Get the action object represented by the specified identity string.
@@ -44,17 +45,23 @@ public interface ObjectActionContainer {
      * <p>
      * The identity string should be {@link Identifier#toNameParmsIdentityString()}</tt>.
      */
-    ObjectAction getObjectAction(ObjectActionType type, String nameAndParmsIdentityString);
+    ObjectAction getObjectAction(ActionType type, String nameAndParmsIdentityString);
 
     /**
-     * Returns an array of actions of the specified type(s).
+     * Returns an array of actions of the specified type(s), including any
+     * contributed actions.
      * 
      * <p>
-     * If the type is <tt>null</tt>, then returns all {@link ObjectActionType#USER user},
-     * {@link ObjectActionType#EXPLORATION exploration} and {@link ObjectActionType#DEBUG
-     * debug} actions (but not {@link ObjectActionType#SET action sets}).
+     * If the type is <tt>null</tt>, then returns all {@link ActionType#USER user},
+     * {@link ActionType#EXPLORATION exploration} and {@link ActionType#DEBUG
+     * debug} actions (but not {@link ActionType#SET action sets}).
      */
-    List<ObjectAction> getObjectActions(ObjectActionType... type);
+    List<ObjectAction> getObjectActions(ActionType... type);
 
+
+    /**
+     * Returns an array of all object actions (excluding any contributed actions).
+     */
+    List<ObjectAction> getObjectActionsAll();
 
 }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionParameter.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionParameter.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionParameter.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionParameter.java Thu Dec 30 12:29:53 2010
@@ -22,8 +22,8 @@ package org.apache.isis.core.metamodel.s
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
-import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-import org.apache.isis.core.metamodel.interactions.ActionArgumentContext;
+import org.apache.isis.core.metamodel.consent2.InteractionInvocationMethod;
+import org.apache.isis.core.metamodel.interactions2.ActionArgumentContext;
 
 /**
  * Analogous to {@link ObjectAssociation}.

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=1053871&r1=1053870&r2=1053871&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 Thu Dec 30 12:29:53 2010
@@ -24,7 +24,7 @@ import org.apache.isis.core.commons.filt
 import org.apache.isis.core.commons.filters.Filter;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
-import org.apache.isis.core.metamodel.consent.Consent;
+import org.apache.isis.core.metamodel.consent2.Consent;
 
 
 public class ObjectAssociationFilters {

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=1053871&r1=1053870&r2=1053871&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 Thu Dec 30 12:29:53 2010
@@ -20,7 +20,7 @@
 
 package org.apache.isis.core.metamodel.spec.feature;
 
-import org.apache.isis.core.metamodel.feature.FeatureType;
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.Specification;
 
@@ -36,6 +36,22 @@ import org.apache.isis.core.metamodel.sp
 public interface ObjectFeature extends Specification {
 
     /**
+     * Return the name for this member - the field or action. This is based on the name of this member.
+     * 
+     * @see #getIdentifier()
+     */
+    String getName();
+
+    /**
+     * Returns a description of how the member is used - this complements the help text.
+     * 
+     * @see #getHelp()
+     */
+    @Override
+    String getDescription();
+
+    
+    /**
      * The specification of the underlying type.
      * 
      * <p>

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=1053871&r1=1053870&r2=1053871&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 Thu Dec 30 12:29:53 2010
@@ -22,13 +22,13 @@ package org.apache.isis.core.metamodel.s
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.consent.InteractionContextType;
-import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-import org.apache.isis.core.metamodel.interactions.AccessContext;
-import org.apache.isis.core.metamodel.interactions.InteractionContext;
-import org.apache.isis.core.metamodel.interactions.UsabilityContext;
-import org.apache.isis.core.metamodel.interactions.VisibilityContext;
+import org.apache.isis.core.metamodel.consent2.Consent;
+import org.apache.isis.core.metamodel.consent2.InteractionContextType;
+import org.apache.isis.core.metamodel.consent2.InteractionInvocationMethod;
+import org.apache.isis.core.metamodel.interactions2.AccessContext;
+import org.apache.isis.core.metamodel.interactions2.InteractionContext;
+import org.apache.isis.core.metamodel.interactions2.UsabilityContext;
+import org.apache.isis.core.metamodel.interactions2.VisibilityContext;
 
 
 /**

Added: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMemberContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMemberContext.java?rev=1053871&view=auto
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMemberContext.java (added)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMemberContext.java Thu Dec 30 12:29:53 2010
@@ -0,0 +1,43 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.isis.core.metamodel.spec.feature;
+
+import org.apache.isis.core.metamodel.adapter.QuerySubmitter;
+import org.apache.isis.core.metamodel.adapter.map.AdapterMap;
+import org.apache.isis.core.metamodel.authentication.AuthenticationSessionProvider;
+import org.apache.isis.core.metamodel.spec.SpecificationLookup;
+
+/**
+ * @version  $Rev$ $Date$
+ */
+public class ObjectMemberContext {
+    public AuthenticationSessionProvider authenticationSessionProvider;
+    public SpecificationLookup specificationLookup;
+    public AdapterMap adapterManager;
+    public QuerySubmitter querySubmitter;
+
+    /**
+     * 
+     */
+    public ObjectMemberContext(AuthenticationSessionProvider authenticationSessionProvider,
+        SpecificationLookup specificationLookup, AdapterMap adapterManager, QuerySubmitter querySubmitter) {
+        this.authenticationSessionProvider = authenticationSessionProvider;
+        this.specificationLookup = specificationLookup;
+        this.adapterManager = adapterManager;
+        this.querySubmitter = querySubmitter;
+    }
+}
\ No newline at end of file

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/OneToManyAssociation.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/OneToManyAssociation.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/OneToManyAssociation.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/OneToManyAssociation.java Thu Dec 30 12:29:53 2010
@@ -22,11 +22,11 @@ package org.apache.isis.core.metamodel.s
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-import org.apache.isis.core.metamodel.interactions.AccessContext;
-import org.apache.isis.core.metamodel.interactions.InteractionContext;
-import org.apache.isis.core.metamodel.interactions.ValidityContext;
+import org.apache.isis.core.metamodel.consent2.Consent;
+import org.apache.isis.core.metamodel.consent2.InteractionInvocationMethod;
+import org.apache.isis.core.metamodel.interactions2.AccessContext;
+import org.apache.isis.core.metamodel.interactions2.InteractionContext;
+import org.apache.isis.core.metamodel.interactions2.ValidityContext;
 
 
 public interface OneToManyAssociation extends ObjectAssociation, OneToManyFeature {

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/OneToOneAssociation.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/OneToOneAssociation.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/OneToOneAssociation.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/OneToOneAssociation.java Thu Dec 30 12:29:53 2010
@@ -22,12 +22,12 @@ package org.apache.isis.core.metamodel.s
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-import org.apache.isis.core.metamodel.interactions.AccessContext;
-import org.apache.isis.core.metamodel.interactions.InteractionContext;
-import org.apache.isis.core.metamodel.interactions.PropertyAccessContext;
-import org.apache.isis.core.metamodel.interactions.ValidityContext;
+import org.apache.isis.core.metamodel.consent2.Consent;
+import org.apache.isis.core.metamodel.consent2.InteractionInvocationMethod;
+import org.apache.isis.core.metamodel.interactions2.AccessContext;
+import org.apache.isis.core.metamodel.interactions2.InteractionContext;
+import org.apache.isis.core.metamodel.interactions2.PropertyAccessContext;
+import org.apache.isis.core.metamodel.interactions2.ValidityContext;
 
 
 /**

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflector.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflector.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflector.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflector.java Thu Dec 30 12:29:53 2010
@@ -21,31 +21,10 @@
 package org.apache.isis.core.metamodel.specloader;
 
 import org.apache.isis.core.commons.components.ApplicationScopedComponent;
-import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContextAware;
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
-import org.apache.isis.core.metamodel.spec.SpecificationLookup;
-import org.apache.isis.core.metamodel.specloader.classsubstitutor.ClassSubstitutor;
-import org.apache.isis.core.metamodel.specloader.progmodelfacets.ProgrammingModelFacets;
-import org.apache.isis.core.metamodel.specloader.traverser.SpecificationTraverser;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidator;
 
-public interface ObjectReflector extends SpecificationLoader, SpecificationLookup,
+public interface ObjectReflector extends SpecificationLoader, 
 		ApplicationScopedComponent, RuntimeContextAware {
 
-	/**
-	 * The configured {@link ClassSubstitutor}.
-	 */
-	ClassSubstitutor getClassSubstitutor();
-
-	/**
-	 * The configured {@link RuntimeContext}.
-	 */
-	RuntimeContext getRuntimeContext();
-
-	SpecificationTraverser getSpecificationTraverser();
-
-	MetaModelValidator getMetaModelValidator();
-
-	ProgrammingModelFacets getProgrammingModelFacets();
 }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java?rev=1053871&r1=1053870&r2=1053871&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java Thu Dec 30 12:29:53 2010
@@ -33,34 +33,49 @@ import java.util.Set;
 
 import org.apache.log4j.Logger;
 
+import com.google.common.collect.Lists;
+
 import org.apache.isis.core.commons.debug.DebugInfo;
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.commons.ensure.Assert;
 import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.core.commons.lang.JavaClassUtils;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.ObjectList;
+import org.apache.isis.core.metamodel.adapter.ServicesProvider;
+import org.apache.isis.core.metamodel.adapter.map.AdapterMap;
+import org.apache.isis.core.metamodel.authentication.AuthenticationSessionProvider;
 import org.apache.isis.core.metamodel.config.IsisConfiguration;
+import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetdecorator.FacetDecorator;
 import org.apache.isis.core.metamodel.facetdecorator.FacetDecoratorSet;
-import org.apache.isis.core.metamodel.facets.Facet;
-import org.apache.isis.core.metamodel.java5.JavaSpecification;
+import org.apache.isis.core.metamodel.facets.SpecificationFacets;
+import org.apache.isis.core.metamodel.layout.MemberLayoutArranger;
+import org.apache.isis.core.metamodel.progmodel.ProgrammingModel;
+import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContextAware;
 import org.apache.isis.core.metamodel.runtimecontext.noruntime.RuntimeContextNoRuntime;
-import org.apache.isis.core.metamodel.spec.InstanceCollectionSpecification;
-import org.apache.isis.core.metamodel.spec.IntrospectableSpecificationAbstract;
+import org.apache.isis.core.metamodel.spec.ObjectInstantiator;
+import org.apache.isis.core.metamodel.spec.ObjectList;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.SpecificationFacets;
+import org.apache.isis.core.metamodel.spec.SpecificationContext;
+import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.core.metamodel.spec.SpecificationLoaderAware;
+import org.apache.isis.core.metamodel.spec.SpecificationLookup;
 import org.apache.isis.core.metamodel.spec.SpecificationLookupAware;
+import org.apache.isis.core.metamodel.spec.feature.ObjectMemberContext;
 import org.apache.isis.core.metamodel.specloader.classsubstitutor.ClassSubstitutor;
 import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistry;
 import org.apache.isis.core.metamodel.specloader.collectiontyperegistry.CollectionTypeRegistryDefault;
 import org.apache.isis.core.metamodel.specloader.internal.cache.SimpleSpecificationCache;
 import org.apache.isis.core.metamodel.specloader.internal.cache.SpecificationCache;
 import org.apache.isis.core.metamodel.specloader.internal.facetprocessor.FacetProcessor;
-import org.apache.isis.core.metamodel.specloader.progmodelfacets.ProgrammingModelFacets;
+import org.apache.isis.core.metamodel.specloader.internal.spec.CreateObjectContext;
+import org.apache.isis.core.metamodel.specloader.internal.spec.FacetedMethodsBuilderContext;
+import org.apache.isis.core.metamodel.specloader.internal.spec.IntrospectionContext;
+import org.apache.isis.core.metamodel.specloader.internal.spec.ObjectSpecificationAbstract;
+import org.apache.isis.core.metamodel.specloader.internal.spec.dflt.ObjectSpecificationDefault;
+import org.apache.isis.core.metamodel.specloader.internal.spec.objectlist.ObjectSpecificationForObjectList;
 import org.apache.isis.core.metamodel.specloader.traverser.SpecificationTraverser;
 import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidator;
 
@@ -70,7 +85,7 @@ import org.apache.isis.core.metamodel.sp
  * <p>
  * The implementation provides for a degree of pluggability:
  * <ul>
- * <li>The most important plug-in point is {@link ProgrammingModelFacets} that
+ * <li>The most important plug-in point is {@link ProgrammingModel} that
  * specifies the set of {@link Facet} that make up programming model. If not
  * specified then defaults to {@link ProgrammingModelFacetsJava5} (which should
  * be used as a starting point for your own customizations).
@@ -120,7 +135,7 @@ public class ObjectReflectorDefault impl
     /**
      * Injected in the constructor.
      */
-    private final ProgrammingModelFacets programmingModelFacets;
+    private final ProgrammingModel programmingModel;
 
     /**
      * Defaulted in the constructor.
@@ -149,12 +164,13 @@ public class ObjectReflectorDefault impl
      */
     private RuntimeContext runtimeContext;
 
-    private SpecificationTraverser specificationTraverser;
+    private final SpecificationTraverser specificationTraverser;
+    private final MemberLayoutArranger memberLayoutArranger;
 
     /**
      * Priming cache, optionally {@link #setServiceClasses(List) injected}.
      */
-    private List<Class<?>> serviceClasses = new ArrayList<Class<?>>();
+    private List<Class<?>> serviceClasses = Lists.newArrayList();
 
     /**
      * Optionally {@link #setValidator(MetaModelValidator) injected}.
@@ -176,23 +192,26 @@ public class ObjectReflectorDefault impl
             final ClassSubstitutor classSubstitutor,
             final CollectionTypeRegistry collectionTypeRegistry,
             final SpecificationTraverser specificationTraverser,
-            final ProgrammingModelFacets programmingModelFacets, 
+            final MemberLayoutArranger memberLayoutArranger,
+            final ProgrammingModel programmingModel, 
             final Set<FacetDecorator> facetDecorators, 
             final MetaModelValidator metaModelValidator) {
         
         ensureThatArg(configuration, is(notNullValue()));
         ensureThatArg(classSubstitutor, is(notNullValue()));
         ensureThatArg(collectionTypeRegistry, is(notNullValue()));
-        ensureThatArg(programmingModelFacets, is(notNullValue()));
         ensureThatArg(specificationTraverser, is(notNullValue()));
+        ensureThatArg(memberLayoutArranger, is(notNullValue()));
+        ensureThatArg(programmingModel, is(notNullValue()));
         ensureThatArg(facetDecorators, is(notNullValue()));
         ensureThatArg(metaModelValidator, is(notNullValue()));
 
         this.configuration = configuration;
         this.classSubstitutor = classSubstitutor;
         this.collectionTypeRegistry = collectionTypeRegistry;
-        this.programmingModelFacets = programmingModelFacets;
+        this.programmingModel = programmingModel;
         this.specificationTraverser = specificationTraverser;
+        this.memberLayoutArranger = memberLayoutArranger;
         
         this.facetDecoratorSet = new FacetDecoratorSet();
         for (final FacetDecorator facetDecorator : facetDecorators) {
@@ -202,7 +221,7 @@ public class ObjectReflectorDefault impl
         this.metaModelValidator = metaModelValidator;
         
         this.facetProcessor = new FacetProcessor(configuration, this,
-                collectionTypeRegistry, programmingModelFacets);
+                collectionTypeRegistry, programmingModel);
         
         this.cache = new SimpleSpecificationCache();
     }
@@ -233,6 +252,7 @@ public class ObjectReflectorDefault impl
         }
         injectInto(runtimeContext);
         injectInto(specificationTraverser);
+        injectInto(memberLayoutArranger);
         injectInto(metaModelValidator);
 
         // wire subcomponents into each other
@@ -244,7 +264,7 @@ public class ObjectReflectorDefault impl
         collectionTypeRegistry.init();
         specificationTraverser.init();
         facetProcessor.init();
-        programmingModelFacets.init();
+        programmingModel.init();
         metaModelValidator.init();
         
         // prime cache and validate
@@ -370,6 +390,7 @@ public class ObjectReflectorDefault impl
      * Loads the specifications of the specified types except the one specified
      * (to prevent an infinite loop).
      */
+    @Override
     public boolean loadSpecifications(List<Class<?>> typesToLoad,
             final Class<?> typeToIgnore) {
         boolean anyLoadedAsNull = false;
@@ -383,6 +404,10 @@ public class ObjectReflectorDefault impl
         return anyLoadedAsNull;
     }
     
+    /**
+     * Loads the specifications of the specified types.
+     */
+    @Override
     public boolean loadSpecifications(List<Class<?>> typesToLoad) {
         return loadSpecifications(typesToLoad, null);
     }
@@ -393,19 +418,30 @@ public class ObjectReflectorDefault impl
      */
     private ObjectSpecification createSpecification(final Class<?> cls) {
 
+        final AuthenticationSessionProvider authenticationSessionProvider = getRuntimeContext().getAuthenticationSessionProvider();
+        final SpecificationLookup specificationLookup = getRuntimeContext().getSpecificationLookup();
+        final ServicesProvider servicesProvider = getRuntimeContext().getServicesProvider();
+        final ObjectInstantiator objectInstantiator = getRuntimeContext().getObjectInstantiator();
+        
+        final SpecificationContext specContext = new SpecificationContext(authenticationSessionProvider, servicesProvider, objectInstantiator, specificationLookup);
+        
         if (ObjectList.class.isAssignableFrom(cls)) {
-            return new InstanceCollectionSpecification(this,
-                    getRuntimeContext().getAuthenticationSessionProvider(),
-                    getRuntimeContext().getServicesProvider(),
-                    getRuntimeContext().getObjectInstantiator());
+            return new ObjectSpecificationForObjectList(specContext);
         } else {
-            return new JavaSpecification(cls, this, 
-                getRuntimeContext().getAuthenticationSessionProvider(), 
-                getRuntimeContext().getServicesProvider(),
-                getRuntimeContext().getAdapterMap(), 
-                getRuntimeContext().getObjectInstantiator(),
-                getRuntimeContext().getDependencyInjector(),
-                getRuntimeContext().getQuerySubmitter());
+            SpecificationLoader specificationLoader = this;
+            final AdapterMap adapterMap = getRuntimeContext().getAdapterMap();
+            final ObjectMemberContext objectMemberContext = new ObjectMemberContext(authenticationSessionProvider, specificationLookup, adapterMap, getRuntimeContext().getQuerySubmitter());
+            final IntrospectionContext introspectionContext = new IntrospectionContext(getClassSubstitutor(), getMemberLayoutArranger());
+            final DependencyInjector dependencyInjector = getRuntimeContext().getDependencyInjector();
+            final CreateObjectContext createObjectContext = new CreateObjectContext(adapterMap, dependencyInjector);
+            final FacetedMethodsBuilderContext facetedMethodsBuilderContext = 
+                new FacetedMethodsBuilderContext(specificationLoader , classSubstitutor, specificationTraverser, facetProcessor);
+            return new ObjectSpecificationDefault(cls,
+                facetedMethodsBuilderContext,
+                introspectionContext,
+                specContext, 
+                objectMemberContext,
+                createObjectContext);
         }
     }
 
@@ -444,13 +480,12 @@ public class ObjectReflectorDefault impl
     // TODO: should probably remove 
     private ObjectSpecification introspectSpecificationIfRequired(
             ObjectSpecification spec) {
-        if (spec instanceof IntrospectableSpecificationAbstract) {
-            IntrospectableSpecificationAbstract introspectableSpec = (IntrospectableSpecificationAbstract) spec;
-            if(!introspectableSpec.isIntrospected()) {
-                introspectableSpec.introspectTypeHierarchyAndMembers();
-                facetDecoratorSet.decorate(introspectableSpec);
-                introspectableSpec.completeIntrospection();
-            }
+        if (spec instanceof ObjectSpecificationAbstract) {
+        }
+        if(!spec.isIntrospected()) {
+            spec.introspectTypeHierarchyAndMembers();
+            facetDecoratorSet.decorate(spec);
+            spec.updateFromFacetValues();
         }
         return spec;        
     }
@@ -498,7 +533,7 @@ public class ObjectReflectorDefault impl
             @Override
             public int compare(final ObjectSpecification s1,
                     final ObjectSpecification s2) {
-                return s1.getShortName().compareToIgnoreCase(s2.getShortName());
+                return s1.getShortIdentifier().compareToIgnoreCase(s2.getShortIdentifier());
             }
         });
         for (int i = 0; i < specs.length; i++) {
@@ -515,9 +550,9 @@ public class ObjectReflectorDefault impl
             str.append(specification.isValueOrIsAggregated() ? "A" : ".");
             str.append(!specification.isCollectionOrIsAggregated() ? "I" : ".");
             str.append("  ");
-            str.append(specification.getShortName());
+            str.append(specification.getShortIdentifier());
             str.append("  [fqc=");
-            str.append(specification.getFullName());
+            str.append(specification.getFullIdentifier());
             str.append(",type=");
             str.append(specification.getClass().getName());
             str.appendln("]");
@@ -552,7 +587,6 @@ public class ObjectReflectorDefault impl
     /**
      * As per {@link #setRuntimeContext(RuntimeContext)}.
      */
-    @Override
     public RuntimeContext getRuntimeContext() {
         return runtimeContext;
     }
@@ -584,36 +618,36 @@ public class ObjectReflectorDefault impl
     // Dependencies (injected from constructor)
     // ////////////////////////////////////////////////////////////////////
 
-    public IsisConfiguration getIsisConfiguration() {
+    protected IsisConfiguration getIsisConfiguration() {
         return configuration;
     }
 
-    @Override
-    public ClassSubstitutor getClassSubstitutor() {
-        return classSubstitutor;
-    }
-
-    public CollectionTypeRegistry getCollectionTypeRegistry() {
+    protected CollectionTypeRegistry getCollectionTypeRegistry() {
         return collectionTypeRegistry;
     }
+    
+    protected ClassSubstitutor getClassSubstitutor() {
+        return classSubstitutor;
+    }
 
-    @Override
-    public SpecificationTraverser getSpecificationTraverser() {
+    protected SpecificationTraverser getSpecificationTraverser() {
         return specificationTraverser;
     }
     
-    @Override
-    public ProgrammingModelFacets getProgrammingModelFacets() {
-        return programmingModelFacets;
+    protected ProgrammingModel getProgrammingModelFacets() {
+        return programmingModel;
     }
-
-    public Set<FacetDecorator> getFacetDecoratorSet() {
-        return facetDecoratorSet.getFacetDecorators();
+    
+    protected MemberLayoutArranger getMemberLayoutArranger() {
+        return memberLayoutArranger;
     }
 
-    @Override
-    public MetaModelValidator getMetaModelValidator() {
+    protected MetaModelValidator getMetaModelValidator() {
         return metaModelValidator;
     }
-
+
+    protected Set<FacetDecorator> getFacetDecoratorSet() {
+        return facetDecoratorSet.getFacetDecorators();
+    }
+    
 }



Mime
View raw message