incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1207478 [1/2] - in /incubator/isis/trunk/framework: core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/ core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/ runtimes/dflt/runtime/src/test/jav...
Date Mon, 28 Nov 2011 17:40:22 GMT
Author: danhaywood
Date: Mon Nov 28 17:40:11 2011
New Revision: 1207478

URL: http://svn.apache.org/viewvc?rev=1207478&view=rev
Log:
ISIS-137: added capability to register new users via html viewer

Added:
    incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/RegistrationDetails.java
    incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/Registrar.java
    incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/RegistrationDetailsPassword.java
    incubator/isis/trunk/framework/security/dflt/src/main/java/org/apache/isis/security/dflt/authentication/inmemory/
    incubator/isis/trunk/framework/security/dflt/src/main/java/org/apache/isis/security/dflt/authentication/inmemory/AuthenticatorInMemory.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/PathBuilder.java
      - copied, changed from r1206146, incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerContext.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/servlet/RegisterServlet.java
Removed:
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerContext.java
Modified:
    incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationManager.java
    incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationRequestAbstract.java
    incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationRequestPassword.java
    incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/AuthenticationManagerStandard.java
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testsystem/AuthenticationManagerNoop.java
    incubator/isis/trunk/framework/runtimes/dflt/webapp/src/main/java/org/apache/isis/runtimes/dflt/webapp/IsisSessionFilter.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Div.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Html.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Link.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Row.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ViewDiv.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/servlet/AbstractHtmlViewerServlet.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/servlet/ControllerServlet.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/servlet/HtmlServletConstants.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/servlet/LogonServlet.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java

Modified: incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationManager.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationManager.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationManager.java (original)
+++ incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationManager.java Mon Nov 28 17:40:11 2011
@@ -35,12 +35,14 @@ public interface AuthenticationManager e
      */
     AuthenticationSession authenticate(AuthenticationRequest request);
 
+    boolean register(RegistrationDetails registrationDetails);
+    
     /**
      * Whether the provided {@link AuthenticationSession} is still valid.
      */
     boolean isSessionValid(AuthenticationSession authenticationSession);
     
     void closeSession(AuthenticationSession authenticationSession);
-    
+
 }
 

Modified: incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationRequestAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationRequestAbstract.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationRequestAbstract.java (original)
+++ incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationRequestAbstract.java Mon Nov 28 17:40:11 2011
@@ -27,9 +27,6 @@ import java.util.List;
 import com.google.common.collect.Lists;
 
 
-
-
-
 public abstract class AuthenticationRequestAbstract implements AuthenticationRequest {
 	
     private final String name;

Modified: incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationRequestPassword.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationRequestPassword.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationRequestPassword.java (original)
+++ incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/AuthenticationRequestPassword.java Mon Nov 28 17:40:11 2011
@@ -20,9 +20,6 @@
 
 package org.apache.isis.core.runtime.authentication;
 
-
-
-
 public class AuthenticationRequestPassword extends AuthenticationRequestAbstract {
 	
     private final String password;

Added: incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/RegistrationDetails.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/RegistrationDetails.java?rev=1207478&view=auto
==============================================================================
--- incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/RegistrationDetails.java (added)
+++ incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/RegistrationDetails.java Mon Nov 28 17:40:11 2011
@@ -0,0 +1,5 @@
+package org.apache.isis.core.runtime.authentication;
+
+public interface RegistrationDetails {
+
+}

Modified: incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/AuthenticationManagerStandard.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/AuthenticationManagerStandard.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/AuthenticationManagerStandard.java (original)
+++ incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/AuthenticationManagerStandard.java Mon Nov 28 17:40:11 2011
@@ -31,13 +31,14 @@ import java.util.Map;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.config.IsisConfiguration;
 import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.commons.debug.DebuggableWithTitle;
 import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.core.commons.lang.ToString;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
+import org.apache.isis.core.runtime.authentication.RegistrationDetails;
 
+import com.google.common.collect.Collections2;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 
@@ -54,6 +55,8 @@ public class AuthenticationManagerStanda
     private RandomCodeGenerator randomCodeGenerator;
     private IsisConfiguration configuration;
 
+    
+
     // //////////////////////////////////////////////////////////
     // constructor
     // //////////////////////////////////////////////////////////
@@ -178,6 +181,30 @@ public class AuthenticationManagerStanda
         return Collections.unmodifiableList(authenticators);
     }
 
+
+    // //////////////////////////////////////////////////////////
+    // register
+    // //////////////////////////////////////////////////////////
+
+    @Override
+    public boolean register(RegistrationDetails registrationDetails) {
+        for(final Registrar registrar: getRegistrars()) {
+            if(registrar.canRegister(registrationDetails)) {
+                return registrar.register(registrationDetails);
+            }
+        }
+        return false;
+    }
+
+    public List<Registrar> getRegistrars() {
+        return asAuthenticators(getAuthenticators());
+    }
+
+    private static List<Registrar> asAuthenticators(final List<Authenticator> authenticators2) {
+        final List<Registrar> registrars = Lists.transform(authenticators2, Registrar.AS_REGISTRAR_ELSE_NULL);
+        return Lists.newArrayList(Collections2.filter(registrars, Registrar.NON_NULL));
+    }
+
     // //////////////////////////////////////////////////////////
     // RandomCodeGenerator
     // //////////////////////////////////////////////////////////
@@ -239,5 +266,6 @@ public class AuthenticationManagerStanda
     }
 
 
+
 }
 

Added: incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/Registrar.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/Registrar.java?rev=1207478&view=auto
==============================================================================
--- incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/Registrar.java (added)
+++ incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/Registrar.java Mon Nov 28 17:40:11 2011
@@ -0,0 +1,54 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.runtime.authentication.standard;
+
+import org.apache.isis.core.commons.components.ApplicationScopedComponent;
+import org.apache.isis.core.runtime.authentication.RegistrationDetails;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+
+public interface Registrar extends ApplicationScopedComponent {
+	
+    static Predicate<Registrar> NON_NULL = new Predicate<Registrar>() {
+        @Override
+        public boolean apply(Registrar input) {
+            return input != null;
+        }
+    };
+    
+    static Function<Authenticator, Registrar> AS_REGISTRAR_ELSE_NULL = new Function<Authenticator, Registrar>() {
+        @Override
+        public Registrar apply(Authenticator input) {
+            if(input instanceof Registrar) {
+                return (Registrar) input;
+            }
+            return null;
+        }
+    };
+
+    /**
+	 * Whether the provided {@link RegistrationDetails} is recognized by this {@link Registrar}.
+	 */
+	boolean canRegister(RegistrationDetails registrationDetails);
+
+	boolean register(RegistrationDetails registrationDetails);
+
+}

