incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1095460 - in /incubator/isis/trunk: core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/ core/src/docbkx/guide/ viewer/dnd/src/main/java/org/apache/is...
Date Wed, 20 Apr 2011 17:12:24 GMT
Author: danhaywood
Date: Wed Apr 20 17:12:24 2011
New Revision: 1095460

URL: http://svn.apache.org/viewvc?rev=1095460&view=rev
Log:
more on the core docbkx guide; minor refactoring/tidy up of core.metamodel.util.Dump class

Modified:
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContext.java
    incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/Dump.java
    incubator/isis/trunk/core/src/docbkx/guide/isis-core.xml
    incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/debug/DebugObjectGraph.java
    incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/debug/DebugView.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Debug.java

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=1095460&r1=1095459&r2=1095460&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 Wed Apr 20 17:12:24 2011
@@ -38,18 +38,6 @@ import org.apache.isis.core.metamodel.sp
  * 
  */
 public interface RuntimeContext extends Injectable {
-
-	public SpecificationLookup getSpecificationLookup();
-
-	public AdapterMap getAdapterMap();
-
-	public ObjectDirtier getObjectDirtier();
-
-	public ObjectPersistor getObjectPersistor();
-	
-	public QuerySubmitter getQuerySubmitter();
-	
-    public DomainObjectServices getDomainObjectServices();
 
     
     /**
@@ -59,19 +47,33 @@ public interface RuntimeContext extends 
      * Note that the scope of {@link RuntimeContext} is global,
      * whereas {@link AuthenticationSession} may change over time.
      */
-    AuthenticationSessionProvider getAuthenticationSessionProvider();
-    
-	ObjectInstantiator getObjectInstantiator();
+	public AuthenticationSessionProvider getAuthenticationSessionProvider();
 
-    ServicesProvider getServicesProvider();
+	public QuerySubmitter getQuerySubmitter();
+
+	public AdapterMap getAdapterMap();
+
+	public ObjectInstantiator getObjectInstantiator();
+
+	public SpecificationLookup getSpecificationLookup();
+
+    public ServicesProvider getServicesProvider();
+
+    public DependencyInjector getDependencyInjector();
+
+	
+	
+	public ObjectDirtier getObjectDirtier();
 
-    DependencyInjector getDependencyInjector();
+	public ObjectPersistor getObjectPersistor();
+	
+    public DomainObjectServices getDomainObjectServices();
 
 	
 	/////////////////////////////////////////////
 	// container
 	/////////////////////////////////////////////
 
-	void setContainer(DomainObjectContainer container);
+	public void setContainer(DomainObjectContainer container);
     
 }

Modified: incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/Dump.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/Dump.java?rev=1095460&r1=1095459&r2=1095460&view=diff
==============================================================================
--- incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/Dump.java (original)
+++ incubator/isis/trunk/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/Dump.java Wed Apr 20 17:12:24 2011
@@ -20,9 +20,7 @@
 
 package org.apache.isis.core.metamodel.util;
 
-import java.util.Enumeration;
 import java.util.List;
