incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1050892 [4/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/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java (original)
+++ incubator/isis/trunk/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.dnd.view.content;
 
+import java.util.List;
+
 import org.apache.isis.applib.query.QueryFindAllInstances;
 import org.apache.isis.core.commons.ensure.Assert;
 import org.apache.isis.core.commons.exceptions.UnexpectedCallException;
@@ -93,13 +95,13 @@ public abstract class AbstractObjectCont
             final ObjectSpecification spec = original.getSpecification();
 
             final ObjectAdapter clone = getPersistenceSession().createInstance(spec);
-            final ObjectAssociation[] fields = spec.getAssociations();
-            for (int i = 0; i < fields.length; i++) {
-                final ObjectAdapter fld = fields[i].get(original);
-
-                if (fields[i].isOneToOneAssociation()) {
-                    ((OneToOneAssociation) fields[i]).setAssociation(clone, fld);
-                } else if (fields[i].isOneToManyAssociation()) {
+            final List<ObjectAssociation> fields = spec.getAssociations();
+            for (int i = 0; i < fields.size(); i++) {
+                final ObjectAdapter fld = fields.get(i).get(original);
+
+                if (fields.get(i).isOneToOneAssociation()) {
+                    ((OneToOneAssociation) fields.get(i)).setAssociation(clone, fld);
+                } else if (fields.get(i).isOneToManyAssociation()) {
                     // clone.setValue((OneToOneAssociation) fields[i], fld.getObject());
                 }
             }
@@ -159,7 +161,7 @@ public abstract class AbstractObjectCont
             // TODO: use Facet for this test instead.
             return new Veto("Can't set field in persistent object with reference to non-persistent object");
         }
-        final ObjectAssociation[] fields = targetAdapter.getSpecification().getAssociations(
+        final List<ObjectAssociation> fields = targetAdapter.getSpecification().getAssociations(
                 ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), targetAdapter));
         for (final ObjectAssociation fld : fields) {
             if (!fld.isOneToOneAssociation()) {
@@ -209,11 +211,11 @@ public abstract class AbstractObjectCont
             return action.execute(target, new ObjectAdapter[] { source });
         }
 
-        final ObjectAssociation[] associations = target.getSpecification().getAssociations(
+        final List<ObjectAssociation> associations = target.getSpecification().getAssociations(
                 ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), target));
 
-        for (int i = 0; i < associations.length; i++) {
-            final ObjectAssociation association = associations[i];
+        for (int i = 0; i < associations.size(); i++) {
+            final ObjectAssociation association = associations.get(i);
             if (association.isOneToOneAssociation() && source.getSpecification().isOfType(association.getSpecification())) {
                 OneToOneAssociation otoa = (OneToOneAssociation) association;
                 if (association.get(target) == null && otoa.isAssociationValid(target, source).isAllowed()) {

Modified: incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/CollectionView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/CollectionView.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/CollectionView.java (original)
+++ incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/CollectionView.java Sun Dec 19 16:28:38 2010
@@ -37,6 +37,7 @@ import org.apache.isis.viewer.html.reque
 
 public class CollectionView implements Action {
 
+    @Override
     public final void execute(final Request request, final Context context, final Page page) {
         final String idString = request.getObjectId();
         final ObjectAdapter collection = context.getMappedCollection(idString);
@@ -59,7 +60,7 @@ public class CollectionView implements A
         }
         content.setIconName(iconName);
 
-        if (elementSpecification.getAssociations(ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS).length != 0) {
+        if (elementSpecification.getAssociations(ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS).size() != 0) {
             final Table table = TableUtil.createTable(context, false, collection, titleString, elementSpecification);
             content.add(table);
         } else {
@@ -74,6 +75,7 @@ public class CollectionView implements A
         context.clearMessagesAndWarnings();
     }
 
+    @Override
     public String name() {
         return Request.COLLECTION_COMMAND;
     }

Modified: incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java (original)
+++ incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.html.action.view;
 
+import java.util.List;
+
 import org.apache.isis.core.commons.exceptions.UnknownTypeException;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -54,9 +56,9 @@ public class ObjectView extends ObjectVi
                 || (adapter.isPersistent() && SpecificationFacets.isImmutableOncePersisted(specification));
 
         boolean allFieldUneditable = true;
-        final ObjectAssociation[] flds = specification.getAssociations();
-        for (int i = 0; i < flds.length; i++) {
-            if (flds[i].isUsable(IsisContext.getAuthenticationSession(), adapter).isAllowed()) {
+        final List<ObjectAssociation> flds = specification.getAssociations();
+        for (int i = 0; i < flds.size(); i++) {
+            if (flds.get(i).isUsable(IsisContext.getAuthenticationSession(), adapter).isAllowed()) {
                 allFieldUneditable = false;
                 break;
             }
@@ -69,10 +71,10 @@ public class ObjectView extends ObjectVi
 
     private void createObjectView(final Context context, final ObjectAdapter object, final ViewPane pane, final String id) {
         final ObjectSpecification specification = object.getSpecification();
-        final ObjectAssociation[] visibleFields = specification.getAssociations(ObjectAssociationFilters
+        final List<ObjectAssociation> visibleFields = specification.getAssociations(ObjectAssociationFilters
                 .dynamicallyVisible(IsisContext.getAuthenticationSession(), object));
-        for (int i = 0; i < visibleFields.length; i++) {
-            final ObjectAssociation field = visibleFields[i];
+        for (int i = 0; i < visibleFields.size(); i++) {
+            final ObjectAssociation field = visibleFields.get(i);
 
             final ComponentFactory factory = context.getComponentFactory();
             final Block fieldBlock = factory.createBlock("field", field.getDescription());
@@ -109,6 +111,7 @@ public class ObjectView extends ObjectVi
         }
     }
 
+    @Override
     public String name() {
         return Request.OBJECT_COMMAND;
     }

Modified: incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java (original)
+++ incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java Sun Dec 19 16:28:38 2010
@@ -23,6 +23,8 @@ package org.apache.isis.viewer.html.acti
 import java.util.ArrayList;
 import java.util.List;
 
+import com.google.inject.internal.Lists;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -37,35 +39,35 @@ public class MenuUtil {
 
     public static Component[] menu(final ObjectAdapter target, final String targetObjectId, final Context context) {
         final ObjectSpecification specification = target.getSpecification();
-        final ObjectAction[] actions1 = specification.getObjectActions(ObjectActionType.USER);
-        final ObjectAction[] actions2 = specification.getObjectActions(ObjectActionType.EXPLORATION);
-        final ObjectAction[] actions3 = specification.getObjectActions(ObjectActionType.PROTOTYPE);
-        final ObjectAction[] actions = concat(concat(actions1, actions2), actions3);
+        final List<ObjectAction> actions1 = specification.getObjectActions(ObjectActionType.USER);
+        final List<ObjectAction> actions2 = specification.getObjectActions(ObjectActionType.EXPLORATION);
+        final List<ObjectAction> actions3 = specification.getObjectActions(ObjectActionType.PROTOTYPE);
+        final List<ObjectAction> actions = concat(concat(actions1, actions2), actions3);
         final Component[] menuItems = createMenu("Actions", target, actions, context, targetObjectId);
         return menuItems;
     }
 
-	private static ObjectAction[] concat(
-			final ObjectAction[] actions1,
-			final ObjectAction[] actions2) {
-		final ObjectAction[] actions = new ObjectAction[actions1.length + actions2.length];
-        System.arraycopy(actions1, 0, actions, 0, actions1.length);
-        System.arraycopy(actions2, 0, actions, actions1.length, actions2.length);
+	private static List<ObjectAction> concat(
+			final List<ObjectAction> actions1,
+			final List<ObjectAction> actions2) {
+		final List<ObjectAction> actions = Lists.newArrayList();
+		actions.addAll(actions1);
+		actions.addAll(actions2);
 		return actions;
 	}
 
     private static Component[] createMenu(
             final String menuName,
             final ObjectAdapter target,
-            final ObjectAction[] actions,
+            final List<ObjectAction> actions,
             final Context context,
             final String targetObjectId) {
         final List<Component> menuItems = new ArrayList<Component>();
-        for (int j = 0; j < actions.length; j++) {
-            final ObjectAction action = actions[j];
+        for (int j = 0; j < actions.size(); j++) {
+            final ObjectAction action = actions.get(j);
             final String name = action.getName();
             Component menuItem = null;
-            if (action.getActions().length > 0) {
+            if (action.getActions().size() > 0) {
                 final Component[] components = createMenu(name, target, action.getActions(), context, targetObjectId);
                 menuItem = context.getComponentFactory().createSubmenu(name, components);
             } else {
@@ -104,7 +106,7 @@ public class MenuUtil {
                     collectParameters = false;
                     // TODO use new promptForParameters method instead of all this
                 } else if (action.getParameterCount() == 1 && action.isContributed()
-                        && target.getSpecification().isOfType(action.getParameters()[0].getSpecification())) {
+                        && target.getSpecification().isOfType(action.getParameters().get(0).getSpecification())) {
                     collectParameters = false;
                 } else {
                     collectParameters = true;

Modified: incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java (original)
+++ incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,11 @@
 
 package org.apache.isis.viewer.html.action.view.util;
 
+import static org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters.PROPERTIES;
+import static org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS;
+
+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.facets.collections.modify.CollectionFacet;
@@ -34,9 +39,6 @@ import org.apache.isis.viewer.html.compo
 import org.apache.isis.viewer.html.component.Table;
 import org.apache.isis.viewer.html.context.Context;
 
-import static org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters.PROPERTIES;
-import static org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS;
-
 
 
 public class TableUtil {
@@ -63,10 +65,10 @@ public class TableUtil {
             final ObjectSpecification elementType) {
 
     	final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
-        final ObjectAssociation[] columnAssociations = 
+        final List<ObjectAssociation> columnAssociations = 
         	elementType.getAssociations(STATICALLY_VISIBLE_ASSOCIATIONS.and(PROPERTIES));
         
-        int len = columnAssociations.length;
+        int len = columnAssociations.size();
 
         ComponentFactory factory = context.getComponentFactory();
         final Table table = factory.createTable(len, addSelector);

Modified: incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/task/EditTask.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/task/EditTask.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/task/EditTask.java (original)
+++ incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/task/EditTask.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.html.task;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.ResolveState;
 import org.apache.isis.core.metamodel.consent.Consent;
@@ -41,9 +43,9 @@ import org.apache.isis.viewer.html.conte
 
 public class EditTask extends Task {
     private static int size(final ObjectAdapter object) {
-        final ObjectAssociation[] fields = object.getSpecification().getAssociations(
+        final List<ObjectAssociation> fields = object.getSpecification().getAssociations(
                 ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), object));
-        return fields.length;
+        return fields.size();
     }
 
     private static boolean skipField(final ObjectAdapter object, final ObjectAssociation fld) {
@@ -56,12 +58,12 @@ public class EditTask extends Task {
     public EditTask(final Context context, final ObjectAdapter object) {
         super(context, "Edit", "", object, size(object));
 
-        final ObjectAssociation[] allFields = object.getSpecification().getAssociations(
+        final List<ObjectAssociation> allFields = object.getSpecification().getAssociations(
                 ObjectAssociationFilters.dynamicallyVisible(IsisContext.getAuthenticationSession(), object));
 
         fields = new ObjectAssociation[names.length];
-        for (int i = 0, j = 0; j < allFields.length; j++) {
-            final ObjectAssociation fld = allFields[j];
+        for (int i = 0, j = 0; j < allFields.size(); j++) {
+            final ObjectAssociation fld = allFields.get(j);
             fields[i] = fld;
             names[i] = fld.getName();
             descriptions[i] = fld.getDescription();

Modified: incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java (original)
+++ incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java Sun Dec 19 16:28:38 2010
@@ -40,6 +40,7 @@ import org.apache.isis.viewer.html.reque
 
 public final class InvokeMethod implements Action {
 
+    @Override
     public void execute(final Request request, final Context context, final Page page) {
         final String idString = request.getObjectId();
         if (idString == null) {
@@ -58,7 +59,7 @@ public final class InvokeMethod implemen
         if (action.getParameterCount() == 0) {
             executeImmediately = true;
         } else if (action.getParameterCount() == 1 && isContributedMethod
-                && target.getSpecification().isOfType(action.getParameters()[0].getSpecification())) {
+                && target.getSpecification().isOfType(action.getParameters().get(0).getSpecification())) {
             executeImmediately = true;
         }
 
@@ -126,6 +127,7 @@ public final class InvokeMethod implemen
         }
     }
 
+    @Override
     public String name() {
         return "method";
     }

Modified: incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java (original)
+++ incubator/isis/trunk/viewer/html/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java Sun Dec 19 16:28:38 2010
@@ -42,17 +42,17 @@ public final class MethodTask extends Ta
         super(context, action.getName(), action.getDescription(), target, action.getParameterCount());
         this.action = action;
 
-        final ObjectActionParameter[] parameters = action.getParameters();
-        final int len = parameters.length;
+        final List<ObjectActionParameter> parameters = action.getParameters();
+        final int len = parameters.size();
 
         for (int i = 0; i < len; i++) {
-            names[i] = parameters[i].getName();
-            descriptions[i] = parameters[i].getDescription();
-            fieldSpecifications[i] = parameters[i].getSpecification();
-            optional[i] = parameters[i].isOptional();
+            names[i] = parameters.get(i).getName();
+            descriptions[i] = parameters.get(i).getDescription();
+            fieldSpecifications[i] = parameters.get(i).getSpecification();
+            optional[i] = parameters.get(i).isOptional();
 
-            if (parameters[i].getSpecification().isParseable()) {
-                final ParseableEntryActionParameter valueParameter = (ParseableEntryActionParameter) parameters[i];
+            if (parameters.get(i).getSpecification().isParseable()) {
+                final ParseableEntryActionParameter valueParameter = (ParseableEntryActionParameter) parameters.get(i);
                 noLines[i] = valueParameter.getNoLines();
                 wraps[i] = valueParameter.canWrap();
                 maxLength[i] = valueParameter.getMaximumLength();

Modified: incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/objects/ObjectResourceImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/objects/ObjectResourceImpl.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/objects/ObjectResourceImpl.java (original)
+++ incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/objects/ObjectResourceImpl.java Sun Dec 19 16:28:38 2010
@@ -3,7 +3,6 @@ package org.apache.isis.viewer.restful.v
 import java.io.InputStream;
 import java.text.MessageFormat;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
@@ -64,7 +63,8 @@ import org.apache.isis.viewer.restful.vi
 @Path("/object")
 public class ObjectResourceImpl extends ResourceAbstract implements ObjectResource {
 
-	public String object(
+	@Override
+    public String object(
 			final String oidEncodedStr) {
         init();
         String oidStr = UrlDecoderUtils.urlDecode(oidEncodedStr);
@@ -106,7 +106,7 @@ public class ObjectResourceImpl extends 
         final Element div = xhtmlRenderer.div_p("Properties", HtmlClass.PROPERTIES);
 
         final ObjectSpecification noSpec = nakedObject.getSpecification();
-        final List<OneToOneAssociation> rows = noSpec.getPropertyList();
+        final List<OneToOneAssociation> rows = noSpec.getProperties();
 
         final List<TableColumn<OneToOneAssociation>> columns = new ArrayList<TableColumn<OneToOneAssociation>>();
         columns.add(new TableColumnOneToOneAssociationName(noSpec, session, nakedObject, getResourceContext()));
@@ -129,7 +129,7 @@ public class ObjectResourceImpl extends 
         final Element div = xhtmlRenderer.div_p("Collections", HtmlClass.COLLECTIONS);
 
         final ObjectSpecification noSpec = nakedObject.getSpecification();
-        final List<OneToManyAssociation> rows = noSpec.getCollectionList();
+        final List<OneToManyAssociation> rows = noSpec.getCollections();
 
         final List<TableColumn<OneToManyAssociation>> columns = new ArrayList<TableColumn<OneToManyAssociation>>();
         columns.add(new TableColumnOneToManyAssociationName(noSpec, session, nakedObject, getResourceContext()));
@@ -153,8 +153,8 @@ public class ObjectResourceImpl extends 
 
         final List<ObjectAction> actions = new ArrayList<ObjectAction>();
         for (final ObjectActionType type : ResourceAbstract.ACTION_TYPES) {
-            final ObjectAction[] actionsForType = ActionUtils.flattened(noSpec.getObjectActions(type));
-            actions.addAll(Arrays.asList(actionsForType));
+            final List<ObjectAction> actionsForType = ActionUtils.flattened(noSpec.getObjectActions(type));
+            actions.addAll(actionsForType);
         }
         final List<ObjectAction> rows = ListUtils.toList(actions.toArray(new ObjectAction[0]));
 
@@ -178,6 +178,7 @@ public class ObjectResourceImpl extends 
     // properties
     // /////////////////////////////////////////////////////////////////////
 
+    @Override
     public String modifyProperty(
             final String oidEncodedStr,
             final String propertyEncodedId,
@@ -196,7 +197,7 @@ public class ObjectResourceImpl extends 
 
         final OneToOneAssociation property = (OneToOneAssociation) noSpec.getAssociation(propertyId);
 
-        final ObjectAdapter proposedValueNO = getNakedObject(proposedValue, nakedObject, property);
+        final ObjectAdapter proposedValueNO = getObjectAdapter(proposedValue, nakedObject, property);
 
         // make sure we have a value (should be using clear otherwise)
         if (proposedValueNO == null) {
@@ -227,6 +228,7 @@ public class ObjectResourceImpl extends 
         return xhtml.toXML();
     }
 
+    @Override
     public String clearProperty(
     		final String oidEncodedStr, 
     		final String propertyEncodedId) {
@@ -275,6 +277,7 @@ public class ObjectResourceImpl extends 
         ADD_TO, REMOVE_FROM
     }
 
+    @Override
     public String accessCollection(
     		final String oidEncodedStr, 
     		final String collectionEncodedId) {
@@ -323,6 +326,7 @@ public class ObjectResourceImpl extends 
         return xhtml.toXML();
     }
 
+    @Override
     public String addToCollection(
             final String oidStr,
             final String collectionEncodedId,
@@ -330,6 +334,7 @@ public class ObjectResourceImpl extends 
         return modifyCollection(oidStr, collectionEncodedId, proposedValueEncodedOidStr, CollectionModificationType.ADD_TO);
     }
 
+    @Override
     public String removeFromCollection(
             final String oidStr,
             final String collectionEncodedId,
@@ -396,6 +401,7 @@ public class ObjectResourceImpl extends 
     // actions
     // /////////////////////////////////////////////////////////////////////
 
+    @Override
     public String invokeAction(
             final String oidEncodedStr,
             final String actionEncodedId,
@@ -416,8 +422,8 @@ public class ObjectResourceImpl extends 
 		final ObjectSpecification noSpec = nakedObject.getSpecification();
 		final ObjectAction action = getObjectAction(noSpec, actionId);
 		
-		final ObjectActionParameter[] parameters = action.getParameters();
-		final int parameterCount = parameters.length;
+		final List<ObjectActionParameter> parameters = action.getParameters();
+		final int parameterCount = parameters.size();
 		final int argumentCount = args.length;
 		if (parameterCount > argumentCount) {
 		    // this isn't an != check because JAX-RS will always give us 10 args, but some/all will be null.
@@ -426,10 +432,10 @@ public class ObjectResourceImpl extends 
 		}
 		
 		final ObjectAdapter[] proposedArguments = new ObjectAdapter[parameterCount];
-		for (int i = 0; i < parameters.length; i++) {
+		for (int i = 0; i < parameters.size(); i++) {
 		    final String proposedArg = args[i];
 		    if (proposedArg != null) {
-		        final ObjectAdapter argNO = getNakedObject(proposedArg, nakedObject, parameters[i]);
+		        final ObjectAdapter argNO = getObjectAdapter(proposedArg, nakedObject, parameters.get(i));
 		
 		        if (argNO == null) {
 		        	throw new WebApplicationException(responseOfGone("could not determine proposed value"));
@@ -555,7 +561,7 @@ public class ObjectResourceImpl extends 
         return xhtmlRenderer.aHref(uri, nakedObject.titleString(), "object", "results", HtmlClass.ACTION_RESULT);
     }
 
-    private ObjectAdapter getNakedObject(
+    private ObjectAdapter getObjectAdapter(
             final String proposedValue,
             final ObjectAdapter nakedObject,
             final ObjectFeature nakedObjectFeature) {

Modified: incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/objects/actions/TableColumnNakedObjectActionInvoke.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/objects/actions/TableColumnNakedObjectActionInvoke.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/objects/actions/TableColumnNakedObjectActionInvoke.java (original)
+++ incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/objects/actions/TableColumnNakedObjectActionInvoke.java Sun Dec 19 16:28:38 2010
@@ -1,6 +1,7 @@
 package org.apache.isis.viewer.restful.viewer.resources.objects.actions;
 
 import java.text.MessageFormat;
+import java.util.List;
 
 import nu.xom.Attribute;
 import nu.xom.Element;
@@ -33,14 +34,14 @@ public final class TableColumnNakedObjec
         final String formName = "action-" + actionId;
         final String uri = MessageFormat.format("{0}/object/{1}/action/{2}",
                 resourceContext.getHttpServletRequest().getContextPath(), getOidStrRealTarget(action), actionId);
-        final ObjectActionParameter[] parameters = action.getParameters();
+        final List<ObjectActionParameter> parameters = action.getParameters();
 
         final Element div = xhtmlRenderer.div(HtmlClass.ACTION);
         div.appendChild(renderForm(formName, uri, parameters));
         return div;
     }
 
-	private Element renderForm(final String formName, final String uri, final ObjectActionParameter[] parameters) {
+	private Element renderForm(final String formName, final String uri, final List<ObjectActionParameter> parameters) {
 
         final Element form = xhtmlRenderer.form(formName, HtmlClass.ACTION);
         form.addAttribute(new Attribute("method", "POST"));
@@ -53,9 +54,9 @@ public final class TableColumnNakedObjec
         return form;
     }
 
-   	private void renderInputFieldsForParameters(final ObjectActionParameter[] parameters, final Element form) {
-        for (int i = 0; i < parameters.length; i++) {
-            final ObjectActionParameter parameter = parameters[i];
+   	private void renderInputFieldsForParameters(final List<ObjectActionParameter> parameters, final Element form) {
+        for (int i = 0; i < parameters.size(); i++) {
+            final ObjectActionParameter parameter = parameters.get(i);
             final String inputFieldName = INPUT_FIELD_NAME_PREFIX + i;
 
             final Element inputLabel = new Element("p");

Modified: incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/specs/SpecsResourceImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/specs/SpecsResourceImpl.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/specs/SpecsResourceImpl.java (original)
+++ incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/resources/specs/SpecsResourceImpl.java Sun Dec 19 16:28:38 2010
@@ -39,6 +39,7 @@ public class SpecsResourceImpl extends R
     // specs
     // /////////////////////////////////////////////////////////////////////
 
+    @Override
     public String specs() {
         init();
 
@@ -68,7 +69,8 @@ public class SpecsResourceImpl extends R
 		Arrays.sort(
 				noSpecs, 
 				new Comparator<ObjectSpecification>() {
-			public int compare(ObjectSpecification o1,
+			@Override
+            public int compare(ObjectSpecification o1,
 					ObjectSpecification o2) {
 				return o1.getFullName().compareTo(o2.getFullName());
 			}});
@@ -83,6 +85,7 @@ public class SpecsResourceImpl extends R
     // spec
     // /////////////////////////////////////////////////////////////////////
 
+    @Override
     public String spec(final String specFullName) {
         init();
         final XhtmlTemplate xhtml = new XhtmlTemplate(specFullName, getServletRequest());
@@ -109,7 +112,7 @@ public class SpecsResourceImpl extends R
     private Element asDivProperties(final ObjectSpecification noSpec) {
         final Element div = xhtmlRenderer.div_p("Properties", HtmlClass.PROPERTIES);
 
-        final List<OneToOneAssociation> properties = noSpec.getPropertyList();
+        final List<OneToOneAssociation> properties = noSpec.getProperties();
         final Element ul = xhtmlRenderer.ul(HtmlClass.PROPERTIES);
         div.appendChild(ul);
         for (final ObjectAssociation property : properties) {
@@ -125,7 +128,7 @@ public class SpecsResourceImpl extends R
     private Element asDivCollections(final ObjectSpecification noSpec) {
         final Element div = xhtmlRenderer.div_p("Collections", HtmlClass.COLLECTIONS);
 
-        final List<OneToManyAssociation> collections = noSpec.getCollectionList();
+        final List<OneToManyAssociation> collections = noSpec.getCollections();
         final Element ul = xhtmlRenderer.ul(HtmlClass.COLLECTIONS);
         div.appendChild(ul);
         for (final ObjectAssociation collection : collections) {
@@ -141,7 +144,7 @@ public class SpecsResourceImpl extends R
     private Element asDivActions(final ObjectSpecification noSpec, final ObjectActionType type) {
         final Element div = xhtmlRenderer.div_p(type.name() + " actions", HtmlClass.ACTIONS);
 
-        final ObjectAction[] actions = ActionUtils.flattened(noSpec.getObjectActions(type));
+        final List<ObjectAction> actions = ActionUtils.flattened(noSpec.getObjectActions(type));
         final Element ul = xhtmlRenderer.ul(HtmlClass.ACTIONS);
         div.appendChild(ul);
         for (final ObjectAction action : actions) {
@@ -159,6 +162,7 @@ public class SpecsResourceImpl extends R
     // specFacet
     // /////////////////////////////////////////////////////////////////////
 
+    @Override
     public String specFacet(
             final String specFullName,
             final String facetTypeName) {
@@ -195,6 +199,7 @@ public class SpecsResourceImpl extends R
     // specProperty
     // /////////////////////////////////////////////////////////////////////
 
+    @Override
     public String specProperty(
             final String specFullName,
             final String propertyName) {
@@ -228,6 +233,7 @@ public class SpecsResourceImpl extends R
     // specCollection
     // /////////////////////////////////////////////////////////////////////
 
+    @Override
     public String specCollection(
             final String specFullName,
             final String collectionName) {
@@ -261,6 +267,7 @@ public class SpecsResourceImpl extends R
     // specAction
     // /////////////////////////////////////////////////////////////////////
 
+    @Override
     public String specAction(
     		final String specFullName, 
     		final String actionId) {
@@ -294,6 +301,7 @@ public class SpecsResourceImpl extends R
     // specPropertyFacet
     // /////////////////////////////////////////////////////////////////////
 
+    @Override
     public String specPropertyFacet(
             final String specFullName,
             final String propertyName,
@@ -343,6 +351,7 @@ public class SpecsResourceImpl extends R
     // specCollectionFacet
     // /////////////////////////////////////////////////////////////////////
 
+    @Override
     public String specCollectionFacet(
             final String specFullName,
             final String collectionId,
@@ -391,6 +400,7 @@ public class SpecsResourceImpl extends R
     // specActionFacet
     // /////////////////////////////////////////////////////////////////////
 
+    @Override
     public String specActionFacet(
             final String specFullName,
             final String actionId,

Modified: incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/util/ActionUtils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/util/ActionUtils.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/util/ActionUtils.java (original)
+++ incubator/isis/trunk/viewer/restful/viewer/src/main/java/org/apache/isis/viewer/restful/viewer/util/ActionUtils.java Sun Dec 19 16:28:38 2010
@@ -1,8 +1,9 @@
 package org.apache.isis.viewer.restful.viewer.util;
 
-import java.util.ArrayList;
 import java.util.List;
 
+import com.google.inject.internal.Lists;
+
 import org.apache.isis.core.metamodel.runtimecontext.spec.feature.ObjectActionSet;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionType;
@@ -12,12 +13,12 @@ public final class ActionUtils {
 
     private ActionUtils() {}
 
-    public static ObjectAction[] flattened(final ObjectAction[] objectActions) {
-        final List<ObjectAction> actions = new ArrayList<ObjectAction>();
+    public static List<ObjectAction> flattened(final List<ObjectAction> objectActions) {
+        final List<ObjectAction> actions = Lists.newArrayList();
         for (final ObjectAction action : objectActions) {
             if (action.getType() == ObjectActionType.SET) {
                 final ObjectActionSet actionSet = (ObjectActionSet) action;
-                final ObjectAction[] subActions = actionSet.getActions();
+                final List<ObjectAction> subActions = actionSet.getActions();
                 for (final ObjectAction subAction : subActions) {
                     actions.add(subAction);
                 }
@@ -25,7 +26,7 @@ public final class ActionUtils {
                 actions.add(action);
             }
         }
-        return actions.toArray(new ObjectAction[] {});
+        return actions;
     }
 
 }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/action/ActionAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/action/ActionAction.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/action/ActionAction.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/action/ActionAction.java Sun Dec 19 16:28:38 2010
@@ -21,6 +21,7 @@
 package org.apache.isis.viewer.scimpi.dispatcher.action;
 
 import java.io.IOException;
+import java.util.List;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.TextEntryParseException;
@@ -46,6 +47,7 @@ public class ActionAction implements Act
 
     public static final String ACTION = "action";
 
+    @Override
     public String getName() {
         return ACTION;
     }
@@ -53,6 +55,7 @@ public class ActionAction implements Act
     /**
      * REVIEW - this and EditAction are very similar - refactor out common code.
      */
+    @Override
     public void process(RequestContext context) throws IOException {
         String objectId = context.getParameter(OBJECT);
         String version = context.getParameter(VERSION);
@@ -180,7 +183,7 @@ public class ActionAction implements Act
 
     private FormState validateParameters(RequestContext context, ObjectAction action, ObjectAdapter object) {
         FormState formState = new FormState();
-        ObjectActionParameter[] parameters2 = action.getParameters();
+        List<ObjectActionParameter> parameters2 = action.getParameters();
         int parameterCount = action.getParameterCount();
         for (int i = 0; i < parameterCount; i++) {
             String fieldName = parameterName(i);
@@ -192,7 +195,7 @@ public class ActionAction implements Act
             
             if (newEntry == null) {
                 // TODO figure out a better way to determine if boolean or a password
-                ObjectSpecification spec = parameters2[i].getSpecification();
+                ObjectSpecification spec = parameters2.get(i).getSpecification();
                 if (spec.isOfType(IsisContext.getSpecificationLoader().loadSpecification(boolean.class))
                         || spec.isOfType(IsisContext.getSpecificationLoader().loadSpecification(Boolean.class))) {
                     newEntry = FALSE;
@@ -204,13 +207,13 @@ public class ActionAction implements Act
             Consent consent = null;
 
             
-            if (!parameters2[i].isOptional() && newEntry.equals("")) {
-                consent = new Veto(parameters2[i].getName() + " required");
+            if (!parameters2.get(i).isOptional() && newEntry.equals("")) {
+                consent = new Veto(parameters2.get(i).getName() + " required");
 
-            } else  if (parameters2[i].getSpecification().getFacet(ParseableFacet.class) != null) {
+            } else  if (parameters2.get(i).getSpecification().getFacet(ParseableFacet.class) != null) {
                 try {
-                    ParseableFacet facet = (ParseableFacet) parameters2[i].getSpecification().getFacet(ParseableFacet.class);
-                    String message = parameters2[i].isValid(object, newEntry); 
+                    ParseableFacet facet = parameters2.get(i).getSpecification().getFacet(ParseableFacet.class);
+                    String message = parameters2.get(i).isValid(object, newEntry); 
                     if (message != null) { 
                         consent = new Veto(message); 
                     } 
@@ -242,8 +245,10 @@ public class ActionAction implements Act
         return PARAMETER + (index + 1);
     }
 
+    @Override
     public void init() {}
 
+    @Override
     public void debug(DebugView view) {}
 }
 

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=1050892&r1=1050891&r2=1050892&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 Sun Dec 19 16:28:38 2010
@@ -22,6 +22,7 @@ package org.apache.isis.viewer.scimpi.di
 
 import java.io.IOException;
 import java.util.Arrays;
+import java.util.List;
 
 import org.apache.isis.core.commons.debug.DebugInfo;
 import org.apache.isis.core.commons.debug.DebugString;
@@ -49,12 +50,15 @@ public class DebugAction implements Acti
         this.dispatcher = dispatcher;
     }
 
+    @Override
     public String getName() {
         return "debug";
     }
 
+    @Override
     public void debug(DebugView view) {}
 
+    @Override
     public void process(RequestContext context) throws IOException {
         DebugView view = new DebugView(context.getWriter(), new DebugString());
         view.header();
@@ -130,17 +134,17 @@ public class DebugAction implements Acti
         speficationFacets(view, spec);
         
         
-        ObjectAssociation[] fields = spec.getAssociations();
+        List<ObjectAssociation> fields = spec.getAssociations();
         specificationMembers(view, "Fields", fields);
-        ObjectAction[] userActions = spec.getObjectActions(ObjectActionType.USER);
+        List<ObjectAction> userActions = spec.getObjectActions(ObjectActionType.USER);
         specificationMembers(view, "User Actions", userActions);
         specificationMembers(view, "Exploration Actions", spec.getObjectActions(ObjectActionType.EXPLORATION));
         specificationMembers(view, "Prototype Actions", spec.getObjectActions(ObjectActionType.PROTOTYPE));
         specificationMembers(view, "Debug Actions", spec.getObjectActions(ObjectActionType.DEBUG));
 
         
-        for (int i = 0; i < fields.length; i++) {
-            ObjectAssociation field = fields[i];
+        for (int i = 0; i < fields.size(); i++) {
+            ObjectAssociation field = fields.get(i);
             view.divider("<span id=\"" + field.getId() + "\">Field: " + field.getName() + "</span>");
             view.appendRow("ID", field.getIdentifier());
             view.appendRow("Short ID", field.getId());
@@ -154,8 +158,8 @@ public class DebugAction implements Acti
             speficationFacets(view, field);
         }
         
-        for (int i = 0; i < userActions.length; i++) {
-            ObjectAction action = userActions[i];
+        for (int i = 0; i < userActions.size(); i++) {
+            final ObjectAction action = userActions.get(i);
             view.divider("<span id=\"" + action.getId() + "\">Action: " + action.getName() + "</span>");
             view.appendRow("ID", action.getIdentifier());
             view.appendRow("Short ID", action.getId());
@@ -170,20 +174,20 @@ public class DebugAction implements Acti
             
             speficationFacets(view, action);
 
-            ObjectActionParameter[] parameters = action.getParameters();
+            List<ObjectActionParameter> parameters = action.getParameters();
             StringBuffer buffer = new StringBuffer();
-            if (parameters.length == 0) {
+            if (parameters.size() == 0) {
                 buffer.append("none");
             } else {
-                ObjectActionParameter[] p = action.getParameters();
-                for (int j = 0; j < parameters.length; j++) {
-                    buffer.append(p[j].getName());
+                List<ObjectActionParameter> p = action.getParameters();
+                for (int j = 0; j < parameters.size(); j++) {
+                    buffer.append(p.get(j).getName());
                     buffer.append(" (");
-                    buffer.append(specificationLink(parameters[j].getSpecification()));
+                    buffer.append(specificationLink(parameters.get(j).getSpecification()));
                     buffer.append(")<br>");
-                    Class<? extends Facet>[] parameterFacets = p[j].getFacetTypes();
+                    Class<? extends Facet>[] parameterFacets = p.get(j).getFacetTypes();
                     for (int k = 0; k < parameterFacets.length; k++) {
-                        buffer.append("&nbsp;&nbsp;" + p[j].getFacet(parameterFacets[k]).toString() + "<br>");
+                        buffer.append("&nbsp;&nbsp;" + p.get(j).getFacet(parameterFacets[k]).toString() + "<br>");
                     }
                 }
             }
@@ -197,13 +201,13 @@ public class DebugAction implements Acti
         */
     }
 
-    private void specificationMembers(DebugView view, String label, ObjectMember[] members) {
+    private void specificationMembers(DebugView view, String label, List<? extends ObjectMember> members) {
         StringBuffer buffer = new StringBuffer();
-        if (members.length == 0) {
+        if (members.size() == 0) {
             buffer.append("none");
         } else {
-            for (int i = 0; i < members.length; i++) {
-                buffer.append("<a href=\"#" + members[i].getId() + "\">" + members[i].getName() + "</a><br>");
+            for (int i = 0; i < members.size(); i++) {
+                buffer.append("<a href=\"#" + members.get(i).getId() + "\">" + members.get(i).getName() + "</a><br>");
             }
         }
         view.appendRow(label, buffer.toString());
@@ -211,6 +215,7 @@ public class DebugAction implements Acti
 
     private void speficationFacets(DebugView view, FacetHolder facetHolder) {
         Facet[] facets = facetHolder.getFacets(new AbstractFilter<Facet>() {
+            @Override
             public boolean accept(Facet facet) {
                 return true;
             }
@@ -263,6 +268,7 @@ public class DebugAction implements Acti
         }
     }
 
+    @Override
     public void init() {}
 }
 

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java Sun Dec 19 16:28:38 2010
@@ -21,6 +21,7 @@
 package org.apache.isis.viewer.scimpi.dispatcher.edit;
 
 import java.io.IOException;
+import java.util.List;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.TextEntryParseException;
@@ -43,10 +44,12 @@ import org.apache.isis.viewer.scimpi.dis
 public class EditAction implements Action {
     public static final String ACTION = "edit";
 
+    @Override
     public String getName() {
         return ACTION;
     }
 
+    @Override
     public void process(RequestContext context) throws IOException {
         try {
             String objectId = context.getParameter(OBJECT);
@@ -55,8 +58,8 @@ public class EditAction implements Actio
             resultName = resultName == null ? RequestContext.RESULT : resultName;
             String override = context.getParameter(RESULT_OVERRIDE);
             
-            ObjectAdapter adapter = (ObjectAdapter) context.getMappedObject(objectId);
-            ObjectAssociation[] fields = adapter.getSpecification().getAssociations(ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS);
+            ObjectAdapter adapter = context.getMappedObject(objectId);
+            List<ObjectAssociation> fields = adapter.getSpecification().getAssociations(ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS);
             FormState entryState = validateObject(context, adapter, fields);
             Version adapterVersion = adapter.getVersion();
             Version formVersion = context.getVersion(version);
@@ -125,16 +128,16 @@ public class EditAction implements Actio
     private FormState validateObject(
             RequestContext context,
             ObjectAdapter object,
-            ObjectAssociation[] fields) {
+            List<ObjectAssociation> fields) {
         FormState formState = new FormState();
-        for (int i = 0; i < fields.length; i++) {
-            ObjectAssociation field = fields[i];
+        for (int i = 0; i < fields.size(); i++) {
+            ObjectAssociation field = fields.get(i);
             String fieldId = field.getId();
             String newEntry = context.getParameter(fieldId);
-            if (fields[i].isOneToManyAssociation()) {
+            if (fields.get(i).isOneToManyAssociation()) {
                 continue;
             }
-            if (fields[i].isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
+            if (fields.get(i).isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
                 continue;
             }
             if (field.isUsable(IsisContext.getAuthenticationSession(), object).isVetoed()) {
@@ -159,7 +162,7 @@ public class EditAction implements Actio
 
             } else if (field.getSpecification().containsFacet(ParseableFacet.class)) {
                 try {
-                    ParseableFacet facet = (ParseableFacet) field.getSpecification().getFacet(ParseableFacet.class);
+                    ParseableFacet facet = field.getSpecification().getFacet(ParseableFacet.class);
                     ObjectAdapter originalValue = field.get(object);
                     ObjectAdapter newValue =  facet.parseTextEntry(originalValue, newEntry);
                     consent = ((OneToOneAssociation) field).isAssociationValid(object, newValue);
@@ -169,7 +172,7 @@ public class EditAction implements Actio
                 }
 
             } else {
-                ObjectAdapter associate = (ObjectAdapter) context.getMappedObject(newEntry);
+                ObjectAdapter associate = context.getMappedObject(newEntry);
                 if (associate != null) {
                     IsisContext.getPersistenceSession().resolveImmediately(associate);
                 }
@@ -186,38 +189,40 @@ public class EditAction implements Actio
         return formState;
     }
 
-    private void changeObject(RequestContext context, ObjectAdapter object, FormState editState, ObjectAssociation[] fields) {
-        for (int i = 0; i < fields.length; i++) {
-            FieldEditState field = editState.getField(fields[i].getId());
+    private void changeObject(RequestContext context, ObjectAdapter object, FormState editState, List<ObjectAssociation> fields) {
+        for (int i = 0; i < fields.size(); i++) {
+            FieldEditState field = editState.getField(fields.get(i).getId());
             if (field == null) {
                 continue;
             }
             String newEntry = field.getEntry();
-            ObjectAdapter originalValue = fields[i].get(object);
-            boolean isVisible = fields[i].isVisible(IsisContext.getAuthenticationSession(), object).isAllowed();
-            boolean isUsable = fields[i].isUsable(IsisContext.getAuthenticationSession(), object).isAllowed();
+            ObjectAdapter originalValue = fields.get(i).get(object);
+            boolean isVisible = fields.get(i).isVisible(IsisContext.getAuthenticationSession(), object).isAllowed();
+            boolean isUsable = fields.get(i).isUsable(IsisContext.getAuthenticationSession(), object).isAllowed();
             boolean bothEmpty = originalValue == null && newEntry.equals("");
             boolean bothSame = newEntry.equals(originalValue == null ? "" : originalValue.titleString());
             if ((!isVisible ||!isUsable) || bothEmpty || bothSame) {
-                if (fields[i].getSpecification().getFacet(ParseableFacet.class) == null) {
+                if (fields.get(i).getSpecification().getFacet(ParseableFacet.class) == null) {
                     // REVIEW restores object to loader
                     context.getMappedObject(newEntry);
                 }
                 continue;
             }
             
-            if (fields[i].getSpecification().containsFacet(ParseableFacet.class)) {
-                ParseableFacet facet = (ParseableFacet) fields[i].getSpecification().getFacet(ParseableFacet.class);
+            if (fields.get(i).getSpecification().containsFacet(ParseableFacet.class)) {
+                ParseableFacet facet = fields.get(i).getSpecification().getFacet(ParseableFacet.class);
                 ObjectAdapter newValue =  facet.parseTextEntry(originalValue, newEntry);
-                ((OneToOneAssociation) fields[i]).setAssociation(object, newValue);
+                ((OneToOneAssociation) fields.get(i)).setAssociation(object, newValue);
             } else {
-                ((OneToOneAssociation) fields[i]).setAssociation(object, (ObjectAdapter) field.getValue());
+                ((OneToOneAssociation) fields.get(i)).setAssociation(object, field.getValue());
             }
         }
     }
 
+    @Override
     public void init() {}
 
+    @Override
     public void debug(DebugView view) {}
 }
 

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/util/MethodsUtils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/util/MethodsUtils.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/util/MethodsUtils.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/util/MethodsUtils.java Sun Dec 19 16:28:38 2010
@@ -80,7 +80,7 @@ public class MethodsUtils {
             throw new ScimpiException("Object not specified when looking for " + methodName);
         }
 
-        ObjectAction[] actions = object.getSpecification().getObjectActions(ObjectActionType.USER,
+        List<ObjectAction> actions = object.getSpecification().getObjectActions(ObjectActionType.USER,
                 ObjectActionType.EXPLORATION, ObjectActionType.PROTOTYPE, ObjectActionType.DEBUG);
         ObjectAction action = findAction(actions, methodName);
        /* if (action == null) {
@@ -94,17 +94,17 @@ public class MethodsUtils {
         return action;
     }
 
-    private static ObjectAction findAction(final ObjectAction[] actions, final String methodName) {
-        for (int i = 0; i < actions.length; i++) {
-            if (actions[i].getActions().length > 0) {
-                final ObjectAction action = findAction(actions[i].getActions(), methodName);
+    private static ObjectAction findAction(final List<ObjectAction> actions, final String methodName) {
+        for (int i = 0; i < actions.size(); i++) {
+            if (actions.get(i).getActions().size() > 0) {
+                final ObjectAction action = findAction(actions.get(i).getActions(), methodName);
                 if (action != null) {
                     return action;
                 }
 
             } else {
-                if (actions[i].getId().equals(methodName)) {
-                    return actions[i];
+                if (actions.get(i).getId().equals(methodName)) {
+                    return actions.get(i);
                 }
             }
         }
@@ -128,7 +128,7 @@ public class MethodsUtils {
             }
             throw new DispatchException("Failed to find service " + serviceId);
         } else {
-            return (ObjectAdapter) context.getMappedObject(objectId);
+            return context.getMappedObject(objectId);
         }
     }
 

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionContent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionContent.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionContent.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionContent.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.scimpi.dispatcher.view.action;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.object.parseable.ParseableFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
@@ -55,11 +57,11 @@ public class ActionContent implements Bl
 
     public ObjectAdapter[] getParameters(Request request) {
         ObjectAdapter[] params = new ObjectAdapter[parameters.length];
-        ObjectActionParameter[] pars = action.getParameters();
+        List<ObjectActionParameter> pars = action.getParameters();
         for (int i = 0; i < parameters.length; i++) {
-            ObjectSpecification typ = pars[i].getSpecification();
+            ObjectSpecification typ = pars.get(i).getSpecification();
             if (typ.getFacet(ParseableFacet.class) != null) {
-                ParseableFacet facet = (ParseableFacet) typ.getFacet(ParseableFacet.class);
+                ParseableFacet facet = typ.getFacet(ParseableFacet.class);
                 params[i] = facet.parseTextEntry(null, parameters[i]);
             } else {
                 params[i] = request.getContext().getMappedObject(parameters[i]);

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionForm.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionForm.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionForm.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionForm.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.scimpi.dispatcher.view.action;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
@@ -41,6 +43,7 @@ import org.apache.isis.viewer.scimpi.dis
 
 public class ActionForm extends AbstractElementProcessor {
 
+    @Override
     public void process(Request request) {
         CreateFormParameter parameters = new CreateFormParameter();
         parameters.objectId = request.getOptionalProperty(OBJECT);
@@ -152,20 +155,15 @@ public class ActionForm extends Abstract
     }
 
     private static void initializeFields(RequestContext context, ObjectAdapter object, ObjectAction action, InputField[] fields) {
-        ObjectActionParameter[] parameters = action.getParameters();
+        List<ObjectActionParameter> parameters = action.getParameters();
         for (int i = 0; i < fields.length; i++) {
             InputField field = fields[i];
-            ObjectActionParameter param = parameters[i];
+            ObjectActionParameter param = parameters.get(i);
             
             ObjectAdapter[] optionsForParameter = action.getChoices(object)[i];
             FieldFactory.initializeField(context, object, param, optionsForParameter, !param.isOptional(), true, field);
             
             
-            
-            
-            
-            
-            
 /*            
             field.setLabel(param.getName());
             field.setDescription(param.getDescription());
@@ -250,7 +248,7 @@ public class ActionForm extends Abstract
 
             String title = defaultValue == null ? "" : defaultValue.titleString();
             if (field.getType() == InputField.REFERENCE) {
-                ObjectSpecification objectSpecification = action.getParameters()[i].getSpecification();
+                ObjectSpecification objectSpecification = action.getParameters().get(i).getSpecification();
                 if (defaultValue != null) {
                     String html = "<img class=\"small-icon\" src=\"" + context.imagePath(objectSpecification) + "\" alt=\""
                             + objectSpecification.getShortName() + "\"/>" + title;
@@ -306,6 +304,7 @@ public class ActionForm extends Abstract
         }
     }
 
+    @Override
     public String getName() {
         return "action-form";
     }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/Methods.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/Methods.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/Methods.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/Methods.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.scimpi.dispatcher.view.action;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.runtimecontext.spec.feature.ObjectActionSet;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
@@ -35,6 +37,7 @@ import org.apache.isis.viewer.scimpi.dis
 
 public class Methods extends AbstractElementProcessor {
 
+    @Override
     public void process(Request request) {
         String objectId = request.getOptionalProperty(OBJECT);
         boolean showForms = request.isRequested(FORMS, false);
@@ -59,7 +62,7 @@ public class Methods extends AbstractEle
     }
 
     public static void writeMethods(Request request, String objectId, ObjectAdapter adapter, boolean showForms, InclusionList inclusionList) {
-        ObjectAction[] actions = adapter.getSpecification().getObjectActions(ObjectActionType.USER);
+        List<ObjectAction> actions = adapter.getSpecification().getObjectActions(ObjectActionType.USER);
         writeMethods(request, adapter, actions, objectId, showForms, inclusionList);
         // TODO determine if system is set up to display exploration methods
         if (true) {
@@ -73,18 +76,18 @@ public class Methods extends AbstractEle
         }
     }
 
-    private static void writeMethods(Request request, ObjectAdapter adapter, ObjectAction[] actions, String objectId, boolean showForms, InclusionList inclusionList) {
+    private static void writeMethods(Request request, ObjectAdapter adapter, List<ObjectAction> actions, String objectId, boolean showForms, InclusionList inclusionList) {
         actions = inclusionList.includedActions(actions);
-        for (int j = 0; j < actions.length; j++) {
-            ObjectAction action = actions[j];
+        for (int j = 0; j < actions.size(); j++) {
+            ObjectAction action = actions.get(j);
             if (action instanceof ObjectActionSet) {
                 request.appendHtml("<div class=\"actions\">");
                 writeMethods(request, adapter, action.getActions(), objectId, showForms, inclusionList);
                 request.appendHtml("</div>");
             } else if (action.isContributed() && action.getParameterCount() == 1
-                    && adapter.getSpecification().isOfType(action.getParameters()[0].getSpecification())) {
+                    && adapter.getSpecification().isOfType(action.getParameters().get(0).getSpecification())) {
                 if (objectId != null) {
-                    ObjectAdapter target = (ObjectAdapter) request.getContext().getMappedObject(objectId);
+                    ObjectAdapter target = request.getContext().getMappedObject(objectId);
                     ObjectAdapter realTarget = action.realTarget(target);
                     String realTargetId = request.getContext().mapObject(realTarget, Scope.INTERACTION);
                     writeMethod(request, adapter, new String[] { objectId }, action, realTargetId, showForms);
@@ -146,6 +149,7 @@ public class Methods extends AbstractEle
         }
     }
 
+    @Override
     public String getName() {
         return "methods";
     }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/RunAction.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/RunAction.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/RunAction.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/RunAction.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.scimpi.dispatcher.view.action;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
@@ -33,6 +35,7 @@ import org.apache.isis.viewer.scimpi.dis
 
 public class RunAction extends AbstractElementProcessor {
     
+    @Override
     public void process(Request request) {
         RequestContext context = request.getContext();
 
@@ -56,9 +59,9 @@ public class RunAction extends AbstractE
         
         // swap null parameter of the object's type to run a contributed method
         if (action.isContributed()) {
-            ObjectActionParameter[] parameterSpecs = action.getParameters();
+            final List<ObjectActionParameter> parameterSpecs = action.getParameters();
             for (int i = 0; i < parameters.length; i++) {
-                if (parameters[i] == null && object.getSpecification().isOfType(parameterSpecs[i].getSpecification())) {
+                if (parameters[i] == null && object.getSpecification().isOfType(parameterSpecs.get(i).getSpecification())) {
                     parameters[i] = object;
                     break;
                 }
@@ -70,6 +73,7 @@ public class RunAction extends AbstractE
         request.popBlockContent();
     }
 
+    @Override
     public String getName() {
         return "run-action";
     }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Members.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Members.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Members.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Members.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.scimpi.dispatcher.view.debug;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
@@ -34,10 +36,12 @@ import org.apache.isis.viewer.scimpi.dis
 
 public class Members extends AbstractElementProcessor {
 
+    @Override
     public String getName() {
         return "members";
     }
 
+    @Override
     public void process(Request request) {
         String id = request.getOptionalProperty(OBJECT);
         String fieldName = request.getOptionalProperty(FIELD);
@@ -57,14 +61,14 @@ public class Members extends AbstractEle
         ObjectSpecification specification = field == null ? object.getSpecification() : field.getSpecification();
         
         request.appendHtml(specification.getSingularName() + " (" + specification.getFullName() + ") \n");
-        ObjectAssociation[] fields = specification.getAssociations();
+        List<ObjectAssociation> fields = specification.getAssociations();
         for (ObjectAssociation fld : fields) {
             if (!fld.isAlwaysHidden()) {
                 request.appendHtml("   " + fld.getId() + " - '" + fld.getName() + "' -> "+  fld.getSpecification().getSingularName() + (fld.isOneToManyAssociation() ? " (collection of)" : "") + "\n" );
             }
         }
         request.appendHtml("   --------------\n");
-        ObjectAction[] actions = specification.getObjectActions(ObjectActionType.USER);;
+        List<ObjectAction> actions = specification.getObjectActions(ObjectActionType.USER);;
         for (ObjectAction action : actions) {
             request.appendHtml("   " + action.getId() + " (");
             boolean first = true;

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Specification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Specification.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Specification.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Specification.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.scimpi.dispatcher.view.debug;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
@@ -30,6 +32,7 @@ import org.apache.isis.viewer.scimpi.dis
 
 public class Specification extends AbstractElementProcessor {
 
+    @Override
     public void process(Request request) {
         if (request.isRequested("always") || request.getContext().getDebug() == RequestContext.Debug.ON) {
             request.appendHtml("<div class=\"debug\">");
@@ -39,9 +42,9 @@ public class Specification extends Abstr
             ObjectAdapter object = request.getContext().getMappedObjectOrResult(id);
             ObjectSpecification specification = object.getSpecification();
             request.appendHtml(specification.getSingularName() + " (" + specification.getFullName() + ") \n");
-            ObjectAssociation[] fields = specification.getAssociations();
-            for (int i = 0; i < fields.length; i++) {
-                request.appendHtml("    " + fields[i].getName() + " (" + fields[i].getSpecification().getSingularName() + ") \n" );
+            List<ObjectAssociation> fields = specification.getAssociations();
+            for (int i = 0; i < fields.size(); i++) {
+                request.appendHtml("    " + fields.get(i).getName() + " (" + fields.get(i).getSpecification().getSingularName() + ") \n" );
                 
             }
             
@@ -50,6 +53,7 @@ public class Specification extends Abstr
         }
     }
 
+    @Override
     public String getName() {
         return "specification";
     }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.scimpi.dispatcher.view.display;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.object.parseable.ParseableFacet;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
@@ -33,10 +35,12 @@ import org.apache.isis.viewer.scimpi.dis
 
 public abstract class AbstractFormView extends AbstractObjectProcessor {
 
+    @Override
     public String checkFieldType(ObjectAssociation objectField) {
         return objectField.isOneToOneAssociation() ? null : "is not an object";
     }
 
+    @Override
     public void process(Request request, ObjectAdapter object) {
         String cls = request.getOptionalProperty(CLASS, "form");
         String classString = " class=\"" + cls + "\"";
@@ -49,15 +53,15 @@ public abstract class AbstractFormView e
         request.processUtilCloseTag();
 
         if (object != null) {
-            ObjectAssociation[] fields = tag.includedFields(object.getSpecification().getAssociations(ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS));
+            List<ObjectAssociation> fields = tag.includedFields(object.getSpecification().getAssociations(ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS));
             LinkedObject[] linkFields = tag.linkedFields(fields);
     
             String linkAllView = request.getOptionalProperty(LINK);
             if (linkAllView != null) {
                 linkAllView = request.getContext().fullUriPath(linkAllView);
                 for (int i = 0; i < linkFields.length; i++) {
-                    boolean isObject = fields[i].isOneToOneAssociation();
-                    boolean isNotParseable = !fields[i].getSpecification().containsFacet(ParseableFacet.class);
+                    boolean isObject = fields.get(i).isOneToOneAssociation();
+                    boolean isNotParseable = !fields.get(i).getSpecification().containsFacet(ParseableFacet.class);
                     linkFields[i] = isObject && isNotParseable ? new LinkedObject(linkAllView) : null;
                 }
             }
@@ -70,15 +74,15 @@ public abstract class AbstractFormView e
     private void write(
             Request request,
             ObjectAdapter object,
-            ObjectAssociation[] fields,
+            List<ObjectAssociation> fields,
             LinkedObject[] linkFields, String classString, String title, String oddRowClass, String evenRowClass) {
         request.appendHtml("<div" + classString + ">");
         if (title != null) {
             request.appendHtml("<div class=\"title\">" + title+ "</div>");            
         }
         int row = 1;
-        for (int i = 0; i < fields.length; i++) {
-            ObjectAssociation field = fields[i];
+        for (int i = 0; i < fields.size(); i++) {
+            ObjectAssociation field = fields.get(i);
             if (ignoreField(field)) {
                 continue;
             }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractTableView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractTableView.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractTableView.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractTableView.java Sun Dec 19 16:28:38 2010
@@ -21,6 +21,7 @@
 package org.apache.isis.viewer.scimpi.dispatcher.view.display;
 
 import java.util.Iterator;
+import java.util.List;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacet;
@@ -37,6 +38,7 @@ import org.apache.isis.viewer.scimpi.dis
 
 public abstract class AbstractTableView extends AbstractElementProcessor {
 
+    @Override
     public void process(Request request) {
         RequestContext context = request.getContext();
 
@@ -47,7 +49,7 @@ public abstract class AbstractTableView 
         String field = request.getOptionalProperty(FIELD);
         if (field != null) {
             String objectId = request.getOptionalProperty(OBJECT);
-            ObjectAdapter object = (ObjectAdapter) context.getMappedObjectOrResult(objectId);
+            ObjectAdapter object = context.getMappedObjectOrResult(objectId);
             if (object == null) {
                 throw new ScimpiException("No object for result or " + objectId);
             }
@@ -58,12 +60,12 @@ public abstract class AbstractTableView 
             isFieldEditable = objectField.isUsable(IsisContext.getAuthenticationSession(), object).isAllowed();
             IsisContext.getPersistenceSession().resolveField(object, objectField);
             collection = objectField.get(object);
-            facet = (TypeOfFacet) objectField.getFacet(TypeOfFacet.class);
+            facet = objectField.getFacet(TypeOfFacet.class);
             parentObjectId = objectId == null ? context.mapObject(object, Scope.REQUEST) : objectId;
         } else {
             String id = request.getOptionalProperty(COLLECTION);
-            collection = (ObjectAdapter) context.getMappedObjectOrResult(id);
-            facet = (TypeOfFacet) collection.getTypeOfFacet();
+            collection = context.getMappedObjectOrResult(id);
+            facet = collection.getTypeOfFacet();
         }
 
         String rowClassesList = request.getOptionalProperty(ROW_CLASSES, ODD_ROW_CLASS + "|" + EVEN_ROW_CLASS);
@@ -72,7 +74,7 @@ public abstract class AbstractTableView 
             rowClasses = rowClassesList.split("[,|/]");
         }
 
-        ObjectAssociation[] allFields = facet.valueSpec().getAssociations(
+        List<ObjectAssociation> allFields = facet.valueSpec().getAssociations(
                 ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS);
         TableContentWriter rowBuilder = createRowBuilder(request, context, isFieldEditable ? parentObjectId : null, allFields);
         write(request, collection, rowBuilder, rowClasses);
@@ -83,7 +85,7 @@ public abstract class AbstractTableView 
             final Request request,
             RequestContext context,
             final String parent,
-            ObjectAssociation[] allFields);
+            final List<ObjectAssociation> allFields);
 
     public static void write(Request request, ObjectAdapter collection, TableContentWriter rowBuilder, String[] rowClasses) {
         RequestContext context = request.getContext();
@@ -91,7 +93,7 @@ public abstract class AbstractTableView 
         request.appendHtml("<table>");
         rowBuilder.writeHeaders(request);
 
-        CollectionFacet facet = (CollectionFacet) collection.getSpecification().getFacet(CollectionFacet.class);
+        CollectionFacet facet = collection.getSpecification().getFacet(CollectionFacet.class);
         Iterator<ObjectAdapter> iterator = facet.iterator(collection);
         int row = 1;
         while (iterator.hasNext()) {
@@ -111,6 +113,7 @@ public abstract class AbstractTableView 
         request.appendHtml("</table>");
     }
 
+    @Override
     public String getName() {
         return "table";
     }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/LongFormView.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/LongFormView.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/LongFormView.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/LongFormView.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.scimpi.dispatcher.view.display;
 
+import java.util.List;
+
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.actcoll.typeof.TypeOfFacet;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
@@ -31,12 +33,13 @@ import org.apache.isis.viewer.scimpi.dis
 
 public class LongFormView extends AbstractFormView {
 
+    @Override
     protected void addField(Request request, ObjectAdapter object, ObjectAssociation field, LinkedObject linkedObject) {
         if (field.isOneToManyAssociation()) {
             IsisContext.getPersistenceSession().resolveField(object, field);
             ObjectAdapter collection = field.get(object);
-            TypeOfFacet facet = (TypeOfFacet) collection.getTypeOfFacet();
-            ObjectAssociation[] fields = facet.valueSpec().getAssociations(
+            TypeOfFacet facet = collection.getTypeOfFacet();
+            List<ObjectAssociation> fields = facet.valueSpec().getAssociations(
                     ObjectAssociationFilters.STATICALLY_VISIBLE_ASSOCIATIONS);
             boolean isFieldEditable = field.isUsable(IsisContext.getAuthenticationSession(), object).isAllowed();
             TableView.write(request, object, field, collection, fields, isFieldEditable);
@@ -45,6 +48,7 @@ public class LongFormView extends Abstra
         }
     }
 
+    @Override
     public String getName() {
         return "long-form";
     }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableBuilder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableBuilder.java?rev=1050892&r1=1050891&r2=1050892&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableBuilder.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableBuilder.java Sun Dec 19 16:28:38 2010
@@ -20,6 +20,8 @@
 
 package org.apache.isis.viewer.scimpi.dispatcher.view.display;
 
+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.viewer.scimpi.dispatcher.context.RequestContext;
@@ -31,11 +33,12 @@ import org.apache.isis.viewer.scimpi.dis
 
 public class TableBuilder extends AbstractTableView {
 
+    @Override
     protected TableContentWriter createRowBuilder(
             final Request request,
             RequestContext context,
             final String parent,
-            ObjectAssociation[] allFields) {
+            List<ObjectAssociation> allFields) {
 
         final String variable = request.getOptionalProperty(ELEMENT_NAME, ELEMENT);
 
@@ -47,12 +50,15 @@ public class TableBuilder extends Abstra
 
         return new TableContentWriter() {
 
+            @Override
             public void writeFooters(PageWriter writer) {}
 
+            @Override
             public void writeHeaders(PageWriter writer) {
                 writer.appendHtml(headers);
             }
 
+            @Override
             public void writeElement(Request request, RequestContext context, ObjectAdapter element) {
                 context.addVariable(variable, context.mapObject(element, Scope.REQUEST), Scope.REQUEST);
                 RepeatMarker end = request.createMarker();
@@ -64,6 +70,7 @@ public class TableBuilder extends Abstra
         };
     }
 
+    @Override
     public String getName() {
         return "table-builder";
     }



Mime
View raw message