Added: incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/RegistrationDetailsPassword.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/RegistrationDetailsPassword.java?rev=1207478&view=auto
==============================================================================
--- incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/RegistrationDetailsPassword.java (added)
+++ incubator/isis/trunk/framework/core/runtime/src/main/java/org/apache/isis/core/runtime/authentication/standard/RegistrationDetailsPassword.java Mon Nov 28 17:40:11 2011
@@ -0,0 +1,24 @@
+package org.apache.isis.core.runtime.authentication.standard;
+
+import org.apache.isis.core.runtime.authentication.RegistrationDetails;
+
+public class RegistrationDetailsPassword implements RegistrationDetails {
+    
+    private final String user;
+    private final String password;
+    
+    public RegistrationDetailsPassword(String user, String password) {
+        super();
+        this.user = user;
+        this.password = password;
+    }
+    
+    public String getUser() {
+        return user;
+    }
+    
+    public String getPassword() {
+        return password;
+    }
+
+}

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testsystem/AuthenticationManagerNoop.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testsystem/AuthenticationManagerNoop.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testsystem/AuthenticationManagerNoop.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testsystem/AuthenticationManagerNoop.java Mon Nov 28 17:40:11 2011
@@ -23,6 +23,7 @@ import org.apache.isis.core.commons.auth
 import org.apache.isis.core.commons.components.Noop;
 import org.apache.isis.core.runtime.authentication.AuthenticationManager;
 import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
+import org.apache.isis.core.runtime.authentication.RegistrationDetails;
 
 public class AuthenticationManagerNoop implements AuthenticationManager, Noop {
 
@@ -51,4 +52,9 @@ public class AuthenticationManagerNoop i
     public void testSetSession(final AuthenticationSession authenticationSession) {
     }
 
+    @Override
+    public boolean register(RegistrationDetails registrationDetails) {
+        return false;
+    }
+
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/webapp/src/main/java/org/apache/isis/runtimes/dflt/webapp/IsisSessionFilter.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/webapp/src/main/java/org/apache/isis/runtimes/dflt/webapp/IsisSessionFilter.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/webapp/src/main/java/org/apache/isis/runtimes/dflt/webapp/IsisSessionFilter.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/webapp/src/main/java/org/apache/isis/runtimes/dflt/webapp/IsisSessionFilter.java Mon Nov 28 17:40:11 2011
@@ -20,6 +20,10 @@
 package org.apache.isis.runtimes.dflt.webapp;
 
 import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.regex.Pattern;
 
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
@@ -38,6 +42,11 @@ import org.apache.isis.runtimes.dflt.web
 import org.apache.isis.runtimes.dflt.webapp.auth.AuthenticationSessionLookupStrategy.Caching;
 import org.apache.isis.runtimes.dflt.webapp.auth.AuthenticationSessionLookupStrategyUtils;
 
+import com.google.common.base.Function;
+import com.google.common.base.Splitter;
+import com.google.common.collect.Collections2;
+import com.google.common.collect.Lists;
+
 public class IsisSessionFilter implements Filter {
 
     /**
@@ -51,9 +60,32 @@ public class IsisSessionFilter implement
      */
     public static final String CACHE_AUTH_SESSION_ON_HTTP_SESSION_KEY = "cacheAuthSessionOnHttpSession";
 
+    /**
+     * Init parameter key for which extensions should be ignored (typically, mappings for other viewers within the webapp context).
+     * 
+     * <p>
+     * It can also be used to specify ignored static resources (though putting the {@link ResourceCachingFilter} first in the
+     * <tt>web.xml</tt> accomplishes the same thing).
+     * 
+     * <p>
+     * The value is expected as a comma separated list, for example:
+     * <pre>htmlviewer</pre>
+     */
+    public static final String IGNORE_EXTENSIONS_KEY = "ignoreExtensions";
+
+    private static final Function<String,Pattern> STRING_TO_PATTERN = new Function<String,Pattern>() {
+        @Override
+        public Pattern apply(String input) {
+            return Pattern.compile(".*\\." + input);
+        }
+        
+    };
+
     private AuthenticationSessionLookupStrategy authSessionLookupStrategy;
     private String logonPageIfNoSession;
     private Caching caching;
+    private Collection<Pattern> ignoreExtensions;
+
 
     // /////////////////////////////////////////////////////////////////
     // init, destroy
@@ -64,9 +96,9 @@ public class IsisSessionFilter implement
         authSessionLookupStrategy = AuthenticationSessionLookupStrategyUtils.lookup(config);
         lookupLogonPageIfNoSessionKey(config);
         lookupCacheAuthSessionKey(config);
+        lookupIgnorePatterns(config);
     }
 
-
     private void lookupLogonPageIfNoSessionKey(final FilterConfig config) {
         logonPageIfNoSession = config.getInitParameter(LOGON_PAGE_KEY);
     }
@@ -75,6 +107,20 @@ public class IsisSessionFilter implement
         caching = Caching.lookup(config.getInitParameter(CACHE_AUTH_SESSION_ON_HTTP_SESSION_KEY));
     }
 
+    private void lookupIgnorePatterns(final FilterConfig config) {
+        ignoreExtensions = Collections.unmodifiableCollection(parseIgnorePatterns(config));
+    }
+
+    private Collection<Pattern> parseIgnorePatterns(final FilterConfig config) {
+        final String ignoreExtensionsStr = config.getInitParameter(IGNORE_EXTENSIONS_KEY);
+        if(ignoreExtensionsStr != null) {
+            final List<String> ignoreExtensions = Lists.newArrayList(Splitter.on(",").split(ignoreExtensionsStr));
+            return Collections2.transform(ignoreExtensions, STRING_TO_PATTERN);
+        }
+        return Lists.newArrayList();
+    }
+
+
     @Override
     public void destroy() {
     }
@@ -92,6 +138,15 @@ public class IsisSessionFilter implement
                 final HttpServletRequest httpRequest = (HttpServletRequest) request;
                 final HttpServletResponse httpResponse = (HttpServletResponse) response;
 
+                if(requestIsIgnoreExtension(filter, httpRequest)) {
+                    try {
+                        chain.doFilter(request, response);
+                        return;
+                    } finally {
+                        closeSession();
+                    }
+                }
+
                 if(ResourceCachingFilter.isCachedResource(httpRequest)) {
                     try {
                         chain.doFilter(request, response);
@@ -147,6 +202,16 @@ public class IsisSessionFilter implement
                 }
             }
 