-import java.util.Vector;
 
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.debug.DebugBuilder;
@@ -42,175 +40,503 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters;
-
+
+import com.google.common.collect.Lists;
 
 public final class Dump {
 
+	private static DebugBuilder debugBuilder;
+
 	private Dump() {}
-	
-    private static void collectionGraph(
-            final ObjectAdapter collection,
+
+	
+	///////////////////////////////////////////////////////////////////////
+	// specification
+	///////////////////////////////////////////////////////////////////////
+
+	/**
+	 * @see #specification(ObjectAdapter, DebugBuilder)
+	 * @see #specification(ObjectSpecification, DebugBuilder)
+	 */
+    public static String specification(final ObjectAdapter adapter) {
+        final DebugBuilder debugBuilder = new DebugString();
+        specification(adapter, debugBuilder);
+        return debugBuilder.toString();
+    }
+
+    /**
+     * Convenience overload of {@link #specification(ObjectSpecification, DebugBuilder)} that takes the
+     * {@link ObjectSpecification} ( {@link ObjectAdapter#getSpecification()}) of the provided {@link ObjectAdapter}
+     * 
+     * @see #specification(ObjectAdapter)
+	 * @see #specification(ObjectSpecification, DebugBuilder)
+     */
+    public static void specification(final ObjectAdapter adapter, final DebugBuilder debugBuilder) {
+        final ObjectSpecification specification = adapter.getSpecification();
+        specification(specification, debugBuilder);
+    }
+
+
+    public static void specification(final ObjectSpecification specification, final DebugBuilder debugBuilder) {
+        try {
+            debugBuilder.appendTitle(specification.getClass().getName());
+            debugBuilder.appendAsHexln("Hash code", specification.hashCode());
+            debugBuilder.appendln("ID", specification.getIdentifier());
+            debugBuilder.appendln("Full Name", specification.getFullIdentifier());
+            debugBuilder.appendln("Short Name", specification.getShortIdentifier());
+            debugBuilder.appendln("Singular Name", specification.getSingularName());
+            debugBuilder.appendln("Plural Name", specification.getPluralName());
+            debugBuilder.appendln("Description", specification.getDescription());
+            debugBuilder.blankLine();
+            debugBuilder.appendln("Features", featureList(specification));
+            debugBuilder.appendln("Type", specification.isCollection() ? "Collection" : "Object");
+            if (specification.superclass() != null) {
+                debugBuilder.appendln("Superclass", specification.superclass().getFullIdentifier());
+            }
+            debugBuilder.appendln("Interfaces", specificationNames(specification.interfaces()));
+            debugBuilder.appendln("Subclasses", specificationNames(specification.subclasses()));
+            debugBuilder.blankLine();
+            debugBuilder.appendln("Service", specification.isService());
+            debugBuilder.appendln("Encodable", specification.isEncodeable());
+            debugBuilder.appendln("Parseable", specification.isParseable());
+            debugBuilder.appendln("Aggregated", specification.isValueOrIsAggregated());
+        } catch (final RuntimeException e) {
+            debugBuilder.appendException(e);
+        }
+
+        if (specification instanceof DebuggableWithTitle) {
+            ((DebuggableWithTitle) specification).debugData(debugBuilder);
+        }
+
+        debugBuilder.blankLine();
+
+        debugBuilder.appendln("Facets");
+        final Class<? extends Facet>[] facetTypes = specification.getFacetTypes();
+        debugBuilder.indent();
+        if (facetTypes.length == 0) {
+            debugBuilder.appendln("none");
+        } else {
+            for (int i = 0; i < facetTypes.length; i++) {
+                final Class<? extends Facet> type = facetTypes[i];
+                final Facet facet = specification.getFacet(type);
+                debugBuilder.appendln(facet.toString());
+            }
+        }
+        debugBuilder.unindent();
+        debugBuilder.blankLine();
+
+        debugBuilder.appendln("Fields");
+        debugBuilder.indent();
+        specificationFields(specification, debugBuilder);
+        debugBuilder.unindent();
+
+        debugBuilder.appendln("Object Actions");
+        debugBuilder.indent();
+        specificationActionMethods(specification, debugBuilder);
+        debugBuilder.unindent();
+
+        debugBuilder.appendln("Related Service Actions");
+        debugBuilder.indent();
+        specificationServiceMethods(specification, debugBuilder);
+        debugBuilder.unindent();
+    }
+
+    private static String[] specificationNames(final List<ObjectSpecification> specifications) {
+        final String[] names = new String[specifications.size()];
+        for (int i = 0; i < names.length; i++) {
+            names[i] = specifications.get(i).getFullIdentifier();
+        }
+        return names;
+    }
+
+    private static void specificationActionMethods(final ObjectSpecification specification, final DebugBuilder debugBuilder) {
+        try {
+            final List<ObjectAction> userActions = specification.getObjectActions(ActionType.USER);
+            final List<ObjectAction> explActions = specification.getObjectActions(ActionType.EXPLORATION);
+            final List<ObjectAction> prototypeActions = specification.getObjectActions(ActionType.PROTOTYPE);
+            final List<ObjectAction> debActions = specification.getObjectActions(ActionType.DEBUG);
+            specificationMethods(userActions, explActions, prototypeActions, debActions, debugBuilder);
+        } catch (final RuntimeException e) {
+            debugBuilder.appendException(e);
+        }
+    }
+
+    private static void specificationServiceMethods(final ObjectSpecification specification, final DebugBuilder debugBuilder) {
+        try {
+            final List<ObjectAction> userActions = specification.getServiceActionsReturning(ActionType.USER);
+            final List<ObjectAction> explActions = specification.getServiceActionsReturning(ActionType.EXPLORATION);
+            final List<ObjectAction> prototypeActions = specification.getServiceActionsReturning(ActionType.PROTOTYPE);
+            final List<ObjectAction> debActions = specification.getServiceActionsReturning(ActionType.DEBUG);
+            specificationMethods(userActions, explActions, prototypeActions,debActions, debugBuilder);
+        } catch (final RuntimeException e) {
+            debugBuilder.appendException(e);
+        }
+    }
+
+    private static void specificationFields(final ObjectSpecification specification, final DebugBuilder debugBuilder) {
+        final List<ObjectAssociation> fields = specification.getAssociations();
+        debugBuilder.appendln("All");
+        debugBuilder.indent();
+        for (int i = 0; i < fields.size(); i++) {
+            debugBuilder.appendln((i + 1) + "." + fields.get(i).getId());
+        }
+        debugBuilder.unindent();
+
+        final List<ObjectAssociation> fields2 = specification
+                .getAssociations(ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS);
+        debugBuilder.appendln("Static");
+        debugBuilder.indent();
+        for (int i = 0; i < fields2.size(); i++) {
+            debugBuilder.appendln((i + 1) + "." + fields2.get(i).getId());
+        }
+        debugBuilder.unindent();
+        debugBuilder.appendln();
+
+        try {
+            if (fields.size() == 0) {
+                debugBuilder.appendln("none");
+            } else {
+                for (int i = 0; i < fields.size(); i++) {
+
+                    final ObjectAssociation field = fields.get(i);
+                    debugBuilder.appendln((i + 1) + "." + field.getId() + "  (" + field.getClass().getName() + ")");
+
+                    debugBuilder.indent();
+                    final String description = field.getDescription();
+                    if (description != null && !description.equals("")) {
+                        debugBuilder.appendln("Description", description);
+                    }
+                    final String help = field.getHelp();
+                    if (help != null && !help.equals("")) {
+                        debugBuilder
+                                .appendln("Help", help.substring(0, Math.min(30, help.length()))
+                                        + (help.length() > 30 ? "..." : ""));
+                    }
+
+                    debugBuilder.appendln("ID", field.getIdentifier());
+                    debugBuilder.appendln("Short ID", field.getId());
+                    debugBuilder.appendln("Name", field.getName());
+                    final String type = field.isOneToManyAssociation() ? "Collection" : field.isOneToOneAssociation() ? "Object" : "Unknown";
+                    debugBuilder.appendln("Type", type);
+                    debugBuilder.appendln("Has identity", !field.getSpecification().isCollectionOrIsAggregated());
+                    debugBuilder.appendln("Spec", field.getSpecification().getFullIdentifier());
+
+                    debugBuilder.appendln("Flags", (field.isAlwaysHidden() ? "" : "Visible ")
+                            + (field.isNotPersisted() ? "Not Persisted " : " ")
+                            + (field.isMandatory() ? "Mandatory " : ""));
+
+                    final Class<? extends Facet>[] facets = field.getFacetTypes();
+                    if (facets.length > 0) {
+                        debugBuilder.appendln("Facets");
+                        debugBuilder.indent();
+                        boolean none = true;
+                        for (int j = 0; j < facets.length; j++) {
+                            debugBuilder.appendln(field.getFacet(facets[j]).toString());
+                            none = false;
+                        }
+                        if (none) {
+                            debugBuilder.appendln("none");
+                        }
+                        debugBuilder.unindent();
+                    }
+
+                    debugBuilder.appendln(field.debugData());
+
+                    debugBuilder.unindent();
+                }
+            }
+        } catch (final RuntimeException e) {
+            debugBuilder.appendException(e);
+        }
+
+    }
+
+    private static void specificationMethods(
+            final List<ObjectAction> userActions,
+            final List<ObjectAction> explActions,
+            final List<ObjectAction> prototypeActions,
+            final List<ObjectAction> debugActions,
+            final DebugBuilder debugBuilder) {
+		if (userActions.size() == 0 && explActions.size() == 0 && prototypeActions.size() == 0 && debugActions.size() == 0) {
+            debugBuilder.appendln("no actions...");
+        } else {
+            appendActionDetails(debugBuilder, "User actions", userActions);
+            appendActionDetails(debugBuilder, "Exploration actions", explActions);
+            appendActionDetails(debugBuilder, "Prototype actions", prototypeActions);
+            appendActionDetails(debugBuilder, "Debug actions", debugActions);
+        }
+    }
+
+	private static void appendActionDetails(final DebugBuilder debug, String desc,
+	        List<ObjectAction> actions) {
+		debug.appendln(desc);
+		debug.indent();
+		for (int i = 0; i < actions.size(); i++) {
+		    actionDetails(actions.get(i), 8, i, debug);
+		}
+		debug.unindent();
+	}
+
+    private static void actionDetails(
+    			final ObjectAction objectAction, 
+    			final int indent, 
+    			final int count, 
+    			final DebugBuilder debugBuilder) {
+        debugBuilder.appendln((count + 1) + "." + objectAction.getId() + " (" + objectAction.getClass().getName() + ")");
+        debugBuilder.indent();
+        final int newIndent = indent + 4;
+        try {
+            final List<ObjectAction> debActions = objectAction.getActions();
+            if (debActions.size() > 0) {
+                for (int i = 0; i < debActions.size(); i++) {
+                    actionDetails(debActions.get(i), newIndent, i, debugBuilder);
+                }
+
+            } else {
+                if (objectAction.getDescription() != null && !objectAction.getDescription().equals("")) {
+                    debugBuilder.appendln("Description", objectAction.getDescription());
+                }
+                debugBuilder.appendln("ID", objectAction.getId());
+                // debug.appendln(12, "Returns", f.getReturnType() == null ? "Nothing" :
+                // f.getReturnType().getFullName());
+
+                debugBuilder.appendln(objectAction.debugData());
+                debugBuilder.appendln("Target", objectAction.getTarget());
+                debugBuilder.appendln("On type", objectAction.getOnType());
+
+                final Class<? extends Facet>[] facets = objectAction.getFacetTypes();
+                if (facets.length > 0) {
+                    debugBuilder.appendln("Facets");
+                    debugBuilder.indent();
+                    for (int j = 0; j < facets.length; j++) {
+                        debugBuilder.appendln(objectAction.getFacet(facets[j]).toString());
+                    }
+                    debugBuilder.unindent();
+                }
+
+                final ObjectSpecification returnType = objectAction.getReturnType();
+                debugBuilder.appendln("Returns", returnType == null ? "VOID" : returnType.toString());
+
+                final List<ObjectActionParameter> parameters = objectAction.getParameters();
+                if (parameters.size() == 0) {
+                    debugBuilder.appendln("Parameters", "none");
+                } else {
+                    debugBuilder.appendln("Parameters");
+                    debugBuilder.indent();
+                    final List<ObjectActionParameter> p = objectAction.getParameters();
+                    for (int j = 0; j < parameters.size(); j++) {
+                        debugBuilder.append(p.get(j).getName());
+                        debugBuilder.append(" (");
+                        debugBuilder.append(parameters.get(j).getSpecification().getFullIdentifier());
+                        debugBuilder.appendln(")");
+                        debugBuilder.indent();
+                        final Class<? extends Facet>[] parameterFacets = p.get(j).getFacetTypes();
+                        for (int i = 0; i < parameterFacets.length; i++) {
+                            debugBuilder.appendln(p.get(j).getFacet(parameterFacets[i]).toString());
+                        }
+                        debugBuilder.unindent();
+                    }
+                    debugBuilder.unindent();
+                }
+            }
+        } catch (final RuntimeException e) {
+            debugBuilder.appendException(e);
+        }
+
+        debugBuilder.unindent();
+    }
+
+    private static String featureList(final ObjectSpecification specification) {
+        final StringBuilder str = new StringBuilder();
+        if (specification.isAbstract()) {
+            str.append("Abstract ");
+        }
+        if (BoundedFacetUtils.isBoundedSet(specification)) {
+            str.append("Bounded ");
+        }
+        if (CachedFacetUtils.isCached(specification)) {
+            str.append("Cached ");
+        }
+        if (ImmutableFacetUtils.isAlwaysImmutable(specification)) {
+            str.append("Immutable (always) ");
+        }
+        if (ImmutableFacetUtils.isImmutableOncePersisted(specification)) {
+            str.append("Immutable (once persisted) ");
+        }
+        if (specification.isService()) {
+            str.append("Service ");
+        }
+        return str.toString();
+    }
+
+	///////////////////////////////////////////////////////////////////////
+	// adapter
+	///////////////////////////////////////////////////////////////////////
+
+    /**
+     * @see #adapter(ObjectAdapter, DebugBuilder)
+     */
+    public static String adapter(final ObjectAdapter adapter) {
+        final DebugBuilder debugBuilder = new DebugString();
+        adapter(adapter, debugBuilder);
+        return debugBuilder.toString();
+    }
+
+    /**
+     * @see #adapter(ObjectAdapter)
+     */
+    public static void adapter(
+    		final ObjectAdapter adapter, 
+    		final DebugBuilder builder) {
+        try {
+            builder.appendln("Adapter", adapter.getClass().getName());
+            builder.appendln("Class", adapter.getObject() == null ? "none" : adapter.getObject().getClass().getName());
+            builder.appendAsHexln("Hash", adapter.hashCode());
+            builder.appendln("Object", adapter.getObject());
+            builder.appendln("Title", adapter.titleString());
+            builder.appendln("Specification", adapter.getSpecification().getFullIdentifier());
+
+            builder.appendln();
+
+            builder.appendln("Icon", adapter.getIconName());
+            builder.appendln("OID", adapter.getOid());
+            builder.appendln("State", adapter.getResolveState());
+            builder.appendln("Version", adapter.getVersion());
+            
+        } catch (final RuntimeException e) {
+            builder.appendException(e);
+        }
+
+    }
+
+
+	///////////////////////////////////////////////////////////////////////
+	// graph
+	///////////////////////////////////////////////////////////////////////
+
+    /**
+     * Creates an ascii object graph diagram for the specified object, up to three levels deep.
+     * 
+     * @see #graph(ObjectAdapter, AuthenticationSession, DebugBuilder)
+     */
+    public static String graph(final ObjectAdapter adapter, AuthenticationSession authenticationSession) {
+        debugBuilder = new DebugString();
+        graph(adapter, authenticationSession, debugBuilder);
+        return debugBuilder.toString();
+    }
+
+    /**
+     * As {@link #graph(ObjectAdapter, AuthenticationSession)}, but appending to the provided {@link DebugBuilder}.
+     * 
+     * @see #graph(ObjectAdapter, AuthenticationSession)
+     */
+    public static void graph(final ObjectAdapter object, AuthenticationSession authenticationSession, final DebugBuilder debugBuilder) {
+        simpleObject(object, debugBuilder);
+        debugBuilder.appendln();
+        debugBuilder.append(object);
+        graph(object, 0, Lists.<ObjectAdapter>newArrayList(), authenticationSession, debugBuilder);
+    }
+
+    private static void simpleObject(final ObjectAdapter collectionAdapter, final DebugBuilder debugBuilder) {
+        debugBuilder.appendln(collectionAdapter.titleString());
+        final ObjectSpecification objectSpec = collectionAdapter.getSpecification();
+        if (objectSpec.isCollection()) {
+            final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collectionAdapter);
+            int i = 1;
+            for (ObjectAdapter element : facet.collection(collectionAdapter)) {
+                debugBuilder.appendln(i++ + " " + element.titleString());
+            }
+        } else  {
+            // object is a regular Object
+            try {
+                List<ObjectAssociation> fields = objectSpec.getAssociations();
+                for (int i = 0; i < fields.size(); i++) {
+                    final ObjectAssociation field = fields.get(i);
+                    final ObjectAdapter obj = field.get(collectionAdapter);
+
+                    final String name = field.getId();
+                    if (obj == null) {
+                        debugBuilder.appendln(name, "null");
+                    } else {
+                        debugBuilder.appendln(name, obj.titleString());
+                    }
+                }
+            } catch (final RuntimeException e) {
+                debugBuilder.appendException(e);
+            }
+        }
+    }
+
+	
+	private static void collectionGraph(
+            final ObjectAdapter collectionAdapter,
             final int level,
-            final Vector<ObjectAdapter> ignoreObjects,
-            final DebugBuilder s, AuthenticationSession authenticationSession) {
+            final List<ObjectAdapter> ignoreAdapters,
+            final AuthenticationSession authenticationSession, 
+            final DebugBuilder debugBuilder) {
 
-        if (ignoreObjects.contains(collection)) {
-            s.append("*\n");
+        if (ignoreAdapters.contains(collectionAdapter)) {
+            debugBuilder.append("*\n");
         } else {
-            ignoreObjects.addElement(collection);
-            final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
-            final Enumeration e = facet.elements(collection);
-            while (e.hasMoreElements()) {
-                graphIndent(s, level);
-                final ObjectAdapter element = ((ObjectAdapter) e.nextElement());
-                s.append(element);
-                if (ignoreObjects.contains(element)) {
-                    s.append("*\n");
-                } else {
-//                    s.indent();
-                    graph(element, level + 1, ignoreObjects, s, authenticationSession);
-//                    s.unindent();
-                }
-            }
+            ignoreAdapters.add(collectionAdapter);
+            final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collectionAdapter);
+            for (ObjectAdapter element : facet.collection(collectionAdapter)) {
+                graphIndent(level, debugBuilder);
+                debugBuilder.append(element);
+                if (ignoreAdapters.contains(element)) {
+                    debugBuilder.append("*\n");
+                } else {
+                    graph(element, level + 1, ignoreAdapters, authenticationSession, debugBuilder);
+                }
+			}
         }
     }
 
-    /**
-     * Creates an ascii object graph diagram for the specified object, up to three levels deep.
-     * @param authenticationSession TODO
-     */
-    public static String graph(final ObjectAdapter object, AuthenticationSession authenticationSession) {
-        final DebugBuilder s = new DebugString();
-        graph(object, s, authenticationSession);
-        return s.toString();
-    }
-
-    public static void graph(final ObjectAdapter object, final DebugBuilder s, AuthenticationSession authenticationSession) {
-        simpleObject(object, s);
-        s.appendln();
-        s.append(object);
-        graph(object, 0, new Vector<ObjectAdapter>(25, 10), s, authenticationSession);
-    }
-
-    private static void simpleObject(final ObjectAdapter object, final DebugBuilder s) {
-        s.appendln(object.titleString());
-  //     s.indent();
-        final ObjectSpecification objectSpec = object.getSpecification();
-        if (objectSpec.isCollection()) {
-            final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(object);
-            final Enumeration e = facet.elements(object);
-            int i = 1;
-            while (e.hasMoreElements()) {
-                final ObjectAdapter element = ((ObjectAdapter) e.nextElement());
-                s.appendln(i++ + " " + element.titleString());
-            }
-        } else  {
-            // object is a regular Object
-            try {
-                List<ObjectAssociation> fields = objectSpec.getAssociations();
-                for (int i = 0; i < fields.size(); i++) {
-                    final ObjectAssociation field = fields.get(i);
-                    final ObjectAdapter obj = field.get(object);
-
-                    final String name = field.getId();
-                    if (obj == null) {
-                        s.appendln(name, "null");
-                    } else {
-                        s.appendln(name, obj.titleString());
-                    }
-                }
-            } catch (final RuntimeException e) {
-                s.appendException(e);
-            }
-        }
- //       s.unindent();
-    }
-
     private static void graph(
-    		final ObjectAdapter object, 
+    		final ObjectAdapter adapter, 
     		final int level, 
-    		final Vector<ObjectAdapter> ignoreObjects, 
-    		final DebugBuilder info, 
-    		final AuthenticationSession authenticationSession) {
+    		final List<ObjectAdapter> ignoreAdapters, 
+    		final AuthenticationSession authenticationSession, 
+    		final DebugBuilder debugBuilder) {
         if (level > 3) {
-            info.appendln("..."); // only go 3 levels?
+            debugBuilder.appendln("..."); // only go 3 levels?
         } else {
-            info.append("\n");
-            if (object.getSpecification().isCollection()) {
-                collectionGraph(object, level, ignoreObjects, info, authenticationSession);
-            } else if (object.getSpecification().isNotCollection()) {
-                objectGraph(object, level, ignoreObjects, info, authenticationSession);
+            debugBuilder.append("\n");
+            if (adapter.getSpecification().isCollection()) {
+                collectionGraph(adapter, level, ignoreAdapters, authenticationSession, debugBuilder);
+            } else if (adapter.getSpecification().isNotCollection()) {
+                objectGraph(adapter, level, ignoreAdapters, debugBuilder, authenticationSession);
             } else {
-                info.append("??? " + object);
+                debugBuilder.append("??? " + adapter);
             }
         }
     }
 
-    /**
-     * Creates an ascii object graph diagram for the specified object, up to three levels deep, and not
-     * expanding any of the objects in the excludedObjects vector.
-     * @param authenticationSession TODO
-     */
-    public static String graph(final ObjectAdapter object, final Vector<ObjectAdapter> excludedObjects, AuthenticationSession authenticationSession) {
-        final DebugBuilder s = new DebugString();
-        s.append(object);
-        graph(object, 0, excludedObjects, s, authenticationSession);
-        return s.toString();
-    }
-
-    private static void graphIndent(final DebugBuilder s, final int level) {
+    private static void graphIndent(final int level, final DebugBuilder debugBuilder) {
         for (int indent = 0; indent < level; indent++) {
-            s.append(DebugUtils.indentString(4) + "|");
-        }
-        s.append(DebugUtils.indentString(4) + "+--");
-    }
-
-    public static String adapter(final ObjectAdapter object) {
-        final DebugBuilder s = new DebugString();
-        adapter(object, s);
-        return s.toString();
-    }
-
-    public static void adapter(final ObjectAdapter adapter, final DebugBuilder builder) {
-        try {
-            builder.appendln("Adapter", adapter.getClass().getName());
-            builder.appendln("Class", adapter.getObject() == null ? "none" : adapter.getObject().getClass().getName());
-            builder.appendAsHexln("Hash", adapter.hashCode());
-            builder.appendln("Object", adapter.getObject());
-            builder.appendln("Title", adapter.titleString());
-            builder.appendln("Specification", adapter.getSpecification().getFullIdentifier());
-
-            builder.appendln();
-
-            builder.appendln("Icon", adapter.getIconName());
-            builder.appendln("OID", adapter.getOid());
-            builder.appendln("State", adapter.getResolveState());
-            builder.appendln("Version", adapter.getVersion());
-            
-        } catch (final RuntimeException e) {
-            builder.appendException(e);
+            debugBuilder.append(DebugUtils.indentString(4) + "|");
         }
-
+        debugBuilder.append(DebugUtils.indentString(4) + "+--");
     }
 
     private static void objectGraph(
-    		final ObjectAdapter object, 
+    		final ObjectAdapter adapter, 
     		final int level, 
-    		final Vector<ObjectAdapter> ignoreObjects, 
+    		final List<ObjectAdapter> ignoreAdapters, 
     		final DebugBuilder s, 
     		final AuthenticationSession authenticationSession) {
-    	ignoreObjects.addElement(object);
+    	ignoreAdapters.add(adapter);
 
         try {
             // work through all its fields
-            List<ObjectAssociation> fields = object.getSpecification().getAssociations();
+            List<ObjectAssociation> fields = adapter.getSpecification().getAssociations();
             for (int i = 0; i < fields.size(); i++) {
                 final ObjectAssociation field = fields.get(i);
-                final ObjectAdapter obj = field.get(object);
+                final ObjectAdapter obj = field.get(adapter);
                 final String name = field.getId();
-                graphIndent(s, level);
+                graphIndent(level, s);
 
-				if (field.isVisible(authenticationSession, object).isVetoed()) {
+				if (field.isVisible(authenticationSession, adapter).isVetoed()) {
                     s.append(name + ": (not visible)");
                     s.append("\n");
                 } else {
@@ -220,11 +546,11 @@ public final class Dump {
                          * } else if (obj.getSpecification().isParseable()) { s.append(name + ": " +
                          * obj.titleString()); s.append("\n");
                          */} else {
-                        if (ignoreObjects.contains(obj)) {
+                        if (ignoreAdapters.contains(obj)) {
                             s.append(name + ": " + obj + "*\n");
                         } else {
                             s.append(name + ": " + obj);
-                            graph(obj, level + 1, ignoreObjects, s, authenticationSession);
+                            graph(obj, level + 1, ignoreAdapters, authenticationSession, s);
 
                         }
                     }
@@ -233,307 +559,8 @@ public final class Dump {
         } catch (final RuntimeException e) {
             s.appendException(e);
         }
-
-    }
-
-    public static String specification(final ObjectAdapter object) {
-        final DebugBuilder s = new DebugString();
-        specification(object, s);
-        return s.toString();
-    }
-
-    public static void specification(final ObjectAdapter adapter, final DebugBuilder debug) {
-        final ObjectSpecification specification = adapter.getSpecification();
-        specification(specification, debug);
-    }
-
-    public static void specification(final ObjectSpecification specification, final DebugBuilder debug) {
-        try {
-            debug.appendTitle(specification.getClass().getName());
-            debug.appendAsHexln("Hash code", specification.hashCode());
-            debug.appendln("ID", specification.getIdentifier());
-            debug.appendln("Full Name", specification.getFullIdentifier());
-            debug.appendln("Short Name", specification.getShortIdentifier());
-            debug.appendln("Singular Name", specification.getSingularName());
-            debug.appendln("Plural Name", specification.getPluralName());
-            debug.appendln("Description", specification.getDescription());
-            debug.blankLine();
-            debug.appendln("Features", featureList(specification));
-            debug.appendln("Type", specification.isCollection() ? "Collection" : "Object");
-            if (specification.superclass() != null) {
-                debug.appendln("Superclass", specification.superclass().getFullIdentifier());
-            }
-            debug.appendln("Interfaces", specificationNames(specification.interfaces()));
-            debug.appendln("Subclasses", specificationNames(specification.subclasses()));
-            debug.blankLine();
-            debug.appendln("Service", specification.isService());
-            debug.appendln("Encodable", specification.isEncodeable());
-            debug.appendln("Parseable", specification.isParseable());
-            debug.appendln("Aggregated", specification.isValueOrIsAggregated());
-
-        } catch (final RuntimeException e) {
-            debug.appendException(e);
-        }
-
-        if (specification instanceof DebuggableWithTitle) {
-            ((DebuggableWithTitle) specification).debugData(debug);
-        }
-
-        debug.blankLine();
-
-        debug.appendln("Facets");
-        final Class<? extends Facet>[] facetTypes = specification.getFacetTypes();
-        debug.indent();
-        if (facetTypes.length == 0) {
-            debug.appendln("none");
-        } else {
-            for (int i = 0; i < facetTypes.length; i++) {
-                final Class<? extends Facet> type = facetTypes[i];
-                final Facet facet = specification.getFacet(type);
-                debug.appendln(facet.toString());
-            }
-        }
-        debug.unindent();
-        debug.blankLine();
-
-        debug.appendln("Fields");
-        debug.indent();
-        specificationFields(specification, debug);
-        debug.unindent();
-
-        debug.appendln("Object Actions");
-        debug.indent();
-        specificationActionMethods(specification, debug);
-        debug.unindent();
-
-        debug.appendln("Related Service Actions");
-        debug.indent();
-        specificationServiceMethods(specification, debug);
-        debug.unindent();
-    }
-
-    public static String featureList(final ObjectSpecification specification) {
-        final StringBuffer str = new StringBuffer();
-        if (specification.isAbstract()) {
-            str.append("Abstract ");
-        }
-        if (BoundedFacetUtils.isBoundedSet(specification)) {
-            str.append("Bounded ");
-        }
-        if (CachedFacetUtils.isCached(specification)) {
-            str.append("Cached ");
-        }
-        if (ImmutableFacetUtils.isAlwaysImmutable(specification)) {
-            str.append("Immutable (always) ");
-        }
-        if (ImmutableFacetUtils.isImmutableOncePersisted(specification)) {
-            str.append("Immutable (once persisted) ");
-        }
-        if (specification.isService()) {
-            str.append("Service ");
-        }
-        return str.toString();
-    }
-
-    private static void specificationActionMethods(final ObjectSpecification specification, final DebugBuilder debug) {
-        try {
-            final List<ObjectAction> userActions = specification.getObjectActions(ActionType.USER);
-            final List<ObjectAction> explActions = specification.getObjectActions(ActionType.EXPLORATION);
-            final List<ObjectAction> prototypeActions = specification.getObjectActions(ActionType.PROTOTYPE);
-            final List<ObjectAction> debActions = specification.getObjectActions(ActionType.DEBUG);
-            specificationMethods(userActions, explActions, prototypeActions, debActions, debug);
-        } catch (final RuntimeException e) {
-            debug.appendException(e);
-        }
-    }
-
-    private static void specificationServiceMethods(final ObjectSpecification specification, final DebugBuilder debug) {
-        try {
-            final List<ObjectAction> userActions = specification.getServiceActionsReturning(ActionType.USER);
-            final List<ObjectAction> explActions = specification.getServiceActionsReturning(ActionType.EXPLORATION);
-            final List<ObjectAction> prototypeActions = specification.getServiceActionsReturning(ActionType.PROTOTYPE);
-            final List<ObjectAction> debActions = specification.getServiceActionsReturning(ActionType.DEBUG);
-            specificationMethods(userActions, explActions, prototypeActions,debActions, debug);
-        } catch (final RuntimeException e) {
-            debug.appendException(e);
-        }
-    }
-
-    private static void specificationFields(final ObjectSpecification specification, final DebugBuilder debug) {
-        final List<ObjectAssociation> fields = specification.getAssociations();
-        debug.appendln("All");
-        debug.indent();
-        for (int i = 0; i < fields.size(); i++) {
-            debug.appendln((i + 1) + "." + fields.get(i).getId());
-        }
-        debug.unindent();
-
-        final List<ObjectAssociation> fields2 = specification
-                .getAssociations(ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS);
-        debug.appendln("Static");
-        debug.indent();
-        for (int i = 0; i < fields2.size(); i++) {
-            debug.appendln((i + 1) + "." + fields2.get(i).getId());
-        }
-        debug.unindent();
-        debug.appendln();
-
-        try {
-            if (fields.size() == 0) {
-                debug.appendln("none");
-            } else {
-                for (int i = 0; i < fields.size(); i++) {
-
-                    final ObjectAssociation field = fields.get(i);
-                    debug.appendln((i + 1) + "." + field.getId() + "  (" + field.getClass().getName() + ")");
-
-                    debug.indent();
-                    final String description = field.getDescription();
-                    if (description != null && !description.equals("")) {
-                        debug.appendln("Description", description);
-                    }
-                    final String help = field.getHelp();
-                    if (help != null && !help.equals("")) {
-                        debug
-                                .appendln("Help", help.substring(0, Math.min(30, help.length()))
-                                        + (help.length() > 30 ? "..." : ""));
-                    }
-
-                    debug.appendln("ID", field.getIdentifier());
-                    debug.appendln("Short ID", field.getId());
-                    debug.appendln("Name", field.getName());
-                    final String type = field.isOneToManyAssociation() ? "Collection" : field.isOneToOneAssociation() ? "Object" : "Unknown";
-                    debug.appendln("Type", type);
-                    debug.appendln("Has identity", !field.getSpecification().isCollectionOrIsAggregated());
-                    debug.appendln("Spec", field.getSpecification().getFullIdentifier());
-
-                    debug.appendln("Flags", (field.isAlwaysHidden() ? "" : "Visible ")
-                            + (field.isNotPersisted() ? "Not Persisted " : " ")
-                            + (field.isMandatory() ? "Mandatory " : ""));
-
-                    final Class<? extends Facet>[] facets = field.getFacetTypes();
-                    if (facets.length > 0) {
-                        debug.appendln("Facets");
-                        debug.indent();
-                        boolean none = true;
-                        for (int j = 0; j < facets.length; j++) {
-                            debug.appendln(field.getFacet(facets[j]).toString());
-                            none = false;
-                        }
-                        if (none) {
-                            debug.appendln("none");
-                        }
-                        debug.unindent();
-                    }
-
-                    debug.appendln(field.debugData());
-
-                    debug.unindent();
-                }
-            }
-        } catch (final RuntimeException e) {
-            debug.appendException(e);
-        }
-
-    }
-
-    private static void specificationMethods(
-            final List<ObjectAction> userActions,
-            final List<ObjectAction> explActions,
-            final List<ObjectAction> prototypeActions,
-            final List<ObjectAction> debugActions,
-            final DebugBuilder debug) {
-		if (userActions.size() == 0 && explActions.size() == 0 && prototypeActions.size() == 0 && debugActions.size() == 0) {
-            debug.appendln("no actions...");
-        } else {
-            appendActionDetails(debug, "User actions", userActions);
-            appendActionDetails(debug, "Exploration actions", explActions);
-            appendActionDetails(debug, "Prototype actions", prototypeActions);
-            appendActionDetails(debug, "Debug actions", debugActions);
-        }
     }
 
-	private static void appendActionDetails(final DebugBuilder debug, String desc,
-	        List<ObjectAction> actions) {
-		debug.appendln(desc);
-		debug.indent();
-		for (int i = 0; i < actions.size(); i++) {
-		    actionDetails(debug, actions.get(i), 8, i);
-		}
-		debug.unindent();
-	}
-
-    private static void actionDetails(final DebugBuilder debug, final ObjectAction a, final int indent, final int count) {
-        debug.appendln((count + 1) + "." + a.getId() + " (" + a.getClass().getName() + ")");
-        debug.indent();
-        final int newIndent = indent + 4;
-        try {
-            final List<ObjectAction> debActions = a.getActions();
-            if (debActions.size() > 0) {
-                for (int i = 0; i < debActions.size(); i++) {
-                    actionDetails(debug, debActions.get(i), newIndent, i);
-                }
-
-            } else {
-                if (a.getDescription() != null && !a.getDescription().equals("")) {
-                    debug.appendln("Description", a.getDescription());
-                }
-                debug.appendln("ID", a.getId());
-                // debug.appendln(12, "Returns", f.getReturnType() == null ? "Nothing" :
-                // f.getReturnType().getFullName());
-
-                debug.appendln(a.debugData());
-                debug.appendln("Target", a.getTarget());
-                debug.appendln("On type", a.getOnType());
-
-                final Class<? extends Facet>[] facets = a.getFacetTypes();
-                if (facets.length > 0) {
-                    debug.appendln("Facets");
-                    debug.indent();
-                    for (int j = 0; j < facets.length; j++) {
-                        debug.appendln(a.getFacet(facets[j]).toString());
-                    }
-                    debug.unindent();
-                }
-
-                final ObjectSpecification returnType = a.getReturnType();
-                debug.appendln("Returns", returnType == null ? "VOID" : returnType.toString());
-
-                final List<ObjectActionParameter> parameters = a.getParameters();
-                if (parameters.size() == 0) {
-                    debug.appendln("Parameters", "none");
-                } else {
-                    debug.appendln("Parameters");
-                    debug.indent();
-                    final List<ObjectActionParameter> p = a.getParameters();
-                    for (int j = 0; j < parameters.size(); j++) {
-                        debug.append(p.get(j).getName());
-                        debug.append(" (");
-                        debug.append(parameters.get(j).getSpecification().getFullIdentifier());
-                        debug.appendln(")");
-                        debug.indent();
-                        final Class<? extends Facet>[] parameterFacets = p.get(j).getFacetTypes();
-                        for (int i = 0; i < parameterFacets.length; i++) {
-                            debug.appendln(p.get(j).getFacet(parameterFacets[i]).toString());
-                        }
-                        debug.unindent();
-                    }
-                    debug.unindent();
-                }
-            }
-        } catch (final RuntimeException e) {
-            debug.appendException(e);
-        }
-
-        debug.unindent();
-    }
-
-    private static String[] specificationNames(final List<ObjectSpecification> specifications) {
-        final String[] names = new String[specifications.size()];
-        for (int i = 0; i < names.length; i++) {
-            names[i] = specifications.get(i).getFullIdentifier();
-        }
-        return names;
-    }
+
 
 }

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=1095460&r1=1095459&r2=1095460&view=diff
==============================================================================
--- incubator/isis/trunk/core/src/docbkx/guide/isis-core.xml (original)
+++ incubator/isis/trunk/core/src/docbkx/guide/isis-core.xml Wed Apr 20 17:12:24 2011
@@ -1728,17 +1728,7 @@
           </footnote>.</para>
       </sect1>
 
-      <sect1 id="sec.DomainObjectContainer">
-        <title>DomainObjectContainer implementation</title>
-
-        <para>***</para>
-
-        <para></para>
-
-        <para></para>
-      </sect1>
-
-      <sect1>
+      <sect1 id="sec.RuntimeContext">
         <title><classname>RuntimeContext</classname></title>
 
         <para>The role of the <classname>RuntimeContext</classname> interface
@@ -1764,10 +1754,6 @@
             <methodname>#allMatches(...)</methodname> and
             <methodname>#allInstances(...)</methodname> methods.</para>
           </listitem>
-
-          <listitem>
-            <para>the #</para>
-          </listitem>
         </itemizedlist>
 
         <para>The metamodel provides a default implementation of
@@ -1779,19 +1765,54 @@
         (<classname>IsisContext</classname>).</para>
       </sect1>
 
+      <sect1 id="sec.DomainObjectContainer">
+        <title><classname>DomainObjectContainer</classname>
+        implementation</title>
+
+        <para>The <classname>oai.applib.DomainObjectContainer</classname>
+        interface represents the single point of coupling from domain objects
+        to the framework. Using <classname>DomainObjectContainer</classname>,
+        a domain object can do such things as create new objects, search for
+        existing objects, and raise warnings and such like.
+        <emphasis>Isis</emphasis> will automatically inject the
+        DomainObjectContainer into any entity that provides a setter for
+        it<footnote>
+            <para>Inheriting from the
+            <classname>oai.applib.AbstractDomainObject</classname> means that
+            such a setter is automatically inherited.</para>
+          </footnote>.</para>
+
+        <para>The actual implementation of
+        <classname>DomainObjectContainer</classname> is provided by the
+        <emphasis>core metamodel</emphasis>, specifically by the
+        <classname>DomainObjectContainerDefault</classname> class (in
+        <package>oai.core.metamodel.services.container</package>). This
+        delegates off to various other parts of the framework as required. In
+        particular, it delegates to the configured runtime, by way of the
+        <classname>RuntimeContext</classname> interface (see <xref
+        linkend="sec.RuntimeContext" />).</para>
+      </sect1>
+
       <sect1>
         <title>Utilities</title>
 
         <sect2>
           <title>The Dump Utility</title>
 
-          <para>The <classname>oai.core.metamodel.Dump</classname> class
-          provides a simple way out outputting the details of adapters and
-          specifications. The two <methodname>specification
-          </methodname>methods detail the specified
-          <classname>ObjectSpecification</classname> as follows:-</para>
+          <para>The <classname>Dump</classname> class (in
+          <package>oai.core.metamodel.util</package> package) provides a
+          simple way out outputting the details of adapters and
+          specifications:</para>
+
+          <itemizedlist>
+            <listitem>
+              <para><methodname>#specification(ObjectAdapter)</methodname> and
+              <methodname>#specification(ObjectAdapter,
+              DebugBuilder)</methodname> detail the
+              <classname>ObjectSpecification</classname> of the specified
+              adapter:</para>
 
-          <screen format="linespecific">Full Name: bom.Location
+              <screen format="linespecific">Full Name: bom.Location
 Short Name: Location
 Plural Name: Locations
 Singular Name: Location
@@ -1808,11 +1829,14 @@ Fields
     OneToOneAssociationImpl@1408a92 [type=VALUE,id=type,label='Type',derived=false,type=Option]
     :
     :</screen>
+            </listitem>
 
-          <para>The two <methodname>object</methodname> methods detail the
-          specified <classname>Isis</classname> object as follows:-</para>
+            <listitem>
+              <para><methodname>#adapter(ObjectAdapter)</methodname> and
+              <methodname>#adapter(ObjectAdapter, DebugBuilder)</methodname>
+              detail specified adapter:</para>
 
-          <screen format="linespecific">Specification: bom.Location
+              <screen format="linespecific">Specification: bom.Location
 Class: bom.Location
 Adapter: org.apache.isis.object.defaults.PojoAdapter
 Hash: #dada24
@@ -1823,12 +1847,17 @@ State: ResolveState@1e1be92 [name=Resolv
 Version: LongNumberVersion#1 20051118-025400170
 Icon: null
 Persistable: User Persistable</screen>
+            </listitem>
 
-          <para>The two <methodname>graph</methodname> methods detail the
-          specified <classname>Isis</classname> object as follows, showing
-          each adapter, it associated objects and values:-</para>
+            <listitem>
+              <para><methodname>#graph(ObjectAdapter,
+              AuthenticationSession)</methodname> and
+              <methodname>#graph(ObjectAdapter, AuthenticationSession,
+              DebugBuilder)</methodname> create a graph of the specified
+              adapter, showing the wrapped object's associated objects and
+              values:</para>
 
-          <screen format="linespecific">PojoAdapter@dada24 [PR:OID#2F,specification=Location,version=LongNumberVersion#1 20051118-025400...
+              <screen format="linespecific">PojoAdapter@dada24 [PR:OID#2F,specification=Location,version=LongNumberVersion#1 20051118-025400...
     +--type: POJO BusinessValueAdapter: One
     +--knownas: POJO TextStringAdapter: test
     +--streetaddress: POJO TextStringAdapter: address
@@ -1840,12 +1869,8 @@ Persistable: User Persistable</screen>
     |    +--phonenumbers: VectorCollectionAdapter@1d381d2 [PR:-,specification=Vector,version=...
     : 
     :</screen>
-
-          <para></para>
-
-          <para></para>
-
-          <para></para>
+            </listitem>
+          </itemizedlist>
         </sect2>
       </sect1>
     </chapter>

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/debug/DebugObjectGraph.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/debug/DebugObjectGraph.java?rev=1095460&r1=1095459&r2=1095460&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/debug/DebugObjectGraph.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/debug/DebugObjectGraph.java Wed Apr 20 17:12:24 2011
@@ -44,7 +44,7 @@ public class DebugObjectGraph implements
 
     private void dumpGraph(final ObjectAdapter object, final DebugBuilder info) {
         if (object != null) {
-            Dump.graph(object, info, IsisContext.getAuthenticationSession());
+            Dump.graph(object, IsisContext.getAuthenticationSession(), info);
         }
     }
 }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/debug/DebugView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/debug/DebugView.java?rev=1095460&r1=1095459&r2=1095460&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/debug/DebugView.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/debug/DebugView.java Wed Apr 20 17:12:24 2011
@@ -104,7 +104,7 @@ public class DebugView implements Debugg
     public void dumpGraph(final ObjectAdapter object, final DebugBuilder info) {
         if (object != null) {
             info.appendTitle("GRAPH");
-            Dump.graph(object, info, IsisContext.getAuthenticationSession());
+            Dump.graph(object, IsisContext.getAuthenticationSession(), info);
         }
     }
 

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java?rev=1095460&r1=1095459&r2=1095460&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/debug/DebugAction.java Wed Apr 20 17:12:24 2011
@@ -116,7 +116,7 @@ public class DebugAction implements Acti
         ObjectAdapter object = context.getMappedObjectOrResult(context.getParameter("object"));
         DebugString str = new DebugString();
         Dump.adapter(object, str);
-        Dump.graph(object, str, IsisContext.getAuthenticationSession());
+        Dump.graph(object, IsisContext.getAuthenticationSession(), str);
         view.appendTitle(object.getSpecification().getFullIdentifier());
         view.appendln("<pre class=\"debug\">" + str + "</pre>");
     }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Debug.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Debug.java?rev=1095460&r1=1095459&r2=1095460&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Debug.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Debug.java Wed Apr 20 17:12:24 2011
@@ -95,7 +95,7 @@ public class Debug extends AbstractEleme
                 ObjectAdapter object = context.getMappedObject(value);
                 DebugString str = new DebugString();
                 Dump.adapter(object, str);
-                Dump.graph(object, str, IsisContext.getAuthenticationSession());
+                Dump.graph(object, IsisContext.getAuthenticationSession(), str);
                 request.appendHtml("<h2>" + object.getSpecification().getFullIdentifier() + "</h2>");
                 request.appendHtml("<pre class=\"debug\">" + str + "</pre>");
             }
@@ -150,7 +150,7 @@ public class Debug extends AbstractEleme
         request.appendHtml("<h1>Object Graph - " + object + "</h1>");
         request.appendHtml("<pre>");
         DebugBuilder debug = new DebugString();
-        Dump.graph(object, debug, null);
+        Dump.graph(object, null, debug);
         request.appendHtml(debug.toString());
         request.appendHtml("</pre>");
     }



Mime
View raw message