isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1055214 - in /incubator/isis/trunk: alternatives/objectstore/nosql/src/test/java/org/apache/isis/alternatives/objectstore/nosql/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ core/metamodel/src/main/java/org/a...
Date Tue, 04 Jan 2011 22:22:46 GMT
Author: danhaywood
Date: Tue Jan  4 22:22:45 2011
New Revision: 1055214

URL: http://svn.apache.org/viewvc?rev=1055214&view=rev
Log:
refining the RuntimeContextNoRuntime impl, was causing some tests to fail (ISIS-62)

Modified:
    incubator/isis/trunk/alternatives/objectstore/nosql/src/test/java/org/apache/isis/alternatives/objectstore/nosql/TrialObjects.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContextAbstract.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/noruntime/RuntimeContextNoRuntime.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationContext.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMemberContext.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/CreateObjectContext.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/IntrospectionContext.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationImpl.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationImpl.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
    incubator/isis/trunk/core/src/docbkx/guide/isis-core.xml
    incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/fixtures/CheckSpecificationsLoadedForFitNesse.java

Modified: incubator/isis/trunk/alternatives/objectstore/nosql/src/test/java/org/apache/isis/alternatives/objectstore/nosql/TrialObjects.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/alternatives/objectstore/nosql/src/test/java/org/apache/isis/alternatives/objectstore/nosql/TrialObjects.java?rev=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/alternatives/objectstore/nosql/src/test/java/org/apache/isis/alternatives/objectstore/nosql/TrialObjects.java
(original)
+++ incubator/isis/trunk/alternatives/objectstore/nosql/src/test/java/org/apache/isis/alternatives/objectstore/nosql/TrialObjects.java
Tue Jan  4 22:22:45 2011
@@ -27,7 +27,7 @@ import com.google.common.collect.Maps;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
 import org.apache.isis.core.metamodel.adapter.map.AdapterMap;
-import org.apache.isis.core.metamodel.adapter.map.AdapterMapDelegator;
+import org.apache.isis.core.metamodel.adapter.map.AdapterMapAbstract;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.config.internal.PropertiesConfiguration;
 import org.apache.isis.core.metamodel.facetapi.IdentifiedHolder;
@@ -57,6 +57,28 @@ public class TrialObjects {
 
         PropertiesConfiguration configuration = new PropertiesConfiguration();
 
+        final AdapterMapAbstract adapterMap = new AdapterMapAbstract() {
+            
+            @Override
+            public ObjectAdapter getAdapterFor(Object pojo) {
+                throw new UnsupportedOperationException();
+            }
+            
+            @Override
+            public ObjectAdapter adapterFor(Object pojo, ObjectAdapter ownerAdapter, IdentifiedHolder
identifiedHolder) {
+                if (adapters.get(pojo) != null) {
+                    return adapters.get(pojo);
+                } else {
+                    return factory.createAdapter(pojo, null);
+                }
+            }
+            
+            @Override
+            public ObjectAdapter adapterFor(Object pattern) {
+                return adapters.get(pattern);
+            }
+        };
+
         reflector =
             new ObjectReflectorDefault(configuration, new TestClassSubstitutor(), new CollectionTypeRegistryDefault(),
                 new SpecificationTraverserDefault(), new MemberLayoutArrangerDefault(), new
ProgrammingModelFacetsJava5(), new HashSet<FacetDecorator>(),
@@ -65,41 +87,27 @@ public class TrialObjects {
 
             @Override
             public AdapterMap getAdapterMap() {
-                return new AdapterMapDelegator(super.getAdapterMap()) {
-                    @Override
-                    public ObjectAdapter adapterFor(Object pattern) {
-                        return adapters.get(pattern);
-                    }
-
-                    @Override
-                    public ObjectAdapter adapterFor(Object pojo, ObjectAdapter ownerAdapter,
IdentifiedHolder identifiedHolder) {
-                        if (adapters.get(pojo) != null) {
-                            return adapters.get(pojo);
-                        } else {
-                            return factory.createAdapter(pojo, null);
-                        }
-                    }
-                };
+                return adapterMap;
             }
         });
         reflector.init();
 
         factory = new AdapterFactoryAbstract() {
             @Override
-            public TestProxyAdapter createAdapter(Object pojo, Oid oid) {
+            public ObjectAdapter createAdapter(Object pojo, Oid oid) {
                 ObjectSpecification specification = reflector.loadSpecification(pojo.getClass());
                 ResolveState state =
                     oid == null ? ResolveState.VALUE : oid.isTransient() ? ResolveState.TRANSIENT
: ResolveState.GHOST;
 
-                final TestProxyAdapter testProxyObjectAdapter = new TestProxyAdapter();
-                testProxyObjectAdapter.setupResolveState(state);
-                testProxyObjectAdapter.setupObject(pojo);
-                testProxyObjectAdapter.setupOid(oid);
-                testProxyObjectAdapter.setupSpecification(specification);
+                final TestProxyAdapter objectAdapter = new TestProxyAdapter();
+                objectAdapter.setupResolveState(state);
+                objectAdapter.setupObject(pojo);
+                objectAdapter.setupOid(oid);
+                objectAdapter.setupSpecification(specification);
 
-                adapters.put(pojo, testProxyObjectAdapter);
+                adapters.put(pojo, objectAdapter);
 
-                return testProxyObjectAdapter;
+                return objectAdapter;
             }
         };
     }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContextAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContextAbstract.java?rev=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContextAbstract.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContextAbstract.java
Tue Jan  4 22:22:45 2011
@@ -49,6 +49,10 @@ public abstract class RuntimeContextAbst
         	RuntimeContextAware cast = RuntimeContextAware.class.cast(candidate);
             cast.setRuntimeContext(this);
         }