+            private boolean requestIsIgnoreExtension(IsisSessionFilter filter, HttpServletRequest httpRequest) {
+                final String servletPath = httpRequest.getServletPath();
+                for (final Pattern extension : filter.ignoreExtensions) {
+                    if(extension.matcher(servletPath).matches()) {
+                        return true;
+                    }
+                }
+                return false;
+            }
+
             private boolean requestToLogonPage(IsisSessionFilter filter, HttpServletRequest httpRequest) {
                 return filter.logonPageIfNoSession != null &&
                        filter.logonPageIfNoSession.equals(httpRequest.getServletPath());

Added: incubator/isis/trunk/framework/security/dflt/src/main/java/org/apache/isis/security/dflt/authentication/inmemory/AuthenticatorInMemory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/security/dflt/src/main/java/org/apache/isis/security/dflt/authentication/inmemory/AuthenticatorInMemory.java?rev=1207478&view=auto
==============================================================================
--- incubator/isis/trunk/framework/security/dflt/src/main/java/org/apache/isis/security/dflt/authentication/inmemory/AuthenticatorInMemory.java (added)
+++ incubator/isis/trunk/framework/security/dflt/src/main/java/org/apache/isis/security/dflt/authentication/inmemory/AuthenticatorInMemory.java Mon Nov 28 17:40:11 2011
@@ -0,0 +1,74 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.security.dflt.authentication.inmemory;
+
+import java.util.Map;
+
+import org.apache.isis.core.commons.components.Noop;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
+import org.apache.isis.core.runtime.authentication.AuthenticationRequestPassword;
+import org.apache.isis.core.runtime.authentication.RegistrationDetails;
+import org.apache.isis.core.runtime.authentication.standard.AuthenticatorAbstract;
+import org.apache.isis.core.runtime.authentication.standard.Registrar;
+import org.apache.isis.core.runtime.authentication.standard.RegistrationDetailsPassword;
+
+import com.google.common.base.Objects;
+import com.google.common.collect.Maps;
+
+public class AuthenticatorInMemory extends AuthenticatorAbstract implements Registrar {
+    
+    private Map<String,String> users = Maps.newHashMap();
+
+    public AuthenticatorInMemory(final IsisConfiguration configuration) {
+        super(configuration);
+    }
+
+    @Override
+    public boolean canAuthenticate(final AuthenticationRequest request) {
+        return request instanceof AuthenticationRequestPassword;
+    }
+
+    @Override
+    public boolean isValid(final AuthenticationRequest request) {
+        final AuthenticationRequestPassword requestPassword = (AuthenticationRequestPassword) request;
+        final String password = users.get(requestPassword.getName());
+        return Objects.equal(requestPassword.getPassword(), password);
+    }
+
+    @Override
+    public boolean canRegister(final RegistrationDetails registrationDetails) {
+        return registrationDetails instanceof RegistrationDetailsPassword;
+    }
+
+    @Override
+    public boolean register(final RegistrationDetails registrationDetails) {
+        final RegistrationDetailsPassword registration = (RegistrationDetailsPassword) registrationDetails;
+        final String user = registration.getUser();
+        final String existingPassword = users.get(user);
+        if(existingPassword != null) { 
+            return false;
+        }
+        final String password = registration.getPassword();
+        users.put(user, password);
+        return true;
+    }
+
+}

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java Mon Nov 28 17:40:11 2011
@@ -45,7 +45,7 @@ import org.apache.isis.viewer.html.servl
  */
 public class HtmlViewerInstaller extends IsisViewerInstallerAbstract {
 
-    private static final String LOGON_PAGE = HtmlServletConstants.LOGON_APP_PAGE;
+    private static final String LOGON_PAGE = HtmlServletConstants.LOGON_PAGE;
     private static final String LOGON_PAGE_MAPPED = "/" + LOGON_PAGE;
 
     private static final String[] STATIC_CONTENT = new String[] { "*.gif", "*.png", "*.jpg", "*.css" };

Copied: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/PathBuilder.java (from r1206146, incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerContext.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/PathBuilder.java?p2=incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/PathBuilder.java&p1=incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerContext.java&r1=1206146&r2=1207478&rev=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/HtmlViewerContext.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/PathBuilder.java Mon Nov 28 17:40:11 2011
@@ -19,39 +19,12 @@
 
 package org.apache.isis.viewer.html;
 
-import javax.servlet.ServletContext;
 
-import org.apache.isis.viewer.html.servlet.HtmlServletConstants;
 
+public interface PathBuilder {
 
-public final class HtmlViewerContext {
-
-    private final String suffix;
-
-    public HtmlViewerContext(final ServletContext servletContext) {
-        this(getSuffixInitParam(servletContext));
-    }
-
-    private HtmlViewerContext(final String suffix) {
-        this.suffix = suffix;
-    }
-    
-    private static String getSuffixInitParam(final ServletContext servletContext) {
-        final String suffixInitParam = servletContext.getInitParameter(HtmlServletConstants.SUFFIX_INIT_PARAM);
-        return suffixInitParam != null? suffixInitParam: HtmlServletConstants.SUFFIX_INIT_PARAM_VALUE_DEFAULT;
-    }
-
-    public String getSuffix() {
-        return suffix;
-    }
+    public String getSuffix();
     
-    public String pathTo(final String prefix) {
-        final StringBuilder buf = new StringBuilder(prefix);
-        if(!prefix.endsWith(".")) {
-            buf.append(".");
-        }
-        buf.append(suffix);
-        return buf.toString();
-    }
+    public String pathTo(final String prefix);
 
 }

Added: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java?rev=1207478&view=auto
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java (added)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java Mon Nov 28 17:40:11 2011
@@ -0,0 +1,57 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.viewer.html;
+
+import javax.servlet.ServletContext;
+
+import org.apache.isis.viewer.html.servlet.HtmlServletConstants;
+
+
+public class PathBuilderDefault implements PathBuilder {
+
+    private final String suffix;
+
+    public PathBuilderDefault(final ServletContext servletContext) {
+        this(getSuffixInitParam(servletContext));
+    }
+
+    private PathBuilderDefault(final String suffix) {
+        this.suffix = suffix;
+    }
+    
+    private static String getSuffixInitParam(final ServletContext servletContext) {
+        final String suffixInitParam = servletContext.getInitParameter(HtmlServletConstants.SUFFIX_INIT_PARAM);
+        return suffixInitParam != null? suffixInitParam: HtmlServletConstants.SUFFIX_INIT_PARAM_VALUE_DEFAULT;
+    }
+
+    public String getSuffix() {
+        return suffix;
+    }
+    
+    public String pathTo(final String prefix) {
+        final StringBuilder buf = new StringBuilder(prefix);
+        if(!prefix.endsWith(".")) {
+            buf.append(".");
+        }
+        buf.append(suffix);
+        return buf.toString();
+    }
+
+}

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java Mon Nov 28 17:40:11 2011
@@ -21,16 +21,16 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 
 public abstract class ComponentAbstract implements Component {
     
     private String id;
     private String cls;
-    protected final HtmlViewerContext htmlViewerContext;
+    protected final PathBuilder pathBuilder;
 
-    public ComponentAbstract(HtmlViewerContext htmlViewerContext) {
-        this.htmlViewerContext = htmlViewerContext;
+    public ComponentAbstract(PathBuilder pathBuilder) {
+        this.pathBuilder = pathBuilder;
     }
     
     public void setClass(final String cls) {

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java Mon Nov 28 17:40:11 2011
@@ -23,21 +23,21 @@ import java.io.PrintWriter;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 
 public class ComponentComposite implements Component {
     
     private final List<Component> components = new ArrayList<Component>();
-    protected final HtmlViewerContext htmlViewerContext;
+    protected final PathBuilder pathBuilder;
 
-    public ComponentComposite(final HtmlViewerContext htmlViewerContext) {
+    public ComponentComposite(final PathBuilder pathBuilder) {
         super();
-        this.htmlViewerContext = htmlViewerContext;
+        this.pathBuilder = pathBuilder;
     }
 
     
     protected String pathTo(final String prefix) {
-        return htmlViewerContext.pathTo(prefix);
+        return pathBuilder.pathTo(prefix);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java Mon Nov 28 17:40:11 2011
@@ -22,8 +22,10 @@ package org.apache.isis.viewer.html.comp
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
+import org.apache.isis.viewer.html.PathBuilder;
 
-public interface ComponentFactory {
+public interface ComponentFactory extends PathBuilder {
+    
     Component createAddOption(String id, String id2);
 
     Block createBlock(String style, String description);

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java Mon Nov 28 17:40:11 2011
@@ -22,7 +22,7 @@ package org.apache.isis.viewer.html.comp
 import java.io.PrintWriter;
 import java.util.StringTokenizer;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Block;
 import org.apache.isis.viewer.html.component.Component;
 import org.apache.isis.viewer.html.component.Page;
@@ -36,11 +36,11 @@ public abstract class AbstractHtmlPage i
     private final StringBuffer debug = new StringBuffer();
     
     private String title = "Apache Isis";
-    protected final HtmlViewerContext htmlViewerContext;
+    protected final PathBuilder pathBuilder;
 
-    public AbstractHtmlPage(final HtmlViewerContext htmlViewerContext, final String styleSheet, final String header, final String footer) {
-        this.htmlViewerContext = htmlViewerContext;
-        this.pageHeader = new Div(htmlViewerContext, null, "page-header");
+    public AbstractHtmlPage(final PathBuilder pathBuilder, final String styleSheet, final String header, final String footer) {
+        this.pathBuilder = pathBuilder;
+        this.pageHeader = new Div(pathBuilder, null, "page-header");
         this.styleSheet = styleSheet == null ? "default.css" : styleSheet;
         this.siteHeader = header;
         this.siteFooter = footer;

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java Mon Nov 28 17:40:11 2011
@@ -22,12 +22,12 @@ package org.apache.isis.viewer.html.comp
 import java.io.PrintWriter;
 
 import org.apache.isis.viewer.html.HtmlViewerConstants;
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Component;
 
 class ActionComponent implements Component {
     
-    private final HtmlViewerContext htmlViewerContext;
+    private final PathBuilder pathBuilder;
     private final String objectId;
     private final String name;
     private final String description;
@@ -35,9 +35,9 @@ class ActionComponent implements Compone
     private final String action;
     private final String elementId;
 
-    public ActionComponent(final HtmlViewerContext htmlViewerContext, final String action, final String name, final String description,
+    public ActionComponent(final PathBuilder pathBuilder, final String action, final String name, final String description,
         final String objectId, final String elementId, final String field) {
-        this.htmlViewerContext = htmlViewerContext;
+        this.pathBuilder = pathBuilder;
         this.action = action;
         this.name = name;
         this.description = description;
@@ -70,7 +70,7 @@ class ActionComponent implements Compone
     }
 
     protected String pathTo(final String prefix) {
-        return htmlViewerContext.pathTo(prefix);
+        return pathBuilder.pathTo(prefix);
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java Mon Nov 28 17:40:11 2011
@@ -21,15 +21,15 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.ComponentAbstract;
 
 public class BreadCrumbs extends ComponentAbstract {
     private final String[] names;
     private final boolean[] isLinked;
 
-    public BreadCrumbs(final HtmlViewerContext htmlViewerContext, final String[] names, final boolean[] isLinked) {
-        super(htmlViewerContext);
+    public BreadCrumbs(final PathBuilder pathBuilder, final String[] names, final boolean[] isLinked) {
+        super(pathBuilder);
         this.names = names;
         this.isLinked = isLinked;
     }
@@ -60,7 +60,7 @@ public class BreadCrumbs extends Compone
     }
 
     protected String pathTo(final String prefix) {
-        return htmlViewerContext.pathTo(prefix);
+        return pathBuilder.pathTo(prefix);
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java Mon Nov 28 17:40:11 2011
@@ -25,7 +25,7 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacet;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Component;
 import org.apache.isis.viewer.html.image.ImageLookup;
 import org.apache.isis.viewer.html.request.Request;
@@ -33,12 +33,12 @@ import org.apache.isis.viewer.html.reque
 public class CollectionIcon implements Component {
     
     private final ObjectAdapter collection;
-    private final HtmlViewerContext htmlViewerContext;
+    private final PathBuilder pathBuilder;
     private final String id;
     private final String description;
 
-    public CollectionIcon(HtmlViewerContext htmlViewerContext, final ObjectAdapter element, final String description, final String id) {
-        this.htmlViewerContext = htmlViewerContext;
+    public CollectionIcon(PathBuilder pathBuilder, final ObjectAdapter element, final String description, final String id) {
+        this.pathBuilder = pathBuilder;
         this.collection = element;
         this.description = description;
         this.id = id;
@@ -75,7 +75,7 @@ public class CollectionIcon implements C
     }
 
     protected String pathTo(final String prefix) {
-        return htmlViewerContext.pathTo(prefix);
+        return pathBuilder.pathTo(prefix);
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java Mon Nov 28 17:40:11 2011
@@ -24,7 +24,7 @@ import java.io.PrintWriter;
 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;
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.ComponentAbstract;
 import org.apache.isis.viewer.html.image.ImageLookup;
 import org.apache.isis.viewer.html.request.Request;
@@ -36,9 +36,9 @@ class CollectionLink extends ComponentAb
     private final String title;
     private final String description;
 
-    public CollectionLink(HtmlViewerContext htmlViewerContext, final ObjectAssociation field, final ObjectAdapter collection,
+    public CollectionLink(PathBuilder pathBuilder, final ObjectAssociation field, final ObjectAdapter collection,
         final String description, final String objectId) {
-        super(htmlViewerContext);
+        super(pathBuilder);
         this.description = description;
         this.objectId = objectId;
         fieldId = field.getId();
@@ -72,7 +72,7 @@ class CollectionLink extends ComponentAb
     }
 
     protected String pathTo(final String prefix) {
-        return htmlViewerContext.pathTo(prefix);
+        return pathBuilder.pathTo(prefix);
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Div.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Div.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Div.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Div.java Mon Nov 28 17:40:11 2011
@@ -21,7 +21,7 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Block;
 import org.apache.isis.viewer.html.component.Component;
 import org.apache.isis.viewer.html.component.ComponentComposite;
@@ -32,12 +32,12 @@ public class Div extends ComponentCompos
     private final String id;
     private final String description;
 
-    public Div(final HtmlViewerContext htmlViewerContext, final String className, final String description) {
-        this(htmlViewerContext, className, description, null);
+    public Div(final PathBuilder pathBuilder, final String className, final String description) {
+        this(pathBuilder, className, description, null);
     }
 
-    public Div(final HtmlViewerContext htmlViewerContext, final String className, final String description, final String id) {
-        super(htmlViewerContext);
+    public Div(final PathBuilder pathBuilder, final String className, final String description, final String id) {
+        super(pathBuilder);
         this.description = description;
         this.className = className;
         this.id = id;
@@ -80,7 +80,7 @@ public class Div extends ComponentCompos
     }
 
     public void add(final String text) {
-        super.add(new Html(htmlViewerContext, text));
+        super.add(new Html(pathBuilder, text));
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java Mon Nov 28 17:40:11 2011
@@ -21,7 +21,7 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Block;
 import org.apache.isis.viewer.html.component.Component;
 import org.apache.isis.viewer.html.component.DebugPane;
@@ -36,10 +36,10 @@ public class DynamicHtmlPage extends Abs
     private Component crumbs;
     private DebugPane debugPane;
 
-    public DynamicHtmlPage(HtmlViewerContext htmlViewerContext, final String styleSheet, final String header, final String footer) {
-        super(htmlViewerContext, styleSheet, header, footer);
-        this.navigation = new Div(htmlViewerContext, null, "navigation");
-        this.viewPane = new ViewDiv(htmlViewerContext);
+    public DynamicHtmlPage(PathBuilder pathBuilder, final String styleSheet, final String header, final String footer) {
+        super(pathBuilder, styleSheet, header, footer);
+        this.navigation = new Div(pathBuilder, null, "navigation");
+        this.viewPane = new ViewDiv(pathBuilder);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java Mon Nov 28 17:40:11 2011
@@ -21,19 +21,19 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.ComponentAbstract;
 
 public class Heading extends ComponentAbstract {
     private final String title;
     private final int level;
 
-    public Heading(HtmlViewerContext htmlViewerContext, final String title) {
-        this(htmlViewerContext, title, 1);
+    public Heading(PathBuilder pathBuilder, final String title) {
+        this(pathBuilder, title, 1);
     }
 
-    public Heading(HtmlViewerContext htmlViewerContext, final String title, final int level) {
-        super(htmlViewerContext);
+    public Heading(PathBuilder pathBuilder, final String title, final int level) {
+        super(pathBuilder);
         this.title = title;
         this.level = level;
     }

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Html.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Html.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Html.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Html.java Mon Nov 28 17:40:11 2011
@@ -21,15 +21,15 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.ComponentAbstract;
 
 class Html extends ComponentAbstract {
 
     private final String code;
 
-    public Html(HtmlViewerContext htmlViewerContext, final String code) {
-        super(htmlViewerContext);
+    public Html(PathBuilder pathBuilder, final String code) {
+        super(pathBuilder);
         this.code = code;
     }
 

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java Mon Nov 28 17:40:11 2011
@@ -38,7 +38,7 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.progmodel.facets.value.booleans.BooleanValueFacet;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Block;
 import org.apache.isis.viewer.html.component.Component;
 import org.apache.isis.viewer.html.component.ComponentFactory;
@@ -52,10 +52,10 @@ public class HtmlComponentFactory implem
     protected final String footer;
     protected final String header;
     protected final String styleSheet;
-    private final HtmlViewerContext htmlViewerContext;
+    private final PathBuilder pathBuilder;
 
-    public HtmlComponentFactory(final HtmlViewerContext htmlViewerContext) {
-        this.htmlViewerContext = htmlViewerContext;
+    public HtmlComponentFactory(final PathBuilder pathBuilder) {
+        this.pathBuilder = pathBuilder;
         final IsisConfiguration configuration = getConfiguration();
         styleSheet = configuration.getString(STYLE_SHEET);
         String file = configuration.getString(HEADER_FILE);
@@ -66,17 +66,17 @@ public class HtmlComponentFactory implem
 
     @Override
     public Block createBlock(final String style, final String description) {
-        return new Div(htmlViewerContext, style, description);
+        return new Div(this, style, description);
     }
 
     @Override
     public Component createBreadCrumbs(final String[] names, final boolean[] isLinked) {
-        return new BreadCrumbs(htmlViewerContext, names, isLinked);
+        return new BreadCrumbs(this, names, isLinked);
     }
 
     @Override
     public Component createCollectionIcon(final ObjectAssociation field, final ObjectAdapter collection, final String id) {
-        return new CollectionLink(htmlViewerContext, field, collection, field.getDescription(), id);
+        return new CollectionLink(this, field, collection, field.getDescription(), id);
     }
 
     @Override
@@ -86,17 +86,17 @@ public class HtmlComponentFactory implem
 
     @Override
     public Component createEditOption(final String id) {
-        return new ActionComponent(htmlViewerContext, "edit", "Edit Object", "Edit the current object", id, null, null);
+        return new ActionComponent(this, "edit", "Edit Object", "Edit the current object", id, null, null);
     }
 
     @Override
     public Component createRemoveOption(final String id, final String elementId, final String fieldName) {
-        return new ActionComponent(htmlViewerContext, "remove", "Remove", "Remove item from collection", id, elementId, fieldName);
+        return new ActionComponent(this, "remove", "Remove", "Remove item from collection", id, elementId, fieldName);
     }
 
     @Override
     public Component createAddOption(final String id, final String fieldName) {
-        return new ActionComponent(htmlViewerContext, "add", "Add Item", "Add item to collection", id, null, fieldName);
+        return new ActionComponent(this, "add", "Add Item", "Add item to collection", id, null, fieldName);
     }
 
     @Override
@@ -107,12 +107,12 @@ public class HtmlComponentFactory implem
     @Override
     public Form createForm(final String id, final String actionName, final int step, final int noOfPages,
         final boolean isEditing) {
-        return new HtmlForm(htmlViewerContext, id, actionName, step, noOfPages, isEditing);
+        return new HtmlForm(this, id, actionName, step, noOfPages, isEditing);
     }
 
     @Override
     public Component createHeading(final String name) {
-        return new Heading(htmlViewerContext, name, 4);
+        return new Heading(this, name, 4);
     }
 
     @Override
@@ -132,53 +132,57 @@ public class HtmlComponentFactory implem
 
     @Override
     public Component createLink(final String link, final String name, final String description) {
-        return new Link(htmlViewerContext, link, name, description);
+        return new Link(this, link, name, description);
     }
 
     @Override
     public Component createMenuItem(final String actionId, final String name, final String description,
         final String reasonDisabled, final ActionType type, final boolean hasParameters, final String targetObjectId) {
-        return new MenuItem(htmlViewerContext, actionId, name, description, reasonDisabled, type, hasParameters, targetObjectId);
+        return new MenuItem(this, actionId, name, description, reasonDisabled, type, hasParameters, targetObjectId);
     }
 
     @Override
     public Component createCollectionIcon(final ObjectAdapter collection, final String collectionId) {
-        return new CollectionIcon(htmlViewerContext, collection, collection.getSpecification().getDescription(), collectionId);
+        return new CollectionIcon(this, collection, collection.getSpecification().getDescription(), collectionId);
     }
 
     @Override
     public Component createObjectIcon(final ObjectAdapter object, final String objectId, final String style) {
-        return new ObjectIcon(htmlViewerContext, object, object.getSpecification().getDescription(), objectId, style);
+        return new ObjectIcon(this, object, object.getSpecification().getDescription(), objectId, style);
     }
 
     @Override
     public Component createObjectIcon(final ObjectAssociation field, final ObjectAdapter object, final String objectId,
         final String style) {
-        return new ObjectIcon(htmlViewerContext, object, field.getDescription(), objectId, style);
+        return new ObjectIcon(this, object, field.getDescription(), objectId, style);
     }
 
     @Override
     public Page createPage() {
-        return new DynamicHtmlPage(htmlViewerContext, styleSheet, header, footer);
+        return new DynamicHtmlPage(this, styleSheet, header, footer);
     }
 
     public LogonFormPage createLogonPage(final String user, final String password) {
-        return new LogonFormPage(htmlViewerContext, styleSheet, header, footer, user, password);
+        return new LogonFormPage(this, styleSheet, header, footer, user, password);
+    }
+
+    public RegisterFormPage createRegisterPage(final String user, final String password) {
+        return new RegisterFormPage(this, styleSheet, header, footer, user, password);
     }
 
     @Override
     public Component createService(final String objectId, final String title, final String iconName) {
-        return new ServiceComponent(htmlViewerContext, objectId, title, iconName);
+        return new ServiceComponent(this, objectId, title, iconName);
     }
 
     @Override
     public Table createTable(final int noColumns, final boolean withSelectorColumn) {
-        return new HtmlTable(htmlViewerContext, noColumns, withSelectorColumn);
+        return new HtmlTable(this, noColumns, withSelectorColumn);
     }
 
     @Override
     public Component createUserSwap(final String name) {
-        return new UserSwapLink(htmlViewerContext, name);
+        return new UserSwapLink(this, name);
 
     }
 
@@ -226,9 +230,25 @@ public class HtmlComponentFactory implem
         }
         return content.toString();
     }
+
+    @Override
+    public String getSuffix() {
+        return pathBuilder.getSuffix();
+    }
+
+    @Override
+    public String pathTo(String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+    
+
+    
+    ///////////////////////////////////////////////////////////////
+    // injected services
+    ///////////////////////////////////////////////////////////////
     
     protected IsisConfiguration getConfiguration() {
         return IsisContext.getConfiguration();
     }
-    
+
 }

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java Mon Nov 28 17:40:11 2011
@@ -23,7 +23,7 @@ import java.io.PrintWriter;
 
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.ComponentComposite;
 import org.apache.isis.viewer.html.component.Form;
 
@@ -34,13 +34,13 @@ public class HtmlForm extends ComponentC
     private final boolean isEditing;
     private final String id;
 
-    public HtmlForm(final HtmlViewerContext htmlViewerContext, final String id, final String action, final int page, final int noOfPages, final boolean isEditing) {
-        this(htmlViewerContext, id, action, page, noOfPages, false, isEditing);
+    public HtmlForm(final PathBuilder pathBuilder, final String id, final String action, final int page, final int noOfPages, final boolean isEditing) {
+        this(pathBuilder, id, action, page, noOfPages, false, isEditing);
     }
 
-    private HtmlForm(HtmlViewerContext htmlViewerContext, final String id, final String action, final int page, final int noOfPages,
+    private HtmlForm(PathBuilder pathBuilder, final String id, final String action, final int page, final int noOfPages,
         final boolean confirm, final boolean isEditing) {
-        super(htmlViewerContext);
+        super(pathBuilder);
         this.id = id;
         this.confirm = confirm;
         this.isEditing = isEditing;
@@ -62,7 +62,7 @@ public class HtmlForm extends ComponentC
                 optional = "<span class=\"required\"> *</span>";
             }
         }
-        add(new Html(htmlViewerContext, "<div class=\"field\" title=\"" + description + "\"><span class=\"label\">" + label
+        add(new Html(pathBuilder, "<div class=\"field\" title=\"" + description + "\"><span class=\"label\">" + label
             + "</span><span class=\"separator\">: </span> " + field + optional + error + "</div>"));
     }
 
@@ -107,7 +107,7 @@ public class HtmlForm extends ComponentC
     }
 
     public void addFieldName(final String fieldLabel) {
-        add(new Heading(htmlViewerContext, fieldLabel, 4));
+        add(new Heading(pathBuilder, fieldLabel, 4));
     }
 
     @Override

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java Mon Nov 28 17:40:11 2011
@@ -21,7 +21,7 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Component;
 import org.apache.isis.viewer.html.component.ComponentComposite;
 import org.apache.isis.viewer.html.component.Table;
@@ -34,15 +34,15 @@ public class HtmlTable extends Component
     private int cellCount;
     private final boolean addSelector;
 
-    public HtmlTable(final HtmlViewerContext htmlViewerContext, final int noColumns, final boolean withSelectorColumn) {
-        super(htmlViewerContext);
+    public HtmlTable(final PathBuilder pathBuilder, final int noColumns, final boolean withSelectorColumn) {
+        super(pathBuilder);
         this.noColumns = noColumns + (withSelectorColumn ? 1 : 0);
         addSelector = withSelectorColumn;
-        header = new TableHeader(htmlViewerContext);
+        header = new TableHeader(pathBuilder);
     }
 
     public Row newRow() {
-        final Row row = new Row(htmlViewerContext);
+        final Row row = new Row(pathBuilder);
         add(row);
         return row;
     }
@@ -106,7 +106,7 @@ public class HtmlTable extends Component
 
     @Override
     public void addRowHeader(final Component component) {
-        row = new Row(htmlViewerContext);
+        row = new Row(pathBuilder);
         add(row);
         cellCount = 0;
         row.addCell(component);

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Link.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Link.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Link.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Link.java Mon Nov 28 17:40:11 2011
@@ -21,18 +21,18 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Component;
 
 public class Link implements Component {
     
-    private final HtmlViewerContext htmlViewerContext;
+    private final PathBuilder pathBuilder;
     private final String link;
     private final String name;
     private final String description;
 
-    public Link(final HtmlViewerContext htmlViewerContext, final String link, final String name, final String description) {
-        this.htmlViewerContext = htmlViewerContext;
+    public Link(final PathBuilder pathBuilder, final String link, final String name, final String description) {
+        this.pathBuilder = pathBuilder;
         this.link = link;
         this.name = name;
         this.description = description;
@@ -44,7 +44,7 @@ public class Link implements Component {
     }
 
     protected String pathTo(final String link) {
-        return htmlViewerContext.pathTo(link);
+        return pathBuilder.pathTo(link);
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java Mon Nov 28 17:40:11 2011
@@ -21,7 +21,7 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Block;
 import org.apache.isis.viewer.html.component.Component;
 import org.apache.isis.viewer.html.component.DebugPane;
@@ -31,9 +31,9 @@ public class LogonFormPage extends Abstr
     private final String user;
     private final String password;
 
-    public LogonFormPage(final HtmlViewerContext htmlViewerContext, final String styleSheet, final String header, final String footer,
+    public LogonFormPage(final PathBuilder pathBuilder, final String styleSheet, final String header, final String footer,
         final String user, final String password) {
-        super(htmlViewerContext, styleSheet, header, footer);
+        super(pathBuilder, styleSheet, header, footer);
         this.user = user;
         this.password = password;
     }
@@ -56,6 +56,7 @@ public class LogonFormPage extends Abstr
             + "<span class=\"separator\">: </span><INPUT TYPE=\"password\" NAME=\"password\" value=\"" + password
             + "\"></DIV>");
         writer.println("<div class=\"action-button\"><INPUT TYPE=\"submit\" VALUE=\"Log in\" NAME=\"Log in\"></div>");
+        new Link(pathBuilder, "register", "register", "Register").write(writer);
         writer.println("</div>");
         writer.println("</FORM>");
         writer.println("</div>");
@@ -63,7 +64,7 @@ public class LogonFormPage extends Abstr
     }
 
     protected String pathTo(final String prefix) {
-        return htmlViewerContext.pathTo(prefix);
+        return pathBuilder.pathTo(prefix);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java Mon Nov 28 17:40:11 2011
@@ -22,7 +22,7 @@ package org.apache.isis.viewer.html.comp
 import java.io.PrintWriter;
 
 import org.apache.isis.core.metamodel.spec.ActionType;
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Component;
 
 public class MenuItem implements Component {
@@ -33,12 +33,12 @@ public class MenuItem implements Compone
     private final String reasonDisabled;
     private final boolean takesParameters;
     private final ActionType type;
-    private final HtmlViewerContext htmlViewerContext;
+    private final PathBuilder pathBuilder;
 
-    public MenuItem(HtmlViewerContext htmlViewerContext, final String actionId, final String actionName,
+    public MenuItem(PathBuilder pathBuilder, final String actionId, final String actionName,
         final String actionDescription, final String reasonDisabled, final ActionType type, final boolean takesParameters, final String objectId) {
         this.actionId = actionId;
-        this.htmlViewerContext = htmlViewerContext;
+        this.pathBuilder = pathBuilder;
         this.actionName = actionName;
         this.actionDescription = actionDescription;
         this.reasonDisabled = reasonDisabled;
@@ -96,7 +96,7 @@ public class MenuItem implements Compone
     }
 
     protected String pathTo(final String prefix) {
-        return htmlViewerContext.pathTo(prefix);
+        return pathBuilder.pathTo(prefix);
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java Mon Nov 28 17:40:11 2011
@@ -22,7 +22,7 @@ package org.apache.isis.viewer.html.comp
 import java.io.PrintWriter;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Component;
 import org.apache.isis.viewer.html.image.ImageLookup;
 import org.apache.isis.viewer.html.request.Request;
@@ -32,10 +32,10 @@ public class ObjectIcon implements Compo
     private final String id;
     private final String style;
     private final String description;
-    private final HtmlViewerContext htmlViewerContext;
+    private final PathBuilder pathBuilder;
 
-    public ObjectIcon(final HtmlViewerContext htmlViewerContext, final ObjectAdapter element, final String description, final String id, final String style) {
-        this.htmlViewerContext = htmlViewerContext;
+    public ObjectIcon(final PathBuilder pathBuilder, final ObjectAdapter element, final String description, final String id, final String style) {
+        this.pathBuilder = pathBuilder;
         this.element = element;
         this.description = description;
         this.id = id;
@@ -72,7 +72,7 @@ public class ObjectIcon implements Compo
     }
 
     protected String pathTo(final String prefix) {
-        return htmlViewerContext.pathTo(prefix);
+        return pathBuilder.pathTo(prefix);
     }
 
 }

Added: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java?rev=1207478&view=auto
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java (added)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java Mon Nov 28 17:40:11 2011
@@ -0,0 +1,85 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.viewer.html.component.html;
+
+import java.io.PrintWriter;
+
+import org.apache.isis.viewer.html.PathBuilder;
+import org.apache.isis.viewer.html.component.Block;
+import org.apache.isis.viewer.html.component.Component;
+import org.apache.isis.viewer.html.component.DebugPane;
+import org.apache.isis.viewer.html.component.ViewPane;
+
+public class RegisterFormPage extends AbstractHtmlPage {
+    private final String user;
+    private final String password;
+
+    public RegisterFormPage(final PathBuilder pathBuilder, final String styleSheet, final String header, final String footer,
+        final String user, final String password) {
+        super(pathBuilder, styleSheet, header, footer);
+        this.user = user;
+        this.password = password;
+    }
+
+    @Override
+    protected void writeContent(final PrintWriter writer) {
+        writer.println("<div id=\"view\">");
+        writer.println("<div class=\"header\">");
+        writer.println("<span class=\"header-text\">Please register by providing a user name and password.</span>");
+        writer.println("</div>");
+        writer.println("<FORM ACTION=\"" + pathTo("register") + "\" METHOD=\"post\">");
+        writer.println("<div id=\"content\">");
+        writer.println("<div class=\"field\"><span class=\"label\">User name</span>"
+            + "<span class=\"separator\">: </span><INPUT NAME=\"username\" value=\"" + user + "\"></DIV>");
+        writer.println("<div class=\"field\"><span class=\"label\">Password</span>"
+            + "<span class=\"separator\">: </span><INPUT TYPE=\"password\" NAME=\"password\" value=\"" + password
+            + "\"></DIV>");
+        writer.println("<div class=\"field\"><span class=\"label\">Password (again)</span>"
+                + "<span class=\"separator\">: </span><INPUT TYPE=\"password2\" NAME=\"password2\" value=\"" + password
+                + "\"></DIV>");
+        writer.println("<div class=\"action-button\"><INPUT TYPE=\"submit\" VALUE=\"Register\" NAME=\"Register\"></div>");
+        writer.println("</div>");
+        writer.println("</FORM>");
+        writer.println("</div>");
+    }
+
+    protected String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+
+    @Override
+    public Block getNavigation() {
+        return null;
+    }
+
+    @Override
+    public ViewPane getViewPane() {
+        return null;
+    }
+
+    @Override
+    public void setCrumbs(final Component component) {
+    }
+
+    @Override
+    public void setDebug(final DebugPane debugPane) {
+    }
+
+}

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Row.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Row.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Row.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/Row.java Mon Nov 28 17:40:11 2011
@@ -21,14 +21,14 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Component;
 import org.apache.isis.viewer.html.component.ComponentComposite;
 
 class Row extends ComponentComposite {
 
-    public Row(HtmlViewerContext htmlViewerContext) {
-        super(htmlViewerContext);
+    public Row(PathBuilder pathBuilder) {
+        super(pathBuilder);
     }
 
     private static final int TRUNCATE_LENGTH = 18;
@@ -50,7 +50,7 @@ class Row extends ComponentComposite {
         } else {
             s = string;
         }
-        add(new Html(htmlViewerContext, s));
+        add(new Html(pathBuilder, s));
     }
 
     public void addCell(final Component component) {

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java Mon Nov 28 17:40:11 2011
@@ -21,7 +21,7 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Component;
 import org.apache.isis.viewer.html.image.ImageLookup;
 
@@ -30,10 +30,10 @@ public class ServiceComponent implements
     private final String id;
     private final String name;
     private final String iconName;
-    private final HtmlViewerContext htmlViewerContext;
+    private final PathBuilder pathBuilder;
 
-    public ServiceComponent(final HtmlViewerContext htmlViewerContext, final String id, final String name, final String iconName) {
-        this.htmlViewerContext = htmlViewerContext;
+    public ServiceComponent(final PathBuilder pathBuilder, final String id, final String name, final String iconName) {
+        this.pathBuilder = pathBuilder;
         this.id = id;
         this.name = name;
         this.iconName = iconName;
@@ -56,7 +56,7 @@ public class ServiceComponent implements
     }
 
     protected String pathTo(final String prefix) {
-        return htmlViewerContext.pathTo(prefix);
+        return pathBuilder.pathTo(prefix);
     }
 
 }

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java Mon Nov 28 17:40:11 2011
@@ -21,14 +21,14 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Component;
 import org.apache.isis.viewer.html.component.ComponentComposite;
 
 class TableHeader extends ComponentComposite {
 
-    public TableHeader(HtmlViewerContext htmlViewerContext) {
-        super(htmlViewerContext);
+    public TableHeader(PathBuilder pathBuilder) {
+        super(pathBuilder);
     }
 
     @Override
@@ -39,6 +39,6 @@ class TableHeader extends ComponentCompo
     }
 
     public void addHeader(final String string) {
-        add(new Html(htmlViewerContext, string));
+        add(new Html(pathBuilder, string));
     }
 }

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java Mon Nov 28 17:40:11 2011
@@ -21,19 +21,19 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.ComponentAbstract;
 
 class TextBlock extends ComponentAbstract {
     StringBuffer buffer = new StringBuffer();
 
-    public TextBlock(HtmlViewerContext htmlViewerContext, final String text) {
-        super(htmlViewerContext);
+    public TextBlock(PathBuilder pathBuilder, final String text) {
+        super(pathBuilder);
         append(text);
     }
 
-    public TextBlock(HtmlViewerContext htmlViewerContext) {
-        super(htmlViewerContext);
+    public TextBlock(PathBuilder pathBuilder) {
+        super(pathBuilder);
     }
 
     public void append(final String string) {

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java?rev=1207478&r1=1207477&r2=1207478&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java (original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java Mon Nov 28 17:40:11 2011
@@ -24,15 +24,15 @@ package org.apache.isis.viewer.html.comp
 
 import java.io.PrintWriter;
 
-import org.apache.isis.viewer.html.HtmlViewerContext;
+import org.apache.isis.viewer.html.PathBuilder;
 import org.apache.isis.viewer.html.component.Component;
 
 final class UserSwapLink implements Component {
-    private final HtmlViewerContext htmlViewerContext;
+    private final PathBuilder pathBuilder;
     private final String name;
 
-    UserSwapLink(final HtmlViewerContext htmlViewerContext, final String name) {
-        this.htmlViewerContext = htmlViewerContext;
+    UserSwapLink(final PathBuilder pathBuilder, final String name) {
+        this.pathBuilder = pathBuilder;
         this.name = name;
     }
 
@@ -47,6 +47,6 @@ final class UserSwapLink implements Comp
     }
 
     protected String pathTo(final String prefix) {
-        return htmlViewerContext.pathTo(prefix);
+        return pathBuilder.pathTo(prefix);
     }
 }



Mime
View raw message