incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1098951 [11/11] - in /incubator/isis/trunk/viewer: junit/src/main/java/org/apache/isis/viewer/junit/ junit/src/main/java/org/apache/isis/viewer/junit/internal/ junit/src/test/java/org/apache/isis/viewer/junit/ junit/src/test/java/org/apach...
Date Tue, 03 May 2011 07:53:11 GMT
Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/PageTitle.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/PageTitle.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/PageTitle.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/PageTitle.java Tue May  3 07:53:06 2011
@@ -17,17 +17,18 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.simple;
 
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.Scope;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
 public class PageTitle extends Variable {
-    public void process(Request request) {
+    @Override
+    public void process(final Request request) {
         process(request, "title", null, null, false, Scope.REQUEST);
     }
-    
+
+    @Override
     public String getName() {
         return "page-title";
     }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/Redirect.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/Redirect.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/Redirect.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/Redirect.java Tue May  3 07:53:06 2011
@@ -23,14 +23,15 @@ import org.apache.isis.viewer.scimpi.dis
 
 public class Redirect extends AbstractElementProcessor {
 
+    @Override
     public String getName() {
         return "redirect";
     }
 
-    public void process(Request request) {
-        String view = request.getRequiredProperty(VIEW);
+    @Override
+    public void process(final Request request) {
+        final String view = request.getRequiredProperty(VIEW);
         request.getContext().redirectTo(view);
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/RemoveElement.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/RemoveElement.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/RemoveElement.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/RemoveElement.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.simple;
 
 import java.util.List;
@@ -28,8 +27,8 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.consent.Consent;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters;
-import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
+import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
 import org.apache.isis.viewer.scimpi.dispatcher.AbstractElementProcessor;
 import org.apache.isis.viewer.scimpi.dispatcher.Dispatcher;
 import org.apache.isis.viewer.scimpi.dispatcher.ForbiddenException;
@@ -40,98 +39,96 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 import org.apache.isis.viewer.scimpi.dispatcher.util.MethodsUtils;
 
-
 public class RemoveElement extends AbstractElementProcessor {
 
     @Override
-    public void process(Request request) {
-        String title = request.getOptionalProperty(BUTTON_TITLE, "Remove From List");
-        String cls = request.getOptionalProperty(CLASS, "action in-line delete");
-        String object = request.getOptionalProperty(OBJECT);
-        String resultOverride = request.getOptionalProperty(RESULT_OVERRIDE);
-        RequestContext context = request.getContext();
-        String objectId = object != null ? object : (String) context.getVariable(RequestContext.RESULT);
-        ObjectAdapter adapter = MethodsUtils.findObject(context, objectId);
-
-        String element = request.getOptionalProperty(ELEMENT, (String) context.getVariable(ELEMENT));
-        ObjectAdapter elementId = MethodsUtils.findObject(context, element);
-        
-        String fieldName = request.getRequiredProperty(FIELD);
-        
+    public void process(final Request request) {
+        final String title = request.getOptionalProperty(BUTTON_TITLE, "Remove From List");
+        final String cls = request.getOptionalProperty(CLASS, "action in-line delete");
+        final String object = request.getOptionalProperty(OBJECT);
+        final String resultOverride = request.getOptionalProperty(RESULT_OVERRIDE);
+        final RequestContext context = request.getContext();
+        final String objectId = object != null ? object : (String) context.getVariable(RequestContext.RESULT);
+        final ObjectAdapter adapter = MethodsUtils.findObject(context, objectId);
+
+        final String element = request.getOptionalProperty(ELEMENT, (String) context.getVariable(ELEMENT));
+        final ObjectAdapter elementId = MethodsUtils.findObject(context, element);
+
+        final String fieldName = request.getRequiredProperty(FIELD);
+
         String view = request.getOptionalProperty(VIEW);
         view = context.fullFilePath(view == null ? context.getResourceFile() : view);
         String error = request.getOptionalProperty(ERRORS);
         error = context.fullFilePath(error == null ? context.getResourceFile() : error);
-        
+
         request.processUtilCloseTag();
 
         write(request, adapter, fieldName, elementId, resultOverride, view, error, title, cls);
     }
 
-
     @Override
     public String getName() {
         return "remove-element";
     }
 
-    public static void write(Request request, ObjectAdapter adapter, String fieldName, ObjectAdapter element, String resultOverride, String view, String error, String title, String cssClass) {
-        ObjectAssociation field = adapter.getSpecification().getAssociation(fieldName);
+    public static void write(final Request request, final ObjectAdapter adapter, final String fieldName,
+        final ObjectAdapter element, final String resultOverride, final String view, final String error,
+        final String title, final String cssClass) {
+        final ObjectAssociation field = adapter.getSpecification().getAssociation(fieldName);
         if (field == null) {
             throw new ScimpiException("No field " + fieldName + " in " + adapter.getSpecification().getFullIdentifier());
         }
         if (!field.isOneToManyAssociation()) {
-            throw new ScimpiException("Field " + fieldName + " not a collection, in " + adapter.getSpecification().getFullIdentifier());
+            throw new ScimpiException("Field " + fieldName + " not a collection, in "
+                + adapter.getSpecification().getFullIdentifier());
         }
         if (field.isVisible(IsisContext.getAuthenticationSession(), adapter).isVetoed()) {
             throw new ForbiddenException(field, ForbiddenException.VISIBLE);
         }
         IsisContext.getPersistenceSession().resolveField(adapter, field);
 
-        
         Consent usable = field.isUsable(IsisContext.getAuthenticationSession(), adapter);
         if (usable.isAllowed()) {
             usable = ((OneToManyAssociation) field).isValidToRemove(adapter, element);
         }
-        
+
         if (usable.isVetoed()) {
             request.appendHtml("<span class=\"veto\">" + usable.getReason() + "</span>");
         } else {
             if (valid(request, adapter)) {
-                String classSegment = " class=\"" + cssClass + "\"";
-    
-                String objectId = request.getContext().mapObject(adapter, Scope.INTERACTION);
-                String elementId = request.getContext().mapObject(element, Scope.INTERACTION);
-                String action = RemoveAction.ACTION + Dispatcher.COMMAND_ROOT;
+                final String classSegment = " class=\"" + cssClass + "\"";
+
+                final String objectId = request.getContext().mapObject(adapter, Scope.INTERACTION);
+                final String elementId = request.getContext().mapObject(element, Scope.INTERACTION);
+                final String action = RemoveAction.ACTION + Dispatcher.COMMAND_ROOT;
                 request.appendHtml("<form" + classSegment + " method=\"post\" action=\"" + action + "\" >");
                 request.appendHtml("<input type=\"hidden\" name=\"" + OBJECT + "\" value=\"" + objectId + "\" />");
                 request.appendHtml("<input type=\"hidden\" name=\"" + FIELD + "\" value=\"" + fieldName + "\" />");
                 request.appendHtml("<input type=\"hidden\" name=\"" + ELEMENT + "\" value=\"" + elementId + "\" />");
                 if (resultOverride != null) {
-                    request.appendHtml("<input type=\"hidden\" name=\"" + RESULT_OVERRIDE + "\" value=\"" + resultOverride + "\" />");
+                    request.appendHtml("<input type=\"hidden\" name=\"" + RESULT_OVERRIDE + "\" value=\""
+                        + resultOverride + "\" />");
                 }
                 request.appendHtml("<input type=\"hidden\" name=\"" + VIEW + "\" value=\"" + view + "\" />");
                 request.appendHtml("<input type=\"hidden\" name=\"" + ERRORS + "\" value=\"" + error + "\" />");
                 request.appendHtml(request.getContext().interactionFields());
                 request.appendHtml("<input class=\"button\" type=\"submit\" value=\"" + title + "\" />");
                 request.appendHtml("</form>");
-            } 
+            }
         }
     }
-    
-    private static boolean valid(Request request, ObjectAdapter adapter) {
+
+    private static boolean valid(final Request request, final ObjectAdapter adapter) {
         // TODO is this check valid/necessary?
-        
+
         // TODO check is valid to remove element
-        AuthenticationSession session = IsisContext.getAuthenticationSession();
-        Filter<ObjectAssociation> filter = ObjectAssociationFilters.dynamicallyVisible(session, adapter);
-        List<ObjectAssociation> visibleFields = adapter.getSpecification().getAssociations(filter);
+        final AuthenticationSession session = IsisContext.getAuthenticationSession();
+        final Filter<ObjectAssociation> filter = ObjectAssociationFilters.dynamicallyVisible(session, adapter);
+        final List<ObjectAssociation> visibleFields = adapter.getSpecification().getAssociations(filter);
         if (visibleFields.size() == 0) {
             return false;
         }
-        
-        
-        
+
         return true;
     }
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/ScopeTag.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/ScopeTag.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/ScopeTag.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/ScopeTag.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.simple;
 
 import org.apache.isis.viewer.scimpi.dispatcher.AbstractElementProcessor;
@@ -25,28 +24,28 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.Scope;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
 public class ScopeTag extends AbstractElementProcessor {
 
-    public void process(Request request) {
-        String name = request.getRequiredProperty(NAME);
-        String scopeName = request.getRequiredProperty(SCOPE);
-        Scope scope = RequestContext.scope(scopeName);
-        request.processUtilCloseTag(); 
+    @Override
+    public void process(final Request request) {
+        final String name = request.getRequiredProperty(NAME);
+        final String scopeName = request.getRequiredProperty(SCOPE);
+        final Scope scope = RequestContext.scope(scopeName);
+        request.processUtilCloseTag();
         changeScope(request, name, scope);
     }
 
-    protected static void changeScope(Request request, String name, Scope scope) { 
+    protected static void changeScope(final Request request, final String name, final Scope scope) {
         request.getContext().changeScope(name, scope);
-        Object value = request.getContext().getVariable(name);
-        if (value != null) { 
-            request.getContext().addVariable(name, value, scope); 
-        } 
+        final Object value = request.getContext().getVariable(name);
+        if (value != null) {
+            request.getContext().addVariable(name, value, scope);
+        }
     }
 
+    @Override
     public String getName() {
         return "scope";
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/SetCookie.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/SetCookie.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/SetCookie.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/SetCookie.java Tue May  3 07:53:06 2011
@@ -17,27 +17,26 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.simple;
 
 import org.apache.isis.viewer.scimpi.dispatcher.AbstractElementProcessor;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
 public class SetCookie extends AbstractElementProcessor {
 
-    public void process(Request request) {
-        String name = request.getRequiredProperty("name");
-        String value = request.getRequiredProperty("value");
-        String expiresString = request.getOptionalProperty("expires", "-1");
+    @Override
+    public void process(final Request request) {
+        final String name = request.getRequiredProperty("name");
+        final String value = request.getRequiredProperty("value");
+        final String expiresString = request.getOptionalProperty("expires", "-1");
 
         if (value.length() > 0) {
             request.getContext().addCookie(name, value, Integer.valueOf(expiresString));
         }
     }
 
+    @Override
     public String getName() {
         return "set-cookie";
     }
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/SetCookieFromField.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/SetCookieFromField.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/SetCookieFromField.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/SetCookieFromField.java Tue May  3 07:53:06 2011
@@ -17,43 +17,33 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.simple;
 
 import org.apache.isis.core.commons.exceptions.NotYetImplementedException;
 import org.apache.isis.viewer.scimpi.dispatcher.AbstractElementProcessor;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
-
 public class SetCookieFromField extends AbstractElementProcessor {
 
-    public void process(Request request) {
+    @Override
+    public void process(final Request request) {
         throw new NotYetImplementedException("3.1");
         /*
-        String objectId = request.getOptionalProperty(OBJECT);
-        String fieldName = request.getRequiredProperty(FIELD);
-        
-        ObjectAdapter object = (ObjectAdapter) request.getContext().getMappedObjectOrResult(objectId);
-        ObjectAssociation field = object.getSpecification().getField(fieldName);
-        if (field.isValue()) {
-            throw new ScimpiException("Can only set up a value field");
-        }
-        ObjectAdapter value = field.get(object);
-        if (value != null) {
-            String title = value.titleString();
-
-        if (title.length() > 0) {
-            String name = request.getRequiredProperty(NAME);
-            String expiresString = request.getOptionalProperty("expires", "-1");
-            request.getContext().addCookie(name, title, Integer.valueOf(expiresString));
-        }
-        }
-        */
+         * String objectId = request.getOptionalProperty(OBJECT); String fieldName = request.getRequiredProperty(FIELD);
+         * 
+         * ObjectAdapter object = (ObjectAdapter) request.getContext().getMappedObjectOrResult(objectId);
+         * ObjectAssociation field = object.getSpecification().getField(fieldName); if (field.isValue()) { throw new
+         * ScimpiException("Can only set up a value field"); } ObjectAdapter value = field.get(object); if (value !=
+         * null) { String title = value.titleString();
+         * 
+         * if (title.length() > 0) { String name = request.getRequiredProperty(NAME); String expiresString =
+         * request.getOptionalProperty("expires", "-1"); request.getContext().addCookie(name, title,
+         * Integer.valueOf(expiresString)); } }
+         */
     }
 
+    @Override
     public String getName() {
         return "set-cookie-from-field";
     }
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/SetFieldFromCookie.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/SetFieldFromCookie.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/SetFieldFromCookie.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/SetFieldFromCookie.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.simple;
 
 import org.apache.isis.core.commons.exceptions.NotYetImplementedException;
@@ -25,29 +24,25 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
 public class SetFieldFromCookie extends AbstractElementProcessor {
-    
-    public void process(Request request) {
+
+    @Override
+    public void process(final Request request) {
         throw new NotYetImplementedException("3.1");
         /*
-        String name = request.getRequiredProperty(NAME);
-        String cookieString = request.getContext().getCookie(name);
-        ObjectAdapter valueAdapter = IsisContext.getObjectPersistor().createAdapterForValue(cookieString);
-        
-        String objectId = request.getOptionalProperty(OBJECT);
-        String fieldName = request.getRequiredProperty(FIELD);
-        ObjectAdapter object = (ObjectAdapter) request.getContext().getMappedObjectOrResult(objectId);
-        ObjectAssociation field = object.getSpecification().getField(fieldName);
-        if (field.isValue()) {
-            throw new ScimpiException("Can only set up a value field");
-        }
-
-        ((ValueAssociation) field).setValue(object, valueAdapter);
-        */
+         * String name = request.getRequiredProperty(NAME); String cookieString = request.getContext().getCookie(name);
+         * ObjectAdapter valueAdapter = IsisContext.getObjectPersistor().createAdapterForValue(cookieString);
+         * 
+         * String objectId = request.getOptionalProperty(OBJECT); String fieldName = request.getRequiredProperty(FIELD);
+         * ObjectAdapter object = (ObjectAdapter) request.getContext().getMappedObjectOrResult(objectId);
+         * ObjectAssociation field = object.getSpecification().getField(fieldName); if (field.isValue()) { throw new
+         * ScimpiException("Can only set up a value field"); }
+         * 
+         * ((ValueAssociation) field).setValue(object, valueAdapter);
+         */
     }
-    
+
+    @Override
     public String getName() {
         return "set-field-from-cookie";
     }
 }
-
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/StartSession.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/StartSession.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/StartSession.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/StartSession.java Tue May  3 07:53:06 2011
@@ -17,21 +17,20 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.simple;
 
 import org.apache.isis.viewer.scimpi.dispatcher.AbstractElementProcessor;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
 public class StartSession extends AbstractElementProcessor {
 
-    public void process(Request request) {
+    @Override
+    public void process(final Request request) {
         request.getContext().startHttpSession();
     }
 
+    @Override
     public String getName() {
         return "start-session";
     }
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/TemplateTag.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/TemplateTag.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/TemplateTag.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/TemplateTag.java Tue May  3 07:53:06 2011
@@ -21,16 +21,18 @@ package org.apache.isis.viewer.scimpi.di
 import org.apache.isis.viewer.scimpi.dispatcher.ElementProcessor;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
 public class TemplateTag implements ElementProcessor {
 
+    @Override
     public String getName() {
         return "template";
     }
 
-    public void process(Request request) {
-        // REVIEW this make IE8 render poorly as the browser doesn't think a DOCTYPE is provided, causing it to run in quirk mode 
-//        request.appendHtml("<!--  zz apply template " + request.getOptionalProperty("file") + " -->");
+    @Override
+    public void process(final Request request) {
+        // REVIEW this make IE8 render poorly as the browser doesn't think a DOCTYPE is provided, causing it to run in
+        // quirk mode
+        // request.appendHtml("<!--  zz apply template " + request.getOptionalProperty("file") + " -->");
     }
 
 }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/Unless.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/Unless.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/Unless.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/Unless.java Tue May  3 07:53:06 2011
@@ -17,23 +17,23 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.simple;
 
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
 public class Unless extends AbstractConditionalBlock {
 
-    protected void processTags(boolean isSet, Request request) {
+    @Override
+    protected void processTags(final boolean isSet, final Request request) {
         if (isSet) {
             request.skipUntilClose();
-            request.appendDebug("    skipping segment"); 
-          } else {
+            request.appendDebug("    skipping segment");
+        } else {
             request.processUtilCloseTag();
         }
     }
 
+    @Override
     public String getName() {
         return "unless";
     }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/Variable.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/Variable.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/Variable.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/Variable.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.simple;
 
 import org.apache.isis.viewer.scimpi.dispatcher.AbstractElementProcessor;
@@ -25,41 +24,42 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.Scope;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
 public class Variable extends AbstractElementProcessor {
 
-    public void process(Request request) {
-        String name = request.getOptionalProperty(NAME);
-        String value = request.getOptionalProperty(VALUE);
-        String defaultTo = request.getOptionalProperty(DEFAULT);
-        String scopeName = request.getOptionalProperty(SCOPE);
-        boolean isClear = request.getOptionalProperty("action", "set").equals("clear");
-        Scope scope = RequestContext.scope(scopeName, isClear ? Scope.SESSION : Scope.REQUEST);
+    @Override
+    public void process(final Request request) {
+        final String name = request.getOptionalProperty(NAME);
+        final String value = request.getOptionalProperty(VALUE);
+        final String defaultTo = request.getOptionalProperty(DEFAULT);
+        final String scopeName = request.getOptionalProperty(SCOPE);
+        final boolean isClear = request.getOptionalProperty("action", "set").equals("clear");
+        final Scope scope = RequestContext.scope(scopeName, isClear ? Scope.SESSION : Scope.REQUEST);
         process(request, name, value, defaultTo, isClear, scope);
     }
 
-    protected void process(Request request, String name, String value, String defaultTo, boolean isClear, Scope scope) {
+    protected void process(final Request request, final String name, final String value, final String defaultTo,
+        final boolean isClear, final Scope scope) {
         request.pushNewBuffer();
         request.processUtilCloseTag();
         String source = request.popBuffer();
         if (isClear) {
-            request.appendDebug("variable: " + name + " ( cleared"); 
+            request.appendDebug("variable: " + name + " ( cleared");
             request.getContext().clearVariable(name, scope);
         } else {
             if (source.length() == 0 && value != null) {
                 source = value;
             }
-            if (source.length() == 0) { 
-                source = defaultTo; 
-            } 
-            request.appendDebug("    " + name + " (" + scope + ") set to " + source); 
+            if (source.length() == 0) {
+                source = defaultTo;
+            }
+            request.appendDebug("    " + name + " (" + scope + ") set to " + source);
             request.getContext().addVariable(name, source, scope);
         }
     }
 
+    @Override
     public String getName() {
         return "variable";
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/When.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/When.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/When.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/When.java Tue May  3 07:53:06 2011
@@ -17,26 +17,25 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.simple;
 
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
 public class When extends AbstractConditionalBlock {
 
-    protected void processTags(boolean isSet, Request request) {
+    @Override
+    protected void processTags(final boolean isSet, final Request request) {
         if (isSet) {
             request.processUtilCloseTag();
         } else {
-            request.appendDebug("    skipping segment"); 
+            request.appendDebug("    skipping segment");
             request.skipUntilClose();
         }
     }
 
+    @Override
     public String getName() {
         return "when";
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/ActionName.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/ActionName.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/ActionName.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/ActionName.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.value;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -26,24 +25,23 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 import org.apache.isis.viewer.scimpi.dispatcher.util.MethodsUtils;
 
-
 // TODO do the same for description and help, and for fields
 public class ActionName extends AbstractElementProcessor {
 
-    public void process(Request request) {
-        String objectId = request.getOptionalProperty(OBJECT);
-        String methodName = request.getRequiredProperty(METHOD);
-        
-        ObjectAdapter object = MethodsUtils.findObject(request.getContext(), objectId);
-        ObjectAction action = MethodsUtils.findAction(object, methodName);
+    @Override
+    public void process(final Request request) {
+        final String objectId = request.getOptionalProperty(OBJECT);
+        final String methodName = request.getRequiredProperty(METHOD);
+
+        final ObjectAdapter object = MethodsUtils.findObject(request.getContext(), objectId);
+        final ObjectAction action = MethodsUtils.findAction(object, methodName);
 
         request.appendHtml(action.getName());
     }
-    
+
+    @Override
     public String getName() {
         return "action-name";
     }
 
 }
-
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/CountElements.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/CountElements.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/CountElements.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/CountElements.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.value;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -26,30 +25,30 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.viewer.scimpi.dispatcher.AbstractObjectProcessor;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
 public class CountElements extends AbstractObjectProcessor {
 
-    protected void process(Request request, ObjectAdapter collection) {
-        CollectionFacet facet = (CollectionFacet) collection.getSpecification().getFacet(CollectionFacet.class);
-        int size = facet.size(collection);
+    @Override
+    protected void process(final Request request, final ObjectAdapter collection) {
+        final CollectionFacet facet = collection.getSpecification().getFacet(CollectionFacet.class);
+        final int size = facet.size(collection);
         if (size == 0) {
             request.appendHtml(request.getOptionalProperty("none", "0"));
         } else if (size == 1) {
-                request.appendHtml(request.getOptionalProperty("one", "1"));
+            request.appendHtml(request.getOptionalProperty("one", "1"));
         } else {
-            String text = request.getOptionalProperty("many", "" + size);
+            final String text = request.getOptionalProperty("many", "" + size);
             request.appendHtml(String.format(text, size));
         }
     }
-    
-    protected String checkFieldType(ObjectAssociation objectField) {
+
+    @Override
+    protected String checkFieldType(final ObjectAssociation objectField) {
         return objectField.isOneToManyAssociation() ? null : "must be a collection";
     }
 
+    @Override
     public String getName() {
         return "count";
     }
 
-
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/ElementType.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/ElementType.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/ElementType.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/ElementType.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.value;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -28,30 +27,29 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
 public class ElementType extends AbstractElementProcessor {
 
     @Override
-    public void process(Request request) {
+    public void process(final Request request) {
         ObjectAdapter collection;
-        String field = request.getOptionalProperty(FIELD);
-        RequestContext context = request.getContext();
+        final String field = request.getOptionalProperty(FIELD);
+        final RequestContext context = request.getContext();
         if (field != null) {
-            String id = request.getRequiredProperty(OBJECT);
-            ObjectAdapter object = context.getMappedObjectOrResult(id);
-            ObjectAssociation objectField = object.getSpecification().getAssociation(field);
+            final String id = request.getRequiredProperty(OBJECT);
+            final ObjectAdapter object = context.getMappedObjectOrResult(id);
+            final ObjectAssociation objectField = object.getSpecification().getAssociation(field);
             if (!objectField.isOneToManyAssociation()) {
                 throw new ScimpiException("Field " + objectField.getId() + " is not a collection");
             }
-            collection =  objectField.get(object);
+            collection = objectField.get(object);
         } else {
-            String id = request.getOptionalProperty(COLLECTION);
-            collection =  context.getMappedObjectOrResult(id);
+            final String id = request.getOptionalProperty(COLLECTION);
+            collection = context.getMappedObjectOrResult(id);
         }
-        
+
         final ObjectSpecification elementSpecification = collection.getElementSpecification();
-        String name = elementSpecification.getSingularName();
-        
+        final String name = elementSpecification.getSingularName();
+
         request.appendHtml(name);
     }
 
@@ -61,4 +59,3 @@ public class ElementType extends Abstrac
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/FieldName.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/FieldName.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/FieldName.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/FieldName.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.value;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -28,14 +27,14 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.ScimpiException;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
 public class FieldName extends AbstractElementProcessor {
 
-    public void process(Request request) {
-        String id = request.getOptionalProperty(OBJECT);
-        String fieldName = request.getRequiredProperty(FIELD);
-        ObjectAdapter object = request.getContext().getMappedObjectOrResult(id);
-        ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
+    @Override
+    public void process(final Request request) {
+        final String id = request.getOptionalProperty(OBJECT);
+        final String fieldName = request.getRequiredProperty(FIELD);
+        final ObjectAdapter object = request.getContext().getMappedObjectOrResult(id);
+        final ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
         if (field == null) {
             throw new ScimpiException("No field " + fieldName + " in " + object.getSpecification().getFullIdentifier());
         }
@@ -45,14 +44,14 @@ public class FieldName extends AbstractE
         request.appendHtml(field.getName());
     }
 
+    @Override
     public String getName() {
         return "field-name";
     }
 
-    public static void write(Request content, ObjectAssociation field) {
+    public static void write(final Request content, final ObjectAssociation field) {
         content.appendHtml("<span class=\"label\" title=\"" + field.getDescription() + "\">");
         content.appendHtml("</span>");
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/ParameterName.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/ParameterName.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/ParameterName.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/ParameterName.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.value;
 
 import java.util.List;
@@ -30,17 +29,16 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 import org.apache.isis.viewer.scimpi.dispatcher.util.MethodsUtils;
 
-
 public class ParameterName extends AbstractElementProcessor {
 
     @Override
-    public void process(Request request) {
-        String objectId = request.getOptionalProperty(OBJECT);
-        String methodName = request.getRequiredProperty(METHOD);
-        String field = request.getOptionalProperty(PARAMETER_NUMBER);
-        
-        ObjectAdapter object = MethodsUtils.findObject(request.getContext(), objectId);
-        ObjectAction action = MethodsUtils.findAction(object, methodName);
+    public void process(final Request request) {
+        final String objectId = request.getOptionalProperty(OBJECT);
+        final String methodName = request.getRequiredProperty(METHOD);
+        final String field = request.getOptionalProperty(PARAMETER_NUMBER);
+
+        final ObjectAdapter object = MethodsUtils.findObject(request.getContext(), objectId);
+        final ObjectAction action = MethodsUtils.findAction(object, methodName);
         final List<ObjectActionParameter> parameters = action.getParameters();
 
         int index;
@@ -52,7 +50,7 @@ public class ParameterName extends Abstr
         if (index < 0 || index >= parameters.size()) {
             throw new ScimpiException("Parameter numbers should be between 1 and " + parameters.size() + ": " + index);
         }
-        
+
         request.appendHtml(parameters.get(index).getName());
     }
 
@@ -62,4 +60,3 @@ public class ParameterName extends Abstr
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/TitleString.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/TitleString.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/TitleString.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/TitleString.java Tue May  3 07:53:06 2011
@@ -26,36 +26,37 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.ForbiddenException;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
 /**
  * 
  */
 public class TitleString extends AbstractElementProcessor {
 
-    public void process(Request request) {
-        String id = request.getOptionalProperty(OBJECT);
-        String fieldName = request.getOptionalProperty(FIELD);
-        int truncateTo = Integer.valueOf(request.getOptionalProperty(TRUNCATE, "0")).intValue();
-       ObjectAdapter object = request.getContext().getMappedObjectOrResult(id);
+    @Override
+    public void process(final Request request) {
+        final String id = request.getOptionalProperty(OBJECT);
+        final String fieldName = request.getOptionalProperty(FIELD);
+        final int truncateTo = Integer.valueOf(request.getOptionalProperty(TRUNCATE, "0")).intValue();
+        final ObjectAdapter object = request.getContext().getMappedObjectOrResult(id);
         String titleString;
         if (fieldName == null) {
             titleString = object.titleString();
         } else {
-            ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
+            final ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
             if (field.isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
                 throw new ForbiddenException(field, ForbiddenException.VISIBLE);
             }
-            ObjectAdapter fieldReference = field.get(object);
+            final ObjectAdapter fieldReference = field.get(object);
             if (fieldReference != null) {
                 titleString = fieldReference.titleString();
             } else {
                 titleString = "";
             }
         }
-        request.appendDebug("    " + titleString); 
+        request.appendDebug("    " + titleString);
         request.appendTruncated(titleString, truncateTo);
     }
 
+    @Override
     public String getName() {
         return "title-string";
     }

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/Type.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/Type.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/Type.java (original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/Type.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.dispatcher.view.value;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -27,27 +26,26 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 
-
 public class Type extends AbstractElementProcessor {
 
     @Override
-    public void process(Request request) {
-        RequestContext context = request.getContext();
-        String showPlural = request.getOptionalProperty(PLURAL);
-        String id = request.getOptionalProperty(OBJECT);
-        String objectId = id != null ? id : (String) context.getVariable(RequestContext.RESULT);
-        
+    public void process(final Request request) {
+        final RequestContext context = request.getContext();
+        final String showPlural = request.getOptionalProperty(PLURAL);
+        final String id = request.getOptionalProperty(OBJECT);
+        final String objectId = id != null ? id : (String) context.getVariable(RequestContext.RESULT);
+
         ObjectAdapter object = context.getMappedObjectOrResult(objectId);
-        String field = request.getOptionalProperty(FIELD);
+        final String field = request.getOptionalProperty(FIELD);
         if (field != null) {
-            ObjectAssociation objectField = object.getSpecification().getAssociation(field);
-            object =  objectField.get(object);
+            final ObjectAssociation objectField = object.getSpecification().getAssociation(field);
+            object = objectField.get(object);
         }
-        request.appendDebug(" for " + object); 
-        
-        ObjectSpecification specification = object.getSpecification();
-        String name = showPlural != null ? specification.getPluralName() : specification.getSingularName();
-        
+        request.appendDebug(" for " + object);
+
+        final ObjectSpecification specification = object.getSpecification();
+        final String name = showPlural != null ? specification.getPluralName() : specification.getSingularName();
+
         request.appendHtml(name);
     }
 
@@ -57,4 +55,3 @@ public class Type extends AbstractElemen
     }
 
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/DispatchException.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/DispatchException.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/DispatchException.java (original)
+++ incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/DispatchException.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.servlet;
 
 import org.apache.isis.viewer.scimpi.dispatcher.ScimpiException;
@@ -25,20 +24,19 @@ import org.apache.isis.viewer.scimpi.dis
 public class DispatchException extends ScimpiException {
     private static final long serialVersionUID = 1L;
 
-    public DispatchException() {}
+    public DispatchException() {
+    }
 
-    public DispatchException(String message) {
+    public DispatchException(final String message) {
         super(message);
     }
 
-    public DispatchException(Throwable cause) {
+    public DispatchException(final Throwable cause) {
         super(cause);
     }
 
-    public DispatchException(String message, Throwable cause) {
+    public DispatchException(final String message, final Throwable cause) {
         super(message, cause);
     }
 
 }
-
-

Modified: incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/DispatcherServlet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/DispatcherServlet.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/DispatcherServlet.java (original)
+++ incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/DispatcherServlet.java Tue May  3 07:53:06 2011
@@ -40,32 +40,35 @@ public class DispatcherServlet extends H
     private Dispatcher dispatcher;
 
     @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,
-        IOException {
+    protected void doPost(final HttpServletRequest request, final HttpServletResponse response)
+        throws ServletException, IOException {
         LOG.info("post " + request.getServletPath() + "  " + request.getQueryString());
         process(request, response);
     }
 
     @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+    protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException,
+        IOException {
         LOG.info("get  " + request.getServletPath() + "  " + request.getQueryString());
         process(request, response);
     }
 
-    private void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+    private void process(final HttpServletRequest request, final HttpServletResponse response) throws ServletException,
+        IOException {
         try {
-            ServletRequestContext context = new ServletRequestContext();
-            HttpSession httpSession = request.getSession(false);
+            final ServletRequestContext context = new ServletRequestContext();
+            final HttpSession httpSession = request.getSession(false);
             // TODO when using version 3.0 of Servlet API use the HttpOnly setting for improved security
             if (httpSession != null) {
-                HashMap<String, Object> data = (HashMap<String, Object>) httpSession.getAttribute("scimpi-context");
+                final HashMap<String, Object> data =
+                    (HashMap<String, Object>) httpSession.getAttribute("scimpi-context");
                 if (data != null) {
                     context.setSessionData(data);
                 }
             }
             context.startRequest(request, response, getServletContext());
             dispatcher.process(context, request.getServletPath());
-        } catch (RuntimeException e) {
+        } catch (final RuntimeException e) {
             LOG.error("servlet exception", e);
             throw e;
         }
@@ -79,13 +82,13 @@ public class DispatcherServlet extends H
         ImageLookup.setImageDirectory(getServletContext(), "images");
 
         dispatcher = new Dispatcher();
-        Enumeration initParameterNames = getInitParameterNames();
+        final Enumeration initParameterNames = getInitParameterNames();
         while (initParameterNames.hasMoreElements()) {
-            String name = (String) initParameterNames.nextElement();
-            String value = getInitParameter(name);
+            final String name = (String) initParameterNames.nextElement();
+            final String value = getInitParameter(name);
             dispatcher.addParameter(name, value);
         }
-        String dir = getServletContext().getRealPath("/WEB-INF");
+        final String dir = getServletContext().getRealPath("/WEB-INF");
         dispatcher.init(dir);
 
         new UserManager(IsisContext.getAuthenticationManager());

Modified: incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ImageLookup.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ImageLookup.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ImageLookup.java (original)
+++ incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ImageLookup.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.servlet;
 
 import java.net.MalformedURLException;
@@ -29,16 +28,15 @@ import java.util.Set;
 
 import javax.servlet.ServletContext;
 
-import org.apache.log4j.Logger;
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
+import org.apache.log4j.Logger;
 
 /**
- * ImageLookup provides an efficient way of finding the most suitable image to use. It ensures that an image
- * is always available, providing a default image if needed. All requests are cached to improve performance.
+ * ImageLookup provides an efficient way of finding the most suitable image to use. It ensures that an image is always
+ * available, providing a default image if needed. All requests are cached to improve performance.
  */
 // TODO allow for multiple extension types
 public class ImageLookup {
@@ -47,55 +45,55 @@ public class ImageLookup {
     private static final String[] EXTENSIONS = { "png", "gif", "jpg", "jpeg" };
     private static final Map images = new HashMap();
     private static String imageDirectory;
-    //private static String unknownImageFile;
+    // private static String unknownImageFile;
     private static ServletContext context;
 
-    public static void setImageDirectory(ServletContext context, String imageDirectory) {
+    public static void setImageDirectory(final ServletContext context, String imageDirectory) {
         LOG.debug("image directory required for: " + imageDirectory);
         ImageLookup.context = context;
         imageDirectory = (imageDirectory.startsWith("/") ? "" : "/") + imageDirectory + "/";
-        Set resourcePaths = context.getResourcePaths(imageDirectory);
-        if(resourcePaths == null || resourcePaths.size() == 0) {
+        final Set resourcePaths = context.getResourcePaths(imageDirectory);
+        if (resourcePaths == null || resourcePaths.size() == 0) {
             throw new IsisException("No image directory found: " + imageDirectory);
         }
         LOG.info("image directory set to: " + imageDirectory);
         ImageLookup.imageDirectory = imageDirectory;
     }
-    
-    public static void debug(DebugString debug) {
+
+    public static void debug(final DebugString debug) {
         debug.appendTitle("Image Lookup");
         debug.indent();
-        Iterator keys = images.keySet().iterator();
+        final Iterator keys = images.keySet().iterator();
         while (keys.hasNext()) {
-            Object key = keys.next();
-            Object value = images.get(key);
+            final Object key = keys.next();
+            final Object value = images.get(key);
             debug.appendln(key + " -> " + value);
         }
         debug.unindent();
     }
 
-    private static String imageFile(final String imageName, String contextPath) {
-        for (int i = 0; i < EXTENSIONS.length; i++) {
+    private static String imageFile(final String imageName, final String contextPath) {
+        for (final String element : EXTENSIONS) {
             URL resource;
             try {
-                String imagePath = imageDirectory + imageName + "." + EXTENSIONS[i];
+                final String imagePath = imageDirectory + imageName + "." + element;
                 resource = context.getResource(imagePath);
                 if (resource != null) {
                     LOG.debug("image found at " + contextPath + imagePath);
                     return contextPath + imagePath;
                 }
-                URL onClasspath = ImageLookup.class.getResource(imagePath);
+                final URL onClasspath = ImageLookup.class.getResource(imagePath);
                 if (onClasspath != null) {
                     LOG.debug("image found on classpath " + onClasspath);
                     return contextPath + imagePath;
                 }
-            } catch (MalformedURLException ignore) {
+            } catch (final MalformedURLException ignore) {
             }
         }
         return null;
     }
 
-    private static String findImage(ObjectSpecification specification, String contextPath) {
+    private static String findImage(final ObjectSpecification specification, final String contextPath) {
         String path = findImageFor(specification, contextPath);
         if (path == null) {
             path = imageFile(UNKNOWN_IMAGE, contextPath);
@@ -103,20 +101,20 @@ public class ImageLookup {
         return path;
     }
 
-    private static String findImageFor(ObjectSpecification specification, String contextPath) {
-        String name = specification.getShortIdentifier();
-        String fileName = imageFile(name, contextPath);
+    private static String findImageFor(final ObjectSpecification specification, final String contextPath) {
+        final String name = specification.getShortIdentifier();
+        final String fileName = imageFile(name, contextPath);
         if (fileName != null) {
             images.put(name, fileName);
             return fileName;
         } else {
-            for (ObjectSpecification interfaceSpec : specification.interfaces()) {
-                String path = findImageFor(interfaceSpec, contextPath);
+            for (final ObjectSpecification interfaceSpec : specification.interfaces()) {
+                final String path = findImageFor(interfaceSpec, contextPath);
                 if (path != null) {
                     return path;
                 }
             }
-            ObjectSpecification superclass = specification.superclass();
+            final ObjectSpecification superclass = specification.superclass();
             if (superclass != null) {
                 return findImageFor(superclass, contextPath);
             } else {
@@ -126,50 +124,41 @@ public class ImageLookup {
     }
 
     /**
-     * For an object, the icon name from the object is return if it is not null, otherwise the specification
-     * is used to look up a suitable image name.
-     * @param contextPath 
+     * For an object, the icon name from the object is return if it is not null, otherwise the specification is used to
+     * look up a suitable image name.
+     * 
+     * @param contextPath
      * 
      * @see ObjectAdapter#getIconName()
      * @see #imagePath(ObjectSpecification)
      */
- /*   public static String imagePath(ObjectAdapter object) {
-        String iconName = object.getIconName();
-        if (iconName != null) {
-            return imagePath(iconName);
-        } else {
-            return imagePath(object.getSpecification());
-        }
-    }
-*/
-    public static String imagePath(ObjectSpecification specification, String contextPath) {
-        String name = specification.getShortIdentifier();
-        String imageName = (String) images.get(name);
+    /*
+     * public static String imagePath(ObjectAdapter object) { String iconName = object.getIconName(); if (iconName !=
+     * null) { return imagePath(iconName); } else { return imagePath(object.getSpecification()); } }
+     */
+    public static String imagePath(final ObjectSpecification specification, final String contextPath) {
+        final String name = specification.getShortIdentifier();
+        final String imageName = (String) images.get(name);
         if (imageName != null) {
-            return (String) imageName;
+            return imageName;
         } else {
             return findImage(specification, contextPath);
         }
     }
-/*
-    public static String imagePath(String name) {
-        String imageName = (String) images.get(name);
-        if (imageName != null) {
-            return (String) imageName;
-        } else {
-            String fileName = imageFile(name);
-            return fileName == null ? unknownImageFile : fileName;
-        }
-    }
-*/
 
-    public static String imagePath(ObjectAdapter object, String contextPath) {
-        String name = object.getIconName();
-        String imageName = (String) images.get(name);
+    /*
+     * public static String imagePath(String name) { String imageName = (String) images.get(name); if (imageName !=
+     * null) { return (String) imageName; } else { String fileName = imageFile(name); return fileName == null ?
+     * unknownImageFile : fileName; } }
+     */
+
+    public static String imagePath(final ObjectAdapter object, final String contextPath) {
+        final String name = object.getIconName();
+        final String imageName = (String) images.get(name);
         if (imageName != null) {
-            return (String) imageName;
+            return imageName;
         } else {
-            String imageFile = imageFile(name, contextPath);
+            final String imageFile = imageFile(name, contextPath);
             if (imageFile != null) {
                 return imageFile;
             } else {
@@ -178,4 +167,3 @@ public class ImageLookup {
         }
     }
 }
-

Modified: incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java?rev=1098951&r1=1098950&r2=1098951&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java (original)
+++ incubator/isis/trunk/viewer/scimpi/servlet/src/main/java/org/apache/isis/viewer/scimpi/servlet/ServletRequestContext.java Tue May  3 07:53:06 2011
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.viewer.scimpi.servlet;
 
 import java.io.IOException;
@@ -42,18 +41,16 @@ import org.apache.isis.viewer.scimpi.dis
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext;
 import org.apache.isis.viewer.scimpi.dispatcher.debug.DebugWriter;
 
-
 public class ServletRequestContext extends RequestContext {
     private HttpServletRequest request;
     private HttpServletResponse response;
     private ServletContext servletContext;
     private boolean isAborted;
 
-    public void append(DebugWriter view) {
+    public void append(final DebugWriter view) {
         /*
-        view.divider("System");
-        Runtime.getRuntime().
-		*/
+         * view.divider("System"); Runtime.getRuntime().
+         */
         view.appendTitle("Request");
         view.appendln("Auth type", request.getAuthType());
         view.appendln("Character encoding", request.getCharacterEncoding());
@@ -79,36 +76,36 @@ public class ServletRequestContext exten
         view.appendln("User principle", request.getUserPrincipal());
 
         view.appendTitle("Cookies");
-        Cookie[] cookies = request.getCookies();
-        for (int i = 0; i < cookies.length; i++) {
-            view.appendln(cookies[i].getName(), cookies[i].getValue());
+        final Cookie[] cookies = request.getCookies();
+        for (final Cookie cookie : cookies) {
+            view.appendln(cookie.getName(), cookie.getValue());
         }
 
-        Enumeration attributeNames = request.getAttributeNames();
+        final Enumeration attributeNames = request.getAttributeNames();
         if (attributeNames.hasMoreElements()) {
             view.appendTitle("Attributes");
             while (attributeNames.hasMoreElements()) {
-                String name = (String) attributeNames.nextElement();
+                final String name = (String) attributeNames.nextElement();
                 view.appendln(name, request.getAttribute(name));
             }
         }
 
         view.appendTitle("Headers");
-        Enumeration headerNames = request.getHeaderNames();
+        final Enumeration headerNames = request.getHeaderNames();
         while (headerNames.hasMoreElements()) {
-            String name = (String) headerNames.nextElement();
+            final String name = (String) headerNames.nextElement();
             view.appendln(name, request.getHeader(name));
         }
 
         view.appendTitle("Parameters");
-        Enumeration parameterNames = request.getParameterNames();
+        final Enumeration parameterNames = request.getParameterNames();
         while (parameterNames.hasMoreElements()) {
-            String name = (String) parameterNames.nextElement();
+            final String name = (String) parameterNames.nextElement();
             view.appendln(name, request.getParameter(name));
         }
 
         view.appendTitle("Servlet Context");
-        ServletContext context = getServletContext();
+        final ServletContext context = getServletContext();
         view.appendln("Name", context.getServletContextName());
         view.appendln("Server Info", context.getServerInfo());
         view.appendln("Version", context.getMajorVersion() + "." + context.getMinorVersion());
@@ -119,41 +116,40 @@ public class ServletRequestContext exten
         super.append(view);
     }
 
-    private String getAttributes(ServletContext context) {
-        StringBuffer buf = new StringBuffer();
-        Enumeration names = context.getAttributeNames();
+    private String getAttributes(final ServletContext context) {
+        final StringBuffer buf = new StringBuffer();
+        final Enumeration names = context.getAttributeNames();
         while (names.hasMoreElements()) {
-            String name = (String) names.nextElement();
+            final String name = (String) names.nextElement();
             buf.append(name + "=" + context.getAttribute(name));
         }
         return buf.toString();
     }
 
-    private String getParameters(ServletContext context) {
-        StringBuffer buf = new StringBuffer();
-        Enumeration names = context.getInitParameterNames();
+    private String getParameters(final ServletContext context) {
+        final StringBuffer buf = new StringBuffer();
+        final Enumeration names = context.getInitParameterNames();
         while (names.hasMoreElements()) {
-            String name = (String) names.nextElement();
+            final String name = (String) names.nextElement();
             buf.append(name + "=" + context.getInitParameter(name));
         }
         return buf.toString();
     }
 
-    public void startRequest(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) {
+    public void startRequest(final HttpServletRequest request, final HttpServletResponse response,
+        final ServletContext servletContext) {
         this.request = request;
         this.response = response;
         this.servletContext = servletContext;
-        Enumeration parameterNames = request.getParameterNames();
+        final Enumeration parameterNames = request.getParameterNames();
         while (parameterNames.hasMoreElements()) {
-            String name = (String) parameterNames.nextElement();
+            final String name = (String) parameterNames.nextElement();
             addParameter(name, request.getParameter(name));
         }
-        
-        
-        
+
         // TODO move this
-     //   response.sendError(403);
-     //   response.setContentType("text/html");
+        // response.sendError(403);
+        // response.setContentType("text/html");
     }
 
     public HttpServletRequest getRequest() {
@@ -168,34 +164,37 @@ public class ServletRequestContext exten
         return servletContext;
     }
 
+    @Override
     public PrintWriter getWriter() {
         try {
             return response.getWriter();
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new ScimpiException(e);
         }
     }
 
-    public String findFile(String fileName) {
+    @Override
+    public String findFile(final String fileName) {
         try {
             if (getServletContext().getResource(fileName) == null) {
                 return null;
             } else {
                 return fileName;
             }
-        } catch (MalformedURLException e) {
+        } catch (final MalformedURLException e) {
             throw new ScimpiException(e);
         }
     }
 
-    public InputStream openStream(String path) {
-        InputStream in = servletContext.getResourceAsStream(path);
+    @Override
+    public InputStream openStream(final String path) {
+        final InputStream in = servletContext.getResourceAsStream(path);
 
         if (in == null) {
             servletContext.getResourcePaths("/");
             try {
                 servletContext.getResource(path);
-            } catch (MalformedURLException e) {
+            } catch (final MalformedURLException e) {
                 throw new ScimpiException(e);
             }
 
@@ -203,119 +202,136 @@ public class ServletRequestContext exten
         }
         return in;
     }
-    
+
+    @Override
     public void startHttpSession() {
         addVariable("_auth_session", getSession(), Scope.SESSION);
-        HttpSession httpSession = request.getSession(true);
-        Map<String, Object> sessionData = getSessionData();
+        final HttpSession httpSession = request.getSession(true);
+        final Map<String, Object> sessionData = getSessionData();
         httpSession.setAttribute("scimpi-context", sessionData);
     }
 
+    @Override
     protected String getSessionId() {
         return request.getSession().getId();
     }
 
+    @Override
     public String clearSession() {
         request.getSession().invalidate();
         return null;
     }
-    
+
+    @Override
     public void reset() {
         try {
             response.getWriter().print("<h1>RESET</h1>");
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new DispatchException(e);
         }
         response.reset();
     }
-    
-    public void forward(String view) {
+
+    @Override
+    public void forward(final String view) {
         try {
             isAborted = true;
             getRequest().getRequestDispatcher(view).forward(getRequest(), getResponse());
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new DispatchException(e);
-        } catch (ServletException e) {
+        } catch (final ServletException e) {
             throw new DispatchException(e);
         }
     }
 
-    public void redirectTo(String view) {
+    @Override
+    public void redirectTo(final String view) {
         try {
             isAborted = true;
             getResponse().sendRedirect(view);
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new DispatchException(e);
         }
     }
-    
-    public void raiseError(int status) {
+
+    @Override
+    public void raiseError(final int status) {
         try {
             isAborted = true;
             getResponse().sendError(status);
-        } catch (IOException e) {
+        } catch (final IOException e) {
             throw new RuntimeException(e);
         }
         getResponse().setStatus(status);
     }
-    
+
+    @Override
     public boolean isAborted() {
         return isAborted;
     }
-    
-    public void setContentType(String string) {
+
+    @Override
+    public void setContentType(final String string) {
         getResponse().setContentType(string);
     }
 
-    public String imagePath(ObjectAdapter object) {
-        String contextPath = getContextPath();
+    @Override
+    public String imagePath(final ObjectAdapter object) {
+        final String contextPath = getContextPath();
         return ImageLookup.imagePath(object, contextPath);
     }
-    
-    public String imagePath(ObjectSpecification specification) {
-        String contextPath = getContextPath();
+
+    @Override
+    public String imagePath(final ObjectSpecification specification) {
+        final String contextPath = getContextPath();
         return ImageLookup.imagePath(specification, contextPath);
     }
 
+    @Override
     public String getContextPath() {
         return request.getContextPath();
     }
-    
-    public String getHeader(String name) {
+
+    @Override
+    public String getHeader(final String name) {
         return request.getHeader(name);
     }
-    
+
+    @Override
     public String getQueryString() {
         return request.getQueryString();
     }
-    
+
+    @Override
     public String getUri() {
         return request.getRequestURI() + "?" + request.getQueryString();
     }
-    
+
+    @Override
     public String getUrlBase() {
-        //return request.getScheme() + request.getServerName() + request.getServerPort();
-        StringBuffer url = request.getRequestURL();
+        // return request.getScheme() + request.getServerName() + request.getServerPort();
+        final StringBuffer url = request.getRequestURL();
         url.setLength(url.length() - request.getRequestURI().length());
         return url.toString();
     }
-    
-    public void addCookie(String name, String value, int minutesUtilExpires) {
-        Cookie cookie = new Cookie(name, value);
+
+    @Override
+    public void addCookie(final String name, final String value, final int minutesUtilExpires) {
+        final Cookie cookie = new Cookie(name, value);
         cookie.setMaxAge(minutesUtilExpires * 60);
         response.addCookie(cookie);
     }
-    
-    public String getCookie(String name) {
-        Cookie[] cookies = request.getCookies();
-        if(cookies != null) {
-            for (int i = 0; i < cookies.length; i++) {
-                if(cookies[i].getName().equals(name)) {
-                    return cookies[i].getValue();
+
+    @Override
+    public String getCookie(final String name) {
+        final Cookie[] cookies = request.getCookies();
+        if (cookies != null) {
+            for (final Cookie cookie : cookies) {
+                if (cookie.getName().equals(name)) {
+                    return cookie.getValue();
                 }
             }
         }
         return null;
     }
 }
-



Mime
View raw message