+        injectSubcomponentsInto(candidate);
+	}
+
+    protected void injectSubcomponentsInto(Object candidate) {
         getAdapterMap().injectInto(candidate);
         getAuthenticationSessionProvider().injectInto(candidate);
         getDependencyInjector().injectInto(candidate);
@@ -59,7 +63,7 @@ public abstract class RuntimeContextAbst
         getQuerySubmitter().injectInto(candidate);
         getServicesProvider().injectInto(candidate);
         getSpecificationLookup().injectInto(candidate);
-	}
+    }
 
 	
 	@Override

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=1055214&r1=1055213&r2=1055214&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
Tue Jan  4 22:22:45 2011
@@ -23,24 +23,42 @@ package org.apache.isis.core.metamodel.r
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.isis.applib.query.Query;
 import org.apache.isis.core.metamodel.adapter.DomainObjectServices;
+import org.apache.isis.core.metamodel.adapter.DomainObjectServicesAbstract;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ObjectDirtier;
+import org.apache.isis.core.metamodel.adapter.ObjectDirtierAbstract;
 import org.apache.isis.core.metamodel.adapter.ObjectPersistor;
+import org.apache.isis.core.metamodel.adapter.ObjectPersistorAbstract;
 import org.apache.isis.core.metamodel.adapter.QuerySubmitter;
+import org.apache.isis.core.metamodel.adapter.QuerySubmitterAbstract;
 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.adapter.map.AdapterMapAbstract;
+import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSessionProvider;
+import org.apache.isis.core.metamodel.authentication.AuthenticationSessionProviderAbstract;
+import org.apache.isis.core.metamodel.facetapi.IdentifiedHolder;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjectorAbstract;
 import org.apache.isis.core.metamodel.runtimecontext.RuntimeContextAbstract;
+import org.apache.isis.core.metamodel.spec.ObjectInstantiationException;
 import org.apache.isis.core.metamodel.spec.ObjectInstantiator;
