isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1050892 [3/5] - in /incubator/isis/trunk: alternatives/objectstore/nosql/src/main/java/org/apache/isis/alternatives/objectstore/nosql/ alternatives/objectstore/sql/persistor/src/main/java/org/apache/isis/alternatives/objectstore/sql/ alter...
Date Sun, 19 Dec 2010 16:28:42 GMT
Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/MovieSpecification.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,9 @@
 
 package org.apache.isis.core.runtime.testspec;
 
+import java.util.Arrays;
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.consent.Allow;
@@ -186,9 +189,7 @@ public class MovieSpecification extends 
 
     public MovieSpecification() {
         super(Movie.class);
-        fields = new ObjectAssociation[] { new MovieNameField(), new MovieDirectorField(),
-        // new MovieRolesField()
-        };
+        fields = Arrays.asList( (ObjectAssociation)new MovieNameField(), new MovieDirectorField() );
     }
 
     @Override
@@ -218,7 +219,7 @@ public class MovieSpecification extends 
     }
 
     @Override
-    public ObjectAction[] getObjectActions(final ObjectActionType... type) {
+    public List<ObjectAction> getObjectActions(final ObjectActionType... type) {
         return null;
     }
 

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testspec/PersonSpecification.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,9 @@
 
 package org.apache.isis.core.runtime.testspec;
 
+import java.util.Arrays;
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Allow;
 import org.apache.isis.core.metamodel.consent.Consent;
@@ -104,7 +107,7 @@ public class PersonSpecification extends
 
     public PersonSpecification() {
         super(Person.class);
-        fields = new ObjectAssociation[] { new PersonNameField(), };
+        fields = Arrays.asList( (ObjectAssociation)new PersonNameField() );
     }
 
     @Override
@@ -126,7 +129,7 @@ public class PersonSpecification extends
     }
 
     @Override
-    public ObjectAction[] getObjectActions(final ObjectActionType... type) {
+    public List<ObjectAction> getObjectActions(final ObjectActionType... type) {
         return null;
     }
 

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestProxyAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestProxyAction.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestProxyAction.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestProxyAction.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.core.runtime.testsystem;
 
+import java.util.List;
+
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.commons.filters.Filter;
 import org.apache.isis.core.metamodel.adapter.Instance;
@@ -58,7 +60,7 @@ public class TestProxyAction extends Fac
     }
 
     @Override
-    public ObjectAction[] getActions() {
+    public List<ObjectAction> getActions() {
         return null;
     }
 
@@ -83,17 +85,17 @@ public class TestProxyAction extends Fac
     }
 
     @Override