+import org.apache.isis.core.metamodel.spec.ObjectInstantiatorAbstract;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 
 public class RuntimeContextNoRuntime extends RuntimeContextAbstract {
 
 	private DependencyInjector dependencyInjector;
+    private AuthenticationSessionProviderAbstract authenticationSessionProvider;
+    private AdapterMapAbstract adapterMap;
+    private ObjectInstantiatorAbstract objectInstantiator;
+    private ObjectDirtierAbstract objectDirtier;
+    private ObjectPersistorAbstract objectPersistor;
+    private DomainObjectServicesAbstract domainObjectServices;
+    private QuerySubmitterAbstract querySubmitter;
 
     public RuntimeContextNoRuntime() {
         dependencyInjector = new DependencyInjectorAbstract() {
@@ -54,8 +72,147 @@ public class RuntimeContextNoRuntime ext
                 
             }
         };
+        authenticationSessionProvider = new AuthenticationSessionProviderAbstract() {
+            @Override
+            public AuthenticationSession getAuthenticationSession() {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+        };
+        adapterMap = new AdapterMapAbstract() {
+            
+            @Override
+            public ObjectAdapter getAdapterFor(Object pojo) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public ObjectAdapter adapterFor(Object pojo, ObjectAdapter ownerAdapter, IdentifiedHolder
identifiedHolder) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public ObjectAdapter adapterFor(Object domainObject) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+        };
+        objectInstantiator = new ObjectInstantiatorAbstract() {
+            
+            @Override
+            public Object instantiate(Class<?> cls) throws ObjectInstantiationException
{
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+        };
+        objectDirtier = new ObjectDirtierAbstract() {
+            
+            @Override
+            public void objectChanged(Object object) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public void objectChanged(ObjectAdapter adapter) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+        };
+        objectPersistor = new ObjectPersistorAbstract() {
+            
+            @Override
+            public void remove(ObjectAdapter adapter) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public void makePersistent(ObjectAdapter adapter) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+        };
+        domainObjectServices = new DomainObjectServicesAbstract() {
+            
+            @Override
+            public void warnUser(String message) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public void resolve(Object parent, Object field) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public void resolve(Object parent) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public void raiseError(String message) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public void informUser(String message) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public List<String> getPropertyNames() {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public String getProperty(String name) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public boolean flush() {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public ObjectAdapter createTransientInstance(ObjectSpecification spec) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public void commit() {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+        };
+        querySubmitter = new QuerySubmitterAbstract() {
+            
+            @Override
+            public <T> ObjectAdapter firstMatchingQuery(Query<T> query) {
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+            
+            @Override
+            public <T> List<ObjectAdapter> allMatchingQuery(Query<T> query)
{
+                throw new UnsupportedOperationException(
+                "Not supported by this implementation of RuntimeContext");
+            }
+        };
 	}
-
+
 
 	/////////////////////////////////////////////
 	// Components
@@ -63,44 +220,37 @@ public class RuntimeContextNoRuntime ext
 
     @Override
     public AuthenticationSessionProvider getAuthenticationSessionProvider() {
-        throw new UnsupportedOperationException(
-        "Not supported by this implementation of RuntimeContext");
+        return authenticationSessionProvider;
     }
     
     @Override
     public AdapterMap getAdapterMap() {
-        throw new UnsupportedOperationException(
-        "Not supported by this implementation of RuntimeContext");
+        return adapterMap;
     }
 
     @Override
     public ObjectInstantiator getObjectInstantiator() {
-        throw new UnsupportedOperationException(
-        "Not supported by this implementation of RuntimeContext");
+        return objectInstantiator;
     }
     
     @Override
     public ObjectDirtier getObjectDirtier() {
-        throw new UnsupportedOperationException(
-        "Not supported by this implementation of RuntimeContext");
+        return objectDirtier;
     }
 
     @Override
     public ObjectPersistor getObjectPersistor() {
-        throw new UnsupportedOperationException(
-        "Not supported by this implementation of RuntimeContext");
+        return objectPersistor;
     }
 
     @Override
     public DomainObjectServices getDomainObjectServices() {
-        throw new UnsupportedOperationException(
-        "Not supported by this implementation of RuntimeContext");
+        return domainObjectServices;
     }
 
     @Override
     public QuerySubmitter getQuerySubmitter() {
-        throw new UnsupportedOperationException(
-        "Not supported by this implementation of RuntimeContext");
+        return querySubmitter;
     }
 
     @Override
@@ -136,8 +286,4 @@ public class RuntimeContextNoRuntime ext
 	    };
 	}
 
-
-
-
-
 }

Modified: 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=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationContext.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationContext.java
Tue Jan  4 22:22:45 2011
@@ -19,15 +19,12 @@ package org.apache.isis.core.metamodel.s
 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;
+    private final AuthenticationSessionProvider authenticationSessionProvider;
+    private final ServicesProvider servicesProvider;
+    private final ObjectInstantiator objectInstantiator;
+    private final SpecificationLookup specificationLookup;
 
     public SpecificationContext(AuthenticationSessionProvider authenticationSessionProvider,
         ServicesProvider servicesProvider, ObjectInstantiator objectInstantiator,
@@ -37,4 +34,20 @@ public class SpecificationContext {
         this.objectInstantiator = objectInstantiator;
         this.specificationLookup = specificationLookup;
     }
+
+    public AuthenticationSessionProvider getAuthenticationSessionProvider() {
+        return authenticationSessionProvider;
+    }
+
+    public ServicesProvider getServicesProvider() {
+        return servicesProvider;
+    }
+
+    public ObjectInstantiator getObjectInstantiator() {
+        return objectInstantiator;
+    }
+
+    public SpecificationLookup getSpecificationLookup() {
+        return specificationLookup;
+    }
 }
\ No newline at end of file

Modified: 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=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMemberContext.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMemberContext.java
Tue Jan  4 22:22:45 2011
@@ -21,18 +21,13 @@ import org.apache.isis.core.metamodel.ad
 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;
-
-    /**
-     * 
-     */
+
+    private final AuthenticationSessionProvider authenticationSessionProvider;
+    private final SpecificationLookup specificationLookup;
+    private final AdapterMap adapterManager;
+    private final QuerySubmitter querySubmitter;
+
     public ObjectMemberContext(AuthenticationSessionProvider authenticationSessionProvider,
         SpecificationLookup specificationLookup, AdapterMap adapterManager, QuerySubmitter
querySubmitter) {
         this.authenticationSessionProvider = authenticationSessionProvider;
@@ -40,4 +35,20 @@ public class ObjectMemberContext {
         this.adapterManager = adapterManager;
         this.querySubmitter = querySubmitter;
     }
+
+    public AuthenticationSessionProvider getAuthenticationSessionProvider() {
+        return authenticationSessionProvider;
+    }
+
+    public SpecificationLookup getSpecificationLookup() {
+        return specificationLookup;
+    }
+
+    public AdapterMap getAdapterManager() {
+        return adapterManager;
+    }
+
+    public QuerySubmitter getQuerySubmitter() {
+        return querySubmitter;
+    }
 }
\ No newline at end of file

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/CreateObjectContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/CreateObjectContext.java?rev=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/CreateObjectContext.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/CreateObjectContext.java
Tue Jan  4 22:22:45 2011
@@ -19,18 +19,20 @@ package org.apache.isis.core.metamodel.s
 import org.apache.isis.core.metamodel.adapter.map.AdapterMap;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 
-/**
- * @version  $Rev$ $Date$
- */
 public class CreateObjectContext {
-    public AdapterMap adapterMap;
-    public DependencyInjector dependencyInjector;
+    private final AdapterMap adapterMap;
+    private final DependencyInjector dependencyInjector;
 
-    /**
-     * 
-     */
     public CreateObjectContext(AdapterMap adapterMap, DependencyInjector dependencyInjector)
{
         this.adapterMap = adapterMap;
         this.dependencyInjector = dependencyInjector;
     }
+
+    public AdapterMap getAdapterMap() {
+        return adapterMap;
+    }
+
+    public DependencyInjector getDependencyInjector() {
+        return dependencyInjector;
+    }
 }
\ No newline at end of file

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/IntrospectionContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/IntrospectionContext.java?rev=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/IntrospectionContext.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/IntrospectionContext.java
Tue Jan  4 22:22:45 2011
@@ -20,12 +20,20 @@ import org.apache.isis.core.metamodel.la
 import org.apache.isis.core.metamodel.specloader.classsubstitutor.ClassSubstitutor;
 
 public class IntrospectionContext {
-    public final ClassSubstitutor classSubstitutor;
-    public final MemberLayoutArranger memberLayoutArranger;
+    private final ClassSubstitutor classSubstitutor;
+    private final MemberLayoutArranger memberLayoutArranger;
 
     public IntrospectionContext(ClassSubstitutor classSubstitutor,
         MemberLayoutArranger memberLayoutArranger) {
         this.classSubstitutor = classSubstitutor;
         this.memberLayoutArranger = memberLayoutArranger;
     }
+
+    public ClassSubstitutor getClassSubstitutor() {
+        return classSubstitutor;
+    }
+
+    public MemberLayoutArranger getMemberLayoutArranger() {
+        return memberLayoutArranger;
+    }
 }
\ No newline at end of file

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java?rev=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
Tue Jan  4 22:22:45 2011
@@ -78,10 +78,10 @@ public abstract class ObjectMemberAbstra
         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;
+        this.authenticationSessionProvider = objectMembercontext.getAuthenticationSessionProvider();
+        this.specificationLookup = objectMembercontext.getSpecificationLookup();
+        this.adapterMap = objectMembercontext.getAdapterManager();
+        this.querySubmitter = objectMembercontext.getQuerySubmitter();
     }
 
 

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java?rev=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
Tue Jan  4 22:22:45 2011
@@ -170,10 +170,10 @@ public abstract class ObjectSpecificatio
         this.identifier = Identifier.classIdentifier(introspectedClass);
 
         // dependencies
-        this.authenticationSessionProvider = specificationContext.authenticationSessionProvider;
-        this.servicesProvider = specificationContext.servicesProvider;
-        this.objectInstantiator = specificationContext.objectInstantiator;
-        this.specificationLookup = specificationContext.specificationLookup;
+        this.authenticationSessionProvider = specificationContext.getAuthenticationSessionProvider();
+        this.servicesProvider = specificationContext.getServicesProvider();
+        this.objectInstantiator = specificationContext.getObjectInstantiator();
+        this.specificationLookup = specificationContext.getSpecificationLookup();
     }
 
     // //////////////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationImpl.java?rev=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationImpl.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationImpl.java
Tue Jan  4 22:22:45 2011
@@ -54,7 +54,7 @@ public class OneToManyAssociationImpl ex
     public OneToManyAssociationImpl(
     		final FacetedMethod facetedMethod,
             final ObjectMemberContext objectMemberContext) {
-        super(facetedMethod, FeatureType.COLLECTION, getSpecification(objectMemberContext.specificationLookup,
facetedMethod.getType()), objectMemberContext);
+        super(facetedMethod, FeatureType.COLLECTION, getSpecification(objectMemberContext.getSpecificationLookup(),
facetedMethod.getType()), objectMemberContext);
     }
 
     // /////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationImpl.java?rev=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationImpl.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationImpl.java
Tue Jan  4 22:22:45 2011
@@ -61,7 +61,7 @@ public class OneToOneAssociationImpl ext
             final ObjectMemberContext objectMemberContext) {
         super(facetedMethod, 
             FeatureType.PROPERTY, 
-            getSpecification(objectMemberContext.specificationLookup, facetedMethod.getType()),

+            getSpecification(objectMemberContext.getSpecificationLookup(), facetedMethod.getType()),

             objectMemberContext);
     }
 

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java?rev=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
(original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
Tue Jan  4 22:22:45 2011
@@ -538,19 +538,19 @@ public class ObjectSpecificationDefault 
     // //////////////////////////////////////////////////////////////////
 
     protected AdapterMap getAdapterMap() {
-        return createObjectContext.adapterMap;
+        return createObjectContext.getAdapterMap();
     }
 
     protected DependencyInjector getDependencyInjector() {
-        return createObjectContext.dependencyInjector;
+        return createObjectContext.getDependencyInjector();
     }
 
     private ClassSubstitutor getClassSubstitutor() {
-        return introspectionContext.classSubstitutor;
+        return introspectionContext.getClassSubstitutor();
     }
 
     private MemberLayoutArranger getMemberLayoutArranger() {
-        return introspectionContext.memberLayoutArranger;
+        return introspectionContext.getMemberLayoutArranger();
     }
 
 }

Modified: incubator/isis/trunk/core/src/docbkx/guide/isis-core.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/src/docbkx/guide/isis-core.xml?rev=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/core/src/docbkx/guide/isis-core.xml (original)
+++ incubator/isis/trunk/core/src/docbkx/guide/isis-core.xml Tue Jan  4 22:22:45 2011
@@ -4362,9 +4362,10 @@ Persistable: User Persistable</screen>
 
           <listitem>
             <para>by the core runtime, to provide the ability to provide XML
-            Snapshots (through the XmlSnapshot utility class). The metamodel
-            module does not itself define the programming model conventions;
-            that is the responsibility of the core progmodel.</para>
+            Snapshots (through the <classname>XmlSnapshot</classname> utility
+            class). The metamodel module does not itself define the
+            programming model conventions; that is the responsibility of the
+            core progmodel.</para>
           </listitem>
         </itemizedlist>
 
@@ -4372,6 +4373,43 @@ Persistable: User Persistable</screen>
       </sect1>
 
       <sect1>
+        <title>Architecture Diagram</title>
+
+        <para></para>
+
+        <para></para>
+
+        <para></para>
+
+        <para><screenshot>
+            <screeninfo>Top-level Architecture Diagram</screeninfo>
+
+            <mediaobject>
+              <imageobject>
+                <imagedata fileref="images/metamodel/architecture-diagram-top-level.png"
+                           scale="60" />
+              </imageobject>
+            </mediaobject>
+          </screenshot></para>
+
+        <para></para>
+
+        <screenshot>
+          <screeninfo>Top-level Architecture Diagram with SpecLoader
+          expanded</screeninfo>
+
+          <mediaobject>
+            <imageobject>
+              <imagedata fileref="images/metamodel/architecture-diagram-top-level-with-specloader-expanded.png"
+                         scale="60" />
+            </imageobject>
+          </mediaobject>
+        </screenshot>
+
+        <para></para>
+      </sect1>
+
+      <sect1>
         <title>ObjectAdapter and ObjectSpecification</title>
 
         <para></para>