-    public ObjectActionParameter[] getParameters() {
+    public List<ObjectActionParameter> getParameters() {
         return null;
     }
 
     @Override
-    public ObjectSpecification[] getParameterTypes() {
+    public List<ObjectSpecification> getParameterTypes() {
         return null;
     }
 
     @Override
-    public ObjectActionParameter[] getParameters(final Filter<ObjectActionParameter> filter) {
+    public List<ObjectActionParameter> getParameters(final Filter<ObjectActionParameter> filter) {
         return null;
     }
 

Modified: incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestSpecification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestSpecification.java (original)
+++ incubator/isis/trunk/core/runtime/src/test/java/org/apache/isis/core/runtime/testsystem/TestSpecification.java Sun Dec 19 16:28:38 2010
@@ -21,9 +21,10 @@
 package org.apache.isis.core.runtime.testsystem;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
+import com.google.common.collect.Lists;
+
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.commons.exceptions.IsisException;
@@ -59,7 +60,7 @@ public class TestSpecification extends F
 
     private static int next = 100;
     private ObjectAction action;
-    public ObjectAssociation[] fields = new ObjectAssociation[0];
+    public List<ObjectAssociation> fields = Lists.newArrayList();
     private final int id = next++;
     private final String name;
     private ObjectSpecification[] subclasses = new ObjectSpecification[0];
@@ -80,8 +81,10 @@ public class TestSpecification extends F
         title = "";
     }
 
+    @Override
     public void addSubclass(final ObjectSpecification specification) {}
 
+    @Override
     public void clearDirty(final ObjectAdapter object) {}
 
     @Override
@@ -110,7 +113,8 @@ public class TestSpecification extends F
         return null;
     }
 
-    public ObjectAction[] getServiceActionsFor(final ObjectActionType... type) {
+    @Override
+    public List<ObjectAction> getServiceActionsFor(final ObjectActionType... type) {
         return null;
     }
 
@@ -118,18 +122,21 @@ public class TestSpecification extends F
         return 0;
     }
 
+    @Override
     public boolean isAbstract() {
         return false;
     }
 
+    @Override
     public boolean isService() {
         return false;
     }
 
+    @Override
     public ObjectAssociation getAssociation(final String name) {
-        for (int i = 0; i < fields.length; i++) {
-            if (fields[i].getId().equals(name)) {
-                return fields[i];
+        for (int i = 0; i < fields.size(); i++) {
+            if (fields.get(i).getId().equals(name)) {
+                return fields.get(i);
             }
         }
         throw new IsisException("Field not found: " + name);
@@ -143,58 +150,52 @@ public class TestSpecification extends F
         return new Class[0];
     }
 
-    public ObjectAssociation[] getAssociations() {
+    @Override
+    public List<ObjectAssociation> getAssociations() {
         return fields;
     }
 
-    public List<? extends ObjectAssociation> getAssociationList() {
-        return Arrays.asList(getAssociations());
-    }
-
+    @Override
     @SuppressWarnings("unchecked")
-    public List<OneToOneAssociation> getPropertyList() {
-        List<OneToOneAssociation> list = new ArrayList<OneToOneAssociation>();
-        List associationList = getAssociationList(ObjectAssociationFilters.PROPERTIES);
-        list.addAll(associationList);
-        return list;
+    public List<OneToOneAssociation> getProperties() {
+        @SuppressWarnings("rawtypes")
+        List list = getAssociations(ObjectAssociationFilters.PROPERTIES);
+        return new ArrayList<OneToOneAssociation>(list);
     }
 
+    @Override
     @SuppressWarnings("unchecked")
-    public List<OneToManyAssociation> getCollectionList() {
-        List<OneToManyAssociation> list = new ArrayList<OneToManyAssociation>();
-        List associationList = getAssociationList(ObjectAssociationFilters.COLLECTIONS);
-        list.addAll(associationList);
-        return list;
+    public List<OneToManyAssociation> getCollections() {
+        @SuppressWarnings("rawtypes")
+        List list = getAssociations(ObjectAssociationFilters.COLLECTIONS);
+        return new ArrayList<OneToManyAssociation>(list);
     }
 
-    public ObjectAssociation[] getAssociations(final Filter<ObjectAssociation> filter) {
-        final ObjectAssociation[] allFields = getAssociations();
-
-        final ObjectAssociation[] selectedFields = new ObjectAssociation[allFields.length];
-        int v = 0;
-        for (int i = 0; i < allFields.length; i++) {
-            if (filter.accept(allFields[i])) {
-                selectedFields[v++] = allFields[i];
+    @Override
+    public List<ObjectAssociation> getAssociations(final Filter<ObjectAssociation> filter) {
+        final List<ObjectAssociation> allFields = getAssociations();
+
+        final List<ObjectAssociation> selectedFields = Lists.newArrayList();
+        for (int i = 0; i < allFields.size(); i++) {
+            if (filter.accept(allFields.get(i))) {
+                selectedFields.add(allFields.get(i));
             }
         }
 
-        final ObjectAssociation[] fields = new ObjectAssociation[v];
-        System.arraycopy(selectedFields, 0, fields, 0, v);
-        return fields;
-    }
-
-    public List<? extends ObjectAssociation> getAssociationList(final Filter<ObjectAssociation> filter) {
-        return Arrays.asList(getAssociations(filter));
+        return selectedFields;
     }
 
+    @Override
     public String getFullName() {
         return name;
     }
 
+    @Override
     public String getIconName(final ObjectAdapter reference) {
         return null;
     }
 
+    @Override
     public ObjectAction getObjectAction(
             final ObjectActionType type,
             final String name,
@@ -205,18 +206,17 @@ public class TestSpecification extends F
         return null;
     }
 
+    @Override
     public ObjectAction getObjectAction(final ObjectActionType type, final String name) {
         return getObjectAction(type, name, new ObjectSpecification[0]);
     }
 
-    public ObjectAction[] getObjectActions(final ObjectActionType... type) {
-        return null;
-    }
-
-    public List<? extends ObjectAction> getObjectActionList(final ObjectActionType... type) {
+    @Override
+    public List<ObjectAction> getObjectActions(final ObjectActionType... type) {
         return null;
     }
 
+    @Override
     public String getPluralName() {
         return null;
     }
@@ -225,60 +225,74 @@ public class TestSpecification extends F
         return null;
     }
 
+    @Override
     public String getShortName() {
         return name.substring(name.lastIndexOf('.') + 1);
     }
 
+    @Override
     public String getSingularName() {
         return name + " (singular)";
     }
 
+    @Override
     public String getDescription() {
         return getSingularName();
     }
 
+    @Override
     public String getTitle(final ObjectAdapter adapter) {
         return title;
     }
 
+    @Override
     public boolean hasSubclasses() {
         return false;
     }
 
+    @Override
     public ObjectSpecification[] interfaces() {
         return new ObjectSpecification[0];
     }
 
     public void introspect() {}
 
+    @Override
     public boolean isDirty(final ObjectAdapter object) {
         return false;
     }
 
+    @Override
     public boolean isOfType(final ObjectSpecification cls) {
         return cls == this;
     }
 
+    @Override
     public boolean isEncodeable() {
         return false;
     }
 
+    @Override
     public boolean isParseable() {
         return false;
     }
 
+    @Override
     public boolean isValueOrIsAggregated() {
         return false;
     }
 
+    @Override
     public boolean isValue() {
         return false;
     }
 
+    @Override
     public boolean isAggregated() {
         return false;
     }
 
+    @Override
     public void markDirty(final ObjectAdapter object) {}
 
     public Object newInstance() {
@@ -286,6 +300,7 @@ public class TestSpecification extends F
                 + "; newInstance() method should be overridden");
     }
 
+    @Override
     public Persistability persistability() {
         return Persistability.USER_PERSISTABLE;
     }
@@ -298,7 +313,7 @@ public class TestSpecification extends F
         this.action = action;
     }
 
-    public void setupFields(final ObjectAssociation[] fields) {
+    public void setupFields(final List<ObjectAssociation> fields) {
         this.fields = fields;
     }
 
@@ -310,10 +325,12 @@ public class TestSpecification extends F
         this.title = title;
     }
 
+    @Override
     public ObjectSpecification[] subclasses() {
         return subclasses;
     }
 
+    @Override
     public ObjectSpecification superclass() {
         return null;
     }
@@ -323,10 +340,12 @@ public class TestSpecification extends F
         return getFullName();
     }
 
+    @Override
     public Consent isValid(final ObjectAdapter transientObject) {
         return null;
     }
 
+    @Override
     public Object getDefaultValue() {
         return null;
     }
@@ -336,31 +355,38 @@ public class TestSpecification extends F
         return null;
     }
 
+    @Override
     public boolean isCollectionOrIsAggregated() {
         return false;
     }
 
+    @Override
     public Object createObject(CreationMode creationMode) {
         throw new NotYetImplementedException();
     }
 
+    @Override
     public boolean isHidden() {
         return false;
     }
 
+    @Override
     public boolean isCollection() {
         return false;
     }
 
+    @Override
     public boolean isNotCollection() {
         return !isCollection();
     }
 
+    @Override
     public boolean isImmutable() {
         return false;
     }
 
 
+    @Override
     public ObjectValidityContext createValidityInteractionContext(
             final AuthenticationSession session,
             final InteractionInvocationMethod invocationMethod,
@@ -368,6 +394,7 @@ public class TestSpecification extends F
         return null;
     }
 
+    @Override
     public ObjectTitleContext createTitleInteractionContext(
             final AuthenticationSession session,
             final InteractionInvocationMethod invocationMethod,
@@ -375,6 +402,7 @@ public class TestSpecification extends F
         return null;
     }
 
+    @Override
     public InteractionResult isValidResult(final ObjectAdapter transientObject) {
         return null;
     }
@@ -384,6 +412,7 @@ public class TestSpecification extends F
     // getInstance
     // /////////////////////////////////////////////////////////////
 
+    @Override
     public Instance getInstance(ObjectAdapter adapter) {
         return adapter;
     }

Modified: incubator/isis/trunk/defaults/objectstore/src/main/java/org/apache/isis/defaults/objectstore/InMemoryObjectStore.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/defaults/objectstore/src/main/java/org/apache/isis/defaults/objectstore/InMemoryObjectStore.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/defaults/objectstore/src/main/java/org/apache/isis/defaults/objectstore/InMemoryObjectStore.java (original)
+++ incubator/isis/trunk/defaults/objectstore/src/main/java/org/apache/isis/defaults/objectstore/InMemoryObjectStore.java Sun Dec 19 16:28:38 2010
@@ -25,6 +25,8 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Vector;
 
+import org.apache.log4j.Logger;
+
 import org.apache.isis.core.commons.debug.Debug;
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.commons.exceptions.IsisException;
@@ -58,7 +60,6 @@ import org.apache.isis.defaults.objectst
 import org.apache.isis.defaults.objectstore.internal.commands.InMemoryCreateObjectCommand;
 import org.apache.isis.defaults.objectstore.internal.commands.InMemoryDestroyObjectCommand;
 import org.apache.isis.defaults.objectstore.internal.commands.InMemorySaveObjectCommand;
-import org.apache.log4j.Logger;
 
 
 public class InMemoryObjectStore implements ObjectStore {
@@ -75,6 +76,7 @@ public class InMemoryObjectStore impleme
     // Name
     // ///////////////////////////////////////////////////////
 
+    @Override
     public String name() {
         return "In-Memory Object Store";
     }
@@ -83,6 +85,7 @@ public class InMemoryObjectStore impleme
     // open, close, shutdown
     // ///////////////////////////////////////////////////////
 
+    @Override
     public void open() {
         // TODO: all a bit hacky, but is to keep tests running.  Should really sort out using mocks.
         InMemoryPersistenceSessionFactory inMemoryPersistenceSessionFactory = getInMemoryPersistenceSessionFactory();
@@ -137,7 +140,8 @@ public class InMemoryObjectStore impleme
 		}
 	}
 
-	public void close() {
+	@Override
+    public void close() {
         final InMemoryPersistenceSessionFactory inMemoryPersistenceSessionFactory = getInMemoryPersistenceSessionFactory();
         // TODO: this is hacky, only here to keep tests running.  Should sort out using mocks
         if (inMemoryPersistenceSessionFactory != null) {
@@ -154,6 +158,7 @@ public class InMemoryObjectStore impleme
     /**
      * No permanent persistence, so must always install fixtures.
      */
+    @Override
     public boolean isFixturesInstalled() {
         return false;
     }
@@ -162,30 +167,37 @@ public class InMemoryObjectStore impleme
     // reset
     // ///////////////////////////////////////////////////////
 
+    @Override
     public void reset() {}
 
     // ///////////////////////////////////////////////////////
     // Transaction management
     // ///////////////////////////////////////////////////////
 
+    @Override
     public void startTransaction() {}
 
+    @Override
     public void endTransaction() {}
 
+    @Override
     public void abortTransaction() {}
 
     // ///////////////////////////////////////////////////////
     // Command Creation
     // ///////////////////////////////////////////////////////
 
+    @Override
     public CreateObjectCommand createCreateObjectCommand(final ObjectAdapter object) {
         return new InMemoryCreateObjectCommand(object, persistedObjects);
     }
 
+    @Override
     public SaveObjectCommand createSaveObjectCommand(final ObjectAdapter object) {
         return new InMemorySaveObjectCommand(object, persistedObjects);
     }
 
+    @Override
     public DestroyObjectCommand createDestroyObjectCommand(final ObjectAdapter object) {
         return new InMemoryDestroyObjectCommand(object, persistedObjects);
     }
@@ -194,6 +206,7 @@ public class InMemoryObjectStore impleme
     // Command Execution
     // ///////////////////////////////////////////////////////
 
+    @Override
     public void execute(final List<PersistenceCommand> commands) throws ObjectPersistenceException {
         if (LOG.isInfoEnabled()) {
             LOG.info("execute commands");
@@ -208,6 +221,7 @@ public class InMemoryObjectStore impleme
     // getObject, resolveField, resolveImmediately
     // ///////////////////////////////////////////////////////
 
+    @Override
     public ObjectAdapter getObject(final Oid oid, final ObjectSpecification hint) throws ObjectNotFoundException,
             ObjectPersistenceException {
         LOG.debug("getObject " + oid);
@@ -221,6 +235,7 @@ public class InMemoryObjectStore impleme
         }
     }
 
+    @Override
     public void resolveImmediately(final ObjectAdapter adapter) throws ObjectPersistenceException {
 
         // this is a nasty hack, but even though this method is called by 
@@ -242,6 +257,7 @@ public class InMemoryObjectStore impleme
         }
     }
 
+    @Override
     public void resolveField(final ObjectAdapter object, final ObjectAssociation field) throws ObjectPersistenceException {
         final ObjectAdapter reference = field.get(object);
         PersistorUtil.start(reference, ResolveState.RESOLVING);
@@ -264,9 +280,9 @@ public class InMemoryObjectStore impleme
         all.addElement(adapter);
         PersistorUtil.start(adapter, ResolveState.RESOLVING);
 
-        final ObjectAssociation[] fields = adapter.getSpecification().getAssociations();
-        for (int i = 0; i < fields.length; i++) {
-            final ObjectAssociation field = fields[i];
+        final List<ObjectAssociation> fields = adapter.getSpecification().getAssociations();
+        for (int i = 0; i < fields.size(); i++) {
+            final ObjectAssociation field = fields.get(i);
             if (field.isOneToManyAssociation()) {
                 final ObjectAdapter col = field.get(adapter);
                 final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(col);
@@ -288,6 +304,7 @@ public class InMemoryObjectStore impleme
     // getInstances, hasInstances
     // ///////////////////////////////////////////////////////
 
+    @Override
     public ObjectAdapter[] getInstances(final PersistenceQuery persistenceQuery) 
     throws ObjectPersistenceException,
             UnsupportedFindException {
@@ -307,6 +324,7 @@ public class InMemoryObjectStore impleme
         return toInstancesArray(instances);
     }
 
+    @Override
     public boolean hasInstances(final ObjectSpecification spec) {
         if (instancesFor(spec).hasInstances()) {
             return true;
@@ -357,10 +375,12 @@ public class InMemoryObjectStore impleme
     // ///////////////////////////////////////////////////////
 
 
+    @Override
     public Oid getOidForService(final String name) {
         return persistedObjects.getService(name);
     }
 
+    @Override
     public void registerService(final String name, final Oid oid) {
     	persistedObjects.registerService(name, oid);
     }
@@ -373,10 +393,12 @@ public class InMemoryObjectStore impleme
     // Debugging
     // ///////////////////////////////////////////////////////
 
+    @Override
     public String debugTitle() {
         return name();
     }
 
+    @Override
     public void debugData(final DebugString debug) {
         debug.appendTitle("Domain Objects");
         for(final ObjectSpecification spec: persistedObjects.specifications()) {
@@ -443,12 +465,10 @@ public class InMemoryObjectStore impleme
         recursiveElements.addElement(object);
 
         // work through all its fields
-        ObjectAssociation[] fields;
-
-        fields = object.getSpecification().getAssociations();
+        List<ObjectAssociation> fields = object.getSpecification().getAssociations();
 
-        for (int i = 0; i < fields.length; i++) {
-            final ObjectAssociation field = fields[i];
+        for (int i = 0; i < fields.size(); i++) {
+            final ObjectAssociation field = fields.get(i);
             final Object obj = field.get(object);
 
             final String id = field.getId();

Added: incubator/isis/trunk/src/docbkx/guide/images/soyatec-eclipse36-install-1.png
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/src/docbkx/guide/images/soyatec-eclipse36-install-1.png?rev=1050892&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/src/docbkx/guide/images/soyatec-eclipse36-install-1.png
------------------------------------------------------------------------------
    needs-lock = 

Propchange: incubator/isis/trunk/src/docbkx/guide/images/soyatec-eclipse36-install-1.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: incubator/isis/trunk/src/docbkx/guide/images/soyatec-eclipse36-install-2.png
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/src/docbkx/guide/images/soyatec-eclipse36-install-2.png?rev=1050892&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/src/docbkx/guide/images/soyatec-eclipse36-install-2.png
------------------------------------------------------------------------------
    needs-lock = 

Propchange: incubator/isis/trunk/src/docbkx/guide/images/soyatec-eclipse36-install-2.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: incubator/isis/trunk/src/docbkx/guide/images/soyatec-eclipse36-install-3.png
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/src/docbkx/guide/images/soyatec-eclipse36-install-3.png?rev=1050892&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/src/docbkx/guide/images/soyatec-eclipse36-install-3.png
------------------------------------------------------------------------------
    needs-lock = 

Propchange: incubator/isis/trunk/src/docbkx/guide/images/soyatec-eclipse36-install-3.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Modified: incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/UsingIsisViewerPeer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/UsingIsisViewerPeer.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/UsingIsisViewerPeer.java (original)
+++ incubator/isis/trunk/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/UsingIsisViewerPeer.java Sun Dec 19 16:28:38 2010
@@ -223,12 +223,12 @@ public class UsingIsisViewerPeer extends
         final ObjectSpecification spec = onAdapter.getSpecification();
         final List<ObjectMember> objectMembers = new ArrayList<ObjectMember>();
 
-        objectMembers.addAll(spec.getAssociationList());
+        objectMembers.addAll(spec.getAssociations());
 
         // see if action (of any type)
-        objectMembers.addAll(spec.getObjectActionList(ObjectActionType.USER));
-        objectMembers.addAll(spec.getObjectActionList(ObjectActionType.EXPLORATION));
-        objectMembers.addAll(spec.getObjectActionList(ObjectActionType.DEBUG));
+        objectMembers.addAll(spec.getObjectActions(ObjectActionType.USER));
+        objectMembers.addAll(spec.getObjectActions(ObjectActionType.EXPLORATION));
+        objectMembers.addAll(spec.getObjectActions(ObjectActionType.DEBUG));
         for (final ObjectMember member : objectMembers) {
             if (matchesId(member, memberId)) {
                 return member;
@@ -340,11 +340,11 @@ public class UsingIsisViewerPeer extends
      * <p>
      * Ensures that there are at least enough arguments for the number of parameters required.
      */
-    public ObjectAdapter[] getAdapters(final ObjectAdapter onAdapter, final ObjectAction nakedObjectAction,
+    public ObjectAdapter[] getAdapters(final ObjectAdapter onAdapter, final ObjectAction objectAction,
         CellBinding onMemberBinding, final List<ScenarioCell> argumentCells) throws ScenarioBoundValueException {
-        final ObjectActionParameter[] parameters = nakedObjectAction.getParameters();
+        final List<ObjectActionParameter> parameters = objectAction.getParameters();
 
-        int parameterCount = parameters.length;
+        int parameterCount = parameters.size();
         if (argumentCells.size() < parameterCount) {
             throw ScenarioBoundValueException.current(onMemberBinding, "(action requires " + parameterCount
                 + " arguments)");
@@ -353,7 +353,7 @@ public class UsingIsisViewerPeer extends
 
         for (int i = 0; i < parameterCount; i++) {
             final ScenarioCell paramCell = argumentCells.get(i);
-            final ObjectActionParameter parameter = parameters[i];
+            final ObjectActionParameter parameter = parameters.get(i);
             adapters[i] = getAdapter(null, parameter.getSpecification(), onMemberBinding, paramCell);
         }
         return adapters;

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarGrid.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarGrid.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarGrid.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarGrid.java Sun Dec 19 16:28:38 2010
@@ -22,6 +22,7 @@ package org.apache.isis.viewer.dnd.calen
 
 
 import java.util.Date;
+import java.util.List;
 
 import org.apache.isis.core.commons.exceptions.UnexpectedCallException;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -55,6 +56,7 @@ public class CalendarGrid extends Compos
     private int columns;
     private boolean acrossThenDown;
 
+    @Override
     protected void buildNewView() {
         CalendarCellContent[] cellContents = createContentForCells();      
         addCellsToView(cellContents);
@@ -110,26 +112,29 @@ public class CalendarGrid extends Compos
     
     private ObjectAssociation findDate(final ObjectAdapter adapter) {
         final ObjectSpecification spec = adapter.getSpecification();
-        final ObjectAssociation[] fields = spec.getAssociations();
-        for (int i = 0; i < fields.length; i++) {
-            final Facet facet = fields[i].getSpecification().getFacet(DateValueFacet.class);
+        final List<ObjectAssociation> fields = spec.getAssociations();
+        for (int i = 0; i < fields.size(); i++) {
+            final Facet facet = fields.get(i).getSpecification().getFacet(DateValueFacet.class);
             if (facet != null) {
-                return fields[i];
+                return fields.get(i);
             }
         }
         return null;
     }
 
+    @Override
     protected void buildModifiedView() {
         disposeContentsOnly();
         buildNewView();
     }
     
     // TODO remove
+    @Override
     protected void buildView() {
         throw new UnexpectedCallException();
     }
 
+    @Override
     protected void doLayout(Size maximumSize) {
         boolean hasHeader = cellLayout.header(0) != null;
         int topInset = 0 + (acrossThenDown && hasHeader ? 30 : 0);
@@ -156,6 +161,7 @@ public class CalendarGrid extends Compos
         }
     }
 
+    @Override
     public Size requiredSize(Size availableSpace) {
         return new Size(300, 300);
     }
@@ -313,81 +319,95 @@ public class CalendarGrid extends Compos
         super.viewMenuOptions(options);
 
         options.add(new UserActionAbstract("Add row") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 addRow();
             }
         });
         options.add(new UserActionAbstract("Remove row") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 removeRow();
             }
         });
 
         options.add(new UserActionAbstract("Add column") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 addColumn();
             }
         });
         options.add(new UserActionAbstract("Remove column") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 removeColumn();
             }
         });
 
         options.add(new UserActionAbstract("Years") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 showYears();
             }
         });
 
         options.add(new UserActionAbstract("Months") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 showMonths();
             }
         });
 
         options.add(new UserActionAbstract("Weeks") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 showWeeks();
             }
         });
 
         options.add(new UserActionAbstract("Day") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 showSingleDay();
             }
         });
         options.add(new UserActionAbstract("Days") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 showDays();
             }
         });
 
         options.add(new UserActionAbstract("Across then down") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 acrossFirst(); 
             }
         });
 
         options.add(new UserActionAbstract("Down then across") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 downFirst();
             }
         });
 
         options.add(new UserActionAbstract("Previous period") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 previousePeriod();
             }
         });
 
         options.add(new UserActionAbstract("Next period") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 nextPeriod();
             }
         });
 
         options.add(new UserActionAbstract("Today") {
+            @Override
             public void execute(Workspace workspace, View view, Location at) {
                 today();
             }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarSpecification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/calendar/CalendarSpecification.java Sun Dec 19 16:28:38 2010
@@ -53,7 +53,7 @@ public class CalendarSpecification imple
     public boolean canDisplay(ViewRequirement requirement) {
         boolean openCollection =requirement.isCollection() && requirement.isOpen();
         if (openCollection) {
-            List<OneToOneAssociation> propertyList = ((CollectionContent) requirement.getContent()).getElementSpecification().getPropertyList();
+            List<OneToOneAssociation> propertyList = ((CollectionContent) requirement.getContent()).getElementSpecification().getProperties();
             for (OneToOneAssociation association : propertyList) {
                 if (!association.isAlwaysHidden() && association.getSpecification().containsFacet(DateValueFacet.class)) {
                     return true;

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/FormWithTableSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/FormWithTableSpecification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/FormWithTableSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/FormWithTableSpecification.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.dnd.combined;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -39,16 +41,20 @@ import org.apache.isis.viewer.dnd.view.c
 
 public class FormWithTableSpecification extends SplitViewSpecification {
 
+    @Override
     public Layout createLayout(Content content, Axes axes) {
         return new StackLayout();
     }
 
+    @Override
     View createMainView(Axes axes, Content mainContent, final Content secondaryContent) {
         View form1 = new FormSpecification() {
+            @Override
             protected boolean include(Content content, int sequence) {
                 return !secondaryContent.getId().equals(content.getId());
             };
             
+            @Override
             public Layout createLayout(Content content, Axes axes) {
                 GridLayout gridLayout = new GridLayout();
                 gridLayout.setSize(2);
@@ -58,15 +64,17 @@ public class FormWithTableSpecification 
         return form1;
     }
     
+    @Override
     View createSecondaryView(Axes axes, final Content fieldContent) {
         return new InternalTableSpecification().createView(fieldContent, axes, -1);
     }
 
+    @Override
     Content determineSecondaryContent(Content content) {
         ObjectSpecification spec = content.getSpecification();
         ObjectAdapter target = content.getAdapter();
         AuthenticationSession session = IsisContext.getAuthenticationSession();
-        ObjectAssociation[] fields = spec.getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, target));
+        List<ObjectAssociation> fields = spec.getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, target));
         for (ObjectAssociation field : fields) {
             if (field.isOneToManyAssociation()) {
                 return Toolkit.getContentFactory().createFieldContent(field, target);
@@ -110,10 +118,12 @@ public class FormWithTableSpecification 
         };
     }
 */
+    @Override
     public String getName() {
         return "Form with table (experimental)";
     }
 
+    @Override
     boolean validField(ObjectAssociation field) {
         return false;
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/SplitViewSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/SplitViewSpecification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/SplitViewSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/SplitViewSpecification.java Sun Dec 19 16:28:38 2010
@@ -43,6 +43,7 @@ public abstract class SplitViewSpecifica
         builder = new SplitViewBuilder(this);
     }
 
+    @Override
     public boolean canDisplay(ViewRequirement requirement) {
         if (requirement.isObject() && requirement.is(ViewRequirement.OPEN) && !requirement.isSubview()) {
             Content fieldContent = determineSecondaryContent(requirement.getContent());
@@ -72,7 +73,7 @@ public abstract class SplitViewSpecifica
         ObjectSpecification spec = content.getSpecification();
         ObjectAdapter target = content.getAdapter();
         AuthenticationSession session = IsisContext.getAuthenticationSession();
-        ObjectAssociation[] fields = spec.getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, target));
+        List<ObjectAssociation> fields = spec.getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, target));
         List<ObjectAssociation> selectableFields = new ArrayList<ObjectAssociation>();
         for (ObjectAssociation field : fields) {
             if (validField(field)) {

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/TwoPartViewSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/TwoPartViewSpecification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/TwoPartViewSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/TwoPartViewSpecification.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.dnd.combined;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -40,12 +42,15 @@ import org.apache.isis.viewer.dnd.view.c
 
 public class TwoPartViewSpecification extends SplitViewSpecification {
 
+    @Override
     public Layout createLayout(Content content, Axes axes) {
         return new ColumnLayout();
     }
 
+    @Override
     View createMainView(Axes axes, Content mainContent, final Content secondaryContent) {
         View form1 = new FormSpecification() {
+            @Override
             protected boolean include(Content content, int sequence) {
                 return !secondaryContent.getId().equals(content.getId());
             };
@@ -53,18 +58,20 @@ public class TwoPartViewSpecification ex
         return form1;
     }
     
+    @Override
     View createSecondaryView(Axes axes, final Content fieldContent) {
         View form = new InternalFormSpecification().createView(fieldContent, axes, -1);
         View labelledForm = LabelBorder.createFieldLabelBorder(new LabelAxis(), form);
         return labelledForm;
     }
 
+    @Override
     @Deprecated
     Content determineSecondaryContent(Content content) {
         ObjectSpecification spec = content.getSpecification();
         ObjectAdapter target = content.getAdapter();
         AuthenticationSession session = IsisContext.getAuthenticationSession();
-        ObjectAssociation[] fields = spec.getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, target));
+        List<ObjectAssociation> fields = spec.getAssociations(ObjectAssociationFilters.dynamicallyVisible(session, target));
         for (ObjectAssociation field : fields) {
             if (validField(field)) {
                 return Toolkit.getContentFactory().createFieldContent(field, target);
@@ -73,11 +80,13 @@ public class TwoPartViewSpecification ex
         return null;
     }
 
+    @Override
     boolean validField(ObjectAssociation field) {
         return field.isOneToOneAssociation() && !field.getSpecification().isParseable();
     }
 
     
+    @Override
     public String getName() {
         return "Two part object (experimental)";
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/NewObjectView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/NewObjectView.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/NewObjectView.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/NewObjectView.java Sun Dec 19 16:28:38 2010
@@ -53,18 +53,17 @@ public class NewObjectView extends Compo
         invalidateContent();
     }
     
+    @Override
     protected void buildView() {
         if (getSubviews().length == 0) {
             ObjectAdapter object = getContent().getAdapter();
-            ObjectAssociation[] associations = getContent().getSpecification().getAssociations();
+            List<ObjectAssociation> associations = getContent().getSpecification().getAssociations();
            
             
-            ObjectAssociation field = associations[0];
+            ObjectAssociation field = associations.get(0);
             
             addFieldView(object, field);
-            addFieldView(object, associations[2]); 
-            
-            
+            addFieldView(object, associations.get(2)); 
         }
     }
 
@@ -90,20 +89,24 @@ public class NewObjectView extends Compo
         addView(fieldView);
     }
 
+    @Override
     protected void doLayout(Size maximumSize) {
         layout.layout(this, maximumSize);
     }
 
+    @Override
     protected Size requiredSize(Size availableSpace) {
         return layout.getRequiredSize(this);
     }
 
+    @Override
     public void loadOptions(Options viewOptions) {
         Options options = viewOptions.getOptions("fields");
       //  options.options()
        
     }
     
+    @Override
     public void saveOptions(Options viewOptions) {
        for (NewObjectField field : fields) {
            field.saveOptions(viewOptions.getOptions("fields"));

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/ViewDesignBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/ViewDesignBorder.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/ViewDesignBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/configurable/ViewDesignBorder.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.dnd.configurable;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.viewer.dnd.drawing.Location;
 import org.apache.isis.viewer.dnd.view.UserActionSet;
@@ -41,16 +43,18 @@ public class ViewDesignBorder extends Ab
         return viewUnderControl;
     }
     
+    @Override
     public void viewMenuOptions(UserActionSet menuOptions) {
         super.viewMenuOptions(menuOptions);
 
     //    ObjectAdapter object = getContent().getAdapter();
-        ObjectAssociation[] associations = getContent().getSpecification().getAssociations();
+        List<ObjectAssociation> associations = getContent().getSpecification().getAssociations();
        
         for (ObjectAssociation objectAssociation : associations) {
             final ObjectAssociation f = objectAssociation;
             UserActionAbstract action = new UserActionAbstract("Add field " + objectAssociation.getName()) {
 
+                @Override
                 public void execute(Workspace workspace, View view, Location at) {
                     NewObjectField field = new NewObjectField(f);
                     getNewObjectView().addField(field);

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/form/ExpandableViewBorder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/form/ExpandableViewBorder.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/form/ExpandableViewBorder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/form/ExpandableViewBorder.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.dnd.form;
 
+import java.util.List;
+
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
@@ -75,10 +77,12 @@ public class ExpandableViewBorder extend
             this.openCollectionViewSpecification = openCollectionViewSpecification;
         }
 
+        @Override
         public ViewAxis createAxis(Content content) {
             return null;
         }
 
+        @Override
         public View decorate(Axes axes, View view) {
             if (view.getContent().isObject()) {
                 return new ExpandableViewBorder(view, closedViewSpecification, openObjectViewSpecification);
@@ -107,6 +111,7 @@ public class ExpandableViewBorder extend
         canOpen();
     }
 
+    @Override
     protected void debugDetails(DebugString debug) {
         super.debugDetails(debug);
         debug.appendln("open spec", openViewSpecification);
@@ -201,13 +206,13 @@ public class ExpandableViewBorder extend
     private int canOpenObject(final Content content) {
         final ObjectAdapter object = ((ObjectContent) content).getObject();
         if (object != null) {
-            final ObjectAssociation[] fields = object.getSpecification().getAssociations(
+            final List<ObjectAssociation> fields = object.getSpecification().getAssociations(
                     ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), object));
-            for (int i = 0; i < fields.length; i++) {
-                if (fields[i].isOneToManyAssociation()) {
+            for (int i = 0; i < fields.size(); i++) {
+                if (fields.get(i).isOneToManyAssociation()) {
                     return CAN_OPEN;
-                } else if (fields[i].isOneToOneAssociation() && !fields[i].getSpecification().isParseable()
-                        && fieldContainsReference(object, fields[i])) {
+                } else if (fields.get(i).isOneToOneAssociation() && !fields.get(i).getSpecification().isParseable()
+                        && fieldContainsReference(object, fields.get(i))) {
                     return CAN_OPEN;
                 }
             }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/form/FormWithDetailSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/form/FormWithDetailSpecification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/form/FormWithDetailSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/form/FormWithDetailSpecification.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.dnd.form;
 
+import java.util.List;
+
 import org.apache.isis.core.commons.filters.AbstractFilter;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
@@ -41,45 +43,54 @@ public class FormWithDetailSpecification
         leftHandSideSpecification.addSubviewDecorator(new SelectObjectBorder.Factory());
     }
 
+    @Override
     public boolean canDisplay(ViewRequirement requirement) {
         return requirement.isObject() && requirement.isOpen() && !requirement.isSubview() && containsEnoughFields(requirement.getContent());
     }
 
     private boolean containsEnoughFields(Content content) {
         ObjectSpecification specification = content.getSpecification();
-        ObjectAssociation[] associations = specification.getAssociations(new AbstractFilter<ObjectAssociation>() {
+        List<ObjectAssociation> associations = specification.getAssociations(new AbstractFilter<ObjectAssociation>() {
+            @Override
             public boolean accept(ObjectAssociation t) {
                 return t.isOneToManyAssociation()
                         || (t.isOneToOneAssociation() && !((OneToOneAssociation) t).getSpecification().isParseable());
             }
         });
-        return associations.length >= 1;
+        return associations.size() >= 1;
     }
 
+    @Override
     public View createView(Content content, Axes axes, int sequence) {
         return new MasterDetailPanel(content, this, leftHandSideSpecification);
     }
 
+    @Override
     public String getName() {
         return "Form and details (experimental)";
     }
 
+    @Override
     public boolean isAligned() {
         return false;
     }
 
+    @Override
     public boolean isOpen() {
         return true;
     }
 
+    @Override
     public boolean isReplaceable() {
         return true;
     }
 
+    @Override
     public boolean isResizeable() {
         return true;
     }
 
+    @Override
     public boolean isSubView() {
         return false;
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/histogram/HistogramSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/histogram/HistogramSpecification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/histogram/HistogramSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/histogram/HistogramSpecification.java Sun Dec 19 16:28:38 2010
@@ -39,7 +39,8 @@ public class HistogramSpecification exte
 
     static List<? extends ObjectAssociation> availableFields(CollectionContent content) {
         List<? extends ObjectAssociation> associationList;
-        associationList = content.getElementSpecification().getAssociationList(new AbstractFilter<ObjectAssociation>() {
+        associationList = content.getElementSpecification().getAssociations(new AbstractFilter<ObjectAssociation>() {
+            @Override
             public boolean accept(ObjectAssociation t) {
                 return NumberAdapters.contains(t);
             }
@@ -49,16 +50,19 @@ public class HistogramSpecification exte
 
     public HistogramSpecification() {
         builder = new CollectionElementBuilder(new ViewFactory() {
+            @Override
             public View createView(Content content, Axes axes, int sequence) {
                 return new HistogramBar(content, axes.getAxis(HistogramAxis.class), HistogramSpecification.this);
             }
         });
     }
 
+    @Override
     public Layout createLayout(Content content, Axes axes) {
         return new HistogramLayout();
     }
 
+    @Override
     public boolean canDisplay(ViewRequirement requirement) {
         return requirement.isCollection() && requirement.isOpen() && availableFields((CollectionContent) requirement.getContent()).size() > 0;
     }
@@ -69,6 +73,7 @@ public class HistogramSpecification exte
         axes.add(new HistogramAxis(content));
     }
 
+    @Override
     public String getName() {
         return "Histogram (experimental)";
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/AbstractTableSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/AbstractTableSpecification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/AbstractTableSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/AbstractTableSpecification.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.dnd.table;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters;
@@ -43,6 +45,7 @@ public abstract class AbstractTableSpeci
             TableRowSpecification rowSpecification = new TableRowSpecification();
 
             // TODO do directly without specification
+            @Override
             public View createView(Content content, Axes axes, int sequence) {
                 //ViewSpecification rowSpecification = new SubviewIconSpecification();
                 return rowSpecification.createView(content, axes, -1);
@@ -52,30 +55,34 @@ public abstract class AbstractTableSpeci
         addSubviewDecorator(new TableRowBorder.Factory());
         
         addViewDecorator(new CompositeViewDecorator() {
+            @Override
             public View decorate(View view, Axes axes) {
                 axes.getAxis(TableAxis.class).setRoot(view);
                 return view;
             }});
     }
 
+    @Override
     public Layout createLayout(Content content, Axes axes) {
         return new StackLayout();
     }
     
+    @Override
     public void createAxes(Content content, Axes axes) {
         axes.add(new TableAxisImpl((CollectionContent) content), TableAxis.class);
     }
 
+    @Override
     public boolean canDisplay(ViewRequirement requirement) {
         if (!requirement.isCollection() || !requirement.isOpen()) {
             return false;
         } else {
             CollectionContent collectionContent = (CollectionContent) requirement.getContent();
             final ObjectSpecification elementSpecification = collectionContent.getElementSpecification();
-            final ObjectAssociation[] fields = elementSpecification
+            final List<ObjectAssociation> fields = elementSpecification
                     .getAssociations(ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS);
-            for (int i = 0; i < fields.length; i++) {
-                if (fields[i].isOneToOneAssociation()) {
+            for (int i = 0; i < fields.size(); i++) {
+                if (fields.get(i).isOneToOneAssociation()) {
                     return true;
                 }
             }
@@ -92,6 +99,7 @@ public abstract class AbstractTableSpeci
     protected abstract View doCreateView(final View table, final Content content, final ViewAxis axis);
  */
 
+    @Override
     public String getName() {
         return "Standard Table";
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableAxisImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableAxisImpl.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableAxisImpl.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableAxisImpl.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,10 @@
 
 package org.apache.isis.viewer.dnd.table;
 
+import java.util.List;
+
+import com.google.common.collect.Lists;
+
 import org.apache.isis.core.commons.lang.ToString;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
@@ -29,7 +33,7 @@ import org.apache.isis.viewer.dnd.view.V
 import org.apache.isis.viewer.dnd.view.collection.CollectionContent;
 
 public class TableAxisImpl implements TableAxis {
-    private final ObjectAssociation[] columns;
+    private final List<ObjectAssociation> columns;
     private final String[] columnName;
     private int rowHeaderOffet;
     private View table;
@@ -37,15 +41,15 @@ public class TableAxisImpl implements Ta
 
     public TableAxisImpl(CollectionContent content) {
         // TODO create axis first, then after view built set up the axis details?
-        final ObjectSpecification elementSpecification = ((CollectionContent) content).getElementSpecification();
-        final ObjectAssociation[] accessibleFields = elementSpecification
+        final ObjectSpecification elementSpecification = (content).getElementSpecification();
+        final List<ObjectAssociation> accessibleFields = elementSpecification
                 .getAssociations(ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS);
 
         this.columns = tableFields(accessibleFields, content);
-        widths = new int[columns.length];
-        columnName = new String[columns.length];
+        widths = new int[columns.size()];
+        columnName = new String[columns.size()];
         for (int i = 0; i < widths.length; i++) {
-            columnName[i] = columns[i].getName();
+            columnName[i] = columns.get(i).getName();
         }
 
         // TODO make the setting of the column width strategy external so it can be changed
@@ -57,8 +61,8 @@ public class TableAxisImpl implements Ta
      * int[columns.length]; columnName = new String[columns.length]; for (int i = 0; i < widths.length; i++) {
      * columnName[i] = columns[i].getName(); } }
      */
-    private ObjectAssociation[] tableFields(final ObjectAssociation[] viewFields, final CollectionContent content) {
-        for (int i = 0; i < viewFields.length; i++) {
+    private List<ObjectAssociation> tableFields(final List<ObjectAssociation> viewFields, final CollectionContent content) {
+        for (int i = 0; i < viewFields.size(); i++) {
             //final ObjectAssociation objectAssociation = viewFields[i];
             // TODO reinstate check to skip unsuitable types
             /*
@@ -75,19 +79,17 @@ public class TableAxisImpl implements Ta
             // if(viewFields[i].getSpecification().isOfType(Isis.getSpecificationLoader().lo));
         }
 
-        final ObjectAssociation[] tableFields = new ObjectAssociation[viewFields.length];
-        int c = 0;
-        for (int i = 0; i < viewFields.length; i++) {
-            if (!(viewFields[i] instanceof OneToManyAssociation)) {
-                tableFields[c++] = viewFields[i];
+        final List<ObjectAssociation> tableFields = Lists.newArrayList();
+        for (int i = 0; i < viewFields.size(); i++) {
+            if (!(viewFields.get(i) instanceof OneToManyAssociation)) {
+                tableFields.add(viewFields.get(i));
             }
         }
 
-        final ObjectAssociation[] results = new ObjectAssociation[c];
-        System.arraycopy(tableFields, 0, results, 0, c);
-        return results;
+        return tableFields;
     }
 
+    @Override
     public void ensureOffset(final int offset) {
         rowHeaderOffet = Math.max(rowHeaderOffet, offset + 5);
     }
@@ -98,6 +100,7 @@ public class TableAxisImpl implements Ta
      * 
      * If over the column border then returns -1.
      */
+    @Override
     public int getColumnAt(final int xPosition) {
         int edge = getHeaderOffset();
         for (int i = 0, cols = getColumnCount() + 1; i < cols; i++) {
@@ -119,6 +122,7 @@ public class TableAxisImpl implements Ta
      * 
      * If no column border is identified then returns -1.
      */
+    @Override
     public int getColumnBorderAt(final int xPosition) {
         int edge = getHeaderOffset();
         for (int i = 0, cols = getColumnCount(); i < cols; i++) {
@@ -134,26 +138,32 @@ public class TableAxisImpl implements Ta
         return -1;
     }
 
+    @Override
     public int getColumnCount() {
         return columnName.length;
     }
 
+    @Override
     public String getColumnName(final int column) {
         return columnName[column];
     }
 
+    @Override
     public int getColumnWidth(final int column) {
         return widths[column];
     }
 
+    @Override
     public ObjectAssociation getFieldForColumn(final int column) {
-        return columns[column];
+        return columns.get(column);
     }
 
+    @Override
     public int getHeaderOffset() {
         return rowHeaderOffet;
     }
 
+    @Override
     public int getLeftEdge(final int resizeColumn) {
         int width = getHeaderOffset();
         for (int i = 0, cols = getColumnCount(); i < resizeColumn && i < cols; i++) {
@@ -162,6 +172,7 @@ public class TableAxisImpl implements Ta
         return width;
     }
 
+    @Override
     public void invalidateLayout() {
         final View[] rows = table.getSubviews();
         for (int i = 0; i < rows.length; i++) {
@@ -170,24 +181,29 @@ public class TableAxisImpl implements Ta
         table.invalidateLayout();
     }
 
+    @Override
     public void setOffset(final int offset) {
         rowHeaderOffet = offset;
     }
 
+    @Override
     public void setRoot(final View view) {
         table = view;
     }
 
+    @Override
     public void setupColumnWidths(final ColumnWidthStrategy strategy) {
         for (int i = 0; i < widths.length; i++) {
-            widths[i] = strategy.getPreferredWidth(i, columns[i]);
+            widths[i] = strategy.getPreferredWidth(i, columns.get(i));
         }
     }
 
+    @Override
     public void setWidth(final int index, final int width) {
         widths[index] = width;
     }
 
+    @Override
     public String toString() {
         ToString str = new ToString(this);
         str.append("columns", columnName.length);

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.dnd.tree;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.SpecificationFacets;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
@@ -50,6 +52,7 @@ class ClosedObjectNodeSpecification exte
         this.showObjectContents = showObjectContents;
     }
 
+    @Override
     public boolean canDisplay(ViewRequirement requirement) {
         return requirement.isObject() && requirement.hasReference();
     }
@@ -57,14 +60,14 @@ class ClosedObjectNodeSpecification exte
     @Override
     public int canOpen(final Content content) {
         final ObjectAdapter object = ((ObjectContent) content).getObject();
-        final ObjectAssociation[] fields = object.getSpecification().getAssociations(
+        final List<ObjectAssociation> fields = object.getSpecification().getAssociations(
                 ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), object));
-        for (int i = 0; i < fields.length; i++) {
-            if (fields[i].isOneToManyAssociation()) {
+        for (int i = 0; i < fields.size(); i++) {
+            if (fields.get(i).isOneToManyAssociation()) {
                 return CAN_OPEN;
             }
 
-            if (  showObjectContents && fields[i].isOneToOneAssociation() &&
+            if (  showObjectContents && fields.get(i).isOneToOneAssociation() &&
                 !(SpecificationFacets.isBoundedSet(object.getSpecification()))) {
                 return CAN_OPEN;
             }
@@ -79,6 +82,7 @@ class ClosedObjectNodeSpecification exte
         return treeLeafNode;
     }
 
+    @Override
     public String getName() {
         return "Object tree node - closed";
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.dnd.tree;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters;
@@ -48,6 +50,7 @@ public class OpenObjectNodeSpecification
         builder = new ObjectFieldBuilder(this);
     }
     
+    @Override
     public Layout createLayout(Content content, Axes axes) {
         return new StackLayout();
     }
@@ -56,13 +59,14 @@ public class OpenObjectNodeSpecification
      * This is only used to control root nodes. Therefore a object tree can only be displayed for an object
      * with fields that are collections.
      */
+    @Override
     public boolean canDisplay(ViewRequirement requirement) {
         if (requirement.isObject() && requirement.hasReference()) {
             final ObjectAdapter object = requirement.getAdapter();
-            final ObjectAssociation[] fields = object.getSpecification().getAssociations(
+            final List<ObjectAssociation> fields = object.getSpecification().getAssociations(
                     ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), object));
-            for (int i = 0; i < fields.length; i++) {
-                if (fields[i].isOneToManyAssociation()) {
+            for (int i = 0; i < fields.size(); i++) {
+                if (fields.get(i).isOneToManyAssociation()) {
                     return true;
                 }
             }
@@ -71,6 +75,7 @@ public class OpenObjectNodeSpecification
         return false;
     }
     
+    @Override
     protected View createNodeView(Content content, Axes axes) {
         return decorator.decorate(axes, super.createNodeView(content, axes));
     }
@@ -90,6 +95,7 @@ public class OpenObjectNodeSpecification
         return false;
     }
 
+    @Override
     public String getName() {
         return "Object tree node - open";
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ActionHelper.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ActionHelper.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ActionHelper.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ActionHelper.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.dnd.view.action;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -34,18 +36,18 @@ public class ActionHelper {
     public static ActionHelper createInstance(final ObjectAdapter target, final ObjectAction action) {
         final int numberParameters = action.getParameterCount();
         final ObjectAdapter[] parameters = new ObjectAdapter[numberParameters];
-        final ObjectActionParameter[] parameterSpecs = action.getParameters();
+        final List<ObjectActionParameter> parameterSpecs = action.getParameters();
         ObjectAdapter[] defaultValues;
         ObjectAdapter[][] options;
 
         // action choices most be old or new syntax - cannot be mixed
 
-        defaultValues = new ObjectAdapter[parameterSpecs.length];
-        options = new ObjectAdapter[parameterSpecs.length][];
+        defaultValues = new ObjectAdapter[parameterSpecs.size()];
+        options = new ObjectAdapter[parameterSpecs.size()][];
 
-        for (int i = 0; i < parameterSpecs.length; i++) {
-            defaultValues[i] = parameterSpecs[i].getDefault(target);
-            options[i] = parameterSpecs[i].getChoices(target);
+        for (int i = 0; i < parameterSpecs.size(); i++) {
+            defaultValues[i] = parameterSpecs.get(i).getDefault(target);
+            options[i] = parameterSpecs.get(i).getChoices(target);
         }
 
         if (!hasValues(defaultValues) && !hasValues(options)) {
@@ -55,7 +57,7 @@ public class ActionHelper {
             options = action.getChoices(target);
         }
 
-        for (int i = 0; i < parameterSpecs.length; i++) {
+        for (int i = 0; i < parameterSpecs.size(); i++) {
             if (defaultValues[i] != null) {
                 parameters[i] = defaultValues[i];
             } else {
@@ -90,15 +92,15 @@ public class ActionHelper {
     public ParameterContent[] createParameters() {
         final ParameterContent[] parameterContents = new ParameterContent[parameters.length];
         for (int i = 0; i < parameters.length; i++) {
-            final ObjectActionParameter[] parameters2 = action.getParameters();
+            final List<ObjectActionParameter> parameters2 = action.getParameters();
             final ObjectAdapter adapter = parameters[i];
-            final ObjectSpecification specification = parameters2[i].getSpecification();
+            final ObjectSpecification specification = parameters2.get(i).getSpecification();
             if (specification.isParseable()) {
-                final ParseableEntryActionParameter parseableEntryActionParameter = (ParseableEntryActionParameter) parameters2[i];
+                final ParseableEntryActionParameter parseableEntryActionParameter = (ParseableEntryActionParameter) parameters2.get(i);
                 parameterContents[i] = new TextParseableParameterImpl(parseableEntryActionParameter, adapter, options[i], i,
                         this);
             } else {
-                parameterContents[i] = new ObjectParameterImpl((OneToOneActionParameter) parameters2[i], adapter, options[i],
+                parameterContents[i] = new ObjectParameterImpl((OneToOneActionParameter) parameters2.get(i), adapter, options[i],
                         i, this);
             }
         }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/OptionFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/OptionFactory.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/OptionFactory.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/OptionFactory.java Sun Dec 19 16:28:38 2010
@@ -20,15 +20,14 @@
 
 package org.apache.isis.viewer.dnd.view.action;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ObjectList;
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionType;
-/*
-import org.apache.isis.extensions.dnd.view.option.DisposeObjectOption;
-*/
 import org.apache.isis.viewer.dnd.view.UserAction;
 import org.apache.isis.viewer.dnd.view.UserActionSet;
 import org.apache.isis.viewer.dnd.view.option.DisposeObjectOption;
@@ -36,10 +35,9 @@ import org.apache.isis.viewer.dnd.view.o
 public class OptionFactory {
 
     public static void addCreateOptions(final ObjectSpecification specification, final UserActionSet options) {
-        ObjectAction[] actions;
         // TODO do the same as addObjectMenuOptions and collect together all the
         // actions for all the types
-        actions = specification.getServiceActionsFor(ObjectActionType.USER, ObjectActionType.EXPLORATION,
+        List<ObjectAction> actions = specification.getServiceActionsFor(ObjectActionType.USER, ObjectActionType.EXPLORATION,
                 ObjectActionType.PROTOTYPE, ObjectActionType.DEBUG);
         menuOptions(actions, null, options);
     }
@@ -68,22 +66,22 @@ public class OptionFactory {
         options.add(new DisposeObjectOption());
     }
 
-    private static void menuOptions(final ObjectAction[] actions, final ObjectAdapter target, final UserActionSet menuOptionSet) {
-        for (int i = 0; i < actions.length; i++) {
+    private static void menuOptions(final List<ObjectAction> actions, final ObjectAdapter target, final UserActionSet menuOptionSet) {
+        for (int i = 0; i < actions.size(); i++) {
             UserAction option = null;
-            if (actions[i].getActions().length > 0) {
-                option = menuOptionSet.addNewActionSet(actions[i].getName());
-                menuOptions(actions[i].getActions(), target, (UserActionSet) option);
+            if (actions.get(i).getActions().size() > 0) {
+                option = menuOptionSet.addNewActionSet(actions.get(i).getName());
+                menuOptions(actions.get(i).getActions(), target, (UserActionSet) option);
 
             } else {
-                final int noOfParameters = actions[i].getParameterCount();
+                final int noOfParameters = actions.get(i).getParameterCount();
                 if (noOfParameters == 0) {
-                    option = ImmediateObjectOption.createOption(actions[i], target);
-                } else if (actions[i].isContributed() && noOfParameters == 1 && target != null
-                        && target.getSpecification().isOfType(actions[i].getParameters()[0].getSpecification())) {
-                    option = ImmediateObjectOption.createServiceOption(actions[i], target);
+                    option = ImmediateObjectOption.createOption(actions.get(i), target);
+                } else if (actions.get(i).isContributed() && noOfParameters == 1 && target != null
+                        && target.getSpecification().isOfType(actions.get(i).getParameters().get(0).getSpecification())) {
+                    option = ImmediateObjectOption.createServiceOption(actions.get(i), target);
                 } else {
-                    option = DialoggedObjectOption.createOption(actions[i], target);
+                    option = DialoggedObjectOption.createOption(actions.get(i), target);
                 }
                 if (option != null) {
                     menuOptionSet.add(option);

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/collection/AbstractCollectionContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/collection/AbstractCollectionContent.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/collection/AbstractCollectionContent.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/collection/AbstractCollectionContent.java Sun Dec 19 16:28:38 2010
@@ -21,6 +21,7 @@
 package org.apache.isis.viewer.dnd.view.collection;
 
 import java.util.Enumeration;
+import java.util.List;
 
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.commons.exceptions.UnexpectedCallException;
@@ -51,6 +52,7 @@ public abstract class AbstractCollection
     private Comparator order;
     private boolean reverse;
 
+    @Override
     public final Enumeration allElements() {
         final ObjectAdapter[] elements = elements();
 
@@ -60,16 +62,19 @@ public abstract class AbstractCollection
             int i = 0;
             int size = elements.length;
 
+            @Override
             public boolean hasMoreElements() {
                 return i < size;
             }
 
+            @Override
             public Object nextElement() {
                 return elements[i++];
             }
         };
     }
 
+    @Override
     public void debugDetails(final DebugString debug) {
         debug.appendln("order", order);
         debug.appendln("reverse order", reverse);
@@ -80,6 +85,7 @@ public abstract class AbstractCollection
         return true;
     }
 
+    @Override
     public ObjectAdapter[] elements() {
         final ObjectAdapter collection = getCollection();
         final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
@@ -91,14 +97,17 @@ public abstract class AbstractCollection
         return elementsArray;
     }
 
+    @Override
     public abstract ObjectAdapter getCollection();
 
+    @Override
     public ObjectSpecification getElementSpecification() {
         final ObjectAdapter collection = getCollection();
         final TypeOfFacet facet = collection.getTypeOfFacet();
         return facet.valueSpec();
     }
 
+    @Override
     public String getDescription() {
         return "Collection";
     }
@@ -206,9 +215,9 @@ public abstract class AbstractCollection
             }
         });
 
-        final ObjectAssociation[] fields = getElementSpecification().getAssociations();
-        for (int i = 0; i < fields.length; i++) {
-            final ObjectAssociation field = fields[i];
+        final List<ObjectAssociation> fields = getElementSpecification().getAssociations();
+        for (int i = 0; i < fields.size(); i++) {
+            final ObjectAssociation field = fields.get(i);
 
             sortOptions.add(new UserActionAbstract("Sort by " + field.getName()) {
                 @Override
@@ -220,14 +229,17 @@ public abstract class AbstractCollection
         }
     }
 
+    @Override
     public void parseTextEntry(final String entryText) {
         throw new UnexpectedCallException();
     }
 
+    @Override
     public void setOrder(final Comparator order) {
         this.order = order;
     }
 
+    @Override
     public void setOrderByField(final ObjectAssociation field) {
         if (order instanceof FieldComparator && ((FieldComparator) order).getField() == field) {
             reverse = !reverse;
@@ -237,6 +249,7 @@ public abstract class AbstractCollection
         }
     }
 
+    @Override
     public void setOrderByElement() {
         if (order == TITLE_COMPARATOR) {
             reverse = !reverse;
@@ -246,6 +259,7 @@ public abstract class AbstractCollection
         }
     }
 
+    @Override
     public ObjectAssociation getFieldSortOrder() {
         if (order instanceof FieldComparator) {
             return ((FieldComparator) order).getField();
@@ -254,6 +268,7 @@ public abstract class AbstractCollection
         }
     }
 
+    @Override
     public Image getIconPicture(final int iconHeight) {
         final ObjectAdapter adapter = getCollection();
         if (adapter == null) {
@@ -267,18 +282,22 @@ public abstract class AbstractCollection
         return icon;
     }
 
+    @Override
     public boolean getOrderByElement() {
         return order == TITLE_COMPARATOR;
     }
 
+    @Override
     public boolean getReverseSortOrder() {
         return reverse;
     }
 
+    @Override
     public boolean isOptionEnabled() {
         return false;
     }
 
+    @Override
     public ObjectAdapter[] getOptions() {
         return null;
     }

Modified: incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/ObjectFieldBuilder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/ObjectFieldBuilder.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/ObjectFieldBuilder.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/ObjectFieldBuilder.java Sun Dec 19 16:28:38 2010
@@ -20,7 +20,10 @@
 
 package org.apache.isis.viewer.dnd.view.composite;
 
+import java.util.List;
+
 import org.apache.log4j.Logger;
+
 import org.apache.isis.core.commons.ensure.Assert;
 import org.apache.isis.core.commons.exceptions.UnknownTypeException;
 import org.apache.isis.core.commons.filters.Filter;
@@ -67,7 +70,7 @@ public class ObjectFieldBuilder extends 
         ObjectSpecification spec = object.getSpecification();
         Filter<ObjectAssociation> filter = ObjectAssociationFilters.dynamicallyVisible(IsisContext
                 .getAuthenticationSession(), object);
-        final ObjectAssociation[] flds = spec.getAssociations(filter);
+        final List<ObjectAssociation> flds = spec.getAssociations(filter);
 
         if (view.getSubviews().length == 0) {
             initialBuild(view, axes, object, flds);
@@ -76,11 +79,11 @@ public class ObjectFieldBuilder extends 
         }
     }
 
-    private void initialBuild(final View view, Axes axes, final ObjectAdapter object, final ObjectAssociation[] flds) {
+    private void initialBuild(final View view, Axes axes, final ObjectAdapter object, final List<ObjectAssociation> flds) {
         LOG.debug("  as new build");
         // addViewAxes(view);
-        for (int f = 0; f < flds.length; f++) {
-            final ObjectAssociation field = flds[f];
+        for (int f = 0; f < flds.size(); f++) {
+            final ObjectAssociation field = flds.get(f);
             addField(view, axes, object, field, f);
         }
     }
@@ -97,7 +100,7 @@ public class ObjectFieldBuilder extends 
         }
     }
 
-    private void updateBuild(final View view, Axes axes, final ObjectAdapter object, final ObjectAssociation[] flds) {
+    private void updateBuild(final View view, Axes axes, final ObjectAdapter object, final List<ObjectAssociation> flds) {
         LOG.debug("  as update build");
         /*
          * 1/ To remove fields: look through views and remove any that don't exists in visible fields
@@ -113,8 +116,8 @@ public class ObjectFieldBuilder extends 
         outer: for (int i = 0; i < subviews.length; i++) {
             final FieldContent fieldContent = ((FieldContent) subviews[i].getContent());
 
-            for (int j = 0; j < flds.length; j++) {
-                final ObjectAssociation field = flds[j];
+            for (int j = 0; j < flds.size(); j++) {
+                final ObjectAssociation field = flds.get(j);
                 if (fieldContent.getField() == field) {
                     continue outer;
                 }
@@ -162,8 +165,8 @@ public class ObjectFieldBuilder extends 
         }
 
         // add new fields
-        outer2: for (int j = 0; j < flds.length; j++) {
-            final ObjectAssociation field = flds[j];
+        outer2: for (int j = 0; j < flds.size(); j++) {
+            final ObjectAssociation field = flds.get(j);
             for (int i = 0; i < subviews.length; i++) {
                 final FieldContent fieldContent = ((FieldContent) subviews[i].getContent());
                 if (fieldContent.getField() == field) {



Mime
View raw message