Modified: incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/fixtures/CheckSpecificationsLoadedForFitNesse.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/fixtures/CheckSpecificationsLoadedForFitNesse.java?rev=1055214&r1=1055213&r2=1055214&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/fixtures/CheckSpecificationsLoadedForFitNesse.java
(original)
+++ incubator/isis/trunk/viewer/bdd/fitnesse/src/main/java/net/sf/isiscontrib/bdd/fitnesse/internal/fixtures/CheckSpecificationsLoadedForFitNesse.java
Tue Jan  4 22:22:45 2011
@@ -1,11 +1,11 @@
 package net.sf.isiscontrib.bdd.fitnesse.internal.fixtures;
 
-import java.util.Comparator;
 import java.util.Set;
-import java.util.TreeSet;
 
 import net.sf.isiscontrib.bdd.fitnesse.internal.AbstractSubsetFixture;
 
+import com.google.common.collect.Sets;
+
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 import org.apache.isis.core.runtime.context.IsisContext;
@@ -15,12 +15,7 @@ import org.apache.isis.viewer.bdd.common
 public class CheckSpecificationsLoadedForFitNesse extends AbstractSubsetFixture {
 
     private static Set<ObjectSpecification> allSpecNames() {
-        final Set<ObjectSpecification> specs = new TreeSet<ObjectSpecification>(new
Comparator<ObjectSpecification>() {
-            @Override
-            public int compare(final ObjectSpecification o1, final ObjectSpecification o2)
{
-                return o1.getFullIdentifier().compareTo(o2.getFullIdentifier());
-            }
-        });
+        final Set<ObjectSpecification> specs = Sets.newTreeSet(ObjectSpecification.COMPARATOR_FULLY_QUALIFIED_CLASS_NAME);
 
         final SpecificationLoader specificationLoader = getSessionFactory().getSpecificationLoader();
         for (final ObjectSpecification ObjectSpecification : specificationLoader.allSpecifications())
{



Mime
View raw message