You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2013/03/28 11:35:25 UTC

[01/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Updated Branches:
  refs/heads/master 39500cd19 -> 91a8000ba


http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/logging.properties
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/logging.properties b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/logging.properties
new file mode 100644
index 0000000..50b23d7
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/logging.properties
@@ -0,0 +1,89 @@
+#  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.
+
+
+#
+# Isis uses log4j is used to provide system logging
+#
+log4j.rootCategory=INFO, Console
+
+# The console appender
+log4j.appender.Console=org.apache.log4j.ConsoleAppender
+log4j.appender.Console.target=System.out
+log4j.appender.Console.layout=org.apache.log4j.PatternLayout
+log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE}  [%-20c{1} %-10t %-5p]  %m%n
+
+log4j.appender.File=org.apache.log4j.RollingFileAppender
+log4j.appender.File.file=isis.log
+log4j.appender.File.append=false
+log4j.appender.File.layout=org.apache.log4j.PatternLayout
+log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p]  %m%n
+
+
+
+
+
+! turn on the internal log4j debugging flag so we can see what it is doing
+#log4j.debug=true
+
+
+log4j.logger.jdbc.sqlonly=DEBUG, sql, Console
+log4j.additivity.jdbc.sqlonly=false
+
+log4j.logger.jdbc.resultsettable=DEBUG, jdbc, Console
+log4j.additivity.jdbc.resultsettable=false
+
+
+
+log4j.logger.jdbc.audit=DEBUG,jdbc, Console
+log4j.additivity.jdbc.audit=false
+
+log4j.logger.jdbc.resultset=DEBUG,jdbc
+log4j.additivity.jdbc.resultset=false
+
+log4j.logger.jdbc.sqltiming=WARNING,sqltiming
+log4j.additivity.jdbc.sqltiming=false
+
+log4j.logger.jdbc.connection=FATAL,connection
+log4j.additivity.jdbc.connection=false
+
+
+
+log4j.appender.sql=org.apache.log4j.FileAppender
+log4j.appender.sql.File=./logs/sql.log
+log4j.appender.sql.Append=false
+log4j.appender.sql.layout=org.apache.log4j.PatternLayout
+log4j.appender.sql.layout.ConversionPattern=-----> %d{yyyy-MM-dd HH:mm:ss.SSS} %m%n%n
+
+log4j.appender.sqltiming=org.apache.log4j.FileAppender
+log4j.appender.sqltiming.File=./logs/sqltiming.log
+log4j.appender.sqltiming.Append=false
+log4j.appender.sqltiming.layout=org.apache.log4j.PatternLayout
+log4j.appender.sqltiming.layout.ConversionPattern=-----> %d{yyyy-MM-dd HH:mm:ss.SSS} %m%n%n
+
+log4j.appender.jdbc=org.apache.log4j.FileAppender
+log4j.appender.jdbc.File=./logs/jdbc.log
+log4j.appender.jdbc.Append=false
+log4j.appender.jdbc.layout=org.apache.log4j.PatternLayout
+log4j.appender.jdbc.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n
+
+log4j.appender.connection=org.apache.log4j.FileAppender
+log4j.appender.connection.File=./logs/connection.log
+log4j.appender.connection.Append=false
+log4j.appender.connection.layout=org.apache.log4j.PatternLayout
+log4j.appender.connection.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n
+

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/persistor_sql.properties
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/persistor_sql.properties b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/persistor_sql.properties
new file mode 100644
index 0000000..d3b04f9
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/persistor_sql.properties
@@ -0,0 +1,72 @@
+#  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.
+
+#
+# configuration file for the SQL objectstore
+#
+
+
+#
+# HSQLDB in-memory (using log4jdbc-remix)
+#
+#isis.persistor.sql.jdbc.driver=net.sf.log4jdbc.DriverSpy
+#isis.persistor.sql.jdbc.connection=jdbc:log4jdbc:hsqldb:mem:test
+#isis.persistor.sql.jdbc.user=sa
+#isis.persistor.sql.jdbc.password=
+
+
+#
+# HSQLDB (file)
+#
+isis.persistor.sql.jdbc.driver=org.hsqldb.jdbcDriver
+isis.persistor.sql.jdbc.connection=jdbc:hsqldb:mem:test
+isis.persistor.sql.jdbc.user=sa
+isis.persistor.sql.jdbc.password=
+
+
+
+#
+# HSQLDB (file)
+#
+#isis.persistor.sql.jdbc.driver=org.hsqldb.jdbcDriver
+#isis.persistor.sql.jdbc.connection=jdbc:hsqldb:file:hsql-db/tests
+#isis.persistor.sql.jdbc.user=sa
+#isis.persistor.sql.jdbc.password=
+
+
+#
+# configuration for MS SQL
+# (also edit pom.xml of objstore-mongodb)
+#
+#isis.persistor.sql.jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
+#isis.persistor.sql.jdbc.connection=jdbc:sqlserver://localhost:1433;databaseName=todoapp;integratedSecurity=true;
+#isis.persistor.sql.jdbc.user=sa
+#isis.persistor.sql.jdbc.password=
+
+
+#
+# configuration for Ingres
+# (also edit pom.xml of objstore-mongodb)
+#
+#isis.persistor.sql.jdbc.driver=com.ingres.jdbc.IngresDriver
+#isis.persistor.sql.jdbc.connection=jdbc:ingres://localhost:II7/todoapp
+##isis.persistor.sql.jdbc.user=NOTUSED_IF_localhost
+##isis.persistor.sql.jdbc.password=NOTUSED_IF_localhost
+#isis.persistor.sql.datatypes.datetime=TIMESTAMP
+#isis.persistor.sql.datatypes.timestamp=TIMESTAMP
+#isis.persistor.sql.datatypes.double=DOUBLE PRECISION
+

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/viewer_html.properties
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/viewer_html.properties b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/viewer_html.properties
new file mode 100644
index 0000000..d714f3e
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/viewer_html.properties
@@ -0,0 +1,31 @@
+#  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.
+
+#
+# configuration file for the HTML viewer
+#
+
+#
+# customization for the header and footer
+#
+isis.viewer.html.header=<div id="site-header"><div id="site-logo">&nbsp;</div></div>
+isis.viewer.html.footer=<div id="page-footer"><small>Powered by Apache Isis</small><div><small><a href="index.html">home</a>&nbsp;|&nbsp;<a href="index.shtml">scimpi</a>&nbsp;|&nbsp;<a href="services">rest</a>&nbsp;|&nbsp;<a href="mobile/index.html">mobile</a></small></div></div>
+
+#
+# stylesheet
+#
+isis.viewer.html.style-sheet=htmlviewer/style/default.css

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/web.xml b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..5739ebd
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<web-app id="WebApp_ID" version="2.4"
+    xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+    <display-name>Apache Isis Webapp</display-name>
+
+
+    <welcome-file-list>
+        <welcome-file>index.html</welcome-file>
+    </welcome-file-list>
+    
+    <context-param>
+        <param-name>deploymentType</param-name>
+        <!-- 
+        <param-value>SERVER</param-value>
+         -->
+        <param-value>SERVER_EXPLORATION</param-value>
+    </context-param>
+    
+    
+    
+    
+    <!--
+    -
+    -
+    - config common to all viewer(s)
+    -
+    -
+    -->
+    
+    <!-- bootstrap the Isis metamodel and runtime -->
+    <listener>
+        <listener-class>org.apache.isis.core.webapp.IsisWebAppBootstrapper</listener-class>
+    </listener>
+
+    <!-- which (optional) configuration file(s) to load -->
+    <context-param>
+        <param-name>isis.viewers</param-name>
+        <param-value>html</param-value>
+    </context-param>
+
+
+    <!-- which configuration directory to read overloaded property files from -->
+    <!-- 
+    Normally configuration like this should be done from outside your web 
+    application. Especially if your configuration is not know in advance or
+    if it can change depending on where the application gets deployed.
+    
+    For instance to configure this in Tomcat outside the application WAR add
+    the following line to your application context ( For more detail see:
+    http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Context_Parameters )
+     
+    <Parameter name="isis.config.dir" value="/usr/local/tomcat/conf/"
+         override="true"/>
+         
+    If your configuration directory is fixed you can enable the following 
+    context parameter in here and forget about the outside part.
+         
+    <context-param>
+      <param-name>isis.config.dir</param-name>
+      <param-value>location of your config directory if fixed</param-value>
+    </context-param>
+    -->
+
+    <!-- cache static resources for 1 day -->
+    <filter>
+        <filter-name>ResourceCachingFilter</filter-name>
+        <filter-class>org.apache.isis.core.webapp.content.ResourceCachingFilter</filter-class>
+        <init-param>
+            <param-name>CacheTime</param-name>
+            <param-value>86400</param-value>
+        </init-param>
+    </filter>
+    <filter-mapping>
+        <filter-name>ResourceCachingFilter</filter-name>
+        <url-pattern>*.js</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>ResourceCachingFilter</filter-name>
+        <url-pattern>*.css</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>ResourceCachingFilter</filter-name>
+        <url-pattern>*.png</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>ResourceCachingFilter</filter-name>
+        <url-pattern>*.jpg</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>ResourceCachingFilter</filter-name>
+        <url-pattern>*.gif</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>ResourceCachingFilter</filter-name>
+        <url-pattern>*.html</url-pattern>
+    </filter-mapping>
+    
+    <servlet>
+        <servlet-name>Resource</servlet-name>
+        <servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+        <url-pattern>*.css</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+        <url-pattern>*.png</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+        <url-pattern>*.jpg</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+        <url-pattern>*.gif</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+        <url-pattern>*.js</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+        <url-pattern>*.html</url-pattern>
+    </servlet-mapping>
+    
+
+
+
+
+    <!--
+    -
+    -
+    - config specific to the html-viewer
+    -
+    -
+    -->
+    <!-- determine the format of the paths of the links etc that it generates -->
+    <context-param>
+        <param-name>viewer-html.suffix</param-name>
+        <param-value>htmlviewer</param-value>
+    </context-param>
+
+    <!-- redirect requests to 'htmlviewer' to the HTML viewer's start page -->
+    <filter>
+        <filter-name>RedirectFilterForHtml</filter-name>
+        <filter-class>org.apache.isis.core.webapp.routing.RedirectFilter</filter-class>
+        <init-param>
+            <param-name>redirectTo</param-name>
+            <param-value>/start.htmlviewer</param-value>
+        </init-param>
+    </filter>
+    <filter-mapping>
+        <filter-name>RedirectFilterForHtml</filter-name>
+        <url-pattern>/htmlviewer</url-pattern>
+    </filter-mapping>
+
+    <!-- authenticate user, and set up an Isis Session -->
+    <filter>
+        <filter-name>IsisSessionFilterForHtml</filter-name>
+        <filter-class>org.apache.isis.core.webapp.IsisSessionFilter</filter-class>
+        <init-param>
+            <!-- lookup from cache, or if a logon filter was provided -->
+            <param-name>authenticationSessionStrategy</param-name>
+            <param-value>org.apache.isis.core.webapp.auth.AuthenticationSessionStrategyDefault</param-value>
+        </init-param>
+        <init-param>
+            <!-- what to do if no session was found; we indicate access only to a restricted list of paths -->
+            <param-name>whenNoSession</param-name>
+            <param-value>restricted</param-value>
+        </init-param>
+        <init-param>
+            <!-- the list of paths that are accessible if no session was found -->
+            <param-name>restricted</param-name>
+            <param-value>/logon.htmlviewer,/register.htmlviewer</param-value>
+        </init-param>
+    </filter>
+    <filter-mapping>
+        <filter-name>IsisSessionFilterForHtml</filter-name>
+        <servlet-name>HtmlLogin</servlet-name>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>IsisSessionFilterForHtml</filter-name>
+        <servlet-name>HtmlDispatcher</servlet-name>
+    </filter-mapping>
+
+    <servlet>
+        <servlet-name>HtmlLogon</servlet-name>
+        <servlet-class>org.apache.isis.viewer.html.servlet.LogonServlet</servlet-class>
+        <init-param>
+            <param-name>authenticationSessionStrategy</param-name>
+            <param-value>org.apache.isis.core.webapp.auth.AuthenticationSessionStrategyDefault</param-value>
+        </init-param>
+        <init-param>
+            <param-name>startPage</param-name>
+            <param-value>start.htmlviewer</param-value>
+        </init-param>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>HtmlLogon</servlet-name>
+        <url-pattern>/logon.htmlviewer</url-pattern>
+    </servlet-mapping>
+
+    <servlet>
+        <servlet-name>HtmlDispatcher</servlet-name>
+        <servlet-class>org.apache.isis.viewer.html.servlet.ControllerServlet</servlet-class>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>HtmlDispatcher</servlet-name>
+        <url-pattern>*.htmlviewer</url-pattern>
+    </servlet-mapping>
+	
+</web-app>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner-bg.png
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner-bg.png b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner-bg.png
new file mode 100644
index 0000000..c731c15
Binary files /dev/null and b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner-bg.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner.png
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner.png b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner.png
new file mode 100644
index 0000000..adf2159
Binary files /dev/null and b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/style/default.css
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/style/default.css b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/style/default.css
new file mode 100644
index 0000000..b5df867
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/style/default.css
@@ -0,0 +1,928 @@
+/*
+ *  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.
+ */
+/* Start Global styles */
+
+body {
+  background: #101254;
+  text-align: center;
+}
+#wrapper {
+  width: 980px;
+  min-height: 800px;
+  border:3px solid #7F81C0;
+  margin:8px auto;
+  text-align: left;
+  background: white;
+}
+
+.header-icon > img {
+	max-width: 40px;
+	height: 40px;
+    margin-top: 5px;
+}
+	
+BODY {
+	font-family: Arial, Sans-Serif;
+	margin: 0 0 10px 0;
+	color: black;
+}
+
+IMG {
+	border: 0;
+}
+
+A {
+	text-decoration: none;
+}
+
+A:hover {
+	text-decoration: underline;
+}
+
+/* End Global styles */ /* Start Heading */ 
+
+div#site-header:after {
+	bottom: 0px;
+	display: block;
+	text-align: right;
+	float:right;
+	bottom: 0;
+	font-size: 70%;
+	color: gray;
+}
+
+div#site-header {
+	background: url(../images/banner-bg.png); 
+	background-repeat: repeat-x white-space :   nowrap;
+	list-style: none;
+	margin: 0px;
+	height: 100px;
+}
+
+div#site-logo {
+	background: url(../images/banner.png);
+	background-repeat: no-repeat;
+	background-position: left;
+	position: absolute;
+	width: 980px;
+	height: 100px;
+	margin: 0 auto;
+}
+
+div#page-header {
+	/*display: none;*/
+}
+
+/* END Heading */
+DIV#body {
+	display: block;
+	padding-bottom: 10px;
+}
+
+div#navigation {
+	margin: 0;
+	padding: 0px;
+}
+
+/* Start options*/
+DIV.options {
+	background-color: #eeeeee;
+	margin: 0;
+	padding: 4px 0px 4px 5px;
+	min-height: 20px;
+	align: right;
+	float:right;
+}
+
+
+DIV.options H4 {
+	display: none;
+}
+
+DIV.options DIV.item {
+	display: inline;
+	border-right: 1px solid #000000;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #00000;
+	font-size: 70%;
+	margin: 0 6px 0 6px;
+	padding 0 0 0 0;
+	min-width: 200px;
+}
+
+DIV.options DIV.item IMG {
+	display: none;
+}
+
+DIV.options DIV.item a:link {
+	color: #000000;
+	text-decoration: none;
+	margin: 0 5px 0 0px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.options DIV.item a:hover {
+	background-color: #dddddd;
+	margin: 0 5px 0 0px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.options DIV.item a:visited {
+	color: #000000;
+	text-decoration: none;
+	margin: 0 5px 0 0px;
+	padding: 0 2px 0 0px;
+}
+
+/* End options */ 
+
+/* Start services */
+DIV.services {
+	background-color: #7F81C0;
+	margin: 0;
+	padding: 4px 20px 4px 5px;
+	min-height: 20px;
+
+}
+
+DIV.services H4 {
+	display: none;
+}
+
+DIV.services DIV.item {
+	display: inline;
+	border-right: 1px solid #ffffff;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #ffffff;
+	font-size: 70%;
+	margin: 3px;
+}
+
+DIV.services DIV.item IMG {
+	display: none;
+}
+
+DIV.services DIV.item a:link {
+	color: #ffffff;
+	text-decoration: none;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item a:hover {
+	background-color: #2683E2;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item a:visited {
+	color: #ffffff;
+	text-decoration: none;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item-selected {
+	background-color: #2683E2;
+	display: inline;
+	border-right: 1px solid #ffffff;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #ffffff;
+	font-size: 70%;
+}
+
+DIV.services DIV.item-selected a:link {
+	color: #ffffff;
+	text-decoration: none;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item-selected a:hover {
+	background-color: #556677;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item-selected a:visited {
+	color: #ffffff;
+	text-decoration: none;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+/* End services */ /* Start History */
+DIV.history {
+	background-color: #D6D6D6;
+	margin: 0;
+	padding: 1px 30px 0 5px;
+	min-height: 26px;
+}
+
+DIV.history H4 {
+	display: none;
+}
+
+DIV.history DIV.item {
+	display: inline;
+	border-right: 1px solid #ffffff;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #29357D;
+	font-size: 70%;
+}
+
+DIV.history DIV.item IMG {
+	position: relative;
+	top: 4px;
+	height: 16px;
+	padding: 0 5px 0 0px;
+}
+
+DIV.history DIV.item a:link {
+	color: #29357D;
+	text-decoration: none;
+	margin: 5px;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item a:hover {
+	background-color: #B7B6B6;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item a:visited {
+	color: #29357D;
+	text-decoration: none;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item-selected {
+	background-color: #2683E2;
+	display: inline;
+	border-right: 1px solid #ffffff;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #29357D;
+	font-size: 70%;
+	height: 30px;
+}
+
+DIV.history DIV.item-selected a:hover {
+	background-color: #556677;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item-selected a:link {
+	color: #29357D;
+	text-decoration: none;
+	margin: 10px;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item-selected a:visited {
+	color: #29357D;
+	text-decoration: none;
+	padding: 1px 3px 1px 3px;
+}
+
+/* INVISIBLE character for empty item. FIREFOX ONLY*/
+DIV.history:after {
+	content: "X";
+	display: inline;
+	text-align: right;
+	font-size: 70%;
+	color: #D6D6D6;
+}
+
+/* End History */ /* Start Context */
+div#context {
+	background-color: #F0F0F0;
+	margin: 0;
+	padding: 1px 30px 0 7px;
+	min-height: 26px;
+}
+
+div#context span.disabled {
+	display: inline;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #666666;
+	font-size: 70%;
+	padding: 0px 5px 0px 7px;
+	white-space: nowrap;
+}
+
+div#context span.disabled IMG {
+	display: none
+}
+
+div#context span.disabled a:link {
+	color: #29357D;
+	text-decoration: none;
+	margin: 5px;
+	padding: 1px 3px 1px 3px;
+}
+
+div#context span.disabled a:hover {
+	background-color: #B7B6B6;
+	padding: 1px 3px 1px 3px;
+}
+
+div#context span.disabled a:visited {
+	color: #29357D;
+	text-decoration: none;
+	padding: 1px 3px 1px 3px;
+}
+
+div#context a.linked {
+	display: inline;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #29357D;
+	font-size: 70%;
+	padding: 0px 5px 0px 7px;
+}
+
+div#context a.linked IMG {
+	display: none
+}
+
+div#context a.linked a:link {
+	color: #29357D;
+	text-decoration: none;
+	margin: 5px;
+	padding: 1px 3px 1px 3px;
+}
+
+div#context a.linked  a:hover {
+	background-color: #29357D;
+	padding: 1px 3px 1px 3px;
+	text-decoration: underline;
+}
+
+div#context a.linked  a:visited {
+	color: #29357D;
+	text-decoration: none;
+	padding: 1px 3px 1px 3px;
+}
+
+/* INVISIBLE character for empty breadcrumbs. FIREFOX ONLY*/
+span.disabled:after {
+	content: "X";
+	display: inline;
+	text-align: right;
+	font-size: 70%;
+	color: #F0F0F0;
+}
+
+/* End Context */ /*
+div#help-bar {
+	position: relative;
+	right: 50px;
+	top: 10px;
+	text-align: right; 
+	font-family : arial, 'sans serif'; 
+	font-weight : normal;  
+	color: #0000FF; 
+	font-size : 90%; 
+	line-height : 110%;
+	text-decoration: underline;
+	height: 22px;
+}
+*/
+#view {
+    min-height: 400px;
+}
+
+DIV#body DIV#view {
+	position: relative;
+	top: 0px;
+	left: 0px;
+	margin: 0px;
+}
+
+/* Start of Message Header */
+DIV.message-header {
+	position: relative;
+	top: 40px;
+	padding: 5px 25px 5px 25px;
+	margin: 0 50px 0 255px;
+	vertical-align: middle;
+	COLOR: #003366;
+	FONT-WEIGHT: bold;
+	FONT-SIZE: 80%;
+	LEFT: auto;
+	FONT-STYLE: normal;
+	FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
+	width: 40%;
+}
+
+DIV.message-header DIV.warning {
+	COLOR: #ff0033;
+	padding: 5px 25px 5px 25px;
+	background: url(default-images/sign-warning.png);
+	background-repeat: no-repeat;
+	background-color: #D6D6D6;
+	background-position: 5px 5px;
+}
+
+DIV.message-header DIV.message {
+	COLOR: #003366;
+	padding: 5px 25px 5px 25px;
+	background: url(default-images/sign-info.png);
+	background-repeat: no-repeat;
+	background-color: #D6D6D6;
+	background-position: 5px 5px;
+}
+
+DIV.message-header DIV.message {
+	FONT-WEIGHT: normal;
+}
+
+/* End of Message Header */ /* Start of Object Header */
+DIV.header {
+	position: relative;
+	top: 40px;
+	display: block;
+	background-color: #F0F0F0;
+	min-height: 48px;
+	margin: 0 50px 0 280px;
+
+}
+
+SPAN.header-icon IMG {
+	float: left;
+}
+
+SPAN.header-text {
+	float: left;
+	position: relative;
+	top: 10px;
+	margin-left: 7px;
+	FONT-WEIGHT: bold;
+	FONT-SIZE: 16px;
+	LEFT: auto;
+	COLOR: #003366;
+	FONT-STYLE: normal;
+	FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
+}
+
+/* End of Object Header */ /* Start of Object Contents */
+DIV#content {
+	position: relative;
+	display: block;
+	top: 40px;
+	margin: 0 50px 10px 280px;
+}
+
+/* Start of Object Fields */
+DIV.field {
+	margin: 0;
+	padding: 5px 0px 5px 0px;
+	border-top: 1px solid #666666;
+	min-height: 20px;
+}
+
+DIV.field SPAN.value IMG,DIV.field DIV.value IMG {
+	position: relative;
+	top: 3px;
+	margin: 0px 5px 0 0;
+	height: 16px;
+}
+
+DIV.field SPAN.value A,DIV.field DIV.value A {
+	position: relative;
+	top: -2px;
+	margin: 0px 5px 0 0;
+	height: 16px;
+}
+
+DIV.field DIV.icon IMG {
+	position: relative;
+	top: 0px;
+	margin: 0px 5px 0 0;
+	height: 16px;
+}
+
+.label,.value {
+	font-size: 80%;
+	color: #333399;
+}
+
+DIV.field DIV.icon {
+	display: inline;
+	color: #333399;
+	position: absolute;
+	left: 200px;
+}
+
+DIV.field span.label,DIV.field DIV.label {
+	width: 170px;
+	display: block;
+	/*content: ":";*/
+	margin: 0 0 -18px 7px;
+}
+
+DIV.field span.separator {
+	display: inline;
+	position: relative;
+	margin: 0 0 -15px 180px;
+	vertical-align: top;
+}
+
+DIV.field span.value, DIV.field DIV.value, DIV.field INPUT.value, DIV.field SELECT.value
+	{
+	top: -2px;
+	position: relative;
+	margin: 0px 10px -5px 0px;
+	display: inline;
+}
+
+DIV.field span.value PRE {
+	color: #333399;
+	margin: 0;
+	font-family: inherit;
+}
+
+
+DIV.field textarea.value {
+	font-family: inherit;
+}
+
+
+DIV.field span.optional {
+	margin: -35px 0 0 0;
+	font-size: 70%;
+	color: grey;
+}
+
+DIV.field span.required {
+	display: inline;
+	position: relative;
+	margin: 0;
+	vertical-align: top;
+	color: red;
+}
+
+DIV.field span.error {
+	display: inline;
+	position: relative;
+	color: red;
+	font-size: 70%;
+}
+
+/* INVISIBLE character for empty value FIREFOX ONLY*/
+DIV.field span.value:after {
+	content: "X";
+	display: inline;
+	text-align: right;
+	font-size: 70%;
+	color: white;
+}
+
+/* INVISIBLE character for empty value FIREFOX ONLY*/
+DIV.field span.label:after {
+	content: "X";
+	display: inline;
+	text-align: right;
+	font-size: 70%;
+	color: white;
+}
+
+/* End of Object Fields */ /* Start of Object Table */
+DIV#content TABLE {
+	position: relative;
+	float: left;
+	width: 100%;
+	border: 0;
+	margin: 0 0 10px 0;
+	border-collapse: collapse;
+}
+
+DIV#content TH {
+	padding: 6px;
+	border: 1px solid #ffffff;
+	background-color: #D6D6D6;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: black;
+	font-size: 70%;
+}
+
+DIV#content TD {
+	background-color: #ffffff;
+	border-right: 0;
+	border-left: 0;
+	border-bottom: 1px solid black;
+	padding: 6px;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	font-size: 80%;
+	color: #333399;
+	margin: 0;
+	text-align: left;
+}
+
+DIV#content TD.rowstart {
+	background-color: #F0F0F0;
+}
+
+DIV#content TD A:visited {
+	color: #0000FF;
+}
+
+DIV#content H4 {
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #000000;
+	font-size: 70%;
+	border-top: 1px solid black;
+	margin: -2px 0 0 0px;
+	padding: 5px;
+}
+
+TD DIV.icon {
+	font-size: 100%;
+	margin-top: 5px;
+}
+
+TD DIV.icon IMG {
+	float: left;
+	margin: -1px 5px 5px 0px;
+	height: 16px;
+}
+
+TD DIV.action-button {
+	background-color: #ffffff;
+	font-size: 130%;
+	text-decoration: none;
+}
+
+/* End of Object Table */
+INPUT.action-button,DIV.action-button {
+	background-color: #F0F0F0;
+	padding: 10px;
+	display: block;
+	margin: 0;
+	min-height: 20px;
+}
+
+INPUT.action-button,DIV.action-button A {
+	background: url(default-images/bg-button.gif);
+	background-repeat: repeat-x;
+	padding: 2px;
+	margin: 5px;
+	border: 1px solid #333399;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #000000;
+	font-size: 70%;
+	font-weight: normal;
+	text-align: center;
+}
+
+DIV.action-button a:link {
+	color: #000000;
+}
+
+DIV.action-button a:visited {
+	color: #000000;
+}
+
+DIV.action-button a:hover {
+	color: #000000;
+	text-decoration: none;
+}
+
+INPUT.action-button,DIV.action-button INPUT {
+	float: left;
+}
+
+/* End of Object Contents */ /* Start of Object Actions Menu */
+DIV#body DIV#view DIV#menu {
+	position: relative;
+	top: 40px;
+	left: 0;
+	background-color: #ffffff;
+	border-top: 1px solid #00336F;
+	margin: 0px;
+	width: 210px;
+	display: block;
+	float: left;
+}
+
+DIV#body DIV#menu H3 {
+	display: none;
+}
+
+DIV#menu SPAN.name {
+	display: block;
+	font-size: 80%;
+	background-color: #ffffff;
+	color: #333399;
+	line-height: 100%;
+	margin: 0 0 0 10px;
+}
+
+DIV.menu-item  a:link {
+	color: #333399;
+}
+
+DIV.menu-item  a:visited {
+	color: #333399;
+}
+
+DIV.submenu-item {
+	font-size: 80%;
+	background-color: #ffffff;
+	color: #1A59A7;
+	margin: 0px;
+	padding: 5px 0px 5px 10px;
+	border-bottom: 1px solid #00336F;
+	line-height: 100%;
+}
+
+DIV.submenu-item DIV.menu-item {
+	background: url(default-images/submenu-bullet.gif);
+	background-repeat: no-repeat;
+	background-position: left;
+	background-color: #ffffff;
+	margin: 0px;
+	line-height: 100%;
+	border: 0;
+	padding: 4px 5px 0px 10px;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #1A59A7;
+	font-size: 85%;
+}
+
+DIV.menu-item {
+	background-color: #ffffff;
+	margin: 0px;
+	line-height: 110%;
+	border-bottom: 1px solid #00336F;
+	padding: 5px 5px 5px 10px;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #1A59A7;
+	font-size: 80%;
+}
+
+DIV.menu-item DIV.disabled {
+	color: #a0a0a0;
+}
+
+DIV.menu-item a:link {
+	color: #1A59A7;
+}
+
+DIV.menu-item a:visited {
+	color: #1A59A7;
+}
+
+DIV.menu-item a:hover {
+	color: #006666;
+	text-decoration: underline;
+}
+
+DIV.submenu-item DIV.menu-item a:link {
+	color: #1A59A7;
+}
+
+DIV.submenu-item DIV.menu-item a:visited {
+	color: #1A59A7;
+}
+
+DIV.submenu-item DIV.menu-item a:hover {
+	color: #006666;
+	text-decoration: underline;
+}
+
+/* End of Object Menu */
+DIV.page-footer {
+	right: 10px;
+	bottom: 10px;
+	font-size: 50%;
+	color: #333399;
+}
+
+H1 {
+	font-size: 140%;
+	margin-top: -8px;
+}
+
+H2 {
+	font-size: 90%;
+	color: #333399;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 0;
+}
+
+H3 {
+	font-size: 80%;
+	color: #ffffff;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 15px 10px 5px 10px;
+}
+
+H4 {
+	font-size: 80%;
+	color: #333399;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 10px 10px 0px 10px;
+}
+
+DIV.text {
+	font-size: 100%;
+	color: #336699;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 10px 10px 0px 10px;
+}
+
+DIV.error {
+	font-size: 120%;
+	color: #cc0000;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 10px 10px 0px 10px;
+}
+
+PRE.error-trace {
+	font-size: 80%;
+	color: #cc0000;
+	margin: 10px 10px 0px 10px;
+}
+
+DIV#debug { /*	float: left;*/
+	background-color: #F0F0F0;
+	margin: 30px;
+	padding: 1px 10px 0 7px;
+	min-height: 22px;
+	border: 1px;
+}
+
+DIV#debug H4 {
+	display: inline;
+	font-size: 80%;
+	color: #999;
+	margin: 0 5px 0 10px;
+}
+
+DIV#debug DIV.detail {
+	display: inline;
+	font-size: 80%;
+	color: #999;
+	margin: 0 5px 0 10px;
+}
+
+SPAN.message {
+	position: relative;
+	top: 30px;
+	font-size: 100%;
+	color: #336699;
+	margin: 40px 0 0 0;
+	padding: 10px;
+}
+
+
+SPAN.about {
+	display: block;
+	padding: 4px;
+}
+
+
+SPAN.user {
+	display: block;
+	padding: 4px;
+}
+
+.nav-link {
+    display: block;
+    padding: 10px;
+    font-size: 75%;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 160b593..7d66971 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,12 +59,9 @@
                 <module>component/profilestore/sql</module>
         
                 <module>component/security/file</module>
-                <module>component/security/ldap</module>
-                <module>component/security/sql</module>
                 <module>component/security/shiro</module>
         
                 <module>component/viewer/dnd</module>
-                <module>component/viewer/html</module>
                 <module>component/viewer/scimpi</module>
                 <module>component/viewer/wicket</module>
                 <module>component/viewer/restfulobjects</module>
@@ -72,7 +69,6 @@
                 <module>component/viewer/junit</module>
         
                 <module>example/application/claims</module>
-                <module>example/application/quickstart_html_sql</module>
                 <module>example/application/quickstart_scimpi_nosql</module>
                 <module>example/application/quickstart_dnd_junit_bdd</module>
                 <module>example/application/quickstart_wicket_restful_jdo</module>


[13/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapCollection.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapCollection.java b/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapCollection.java
deleted file mode 100644
index b1cf314..0000000
--- a/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapCollection.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- *  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.context;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.not;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
-
-import java.util.List;
-
-import com.google.common.collect.Lists;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.adapter.oid.Oid;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.core.tck.dom.refs.SimpleEntity;
-import org.apache.isis.viewer.html.action.ActionException;
-
-public class ContextTest_mapCollection {
-
-    @Rule
-    public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
-    private Context context;
-
-    @Before
-    public void setUp() throws Exception {
-        Logger.getRootLogger().setLevel(Level.OFF);
-        context = new Context(null);
-    }
-
-    @Test
-    public void getMappedCollection_forNonExistentId() {
-
-
-        try {
-            assertNull(context.getMappedCollection("NON-EXISTENT-ID"));
-            fail();
-        } catch (final ActionException ex) {
-            // expected
-        }
-    }
-
-    @Test
-    public void mapCollection_then_getMappedCollection() throws Exception {
-
-        // given
-        iswf.persist(iswf.fixtures.smpl1);
-        iswf.persist(iswf.fixtures.smpl2);
-
-        final List<SimpleEntity> collection = Lists.newArrayList();
-        collection.add(iswf.fixtures.smpl1);
-        collection.add(iswf.fixtures.smpl2);
-        
-        final Oid oid1 = getAdapterManager().adapterFor(iswf.fixtures.smpl1).getOid();
-        final Oid oid2 = getAdapterManager().adapterFor(iswf.fixtures.smpl2).getOid();
-        
-        final ObjectAdapter collectionAdapter = getAdapterManager().adapterFor(collection);
-        final String id = context.mapCollection(collectionAdapter);
-        
-        iswf.bounceSystem();
-
-        // when
-        final ObjectAdapter mappedCollection = context.getMappedCollection(id);
-        
-        // then
-        final List<?> list = (List<?>) mappedCollection.getObject();
-
-        final Oid oid1Remapped = getAdapterManager().adapterFor(list.get(0)).getOid();
-        final Oid oid2Remapped = getAdapterManager().adapterFor(list.get(1)).getOid();
-        assertEquals(oid1, oid1Remapped);
-        assertEquals(oid2, oid2Remapped);
-    }
-
-    
-
-    @Test
-    public void testRegisteredCollectionReturnSameIdentityForSameCollection() {
-        
-        // given
-        iswf.persist(iswf.fixtures.smpl1);
-        iswf.persist(iswf.fixtures.smpl2);
-
-        final List<SimpleEntity> collection = Lists.newArrayList();
-        collection.add(iswf.fixtures.smpl1);
-        collection.add(iswf.fixtures.smpl2);
-        
-        final ObjectAdapter collectionAdapter = getAdapterManager().adapterFor(collection);
-        
-        // when
-        final String id = context.mapCollection(collectionAdapter);
-        final String id2 = context.mapCollection(collectionAdapter);
-        
-        // then
-        assertEquals(id, id2);
-    }
-
-    @Test
-    public void testRegisteredCollectionReturnDifferentIdentityForDifferentCollection() {
-
-        // given
-        iswf.persist(iswf.fixtures.smpl1);
-        iswf.persist(iswf.fixtures.smpl2);
-
-        final List<SimpleEntity> collection1 = Lists.newArrayList();
-        collection1.add(iswf.fixtures.smpl1);
-        final ObjectAdapter collection1Adapter = getAdapterManager().adapterFor(collection1);
-
-        final List<SimpleEntity> collection2 = Lists.newArrayList();
-        collection2.add(iswf.fixtures.smpl2);
-        final ObjectAdapter collection2Adapter = getAdapterManager().adapterFor(collection2);
-
-        // when
-        final String id = context.mapCollection(collection1Adapter);
-        final String id2 = context.mapCollection(collection2Adapter);
-        
-        // then
-        assertThat(id, not(equalTo(id2)));
-    }
-
-    
-    private PersistenceSession getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
-    }
-
-    private AdapterManager getAdapterManager() {
-        return getPersistenceSession().getAdapterManager();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapObject.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapObject.java b/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapObject.java
deleted file mode 100644
index 1f8dc06..0000000
--- a/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapObject.java
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- *  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.context;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.ResolveState;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.adapter.oid.Oid;
-import org.apache.isis.core.metamodel.adapter.version.Version;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.viewer.html.action.ActionException;
-
-public class ContextTest_mapObject {
-
-    @Rule
-    public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
-    private ObjectAdapter originalAdapter;
-    private Oid oid;
-    private ObjectAdapter restoredAdapter;
-
-    private Context context;
-
-    @Before
-    public void setUp() throws Exception {
-        Logger.getRootLogger().setLevel(Level.OFF);
-        context = new Context(null);
-    }
-    
-    @Test
-    public void mapObject_then_restoreAllObjectsToLoader() throws Exception {
-
-        // given
-        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
-        oid = originalAdapter.getOid();
-        context.mapObject(originalAdapter);
-        
-        iswf.bounceSystem();
-        
-        // when
-        context.restoreAllObjectsToLoader();
-        restoredAdapter = getAdapterManager().getAdapterFor(oid);
-
-        assertNotNull("loaders is missing the object", getAdapterManager().getAdapterFor(oid));
-        assertNotSame("expect the loader to have a new adapter", originalAdapter, restoredAdapter);
-        
-        // then
-        assertEquals(originalAdapter.getOid(), restoredAdapter.getOid());
-        assertNotSame(originalAdapter, restoredAdapter);
-        assertEquals(originalAdapter.getObject().getClass(), restoredAdapter.getObject().getClass());
-        assertEquals(originalAdapter.getVersion(), restoredAdapter.getVersion());
-        assertEquals(ResolveState.TRANSIENT, restoredAdapter.getResolveState());
-    }
-
-    
-    @Test
-    public void mapObject_forTransient_then_getMappedObject_byId() {
-
-        // given
-        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
-        oid = originalAdapter.getOid();
-        final String id = context.mapObject(originalAdapter);
-        
-        // when
-        restoredAdapter = context.getMappedObject(id);
-        
-        // then
-        assertEquals(originalAdapter, restoredAdapter);
-    }
-
-
-    @Test
-    public void mapObject_forPersistent_then_getMappedObject_byId() {
-
-        // given
-        iswf.persist(iswf.fixtures.smpl1);
-
-        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
-        oid = originalAdapter.getOid();
-        final String id = context.mapObject(originalAdapter);
-        
-        // when
-        restoredAdapter = context.getMappedObject(id);
-        
-        // then
-        assertEquals(originalAdapter, restoredAdapter);
-    }
-
-
-    @Test
-    public void getMappedObject_forPersistent_whenChanged() throws Exception {
-
-        // given
-        iswf.persist(iswf.fixtures.smpl1);
-        
-        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
-        final Oid oid = originalAdapter.getOid();
-        final String id = context.mapObject(originalAdapter);
-        
-        final Version version = originalAdapter.getVersion();
-        
-        iswf.fixtures.smpl1.setName("changed date");
-        iswf.bounceSystem(); // does a commit, which will bump the version
-        
-        originalAdapter = getAdapterManager().getAdapterFor(oid);
-        
-        final Version version2 = originalAdapter.getVersion();
-        
-        assertThat(version.different(version2), is(true));
-        
-        
-        // when
-        restoredAdapter = context.getMappedObject(id);
-        final String message = context.getMessage(1);
-        
-        // then
-        assertEquals("Reloaded object " + restoredAdapter.titleString(), message);
-    }
-
-    
-    @Test
-    public void mapObject_forTransient_alwaysReturnsSameId() {
-
-        // given
-        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
-        
-        // when
-        final String id = context.mapObject(originalAdapter);
-        final String id2 = context.mapObject(originalAdapter);
-        
-        // then
-        assertEquals(id, id2);
-    }
-
-    
-    @Test
-    public void mapObject_forPersistent_alwaysReturnsSameId() {
-
-        // given
-        iswf.persist(iswf.fixtures.smpl1);
-        
-        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
-        
-        // when
-        final String id = context.mapObject(originalAdapter);
-        final String id2 = context.mapObject(originalAdapter);
-        
-        // then
-        assertEquals(id, id2);
-    }
-
-    
-    @Test
-    public void mapObject_forTransient_returnsDifferentIdsForDifferentObjects() {
-
-        // when
-        final String id = context.mapObject(getAdapterManager().adapterFor(iswf.fixtures.smpl1));
-        final String id2 = context.mapObject(getAdapterManager().adapterFor(iswf.fixtures.smpl2));
-        
-        // then
-        assertThat(id, not(equalTo(id2)));
-    }
-
-
-    @Test
-    public void mapObject_forPersistent_returnsDifferentIdsForDifferentObjects() {
-
-        // given
-        iswf.persist(iswf.fixtures.smpl1);
-        iswf.persist(iswf.fixtures.smpl2);
-        
-        // when
-        final String id = context.mapObject(getAdapterManager().adapterFor(iswf.fixtures.smpl1));
-        final String id2 = context.mapObject(getAdapterManager().adapterFor(iswf.fixtures.smpl2));
-        
-        // then
-        assertThat(id, not(equalTo(id2)));
-    }
-
-    
-    @Test
-    public void restoreAllObjectsToLoader_restoredAsGhosts() throws Exception {
-
-        // given
-        iswf.persist(iswf.fixtures.smpl1);
-        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
-        oid = originalAdapter.getOid();
-        
-        iswf.bounceSystem();
-        
-        // when
-        context.restoreAllObjectsToLoader();
-        
-        // then
-        restoredAdapter = getAdapterManager().getAdapterFor(oid);
-        
-        assertEquals("expect versions to match", originalAdapter.getVersion(), restoredAdapter.getVersion());
-        assertEquals(ResolveState.GHOST, restoredAdapter.getResolveState());
-    }
-
-    
-    
-    @Test
-    public void testExceptionThrownWhenNoActionForIdentity() {
-        
-        iswf.persist(iswf.fixtures.smpl1);
-        iswf.persist(iswf.fixtures.smpl2);
-        
-        // when
-        context.mapObject(getAdapterManager().adapterFor(iswf.fixtures.smpl1));
-
-        try {
-            assertNull(context.getMappedObject("NON-EXISTENT-ID"));
-            fail();
-        } catch (final ActionException ex) {
-            // expected
-        }
-    }
-
-    
-
-    private PersistenceSession getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
-    }
-
-    private AdapterManager getAdapterManager() {
-        return getPersistenceSession().getAdapterManager();
-    }
-
-}
-

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_serialization.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_serialization.java b/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_serialization.java
deleted file mode 100644
index 1ef838f..0000000
--- a/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_serialization.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *  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.context;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.jmock.Expectations;
-import org.jmock.auto.Mock;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
-import org.apache.isis.viewer.html.HtmlViewerConstants;
-import org.apache.isis.viewer.html.PathBuilder;
-import org.apache.isis.viewer.html.PathBuilderDefault;
-import org.apache.isis.viewer.html.component.ComponentFactory;
-import org.apache.isis.viewer.html.component.html.HtmlComponentFactory;
-
-public class ContextTest_serialization {
-
-    @Rule
-    public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
-    @Rule
-    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_ONLY);
-    
-    @Mock
-    private IsisConfiguration isisConfiguration;
-    
-    private ComponentFactory factory;
-    private PathBuilder pathBuilder;
-    
-    private Context viewerContext;
-
-    @Before
-    public void setUp() throws Exception {
-        Logger.getRootLogger().setLevel(Level.OFF);
-        
-        pathBuilder = new PathBuilderDefault("shtml");
-        context.checking(new Expectations() {
-            {
-                allowing(isisConfiguration).getString(HtmlViewerConstants.STYLE_SHEET);
-                will(returnValue("someStyleSheet.css"));
-
-                allowing(isisConfiguration).getString(HtmlViewerConstants.HEADER_FILE);
-                will(returnValue(null));
-
-                allowing(isisConfiguration).getString(HtmlViewerConstants.HEADER);
-                will(returnValue("<div></div>"));
-
-                allowing(isisConfiguration).getString(HtmlViewerConstants.FOOTER_FILE);
-                will(returnValue(null));
-
-                allowing(isisConfiguration).getString(HtmlViewerConstants.FOOTER);
-                will(returnValue("<div></div>"));
-            }
-        });
-
-        factory = new HtmlComponentFactory(pathBuilder, isisConfiguration);
-        
-        viewerContext = new Context(factory);
-    }
-
-
-    @Test
-    public void writeObject() throws IOException {
-        OutputStream baos = new ByteArrayOutputStream();
-        final ObjectOutputStream objectOutputStream = new ObjectOutputStream(baos);
-        objectOutputStream.writeObject(viewerContext);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ObjectActionNoop.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ObjectActionNoop.java b/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ObjectActionNoop.java
deleted file mode 100644
index 2927c28..0000000
--- a/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ObjectActionNoop.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- *  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.context;
-
-import java.util.List;
-
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.applib.annotation.ActionSemantics;
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.filter.Filter;
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.consent.Allow;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
-import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.facetapi.FeatureType;
-import org.apache.isis.core.metamodel.facetapi.MultiTypedFacet;
-import org.apache.isis.core.metamodel.interactions.ActionInvocationContext;
-import org.apache.isis.core.metamodel.interactions.UsabilityContext;
-import org.apache.isis.core.metamodel.interactions.VisibilityContext;
-import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
-import org.apache.isis.core.metamodel.spec.ActionType;
-import org.apache.isis.core.metamodel.spec.Instance;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
-
-/**
- * Has no functionality but makes it easier to write tests that require an
- * instance of an {@link Identifier}.
- * 
- * <p>
- * Was previously DummyAction, in the web viewer project. Only used by tests
- * there.
- */
-public class ObjectActionNoop implements ObjectAction {
-
-    public boolean[] canParametersWrap() {
-        return null;
-    }
-
-    @Override
-    public String debugData() {
-        return null;
-    }
-
-    @Override
-    public ObjectAdapter execute(final ObjectAdapter target, final ObjectAdapter[] parameters) {
-        return null;
-    }
-
-    @Override
-    public List<ObjectAction> getActions() {
-        return null;
-    }
-
-    @Override
-    public ObjectAdapter[] getDefaults(final ObjectAdapter target) {
-        return null;
-    }
-
-    @Override
-    public String getDescription() {
-        return null;
-    }
-
-    @Override
-    public boolean containsFacet(final Class<? extends Facet> facetType) {
-        return false;
-    }
-
-    @Override
-    public boolean containsDoOpFacet(final Class<? extends Facet> facetType) {
-        return false;
-    }
-
-    @Override
-    public <T extends Facet> T getFacet(final Class<T> cls) {
-        return null;
-    }
-
-    @Override
-    public Class<? extends Facet>[] getFacetTypes() {
-        return new Class[0];
-    }
-
-    @Override
-    public List<Facet> getFacets(final Filter<Facet> filter) {
-        return null;
-    }
-
-    @Override
-    public void addFacet(final Facet facet) {
-    }
-
-    @Override
-    public void addFacet(final MultiTypedFacet facet) {
-    }
-
-    @Override
-    public void removeFacet(final Facet facet) {
-    }
-
-    @Override
-    public void removeFacet(final Class<? extends Facet> facetType) {
-    }
-
-    @Override
-    public Identifier getIdentifier() {
-        return null;
-    }
-
-    @Override
-    public String getHelp() {
-        return null;
-    }
-
-    @Override
-    public String getId() {
-        return null;
-    }
-
-    @Override
-    public String getName() {
-        return null;
-    }
-
-    @Override
-    public ObjectSpecification getOnType() {
-        return null;
-    }
-
-    @Override
-    public ObjectAdapter[][] getChoices(final ObjectAdapter target) {
-        return null;
-    }
-
-    @Override
-    public int getParameterCount() {
-        return 0;
-    }
-
-    @Override
-    public List<ObjectActionParameter> getParameters() {
-        return null;
-    }
-
-    @Override
-    public List<ObjectActionParameter> getParameters(final Filter<ObjectActionParameter> filter) {
-        return null;
-    }
-
-    @Override
-    public ObjectActionParameter getParameterById(final String paramId) {
-        return null;
-    }
-
-    @Override
-    public ObjectActionParameter getParameterByName(final String paramName) {
-        return null;
-    }
-
-    @Override
-    public ObjectSpecification getReturnType() {
-        return null;
-    }
-
-    @Override
-    public ActionType getType() {
-        return null;
-    }
-
-    @Override
-    public boolean hasReturn() {
-        return false;
-    }
-
-    @Override
-    public boolean isContributed() {
-        return false;
-    }
-
-    @Override
-    public boolean promptForParameters(final ObjectAdapter target) {
-        return false;
-    }
-
-    @Override
-    public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter targetObjectAdapter, Where where) {
-        return null;
-    }
-
-    @Override
-    public boolean isAlwaysHidden() {
-        return false;
-    }
-
-    @Override
-    public Consent isVisible(final AuthenticationSession session, final ObjectAdapter target, Where where) {
-        return Allow.DEFAULT;
-    }
-
-    @Override
-    public Consent isUsable(final AuthenticationSession session, final ObjectAdapter target, Where where) {
-        return Allow.DEFAULT;
-    }
-
-    @Override
-    public Consent isProposedArgumentSetValid(final ObjectAdapter object, final ObjectAdapter[] parameters) {
-        return Allow.DEFAULT;
-    }
-
-    @Override
-    public ObjectAdapter realTarget(final ObjectAdapter target) {
-        return target;
-    }
-
-    @Override
-    public ObjectSpecification getSpecification() {
-        return null;
-    }
-
-    @Override
-    public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, Where where) {
-        return null;
-    }
-
-    @Override
-    public ActionInvocationContext createActionInvocationInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter object, final ObjectAdapter[] candidateArguments) {
-        return null;
-    }
-
-    // /////////////////////////////////////////////////////////////
-    // isAction, isAssociation
-    // /////////////////////////////////////////////////////////////
-
-    @Override
-    public boolean isAction() {
-        return true;
-    }
-
-    @Override
-    public boolean isPropertyOrCollection() {
-        return false;
-    }
-
-    @Override
-    public boolean isOneToManyAssociation() {
-        return false;
-    }
-
-    @Override
-    public boolean isOneToOneAssociation() {
-        return false;
-    }
-
-    // /////////////////////////////////////////////////////////////
-    // getInstance
-    // /////////////////////////////////////////////////////////////
-
-    @Override
-    public Instance getInstance(final ObjectAdapter adapter) {
-        final ObjectAction specification = this;
-        return adapter.getInstance(specification);
-    }
-
-    @Override
-    public List<ObjectSpecification> getParameterTypes() {
-        return null;
-    }
-
-    public RuntimeContext getRuntimeContext() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.apache.isis.core.metamodel.spec.feature.ObjectFeature#getFeatureType
-     * ()
-     */
-    @Override
-    public FeatureType getFeatureType() {
-        return FeatureType.ACTION;
-    }
-
-    @Override
-    public ActionSemantics.Of getSemantics() {
-        return ActionSemantics.Of.NON_IDEMPOTENT;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/request/ImageProviderResourceBasedTest.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/request/ImageProviderResourceBasedTest.java b/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/request/ImageProviderResourceBasedTest.java
deleted file mode 100644
index 5bcb836..0000000
--- a/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/request/ImageProviderResourceBasedTest.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *  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.request;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import org.apache.isis.viewer.html.image.ImageProviderResourceBased;
-
-public class ImageProviderResourceBasedTest {
-
-    private ImageProviderResourceBased imageProvider;
-
-    @Before
-    public void setUp() {
-        imageProvider = new ImageProviderResourceBased();
-    }
-
-    @After
-    public void tearDown() {
-        imageProvider = null;
-    }
-
-    @Test
-    public void canFindDefaultExplicitly() {
-        assertThat(imageProvider.image("Default"), equalTo("images/Default.png"));
-    }
-
-    @Test
-    public void nonExistentImageUsesDefault() {
-        assertThat(imageProvider.image("NonExistent"), equalTo("images/Default.png"));
-    }
-
-    @Test
-    public void nonDefaultPngExistingImageIsReturned() {
-        assertThat(imageProvider.image("Service"), equalTo("images/Service.png"));
-    }
-
-    @Test
-    public void nonDefaultGifExistingImageIsReturned() {
-        assertThat(imageProvider.image("Customer"), equalTo("images/Customer.gif"));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/test/resources/images/Customer.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/test/resources/images/Customer.gif b/component/viewer/html/impl/src/test/resources/images/Customer.gif
deleted file mode 100644
index dde9be8..0000000
Binary files a/component/viewer/html/impl/src/test/resources/images/Customer.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/test/resources/images/Service.png
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/test/resources/images/Service.png b/component/viewer/html/impl/src/test/resources/images/Service.png
deleted file mode 100644
index 6e52db7..0000000
Binary files a/component/viewer/html/impl/src/test/resources/images/Service.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/pom.xml
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/pom.xml b/component/viewer/html/monitoring/pom.xml
deleted file mode 100644
index 32cb724..0000000
--- a/component/viewer/html/monitoring/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>org.apache.isis.viewer</groupId>
-		<artifactId>isis-viewer-html</artifactId>
-		<version>1.0.0-SNAPSHOT</version>
-	</parent>
-
-	<artifactId>isis-viewer-html-monitoring</artifactId>
-	<name>Isis HTML Viewer Monitoring</name>
-
-	<properties>
-    </properties>
-
-    <url>http://isis.apache.org/${relativeUrl}</url>
-
-	<dependencies>
-
-		<dependency>
-			<groupId>org.apache.isis.core</groupId>
-			<artifactId>isis-core-runtime</artifactId>
-		</dependency>
-
-	    <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_2.5_spec</artifactId>
-		    <scope>provided</scope>
-        </dependency>
-
-	</dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/MonitorServlet.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/MonitorServlet.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/MonitorServlet.java
deleted file mode 100644
index 1642a84..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/MonitorServlet.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *  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.monitoring;
-
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.net.URLDecoder;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.isis.viewer.html.monitoring.servermonitor.MonitorListenerImpl;
-
-public class MonitorServlet extends HttpServlet {
-    private static final long serialVersionUID = 1L;
-    private MonitorListenerImpl monitor;
-
-    @Override
-    protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
-        final String queryString = request.getQueryString();
-        final String query = queryString == null ? "Overview" : URLDecoder.decode(queryString, "UTF-8");
-        response.setContentType("text/html");
-        final PrintWriter writer = new PrintWriter(new OutputStreamWriter(response.getOutputStream()));
-        if (query.equals("Sessions")) {
-            writer.println("<HTML><HEAD><TITLE>NOF System Monitor - " + "Sessions" + "</TITLE></HEAD>");
-            writer.println("<BODY>");
-
-            writer.println("<h1>" + "Sessions" + "</h1>");
-            writer.println("<pre>");
-            writer.println(listSessions());
-            writer.println("</pre>");
-            writer.println("</BODY></HTML>");
-        } else {
-            monitor.writeHtmlPage(query, writer);
-        }
-        writer.flush();
-    }
-
-    private static String listSessions() {
-        final StringBuffer str = new StringBuffer();
-        /*
-         * final Iterator<?> it = SessionAccess.getSessions().iterator(); while
-         * (it.hasNext()) { final HttpSession session = (HttpSession) it.next();
-         * final String id = session.getId(); str.append(id); str.append(" \t");
-         * 
-         * final long creationTime = session.getCreationTime(); str.append(new
-         * Date(creationTime)); str.append(" \t");
-         * 
-         * final long lastAccessedTime = session.getLastAccessedTime();
-         * str.append(new Date(lastAccessedTime)); str.append(" \t");
-         * 
-         * final AuthenticationSession nofSession = (AuthenticationSession)
-         * session.getAttribute("NOF_SESSION_ATTRIBUTE"); if (nofSession !=
-         * null) { str.append(nofSession.getUserName()); }
-         * 
-         * str.append("\n"); }
-         */
-        return str.toString();
-    }
-
-    @Override
-    public void init(final ServletConfig servletConfig) throws ServletException {
-        super.init(servletConfig);
-        monitor = new MonitorListenerImpl();
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/WebServerMonitorInstaller.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/WebServerMonitorInstaller.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/WebServerMonitorInstaller.java
deleted file mode 100644
index bf2d9d2..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/WebServerMonitorInstaller.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *  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.monitoring;
-
-import org.apache.isis.core.runtime.installerregistry.installerapi.IsisViewerInstallerAbstract;
-import org.apache.isis.core.runtime.viewer.IsisViewer;
-import org.apache.isis.core.runtime.viewer.web.WebAppSpecification;
-import org.apache.isis.core.runtime.web.EmbeddedWebViewer;
-
-public class WebServerMonitorInstaller extends IsisViewerInstallerAbstract {
-
-    public WebServerMonitorInstaller() {
-        super("web-monitor");
-    }
-
-    @Override
-    public IsisViewer doCreateViewer() {
-        return new EmbeddedWebViewer() {
-            @Override
-            public WebAppSpecification getWebAppSpecification() {
-                final WebAppSpecification requirements = new WebAppSpecification();
-                requirements.addServletSpecification(MonitorServlet.class, "/monitor/*");
-                return requirements;
-            }
-        };
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/AbstractServerMonitor.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/AbstractServerMonitor.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/AbstractServerMonitor.java
deleted file mode 100644
index ad1e1f1..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/AbstractServerMonitor.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- *  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.monitoring.servermonitor;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketTimeoutException;
-import java.net.UnknownHostException;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.core.commons.config.ConfigurationConstants;
-import org.apache.isis.core.runtime.services.InitialisationException;
-import org.apache.isis.core.runtime.system.IsisSystem;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-public abstract class AbstractServerMonitor {
-    private static final Logger LOG = Logger.getLogger(AbstractServerMonitor.class);
-    private static final String ADDRESS = ConfigurationConstants.ROOT + "monitor.address";
-    private boolean acceptConnection = true;
-
-    public void listen() {
-        final String hostAddress = IsisContext.getConfiguration().getString(ADDRESS);
-        InetAddress address;
-        try {
-            address = hostAddress == null ? null : InetAddress.getByName(hostAddress);
-            final int port = getPort();
-            final ServerSocket serverSocket = new ServerSocket(port, 2, address);
-            serverSocket.setSoTimeout(5000);
-            LOG.info("waiting for monitor connection on " + serverSocket);
-            while (acceptConnection) {
-                Socket client = null;
-                try {
-                    client = serverSocket.accept();
-                    LOG.info("client connection on " + client);
-                } catch (final SocketTimeoutException ignore) {
-                    // ignore
-                    continue;
-                } catch (final IOException e) {
-                    LOG.error("request failed", e);
-                    continue;
-                }
-                try {
-                    handleRequest(client);
-                } catch (final Exception e) {
-                    LOG.error("request failed", e);
-                }
-            }
-        } catch (final UnknownHostException e) {
-            throw new InitialisationException(e);
-        } catch (final IOException e) {
-            throw new InitialisationException(e);
-        }
-    }
-
-    protected abstract int getPort();
-
-    private void handleRequest(final Socket socket) throws IOException {
-        final BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
-        final PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
-        String request;
-        do {
-            request = reader.readLine();
-        } while (handleRequest(writer, request));
-        writer.close();
-        reader.close();
-    }
-
-    public abstract void setTarget(IsisSystem system);
-
-    public void shutdown() {
-        acceptConnection = false;
-    }
-
-    protected abstract boolean handleRequest(PrintWriter writer, String request) throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/HttpServerMonitor.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/HttpServerMonitor.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/HttpServerMonitor.java
deleted file mode 100644
index 94a15a1..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/HttpServerMonitor.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- *  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.monitoring.servermonitor;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URLDecoder;
-import java.util.StringTokenizer;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.core.commons.config.ConfigurationConstants;
-import org.apache.isis.core.runtime.system.IsisSystem;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-public class HttpServerMonitor extends AbstractServerMonitor {
-    private static final Logger LOG = Logger.getLogger(HttpServerMonitor.class);
-    private static final int DEFAULT_PORT = 8081;
-    private static final String PORT = ConfigurationConstants.ROOT + "monitor.http.port";
-    private final MonitorListenerImpl monitor = new MonitorListenerImpl();
-
-    @Override
-    protected int getPort() {
-        return IsisContext.getConfiguration().getInteger(PORT, DEFAULT_PORT);
-    }
-
-    @Override
-    protected boolean handleRequest(final PrintWriter writer, final String request) throws IOException {
-        if (request == null || request.length() == 0) {
-            LOG.info("Connection dropped");
-            return false;
-        }
-        final StringTokenizer st = new StringTokenizer(request);
-        if (st.countTokens() != 3) {
-            httpErrorResponse(writer, 444, "Unparsable input " + request);
-            return false;
-        }
-
-        final String type = st.nextToken();
-        if (!type.equals("GET")) {
-            httpErrorResponse(writer, 400, "Invalid method " + type);
-            return false;
-        }
-
-        String query = st.nextToken();
-        query = URLDecoder.decode(query, "UTF-8");
-
-        if (query.equals("/")) {
-            query = "/monitor";
-        }
-
-        if (query.startsWith("/monitor")) {
-            query = query.substring("/monitor".length());
-
-            if (query.startsWith("?")) {
-                query = query.substring(1);
-            }
-
-            monitor.writeHtmlPage(query, writer);
-        } else {
-            httpErrorResponse(writer, 404, "Failed to find " + query);
-
-            writer.println("[Request: HTTP/1.0 200");
-            writer.println("Content-Type: text/html");
-            writer.println("]");
-        }
-        return false;
-    }
-
-    private void httpErrorResponse(final PrintWriter writer, final int errorNo, final String response) {
-        writer.println("HTTP/1.0 " + errorNo + " " + response);
-        writer.println("Content-Type: text/html");
-        writer.println("");
-
-        writer.println("<HTML><HEAD><TITLE>Error " + errorNo + " - " + response + "</TITLE></HEAD>");
-        writer.println("<BODY><h1>" + errorNo + " - " + response + "</h1>");
-        writer.println("</BODY></HTML>");
-
-        writer.flush();
-    }
-
-    @Override
-    public void setTarget(final IsisSystem system) {
-        // monitor.setTarget(system);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/Monitor.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/Monitor.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/Monitor.java
deleted file mode 100644
index 9f794d1..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/Monitor.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *  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.monitoring.servermonitor;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.core.commons.debug.DebuggableWithTitle;
-
-public class Monitor {
-    private static final Logger LOG = Logger.getLogger(Monitor.class);
-    private static List<MonitorListener> listeners = new ArrayList<MonitorListener>();
-
-    public static void addListener(final MonitorListener listener) {
-        listeners.add(listener);
-    }
-
-    public static void removeListener(final MonitorListener listener) {
-        listeners.remove(listener);
-    }
-
-    public static void addEvent(final String category, final String message) {
-        addEvent(category, message, null);
-    }
-
-    public static void addEvent(final String category, final String message, final DebuggableWithTitle[] debug) {
-        final MonitorEvent event = new MonitorEvent(category, message, debug);
-        LOG.info(event);
-        dispatchEvent(event);
-    }
-
-    private static void dispatchEvent(final MonitorEvent event) {
-        for (final MonitorListener listener : listeners) {
-            listener.postEvent(event);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorEvent.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorEvent.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorEvent.java
deleted file mode 100644
index a1ebe62..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorEvent.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *  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.monitoring.servermonitor;
-
-import org.apache.isis.core.commons.debug.DebugString;
-import org.apache.isis.core.commons.debug.DebuggableWithTitle;
-
-public class MonitorEvent {
-    private static int nextSerialId = 1;
-    private final int serialId = nextSerialId++;
-    private final String message;
-    private final String category;
-    private final DebugString debug;
-
-    public MonitorEvent(final String category, final String message, final DebuggableWithTitle[] debugDetails) {
-        this.message = message;
-        this.category = category;
-        debug = new DebugString();
-        try {
-            if (debugDetails != null) {
-                for (final DebuggableWithTitle info : debugDetails) {
-                    debug.appendTitle(info.debugTitle());
-                    debug.indent();
-                    info.debugData(debug);
-                    debug.unindent();
-                }
-            }
-        } catch (final RuntimeException e) {
-            debug.appendException(e);
-        }
-    }
-
-    public String getCategory() {
-        return category;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public int getSerialId() {
-        return serialId;
-    }
-
-    public String getDebug() {
-        return debug.toString();
-    }
-
-    @Override
-    public String toString() {
-        return category + ": " + message;
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListener.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListener.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListener.java
deleted file mode 100644
index 981e297..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListener.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *  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.monitoring.servermonitor;
-
-public interface MonitorListener {
-    void postEvent(MonitorEvent event);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListenerImpl.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListenerImpl.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListenerImpl.java
deleted file mode 100644
index 9f70741..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListenerImpl.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- *  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.monitoring.servermonitor;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.isis.core.commons.debug.DebugString;
-import org.apache.isis.core.commons.debug.DebuggableWithTitle;
-import org.apache.isis.core.commons.ensure.Assert;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-public class MonitorListenerImpl implements MonitorListener {
-    private final List<MonitorEvent> requests = new ArrayList<MonitorEvent>();
-
-    public MonitorListenerImpl() {
-        org.apache.isis.viewer.html.monitoring.servermonitor.Monitor.addListener(this);
-    }
-
-    @Override
-    public void postEvent(final MonitorEvent event) {
-        // TODO use a stack of limited size so we have FIFO list
-        if (requests.size() > 50) {
-            requests.remove(0);
-        }
-        requests.add(event);
-    }
-
-    public void writeHtmlPage(final String section, final PrintWriter writer) throws IOException {
-        Assert.assertNotNull(section);
-        Assert.assertNotNull(writer);
-        final String sectionName = section.equals("") ? "Overview" : section;
-
-        writer.println("<HTML><HEAD><TITLE>NOF System Monitor - " + sectionName + "</TITLE></HEAD>");
-        writer.println("<BODY>");
-
-        writer.println("<h1>" + sectionName + "</h1>");
-
-        final StringBuffer navigation = new StringBuffer("<p>");
-        // final String[] options = target.debugSectionNames();
-        final DebuggableWithTitle[] infos = IsisContext.debugSystem();
-        for (int i = 0; i < infos.length; i++) {
-            final String name = infos[i].debugTitle();
-            appendNavigationLink(navigation, name, i > 0);
-        }
-        appendNavigationLink(navigation, "Requests", true);
-        navigation.append("</p>");
-
-        writer.println(navigation);
-        writer.println("<pre>");
-        if (sectionName.equals("Requests")) {
-            int i = 1;
-            for (final MonitorEvent event : requests) {
-                writer.print("<a href=\"monitor?request=" + event.getSerialId() + "\">");
-                writer.print(i++ + ". " + event);
-                writer.println("</a>");
-            }
-        } else if (sectionName.startsWith("request=")) {
-            final int requestId = Integer.valueOf(sectionName.substring("request=".length())).intValue();
-            for (final MonitorEvent request : requests) {
-                if (request.getSerialId() == requestId) {
-                    writer.println(request.getDebug());
-                    break;
-                }
-            }
-        } else {
-            for (final DebuggableWithTitle info : infos) {
-                if (info.debugTitle().equals(sectionName)) {
-                    // TODO use an HTML debug string
-                    final DebugString debug = new DebugString();
-                    info.debugData(debug);
-                    writer.println(debug.toString());
-                    break;
-                }
-            }
-        }
-        writer.println("</pre>");
-
-        writer.println(navigation);
-        writer.println("</BODY></HTML>");
-    }
-
-    private void appendNavigationLink(final StringBuffer navigation, final String name, final boolean appendDivider) throws UnsupportedEncodingException {
-        if (appendDivider) {
-            navigation.append(" | ");
-        }
-        navigation.append("<a href=\"monitor?");
-        navigation.append(URLEncoder.encode(name, "UTF-8"));
-        navigation.append("\">");
-        navigation.append(name);
-        navigation.append("</a>");
-    }
-
-    public void writeTextPage(final String section, final PrintWriter writer) throws IOException {
-        Assert.assertNotNull(section);
-        Assert.assertNotNull(writer);
-        final String sectionName = section.equals("") ? "Overview" : section;
-
-        writer.println(sectionName);
-
-        final DebuggableWithTitle[] infos = IsisContext.debugSystem();
-        if (sectionName.equals("Events")) {
-            int i = 1;
-            for (final MonitorEvent event : requests) {
-                writer.println(i++ + ". " + event);
-            }
-            // TODO add clause for request
-        } else {
-            for (final DebuggableWithTitle info : infos) {
-                if (info.debugTitle().equals(sectionName)) {
-                    final DebugString debug = new DebugString();
-                    info.debugData(debug);
-                    writer.println(debug.toString());
-                }
-            }
-        }
-
-        writer.print("[Options: ");
-        // final String[] options = target.debugSectionNames();
-        for (final DebuggableWithTitle info : infos) {
-            writer.print(info.debugTitle() + " ");
-        }
-        // writer.println();
-    }
-    /*
-     * public void setTarget(final DebugSelection debugInfo2) { target =
-     * debugInfo2; }
-     */
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/SocketServerMonitor.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/SocketServerMonitor.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/SocketServerMonitor.java
deleted file mode 100644
index 0ff6ab7..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/SocketServerMonitor.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *  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.monitoring.servermonitor;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URLDecoder;
-
-import org.apache.isis.core.commons.config.ConfigurationConstants;
-import org.apache.isis.core.runtime.system.IsisSystem;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-public class SocketServerMonitor extends AbstractServerMonitor {
-    private static final int DEFAULT_PORT = 8009;
-    private static final String PORT = ConfigurationConstants.ROOT + "monitor.telnet.port";
-
-    private final MonitorListenerImpl monitor = new MonitorListenerImpl();
-    private IsisSystem system;
-
-    @Override
-    protected int getPort() {
-        return IsisContext.getConfiguration().getInteger(PORT, DEFAULT_PORT);
-    }
-
-    @Override
-    protected boolean handleRequest(final PrintWriter writer, final String request) throws IOException {
-        final String query = URLDecoder.decode(request, "UTF-8");
-
-        if (query.equalsIgnoreCase("bye")) {
-            writer.println("Disconnecting...");
-            return false;
-        } else if (query.equalsIgnoreCase("shutdown")) {
-            writer.println("Shutting down system...");
-            system.shutdown();
-            exitSystem();
-            return false;
-        }
-
-        monitor.writeTextPage(query, writer);
-        writer.print("shutdown bye]\n#");
-        writer.flush();
-        return true;
-    }
-
-    @SuppressWarnings(value = "DM_EXIT")
-    private void exitSystem() {
-        System.exit(0);
-    }
-
-    @Override
-    public void setTarget(final IsisSystem system) {
-        this.system = system;
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/AWTConsole.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/AWTConsole.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/AWTConsole.java
deleted file mode 100644
index 5c4a6c3..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/AWTConsole.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- *  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.monitoring.systemconsole;
-
-import java.awt.BorderLayout;
-import java.awt.Button;
-import java.awt.Dimension;
-import java.awt.Frame;
-import java.awt.Insets;
-import java.awt.Panel;
-import java.awt.Rectangle;
-import java.awt.TextArea;
-import java.awt.Toolkit;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-public class AWTConsole extends Frame implements ServerConsole {
-    private static final long serialVersionUID = 1L;
-    private final static Logger LOG = Logger.getLogger(AWTConsole.class);
-    public static final String WIDTH = "isis.awt-console.width";
-    public static final String HEIGHT = "isis.awt-console.height";
-    public static final int DEFAULT_WIDTH = 600;
-    public static final int DEFAULT_HEIGHT = 350;
-    private Server server;
-    private TextArea log;
-    private Button quit;
-
-    public AWTConsole() {
-        super("Object Server Console");
-        buildGUI();
-        setVisible(true);
-        ;
-    }
-
-    /**
-     *
-     */
-    private void addButtons() {
-        final Panel p = new Panel();
-
-        p.setLayout(new java.awt.GridLayout(1, 0, 10, 0));
-        add(p, BorderLayout.SOUTH);
-        Button b;
-
-        p.add(b = new Button("Blank"));
-        b.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(final ActionEvent e) {
-                clearLog();
-            }
-        });
-
-        // debug
-        p.add(b = new Button("Classes"));
-        b.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(final ActionEvent e) {
-                listClasses();
-            }
-        });
-
-        p.add(b = new Button("Cache"));
-        b.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(final ActionEvent e) {
-                listCachedObjects();
-            }
-        });
-
-        p.add(b = new Button("C/Cache"));
-        b.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(final ActionEvent e) {
-                clearCache();
-            }
-        });
-
-        // quit
-        p.add(quit = new Button("Quit"));
-        quit.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(final ActionEvent e) {
-                quit();
-            }
-        });
-    }
-
-    /**
-     * LogWindow constructor comment.
-     */
-    private void buildGUI() {
-        add(log = new TextArea());
-        addButtons();
-        final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-        final Dimension frameSize = new Dimension();
-        final Insets insets = getInsets();
-
-        frameSize.width = IsisContext.getConfiguration().getInteger(WIDTH, DEFAULT_WIDTH);
-        frameSize.height = IsisContext.getConfiguration().getInteger(HEIGHT, DEFAULT_HEIGHT);
-        final Rectangle bounds = new Rectangle(frameSize);
-
-        bounds.x = screenSize.width - frameSize.width - insets.right;
-        bounds.y = 0 + insets.top;
-        setBounds(bounds);
-    }
-
-    private void clearCache() {
-    }
-
-    /**
-     * 
-     * @param message
-     *            java.lang.String
-     */
-    private void clearLog() {
-        log.setText("");
-    }
-
-    /**
-     *
-     */
-    @Override
-    public void close() {
-        dispose();
-    }
-
-    @Override
-    public void init(final Server server) {
-        this.server = server;
-        log("Console in control of " + server);
-    }
-
-    private void listCachedObjects() {
-        /*
-         * Enumeration e = server.getObjectStore().cache();
-         * 
-         * log("Cached objects:-"); while (e.hasMoreElements()) { ObjectAdapter
-         * object = (ObjectAdapter) e.nextElement();
-         * 
-         * log(" " + object.getClassName() + "[" + (object.isResolved() ? "" :
-         * "~") + object.getOid() + "] " + object.title()); } log();
-         */
-    }
-
-    private void listClasses() {
-        /*
-         * try { Enumeration e = server.getObjectStore().classes();
-         * 
-         * log("Loaded classes:-"); while (e.hasMoreElements()) {
-         * ObjectSpecification object = (ObjectSpecification) e.nextElement();
-         * 
-         * log(" " + object); } log(); } catch (ObjectStoreException e) {
-         * LOG.error("Error listing classes " + e.getMessage()); }
-         */
-    }
-
-    @Override
-    public void log() {
-        log.append("\n");
-    }
-
-    @Override
-    public void log(final String message) {
-        log.append(message + '\n');
-        LOG.info(message);
-    }
-
-    /**
-     *
-     */
-    public void quit() {
-        server.shutdown();
-        close();
-        exitSystem();
-    }
-
-    private void exitSystem() {
-        System.exit(0);
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/FileConsole.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/FileConsole.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/FileConsole.java
deleted file mode 100644
index 9e5c325..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/FileConsole.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  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.monitoring.systemconsole;
-
-import java.io.DataOutputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Date;
-
-import org.apache.log4j.Logger;
-
-public class FileConsole implements ServerConsole {
-    final static Logger LOG = Logger.getLogger(FileConsole.class);
-    private DataOutputStream dos;
-
-    @Override
-    public void close() {
-    }
-
-    @Override
-    public void init(final Server server) {
-    }
-
-    @Override
-    public void log() {
-        log("");
-    }
-
-    @Override
-    public void log(final String message) {
-        try {
-            LOG.info(message);
-            dos = new DataOutputStream(new FileOutputStream("log.xxx"));
-            dos.writeBytes(new Date() + " " + message + '\n');
-            dos.close();
-        } catch (final IOException e) {
-            LOG.error(e.getMessage(), e);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/QuitListener.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/QuitListener.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/QuitListener.java
deleted file mode 100644
index 1bb2994..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/QuitListener.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *  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.monitoring.systemconsole;
-
-public interface QuitListener {
-    public void classes();
-
-    public void clear();
-
-    public void collections();
-
-    public void objects();
-
-    public void shutdown();
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/Server.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/Server.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/Server.java
deleted file mode 100644
index 9f2a181..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/Server.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *  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.monitoring.systemconsole;
-
-public interface Server {
-
-    void shutdown();
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerConsole.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerConsole.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerConsole.java
deleted file mode 100644
index 216796e..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerConsole.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *  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.monitoring.systemconsole;
-
-public interface ServerConsole {
-
-    void close();
-
-    void init(Server server);
-
-    void log();
-
-    void log(String message);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerResponse.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerResponse.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerResponse.java
deleted file mode 100644
index 97b6cd5..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerResponse.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *  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.monitoring.systemconsole;
-
-import java.io.Serializable;
-
-public abstract class ServerResponse implements Serializable {
-    final static long serialVersionUID = 1L;
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/TerminalConsole.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/TerminalConsole.java b/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/TerminalConsole.java
deleted file mode 100644
index 7080ddb..0000000
--- a/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/TerminalConsole.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- *  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.monitoring.systemconsole;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import org.apache.log4j.Logger;
-
-/**
- * Marked as final because starts a thread in the {@link #TerminalConsole()
- * constructor}.
- */
-public final class TerminalConsole implements ServerConsole, Runnable {
-    private static final Logger LOG = Logger.getLogger(TerminalConsole.class);
-    private Server server;
-    private boolean running = true;
-
-    public TerminalConsole() {
-        new Thread(this).start();
-    }
-
-    public void clear() {
-    }
-
-    @Override
-    public void close() {
-        running = false;
-    }
-
-    public void collections() {
-    }
-
-    @Override
-    public void init(final Server server) {
-        this.server = server;
-        log("Control of " + server);
-    }
-
-    public void listClasses() {
-        /*
-         * try { Enumeration e = server.getObjectStore().classes();
-         * 
-         * log("Loaded classes:-"); while (e.hasMoreElements()) {
-         * ObjectSpecification object = (ObjectSpecification) e.nextElement();
-         * 
-         * log(" " + object); } } catch (ObjectStoreException e) {
-         * LOG.error("Error listing classes " + e.getMessage()); }
-         */
-    }
-
-    @Override
-    public void log() {
-        log("");
-    }
-
-    @Override
-    public void log(final String message) {
-        LOG.info(message);
-        System.out.println("> " + message);
-    }
-
-    public void objects() {
-    }
-
-    public void quit() {
-        server.shutdown();
-        server = null;
-        running = false;
-    }
-
-    @Override
-    public void run() {
-        final BufferedReader dis = new BufferedReader(new InputStreamReader(System.in));
-
-        try {
-            while (running) {
-                final String readLine = dis.readLine();
-                if (readLine == null) {
-                    quit();
-                    continue;
-                }
-                final String s = readLine.toLowerCase();
-
-                if (s.equals("")) {
-                    continue;
-                } else if (s.equals("quit")) {
-                    quit();
-                } else if (s.equals("classes")) {
-                    listClasses();
-                } else {
-                    System.out.println("Commands: classes, quit");
-                }
-            }
-        } catch (final IOException e) {
-            quit();
-        }
-        exitSystem();
-    }
-
-    private void exitSystem() {
-        System.exit(0);
-    }
-
-    public void start() {
-        new Thread(this).start();
-    }
-}


[03/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/MonitorServlet.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/MonitorServlet.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/MonitorServlet.java
new file mode 100644
index 0000000..1642a84
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/MonitorServlet.java
@@ -0,0 +1,87 @@
+/*
+ *  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.monitoring;
+
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.net.URLDecoder;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.isis.viewer.html.monitoring.servermonitor.MonitorListenerImpl;
+
+public class MonitorServlet extends HttpServlet {
+    private static final long serialVersionUID = 1L;
+    private MonitorListenerImpl monitor;
+
+    @Override
+    protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
+        final String queryString = request.getQueryString();
+        final String query = queryString == null ? "Overview" : URLDecoder.decode(queryString, "UTF-8");
+        response.setContentType("text/html");
+        final PrintWriter writer = new PrintWriter(new OutputStreamWriter(response.getOutputStream()));
+        if (query.equals("Sessions")) {
+            writer.println("<HTML><HEAD><TITLE>NOF System Monitor - " + "Sessions" + "</TITLE></HEAD>");
+            writer.println("<BODY>");
+
+            writer.println("<h1>" + "Sessions" + "</h1>");
+            writer.println("<pre>");
+            writer.println(listSessions());
+            writer.println("</pre>");
+            writer.println("</BODY></HTML>");
+        } else {
+            monitor.writeHtmlPage(query, writer);
+        }
+        writer.flush();
+    }
+
+    private static String listSessions() {
+        final StringBuffer str = new StringBuffer();
+        /*
+         * final Iterator<?> it = SessionAccess.getSessions().iterator(); while
+         * (it.hasNext()) { final HttpSession session = (HttpSession) it.next();
+         * final String id = session.getId(); str.append(id); str.append(" \t");
+         * 
+         * final long creationTime = session.getCreationTime(); str.append(new
+         * Date(creationTime)); str.append(" \t");
+         * 
+         * final long lastAccessedTime = session.getLastAccessedTime();
+         * str.append(new Date(lastAccessedTime)); str.append(" \t");
+         * 
+         * final AuthenticationSession nofSession = (AuthenticationSession)
+         * session.getAttribute("NOF_SESSION_ATTRIBUTE"); if (nofSession !=
+         * null) { str.append(nofSession.getUserName()); }
+         * 
+         * str.append("\n"); }
+         */
+        return str.toString();
+    }
+
+    @Override
+    public void init(final ServletConfig servletConfig) throws ServletException {
+        super.init(servletConfig);
+        monitor = new MonitorListenerImpl();
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/WebServerMonitorInstaller.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/WebServerMonitorInstaller.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/WebServerMonitorInstaller.java
new file mode 100644
index 0000000..bf2d9d2
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/WebServerMonitorInstaller.java
@@ -0,0 +1,45 @@
+/*
+ *  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.monitoring;
+
+import org.apache.isis.core.runtime.installerregistry.installerapi.IsisViewerInstallerAbstract;
+import org.apache.isis.core.runtime.viewer.IsisViewer;
+import org.apache.isis.core.runtime.viewer.web.WebAppSpecification;
+import org.apache.isis.core.runtime.web.EmbeddedWebViewer;
+
+public class WebServerMonitorInstaller extends IsisViewerInstallerAbstract {
+
+    public WebServerMonitorInstaller() {
+        super("web-monitor");
+    }
+
+    @Override
+    public IsisViewer doCreateViewer() {
+        return new EmbeddedWebViewer() {
+            @Override
+            public WebAppSpecification getWebAppSpecification() {
+                final WebAppSpecification requirements = new WebAppSpecification();
+                requirements.addServletSpecification(MonitorServlet.class, "/monitor/*");
+                return requirements;
+            }
+        };
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/AbstractServerMonitor.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/AbstractServerMonitor.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/AbstractServerMonitor.java
new file mode 100644
index 0000000..ad1e1f1
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/AbstractServerMonitor.java
@@ -0,0 +1,99 @@
+/*
+ *  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.monitoring.servermonitor;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.SocketTimeoutException;
+import java.net.UnknownHostException;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.core.commons.config.ConfigurationConstants;
+import org.apache.isis.core.runtime.services.InitialisationException;
+import org.apache.isis.core.runtime.system.IsisSystem;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
+public abstract class AbstractServerMonitor {
+    private static final Logger LOG = Logger.getLogger(AbstractServerMonitor.class);
+    private static final String ADDRESS = ConfigurationConstants.ROOT + "monitor.address";
+    private boolean acceptConnection = true;
+
+    public void listen() {
+        final String hostAddress = IsisContext.getConfiguration().getString(ADDRESS);
+        InetAddress address;
+        try {
+            address = hostAddress == null ? null : InetAddress.getByName(hostAddress);
+            final int port = getPort();
+            final ServerSocket serverSocket = new ServerSocket(port, 2, address);
+            serverSocket.setSoTimeout(5000);
+            LOG.info("waiting for monitor connection on " + serverSocket);
+            while (acceptConnection) {
+                Socket client = null;
+                try {
+                    client = serverSocket.accept();
+                    LOG.info("client connection on " + client);
+                } catch (final SocketTimeoutException ignore) {
+                    // ignore
+                    continue;
+                } catch (final IOException e) {
+                    LOG.error("request failed", e);
+                    continue;
+                }
+                try {
+                    handleRequest(client);
+                } catch (final Exception e) {
+                    LOG.error("request failed", e);
+                }
+            }
+        } catch (final UnknownHostException e) {
+            throw new InitialisationException(e);
+        } catch (final IOException e) {
+            throw new InitialisationException(e);
+        }
+    }
+
+    protected abstract int getPort();
+
+    private void handleRequest(final Socket socket) throws IOException {
+        final BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+        final PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
+        String request;
+        do {
+            request = reader.readLine();
+        } while (handleRequest(writer, request));
+        writer.close();
+        reader.close();
+    }
+
+    public abstract void setTarget(IsisSystem system);
+
+    public void shutdown() {
+        acceptConnection = false;
+    }
+
+    protected abstract boolean handleRequest(PrintWriter writer, String request) throws IOException;
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/HttpServerMonitor.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/HttpServerMonitor.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/HttpServerMonitor.java
new file mode 100644
index 0000000..94a15a1
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/HttpServerMonitor.java
@@ -0,0 +1,104 @@
+/*
+ *  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.monitoring.servermonitor;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.net.URLDecoder;
+import java.util.StringTokenizer;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.core.commons.config.ConfigurationConstants;
+import org.apache.isis.core.runtime.system.IsisSystem;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
+public class HttpServerMonitor extends AbstractServerMonitor {
+    private static final Logger LOG = Logger.getLogger(HttpServerMonitor.class);
+    private static final int DEFAULT_PORT = 8081;
+    private static final String PORT = ConfigurationConstants.ROOT + "monitor.http.port";
+    private final MonitorListenerImpl monitor = new MonitorListenerImpl();
+
+    @Override
+    protected int getPort() {
+        return IsisContext.getConfiguration().getInteger(PORT, DEFAULT_PORT);
+    }
+
+    @Override
+    protected boolean handleRequest(final PrintWriter writer, final String request) throws IOException {
+        if (request == null || request.length() == 0) {
+            LOG.info("Connection dropped");
+            return false;
+        }
+        final StringTokenizer st = new StringTokenizer(request);
+        if (st.countTokens() != 3) {
+            httpErrorResponse(writer, 444, "Unparsable input " + request);
+            return false;
+        }
+
+        final String type = st.nextToken();
+        if (!type.equals("GET")) {
+            httpErrorResponse(writer, 400, "Invalid method " + type);
+            return false;
+        }
+
+        String query = st.nextToken();
+        query = URLDecoder.decode(query, "UTF-8");
+
+        if (query.equals("/")) {
+            query = "/monitor";
+        }
+
+        if (query.startsWith("/monitor")) {
+            query = query.substring("/monitor".length());
+
+            if (query.startsWith("?")) {
+                query = query.substring(1);
+            }
+
+            monitor.writeHtmlPage(query, writer);
+        } else {
+            httpErrorResponse(writer, 404, "Failed to find " + query);
+
+            writer.println("[Request: HTTP/1.0 200");
+            writer.println("Content-Type: text/html");
+            writer.println("]");
+        }
+        return false;
+    }
+
+    private void httpErrorResponse(final PrintWriter writer, final int errorNo, final String response) {
+        writer.println("HTTP/1.0 " + errorNo + " " + response);
+        writer.println("Content-Type: text/html");
+        writer.println("");
+
+        writer.println("<HTML><HEAD><TITLE>Error " + errorNo + " - " + response + "</TITLE></HEAD>");
+        writer.println("<BODY><h1>" + errorNo + " - " + response + "</h1>");
+        writer.println("</BODY></HTML>");
+
+        writer.flush();
+    }
+
+    @Override
+    public void setTarget(final IsisSystem system) {
+        // monitor.setTarget(system);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/Monitor.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/Monitor.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/Monitor.java
new file mode 100644
index 0000000..9f794d1
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/Monitor.java
@@ -0,0 +1,56 @@
+/*
+ *  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.monitoring.servermonitor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.core.commons.debug.DebuggableWithTitle;
+
+public class Monitor {
+    private static final Logger LOG = Logger.getLogger(Monitor.class);
+    private static List<MonitorListener> listeners = new ArrayList<MonitorListener>();
+
+    public static void addListener(final MonitorListener listener) {
+        listeners.add(listener);
+    }
+
+    public static void removeListener(final MonitorListener listener) {
+        listeners.remove(listener);
+    }
+
+    public static void addEvent(final String category, final String message) {
+        addEvent(category, message, null);
+    }
+
+    public static void addEvent(final String category, final String message, final DebuggableWithTitle[] debug) {
+        final MonitorEvent event = new MonitorEvent(category, message, debug);
+        LOG.info(event);
+        dispatchEvent(event);
+    }
+
+    private static void dispatchEvent(final MonitorEvent event) {
+        for (final MonitorListener listener : listeners) {
+            listener.postEvent(event);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorEvent.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorEvent.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorEvent.java
new file mode 100644
index 0000000..a1ebe62
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorEvent.java
@@ -0,0 +1,70 @@
+/*
+ *  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.monitoring.servermonitor;
+
+import org.apache.isis.core.commons.debug.DebugString;
+import org.apache.isis.core.commons.debug.DebuggableWithTitle;
+
+public class MonitorEvent {
+    private static int nextSerialId = 1;
+    private final int serialId = nextSerialId++;
+    private final String message;
+    private final String category;
+    private final DebugString debug;
+
+    public MonitorEvent(final String category, final String message, final DebuggableWithTitle[] debugDetails) {
+        this.message = message;
+        this.category = category;
+        debug = new DebugString();
+        try {
+            if (debugDetails != null) {
+                for (final DebuggableWithTitle info : debugDetails) {
+                    debug.appendTitle(info.debugTitle());
+                    debug.indent();
+                    info.debugData(debug);
+                    debug.unindent();
+                }
+            }
+        } catch (final RuntimeException e) {
+            debug.appendException(e);
+        }
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public int getSerialId() {
+        return serialId;
+    }
+
+    public String getDebug() {
+        return debug.toString();
+    }
+
+    @Override
+    public String toString() {
+        return category + ": " + message;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListener.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListener.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListener.java
new file mode 100644
index 0000000..981e297
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListener.java
@@ -0,0 +1,24 @@
+/*
+ *  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.monitoring.servermonitor;
+
+public interface MonitorListener {
+    void postEvent(MonitorEvent event);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListenerImpl.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListenerImpl.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListenerImpl.java
new file mode 100644
index 0000000..9f70741
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/MonitorListenerImpl.java
@@ -0,0 +1,150 @@
+/*
+ *  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.monitoring.servermonitor;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.core.commons.debug.DebugString;
+import org.apache.isis.core.commons.debug.DebuggableWithTitle;
+import org.apache.isis.core.commons.ensure.Assert;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
+public class MonitorListenerImpl implements MonitorListener {
+    private final List<MonitorEvent> requests = new ArrayList<MonitorEvent>();
+
+    public MonitorListenerImpl() {
+        org.apache.isis.viewer.html.monitoring.servermonitor.Monitor.addListener(this);
+    }
+
+    @Override
+    public void postEvent(final MonitorEvent event) {
+        // TODO use a stack of limited size so we have FIFO list
+        if (requests.size() > 50) {
+            requests.remove(0);
+        }
+        requests.add(event);
+    }
+
+    public void writeHtmlPage(final String section, final PrintWriter writer) throws IOException {
+        Assert.assertNotNull(section);
+        Assert.assertNotNull(writer);
+        final String sectionName = section.equals("") ? "Overview" : section;
+
+        writer.println("<HTML><HEAD><TITLE>NOF System Monitor - " + sectionName + "</TITLE></HEAD>");
+        writer.println("<BODY>");
+
+        writer.println("<h1>" + sectionName + "</h1>");
+
+        final StringBuffer navigation = new StringBuffer("<p>");
+        // final String[] options = target.debugSectionNames();
+        final DebuggableWithTitle[] infos = IsisContext.debugSystem();
+        for (int i = 0; i < infos.length; i++) {
+            final String name = infos[i].debugTitle();
+            appendNavigationLink(navigation, name, i > 0);
+        }
+        appendNavigationLink(navigation, "Requests", true);
+        navigation.append("</p>");
+
+        writer.println(navigation);
+        writer.println("<pre>");
+        if (sectionName.equals("Requests")) {
+            int i = 1;
+            for (final MonitorEvent event : requests) {
+                writer.print("<a href=\"monitor?request=" + event.getSerialId() + "\">");
+                writer.print(i++ + ". " + event);
+                writer.println("</a>");
+            }
+        } else if (sectionName.startsWith("request=")) {
+            final int requestId = Integer.valueOf(sectionName.substring("request=".length())).intValue();
+            for (final MonitorEvent request : requests) {
+                if (request.getSerialId() == requestId) {
+                    writer.println(request.getDebug());
+                    break;
+                }
+            }
+        } else {
+            for (final DebuggableWithTitle info : infos) {
+                if (info.debugTitle().equals(sectionName)) {
+                    // TODO use an HTML debug string
+                    final DebugString debug = new DebugString();
+                    info.debugData(debug);
+                    writer.println(debug.toString());
+                    break;
+                }
+            }
+        }
+        writer.println("</pre>");
+
+        writer.println(navigation);
+        writer.println("</BODY></HTML>");
+    }
+
+    private void appendNavigationLink(final StringBuffer navigation, final String name, final boolean appendDivider) throws UnsupportedEncodingException {
+        if (appendDivider) {
+            navigation.append(" | ");
+        }
+        navigation.append("<a href=\"monitor?");
+        navigation.append(URLEncoder.encode(name, "UTF-8"));
+        navigation.append("\">");
+        navigation.append(name);
+        navigation.append("</a>");
+    }
+
+    public void writeTextPage(final String section, final PrintWriter writer) throws IOException {
+        Assert.assertNotNull(section);
+        Assert.assertNotNull(writer);
+        final String sectionName = section.equals("") ? "Overview" : section;
+
+        writer.println(sectionName);
+
+        final DebuggableWithTitle[] infos = IsisContext.debugSystem();
+        if (sectionName.equals("Events")) {
+            int i = 1;
+            for (final MonitorEvent event : requests) {
+                writer.println(i++ + ". " + event);
+            }
+            // TODO add clause for request
+        } else {
+            for (final DebuggableWithTitle info : infos) {
+                if (info.debugTitle().equals(sectionName)) {
+                    final DebugString debug = new DebugString();
+                    info.debugData(debug);
+                    writer.println(debug.toString());
+                }
+            }
+        }
+
+        writer.print("[Options: ");
+        // final String[] options = target.debugSectionNames();
+        for (final DebuggableWithTitle info : infos) {
+            writer.print(info.debugTitle() + " ");
+        }
+        // writer.println();
+    }
+    /*
+     * public void setTarget(final DebugSelection debugInfo2) { target =
+     * debugInfo2; }
+     */
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/SocketServerMonitor.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/SocketServerMonitor.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/SocketServerMonitor.java
new file mode 100644
index 0000000..0ff6ab7
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/servermonitor/SocketServerMonitor.java
@@ -0,0 +1,71 @@
+/*
+ *  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.monitoring.servermonitor;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.net.URLDecoder;
+
+import org.apache.isis.core.commons.config.ConfigurationConstants;
+import org.apache.isis.core.runtime.system.IsisSystem;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
+public class SocketServerMonitor extends AbstractServerMonitor {
+    private static final int DEFAULT_PORT = 8009;
+    private static final String PORT = ConfigurationConstants.ROOT + "monitor.telnet.port";
+
+    private final MonitorListenerImpl monitor = new MonitorListenerImpl();
+    private IsisSystem system;
+
+    @Override
+    protected int getPort() {
+        return IsisContext.getConfiguration().getInteger(PORT, DEFAULT_PORT);
+    }
+
+    @Override
+    protected boolean handleRequest(final PrintWriter writer, final String request) throws IOException {
+        final String query = URLDecoder.decode(request, "UTF-8");
+
+        if (query.equalsIgnoreCase("bye")) {
+            writer.println("Disconnecting...");
+            return false;
+        } else if (query.equalsIgnoreCase("shutdown")) {
+            writer.println("Shutting down system...");
+            system.shutdown();
+            exitSystem();
+            return false;
+        }
+
+        monitor.writeTextPage(query, writer);
+        writer.print("shutdown bye]\n#");
+        writer.flush();
+        return true;
+    }
+
+    @SuppressWarnings(value = "DM_EXIT")
+    private void exitSystem() {
+        System.exit(0);
+    }
+
+    @Override
+    public void setTarget(final IsisSystem system) {
+        this.system = system;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/AWTConsole.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/AWTConsole.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/AWTConsole.java
new file mode 100644
index 0000000..5c4a6c3
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/AWTConsole.java
@@ -0,0 +1,201 @@
+/*
+ *  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.monitoring.systemconsole;
+
+import java.awt.BorderLayout;
+import java.awt.Button;
+import java.awt.Dimension;
+import java.awt.Frame;
+import java.awt.Insets;
+import java.awt.Panel;
+import java.awt.Rectangle;
+import java.awt.TextArea;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
+public class AWTConsole extends Frame implements ServerConsole {
+    private static final long serialVersionUID = 1L;
+    private final static Logger LOG = Logger.getLogger(AWTConsole.class);
+    public static final String WIDTH = "isis.awt-console.width";
+    public static final String HEIGHT = "isis.awt-console.height";
+    public static final int DEFAULT_WIDTH = 600;
+    public static final int DEFAULT_HEIGHT = 350;
+    private Server server;
+    private TextArea log;
+    private Button quit;
+
+    public AWTConsole() {
+        super("Object Server Console");
+        buildGUI();
+        setVisible(true);
+        ;
+    }
+
+    /**
+     *
+     */
+    private void addButtons() {
+        final Panel p = new Panel();
+
+        p.setLayout(new java.awt.GridLayout(1, 0, 10, 0));
+        add(p, BorderLayout.SOUTH);
+        Button b;
+
+        p.add(b = new Button("Blank"));
+        b.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(final ActionEvent e) {
+                clearLog();
+            }
+        });
+
+        // debug
+        p.add(b = new Button("Classes"));
+        b.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(final ActionEvent e) {
+                listClasses();
+            }
+        });
+
+        p.add(b = new Button("Cache"));
+        b.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(final ActionEvent e) {
+                listCachedObjects();
+            }
+        });
+
+        p.add(b = new Button("C/Cache"));
+        b.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(final ActionEvent e) {
+                clearCache();
+            }
+        });
+
+        // quit
+        p.add(quit = new Button("Quit"));
+        quit.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(final ActionEvent e) {
+                quit();
+            }
+        });
+    }
+
+    /**
+     * LogWindow constructor comment.
+     */
+    private void buildGUI() {
+        add(log = new TextArea());
+        addButtons();
+        final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+        final Dimension frameSize = new Dimension();
+        final Insets insets = getInsets();
+
+        frameSize.width = IsisContext.getConfiguration().getInteger(WIDTH, DEFAULT_WIDTH);
+        frameSize.height = IsisContext.getConfiguration().getInteger(HEIGHT, DEFAULT_HEIGHT);
+        final Rectangle bounds = new Rectangle(frameSize);
+
+        bounds.x = screenSize.width - frameSize.width - insets.right;
+        bounds.y = 0 + insets.top;
+        setBounds(bounds);
+    }
+
+    private void clearCache() {
+    }
+
+    /**
+     * 
+     * @param message
+     *            java.lang.String
+     */
+    private void clearLog() {
+        log.setText("");
+    }
+
+    /**
+     *
+     */
+    @Override
+    public void close() {
+        dispose();
+    }
+
+    @Override
+    public void init(final Server server) {
+        this.server = server;
+        log("Console in control of " + server);
+    }
+
+    private void listCachedObjects() {
+        /*
+         * Enumeration e = server.getObjectStore().cache();
+         * 
+         * log("Cached objects:-"); while (e.hasMoreElements()) { ObjectAdapter
+         * object = (ObjectAdapter) e.nextElement();
+         * 
+         * log(" " + object.getClassName() + "[" + (object.isResolved() ? "" :
+         * "~") + object.getOid() + "] " + object.title()); } log();
+         */
+    }
+
+    private void listClasses() {
+        /*
+         * try { Enumeration e = server.getObjectStore().classes();
+         * 
+         * log("Loaded classes:-"); while (e.hasMoreElements()) {
+         * ObjectSpecification object = (ObjectSpecification) e.nextElement();
+         * 
+         * log(" " + object); } log(); } catch (ObjectStoreException e) {
+         * LOG.error("Error listing classes " + e.getMessage()); }
+         */
+    }
+
+    @Override
+    public void log() {
+        log.append("\n");
+    }
+
+    @Override
+    public void log(final String message) {
+        log.append(message + '\n');
+        LOG.info(message);
+    }
+
+    /**
+     *
+     */
+    public void quit() {
+        server.shutdown();
+        close();
+        exitSystem();
+    }
+
+    private void exitSystem() {
+        System.exit(0);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/FileConsole.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/FileConsole.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/FileConsole.java
new file mode 100644
index 0000000..9e5c325
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/FileConsole.java
@@ -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.monitoring.systemconsole;
+
+import java.io.DataOutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Date;
+
+import org.apache.log4j.Logger;
+
+public class FileConsole implements ServerConsole {
+    final static Logger LOG = Logger.getLogger(FileConsole.class);
+    private DataOutputStream dos;
+
+    @Override
+    public void close() {
+    }
+
+    @Override
+    public void init(final Server server) {
+    }
+
+    @Override
+    public void log() {
+        log("");
+    }
+
+    @Override
+    public void log(final String message) {
+        try {
+            LOG.info(message);
+            dos = new DataOutputStream(new FileOutputStream("log.xxx"));
+            dos.writeBytes(new Date() + " " + message + '\n');
+            dos.close();
+        } catch (final IOException e) {
+            LOG.error(e.getMessage(), e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/QuitListener.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/QuitListener.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/QuitListener.java
new file mode 100644
index 0000000..1bb2994
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/QuitListener.java
@@ -0,0 +1,32 @@
+/*
+ *  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.monitoring.systemconsole;
+
+public interface QuitListener {
+    public void classes();
+
+    public void clear();
+
+    public void collections();
+
+    public void objects();
+
+    public void shutdown();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/Server.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/Server.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/Server.java
new file mode 100644
index 0000000..9f2a181
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/Server.java
@@ -0,0 +1,26 @@
+/*
+ *  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.monitoring.systemconsole;
+
+public interface Server {
+
+    void shutdown();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerConsole.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerConsole.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerConsole.java
new file mode 100644
index 0000000..216796e
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerConsole.java
@@ -0,0 +1,31 @@
+/*
+ *  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.monitoring.systemconsole;
+
+public interface ServerConsole {
+
+    void close();
+
+    void init(Server server);
+
+    void log();
+
+    void log(String message);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerResponse.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerResponse.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerResponse.java
new file mode 100644
index 0000000..97b6cd5
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/ServerResponse.java
@@ -0,0 +1,26 @@
+/*
+ *  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.monitoring.systemconsole;
+
+import java.io.Serializable;
+
+public abstract class ServerResponse implements Serializable {
+    final static long serialVersionUID = 1L;
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/TerminalConsole.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/TerminalConsole.java b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/TerminalConsole.java
new file mode 100644
index 0000000..7080ddb
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/main/java/org/apache/isis/viewer/html/monitoring/systemconsole/TerminalConsole.java
@@ -0,0 +1,126 @@
+/*
+ *  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.monitoring.systemconsole;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Marked as final because starts a thread in the {@link #TerminalConsole()
+ * constructor}.
+ */
+public final class TerminalConsole implements ServerConsole, Runnable {
+    private static final Logger LOG = Logger.getLogger(TerminalConsole.class);
+    private Server server;
+    private boolean running = true;
+
+    public TerminalConsole() {
+        new Thread(this).start();
+    }
+
+    public void clear() {
+    }
+
+    @Override
+    public void close() {
+        running = false;
+    }
+
+    public void collections() {
+    }
+
+    @Override
+    public void init(final Server server) {
+        this.server = server;
+        log("Control of " + server);
+    }
+
+    public void listClasses() {
+        /*
+         * try { Enumeration e = server.getObjectStore().classes();
+         * 
+         * log("Loaded classes:-"); while (e.hasMoreElements()) {
+         * ObjectSpecification object = (ObjectSpecification) e.nextElement();
+         * 
+         * log(" " + object); } } catch (ObjectStoreException e) {
+         * LOG.error("Error listing classes " + e.getMessage()); }
+         */
+    }
+
+    @Override
+    public void log() {
+        log("");
+    }
+
+    @Override
+    public void log(final String message) {
+        LOG.info(message);
+        System.out.println("> " + message);
+    }
+
+    public void objects() {
+    }
+
+    public void quit() {
+        server.shutdown();
+        server = null;
+        running = false;
+    }
+
+    @Override
+    public void run() {
+        final BufferedReader dis = new BufferedReader(new InputStreamReader(System.in));
+
+        try {
+            while (running) {
+                final String readLine = dis.readLine();
+                if (readLine == null) {
+                    quit();
+                    continue;
+                }
+                final String s = readLine.toLowerCase();
+
+                if (s.equals("")) {
+                    continue;
+                } else if (s.equals("quit")) {
+                    quit();
+                } else if (s.equals("classes")) {
+                    listClasses();
+                } else {
+                    System.out.println("Commands: classes, quit");
+                }
+            }
+        } catch (final IOException e) {
+            quit();
+        }
+        exitSystem();
+    }
+
+    private void exitSystem() {
+        System.exit(0);
+    }
+
+    public void start() {
+        new Thread(this).start();
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/site/apt/index.apt b/mothballed/component/viewer/html/monitoring/src/site/apt/index.apt
new file mode 100644
index 0000000..80756ec
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/site/apt/index.apt
@@ -0,0 +1,31 @@
+~~  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.
+
+
+
+Monitoring Support
+ 
+ The <monitoring> module is a small module that provides monitoring tools
+ for the <default runtime>.
+ 
+ []
+ 
+Documentation
+
+ See the {{{../index.html}default runtime}} documentation 
+ ({{{../docbkx/html/guide/isis-default-runtime.html}HTML}} or 
+ {{{../docbkx/pdf/isis-default-runtime.pdf}PDF}}).
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/site/apt/jottings.apt
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/site/apt/jottings.apt b/mothballed/component/viewer/html/monitoring/src/site/apt/jottings.apt
new file mode 100644
index 0000000..7920f56
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/site/apt/jottings.apt
@@ -0,0 +1,43 @@
+~~  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.
+
+
+
+Jottings
+ 
+  This page is to capture any random jottings relating to this module prior 
+  to being moved into formal documentation. 
+
+Support for viewer config files 
+
+  The "Installer" architecture will automatically load configFiles, following 
+  the convention "xxx_yyy.properties".  When run from org.apache.isis.Isis or
+  org.apache.isis.WebServer, a "viewer installer" is also specified, meaning
+  that a config file for this viewer is also loaded (eg viewer_html.properties).
+  However, while IsisWebAppBootstrapper uses the installer architecture for
+  "back-end" components (security, persistor etc), it is not used for the viewers.
+  
+  Therefore, the IsisWebAppBootstrapper will load additional config files for
+  viewers if required, by searching for the "isis.viewers" context-param.
+  
+  For example:
+
+     <context-param>
+        <param-name>isis.viewers</param-name>
+        <param-value>restful</param-value>
+     </context-param>
+ 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/src/site/site.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/src/site/site.xml b/mothballed/component/viewer/html/monitoring/src/site/site.xml
new file mode 100644
index 0000000..ec82d2b
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/src/site/site.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project>
+
+	<body>
+		<breadcrumbs>
+			<item name="Monitoring" href="index.html"/>
+		</breadcrumbs>
+
+		<menu name="Monitoring">
+			<item name="About" href="index.html" />
+            <item name="Jottings" href="jottings.html" />
+		</menu>
+
+        <menu name="Default Runtime">
+            <item name="Implementation" href="../runtime/index.html" />
+            <item name="Objectstores" href="../objectstores/index.html" />
+            <item name="Profilestores" href="../profilestores/index.html" />
+            <item name="Bytecode" href="../bytecode/index.html" />
+            <item name="Monitoring" href="../monitoring/index.html" />
+            <item name="Webapp Support" href="../webapp/index.html" />
+            <item name="Webserver" href="../webserver/index.html" />
+            <item name="Remoting" href="../remoting/index.html" />
+        </menu>
+        
+		<menu name="Maven Reports" ref="reports" />
+	</body>
+</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/pom.xml b/mothballed/component/viewer/html/pom.xml
new file mode 100644
index 0000000..42672af
--- /dev/null
+++ b/mothballed/component/viewer/html/pom.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.isis.core</groupId>
+		<artifactId>isis</artifactId>
+        <version>1.1.1-SNAPSHOT</version>
+		<relativePath>../../../core/pom.xml</relativePath>
+	</parent>
+
+	<groupId>org.apache.isis.viewer</groupId>
+	<artifactId>isis-viewer-html</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+
+	<name>Isis Html Viewer</name>
+	<packaging>pom</packaging>
+
+	<properties>
+        <siteBaseDir>.</siteBaseDir>
+		<relativeUrl/>
+
+		<docbkxGuideTitle>Apache Isis HTML Viewer</docbkxGuideTitle>
+        <docbkxGuideSubTitle>Configuration, Customization and Deployment Guide</docbkxGuideSubTitle>
+		<docbkxGuideName>isis-html-viewer</docbkxGuideName>
+    </properties>
+
+    <!-- used in Site generation for relative references. -->
+    <url>http://isis.apache.org/${relativeUrl}</url>
+
+	<build>
+		<pluginManagement>
+			<plugins>
+                <!-- Apache Release Audit Tool -->
+                <plugin>
+                    <groupId>org.apache.rat</groupId>
+                    <artifactId>apache-rat-plugin</artifactId>
+                    <version>0.8</version>
+	                <configuration>
+	                    <excludes>
+	                    	<!-- 
+	                    	overriding inherited excludes from oia.core:isis 
+	                    	with a more specific set for this component
+	                    	 -->
+	                        <exclude>**/target/**</exclude>
+	                        <exclude>**/target-ide/**</exclude>
+
+	                        <exclude>**/*.project</exclude>
+	                        <exclude>**/.classpath</exclude>
+	                        <exclude>**/.settings/**</exclude>
+	                    </excludes>
+                    </configuration>
+	            </plugin>
+			</plugins>
+		</pluginManagement>
+		<plugins>
+            <plugin>
+                <groupId>com.agilejava.docbkx</groupId>
+                <artifactId>docbkx-maven-plugin</artifactId>
+				<inherited>false</inherited>
+            </plugin>
+		</plugins>
+	</build>
+
+	<dependencyManagement>
+	    <dependencies>
+	    
+
+	    	<!-- also for benefit of application developers, using scope=import -->
+	    
+			<!-- for this module -->
+		    <dependency>
+			    <groupId>org.apache.isis.viewer</groupId>
+			    <artifactId>isis-viewer-html-impl</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+		    </dependency>
+
+		    <dependency>
+			    <groupId>org.apache.isis.viewer</groupId>
+			    <artifactId>isis-viewer-html-monitoring</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+		    </dependency>
+
+	   </dependencies>
+	</dependencyManagement>
+
+	<modules>
+		<module>impl</module>
+		<module>monitoring</module>
+		<module>tck</module>
+	</modules>
+
+</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/src/main/appended-resources/supplemental-models.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/src/main/appended-resources/supplemental-models.xml b/mothballed/component/viewer/html/src/main/appended-resources/supplemental-models.xml
new file mode 100644
index 0000000..ecd3906
--- /dev/null
+++ b/mothballed/component/viewer/html/src/main/appended-resources/supplemental-models.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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. -->
+<supplementalDataModels xmlns="http://maven.apache.org/supplemental-model/1.0.0"
+                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                        xsi:schemaLocation="http://maven.apache.org/supplemental-model/1.0.0 http://maven.apache.org/xsd/supplemental-model-1.0.0.xsd">
+
+  <supplement>
+    <project>
+      <groupId>aopalliance</groupId>
+      <artifactId>aopalliance</artifactId>
+      <version>1.0</version>
+      <licenses>
+          <license>
+              <name>Public Domain</name>
+          </license>
+      </licenses>
+    </project>
+  </supplement>
+
+  <supplement>
+   	<!-- not quite sure why licenses:download-license flags this, since license info seems to be in its POM -->
+    <project>
+		<groupId>org.datanucleus</groupId>
+	    <artifactId>datanucleus-jodatime</artifactId>
+	    <version>3.1.1</version>
+          <licenses>
+			<license>
+	            <name>The Apache Software License, Version 2.0</name>
+	            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+	        </license>
+	    </licenses>
+    </project>
+  </supplement>
+
+  <supplement>
+    <project>
+      <groupId>org.scannotation</groupId>
+      <artifactId>scannotation</artifactId>
+      <version>1.0.3</version>
+      <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>          
+        </license>
+      </licenses>
+    </project>
+  </supplement>
+    
+  <supplement>
+    <project>
+      <groupId>dom4j</groupId>
+      <artifactId>dom4j</artifactId>
+      <version>1.6.1</version>
+      <licenses>
+        <license>
+            <name>BSD License</name>
+            <url>http://dom4j.sourceforge.net/dom4j-1.6.1/license.html</url>
+            <distribution>repo</distribution>          
+        </license>
+      </licenses>
+    </project>
+  </supplement>
+
+  <supplement>
+    <project>
+      <groupId>net.jcip</groupId>
+      <artifactId>jcip-annotations</artifactId>
+      <version>1.0</version>
+      <licenses>
+        <license>
+            <name>Creative Commons Attribution 2.5 License</name>
+            <url>http://creativecommons.org/licenses/by/2.5/</url>
+            <distribution>repo</distribution>          
+        </license>
+      </licenses>
+    </project>
+  </supplement>
+  
+
+  <supplement>
+    <project>
+      <groupId>xalan</groupId>
+      <artifactId>xalan</artifactId>
+      <version>2.7.0</version>
+      <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>          
+        </license>
+      </licenses>
+    </project>
+  </supplement>
+
+ 
+</supplementalDataModels>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/tck/ide/eclipse/launch/viewer-html-tck.launch
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/tck/ide/eclipse/launch/viewer-html-tck.launch b/mothballed/component/viewer/html/tck/ide/eclipse/launch/viewer-html-tck.launch
new file mode 100644
index 0000000..13af8ed
--- /dev/null
+++ b/mothballed/component/viewer/html/tck/ide/eclipse/launch/viewer-html-tck.launch
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
+<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="isis-viewer-html-tck"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/tck/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/tck/pom.xml b/mothballed/component/viewer/html/tck/pom.xml
new file mode 100644
index 0000000..466dac3
--- /dev/null
+++ b/mothballed/component/viewer/html/tck/pom.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.isis.core</groupId>
+        <artifactId>isis-core-tck</artifactId>
+        <version>1.1.1-SNAPSHOT</version>
+        <relativePath>../../../../core/tck/pom.xml</relativePath>
+    </parent>
+
+    <groupId>org.apache.isis.viewer</groupId>
+	<artifactId>isis-viewer-html-tck</artifactId>
+	<name>Isis Html Viewer TCK tests</name>
+
+    <properties>
+        <isis-viewer-html.version>1.0.0-SNAPSHOT</isis-viewer-html.version>
+
+		<siteBaseDir>..</siteBaseDir>
+		<relativeUrl>html-tck/</relativeUrl>
+		<!-- until someone comes up with a better solution -->
+                <distMgmtSiteUrl>file:///tmp/m2-sites/isis/viewer/html</distMgmtSiteUrl>
+    </properties>
+
+	
+	<packaging>war</packaging>
+
+	<build>
+		<plugins>
+            <plugin>
+                <groupId>org.mortbay.jetty</groupId>
+                <artifactId>maven-jetty-plugin</artifactId>
+            </plugin>
+
+			<!-- mvn package -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-shade-plugin</artifactId>
+				<executions>
+					<execution>
+						<phase>package</phase>
+						<goals>
+							<goal>shade</goal>
+						</goals>
+						<configuration>
+							<transformers>
+								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+									<mainClass>org.apache.isis.WebServer</mainClass>
+								</transformer>
+							</transformers>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+	
+        <!-- other modules in this project -->
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-tck-dom</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-tck-fixture</artifactId>
+        </dependency>
+
+
+        <!-- isis viewer -->
+		<dependency>
+	        <groupId>org.apache.isis.viewer</groupId>
+			<artifactId>isis-viewer-html-impl</artifactId>
+            <version>${isis-viewer-html.version}</version>
+		</dependency>
+        
+
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-bytecode-cglib</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-objectstore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-profilestore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-security</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-webserver</artifactId>
+            <scope>runtime</scope>
+            <optional>true</optional>
+        </dependency>
+
+        
+        <dependency>
+            <groupId>org.apache.isis.security</groupId>
+            <artifactId>isis-security-file</artifactId>
+            <version>1.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.objectstore</groupId>
+            <artifactId>isis-objectstore-xml</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.profilestore</groupId>
+            <artifactId>isis-profilestore-xml</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        
+	</dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/tck/src/main/resources/images/Default.png
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/tck/src/main/resources/images/Default.png b/mothballed/component/viewer/html/tck/src/main/resources/images/Default.png
new file mode 100644
index 0000000..8409e46
Binary files /dev/null and b/mothballed/component/viewer/html/tck/src/main/resources/images/Default.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/isis.properties b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/isis.properties
new file mode 100644
index 0000000..c3e2f11
--- /dev/null
+++ b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/isis.properties
@@ -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.
+isis.services.prefix = org.apache.isis.tck.objstore.dflt
+isis.services =\
+    scalars.ApplibValuedEntityRepositoryDefault,\
+    scalars.JdkValuedEntityRepositoryDefault,\
+    scalars.PrimitiveValuedEntityRepositoryDefault,\
+    scalars.WrapperValuedEntityRepositoryDefault, \
+    simples.SimpleEntityRepositoryDefault,\
+    assocs.ParentEntityRepositoryDefault
+
+isis.fixtures.prefix= org.apache.isis.tck.fixture
+isis.fixtures=\
+    LogonAsSvenFixture,\
+    scalars.ApplibValuedEntityFixture,\
+    scalars.JdkValuedEntityFixture,\
+    scalars.PrimitiveValuedEntityFixture,\
+    scalars.WrapperValuedEntityFixture,\
+    simples.SimpleEntityFixture,\
+    assocs.ParentAndChildEntityFixture
+
+isis.exploration.users=sven, dick, bob
+
+
+isis.reflector.class-substitutor=org.apache.isis.runtimes.dflt.bytecode.dflt.classsubstitutor.CglibClassSubstitutor
+#isis.reflector.class-substitutor=org.apache.isis.runtimes.dflt.bytecode.javassist.classsubstitutor.JavassistClassSubstitutor
+#isis.reflector.class-substitutor=org.apache.isis.runtimes.dflt.bytecode.identity.classsubstitutor.ClassSubstitutorIdentity
+
+isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.dflt.objectfactory.CglibObjectFactory
+#isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.javassist.objectfactory.JavassistObjectFactory
+#isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.identity.objectfactory.ObjectFactoryBasic
+
+
+isis.persistor.domain-object-container=org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault
+#isis.persistor.domain-object-container=org.apache.isis.progmodel.wrapper.metamodel.DomainObjectContainerWrapperFactory
+
+
+#isis.reflector.facets.include=org.apache.isis.runtimes.dflt.runtime.authorization.standard.AuthorizationFacetFactoryImpl
+#isis.authorization.learn=true
+
+isis.user-profile-store=in-memory
+isis.persistor=in-memory
+#isis.xmlos.dir=/tmp/xml
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/logging.properties
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/logging.properties b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/logging.properties
new file mode 100644
index 0000000..f2d65e6
--- /dev/null
+++ b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/logging.properties
@@ -0,0 +1,30 @@
+#  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.
+# apache's log4j is used to provide system logging.
+log4j.rootCategory=INFO, Console
+
+# The console appender
+log4j.appender.Console=org.apache.log4j.ConsoleAppender
+log4j.appender.Console.target=System.out
+log4j.appender.Console.layout=org.apache.log4j.PatternLayout
+log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE}  [%-20c{1} %-10t %-5p]  %m%n
+
+log4j.appender.File=org.apache.log4j.RollingFileAppender
+log4j.appender.File.file=isis.log
+log4j.appender.File.append=false
+log4j.appender.File.layout=org.apache.log4j.PatternLayout
+log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p]  %m%n

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.allow
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.allow b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.allow
new file mode 100644
index 0000000..928983a
--- /dev/null
+++ b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.allow
@@ -0,0 +1,16 @@
+#  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.

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.passwords
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.passwords b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.passwords
new file mode 100644
index 0000000..7f07af5
--- /dev/null
+++ b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.passwords
@@ -0,0 +1,20 @@
+#  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.
+sven:pass
+dick:pass
+bob:pass
+joe:pass

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/viewer_html.properties
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/viewer_html.properties b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/viewer_html.properties
new file mode 100644
index 0000000..29b4425
--- /dev/null
+++ b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/viewer_html.properties
@@ -0,0 +1,19 @@
+#  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.
+isis.viewer.html.header=<div id="site-header"><div id="site-logo">&nbsp;</div></div>
+isis.viewer.html.footer=<div id="page-footer"><small>Powered by Apache Isis</small></div>
+isis.viewer.html.port=8080


[20/20] git commit: ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
ISIS-381: mothballing HTML viewer, SQL security, LDAP security


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/91a8000b
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/91a8000b
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/91a8000b

Branch: refs/heads/master
Commit: 91a8000ba06e3622f75a86a94293e827f05179d4
Parents: 39500cd
Author: Dan Haywood <da...@apache.org>
Authored: Thu Mar 28 10:34:42 2013 +0000
Committer: Dan Haywood <da...@apache.org>
Committed: Thu Mar 28 10:34:42 2013 +0000

----------------------------------------------------------------------
 component/security/ldap/NOTICE                     |    7 -
 component/security/ldap/ldap-conf/example.ldif     |   46 -
 component/security/ldap/ldap-conf/readme.txt       |   12 -
 component/security/ldap/ldap-conf/slapd.conf       |   80 --
 component/security/ldap/pom.xml                    |  119 --
 .../appended-resources/supplemental-models.xml     |  106 --
 .../LdapAuthenticationConstants.java               |   39 -
 .../LdapAuthenticationManagerInstaller.java        |   42 -
 .../ldap/authentication/LdapAuthenticator.java     |  116 --
 .../authorization/LdapAuthorizationConstants.java  |   44 -
 .../LdapAuthorizationManagerInstaller.java         |   39 -
 .../ldap/authorization/LdapAuthorizor.java         |  274 -----
 component/security/ldap/src/site/apt/index.apt     |   44 -
 component/security/ldap/src/site/apt/jottings.apt  |   24 -
 component/security/ldap/src/site/site.xml          |   41 -
 .../authentication/LdapAuthenticatorTester.java    |   53 -
 component/security/sql/NOTICE                      |    7 -
 .../sql/hsql-db/authenticator-tests.script         |   51 -
 component/security/sql/pom.xml                     |  125 --
 .../appended-resources/supplemental-models.xml     |  106 --
 .../authentication/SqlAuthenticationConstants.java |   27 -
 .../SqlAuthenticationManagerInstaller.java         |   70 --
 .../sql/authentication/SqlAuthenticator.java       |  325 -----
 .../SqlAuthorizationManagerInstaller.java          |   39 -
 .../security/sql/authorization/SqlAuthorizor.java  |   73 --
 component/security/sql/src/site.xml                |   41 -
 component/security/sql/src/site/apt/index.apt      |  124 --
 component/security/sql/src/site/apt/jottings.apt   |   24 -
 component/security/sql/src/site/site.xml           |   41 -
 .../sql/authentication/SqlAuthenticatorTest.java   |  114 --
 component/viewer/html/NOTICE                       |    7 -
 component/viewer/html/impl/pom.xml                 |  110 --
 .../impl/src/docbkx/guide/isis-html-viewer.xml     |  226 ----
 .../isis/viewer/html/HtmlViewerConstants.java      |   46 -
 .../isis/viewer/html/HtmlViewerInstaller.java      |   92 --
 .../org/apache/isis/viewer/html/PathBuilder.java   |   30 -
 .../isis/viewer/html/PathBuilderDefault.java       |   60 -
 .../org/apache/isis/viewer/html/action/Action.java |   32 -
 .../isis/viewer/html/action/ActionException.java   |   43 -
 .../isis/viewer/html/action/ChangeContext.java     |   39 -
 .../org/apache/isis/viewer/html/action/LogOut.java |   47 -
 .../apache/isis/viewer/html/action/Welcome.java    |   52 -
 .../html/action/edit/AddItemToCollection.java      |   56 -
 .../isis/viewer/html/action/edit/EditObject.java   |   52 -
 .../html/action/edit/RemoveItemFromCollection.java |   53 -
 .../apache/isis/viewer/html/action/edit/Save.java  |   65 -
 .../apache/isis/viewer/html/action/misc/About.java |   50 -
 .../isis/viewer/html/action/misc/SetUser.java      |   47 -
 .../isis/viewer/html/action/misc/SwapUser.java     |   80 --
 .../viewer/html/action/view/CollectionView.java    |   80 --
 .../html/action/view/FieldCollectionView.java      |   60 -
 .../isis/viewer/html/action/view/ObjectView.java   |  129 --
 .../html/action/view/ObjectViewAbstract.java       |   89 --
 .../isis/viewer/html/action/view/ServiceView.java  |   38 -
 .../viewer/html/action/view/util/MenuUtil.java     |  110 --
 .../viewer/html/action/view/util/TableUtil.java    |  133 --
 .../apache/isis/viewer/html/component/Block.java   |   26 -
 .../isis/viewer/html/component/Component.java      |   27 -
 .../viewer/html/component/ComponentAbstract.java   |   64 -
 .../viewer/html/component/ComponentComposite.java  |   66 -
 .../viewer/html/component/ComponentFactory.java    |   82 --
 .../isis/viewer/html/component/DebugPane.java      |   32 -
 .../apache/isis/viewer/html/component/Form.java    |   44 -
 .../apache/isis/viewer/html/component/Page.java    |   40 -
 .../apache/isis/viewer/html/component/Table.java   |   36 -
 .../isis/viewer/html/component/ViewPane.java       |   35 -
 .../html/component/html/AbstractHtmlPage.java      |  129 --
 .../html/component/html/ActionComponent.java       |   74 --
 .../viewer/html/component/html/BreadCrumbs.java    |   66 -
 .../isis/viewer/html/component/html/Checkbox.java  |   50 -
 .../viewer/html/component/html/CollectionIcon.java |   80 --
 .../viewer/html/component/html/CollectionLink.java |   77 --
 .../isis/viewer/html/component/html/Div.java       |   86 --
 .../html/component/html/DynamicHtmlPage.java       |   81 --
 .../viewer/html/component/html/ErrorMessage.java   |   48 -
 .../isis/viewer/html/component/html/Heading.java   |   50 -
 .../isis/viewer/html/component/html/Html.java      |   40 -
 .../html/component/html/HtmlComponentFactory.java  |  309 -----
 .../isis/viewer/html/component/html/HtmlDebug.java |   69 --
 .../viewer/html/component/html/HtmlException.java  |   42 -
 .../isis/viewer/html/component/html/HtmlForm.java  |  183 ---
 .../isis/viewer/html/component/html/HtmlTable.java |  115 --
 .../isis/viewer/html/component/html/Link.java      |   50 -
 .../viewer/html/component/html/LogonFormPage.java  |   91 --
 .../isis/viewer/html/component/html/MenuItem.java  |  101 --
 .../viewer/html/component/html/ObjectIcon.java     |   78 --
 .../html/component/html/RegisterFormPage.java      |   87 --
 .../isis/viewer/html/component/html/Row.java       |   60 -
 .../html/component/html/ServiceComponent.java      |   62 -
 .../isis/viewer/html/component/html/Span.java      |   55 -
 .../isis/viewer/html/component/html/Submenu.java   |   46 -
 .../viewer/html/component/html/TableHeader.java    |   44 -
 .../isis/viewer/html/component/html/TextBlock.java |   56 -
 .../viewer/html/component/html/UserSwapLink.java   |   52 -
 .../isis/viewer/html/component/html/ViewDiv.java   |  145 ---
 .../html/component/html/WebViewerException.java    |   43 -
 .../viewer/html/context/CollectionMapping.java     |  154 ---
 .../apache/isis/viewer/html/context/Context.java   |  654 ----------
 .../isis/viewer/html/context/HistoryEntry.java     |   49 -
 .../isis/viewer/html/context/ObjectHistory.java    |  109 --
 .../viewer/html/context/ObjectLookupException.java |   42 -
 .../html/context/PersistentRootAdapterMapping.java |  119 --
 .../viewer/html/context/RootAdapterMapping.java    |   41 -
 .../html/context/RootAdapterMappingAbstract.java   |  114 --
 .../html/context/TransientRootAdapterMapping.java  |   95 --
 .../isis/viewer/html/crumb/CollectionCrumb.java    |   58 -
 .../org/apache/isis/viewer/html/crumb/Crumb.java   |   33 -
 .../apache/isis/viewer/html/crumb/ObjectCrumb.java |   66 -
 .../isis/viewer/html/crumb/ObjectFieldCrumb.java   |   54 -
 .../apache/isis/viewer/html/crumb/TaskCrumb.java   |   62 -
 .../apache/isis/viewer/html/image/ImageLookup.java |   66 -
 .../isis/viewer/html/image/ImageProvider.java      |   47 -
 .../viewer/html/image/ImageProviderAbstract.java   |  123 --
 .../html/image/ImageProviderDirectoryBased.java    |  160 ---
 .../image/ImageProviderDirectoryBasedReworked.java |   60 -
 .../html/image/ImageProviderResourceBased.java     |   72 --
 .../isis/viewer/html/request/ForwardRequest.java   |  138 ---
 .../apache/isis/viewer/html/request/Request.java   |   72 --
 .../isis/viewer/html/request/ServletRequest.java   |   98 --
 .../html/servlet/AbstractHtmlViewerServlet.java    |   82 --
 .../viewer/html/servlet/ControllerServlet.java     |  154 ---
 .../viewer/html/servlet/HtmlServletConstants.java  |   48 -
 .../isis/viewer/html/servlet/LogonServlet.java     |  124 --
 .../isis/viewer/html/servlet/RegisterServlet.java  |   98 --
 .../html/servlet/internal/WebController.java       |  460 -------
 .../viewer/html/task/AddItemToCollectionTask.java  |   95 --
 .../org/apache/isis/viewer/html/task/EditTask.java |  231 ----
 .../apache/isis/viewer/html/task/InvokeMethod.java |  129 --
 .../apache/isis/viewer/html/task/MethodTask.java   |  135 ---
 .../org/apache/isis/viewer/html/task/Task.java     |  394 ------
 .../isis/viewer/html/task/TaskLookupException.java |   42 -
 .../org/apache/isis/viewer/html/task/TaskStep.java |  238 ----
 .../src/main/resources/default-images/arrow.gif    |  Bin 160 -> 0 bytes
 .../main/resources/default-images/bg-button.gif    |  Bin 106 -> 0 bytes
 .../src/main/resources/default-images/branch.gif   |  Bin 74 -> 0 bytes
 .../resources/default-images/breadcrumbs-bg.gif    |  Bin 183 -> 0 bytes
 .../main/resources/default-images/button-bg1.gif   |  Bin 305 -> 0 bytes
 .../main/resources/default-images/button-bg2.gif   |  Bin 305 -> 0 bytes
 .../src/main/resources/default-images/help.gif     |  Bin 741 -> 0 bytes
 .../src/main/resources/default-images/logo-bg.gif  |  Bin 79 -> 0 bytes
 .../src/main/resources/default-images/logo-bg2.gif |  Bin 391 -> 0 bytes
 .../src/main/resources/default-images/menu-bg.gif  |  Bin 453 -> 0 bytes
 .../src/main/resources/default-images/menu-bg2.gif |  Bin 69 -> 0 bytes
 .../resources/default-images/object-header-bg.gif  |  Bin 362 -> 0 bytes
 .../resources/default-images/page-header-bg.jpg    |  Bin 413 -> 0 bytes
 .../resources/default-images/page-header-bg1.gif   |  Bin 165 -> 0 bytes
 .../resources/default-images/page-header-bg2.jpg   |  Bin 436 -> 0 bytes
 .../resources/default-images/poweredby-logo.png    |  Bin 8461 -> 0 bytes
 .../resources/default-images/shadow-bottom.gif     |  Bin 111 -> 0 bytes
 .../main/resources/default-images/sign-info.png    |  Bin 418 -> 0 bytes
 .../main/resources/default-images/sign-warning.png |  Bin 531 -> 0 bytes
 .../resources/default-images/site-header-bg.jpg    |  Bin 9975 -> 0 bytes
 .../resources/default-images/submenu-bullet.gif    |  Bin 51 -> 0 bytes
 .../main/resources/default-images/tab-bar-bg.gif   |  Bin 221 -> 0 bytes
 .../main/resources/default-images/tab-off-bg.gif   |  Bin 1150 -> 0 bytes
 .../main/resources/default-images/tab-on-bg.gif    |  Bin 1119 -> 0 bytes
 .../html/impl/src/main/resources/default.css       |  939 ---------------
 .../html/impl/src/main/resources/htmlviewer.js     |   22 -
 .../impl/src/main/resources/images/Default.png     |  Bin 3016 -> 0 bytes
 .../html/impl/src/main/resources/images/banner.png |  Bin 30394 -> 0 bytes
 .../impl/src/main/src-archived/MonitorServlet.java |  101 --
 .../impl/src/main/src-archived/SessionAccess.java  |  183 ---
 .../impl/src/main/src-archived/SessionList.java    |   53 -
 component/viewer/html/impl/src/site/apt/index.apt  |   47 -
 .../viewer/html/impl/src/site/apt/jottings.apt     |   71 --
 component/viewer/html/impl/src/site/site.xml       |   50 -
 .../viewer/html/context/ContextTest_mapAction.java |   98 --
 .../html/context/ContextTest_mapCollection.java    |  159 ---
 .../viewer/html/context/ContextTest_mapObject.java |  266 ----
 .../html/context/ContextTest_serialization.java    |   97 --
 .../isis/viewer/html/context/ObjectActionNoop.java |  312 -----
 .../request/ImageProviderResourceBasedTest.java    |   65 -
 .../impl/src/test/resources/images/Customer.gif    |  Bin 1475 -> 0 bytes
 .../impl/src/test/resources/images/Service.png     |  Bin 2129 -> 0 bytes
 component/viewer/html/monitoring/pom.xml           |   51 -
 .../viewer/html/monitoring/MonitorServlet.java     |   87 --
 .../html/monitoring/WebServerMonitorInstaller.java |   45 -
 .../servermonitor/AbstractServerMonitor.java       |   99 --
 .../servermonitor/HttpServerMonitor.java           |  104 --
 .../html/monitoring/servermonitor/Monitor.java     |   56 -
 .../monitoring/servermonitor/MonitorEvent.java     |   70 --
 .../monitoring/servermonitor/MonitorListener.java  |   24 -
 .../servermonitor/MonitorListenerImpl.java         |  150 ---
 .../servermonitor/SocketServerMonitor.java         |   71 --
 .../html/monitoring/systemconsole/AWTConsole.java  |  201 ---
 .../html/monitoring/systemconsole/FileConsole.java |   57 -
 .../monitoring/systemconsole/QuitListener.java     |   32 -
 .../html/monitoring/systemconsole/Server.java      |   26 -
 .../monitoring/systemconsole/ServerConsole.java    |   31 -
 .../monitoring/systemconsole/ServerResponse.java   |   26 -
 .../monitoring/systemconsole/TerminalConsole.java  |  126 --
 .../viewer/html/monitoring/src/site/apt/index.apt  |   31 -
 .../html/monitoring/src/site/apt/jottings.apt      |   43 -
 component/viewer/html/monitoring/src/site/site.xml |   45 -
 component/viewer/html/pom.xml                      |  111 --
 .../appended-resources/supplemental-models.xml     |  106 --
 .../tck/ide/eclipse/launch/viewer-html-tck.launch  |   19 -
 component/viewer/html/tck/pom.xml                  |  140 ---
 .../html/tck/src/main/resources/images/Default.png |  Bin 3016 -> 0 bytes
 .../tck/src/main/webapp/WEB-INF/isis.properties    |   57 -
 .../tck/src/main/webapp/WEB-INF/logging.properties |   30 -
 .../src/main/webapp/WEB-INF/security_file.allow    |   16 -
 .../main/webapp/WEB-INF/security_file.passwords    |   20 -
 .../src/main/webapp/WEB-INF/viewer_html.properties |   19 -
 .../html/tck/src/main/webapp/WEB-INF/web.xml       |  130 --
 .../viewer/html/tck/src/main/webapp/default.css    |  933 --------------
 .../html/tck/src/main/webapp/images/banner-bg.png  |  Bin 936 -> 0 bytes
 .../html/tck/src/main/webapp/images/banner.png     |  Bin 30394 -> 0 bytes
 .../quickstart_html_sql/dom/log4j.properties       |   24 -
 .../application/quickstart_html_sql/dom/pom.xml    |   39 -
 .../dom/src/main/java/dom/todo/ToDoItem.java       |  225 ----
 .../dom/src/main/java/dom/todo/ToDoItems.java      |  139 ---
 .../dom/src/main/resources/images/AuditEntry.png   |  Bin 2215 -> 0 bytes
 .../dom/src/main/resources/images/ToDoItem.gif     |  Bin 1592 -> 0 bytes
 .../quickstart_html_sql/fixture/pom.xml            |   40 -
 .../src/main/java/fixture/LogonAsSvenFixture.java  |   30 -
 .../main/java/fixture/todo/ToDoItemsFixture.java   |   74 --
 .../fixture/todo/ToDoItemsFixturesService.java     |   46 -
 example/application/quickstart_html_sql/pom.xml    |  261 ----
 .../viewer-html/hsql-db/tests.lck                  |  Bin 16 -> 0 bytes
 .../viewer-html/hsql-db/tests.log                  |    2 -
 .../viewer-html/hsql-db/tests.properties           |    4 -
 .../viewer-html/hsql-db/tests.script               |   46 -
 .../eclipse/launch/quickstart-viewer-html.launch   |   20 -
 .../quickstart_html_sql/viewer-html/lib/.gitignore |    5 -
 .../quickstart_html_sql/viewer-html/pom.xml        |  186 ---
 .../src/main/jettyconsole/isis-banner.pdn          |  Bin 64679 -> 0 bytes
 .../src/main/jettyconsole/isis-banner.png          |  Bin 24486 -> 0 bytes
 .../src/main/resources/images/Default.png          |  Bin 3016 -> 0 bytes
 .../webapp/WEB-INF/authentication_file.passwords   |   28 -
 .../webapp/WEB-INF/authentication_file.properties  |   25 -
 .../main/webapp/WEB-INF/authorization_file.allow   |   28 -
 .../webapp/WEB-INF/authorization_file.properties   |   47 -
 .../src/main/webapp/WEB-INF/isis.properties        |  180 ---
 .../src/main/webapp/WEB-INF/logging.properties     |   89 --
 .../main/webapp/WEB-INF/persistor_sql.properties   |   72 --
 .../src/main/webapp/WEB-INF/viewer_html.properties |   31 -
 .../viewer-html/src/main/webapp/WEB-INF/web.xml    |  233 ----
 .../main/webapp/htmlviewer/images/banner-bg.png    |  Bin 936 -> 0 bytes
 .../src/main/webapp/htmlviewer/images/banner.png   |  Bin 30394 -> 0 bytes
 .../src/main/webapp/htmlviewer/style/default.css   |  928 --------------
 mothballed/README.md                               |   11 +
 mothballed/component/security/ldap/NOTICE          |    7 +
 .../component/security/ldap/ldap-conf/example.ldif |   46 +
 .../component/security/ldap/ldap-conf/readme.txt   |   12 +
 .../component/security/ldap/ldap-conf/slapd.conf   |   80 ++
 mothballed/component/security/ldap/pom.xml         |  119 ++
 .../appended-resources/supplemental-models.xml     |  106 ++
 .../LdapAuthenticationConstants.java               |   39 +
 .../LdapAuthenticationManagerInstaller.java        |   42 +
 .../ldap/authentication/LdapAuthenticator.java     |  116 ++
 .../authorization/LdapAuthorizationConstants.java  |   44 +
 .../LdapAuthorizationManagerInstaller.java         |   39 +
 .../ldap/authorization/LdapAuthorizor.java         |  274 +++++
 .../component/security/ldap/src/site/apt/index.apt |   44 +
 .../security/ldap/src/site/apt/jottings.apt        |   24 +
 .../component/security/ldap/src/site/site.xml      |   41 +
 .../authentication/LdapAuthenticatorTester.java    |   53 +
 mothballed/component/security/sql/NOTICE           |    7 +
 .../sql/hsql-db/authenticator-tests.script         |   51 +
 mothballed/component/security/sql/pom.xml          |  125 ++
 .../appended-resources/supplemental-models.xml     |  106 ++
 .../authentication/SqlAuthenticationConstants.java |   27 +
 .../SqlAuthenticationManagerInstaller.java         |   70 ++
 .../sql/authentication/SqlAuthenticator.java       |  325 +++++
 .../SqlAuthorizationManagerInstaller.java          |   39 +
 .../security/sql/authorization/SqlAuthorizor.java  |   73 ++
 mothballed/component/security/sql/src/site.xml     |   41 +
 .../component/security/sql/src/site/apt/index.apt  |  124 ++
 .../security/sql/src/site/apt/jottings.apt         |   24 +
 .../component/security/sql/src/site/site.xml       |   41 +
 .../sql/authentication/SqlAuthenticatorTest.java   |  114 ++
 mothballed/component/viewer/html/NOTICE            |    7 +
 mothballed/component/viewer/html/impl/pom.xml      |  110 ++
 .../impl/src/docbkx/guide/isis-html-viewer.xml     |  226 ++++
 .../isis/viewer/html/HtmlViewerConstants.java      |   46 +
 .../isis/viewer/html/HtmlViewerInstaller.java      |   92 ++
 .../org/apache/isis/viewer/html/PathBuilder.java   |   30 +
 .../isis/viewer/html/PathBuilderDefault.java       |   60 +
 .../org/apache/isis/viewer/html/action/Action.java |   32 +
 .../isis/viewer/html/action/ActionException.java   |   43 +
 .../isis/viewer/html/action/ChangeContext.java     |   39 +
 .../org/apache/isis/viewer/html/action/LogOut.java |   47 +
 .../apache/isis/viewer/html/action/Welcome.java    |   52 +
 .../html/action/edit/AddItemToCollection.java      |   56 +
 .../isis/viewer/html/action/edit/EditObject.java   |   52 +
 .../html/action/edit/RemoveItemFromCollection.java |   53 +
 .../apache/isis/viewer/html/action/edit/Save.java  |   65 +
 .../apache/isis/viewer/html/action/misc/About.java |   50 +
 .../isis/viewer/html/action/misc/SetUser.java      |   47 +
 .../isis/viewer/html/action/misc/SwapUser.java     |   80 ++
 .../viewer/html/action/view/CollectionView.java    |   80 ++
 .../html/action/view/FieldCollectionView.java      |   60 +
 .../isis/viewer/html/action/view/ObjectView.java   |  129 ++
 .../html/action/view/ObjectViewAbstract.java       |   89 ++
 .../isis/viewer/html/action/view/ServiceView.java  |   38 +
 .../viewer/html/action/view/util/MenuUtil.java     |  110 ++
 .../viewer/html/action/view/util/TableUtil.java    |  133 ++
 .../apache/isis/viewer/html/component/Block.java   |   26 +
 .../isis/viewer/html/component/Component.java      |   27 +
 .../viewer/html/component/ComponentAbstract.java   |   64 +
 .../viewer/html/component/ComponentComposite.java  |   66 +
 .../viewer/html/component/ComponentFactory.java    |   82 ++
 .../isis/viewer/html/component/DebugPane.java      |   32 +
 .../apache/isis/viewer/html/component/Form.java    |   44 +
 .../apache/isis/viewer/html/component/Page.java    |   40 +
 .../apache/isis/viewer/html/component/Table.java   |   36 +
 .../isis/viewer/html/component/ViewPane.java       |   35 +
 .../html/component/html/AbstractHtmlPage.java      |  129 ++
 .../html/component/html/ActionComponent.java       |   74 ++
 .../viewer/html/component/html/BreadCrumbs.java    |   66 +
 .../isis/viewer/html/component/html/Checkbox.java  |   50 +
 .../viewer/html/component/html/CollectionIcon.java |   80 ++
 .../viewer/html/component/html/CollectionLink.java |   77 ++
 .../isis/viewer/html/component/html/Div.java       |   86 ++
 .../html/component/html/DynamicHtmlPage.java       |   81 ++
 .../viewer/html/component/html/ErrorMessage.java   |   48 +
 .../isis/viewer/html/component/html/Heading.java   |   50 +
 .../isis/viewer/html/component/html/Html.java      |   40 +
 .../html/component/html/HtmlComponentFactory.java  |  309 +++++
 .../isis/viewer/html/component/html/HtmlDebug.java |   69 ++
 .../viewer/html/component/html/HtmlException.java  |   42 +
 .../isis/viewer/html/component/html/HtmlForm.java  |  183 +++
 .../isis/viewer/html/component/html/HtmlTable.java |  115 ++
 .../isis/viewer/html/component/html/Link.java      |   50 +
 .../viewer/html/component/html/LogonFormPage.java  |   91 ++
 .../isis/viewer/html/component/html/MenuItem.java  |  101 ++
 .../viewer/html/component/html/ObjectIcon.java     |   78 ++
 .../html/component/html/RegisterFormPage.java      |   87 ++
 .../isis/viewer/html/component/html/Row.java       |   60 +
 .../html/component/html/ServiceComponent.java      |   62 +
 .../isis/viewer/html/component/html/Span.java      |   55 +
 .../isis/viewer/html/component/html/Submenu.java   |   46 +
 .../viewer/html/component/html/TableHeader.java    |   44 +
 .../isis/viewer/html/component/html/TextBlock.java |   56 +
 .../viewer/html/component/html/UserSwapLink.java   |   52 +
 .../isis/viewer/html/component/html/ViewDiv.java   |  145 +++
 .../html/component/html/WebViewerException.java    |   43 +
 .../viewer/html/context/CollectionMapping.java     |  154 +++
 .../apache/isis/viewer/html/context/Context.java   |  654 ++++++++++
 .../isis/viewer/html/context/HistoryEntry.java     |   49 +
 .../isis/viewer/html/context/ObjectHistory.java    |  109 ++
 .../viewer/html/context/ObjectLookupException.java |   42 +
 .../html/context/PersistentRootAdapterMapping.java |  119 ++
 .../viewer/html/context/RootAdapterMapping.java    |   41 +
 .../html/context/RootAdapterMappingAbstract.java   |  114 ++
 .../html/context/TransientRootAdapterMapping.java  |   95 ++
 .../isis/viewer/html/crumb/CollectionCrumb.java    |   58 +
 .../org/apache/isis/viewer/html/crumb/Crumb.java   |   33 +
 .../apache/isis/viewer/html/crumb/ObjectCrumb.java |   66 +
 .../isis/viewer/html/crumb/ObjectFieldCrumb.java   |   54 +
 .../apache/isis/viewer/html/crumb/TaskCrumb.java   |   62 +
 .../apache/isis/viewer/html/image/ImageLookup.java |   66 +
 .../isis/viewer/html/image/ImageProvider.java      |   47 +
 .../viewer/html/image/ImageProviderAbstract.java   |  123 ++
 .../html/image/ImageProviderDirectoryBased.java    |  160 +++
 .../image/ImageProviderDirectoryBasedReworked.java |   60 +
 .../html/image/ImageProviderResourceBased.java     |   72 ++
 .../isis/viewer/html/request/ForwardRequest.java   |  138 +++
 .../apache/isis/viewer/html/request/Request.java   |   72 ++
 .../isis/viewer/html/request/ServletRequest.java   |   98 ++
 .../html/servlet/AbstractHtmlViewerServlet.java    |   82 ++
 .../viewer/html/servlet/ControllerServlet.java     |  154 +++
 .../viewer/html/servlet/HtmlServletConstants.java  |   48 +
 .../isis/viewer/html/servlet/LogonServlet.java     |  124 ++
 .../isis/viewer/html/servlet/RegisterServlet.java  |   98 ++
 .../html/servlet/internal/WebController.java       |  460 +++++++
 .../viewer/html/task/AddItemToCollectionTask.java  |   95 ++
 .../org/apache/isis/viewer/html/task/EditTask.java |  231 ++++
 .../apache/isis/viewer/html/task/InvokeMethod.java |  129 ++
 .../apache/isis/viewer/html/task/MethodTask.java   |  135 +++
 .../org/apache/isis/viewer/html/task/Task.java     |  394 ++++++
 .../isis/viewer/html/task/TaskLookupException.java |   42 +
 .../org/apache/isis/viewer/html/task/TaskStep.java |  238 ++++
 .../src/main/resources/default-images/arrow.gif    |  Bin 0 -> 160 bytes
 .../main/resources/default-images/bg-button.gif    |  Bin 0 -> 106 bytes
 .../src/main/resources/default-images/branch.gif   |  Bin 0 -> 74 bytes
 .../resources/default-images/breadcrumbs-bg.gif    |  Bin 0 -> 183 bytes
 .../main/resources/default-images/button-bg1.gif   |  Bin 0 -> 305 bytes
 .../main/resources/default-images/button-bg2.gif   |  Bin 0 -> 305 bytes
 .../src/main/resources/default-images/help.gif     |  Bin 0 -> 741 bytes
 .../src/main/resources/default-images/logo-bg.gif  |  Bin 0 -> 79 bytes
 .../src/main/resources/default-images/logo-bg2.gif |  Bin 0 -> 391 bytes
 .../src/main/resources/default-images/menu-bg.gif  |  Bin 0 -> 453 bytes
 .../src/main/resources/default-images/menu-bg2.gif |  Bin 0 -> 69 bytes
 .../resources/default-images/object-header-bg.gif  |  Bin 0 -> 362 bytes
 .../resources/default-images/page-header-bg.jpg    |  Bin 0 -> 413 bytes
 .../resources/default-images/page-header-bg1.gif   |  Bin 0 -> 165 bytes
 .../resources/default-images/page-header-bg2.jpg   |  Bin 0 -> 436 bytes
 .../resources/default-images/poweredby-logo.png    |  Bin 0 -> 8461 bytes
 .../resources/default-images/shadow-bottom.gif     |  Bin 0 -> 111 bytes
 .../main/resources/default-images/sign-info.png    |  Bin 0 -> 418 bytes
 .../main/resources/default-images/sign-warning.png |  Bin 0 -> 531 bytes
 .../resources/default-images/site-header-bg.jpg    |  Bin 0 -> 9975 bytes
 .../resources/default-images/submenu-bullet.gif    |  Bin 0 -> 51 bytes
 .../main/resources/default-images/tab-bar-bg.gif   |  Bin 0 -> 221 bytes
 .../main/resources/default-images/tab-off-bg.gif   |  Bin 0 -> 1150 bytes
 .../main/resources/default-images/tab-on-bg.gif    |  Bin 0 -> 1119 bytes
 .../html/impl/src/main/resources/default.css       |  939 +++++++++++++++
 .../html/impl/src/main/resources/htmlviewer.js     |   22 +
 .../impl/src/main/resources/images/Default.png     |  Bin 0 -> 3016 bytes
 .../html/impl/src/main/resources/images/banner.png |  Bin 0 -> 30394 bytes
 .../impl/src/main/src-archived/MonitorServlet.java |  101 ++
 .../impl/src/main/src-archived/SessionAccess.java  |  183 +++
 .../impl/src/main/src-archived/SessionList.java    |   53 +
 .../viewer/html/impl/src/site/apt/index.apt        |   47 +
 .../viewer/html/impl/src/site/apt/jottings.apt     |   71 ++
 .../component/viewer/html/impl/src/site/site.xml   |   50 +
 .../viewer/html/context/ContextTest_mapAction.java |   98 ++
 .../html/context/ContextTest_mapCollection.java    |  159 +++
 .../viewer/html/context/ContextTest_mapObject.java |  266 ++++
 .../html/context/ContextTest_serialization.java    |   97 ++
 .../isis/viewer/html/context/ObjectActionNoop.java |  312 +++++
 .../request/ImageProviderResourceBasedTest.java    |   65 +
 .../impl/src/test/resources/images/Customer.gif    |  Bin 0 -> 1475 bytes
 .../impl/src/test/resources/images/Service.png     |  Bin 0 -> 2129 bytes
 .../component/viewer/html/monitoring/pom.xml       |   51 +
 .../viewer/html/monitoring/MonitorServlet.java     |   87 ++
 .../html/monitoring/WebServerMonitorInstaller.java |   45 +
 .../servermonitor/AbstractServerMonitor.java       |   99 ++
 .../servermonitor/HttpServerMonitor.java           |  104 ++
 .../html/monitoring/servermonitor/Monitor.java     |   56 +
 .../monitoring/servermonitor/MonitorEvent.java     |   70 ++
 .../monitoring/servermonitor/MonitorListener.java  |   24 +
 .../servermonitor/MonitorListenerImpl.java         |  150 +++
 .../servermonitor/SocketServerMonitor.java         |   71 ++
 .../html/monitoring/systemconsole/AWTConsole.java  |  201 +++
 .../html/monitoring/systemconsole/FileConsole.java |   57 +
 .../monitoring/systemconsole/QuitListener.java     |   32 +
 .../html/monitoring/systemconsole/Server.java      |   26 +
 .../monitoring/systemconsole/ServerConsole.java    |   31 +
 .../monitoring/systemconsole/ServerResponse.java   |   26 +
 .../monitoring/systemconsole/TerminalConsole.java  |  126 ++
 .../viewer/html/monitoring/src/site/apt/index.apt  |   31 +
 .../html/monitoring/src/site/apt/jottings.apt      |   43 +
 .../viewer/html/monitoring/src/site/site.xml       |   45 +
 mothballed/component/viewer/html/pom.xml           |  111 ++
 .../appended-resources/supplemental-models.xml     |  106 ++
 .../tck/ide/eclipse/launch/viewer-html-tck.launch  |   19 +
 mothballed/component/viewer/html/tck/pom.xml       |  140 +++
 .../html/tck/src/main/resources/images/Default.png |  Bin 0 -> 3016 bytes
 .../tck/src/main/webapp/WEB-INF/isis.properties    |   57 +
 .../tck/src/main/webapp/WEB-INF/logging.properties |   30 +
 .../src/main/webapp/WEB-INF/security_file.allow    |   16 +
 .../main/webapp/WEB-INF/security_file.passwords    |   20 +
 .../src/main/webapp/WEB-INF/viewer_html.properties |   19 +
 .../html/tck/src/main/webapp/WEB-INF/web.xml       |  130 ++
 .../viewer/html/tck/src/main/webapp/default.css    |  933 ++++++++++++++
 .../html/tck/src/main/webapp/images/banner-bg.png  |  Bin 0 -> 936 bytes
 .../html/tck/src/main/webapp/images/banner.png     |  Bin 0 -> 30394 bytes
 .../quickstart_html_sql/dom/log4j.properties       |   24 +
 .../application/quickstart_html_sql/dom/pom.xml    |   39 +
 .../dom/src/main/java/dom/todo/ToDoItem.java       |  225 ++++
 .../dom/src/main/java/dom/todo/ToDoItems.java      |  139 +++
 .../dom/src/main/resources/images/AuditEntry.png   |  Bin 0 -> 2215 bytes
 .../dom/src/main/resources/images/ToDoItem.gif     |  Bin 0 -> 1592 bytes
 .../quickstart_html_sql/fixture/pom.xml            |   40 +
 .../src/main/java/fixture/LogonAsSvenFixture.java  |   30 +
 .../main/java/fixture/todo/ToDoItemsFixture.java   |   74 ++
 .../fixture/todo/ToDoItemsFixturesService.java     |   46 +
 .../application/quickstart_html_sql/pom.xml        |  261 ++++
 .../viewer-html/hsql-db/tests.lck                  |  Bin 0 -> 16 bytes
 .../viewer-html/hsql-db/tests.log                  |    2 +
 .../viewer-html/hsql-db/tests.properties           |    4 +
 .../viewer-html/hsql-db/tests.script               |   46 +
 .../eclipse/launch/quickstart-viewer-html.launch   |   20 +
 .../quickstart_html_sql/viewer-html/lib/.gitignore |    5 +
 .../quickstart_html_sql/viewer-html/pom.xml        |  186 +++
 .../src/main/jettyconsole/isis-banner.pdn          |  Bin 0 -> 64679 bytes
 .../src/main/jettyconsole/isis-banner.png          |  Bin 0 -> 24486 bytes
 .../src/main/resources/images/Default.png          |  Bin 0 -> 3016 bytes
 .../webapp/WEB-INF/authentication_file.passwords   |   28 +
 .../webapp/WEB-INF/authentication_file.properties  |   25 +
 .../main/webapp/WEB-INF/authorization_file.allow   |   28 +
 .../webapp/WEB-INF/authorization_file.properties   |   47 +
 .../src/main/webapp/WEB-INF/isis.properties        |  180 +++
 .../src/main/webapp/WEB-INF/logging.properties     |   89 ++
 .../main/webapp/WEB-INF/persistor_sql.properties   |   72 ++
 .../src/main/webapp/WEB-INF/viewer_html.properties |   31 +
 .../viewer-html/src/main/webapp/WEB-INF/web.xml    |  233 ++++
 .../main/webapp/htmlviewer/images/banner-bg.png    |  Bin 0 -> 936 bytes
 .../src/main/webapp/htmlviewer/images/banner.png   |  Bin 0 -> 30394 bytes
 .../src/main/webapp/htmlviewer/style/default.css   |  928 ++++++++++++++
 pom.xml                                            |    4 -
 484 files changed, 19948 insertions(+), 19941 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/NOTICE
----------------------------------------------------------------------
diff --git a/component/security/ldap/NOTICE b/component/security/ldap/NOTICE
deleted file mode 100644
index ba21d0c..0000000
--- a/component/security/ldap/NOTICE
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Isis
-Copyright 2010-2013 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/ldap-conf/example.ldif
----------------------------------------------------------------------
diff --git a/component/security/ldap/ldap-conf/example.ldif b/component/security/ldap/ldap-conf/example.ldif
deleted file mode 100644
index 1ede7b0..0000000
--- a/component/security/ldap/ldap-conf/example.ldif
+++ /dev/null
@@ -1,46 +0,0 @@
-dn: dc=isis,dc=org
-objectClass: top
-objectclass: dcObject
-objectclass: organization
-o: [[NAME]] Group
-dc: isis
-
-dn: cn=Manager,dc=isis,dc=org
-objectclass: organizationalRole
-cn: Manager
-
-
-dn: ou=people,dc=isis,dc=org
-objectClass: top
-objectClass: organizationalUnit
-ou: people
-
-dn: uid=joe,ou=people,dc=isis,dc=org
-objectClass: person
-objectClass: inetOrgPerson
-cn: Joe Bloggs
-displayName: Joe Bloggs
-givenName: Joe
-sn: Bloggs
-uid: joe
-userPassword: pass
-
-dn: uid=john,ou=people,dc=isis,dc=org
-objectClass: person
-objectClass: inetOrgPerson
-cn: John Bloggs
-displayName: John
-givenName: John
-sn: Bloggs
-uid: john
-userPassword: pass
-
-dn: uid=jack,ou=people,dc=isis,dc=org
-objectClass: person
-objectClass: inetOrgPerson
-cn: Jack Bloggs
-displayName: Jack Bloggs
-givenName: Jack
-sn: Bloggs
-uid: jack
-userPassword: pass
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/ldap-conf/readme.txt
----------------------------------------------------------------------
diff --git a/component/security/ldap/ldap-conf/readme.txt b/component/security/ldap/ldap-conf/readme.txt
deleted file mode 100644
index 8f0dbfb..0000000
--- a/component/security/ldap/ldap-conf/readme.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-An LDAP browser can be downloaded from http://jxplorer.org/
-Windows port of OpenLDAP is at http://lucas.bergmans.us/hacks/openldap/
-
-Files:
-
-example.ldif - sample file for loading into ldap (using ldapadd)
-  usage
-  ldapadd -x -D "cn=Manager,dc=<MY-DOMAIN>,dc=<COM>" -W -f example.ldif
-  e.g.
-  ldapadd -x -D "cn=Manager,dc=isis,dc=org" -W -f example.ldif
-
-slapd.conf - sample configuration for the OpenLDAP server (Windows port)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/ldap-conf/slapd.conf
----------------------------------------------------------------------
diff --git a/component/security/ldap/ldap-conf/slapd.conf b/component/security/ldap/ldap-conf/slapd.conf
deleted file mode 100644
index a5f32b7..0000000
--- a/component/security/ldap/ldap-conf/slapd.conf
+++ /dev/null
@@ -1,80 +0,0 @@
-# Setup for Windows port of OpenLDAP
-#
-# See slapd.conf(5) for details on configuration options.
-# This file should NOT be world readable.
-#
-ucdata-path	./ucdata
-include		./schema/core.schema
-# DGS - add JNDI support, inetorgperson has additional attributes for network users
-include		./schema/java.schema
-include		./schema/cosine.schema
-include		./schema/inetorgperson.schema
-
-# Define global ACLs to disable default read access.
-
-# Do not enable referrals until AFTER you have a working directory
-# service AND an understanding of referrals.
-#referral	ldap:/root.openldap.org
-
-pidfile		./run/slapd.pid
-argsfile	./run/slapd.args
-
-# Load dynamic backend modules:
-# modulepath	./libexec/openldap
-# moduleload	back_bdb.la
-# moduleload	back_ldap.la
-# moduleload	back_ldbm.la
-# moduleload	back_passwd.la
-# moduleload	back_shell.la
-
-# Sample security restrictions
-#	Require integrity protection (prevent hijacking)
-#	Require 112-bit (3DES or better) encryption for updates
-#	Require 63-bit encryption for simple bind
-# security ssf=1 update_ssf=112 simple_bind=64
-
-# Sample access control policy:
-#	Root DSE: allow anyone to read it
-#	Subschema (sub)entry DSE: allow anyone to read it
-#	Other DSEs:
-#		Allow self write access
-#		Allow authenticated users read access
-#		Allow anonymous users to authenticate
-#	Directives needed to implement policy:
-# access to dn.base="" by * read
-# access to dn.base="cn=Subschema" by * read
-# access to *
-#	by self write
-#	by users read
-#	by anonymous auth
-#
-# if no access controls are present, the default policy
-# allows anyone and everyone to read anything but restricts
-# updates to rootdn.  (e.g., "access to * by * read")
-#
-# rootdn can always read and write EVERYTHING!
-
-#######################################################################
-# BDB database definitions
-#######################################################################
-
-database	bdb
-# DGS - set suffix to isis
-#suffix		"dc=my-domain,dc=com"
-#rootdn		"cn=Manager,dc=my-domain,dc=com"
-suffix		"dc=isis,dc=org"
-rootdn		"cn=Manager,dc=isis,dc=org"
-
-# Cleartext passwords, especially for the rootdn, should
-# be avoid.  See slappasswd(8) and slapd.conf(5) for details.
-# Use of strong authentication encouraged.
-rootpw		secret
-# The database directory MUST exist prior to running slapd AND 
-# should only be accessible by the slapd and slap tools.
-# Mode 700 recommended.
-directory	./data
-# Indices to maintain
-index	objectClass	eq
-
-# DGS - improve index?
-index   cn,sn,st                   pres,eq,sub

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/pom.xml
----------------------------------------------------------------------
diff --git a/component/security/ldap/pom.xml b/component/security/ldap/pom.xml
deleted file mode 100644
index 8487518..0000000
--- a/component/security/ldap/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>org.apache.isis.core</groupId>
-		<artifactId>isis</artifactId>
-        <version>1.1.1-SNAPSHOT</version>
-		<relativePath>../../../core/pom.xml</relativePath>
-	</parent>
-
-	<groupId>org.apache.isis.security</groupId>
-	<artifactId>isis-security-ldap</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-
-	<name>Isis LDAP Security</name>
-
-	<properties>
-        <siteBaseDir>.</siteBaseDir>
-		<relativeUrl/>
-	</properties>
-
-    <!-- used in Site generation for relative references. -->
-    <url>http://isis.apache.org/${relativeUrl}</url>
-
-	<build>
-		<pluginManagement>
-			<plugins>
-                <!-- Apache Release Audit Tool -->
-                <plugin>
-                    <groupId>org.apache.rat</groupId>
-                    <artifactId>apache-rat-plugin</artifactId>
-                    <version>0.8</version>
-	                <configuration>
-	                    <excludes>
-	                    	<!-- 
-	                    	overriding inherited excludes from oia.core:isis 
-	                    	with a more specific set for this component
-	                    	 -->
-	                        <exclude>**/target/**</exclude>
-	                        <exclude>**/target-ide/**</exclude>
-
-	                        <exclude>**/*.project</exclude>
-	                        <exclude>**/.classpath</exclude>
-	                        <exclude>**/.settings/**</exclude>
-	                    </excludes>
-                    </configuration>
-	            </plugin>
-			</plugins>
-		</pluginManagement>
-	</build>
-
-    <reporting>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-project-info-reports-plugin</artifactId>
-				<version>${maven-project-info-reports-plugin}</version>
-                <inherited>false</inherited>
-                <configuration>
-                	<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
-                </configuration>
-                <reportSets>
-                    <reportSet>
-                        <inherited>false</inherited>
-                        <reports>
-                            <report>dependencies</report>
-                            <report>dependency-convergence</report>
-                            <report>plugins</report>
-                            <report>summary</report>
-                        </reports>
-                    </reportSet>
-                </reportSets>
-            </plugin>
-        </plugins>
-    </reporting>
-
-    <dependencyManagement>
-    	<!-- for benefit of application developers, using scope=import -->
-    	<dependencies>
-			<dependency>
-			    <groupId>org.apache.isis.security</groupId>
-			    <artifactId>isis-security-ldap</artifactId>
-				<version>1.0.0-SNAPSHOT</version>
-			</dependency>
-    	</dependencies>
-    </dependencyManagement>
-
-	<dependencies>
-		<dependency>
-		    <groupId>org.apache.isis.core</groupId>
-		    <artifactId>isis-core-runtime</artifactId>
-		</dependency>
-		<dependency>
-		    <groupId>org.apache.isis.core</groupId>
-		    <artifactId>isis-core-runtime</artifactId>
-		    <type>test-jar</type>
-		    <scope>test</scope>
-		</dependency>
-	</dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/src/main/appended-resources/supplemental-models.xml
----------------------------------------------------------------------
diff --git a/component/security/ldap/src/main/appended-resources/supplemental-models.xml b/component/security/ldap/src/main/appended-resources/supplemental-models.xml
deleted file mode 100644
index ecd3906..0000000
--- a/component/security/ldap/src/main/appended-resources/supplemental-models.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 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. -->
-<supplementalDataModels xmlns="http://maven.apache.org/supplemental-model/1.0.0"
-                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                        xsi:schemaLocation="http://maven.apache.org/supplemental-model/1.0.0 http://maven.apache.org/xsd/supplemental-model-1.0.0.xsd">
-
-  <supplement>
-    <project>
-      <groupId>aopalliance</groupId>
-      <artifactId>aopalliance</artifactId>
-      <version>1.0</version>
-      <licenses>
-          <license>
-              <name>Public Domain</name>
-          </license>
-      </licenses>
-    </project>
-  </supplement>
-
-  <supplement>
-   	<!-- not quite sure why licenses:download-license flags this, since license info seems to be in its POM -->
-    <project>
-		<groupId>org.datanucleus</groupId>
-	    <artifactId>datanucleus-jodatime</artifactId>
-	    <version>3.1.1</version>
-          <licenses>
-			<license>
-	            <name>The Apache Software License, Version 2.0</name>
-	            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-	        </license>
-	    </licenses>
-    </project>
-  </supplement>
-
-  <supplement>
-    <project>
-      <groupId>org.scannotation</groupId>
-      <artifactId>scannotation</artifactId>
-      <version>1.0.3</version>
-      <licenses>
-        <license>
-            <name>The Apache Software License, Version 2.0</name>
-            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-            <distribution>repo</distribution>          
-        </license>
-      </licenses>
-    </project>
-  </supplement>
-    
-  <supplement>
-    <project>
-      <groupId>dom4j</groupId>
-      <artifactId>dom4j</artifactId>
-      <version>1.6.1</version>
-      <licenses>
-        <license>
-            <name>BSD License</name>
-            <url>http://dom4j.sourceforge.net/dom4j-1.6.1/license.html</url>
-            <distribution>repo</distribution>          
-        </license>
-      </licenses>
-    </project>
-  </supplement>
-
-  <supplement>
-    <project>
-      <groupId>net.jcip</groupId>
-      <artifactId>jcip-annotations</artifactId>
-      <version>1.0</version>
-      <licenses>
-        <license>
-            <name>Creative Commons Attribution 2.5 License</name>
-            <url>http://creativecommons.org/licenses/by/2.5/</url>
-            <distribution>repo</distribution>          
-        </license>
-      </licenses>
-    </project>
-  </supplement>
-  
-
-  <supplement>
-    <project>
-      <groupId>xalan</groupId>
-      <artifactId>xalan</artifactId>
-      <version>2.7.0</version>
-      <licenses>
-        <license>
-            <name>The Apache Software License, Version 2.0</name>
-            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-            <distribution>repo</distribution>          
-        </license>
-      </licenses>
-    </project>
-  </supplement>
-
- 
-</supplementalDataModels>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationConstants.java
----------------------------------------------------------------------
diff --git a/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationConstants.java b/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationConstants.java
deleted file mode 100644
index 4997151..0000000
--- a/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationConstants.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  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.ldap.authentication;
-
-import org.apache.isis.core.commons.config.ConfigurationConstants;
-import org.apache.isis.core.runtime.authentication.AuthenticationManagerInstaller;
-
-public final class LdapAuthenticationConstants {
-
-    public static final String ROOT = ConfigurationConstants.ROOT + AuthenticationManagerInstaller.TYPE + "." + LdapAuthenticationManagerInstaller.NAME + ".";
-
-    public static final String SERVER_KEY = ROOT + "server";
-    public static final String SERVER_DEFAULT = "com.sun.jndi.ldap.LdapCtxFactory";
-
-    public static final String LDAPDN_KEY = ROOT + "dn";
-
-    public static String FILTER = "(objectclass=organizationalRole)";
-
-    private LdapAuthenticationConstants() {
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationManagerInstaller.java
----------------------------------------------------------------------
diff --git a/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationManagerInstaller.java b/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationManagerInstaller.java
deleted file mode 100644
index 4f8abd3..0000000
--- a/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationManagerInstaller.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  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.ldap.authentication;
-
-import java.util.List;
-
-import com.google.common.collect.Lists;
-
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.runtime.authentication.AuthenticationManagerStandardInstallerAbstractForDfltRuntime;
-import org.apache.isis.core.runtime.authentication.standard.Authenticator;
-
-public class LdapAuthenticationManagerInstaller extends AuthenticationManagerStandardInstallerAbstractForDfltRuntime {
-
-    public static String NAME = "ldap";
-
-    public LdapAuthenticationManagerInstaller() {
-        super(NAME);
-    }
-
-    @Override
-    protected List<Authenticator> createAuthenticators(final IsisConfiguration configuration) {
-        return Lists.<Authenticator> newArrayList(new LdapAuthenticator(configuration));
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticator.java
----------------------------------------------------------------------
diff --git a/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticator.java b/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticator.java
deleted file mode 100644
index 19f5ec1..0000000
--- a/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticator.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- *  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.ldap.authentication;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-
-import javax.naming.AuthenticationException;
-import javax.naming.Context;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.commons.ensure.Assert;
-import org.apache.isis.core.commons.exceptions.IsisException;
-import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
-import org.apache.isis.core.runtime.authentication.AuthenticationRequestPassword;
-import org.apache.isis.core.runtime.authentication.standard.AuthenticatorAbstract;
-
-public class LdapAuthenticator extends AuthenticatorAbstract {
-
-    private static final Logger LOG = Logger.getLogger(LdapAuthenticator.class);
-
-    private final String ldapProvider;
-    private final String ldapDn;
-
-    public LdapAuthenticator(final IsisConfiguration configuration) {
-        super(configuration);
-        ldapProvider = getConfiguration().getString(LdapAuthenticationConstants.SERVER_KEY);
-        ldapDn = getConfiguration().getString(LdapAuthenticationConstants.LDAPDN_KEY);
-    }
-
-    @Override
-    public final boolean canAuthenticate(final Class<? extends AuthenticationRequest> authenticationRequestClass) {
-        return AuthenticationRequestPassword.class.isAssignableFrom(authenticationRequestClass);
-    }
-
-    private void setRoles(final DirContext authContext, final AuthenticationRequest request, final String username) throws NamingException {
-        final List<String> roles = new ArrayList<String>();
-        final SearchControls controls = new SearchControls();
-        controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
-        controls.setReturningAttributes(new String[] { "cn" });
-        final String name = "uid=" + username + ", " + ldapDn;
-        final NamingEnumeration<SearchResult> answer = authContext.search(name, LdapAuthenticationConstants.FILTER, controls);
-        while (answer.hasMore()) {
-            final SearchResult result = answer.nextElement();
-            final String roleName = (String) result.getAttributes().get("cn").get(0);
-            roles.add(roleName);
-            LOG.debug("Adding role: " + roleName);
-        }
-        request.setRoles(roles);
-    }
-
-    @Override
-    public boolean isValid(final AuthenticationRequest request) {
-        final AuthenticationRequestPassword passwordRequest = (AuthenticationRequestPassword) request;
-        final String username = passwordRequest.getName();
-        Assert.assertNotNull(username);
-        if (username.equals("")) {
-            LOG.debug("empty username");
-            return false; // failed authentication
-        }
-        final String password = passwordRequest.getPassword();
-        Assert.assertNotNull(password);
-
-        final Hashtable<String, String> env = new Hashtable<String, String>(4);
-        env.put(Context.INITIAL_CONTEXT_FACTORY, LdapAuthenticationConstants.SERVER_DEFAULT);
-        env.put(Context.PROVIDER_URL, ldapProvider);
-        env.put(Context.SECURITY_PRINCIPAL, "uid=" + username + ", " + ldapDn);
-        env.put(Context.SECURITY_CREDENTIALS, password);
-
-        DirContext authContext = null;
-        try {
-            authContext = new InitialDirContext(env);
-            setRoles(authContext, request, username);
-            return true;
-        } catch (final AuthenticationException e) {
-            return false;
-        } catch (final NamingException e) {
-            throw new IsisException("Failed to authenticate using LDAP", e);
-        } finally {
-            try {
-                if (authContext != null) {
-                    authContext.close();
-                }
-            } catch (final NamingException e) {
-                throw new IsisException("Failed to authenticate using LDAP", e);
-            }
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationConstants.java
----------------------------------------------------------------------
diff --git a/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationConstants.java b/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationConstants.java
deleted file mode 100644
index 973e853..0000000
--- a/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationConstants.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *  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.ldap.authorization;
-
-import org.apache.isis.core.commons.config.ConfigurationConstants;
-import org.apache.isis.core.runtime.authorization.AuthorizationManagerInstaller;
-import org.apache.isis.core.runtime.authorization.standard.AuthorizationConstants;
-import org.apache.isis.security.ldap.authentication.LdapAuthenticationConstants;
-
-public final class LdapAuthorizationConstants {
-
-    private static final String ROOT = ConfigurationConstants.ROOT + AuthorizationManagerInstaller.TYPE + "." + LdapAuthorizationManagerInstaller.NAME + ".";
-
-    public static final String SERVER_KEY = ROOT + "server";
-    public static final String SERVER_DEFAULT = LdapAuthenticationConstants.SERVER_DEFAULT;
-
-    public static final String LDAPDN_KEY = ROOT + "dn";
-
-    public static final String APP_DN_KEY = ROOT + "application.dn";
-
-    public static final String LEARN_KEY = AuthorizationConstants.LEARN;
-    public static final boolean LEARN_DEFAULT = AuthorizationConstants.LEARN_DEFAULT;
-
-    private LdapAuthorizationConstants() {
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationManagerInstaller.java
----------------------------------------------------------------------
diff --git a/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationManagerInstaller.java b/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationManagerInstaller.java
deleted file mode 100644
index 7b9d5ad..0000000
--- a/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationManagerInstaller.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  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.ldap.authorization;
-
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.runtime.authorization.standard.AuthorizationManagerStandardInstallerAbstract;
-import org.apache.isis.core.runtime.authorization.standard.Authorizor;
-
-public class LdapAuthorizationManagerInstaller extends AuthorizationManagerStandardInstallerAbstract {
-
-    public static String NAME = "ldap";
-
-    public LdapAuthorizationManagerInstaller() {
-        super(NAME);
-    }
-
-    @Override
-    protected Authorizor createAuthorizor(final IsisConfiguration configuration) {
-        return new LdapAuthorizor(configuration);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java
----------------------------------------------------------------------
diff --git a/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java b/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java
deleted file mode 100644
index d88255e..0000000
--- a/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- *  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.ldap.authorization;
-
-import java.util.Hashtable;
-
-import javax.naming.AuthenticationException;
-import javax.naming.Context;
-import javax.naming.NameAlreadyBoundException;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.commons.exceptions.IsisException;
-import org.apache.isis.core.runtime.authorization.standard.AuthorizorAbstract;
-
-public class LdapAuthorizor extends AuthorizorAbstract {
-
-    private static final Logger LOG = Logger.getLogger(LdapAuthorizor.class);
-
-    private static final String FILTER = "(&(uniquemember={0}) (|(cn={1}) (cn={2}) (cn={3})))";
-    private static final String ACCESS_QUALIFIER_RW = "RW";
-
-    private final String ldapProvider;
-    @SuppressWarnings("unused")
-    private final String ldapDn;
-    private final String appDn;
-    private final boolean learn;
-
-    public LdapAuthorizor(final IsisConfiguration configuration) {
-        super(configuration);
-
-        ldapProvider = getConfiguration().getString(LdapAuthorizationConstants.SERVER_KEY);
-        ldapDn = getConfiguration().getString(LdapAuthorizationConstants.LDAPDN_KEY);
-        appDn = getConfiguration().getString(LdapAuthorizationConstants.APP_DN_KEY);
-        learn = getConfiguration().getBoolean(LdapAuthorizationConstants.LEARN_KEY, LdapAuthorizationConstants.LEARN_DEFAULT);
-    }
-
-    // ////////////////////////////////////////////////////////
-    // init, shutdown
-    // ////////////////////////////////////////////////////////
-
-    @Override
-    public void init() {
-    }
-
-    @Override
-    public void shutdown() {
-        // do nothing
-    }
-
-    // ////////////////////////////////////////////////////////
-    // API
-    // ////////////////////////////////////////////////////////
-
-    @Override
-    public boolean isUsableInRole(final String role, final Identifier member) {
-        if(role == null) {
-            return false;
-        }
-        return isAuthorised(role, member, ACCESS_QUALIFIER_RW);
-    }
-
-    @Override
-    public boolean isVisibleInRole(final String role, final Identifier member) {
-        if(role == null) {
-            return false;
-        }
-        return isAuthorised(role, member, null);
-    }
-
-    private boolean isAuthorised(final String role, final Identifier member, final String flag) {
-
-        final Hashtable<String, String> env = new Hashtable<String, String>(4);
-        env.put(Context.INITIAL_CONTEXT_FACTORY, LdapAuthorizationConstants.SERVER_DEFAULT);
-        env.put(Context.PROVIDER_URL, ldapProvider);
-
-        if (learn) {
-            env.put(Context.SECURITY_PRINCIPAL, "uid=admin, ou=system");
-            env.put(Context.SECURITY_CREDENTIALS, "secret");
-        }
-
-        DirContext authContext = null;
-        try {
-            authContext = new InitialDirContext(env);
-            if (learn) {
-                return bindNames(authContext, role, member);
-            }
-            return isPermitted(authContext, role, member, flag);
-        } catch (final AuthenticationException e) {
-            throw new IsisException("Failed to authorise using LDAP", e);
-        } catch (final NameNotFoundException e) {
-            // missing class in ldap server - treat as authorisation failure
-            LOG.error(e);
-            return false;
-        } catch (final NamingException e) {
-            throw new IsisException("Failed to authorise using LDAP", e);
-        } finally {
-            try {
-                if (authContext != null) {
-                    authContext.close();
-                }
-            } catch (final NamingException e) {
-                throw new IsisException("Failed to authorise using LDAP", e);
-            }
-        }
-    }
-
-    private boolean isPermitted(final DirContext authContext, final String role, final Identifier member, final String flag) throws NamingException {
-        final String cls = member.toIdentityString(Identifier.CLASS);
-        final String name = member.toIdentityString(Identifier.MEMBERNAME_ONLY);
-        final String parms = member.toIdentityString(Identifier.PARAMETERS_ONLY);
-
-        final Object[] args = new Object[] { role, cls, name, parms };
-        final SearchControls controls = new SearchControls();
-        controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
-        final String searchName = buildSearchName(cls, appDn);
-        final NamingEnumeration<SearchResult> answer = authContext.search(searchName, FILTER, args, controls);
-        while (answer.hasMore()) {
-            // if we have a class match must be OK
-            // if we have a name match must be OK (parent must be class by
-            // definition)
-            // but parm matches need to check that parent = name
-            final SearchResult result = answer.nextElement();
-            final String cn = (String) result.getAttributes().get("cn").get(0);
-            // result.getname gives relative path from class - so if contains
-            // 'name' it is parent of parms
-            // entry
-            if (cn.equals(cls) || cn.equals(name) || ((cn.equals(parms) && result.getName().contains(name)))) {
-                // last check if there is a flag attribute
-                if (flag != null) {
-                    final Attribute flagAttribute = result.getAttributes().get("flag");
-                    if (flagAttribute != null) {
-                        // since there is a flag need to check is match
-                        return flag.equalsIgnoreCase((String) flagAttribute.get(0));
-                    }
-                }
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private String buildSearchName(final String cls, final String appDn) {
-        final StringBuffer search = new StringBuffer();
-        search.append("cn=").append(cls).append(", ").append(appDn);
-        final String searchName = search.toString();
-        return searchName;
-    }
-
-    private Attributes createCommonAttributes(final String cnName, final String role, final boolean isClass) {
-        final Attributes attrs = new BasicAttributes(true); // case-ignore
-        final Attribute objclass = new BasicAttribute("objectclass");
-        objclass.add("top");
-        objclass.add("javaContainer");
-        objclass.add("groupOfUniqueNames");
-        if (isClass) {
-            objclass.add("javaObject");
-        }
-        final Attribute cn = new BasicAttribute("cn");
-        cn.add(cnName);
-        final Attribute uniqueMember = new BasicAttribute("uniquemember");
-        uniqueMember.add(role);
-        if (isClass) {
-            final Attribute javaClass = new BasicAttribute("javaclassname");
-            javaClass.add(cnName);
-            attrs.put(javaClass);
-        }
-        attrs.put(objclass);
-        attrs.put(cn);
-        attrs.put(uniqueMember);
-        return attrs;
-    }
-
-    private String createClassBindname(final String cls) {
-        final StringBuffer bindName = new StringBuffer();
-        bindName.append("cn=").append(cls).append(", ").append(appDn);
-        return bindName.toString();
-    }
-
-    private void bindClass(final DirContext authContext, final String role, final Identifier member) throws NamingException {
-        final String cls = member.toIdentityString(Identifier.CLASS);
-        final Attributes attrs = createCommonAttributes(cls, role, true);
-        try {
-            authContext.createSubcontext(createClassBindname(cls), attrs);
-        } catch (final NameAlreadyBoundException e) {
-            // ignore as this is just debug code
-            // and we don't check if this is already bound first
-            LOG.debug(e);
-        }
-    }
-
-    private String createNameBindname(final String cls, final String name) {
-        final StringBuffer bindName = new StringBuffer();
-        bindName.append("cn=").append(name).append(", ");
-        bindName.append(createClassBindname(cls));
-        return bindName.toString();
-    }
-
-    private void bindName(final DirContext authContext, final String role, final Identifier member) throws NamingException {
-        final String cls = member.toIdentityString(Identifier.CLASS);
-        final String name = member.toIdentityString(Identifier.MEMBERNAME_ONLY);
-        final Attributes attrs = createCommonAttributes(name, role, false);
-        try {
-            authContext.createSubcontext(createNameBindname(cls, name), attrs);
-        } catch (final NameAlreadyBoundException e) {
-            // ignore as this is just debug code
-            // and we don't check if this is already bound first
-            LOG.debug(e);
-        }
-    }
-
-    private String createParmsBindname(final String cls, final String name, final String parms) {
-        final StringBuffer bindName = new StringBuffer();
-        bindName.append("cn=").append(parms).append(", ");
-        bindName.append(createNameBindname(cls, name));
-        return bindName.toString();
-    }
-
-    private void bindParms(final DirContext authContext, final String role, final Identifier member) throws NamingException {
-        final String cls = member.toIdentityString(Identifier.CLASS);
-        final String name = member.toIdentityString(Identifier.MEMBERNAME_ONLY);
-        // have to escape any commas in parms string or ldap parser is not happy
-        final String parms = member.toIdentityString(Identifier.PARAMETERS_ONLY).replace(",", "\\,");
-        if (parms.length() == 0) {
-            return;
-        }
-        final Attributes attrs = createCommonAttributes(parms, role, false);
-        try {
-            authContext.createSubcontext(createParmsBindname(cls, name, parms), attrs);
-        } catch (final NameAlreadyBoundException e) {
-            // ignore as this is just debug code
-            // and we don't check if this is already bound first
-            LOG.debug(e);
-        }
-    }
-
-    private boolean bindNames(final DirContext authContext, final String role, final Identifier member) throws NamingException {
-        bindClass(authContext, role, member);
-        bindName(authContext, role, member);
-        bindParms(authContext, role, member);
-        return true;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/component/security/ldap/src/site/apt/index.apt b/component/security/ldap/src/site/apt/index.apt
deleted file mode 100644
index 8978117..0000000
--- a/component/security/ldap/src/site/apt/index.apt
+++ /dev/null
@@ -1,44 +0,0 @@
-~~  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.
-
-
-
-Security LDAP Implementation
-
- The <ldap security> module provides an implementation of Isis' authentication and
- authorization APIs where credentials are stored in a well-known LDAP server.
- 
- This makes the LDAP security implementation suitable for deployment where an
- LDAP exists.  Optionally it may be combined with other implementations (for example
- the authorization might be performed using the file-based implementation).
- 
- See the security 
- {{{../docbkx/html/guide/isis-security.html}HTML}} or 
- {{{../docbkx/pdf/isis-security.pdf}PDF}} documentation for more detail.
- 
-Alternatives
-
-  Alternatives include:
-  
-  * the {{{../dflt/index.html}default}} (no-op) security implementation, for prototyping use only
-
-  * the {{{../file/index.html}file-based}} security (reading from simple flat files)
-
-  * the {{{../sql/index.html}SQL}} security (reading from simple SQL tables)
-
-  []
-  

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/src/site/apt/jottings.apt
----------------------------------------------------------------------
diff --git a/component/security/ldap/src/site/apt/jottings.apt b/component/security/ldap/src/site/apt/jottings.apt
deleted file mode 100644
index c5d1200..0000000
--- a/component/security/ldap/src/site/apt/jottings.apt
+++ /dev/null
@@ -1,24 +0,0 @@
-~~  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.
-
-
-
-Jottings
- 
-  This page is to capture any random jottings relating to this module prior 
-  to being moved into formal documentation. 
- 

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/src/site/site.xml
----------------------------------------------------------------------
diff --git a/component/security/ldap/src/site/site.xml b/component/security/ldap/src/site/site.xml
deleted file mode 100644
index 1f465f4..0000000
--- a/component/security/ldap/src/site/site.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project>
-
-	<body>
-		<breadcrumbs>
-			<item name="LDAP" href="index.html"/>
-		</breadcrumbs>
-
-		<menu name="LDAP Security">
-			<item name="About" href="index.html" />
-            <item name="Jottings" href="jottings.html" />
-		</menu>
-
-        <menu name="Security Modules">
-            <item name="Default (No-op)" href="../dflt/index.html" />
-            <item name="File" href="../file/index.html" />
-            <item name="LDAP" href="../ldap/index.html" />
-            <item name="SQL" href="../sql/index.html" />
-        </menu>
-
-        <menu name="Maven Reports" ref="reports" />
-	</body>
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/ldap/src/test/java/org/apache/isis/security/ldap/authentication/LdapAuthenticatorTester.java
----------------------------------------------------------------------
diff --git a/component/security/ldap/src/test/java/org/apache/isis/security/ldap/authentication/LdapAuthenticatorTester.java b/component/security/ldap/src/test/java/org/apache/isis/security/ldap/authentication/LdapAuthenticatorTester.java
deleted file mode 100644
index e84ec1c..0000000
--- a/component/security/ldap/src/test/java/org/apache/isis/security/ldap/authentication/LdapAuthenticatorTester.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *  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.ldap.authentication;
-
-import org.apache.isis.core.runtime.authentication.AuthenticationRequestPassword;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-public class LdapAuthenticatorTester {
-
-    public static void main(final String[] args) {
-        final LdapAuthenticator auth = new LdapAuthenticator(IsisContext.getConfiguration());
-
-        AuthenticationRequestPassword req = new AuthenticationRequestPassword("unauth", "pass");
-        try {
-            System.out.println("unauth auth=" + auth.isValid(req));
-        } catch (final Exception e) {
-            System.out.println("unauth failed authentication!");
-            e.printStackTrace();
-        }
-        req = new AuthenticationRequestPassword("joe", "pass");
-        try {
-            System.out.println("joe auth=" + auth.isValid(req));
-        } catch (final Exception e) {
-            System.out.println("joe auth failed!!");
-            e.printStackTrace();
-        }
-        req = new AuthenticationRequestPassword("joe", "wrongpass");
-        try {
-            System.out.println("joe wrongpass auth=" + auth.isValid(req));
-        } catch (final Exception e) {
-            System.out.println("joe wrongpass auth failed!!");
-            e.printStackTrace();
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/NOTICE
----------------------------------------------------------------------
diff --git a/component/security/sql/NOTICE b/component/security/sql/NOTICE
deleted file mode 100755
index ba21d0c..0000000
--- a/component/security/sql/NOTICE
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Isis
-Copyright 2010-2013 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/hsql-db/authenticator-tests.script
----------------------------------------------------------------------
diff --git a/component/security/sql/hsql-db/authenticator-tests.script b/component/security/sql/hsql-db/authenticator-tests.script
deleted file mode 100644
index 18d5aac..0000000
--- a/component/security/sql/hsql-db/authenticator-tests.script
+++ /dev/null
@@ -1,51 +0,0 @@
-SET DATABASE UNIQUE NAME HSQLDB3B5AA06E81
-SET DATABASE GC 0
-SET DATABASE DEFAULT RESULT MEMORY ROWS 0
-SET DATABASE EVENT LOG LEVEL 0
-SET DATABASE SQL NAMES FALSE
-SET DATABASE SQL REGULAR NAMES TRUE
-SET DATABASE SQL REFERENCES FALSE
-SET DATABASE SQL SIZE TRUE
-SET DATABASE SQL TYPES FALSE
-SET DATABASE SQL TDC DELETE TRUE
-SET DATABASE SQL TDC UPDATE TRUE
-SET DATABASE SQL TRANSLATE TTI TYPES TRUE
-SET DATABASE SQL CONCAT NULLS TRUE
-SET DATABASE SQL NULLS FIRST TRUE
-SET DATABASE SQL UNIQUE NULLS TRUE
-SET DATABASE SQL CONVERT TRUNCATE TRUE
-SET DATABASE SQL AVG SCALE 0
-SET DATABASE SQL DOUBLE NAN TRUE
-SET DATABASE SQL LONGVAR IS LOB FALSE
-SET DATABASE TRANSACTION CONTROL LOCKS
-SET DATABASE DEFAULT ISOLATION LEVEL READ COMMITTED
-SET DATABASE TRANSACTION ROLLBACK ON CONFLICT TRUE
-SET DATABASE TEXT TABLE DEFAULTS ''
-SET FILES WRITE DELAY 500 MILLIS
-SET FILES BACKUP INCREMENT TRUE
-SET FILES CACHE SIZE 10000
-SET FILES CACHE ROWS 50000
-SET FILES SCALE 32
-SET FILES LOB SCALE 32
-SET FILES DEFRAG 0
-SET FILES NIO TRUE
-SET FILES NIO SIZE 256
-SET FILES LOG TRUE
-SET FILES LOG SIZE 50
-CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e'
-ALTER USER SA SET LOCAL TRUE
-CREATE SCHEMA PUBLIC AUTHORIZATION DBA
-SET SCHEMA PUBLIC
-CREATE MEMORY TABLE PUBLIC.USERS(EMAIL VARCHAR(32),PASSWORD VARCHAR(32))
-ALTER SEQUENCE SYSTEM_LOBS.LOB_ID RESTART WITH 1
-SET DATABASE DEFAULT INITIAL SCHEMA PUBLIC
-GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.YES_OR_NO TO PUBLIC
-GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.TIME_STAMP TO PUBLIC
-GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CARDINAL_NUMBER TO PUBLIC
-GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CHARACTER_DATA TO PUBLIC
-GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.SQL_IDENTIFIER TO PUBLIC
-GRANT DBA TO SA
-SET SCHEMA SYSTEM_LOBS
-INSERT INTO BLOCKS VALUES(0,2147483647,0)
-SET SCHEMA PUBLIC
-INSERT INTO USERS VALUES('user1','password1')


[04/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/object-header-bg.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/object-header-bg.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/object-header-bg.gif
new file mode 100644
index 0000000..4cf32b9
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/object-header-bg.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/page-header-bg.jpg
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/page-header-bg.jpg b/mothballed/component/viewer/html/impl/src/main/resources/default-images/page-header-bg.jpg
new file mode 100644
index 0000000..6e044ed
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/page-header-bg.jpg differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/page-header-bg1.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/page-header-bg1.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/page-header-bg1.gif
new file mode 100644
index 0000000..252075a
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/page-header-bg1.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/page-header-bg2.jpg
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/page-header-bg2.jpg b/mothballed/component/viewer/html/impl/src/main/resources/default-images/page-header-bg2.jpg
new file mode 100644
index 0000000..4d041ca
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/page-header-bg2.jpg differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/poweredby-logo.png
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/poweredby-logo.png b/mothballed/component/viewer/html/impl/src/main/resources/default-images/poweredby-logo.png
new file mode 100644
index 0000000..c9f66ac
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/poweredby-logo.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/shadow-bottom.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/shadow-bottom.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/shadow-bottom.gif
new file mode 100644
index 0000000..16c1c99
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/shadow-bottom.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/sign-info.png
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/sign-info.png b/mothballed/component/viewer/html/impl/src/main/resources/default-images/sign-info.png
new file mode 100644
index 0000000..5b8e845
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/sign-info.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/sign-warning.png
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/sign-warning.png b/mothballed/component/viewer/html/impl/src/main/resources/default-images/sign-warning.png
new file mode 100644
index 0000000..78e238d
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/sign-warning.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/site-header-bg.jpg
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/site-header-bg.jpg b/mothballed/component/viewer/html/impl/src/main/resources/default-images/site-header-bg.jpg
new file mode 100644
index 0000000..39a1c8c
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/site-header-bg.jpg differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/submenu-bullet.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/submenu-bullet.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/submenu-bullet.gif
new file mode 100644
index 0000000..27f305a
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/submenu-bullet.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/tab-bar-bg.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/tab-bar-bg.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/tab-bar-bg.gif
new file mode 100644
index 0000000..09130d5
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/tab-bar-bg.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/tab-off-bg.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/tab-off-bg.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/tab-off-bg.gif
new file mode 100644
index 0000000..9305e13
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/tab-off-bg.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/tab-on-bg.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/tab-on-bg.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/tab-on-bg.gif
new file mode 100644
index 0000000..976c31a
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/tab-on-bg.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default.css
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default.css b/mothballed/component/viewer/html/impl/src/main/resources/default.css
new file mode 100644
index 0000000..9956ce9
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/resources/default.css
@@ -0,0 +1,939 @@
+/*
+ *  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.
+ */
+/* Start Global styles */
+
+body {
+  background: #101254;
+  text-align: center;
+}
+#wrapper {
+  width: 980px;
+  min-height: 800px;
+  border:3px solid #7F81C0;
+  margin:8px auto;
+  text-align: left;
+  background: white;
+}
+
+.header-icon > img {
+	max-width: 40px;
+	height: 40px;
+}
+	
+BODY {
+	font-family: Arial, Sans-Serif;
+	margin: 0 0 10px 0;
+	color: black;
+
+/*
+	background: url(default-images/poweredby-logo.png);
+	background-repeat: no-repeat;
+	background-position: 95% 95%;
+*/
+}
+
+IMG {
+	border: 0;
+}
+
+A {
+	text-decoration: none;
+}
+
+A:hover {
+	text-decoration: underline;
+}
+
+/* End Global styles */ /* Start Heading */ 
+
+div#site-header:after {
+	bottom: 0px;
+	display: block;
+	text-align: right;
+	float:right;
+	bottom: 0;
+	font-size: 70%;
+	color: gray;
+}
+
+div#site-header {
+	background: url(images/banner-bg.png); 
+	background-repeat: repeat-x white-space :   nowrap;
+	list-style: none;
+	margin: 0px;
+	height: 100px;
+}
+
+div#site-logo {
+	background: url(images/banner.png);
+	background-repeat: no-repeat;
+	background-position: left;
+	position: absolute;
+	width: 980px;
+	height: 100px;
+	margin: 0 auto;
+}
+
+div#page-header {
+	display: none;
+}
+
+/* END Heading */
+DIV#body {
+	display: block;
+	padding-bottom: 10px;
+}
+
+div#navigation {
+	margin: 0;
+	padding: 0px;
+}
+
+/* Start options*/
+DIV.options {
+	background-color: #eeeeee;
+	margin: 0;
+	padding: 4px 0px 4px 5px;
+	min-height: 20px;
+	align: right;
+	float:right;
+}
+
+
+DIV.options H4 {
+	display: none;
+}
+
+DIV.options DIV.item {
+	display: inline;
+	border-right: 1px solid #000000;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #00000;
+	font-size: 70%;
+	margin: 0 6px 0 6px;
+	padding 0 0 0 0;
+	min-width: 200px;
+}
+
+DIV.options DIV.item IMG {
+	display: none;
+}
+
+DIV.options DIV.item a:link {
+	color: #000000;
+	text-decoration: none;
+	margin: 0 5px 0 0px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.options DIV.item a:hover {
+	background-color: #dddddd;
+	margin: 0 5px 0 0px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.options DIV.item a:visited {
+	color: #000000;
+	text-decoration: none;
+	margin: 0 5px 0 0px;
+	padding: 0 2px 0 0px;
+}
+
+/* End options */ 
+
+/* Start services */
+DIV.services {
+	background-color: #7F81C0;
+	margin: 0;
+	padding: 4px 20px 4px 5px;
+	min-height: 20px;
+
+}
+
+DIV.services H4 {
+	display: none;
+}
+
+DIV.services DIV.item {
+	display: inline;
+	border-right: 1px solid #ffffff;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #ffffff;
+	font-size: 70%;
+	margin: 3px;
+}
+
+DIV.services DIV.item IMG {
+	display: none;
+}
+
+DIV.services DIV.item a:link {
+	color: #ffffff;
+	text-decoration: none;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item a:hover {
+	background-color: #2683E2;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item a:visited {
+	color: #ffffff;
+	text-decoration: none;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item-selected {
+	background-color: #2683E2;
+	display: inline;
+	border-right: 1px solid #ffffff;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #ffffff;
+	font-size: 70%;
+}
+
+DIV.services DIV.item-selected a:link {
+	color: #ffffff;
+	text-decoration: none;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item-selected a:hover {
+	background-color: #556677;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item-selected a:visited {
+	color: #ffffff;
+	text-decoration: none;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+/* End services */ /* Start History */
+DIV.history {
+	background-color: #D6D6D6;
+	margin: 0;
+	padding: 1px 30px 0 5px;
+	min-height: 26px;
+}
+
+DIV.history H4 {
+	display: none;
+}
+
+DIV.history DIV.item {
+	display: inline;
+	border-right: 1px solid #ffffff;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #29357D;
+	font-size: 70%;
+}
+
+DIV.history DIV.item IMG {
+	position: relative;
+	top: 4px;
+	height: 16px;
+	padding: 0 5px 0 0px;
+}
+
+DIV.history DIV.item a:link {
+	color: #29357D;
+	text-decoration: none;
+	margin: 5px;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item a:hover {
+	background-color: #B7B6B6;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item a:visited {
+	color: #29357D;
+	text-decoration: none;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item-selected {
+	background-color: #2683E2;
+	display: inline;
+	border-right: 1px solid #ffffff;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #29357D;
+	font-size: 70%;
+	height: 30px;
+}
+
+DIV.history DIV.item-selected a:hover {
+	background-color: #556677;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item-selected a:link {
+	color: #29357D;
+	text-decoration: none;
+	margin: 10px;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item-selected a:visited {
+	color: #29357D;
+	text-decoration: none;
+	padding: 1px 3px 1px 3px;
+}
+
+/* INVISIBLE character for empty item. FIREFOX ONLY*/
+DIV.history:after {
+	content: "X";
+	display: inline;
+	text-align: right;
+	font-size: 70%;
+	color: #D6D6D6;
+}
+
+/* End History */ /* Start Context */
+div#context {
+	background-color: #F0F0F0;
+	margin: 0;
+	padding: 1px 30px 0 7px;
+	min-height: 26px;
+}
+
+div#context span.disabled {
+	display: inline;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #666666;
+	font-size: 70%;
+	padding: 0px 5px 0px 7px;
+	white-space: nowrap;
+}
+
+div#context span.disabled IMG {
+	display: none
+}
+
+div#context span.disabled a:link {
+	color: #29357D;
+	text-decoration: none;
+	margin: 5px;
+	padding: 1px 3px 1px 3px;
+}
+
+div#context span.disabled a:hover {
+	background-color: #B7B6B6;
+	padding: 1px 3px 1px 3px;
+}
+
+div#context span.disabled a:visited {
+	color: #29357D;
+	text-decoration: none;
+	padding: 1px 3px 1px 3px;
+}
+
+div#context a.linked {
+	display: inline;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #29357D;
+	font-size: 70%;
+	padding: 0px 5px 0px 7px;
+}
+
+div#context a.linked IMG {
+	display: none
+}
+
+div#context a.linked a:link {
+	color: #29357D;
+	text-decoration: none;
+	margin: 5px;
+	padding: 1px 3px 1px 3px;
+}
+
+div#context a.linked  a:hover {
+	background-color: #29357D;
+	padding: 1px 3px 1px 3px;
+	text-decoration: underline;
+}
+
+div#context a.linked  a:visited {
+	color: #29357D;
+	text-decoration: none;
+	padding: 1px 3px 1px 3px;
+}
+
+/* INVISIBLE character for empty breadcrumbs. FIREFOX ONLY*/
+span.disabled:after {
+	content: "X";
+	display: inline;
+	text-align: right;
+	font-size: 70%;
+	color: #F0F0F0;
+}
+
+/* End Context */ /*
+div#help-bar {
+	position: relative;
+	right: 50px;
+	top: 10px;
+	text-align: right; 
+	font-family : arial, 'sans serif'; 
+	font-weight : normal;  
+	color: #0000FF; 
+	font-size : 90%; 
+	line-height : 110%;
+	text-decoration: underline;
+	height: 22px;
+}
+*/
+DIV#body DIV#view {
+	position: relative;
+	top: 0px;
+	left: 0px;
+	margin: 0px;
+}
+
+/* Start of Message Header */
+DIV.message-header {
+	position: relative;
+	top: 40px;
+	padding: 5px 25px 5px 25px;
+	margin: 0 50px 0 255px;
+	vertical-align: middle;
+	COLOR: #003366;
+	FONT-WEIGHT: bold;
+	FONT-SIZE: 80%;
+	LEFT: auto;
+	FONT-STYLE: normal;
+	FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
+	width: 40%;
+}
+
+DIV.message-header DIV.warning {
+	COLOR: #ff0033;
+	padding: 5px 25px 5px 25px;
+	background: url(default-images/sign-warning.png);
+	background-repeat: no-repeat;
+	background-color: #D6D6D6;
+	background-position: 5px 5px;
+}
+
+DIV.message-header DIV.message {
+	COLOR: #003366;
+	padding: 5px 25px 5px 25px;
+	background: url(default-images/sign-info.png);
+	background-repeat: no-repeat;
+	background-color: #D6D6D6;
+	background-position: 5px 5px;
+}
+
+DIV.message-header DIV.message {
+	FONT-WEIGHT: normal;
+}
+
+/* End of Message Header */ /* Start of Object Header */
+DIV.header {
+	position: relative;
+	top: 40px;
+	display: block;
+	background-color: #F0F0F0;
+	min-height: 48px;
+	margin: 0 50px 0 280px;
+
+}
+
+SPAN.header-icon IMG {
+	float: left;
+}
+
+SPAN.header-text {
+	float: left;
+	position: relative;
+	top: 10px;
+	margin-left: 7px;
+	FONT-WEIGHT: bold;
+	FONT-SIZE: 16px;
+	LEFT: auto;
+	COLOR: #003366;
+	FONT-STYLE: normal;
+	FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
+}
+
+/* End of Object Header */ /* Start of Object Contents */
+DIV#content {
+	position: relative;
+	display: block;
+	top: 40px;
+	margin: 0 50px 10px 280px;
+}
+
+/* Start of Object Fields */
+DIV.field {
+	margin: 0;
+	padding: 5px 0px 5px 0px;
+	border-top: 1px solid #666666;
+	min-height: 20px;
+}
+
+DIV.field SPAN.value IMG,DIV.field DIV.value IMG {
+	position: relative;
+	top: 3px;
+	margin: 0px 5px 0 0;
+	height: 16px;
+}
+
+DIV.field SPAN.value A,DIV.field DIV.value A {
+	position: relative;
+	top: -2px;
+	margin: 0px 5px 0 0;
+	height: 16px;
+}
+
+DIV.field DIV.icon IMG {
+	position: relative;
+	top: 0px;
+	margin: 0px 5px 0 0;
+	height: 16px;
+}
+
+.label,.value {
+	font-size: 80%;
+	color: #333399;
+}
+
+DIV.field DIV.icon {
+	display: inline;
+	color: #333399;
+	position: absolute;
+	left: 200px;
+}
+
+DIV.field span.label,DIV.field DIV.label {
+	width: 170px;
+	display: block;
+	/*content: ":";*/
+	margin: 0 0 -18px 7px;
+}
+
+DIV.field span.separator {
+	display: inline;
+	position: relative;
+	margin: 0 0 -15px 180px;
+	vertical-align: top;
+}
+
+DIV.field span.value, DIV.field DIV.value, DIV.field INPUT.value, DIV.field SELECT.value
+	{
+	top: -2px;
+	position: relative;
+	margin: 0px 10px -5px 0px;
+	display: inline;
+}
+
+DIV.field span.value PRE {
+	color: #333399;
+	margin: 0;
+	font-family: inherit;
+}
+
+
+DIV.field textarea.value {
+	font-family: inherit;
+}
+
+
+DIV.field span.optional {
+	margin: -35px 0 0 0;
+	font-size: 70%;
+	color: grey;
+}
+
+DIV.field span.required {
+	display: inline;
+	position: relative;
+	margin: 0;
+	vertical-align: top;
+	color: red;
+}
+
+DIV.field span.error {
+	display: inline;
+	position: relative;
+	color: red;
+	font-size: 70%;
+}
+
+/* INVISIBLE character for empty value FIREFOX ONLY*/
+DIV.field span.value:after {
+	content: "X";
+	display: inline;
+	text-align: right;
+	font-size: 70%;
+	color: white;
+}
+
+/* INVISIBLE character for empty value FIREFOX ONLY*/
+DIV.field span.label:after {
+	content: "X";
+	display: inline;
+	text-align: right;
+	font-size: 70%;
+	color: white;
+}
+
+/* End of Object Fields */ /* Start of Object Table */
+DIV#content TABLE {
+	position: relative;
+	float: left;
+	width: 100%;
+	border: 0;
+	margin: 0 0 10px 0;
+	border-collapse: collapse;
+}
+
+DIV#content TH {
+	padding: 6px;
+	border: 1px solid #ffffff;
+	background-color: #D6D6D6;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: black;
+	font-size: 70%;
+}
+
+DIV#content TD {
+	background-color: #ffffff;
+	border-right: 0;
+	border-left: 0;
+	border-bottom: 1px solid black;
+	padding: 6px;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	font-size: 80%;
+	color: #333399;
+	margin: 0;
+	text-align: left;
+}
+
+DIV#content TD.rowstart {
+	background-color: #F0F0F0;
+}
+
+DIV#content TD A:visited {
+	color: #0000FF;
+}
+
+DIV#content H4 {
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #000000;
+	font-size: 70%;
+	border-top: 1px solid black;
+	margin: -2px 0 0 0px;
+	padding: 5px;
+}
+
+TD DIV.icon {
+	font-size: 100%;
+	margin-top: 5px;
+}
+
+TD DIV.icon IMG {
+	float: left;
+	margin: -1px 5px 5px 0px;
+	height: 16px;
+}
+
+TD DIV.action-button {
+	background-color: #ffffff;
+	font-size: 130%;
+	text-decoration: none;
+}
+
+/* End of Object Table */
+INPUT.action-button,DIV.action-button {
+	background-color: #F0F0F0;
+	padding: 10px;
+	display: block;
+	margin: 0;
+	min-height: 20px;
+}
+
+INPUT.action-button,DIV.action-button A {
+	background: url(default-images/bg-button.gif);
+	background-repeat: repeat-x;
+	padding: 2px;
+	margin: 5px;
+	border: 1px solid #333399;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #000000;
+	font-size: 70%;
+	font-weight: normal;
+	text-align: center;
+}
+
+DIV.action-button a:link {
+	color: #000000;
+}
+
+DIV.action-button a:visited {
+	color: #000000;
+}
+
+DIV.action-button a:hover {
+	color: #000000;
+	text-decoration: none;
+}
+
+INPUT.action-button,DIV.action-button INPUT {
+	float: left;
+}
+
+/* End of Object Contents */ /* Start of Object Actions Menu */
+DIV#body DIV#view DIV#menu {
+	position: relative;
+	top: 40px;
+	left: 0;
+	background-color: #ffffff;
+	border-top: 1px solid #00336F;
+	margin: 0px;
+	width: 210px;
+	display: block;
+	float: left;
+}
+
+DIV#body DIV#menu H3 {
+	display: none;
+}
+
+DIV#menu SPAN.name {
+	display: block;
+	font-size: 80%;
+	background-color: #ffffff;
+	color: #333399;
+	line-height: 100%;
+	margin: 0 0 0 10px;
+}
+
+DIV.menu-item  a:link {
+	color: #333399;
+}
+
+DIV.menu-item  a:visited {
+	color: #333399;
+}
+
+DIV.submenu-item {
+	font-size: 80%;
+	background-color: #ffffff;
+	color: #1A59A7;
+	margin: 0px;
+	padding: 5px 0px 5px 10px;
+	border-bottom: 1px solid #00336F;
+	line-height: 100%;
+}
+
+DIV.submenu-item DIV.menu-item {
+	background: url(default-images/submenu-bullet.gif);
+	background-repeat: no-repeat;
+	background-position: left;
+	background-color: #ffffff;
+	margin: 0px;
+	line-height: 100%;
+	border: 0;
+	padding: 4px 5px 0px 10px;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #1A59A7;
+	font-size: 85%;
+}
+
+DIV.menu-item {
+	background-color: #ffffff;
+	margin: 0px;
+	line-height: 110%;
+	border-bottom: 1px solid #00336F;
+	padding: 5px 5px 5px 10px;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #1A59A7;
+	font-size: 80%;
+}
+
+DIV.menu-item DIV.disabled {
+	color: #a0a0a0;
+}
+
+DIV.menu-item a:link {
+	color: #1A59A7;
+}
+
+DIV.menu-item a:visited {
+	color: #1A59A7;
+}
+
+DIV.menu-item a:hover {
+	color: #006666;
+	text-decoration: underline;
+}
+
+DIV.submenu-item DIV.menu-item a:link {
+	color: #1A59A7;
+}
+
+DIV.submenu-item DIV.menu-item a:visited {
+	color: #1A59A7;
+}
+
+DIV.submenu-item DIV.menu-item a:hover {
+	color: #006666;
+	text-decoration: underline;
+}
+
+/* End of Object Menu */
+DIV.page-footer {
+	position: absolute;
+	right: 10px;
+	bottom: 10px;
+	font-size: 50%;
+	color: #333399;
+}
+
+H1 {
+	font-size: 140%;
+	margin-top: -8px;
+}
+
+H2 {
+	font-size: 90%;
+	color: #333399;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 0;
+}
+
+H3 {
+	font-size: 80%;
+	color: #ffffff;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 15px 10px 5px 10px;
+}
+
+H4 {
+	font-size: 80%;
+	color: #333399;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 10px 10px 0px 10px;
+}
+
+DIV.text {
+	font-size: 100%;
+	color: #336699;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 10px 10px 0px 10px;
+}
+
+DIV.error {
+	font-size: 120%;
+	color: #cc0000;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 10px 10px 0px 10px;
+}
+
+PRE.error-trace {
+	font-size: 80%;
+	color: #cc0000;
+	margin: 10px 10px 0px 10px;
+}
+
+DIV#debug { /*	float: left;*/
+	background-color: #F0F0F0;
+	margin: 30px;
+	padding: 1px 10px 0 7px;
+	min-height: 22px;
+	border: 1px;
+}
+
+DIV#debug H4 {
+	display: inline;
+	font-size: 80%;
+	color: #999;
+	margin: 0 5px 0 10px;
+}
+
+DIV#debug DIV.detail {
+	display: inline;
+	font-size: 80%;
+	color: #999;
+	margin: 0 5px 0 10px;
+}
+
+DIV#page-footer {
+	display: none;
+}
+
+SPAN.message {
+	position: relative;
+	top: 30px;
+	font-size: 100%;
+	color: #336699;
+	margin: 40px 0 0 0;
+	padding: 10px;
+}
+/* Think this is now redundant
+DIV.items {
+	position: relative;
+} 
+*/
+
+
+SPAN.about {
+	display: block;
+	padding: 4px;
+}
+
+
+SPAN.user {
+	display: block;
+	padding: 4px;
+}
+
+.nav-link {
+    display: block;
+    padding: 10px;
+    font-size: 75%;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/htmlviewer.js
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/htmlviewer.js b/mothballed/component/viewer/html/impl/src/main/resources/htmlviewer.js
new file mode 100644
index 0000000..d05e14b
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/resources/htmlviewer.js
@@ -0,0 +1,22 @@
+/*
+ *  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.
+ */
+$(document).ready(function()
+{
+    $(".message-header").fadeOut(5000)
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/images/Default.png
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/images/Default.png b/mothballed/component/viewer/html/impl/src/main/resources/images/Default.png
new file mode 100644
index 0000000..8409e46
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/images/Default.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/images/banner.png
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/images/banner.png b/mothballed/component/viewer/html/impl/src/main/resources/images/banner.png
new file mode 100644
index 0000000..adf2159
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/images/banner.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/src-archived/MonitorServlet.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/src-archived/MonitorServlet.java b/mothballed/component/viewer/html/impl/src/main/src-archived/MonitorServlet.java
new file mode 100644
index 0000000..80e3dec
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/src-archived/MonitorServlet.java
@@ -0,0 +1,101 @@
+/*
+ *  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.extensions.htmlviewer.webapp;
+
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.net.URLDecoder;
+import java.util.Date;
+import java.util.Iterator;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.isis.metamodel.authentication.AuthenticationSession;
+import org.apache.isis.extensions.html.servlet.internal.SessionAccess;
+import org.apache.isis.runtime.system.internal.monitor.MonitorListenerImpl;
+
+
+public class MonitorServlet extends HttpServlet {
+    private static final long serialVersionUID = 1L;
+    private MonitorListenerImpl monitor;
+
+    @Override
+    protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException,
+            IOException {
+        final String queryString = request.getQueryString();
+        final String query = queryString == null ? "Overview" : URLDecoder.decode(queryString, "UTF-8");
+        response.setContentType("text/html");
+        final PrintWriter writer = new PrintWriter(new OutputStreamWriter(response.getOutputStream()));
+        if (query.equals("Sessions")) {
+            writer.println("<HTML><HEAD><TITLE>NOF System Monitor - " + "Sessions" + "</TITLE></HEAD>");
+            writer.println("<BODY>");
+
+            writer.println("<h1>" + "Sessions" + "</h1>");
+            writer.println("<pre>");
+            writer.println(listSessions());
+            writer.println("</pre>");
+            writer.println("</BODY></HTML>");
+        } else {
+            monitor.writeHtmlPage(query, writer);
+        }
+        writer.flush();
+    }
+
+    private static String listSessions() {
+        final StringBuffer str = new StringBuffer();
+        final Iterator<?> it = SessionAccess.getSessions().iterator();
+        while (it.hasNext()) {
+            final HttpSession session = (HttpSession) it.next();
+            final String id = session.getId();
+            str.append(id);
+            str.append(" \t");
+
+            final long creationTime = session.getCreationTime();
+            str.append(new Date(creationTime));
+            str.append(" \t");
+
+            final long lastAccessedTime = session.getLastAccessedTime();
+            str.append(new Date(lastAccessedTime));
+            str.append(" \t");
+
+            final AuthenticationSession nofSession = (AuthenticationSession) session.getAttribute("NOF_SESSION_ATTRIBUTE");
+            if (nofSession != null) {
+                str.append(nofSession.getUserName());
+            }
+
+            str.append("\n");
+        }
+        return str.toString();
+    }
+
+    @Override
+    public void init(final ServletConfig servletConfig) throws ServletException {
+        super.init(servletConfig);
+        monitor = new MonitorListenerImpl();
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/src-archived/SessionAccess.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/src-archived/SessionAccess.java b/mothballed/component/viewer/html/impl/src/main/src-archived/SessionAccess.java
new file mode 100644
index 0000000..0855677
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/src-archived/SessionAccess.java
@@ -0,0 +1,183 @@
+/*
+ *  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.extensions.html.servlet.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.apache.isis.applib.fixtures.LogonFixture;
+import org.apache.isis.metamodel.authentication.AuthenticationSession;
+import org.apache.isis.runtime.authentication.AuthenticationManager;
+import org.apache.isis.runtime.authentication.PasswordAuthenticationRequest;
+import org.apache.isis.runtime.authentication.standard.ExplorationSession;
+import org.apache.isis.runtime.authentication.standard.SimpleSession;
+import org.apache.isis.runtime.context.IsisContext;
+import org.apache.isis.runtime.system.DeploymentType;
+
+
+public class SessionAccess {
+
+    private static final Logger LOG = Logger.getLogger(SessionAccess.class);
+    private static SessionAccess instance;
+
+    // //////////////////////////////////////////////
+    // Singleton factory
+    // //////////////////////////////////////////////
+
+    /**
+     * Create singleton
+     */
+    public static void createInstance(final AuthenticationManager authenticationManager) {
+        new SessionAccess(authenticationManager);
+    }
+
+    /**
+     * Create singleton
+     */
+    public static void createInstance(
+            final AuthenticationManager authenticationManager,
+            final DeploymentType deploymentType,
+            final LogonFixture logonFixture) {
+        new SessionAccess(authenticationManager, deploymentType, logonFixture);
+    }
+
+    // //////////////////////////////////////////////
+    // Sessions
+    // //////////////////////////////////////////////
+
+    // REVIEW part of decoupling systemaccess from servlet code - moved list sessions to monitorservlet
+    public static List<Object> getSessions() {
+        return instance.sessions;
+    }
+
+    // REVIEW part of decoupling systemaccess from servlet code - changed session to object
+    public static void addSession(final Object session) {
+        instance.sessions.add(session);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("session started " + session);
+        }
+    }
+
+    // REVIEW part of decoupling systemaccess from servlet code - moved logoff part to sessionlist
+    public static void removeSession(final Object session) {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("session ended " + session);
+        }
+        instance.sessions.remove(session);
+    }
+
+    // //////////////////////////////////////////////
+    // Authentication, logoff
+    // //////////////////////////////////////////////
+
+    public static AuthenticationSession authenticate(final PasswordAuthenticationRequest passwordAuthenticationRequest) {
+        return instance.authenticateInstance(passwordAuthenticationRequest);
+    }
+
+    public static void logoffUser(final AuthenticationSession session) {
+        getAuthenticationManager().closeSession(session);
+    }
+
+    private static AuthenticationManager getAuthenticationManager() {
+        if (instance == null) {
+            throw new IllegalStateException("Server initialisation failed, or not defined as a context listener");
+        }
+        return instance.authenticationManager;
+    }
+
+    // //////////////////////////////////////////////
+    // Request
+    // //////////////////////////////////////////////
+
+    public static void startRequest(final AuthenticationSession authSession) {
+        IsisContext.openSession(authSession);
+    }
+
+    public static void endRequest(final AuthenticationSession authSession) {
+    	// if a Logout has occurred then there won't be any session
+    	// (though should the AuthenticationManagerStandard actually be closing the session? not sure)
+    	
+    	if (IsisContext.inSession()) {
+    		IsisContext.closeSession();
+    	}
+    }
+
+    // //////////////////////////////////////////////
+    // Settings
+    // //////////////////////////////////////////////
+
+    public static boolean inExplorationMode() {
+        return instance.inExplorationModeInstance();
+    }
+
+    // ///////////////////////////////////////////////////////////////////////////
+
+    private final List<Object> sessions = new ArrayList<Object>();
+
+    private final AuthenticationManager authenticationManager;
+    private DeploymentType deploymentType;
+    private LogonFixture logonFixture;
+
+    private SessionAccess(final AuthenticationManager authenticationManager) {
+        this(authenticationManager, DeploymentType.STANDALONE, null);
+    }
+
+    private SessionAccess(
+            final AuthenticationManager authenticationManager,
+            final DeploymentType deploymentType,
+            final LogonFixture logonFixture) {
+        this.authenticationManager = authenticationManager;
+
+        this.deploymentType = deploymentType;
+        this.logonFixture = logonFixture;
+
+        SessionAccess.instance = this;
+    }
+
+    public DeploymentType getDeploymentType() {
+        return deploymentType;
+    }
+
+    public LogonFixture getLogonFixture() {
+        return logonFixture;
+    }
+
+    private AuthenticationSession authenticateInstance(PasswordAuthenticationRequest passwordAuthenticationRequest) {
+
+        if ((deploymentType.isExploring() || deploymentType.isPrototyping()) && 
+             logonFixture != null) {
+            return new SimpleSession(logonFixture.getUsername(), logonFixture.getRoles());
+        }
+
+        if (deploymentType.isExploring()) {
+            return new ExplorationSession();
+        }
+
+        return authenticationManager.authenticate(passwordAuthenticationRequest);
+    }
+
+    private boolean inExplorationModeInstance() {
+        return deploymentType.isExploring();
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/src-archived/SessionList.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/src-archived/SessionList.java b/mothballed/component/viewer/html/impl/src/main/src-archived/SessionList.java
new file mode 100644
index 0000000..3363656
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/src-archived/SessionList.java
@@ -0,0 +1,53 @@
+/*
+ *  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.extensions.htmlviewer.webapp;
+
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
+
+import org.apache.isis.metamodel.authentication.AuthenticationSession;
+import org.apache.isis.extensions.html.context.Context;
+import org.apache.isis.extensions.html.servlet.internal.SessionAccess;
+
+
+public class SessionList implements HttpSessionListener {
+    private static final String NOF_SESSION_ATTRIBUTE = "nof-context";
+
+    public void sessionCreated(final HttpSessionEvent event) {
+        final HttpSession session = event.getSession();
+        SessionAccess.addSession(session);
+    }
+
+    public void sessionDestroyed(final HttpSessionEvent event) {
+        final HttpSession session = event.getSession();
+        SessionAccess.removeSession(session);
+
+        final Context context = (Context) session.getAttribute(NOF_SESSION_ATTRIBUTE);
+        final AuthenticationSession nofSession = context.getSession();
+        if (nofSession != null) {
+            SessionAccess.logoffUser(nofSession);
+        }
+
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/site/apt/index.apt b/mothballed/component/viewer/html/impl/src/site/apt/index.apt
new file mode 100644
index 0000000..d6f3649
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/site/apt/index.apt
@@ -0,0 +1,47 @@
+~~  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.
+
+
+
+HTML Viewer
+
+ The HTML viewer provides a simple webapp interface for interacting with an Isis domain model.
+  
+ It renders each domain object or collection of domain objects as a web page, with
+ hyperlinks used to navigate between objects.  In addition, object actions can also be invoked,
+ with hyperlinks bringing up a page for action parameters if required.
+ 
+Customization
+ 
+  The HTML viewer offers only very limited customization opportunities; the CSS can be
+  altered, but that's about it. 
+ 
+Alternatives
+
+  There are two other webapp viewers which provide more far wider customization opportunities:
+  
+  * the {{{../scimpi/index.html}Scimpi}} viewer uses a JSF-like markup metaphor
+  
+  * the {{{../wicket/index.html}Wicket}} viewer uses a {{{http://wicket.apache.org}Apache Wicket}} components
+    (and allows you to define your own components also).
+    
+  []
+
+Further Info
+  
+  See this module's {{{./apidocs/index.html}Javadoc}} and the {{{./docbkx/html/guide/isis-html-viewer.html}user guide}} for more information.
+  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/site/apt/jottings.apt
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/site/apt/jottings.apt b/mothballed/component/viewer/html/impl/src/site/apt/jottings.apt
new file mode 100644
index 0000000..7ef0d29
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/site/apt/jottings.apt
@@ -0,0 +1,71 @@
+~~  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.
+
+
+
+Jottings
+ 
+  This page is to capture any random jottings relating to this module prior 
+  to being moved into formal documentation. 
+ 
+* Debugging
+
+  To turn on debugging use the debugon command, e.g.,
+
+--------------------------------------------------------
+http://localhost:8080/debugon.app
+--------------------------------------------------------
+
+  A control bar appears a the bottom of the page allowing you to
+  display the object graph, specification, connection details and so on
+  
+  To turn it off use the debugoff command:
+
+--------------------------------------------------------
+http://localhost:8080/debugoff.app</programlisting>
+--------------------------------------------------------
+
+  The debug pages can be displayed directly by providing the commands:
+  debug; spec and dump - along with a object id if necessary. For example to 
+  view the details about the specification for object 28 use:
+
+--------------------------------------------------------
+http://localhost:8080/spec.app?id=28
+--------------------------------------------------------
+ 
+ 
+ * Other Notes
+ 
+  The pages generated by the servlet are broken down into the following sections
+
+--------------------------------------------------------
+site-header
+	site-logo
+page-header
+navigation
+	resources
+	history
+content
+	header
+	menu
+	body
+site-footer
+--------------------------------------------------------
+
+Objects edited on the web don't fit the save-as-you-go pattern that we adopted in the DND.  
+This means that the options for each field, that the options might depend upon, don't get 
+updated as the fields are not being changed on the fly.

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/site/site.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/site/site.xml b/mothballed/component/viewer/html/impl/src/site/site.xml
new file mode 100644
index 0000000..aca88eb
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/site/site.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project>
+
+	<body>
+		<breadcrumbs>
+			<item name="HTML"/>
+		</breadcrumbs>
+
+		<menu name="HTML Viewer">
+			<item name="About" href="index.html" />
+            <item name="Jottings" href="jottings.html" />
+		</menu>
+        
+        <menu name="Viewer Modules">
+            <item name="HTML" href="../html/index.html" />
+            <item name="Scimpi" href="../scimpi/index.html" />
+            <item name="Wicket" href="../wicket/index.html" />
+            <item name="RestfulObjects" href="../restfulobjects/index.html" />
+            <item name="JUnit Support" href="../junit/index.html" />
+            <item name="BDD Integration" href="../bdd/index.html" />
+            <item name="DnD" href="../dnd/index.html" />
+        </menu>
+        
+		<menu name="Documentation">
+			<item name="${docbkxGuideTitle} (PDF)" href="docbkx/pdf/${docbkxGuideName}.pdf" />
+			<item name="${docbkxGuideTitle} (HTML)" href="docbkx/html/guide/${docbkxGuideName}.html" />
+		</menu>
+
+		<menu name="Maven Reports" ref="reports" />
+	</body>
+
+</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapAction.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapAction.java b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapAction.java
new file mode 100644
index 0000000..39260a1
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapAction.java
@@ -0,0 +1,98 @@
+/*
+ *  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.context;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.viewer.html.action.ActionException;
+
+public class ContextTest_mapAction {
+
+    @Rule
+    public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+    private Context context;
+
+
+    @Before
+    public void setUp() throws Exception {
+        Logger.getRootLogger().setLevel(Level.OFF);
+        context = new Context(null);
+    }
+
+
+    @Test
+    public void getMappedAction_forNonExistentId() {
+        try {
+            assertNull(context.getMappedAction("NON-EXISTENT-ID"));
+            fail();
+        } catch (final ActionException ex) {
+            // expected
+        }
+    }
+
+
+    @Test
+    public void mapAction_then_getMappedAction() {
+        final ObjectAction action = new ObjectActionNoop();
+        final String id = context.mapAction(action);
+        assertEquals(action, context.getMappedAction(id));
+    }
+
+
+    @Test
+    public void mapAction_returnsSameIdForSameAction() {
+        final ObjectAction action = new ObjectActionNoop();
+        final String id = context.mapAction(action);
+        final String id2 = context.mapAction(action);
+        assertEquals(id, id2);
+    }
+
+    @Test
+    public void mapAction_returnsDifferentIdsForDifferentActions() {
+        final String id = context.mapAction(new ObjectActionNoop());
+        final String id2 = context.mapAction(new ObjectActionNoop());
+        assertNotSame(id, id2);
+    }
+
+    
+    private PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+    private AdapterManager getAdapterManager() {
+        return getPersistenceSession().getAdapterManager();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapCollection.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapCollection.java b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapCollection.java
new file mode 100644
index 0000000..b1cf314
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapCollection.java
@@ -0,0 +1,159 @@
+/*
+ *  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.context;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.not;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.List;
+
+import com.google.common.collect.Lists;
+
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.oid.Oid;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.core.tck.dom.refs.SimpleEntity;
+import org.apache.isis.viewer.html.action.ActionException;
+
+public class ContextTest_mapCollection {
+
+    @Rule
+    public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+    private Context context;
+
+    @Before
+    public void setUp() throws Exception {
+        Logger.getRootLogger().setLevel(Level.OFF);
+        context = new Context(null);
+    }
+
+    @Test
+    public void getMappedCollection_forNonExistentId() {
+
+
+        try {
+            assertNull(context.getMappedCollection("NON-EXISTENT-ID"));
+            fail();
+        } catch (final ActionException ex) {
+            // expected
+        }
+    }
+
+    @Test
+    public void mapCollection_then_getMappedCollection() throws Exception {
+
+        // given
+        iswf.persist(iswf.fixtures.smpl1);
+        iswf.persist(iswf.fixtures.smpl2);
+
+        final List<SimpleEntity> collection = Lists.newArrayList();
+        collection.add(iswf.fixtures.smpl1);
+        collection.add(iswf.fixtures.smpl2);
+        
+        final Oid oid1 = getAdapterManager().adapterFor(iswf.fixtures.smpl1).getOid();
+        final Oid oid2 = getAdapterManager().adapterFor(iswf.fixtures.smpl2).getOid();
+        
+        final ObjectAdapter collectionAdapter = getAdapterManager().adapterFor(collection);
+        final String id = context.mapCollection(collectionAdapter);
+        
+        iswf.bounceSystem();
+
+        // when
+        final ObjectAdapter mappedCollection = context.getMappedCollection(id);
+        
+        // then
+        final List<?> list = (List<?>) mappedCollection.getObject();
+
+        final Oid oid1Remapped = getAdapterManager().adapterFor(list.get(0)).getOid();
+        final Oid oid2Remapped = getAdapterManager().adapterFor(list.get(1)).getOid();
+        assertEquals(oid1, oid1Remapped);
+        assertEquals(oid2, oid2Remapped);
+    }
+
+    
+
+    @Test
+    public void testRegisteredCollectionReturnSameIdentityForSameCollection() {
+        
+        // given
+        iswf.persist(iswf.fixtures.smpl1);
+        iswf.persist(iswf.fixtures.smpl2);
+
+        final List<SimpleEntity> collection = Lists.newArrayList();
+        collection.add(iswf.fixtures.smpl1);
+        collection.add(iswf.fixtures.smpl2);
+        
+        final ObjectAdapter collectionAdapter = getAdapterManager().adapterFor(collection);
+        
+        // when
+        final String id = context.mapCollection(collectionAdapter);
+        final String id2 = context.mapCollection(collectionAdapter);
+        
+        // then
+        assertEquals(id, id2);
+    }
+
+    @Test
+    public void testRegisteredCollectionReturnDifferentIdentityForDifferentCollection() {
+
+        // given
+        iswf.persist(iswf.fixtures.smpl1);
+        iswf.persist(iswf.fixtures.smpl2);
+
+        final List<SimpleEntity> collection1 = Lists.newArrayList();
+        collection1.add(iswf.fixtures.smpl1);
+        final ObjectAdapter collection1Adapter = getAdapterManager().adapterFor(collection1);
+
+        final List<SimpleEntity> collection2 = Lists.newArrayList();
+        collection2.add(iswf.fixtures.smpl2);
+        final ObjectAdapter collection2Adapter = getAdapterManager().adapterFor(collection2);
+
+        // when
+        final String id = context.mapCollection(collection1Adapter);
+        final String id2 = context.mapCollection(collection2Adapter);
+        
+        // then
+        assertThat(id, not(equalTo(id2)));
+    }
+
+    
+    private PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+    private AdapterManager getAdapterManager() {
+        return getPersistenceSession().getAdapterManager();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapObject.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapObject.java b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapObject.java
new file mode 100644
index 0000000..1f8dc06
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapObject.java
@@ -0,0 +1,266 @@
+/*
+ *  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.context;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.oid.Oid;
+import org.apache.isis.core.metamodel.adapter.version.Version;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.viewer.html.action.ActionException;
+
+public class ContextTest_mapObject {
+
+    @Rule
+    public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+    private ObjectAdapter originalAdapter;
+    private Oid oid;
+    private ObjectAdapter restoredAdapter;
+
+    private Context context;
+
+    @Before
+    public void setUp() throws Exception {
+        Logger.getRootLogger().setLevel(Level.OFF);
+        context = new Context(null);
+    }
+    
+    @Test
+    public void mapObject_then_restoreAllObjectsToLoader() throws Exception {
+
+        // given
+        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
+        oid = originalAdapter.getOid();
+        context.mapObject(originalAdapter);
+        
+        iswf.bounceSystem();
+        
+        // when
+        context.restoreAllObjectsToLoader();
+        restoredAdapter = getAdapterManager().getAdapterFor(oid);
+
+        assertNotNull("loaders is missing the object", getAdapterManager().getAdapterFor(oid));
+        assertNotSame("expect the loader to have a new adapter", originalAdapter, restoredAdapter);
+        
+        // then
+        assertEquals(originalAdapter.getOid(), restoredAdapter.getOid());
+        assertNotSame(originalAdapter, restoredAdapter);
+        assertEquals(originalAdapter.getObject().getClass(), restoredAdapter.getObject().getClass());
+        assertEquals(originalAdapter.getVersion(), restoredAdapter.getVersion());
+        assertEquals(ResolveState.TRANSIENT, restoredAdapter.getResolveState());
+    }
+
+    
+    @Test
+    public void mapObject_forTransient_then_getMappedObject_byId() {
+
+        // given
+        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
+        oid = originalAdapter.getOid();
+        final String id = context.mapObject(originalAdapter);
+        
+        // when
+        restoredAdapter = context.getMappedObject(id);
+        
+        // then
+        assertEquals(originalAdapter, restoredAdapter);
+    }
+
+
+    @Test
+    public void mapObject_forPersistent_then_getMappedObject_byId() {
+
+        // given
+        iswf.persist(iswf.fixtures.smpl1);
+
+        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
+        oid = originalAdapter.getOid();
+        final String id = context.mapObject(originalAdapter);
+        
+        // when
+        restoredAdapter = context.getMappedObject(id);
+        
+        // then
+        assertEquals(originalAdapter, restoredAdapter);
+    }
+
+
+    @Test
+    public void getMappedObject_forPersistent_whenChanged() throws Exception {
+
+        // given
+        iswf.persist(iswf.fixtures.smpl1);
+        
+        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
+        final Oid oid = originalAdapter.getOid();
+        final String id = context.mapObject(originalAdapter);
+        
+        final Version version = originalAdapter.getVersion();
+        
+        iswf.fixtures.smpl1.setName("changed date");
+        iswf.bounceSystem(); // does a commit, which will bump the version
+        
+        originalAdapter = getAdapterManager().getAdapterFor(oid);
+        
+        final Version version2 = originalAdapter.getVersion();
+        
+        assertThat(version.different(version2), is(true));
+        
+        
+        // when
+        restoredAdapter = context.getMappedObject(id);
+        final String message = context.getMessage(1);
+        
+        // then
+        assertEquals("Reloaded object " + restoredAdapter.titleString(), message);
+    }
+
+    
+    @Test
+    public void mapObject_forTransient_alwaysReturnsSameId() {
+
+        // given
+        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
+        
+        // when
+        final String id = context.mapObject(originalAdapter);
+        final String id2 = context.mapObject(originalAdapter);
+        
+        // then
+        assertEquals(id, id2);
+    }
+
+    
+    @Test
+    public void mapObject_forPersistent_alwaysReturnsSameId() {
+
+        // given
+        iswf.persist(iswf.fixtures.smpl1);
+        
+        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
+        
+        // when
+        final String id = context.mapObject(originalAdapter);
+        final String id2 = context.mapObject(originalAdapter);
+        
+        // then
+        assertEquals(id, id2);
+    }
+
+    
+    @Test
+    public void mapObject_forTransient_returnsDifferentIdsForDifferentObjects() {
+
+        // when
+        final String id = context.mapObject(getAdapterManager().adapterFor(iswf.fixtures.smpl1));
+        final String id2 = context.mapObject(getAdapterManager().adapterFor(iswf.fixtures.smpl2));
+        
+        // then
+        assertThat(id, not(equalTo(id2)));
+    }
+
+
+    @Test
+    public void mapObject_forPersistent_returnsDifferentIdsForDifferentObjects() {
+
+        // given
+        iswf.persist(iswf.fixtures.smpl1);
+        iswf.persist(iswf.fixtures.smpl2);
+        
+        // when
+        final String id = context.mapObject(getAdapterManager().adapterFor(iswf.fixtures.smpl1));
+        final String id2 = context.mapObject(getAdapterManager().adapterFor(iswf.fixtures.smpl2));
+        
+        // then
+        assertThat(id, not(equalTo(id2)));
+    }
+
+    
+    @Test
+    public void restoreAllObjectsToLoader_restoredAsGhosts() throws Exception {
+
+        // given
+        iswf.persist(iswf.fixtures.smpl1);
+        originalAdapter = getAdapterManager().adapterFor(iswf.fixtures.smpl1);
+        oid = originalAdapter.getOid();
+        
+        iswf.bounceSystem();
+        
+        // when
+        context.restoreAllObjectsToLoader();
+        
+        // then
+        restoredAdapter = getAdapterManager().getAdapterFor(oid);
+        
+        assertEquals("expect versions to match", originalAdapter.getVersion(), restoredAdapter.getVersion());
+        assertEquals(ResolveState.GHOST, restoredAdapter.getResolveState());
+    }
+
+    
+    
+    @Test
+    public void testExceptionThrownWhenNoActionForIdentity() {
+        
+        iswf.persist(iswf.fixtures.smpl1);
+        iswf.persist(iswf.fixtures.smpl2);
+        
+        // when
+        context.mapObject(getAdapterManager().adapterFor(iswf.fixtures.smpl1));
+
+        try {
+            assertNull(context.getMappedObject("NON-EXISTENT-ID"));
+            fail();
+        } catch (final ActionException ex) {
+            // expected
+        }
+    }
+
+    
+
+    private PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+    private AdapterManager getAdapterManager() {
+        return getPersistenceSession().getAdapterManager();
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_serialization.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_serialization.java b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_serialization.java
new file mode 100644
index 0000000..1ef838f
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_serialization.java
@@ -0,0 +1,97 @@
+/*
+ *  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.context;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.jmock.Expectations;
+import org.jmock.auto.Mock;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
+import org.apache.isis.viewer.html.HtmlViewerConstants;
+import org.apache.isis.viewer.html.PathBuilder;
+import org.apache.isis.viewer.html.PathBuilderDefault;
+import org.apache.isis.viewer.html.component.ComponentFactory;
+import org.apache.isis.viewer.html.component.html.HtmlComponentFactory;
+
+public class ContextTest_serialization {
+
+    @Rule
+    public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+    @Rule
+    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_ONLY);
+    
+    @Mock
+    private IsisConfiguration isisConfiguration;
+    
+    private ComponentFactory factory;
+    private PathBuilder pathBuilder;
+    
+    private Context viewerContext;
+
+    @Before
+    public void setUp() throws Exception {
+        Logger.getRootLogger().setLevel(Level.OFF);
+        
+        pathBuilder = new PathBuilderDefault("shtml");
+        context.checking(new Expectations() {
+            {
+                allowing(isisConfiguration).getString(HtmlViewerConstants.STYLE_SHEET);
+                will(returnValue("someStyleSheet.css"));
+
+                allowing(isisConfiguration).getString(HtmlViewerConstants.HEADER_FILE);
+                will(returnValue(null));
+
+                allowing(isisConfiguration).getString(HtmlViewerConstants.HEADER);
+                will(returnValue("<div></div>"));
+
+                allowing(isisConfiguration).getString(HtmlViewerConstants.FOOTER_FILE);
+                will(returnValue(null));
+
+                allowing(isisConfiguration).getString(HtmlViewerConstants.FOOTER);
+                will(returnValue("<div></div>"));
+            }
+        });
+
+        factory = new HtmlComponentFactory(pathBuilder, isisConfiguration);
+        
+        viewerContext = new Context(factory);
+    }
+
+
+    @Test
+    public void writeObject() throws IOException {
+        OutputStream baos = new ByteArrayOutputStream();
+        final ObjectOutputStream objectOutputStream = new ObjectOutputStream(baos);
+        objectOutputStream.writeObject(viewerContext);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ObjectActionNoop.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ObjectActionNoop.java b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ObjectActionNoop.java
new file mode 100644
index 0000000..2927c28
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ObjectActionNoop.java
@@ -0,0 +1,312 @@
+/*
+ *  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.context;
+
+import java.util.List;
+
+import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.annotation.ActionSemantics;
+import org.apache.isis.applib.annotation.Where;
+import org.apache.isis.applib.filter.Filter;
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.consent.Allow;
+import org.apache.isis.core.metamodel.consent.Consent;
+import org.apache.isis.core.metamodel.consent.InteractionInvocationMethod;
+import org.apache.isis.core.metamodel.facetapi.Facet;
+import org.apache.isis.core.metamodel.facetapi.FeatureType;
+import org.apache.isis.core.metamodel.facetapi.MultiTypedFacet;
+import org.apache.isis.core.metamodel.interactions.ActionInvocationContext;
+import org.apache.isis.core.metamodel.interactions.UsabilityContext;
+import org.apache.isis.core.metamodel.interactions.VisibilityContext;
+import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
+import org.apache.isis.core.metamodel.spec.ActionType;
+import org.apache.isis.core.metamodel.spec.Instance;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
+
+/**
+ * Has no functionality but makes it easier to write tests that require an
+ * instance of an {@link Identifier}.
+ * 
+ * <p>
+ * Was previously DummyAction, in the web viewer project. Only used by tests
+ * there.
+ */
+public class ObjectActionNoop implements ObjectAction {
+
+    public boolean[] canParametersWrap() {
+        return null;
+    }
+
+    @Override
+    public String debugData() {
+        return null;
+    }
+
+    @Override
+    public ObjectAdapter execute(final ObjectAdapter target, final ObjectAdapter[] parameters) {
+        return null;
+    }
+
+    @Override
+    public List<ObjectAction> getActions() {
+        return null;
+    }
+
+    @Override
+    public ObjectAdapter[] getDefaults(final ObjectAdapter target) {
+        return null;
+    }
+
+    @Override
+    public String getDescription() {
+        return null;
+    }
+
+    @Override
+    public boolean containsFacet(final Class<? extends Facet> facetType) {
+        return false;
+    }
+
+    @Override
+    public boolean containsDoOpFacet(final Class<? extends Facet> facetType) {
+        return false;
+    }
+
+    @Override
+    public <T extends Facet> T getFacet(final Class<T> cls) {
+        return null;
+    }
+
+    @Override
+    public Class<? extends Facet>[] getFacetTypes() {
+        return new Class[0];
+    }
+
+    @Override
+    public List<Facet> getFacets(final Filter<Facet> filter) {
+        return null;
+    }
+
+    @Override
+    public void addFacet(final Facet facet) {
+    }
+
+    @Override
+    public void addFacet(final MultiTypedFacet facet) {
+    }
+
+    @Override
+    public void removeFacet(final Facet facet) {
+    }
+
+    @Override
+    public void removeFacet(final Class<? extends Facet> facetType) {
+    }
+
+    @Override
+    public Identifier getIdentifier() {
+        return null;
+    }
+
+    @Override
+    public String getHelp() {
+        return null;
+    }
+
+    @Override
+    public String getId() {
+        return null;
+    }
+
+    @Override
+    public String getName() {
+        return null;
+    }
+
+    @Override
+    public ObjectSpecification getOnType() {
+        return null;
+    }
+
+    @Override
+    public ObjectAdapter[][] getChoices(final ObjectAdapter target) {
+        return null;
+    }
+
+    @Override
+    public int getParameterCount() {
+        return 0;
+    }
+
+    @Override
+    public List<ObjectActionParameter> getParameters() {
+        return null;
+    }
+
+    @Override
+    public List<ObjectActionParameter> getParameters(final Filter<ObjectActionParameter> filter) {
+        return null;
+    }
+
+    @Override
+    public ObjectActionParameter getParameterById(final String paramId) {
+        return null;
+    }
+
+    @Override
+    public ObjectActionParameter getParameterByName(final String paramName) {
+        return null;
+    }
+
+    @Override
+    public ObjectSpecification getReturnType() {
+        return null;
+    }
+
+    @Override
+    public ActionType getType() {
+        return null;
+    }
+
+    @Override
+    public boolean hasReturn() {
+        return false;
+    }
+
+    @Override
+    public boolean isContributed() {
+        return false;
+    }
+
+    @Override
+    public boolean promptForParameters(final ObjectAdapter target) {
+        return false;
+    }
+
+    @Override
+    public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter targetObjectAdapter, Where where) {
+        return null;
+    }
+
+    @Override
+    public boolean isAlwaysHidden() {
+        return false;
+    }
+
+    @Override
+    public Consent isVisible(final AuthenticationSession session, final ObjectAdapter target, Where where) {
+        return Allow.DEFAULT;
+    }
+
+    @Override
+    public Consent isUsable(final AuthenticationSession session, final ObjectAdapter target, Where where) {
+        return Allow.DEFAULT;
+    }
+
+    @Override
+    public Consent isProposedArgumentSetValid(final ObjectAdapter object, final ObjectAdapter[] parameters) {
+        return Allow.DEFAULT;
+    }
+
+    @Override
+    public ObjectAdapter realTarget(final ObjectAdapter target) {
+        return target;
+    }
+
+    @Override
+    public ObjectSpecification getSpecification() {
+        return null;
+    }
+
+    @Override
+    public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, Where where) {
+        return null;
+    }
+
+    @Override
+    public ActionInvocationContext createActionInvocationInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter object, final ObjectAdapter[] candidateArguments) {
+        return null;
+    }
+
+    // /////////////////////////////////////////////////////////////
+    // isAction, isAssociation
+    // /////////////////////////////////////////////////////////////
+
+    @Override
+    public boolean isAction() {
+        return true;
+    }
+
+    @Override
+    public boolean isPropertyOrCollection() {
+        return false;
+    }
+
+    @Override
+    public boolean isOneToManyAssociation() {
+        return false;
+    }
+
+    @Override
+    public boolean isOneToOneAssociation() {
+        return false;
+    }
+
+    // /////////////////////////////////////////////////////////////
+    // getInstance
+    // /////////////////////////////////////////////////////////////
+
+    @Override
+    public Instance getInstance(final ObjectAdapter adapter) {
+        final ObjectAction specification = this;
+        return adapter.getInstance(specification);
+    }
+
+    @Override
+    public List<ObjectSpecification> getParameterTypes() {
+        return null;
+    }
+
+    public RuntimeContext getRuntimeContext() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * org.apache.isis.core.metamodel.spec.feature.ObjectFeature#getFeatureType
+     * ()
+     */
+    @Override
+    public FeatureType getFeatureType() {
+        return FeatureType.ACTION;
+    }
+
+    @Override
+    public ActionSemantics.Of getSemantics() {
+        return ActionSemantics.Of.NON_IDEMPOTENT;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/request/ImageProviderResourceBasedTest.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/request/ImageProviderResourceBasedTest.java b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/request/ImageProviderResourceBasedTest.java
new file mode 100644
index 0000000..5bcb836
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/request/ImageProviderResourceBasedTest.java
@@ -0,0 +1,65 @@
+/*
+ *  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.request;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.apache.isis.viewer.html.image.ImageProviderResourceBased;
+
+public class ImageProviderResourceBasedTest {
+
+    private ImageProviderResourceBased imageProvider;
+
+    @Before
+    public void setUp() {
+        imageProvider = new ImageProviderResourceBased();
+    }
+
+    @After
+    public void tearDown() {
+        imageProvider = null;
+    }
+
+    @Test
+    public void canFindDefaultExplicitly() {
+        assertThat(imageProvider.image("Default"), equalTo("images/Default.png"));
+    }
+
+    @Test
+    public void nonExistentImageUsesDefault() {
+        assertThat(imageProvider.image("NonExistent"), equalTo("images/Default.png"));
+    }
+
+    @Test
+    public void nonDefaultPngExistingImageIsReturned() {
+        assertThat(imageProvider.image("Service"), equalTo("images/Service.png"));
+    }
+
+    @Test
+    public void nonDefaultGifExistingImageIsReturned() {
+        assertThat(imageProvider.image("Customer"), equalTo("images/Customer.gif"));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/test/resources/images/Customer.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/test/resources/images/Customer.gif b/mothballed/component/viewer/html/impl/src/test/resources/images/Customer.gif
new file mode 100644
index 0000000..dde9be8
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/test/resources/images/Customer.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/test/resources/images/Service.png
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/test/resources/images/Service.png b/mothballed/component/viewer/html/impl/src/test/resources/images/Service.png
new file mode 100644
index 0000000..6e52db7
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/test/resources/images/Service.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/monitoring/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/monitoring/pom.xml b/mothballed/component/viewer/html/monitoring/pom.xml
new file mode 100644
index 0000000..32cb724
--- /dev/null
+++ b/mothballed/component/viewer/html/monitoring/pom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.isis.viewer</groupId>
+		<artifactId>isis-viewer-html</artifactId>
+		<version>1.0.0-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>isis-viewer-html-monitoring</artifactId>
+	<name>Isis HTML Viewer Monitoring</name>
+
+	<properties>
+    </properties>
+
+    <url>http://isis.apache.org/${relativeUrl}</url>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>org.apache.isis.core</groupId>
+			<artifactId>isis-core-runtime</artifactId>
+		</dependency>
+
+	    <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.5_spec</artifactId>
+		    <scope>provided</scope>
+        </dependency>
+
+	</dependencies>
+</project>


[09/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/src/test/java/org/apache/isis/security/sql/authentication/SqlAuthenticatorTest.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/src/test/java/org/apache/isis/security/sql/authentication/SqlAuthenticatorTest.java b/mothballed/component/security/sql/src/test/java/org/apache/isis/security/sql/authentication/SqlAuthenticatorTest.java
new file mode 100755
index 0000000..df7de99
--- /dev/null
+++ b/mothballed/component/security/sql/src/test/java/org/apache/isis/security/sql/authentication/SqlAuthenticatorTest.java
@@ -0,0 +1,114 @@
+/*
+ *  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.sql.authentication;
+
+import java.util.Properties;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import org.apache.isis.core.commons.config.IsisConfigurationDefault;
+import org.apache.isis.core.runtime.authentication.AuthenticationRequestPassword;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
+public class SqlAuthenticatorTest {
+    IsisConfigurationDefault configuration;
+    SqlAuthenticator saipSqlAuthenticator;
+
+    private static final String PASSWORD_FIELD = "password";
+    private static final String USERNAME_FIELD = "email";
+    private static final String USERS = "USERS";
+
+    @Before
+    public void setUp() {
+        // Setup properties files
+        final Properties properties = new Properties();
+        properties.setProperty(SqlAuthenticator.USER_TABLE, USERS);
+        properties.setProperty(SqlAuthenticator.USER_TABLE_NAME_FIELD, USERNAME_FIELD);
+        properties.setProperty(SqlAuthenticator.USER_TABLE_PASSWORD_FIELD, PASSWORD_FIELD);
+
+        properties.put(SqlAuthenticator.PROPERTY_BASE + ".jdbc.driver", "org.hsqldb.jdbcDriver");
+        properties.put(SqlAuthenticator.PROPERTY_BASE + ".jdbc.connection", "jdbc:hsqldb:file:hsql-db/authenticator-tests");
+        properties.put(SqlAuthenticator.PROPERTY_BASE + ".jdbc.user", "sa");
+        properties.put(SqlAuthenticator.PROPERTY_BASE + ".jdbc.password", "");
+
+        configuration = new IsisConfigurationDefault();
+        configuration.add(properties);
+
+        // setup configuration
+        IsisContext.setConfiguration(configuration);
+
+        // Setup database
+        String sql;
+
+        saipSqlAuthenticator = new SqlAuthenticator(configuration);
+        saipSqlAuthenticator.init();
+
+        if (saipSqlAuthenticator.isSetup()) { // clear existing data
+            sql = "DROP TABLE " + USERS;
+            saipSqlAuthenticator.update(sql);
+        }
+
+        sql = "CREATE TABLE " + USERS + " (" + USERNAME_FIELD + " VARCHAR(32), " + PASSWORD_FIELD + " VARCHAR(32)) ";
+        saipSqlAuthenticator.update(sql);
+
+        // create data
+        sql = "INSERT INTO " + USERS + " VALUES ('user1','password1')";
+        saipSqlAuthenticator.update(sql);
+
+    }
+
+    @Test
+    public void VerifyThatIsValidReturnsTrue() {
+        final AuthenticationRequestPassword request = new AuthenticationRequestPassword("user1", "password1");
+        Assert.assertTrue(saipSqlAuthenticator.isValid(request));
+    }
+
+    @Test
+    public void VerifyThatIsValidReturnsTrueInMixedCase() {
+        final AuthenticationRequestPassword request = new AuthenticationRequestPassword("uSer1", "password1");
+        Assert.assertTrue(saipSqlAuthenticator.isValid(request));
+    }
+
+    @Test
+    public void VerifyThatIsValidReturnsFalseForNoPassword() {
+        final AuthenticationRequestPassword request = new AuthenticationRequestPassword("user1", "");
+        Assert.assertFalse(saipSqlAuthenticator.isValid(request));
+    }
+
+    @Test
+    public void VerifyThatIsValidReturnsFalseForWrongPassword() {
+        final AuthenticationRequestPassword request = new AuthenticationRequestPassword("user1", "password12");
+        Assert.assertFalse(saipSqlAuthenticator.isValid(request));
+    }
+
+    @Test
+    public void VerifyThatIsValidReturnsFalseForWrongUsername() {
+        final AuthenticationRequestPassword request = new AuthenticationRequestPassword("user", "password1");
+        Assert.assertFalse(saipSqlAuthenticator.isValid(request));
+    }
+
+    @After
+    public void tearDown() {
+        saipSqlAuthenticator.shutdown();
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/NOTICE
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/NOTICE b/mothballed/component/viewer/html/NOTICE
new file mode 100644
index 0000000..ba21d0c
--- /dev/null
+++ b/mothballed/component/viewer/html/NOTICE
@@ -0,0 +1,7 @@
+Apache Isis
+Copyright 2010-2013 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/pom.xml b/mothballed/component/viewer/html/impl/pom.xml
new file mode 100644
index 0000000..4f029ef
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/pom.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.isis.viewer</groupId>
+		<artifactId>isis-viewer-html</artifactId>
+		<version>1.0.0-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>isis-viewer-html-impl</artifactId>
+
+	<name>Isis Html Viewer Implementation</name>
+
+	<properties>
+        <siteBaseDir>..</siteBaseDir>
+		<relativeUrl>html</relativeUrl>
+    </properties>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-project-info-reports-plugin</artifactId>
+				<version>${maven-project-info-reports-plugin}</version>
+                <inherited>false</inherited>
+                <configuration>
+                	<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+                </configuration>
+                <reportSets>
+                    <reportSet>
+                        <inherited>false</inherited>
+                        <reports>
+                            <report>dependency-convergence</report>
+                            <report>dependencies</report>
+                            <report>plugins</report>
+                            <report>summary</report>
+                        </reports>
+                    </reportSet>
+                </reportSets>
+            </plugin>
+        </plugins>
+    </reporting>
+
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.isis.core</groupId>
+			<artifactId>isis-core-metamodel</artifactId>
+			<type>test-jar</type>
+            <scope>test</scope>
+		</dependency>
+
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-unittestsupport</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+		<dependency>
+			<groupId>org.apache.isis.core</groupId>
+			<artifactId>isis-core-runtime</artifactId>
+			<type>test-jar</type>
+            <scope>test</scope>
+		</dependency>
+
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-integtestsupport</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+		<dependency>
+			<groupId>org.apache.isis.core</groupId>
+			<artifactId>isis-core-runtime</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.isis.viewer</groupId>
+			<artifactId>isis-viewer-html-monitoring</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-lang</groupId>
+			<artifactId>commons-lang</artifactId>
+		</dependency>
+		<dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.5_spec</artifactId>
+			<scope>provided</scope>
+		</dependency>
+	</dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/docbkx/guide/isis-html-viewer.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/docbkx/guide/isis-html-viewer.xml b/mothballed/component/viewer/html/impl/src/docbkx/guide/isis-html-viewer.xml
new file mode 100644
index 0000000..ad4f63f
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/docbkx/guide/isis-html-viewer.xml
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"file:./src/docbkx/dtd-4.5/docbookx.dtd">
+<!--
+  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.
+-->
+<book>
+  <bookinfo>
+    <title><?eval ${docbkxGuideTitle}?></title>
+
+    <subtitle><?eval ${docbkxGuideSubTitle}?></subtitle>
+
+    <releaseinfo><?eval ${project.version}?></releaseinfo>
+
+    <authorgroup>
+      <author>
+        <firstname>Robert</firstname>
+
+        <surname>Matthews</surname>
+      </author>
+    </authorgroup>
+
+    <legalnotice>
+      <para>Permission is granted to make and distribute verbatim copies of
+      this manual provided that the copyright notice and this permission
+      notice are preserved on all copies.</para>
+    </legalnotice>
+  </bookinfo>
+
+  <!-- front matter -->
+
+  <toc></toc>
+
+  <preface id="preface">
+    <title>Preface</title>
+
+    <para><emphasis>Apache Isis</emphasis> is designed to allow programmers
+    rapidly develop domain-driven applications following the <ulink
+    url="http://en.wikipedia.org/wiki/Naked_Objects">Naked Objects</ulink>
+    pattern. It is made up of a core framework plus a number of alternate
+    implementations, and supports various viewers and object stores. Apache
+    Isis is hosted at the <ulink url="http://incubator.apache.org/isis">Apache
+    Foundation</ulink>, and is licensed under <ulink
+    url="http://www.apache.org/licenses/LICENSE-2.0.html">Apache Software
+    License v2</ulink>.</para>
+
+    <para>This guide is written for programmers looking to customize,
+    configure and deploy <emphasis>Apache Isis</emphasis> applications using
+    the <emphasis>HTML viewer</emphasis> as the primary user interface.</para>
+  </preface>
+
+  <!-- main content -->
+
+  <chapter id="chp.Intro">
+    <title>Introduction</title>
+
+    <abstract>
+      <para>*** yada yada</para>
+    </abstract>
+
+    <sect1>
+      <title>***</title>
+
+      <para><emphasis>*** yada yada</emphasis></para>
+    </sect1>
+  </chapter>
+
+  <chapter>
+    <title>***</title>
+
+    <abstract>
+      <para>*** yada yada</para>
+    </abstract>
+
+    <sect1>
+      <title>***</title>
+
+      <para><emphasis>*** yada yada</emphasis></para>
+
+      <sect2>
+        <title>Properties</title>
+
+        <para>The html viewer has only two properties</para>
+
+        <programlisting format="linespecific">isis.viewer.html.debug=true</programlisting>
+
+        <para>Which enables debugging on the web controller.</para>
+
+        <programlisting format="linespecific">isis.viewer.html.encoding=UTF-8</programlisting>
+
+        <para>Which enables the character set encoding used by the
+        HTTPServletRequest. This is ISO-8859-1 by default.</para>
+
+        <para></para>
+
+        <para></para>
+      </sect2>
+
+      <sect2>
+        <title>Reading HTML viewer specific properties</title>
+
+        <para></para>
+
+        <para></para>
+
+        <programlisting>&lt;web.xml&gt;
+    ...
+    &lt;context-param&gt;
+        &lt;param-name&gt;isis.viewers&lt;/param-name&gt;
+        &lt;param-value&gt;html&lt;/param-value&gt;
+    &lt;/context-param&gt;
+    ...
+&lt;/web.xml&gt;</programlisting>
+
+        <para>This will cause the viewer_html.properties file to be read if it
+        is present.</para>
+
+        <para></para>
+
+        <para></para>
+
+        <para>NB: the value for this parameter is actually comma-separated, to
+        allow for multiple viewers to be configured in the same webapp.</para>
+
+        <para></para>
+      </sect2>
+
+      <sect2>
+        <title>Hosting multiple viewers at the same time</title>
+
+        <para></para>
+
+        <para>*** combine the servlet, filter and listener entries.</para>
+
+        <para></para>
+
+        <para></para>
+
+        <para></para>
+
+        <para>By default the htmlviewer uses ".app" as the suffix for its .
+        this can be changed using the viewer-html.suffix init-param in
+        web.xml:</para>
+
+        <para></para>
+
+        <para>avoid name clashes.</para>
+
+        <para></para>
+
+        <para></para>
+
+        <para></para>
+
+        <programlisting>&lt;web.xml&gt;
+    ...
+    &lt;context-param&gt;
+        &lt;param-name&gt;viewer-html.suffix&lt;/param-name&gt;
+        &lt;param-value&gt;htmlviewer&lt;/param-value&gt;
+    &lt;/context-param&gt;
+    ...
+&lt;/web.xml&gt;</programlisting>
+
+        <para></para>
+
+        <para></para>
+
+        <para></para>
+      </sect2>
+
+      <sect2>
+        <title>Debugging</title>
+
+        <para>To turn on debuging use the debugon command, e.g.,</para>
+
+        <programlisting>http://localhost:8080/debugon.app</programlisting>
+
+        <para>A control bar appears a the bottom of the page allowing you to
+        display the object graph, specification, connection details and so on.
+        To turn it off use the debugoff command:</para>
+
+        <programlisting>http://localhost:8080/debugoff.app</programlisting>
+
+        <para>The debug pages can be displayed directly by providing the
+        commands: debug; spec and dump - along with a object id if necessary.
+        For example to view the details about the specification for object 28
+        use:</para>
+
+        <programlisting>http://localhost:8080/spec.app?id=28</programlisting>
+
+        <para></para>
+
+        <para></para>
+      </sect2>
+    </sect1>
+  </chapter>
+
+  <appendix>
+    <title>***</title>
+
+    <abstract>
+      <para>*** yada yada</para>
+    </abstract>
+
+    <sect1 id="sec.module-ui">
+      <title>***</title>
+
+      <para>*** yada yada</para>
+    </sect1>
+  </appendix>
+</book>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerConstants.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerConstants.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerConstants.java
new file mode 100644
index 0000000..d59ea24
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerConstants.java
@@ -0,0 +1,46 @@
+/*
+ *  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 org.apache.isis.core.commons.config.ConfigurationConstants;
+
+public final class HtmlViewerConstants {
+
+    public static final String PROPERTY_BASE = ConfigurationConstants.ROOT + "viewer.html.";
+    public static final String STYLE_SHEET = PROPERTY_BASE + "style-sheet";
+    public static final String HEADER_FILE = PROPERTY_BASE + "header-file";
+    /**
+     * Used if {@link #HEADER_FILE} is not specified or does not refer to a
+     * valid resource.
+     */
+    public static final String HEADER = PROPERTY_BASE + "header";
+    public static final String FOOTER_FILE = PROPERTY_BASE + "footer-file";
+    /**
+     * Used if {@link #FOOTER_FILE} is not specified or does not refer to a
+     * valid resource.
+     */
+    public static final String FOOTER = PROPERTY_BASE + "footer";
+
+    public static final String VIEWER_HTML_RESOURCE_BASE_KEY = PROPERTY_BASE + "resourceBase";
+
+    private HtmlViewerConstants() {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java
new file mode 100644
index 0000000..1d8729e
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java
@@ -0,0 +1,92 @@
+/*
+ *  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 org.apache.isis.core.commons.lang.MapUtils;
+import org.apache.isis.core.runtime.Isis;
+import org.apache.isis.core.runtime.installerregistry.installerapi.IsisViewerInstallerAbstract;
+import org.apache.isis.core.runtime.viewer.IsisViewer;
+import org.apache.isis.core.runtime.viewer.web.WebAppSpecification;
+import org.apache.isis.core.runtime.web.EmbeddedWebViewer;
+import org.apache.isis.core.webapp.IsisSessionFilter;
+import org.apache.isis.core.webapp.content.ResourceCachingFilter;
+import org.apache.isis.core.webapp.content.ResourceServlet;
+import org.apache.isis.viewer.html.servlet.ControllerServlet;
+import org.apache.isis.viewer.html.servlet.HtmlServletConstants;
+import org.apache.isis.viewer.html.servlet.LogonServlet;
+
+/**
+ * Convenience implementation of a {@link IsisViewer} providing the ability to
+ * run a Jetty web server configured for the HTML viewer from the {@link Isis
+ * command line}.
+ * 
+ * <p>
+ * To run, use the <tt>--viewer html</tt> flag.
+ * 
+ * <p>
+ * In a production deployment the configuration represented by the
+ * {@link WebAppSpecification} would be specified in the <tt>web.xml<tt> file.
+ */
+public class HtmlViewerInstaller extends IsisViewerInstallerAbstract {
+
+    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" };
+    private static final String DYNAMIC_CONTENT = "*.app";
+
+    public HtmlViewerInstaller() {
+        super("html");
+    }
+
+    @Override
+    public IsisViewer doCreateViewer() {
+        return new EmbeddedWebViewer() {
+            @Override
+            public WebAppSpecification getWebAppSpecification() {
+
+                final WebAppSpecification webAppSpec = new WebAppSpecification();
+
+                webAppSpec.addContextParams("isis.viewers", "html");
+
+                webAppSpec.addFilterSpecification(IsisSessionFilter.class, MapUtils.asMap(IsisSessionFilter.RESTRICTED_KEY, LOGON_PAGE_MAPPED), DYNAMIC_CONTENT);
+                webAppSpec.addServletSpecification(LogonServlet.class, LOGON_PAGE_MAPPED);
+                webAppSpec.addServletSpecification(ControllerServlet.class, DYNAMIC_CONTENT);
+
+                webAppSpec.addFilterSpecification(ResourceCachingFilter.class, MapUtils.asMap("CacheTime", "86400"), STATIC_CONTENT);
+                webAppSpec.addServletSpecification(ResourceServlet.class, STATIC_CONTENT);
+
+                final String resourceBaseDir = getConfiguration().getString(HtmlViewerConstants.VIEWER_HTML_RESOURCE_BASE_KEY);
+                if (resourceBaseDir != null) {
+                    webAppSpec.addResourcePath(resourceBaseDir);
+                }
+                webAppSpec.addResourcePath("./src/main/resources");
+                webAppSpec.addResourcePath("./src/main/webapp");
+                webAppSpec.addResourcePath("./web");
+                webAppSpec.addResourcePath(".");
+
+                webAppSpec.setLogHint("open a web browser and browse to logon.app to connect");
+
+                return webAppSpec;
+            }
+        };
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilder.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilder.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilder.java
new file mode 100644
index 0000000..37ea6db
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilder.java
@@ -0,0 +1,30 @@
+/*
+ *  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 java.io.Serializable;
+
+public interface PathBuilder extends Serializable {
+
+    public String getSuffix();
+
+    public String pathTo(final String prefix);
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java
new file mode 100644
index 0000000..962507c
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java
@@ -0,0 +1,60 @@
+/*
+ *  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 static final long serialVersionUID = 1L;
+    
+    private final String 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 PathBuilderDefault(final ServletContext servletContext) {
+        this(getSuffixInitParam(servletContext));
+    }
+
+    public PathBuilderDefault(final String suffix) {
+        this.suffix = suffix;
+    }
+
+    @Override
+    public String getSuffix() {
+        return suffix;
+    }
+
+    @Override
+    public String pathTo(final String prefix) {
+        final StringBuilder buf = new StringBuilder(prefix);
+        if (!prefix.endsWith(".")) {
+            buf.append(".");
+        }
+        buf.append(suffix);
+        return buf.toString();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Action.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Action.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Action.java
new file mode 100644
index 0000000..fab30ba
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Action.java
@@ -0,0 +1,32 @@
+/*
+ *  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.action;
+
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public interface Action {
+
+    void execute(Request request, Context context, Page page);
+
+    String name();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ActionException.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ActionException.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ActionException.java
new file mode 100644
index 0000000..723392e
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ActionException.java
@@ -0,0 +1,43 @@
+/*
+ *  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.action;
+
+import org.apache.isis.core.commons.exceptions.IsisException;
+
+public class ActionException extends IsisException {
+    private static final long serialVersionUID = 1L;
+
+    public ActionException() {
+        super();
+    }
+
+    public ActionException(final String msg, final Throwable cause) {
+        super(msg, cause);
+    }
+
+    public ActionException(final String msg) {
+        super(msg);
+    }
+
+    public ActionException(final Throwable cause) {
+        super(cause);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ChangeContext.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ChangeContext.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ChangeContext.java
new file mode 100644
index 0000000..a72df6b
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ChangeContext.java
@@ -0,0 +1,39 @@
+/*
+ *  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.action;
+
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public class ChangeContext implements Action {
+
+    @Override
+    public void execute(final Request request, final Context context, final Page page) {
+        final int id = Integer.valueOf(request.getObjectId()).intValue();
+        request.forward(context.changeContext(id));
+    }
+
+    @Override
+    public String name() {
+        return "context";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/LogOut.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/LogOut.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/LogOut.java
new file mode 100644
index 0000000..4cea18c
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/LogOut.java
@@ -0,0 +1,47 @@
+/*
+ *  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.action;
+
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.runtime.authentication.AuthenticationManager;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public class LogOut implements Action {
+    @Override
+    public void execute(final Request request, final Context context, final Page page) {
+        final AuthenticationSession authSession = IsisContext.getAuthenticationSession();
+        if (authSession != null) {
+            getAuthenticationManager().closeSession(authSession);
+        }
+        context.invalidate();
+    }
+
+    private static AuthenticationManager getAuthenticationManager() {
+        return IsisContext.getAuthenticationManager();
+    }
+
+    @Override
+    public String name() {
+        return "logout";
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Welcome.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Welcome.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Welcome.java
new file mode 100644
index 0000000..7d67c92
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Welcome.java
@@ -0,0 +1,52 @@
+/*
+ *  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.action;
+
+import org.apache.isis.core.runtime.about.AboutIsis;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.component.ViewPane;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public class Welcome implements Action {
+    public static final String COMMAND = "start";
+
+    @Override
+    public void execute(final Request request, final Context context, final Page page) {
+        page.setTitle("Isis Application");
+
+        context.init();
+
+        final ViewPane content = page.getViewPane();
+        content.setTitle("Welcome", null);
+
+        String name = AboutIsis.getApplicationName();
+        if (name == null) {
+            name = AboutIsis.getFrameworkName();
+        }
+        content.add(context.getComponentFactory().createInlineBlock("message", "Welcome to " + name + ", accessed via the HTML Viewer", null));
+    }
+
+    @Override
+    public String name() {
+        return COMMAND;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/AddItemToCollection.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/AddItemToCollection.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/AddItemToCollection.java
new file mode 100644
index 0000000..647d12b
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/AddItemToCollection.java
@@ -0,0 +1,56 @@
+/*
+ *  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.action.edit;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
+import org.apache.isis.viewer.html.action.Action;
+import org.apache.isis.viewer.html.action.ActionException;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.ForwardRequest;
+import org.apache.isis.viewer.html.request.Request;
+import org.apache.isis.viewer.html.task.AddItemToCollectionTask;
+
+public class AddItemToCollection implements Action {
+
+    @Override
+    public void execute(final Request request, final Context context, final Page page) {
+        final String collectionField = request.getProperty();
+
+        final String idString = request.getObjectId();
+        if (idString == null) {
+            throw new ActionException("Task no longer in progress");
+        }
+        final ObjectAdapter object = context.getMappedObject(idString);
+        final ObjectSpecification specification = object.getSpecification();
+        final OneToManyAssociation field = (OneToManyAssociation) specification.getAssociation(collectionField);
+        final AddItemToCollectionTask addTask = new AddItemToCollectionTask(context, object, field);
+        context.addTaskCrumb(addTask);
+        request.forward(ForwardRequest.task(addTask));
+    }
+
+    @Override
+    public String name() {
+        return "add";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/EditObject.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/EditObject.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/EditObject.java
new file mode 100644
index 0000000..eb575db
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/EditObject.java
@@ -0,0 +1,52 @@
+/*
+ *  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.action.edit;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.viewer.html.action.Action;
+import org.apache.isis.viewer.html.action.ActionException;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.ForwardRequest;
+import org.apache.isis.viewer.html.request.Request;
+import org.apache.isis.viewer.html.task.EditTask;
+
+public class EditObject implements Action {
+
+    @Override
+    public void execute(final Request request, final Context context, final Page page) {
+        final String idString = request.getObjectId();
+        if (idString == null) {
+            throw new ActionException("Task no longer in progress");
+        }
+        final ObjectAdapter object = context.getMappedObject(idString);
+        if (!(object.isTransient())) {
+            context.setObjectCrumb(object);
+        }
+        final EditTask editTask = new EditTask(context, object);
+        context.addTaskCrumb(editTask);
+        request.forward(ForwardRequest.task(editTask));
+    }
+
+    @Override
+    public String name() {
+        return Request.EDIT_COMMAND;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/RemoveItemFromCollection.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/RemoveItemFromCollection.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/RemoveItemFromCollection.java
new file mode 100644
index 0000000..88c61e9
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/RemoveItemFromCollection.java
@@ -0,0 +1,53 @@
+/*
+ *  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.action.edit;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
+import org.apache.isis.viewer.html.action.Action;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.ForwardRequest;
+import org.apache.isis.viewer.html.request.Request;
+
+public class RemoveItemFromCollection implements Action {
+
+    @Override
+    public void execute(final Request request, final Context context, final Page page) {
+        final String objectId = request.getObjectId();
+        final String elementId = request.getElementId();
+        final String collectionField = request.getProperty();
+
+        final ObjectAdapter target = context.getMappedObject(objectId);
+        final ObjectAdapter element = context.getMappedObject(elementId);
+        final ObjectSpecification specification = target.getSpecification();
+        final OneToManyAssociation field = (OneToManyAssociation) specification.getAssociation(collectionField);
+        field.removeElement(target, element);
+
+        request.forward(ForwardRequest.viewObject(objectId, collectionField));
+    }
+
+    @Override
+    public String name() {
+        return "remove";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/Save.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/Save.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/Save.java
new file mode 100644
index 0000000..e424770
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/Save.java
@@ -0,0 +1,65 @@
+/*
+ *  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.action.edit;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.core.runtime.system.transaction.IsisTransactionManager;
+import org.apache.isis.viewer.html.action.Action;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.ForwardRequest;
+import org.apache.isis.viewer.html.request.Request;
+
+public class Save implements Action {
+
+    @Override
+    public void execute(final Request request, final Context context, final Page page) {
+
+        final ObjectAdapter adapter = context.getMappedObject(request.getObjectId());
+
+        // xactn mgmt now done by PersistenceSession#makePersistent()
+        // getTransactionManager().startTransaction();
+        getPersistenceSession().makePersistent(adapter);
+        // getTransactionManager().endTransaction();
+
+        // return to view
+        request.forward(ForwardRequest.viewObject(request.getObjectId()));
+    }
+
+    // /////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // /////////////////////////////////////////////////////
+
+    private IsisTransactionManager getTransactionManager() {
+        return getPersistenceSession().getTransactionManager();
+    }
+
+    private PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+    @Override
+    public String name() {
+        return "save";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/About.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/About.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/About.java
new file mode 100644
index 0000000..8d05fda
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/About.java
@@ -0,0 +1,50 @@
+/*
+ *  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.action.misc;
+
+import org.apache.isis.core.runtime.about.AboutIsis;
+import org.apache.isis.viewer.html.action.Action;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.component.ViewPane;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public class About implements Action {
+
+    @Override
+    public void execute(final Request request, final Context context, final Page page) {
+        final ViewPane content = page.getViewPane();
+        content.setTitle("About", null);
+
+        content.add(context.getComponentFactory().createInlineBlock("about", AboutIsis.getApplicationName(), null));
+        content.add(context.getComponentFactory().createInlineBlock("about", AboutIsis.getApplicationVersion(), null));
+        content.add(context.getComponentFactory().createInlineBlock("about", AboutIsis.getApplicationCopyrightNotice(), null));
+
+        content.add(context.getComponentFactory().createInlineBlock("about", AboutIsis.getFrameworkName(), null));
+        content.add(context.getComponentFactory().createInlineBlock("about", AboutIsis.getFrameworkVersion(), null));
+        content.add(context.getComponentFactory().createInlineBlock("about", AboutIsis.getFrameworkCopyrightNotice(), null));
+    }
+
+    @Override
+    public String name() {
+        return "about";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SetUser.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SetUser.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SetUser.java
new file mode 100644
index 0000000..1ef5d66
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SetUser.java
@@ -0,0 +1,47 @@
+/*
+ *  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.action.misc;
+
+import org.apache.isis.core.runtime.authentication.exploration.MultiUserExplorationSession;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.viewer.html.action.Action;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.component.ViewPane;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public class SetUser implements Action {
+
+    @Override
+    public void execute(final Request request, final Context context, final Page page) {
+        final String name = request.getName();
+        final MultiUserExplorationSession session = (MultiUserExplorationSession) IsisContext.getAuthenticationSession();
+        session.setCurrentSession(name);
+
+        final ViewPane content = page.getViewPane();
+        content.setTitle("Exploration User changed to " + name, null);
+
+    }
+
+    @Override
+    public String name() {
+        return "setuser";
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SwapUser.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SwapUser.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SwapUser.java
new file mode 100644
index 0000000..381c353
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SwapUser.java
@@ -0,0 +1,80 @@
+/*
+ *  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.action.misc;
+
+import java.util.StringTokenizer;
+
+import org.apache.isis.core.runtime.authentication.exploration.ExplorationAuthenticatorConstants;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.viewer.html.action.Action;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.component.ViewPane;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public class SwapUser implements Action {
+
+    @Override
+    public void execute(final Request request, final Context context, final Page page) {
+        final ViewPane content = page.getViewPane();
+        content.setTitle("Swap Exploration User", null);
+
+        // TODO pick out users from the perspectives, but only show when in
+        // exploration mode
+        final String users = IsisContext.getConfiguration().getString(ExplorationAuthenticatorConstants.USERS);
+        if (users != null) {
+            final StringTokenizer st = new StringTokenizer(users, ",");
+            if (st.countTokens() > 0) {
+                while (st.hasMoreTokens()) {
+                    final String token = st.nextToken();
+                    int end = token.indexOf(':');
+                    if (end == -1) {
+                        end = token.length();
+                    }
+                    final String name = token.substring(0, end).trim();
+
+                    content.add(context.getComponentFactory().createUserSwap(name));
+                }
+            }
+        }
+
+        // TODO find user list and interate through them
+        /*
+         * content.add(context.getFactory().createInlineBlock("title",
+         * AboutIsis.getApplicationName(), null));
+         * content.add(context.getFactory().createInlineBlock("title",
+         * AboutIsis.getApplicationVersion(), null));
+         * content.add(context.getFactory().createInlineBlock("title",
+         * AboutIsis.getApplicationCopyrightNotice(), null));
+         * 
+         * content.add(context.getFactory().createInlineBlock("title",
+         * AboutIsis.getFrameworkName(), null));
+         * content.add(context.getFactory().createInlineBlock("title",
+         * AboutIsis.getFrameworkVersion(), null));
+         * content.add(context.getFactory().createInlineBlock("title",
+         * AboutIsis.getFrameworkCopyrightNotice(), null));
+         */
+    }
+
+    @Override
+    public String name() {
+        return "swapuser";
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/CollectionView.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/CollectionView.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/CollectionView.java
new file mode 100644
index 0000000..2164e4b
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/CollectionView.java
@@ -0,0 +1,80 @@
+/*
+ *  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.action.view;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacet;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters;
+import org.apache.isis.viewer.html.action.Action;
+import org.apache.isis.viewer.html.action.ActionException;
+import org.apache.isis.viewer.html.action.view.util.TableUtil;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.component.Table;
+import org.apache.isis.viewer.html.component.ViewPane;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public class CollectionView implements Action {
+
+    @Override
+    public final void execute(final Request request, final Context context, final Page page) {
+        final String idString = request.getObjectId();
+        final ObjectAdapter collection = context.getMappedCollection(idString);
+        if (collection == null) {
+            throw new ActionException("No such collection: " + idString);
+        }
+        final String titleString = collection.titleString();
+
+        page.setTitle(titleString);
+
+        final TypeOfFacet facet = collection.getSpecification().getFacet(TypeOfFacet.class);
+        final ObjectSpecification elementSpecification = facet.valueSpec();
+
+        final ViewPane content = page.getViewPane();
+        content.setWarningsAndMessages(context.getMessages(), context.getWarnings());
+        content.setTitle(titleString, null);
+        String iconName = collection.getIconName();
+        if (iconName == null) {
+            iconName = elementSpecification.getShortIdentifier();
+        }
+        content.setIconName(iconName);
+
+        if (elementSpecification.getAssociations(ObjectAssociationFilters.WHEN_VISIBLE_IRRESPECTIVE_OF_WHERE).size() != 0) {
+            final Table table = TableUtil.createTable(context, false, collection, titleString, elementSpecification);
+            content.add(table);
+        } else {
+            // TODO this should create a list component instead of a table
+            final Table table = TableUtil.createTable(context, false, collection, titleString, elementSpecification);
+            content.add(table);
+        }
+
+        context.addCollectionCrumb(idString);
+
+        context.addCollectionToHistory(idString);
+        context.clearMessagesAndWarnings();
+    }
+
+    @Override
+    public String name() {
+        return Request.COLLECTION_COMMAND;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/FieldCollectionView.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/FieldCollectionView.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/FieldCollectionView.java
new file mode 100644
index 0000000..1e4babe
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/FieldCollectionView.java
@@ -0,0 +1,60 @@
+/*
+ *  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.action.view;
+
+import org.apache.isis.applib.annotation.Where;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.viewer.html.action.view.util.TableUtil;
+import org.apache.isis.viewer.html.component.Table;
+import org.apache.isis.viewer.html.component.ViewPane;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public class FieldCollectionView extends ObjectViewAbstract {
+    
+    private final Where where = Where.PARENTED_TABLES;
+
+    @Override
+    protected void doExecute(final Context context, final ViewPane content, final ObjectAdapter object, final String field) {
+        final String id = context.mapObject(object);
+        final ObjectSpecification specification = object.getSpecification();
+
+        final OneToManyAssociation collection = (OneToManyAssociation) specification.getAssociation(field);
+
+        IsisContext.getPersistenceSession().resolveField(object, collection);
+
+        context.addCollectionFieldCrumb(collection.getName());
+        content.add(context.getComponentFactory().createHeading(collection.getName()));
+        final Table table = TableUtil.createTable(context, id, object, collection);
+        content.add(table);
+        if (collection.isUsable(IsisContext.getAuthenticationSession(), object, where).isAllowed()) {
+            content.add(context.getComponentFactory().createAddOption(id, collection.getId()));
+        }
+    }
+
+    @Override
+    public String name() {
+        return Request.FIELD_COLLECTION_COMMAND;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java
new file mode 100644
index 0000000..e7a9682
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java
@@ -0,0 +1,129 @@
+/*
+ *  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.action.view;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.Where;
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.commons.exceptions.UnknownTypeException;
+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.core.metamodel.spec.feature.ObjectAssociationFilters;
+import org.apache.isis.viewer.html.component.Block;
+import org.apache.isis.viewer.html.component.Component;
+import org.apache.isis.viewer.html.component.ComponentFactory;
+import org.apache.isis.viewer.html.component.ViewPane;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public class ObjectView extends ObjectViewAbstract {
+
+    // REVIEW: confirm this rendering context
+    private final Where where = Where.OBJECT_FORMS;
+
+    @Override
+    protected boolean addObjectToHistory() {
+        return true;
+    }
+
+    @Override
+    protected void doExecute(final Context context, final ViewPane content, final ObjectAdapter adapter, final String field) {
+        final String id = context.mapObject(adapter);
+        final ObjectSpecification specification = adapter.getSpecification();
+
+        final AuthenticationSession authenticationSession = getAuthenticationSession();
+
+        createObjectView(context, adapter, content, id);
+
+        // // TODO: this test should be done by the ImmutableFacetFactory
+        // installing an immutableFacet on every
+        // // member
+        // final boolean immutable =
+        // ImmutableFacetUtils.isAlwaysImmutable(specification)
+        // || (adapter.isPersistent() &&
+        // ImmutableFacetUtils.isImmutableOncePersisted(specification));
+
+        boolean atLeastOneFieldVisibleAndEditable = false;
+        final List<ObjectAssociation> flds = specification.getAssociations();
+        for (int i = 0; i < flds.size(); i++) {
+            if (flds.get(i).isVisible(authenticationSession, adapter, where).isAllowed() && flds.get(i).isUsable(authenticationSession, adapter, where).isAllowed()) {
+                atLeastOneFieldVisibleAndEditable = true;
+                break;
+            }
+        }
+        if (/* !immutable && */atLeastOneFieldVisibleAndEditable) {
+            content.add(context.getComponentFactory().createEditOption(id));
+        }
+
+        context.setObjectCrumb(adapter);
+    }
+
+    private void createObjectView(final Context context, final ObjectAdapter object, final ViewPane pane, final String id) {
+
+        final ObjectSpecification specification = object.getSpecification();
+        final List<ObjectAssociation> visibleFields = specification.getAssociations(ObjectAssociationFilters.dynamicallyVisible(getAuthenticationSession(), object, where));
+        for (int i = 0; i < visibleFields.size(); i++) {
+            final ObjectAssociation field = visibleFields.get(i);
+
+            final ComponentFactory factory = context.getComponentFactory();
+            final Block fieldBlock = factory.createBlock("field", field.getDescription());
+            fieldBlock.add(factory.createInlineBlock("label", field.getName(), null));
+            fieldBlock.add(factory.createInlineBlock("separator", ":  ", null));
+
+            getPersistenceSession().resolveField(object, field);
+
+            // ordering is important here;
+            // look at parseable fields before objects
+            final ObjectAdapter associatedObject = field.get(object);
+            Component component = null;
+            if (field.getSpecification().isParseable()) {
+                component = factory.createParseableField(field, associatedObject, false);
+            } else if (field.isOneToOneAssociation()) {
+                if (associatedObject == null) {
+                    component = factory.createInlineBlock("value", "", null);
+                    fieldBlock.add(component);
+                } else {
+                    // previously there was a called to resolveImmediately here
+                    // on the
+                    // associated object, but it has been removed (presumably we
+                    // don't
+                    // want to force eager loading).
+                    final String elementId = context.mapObject(associatedObject);
+                    component = factory.createObjectIcon(field, associatedObject, elementId, "value");
+                }
+            } else if (field.isOneToManyAssociation()) {
+                component = factory.createCollectionIcon(field, associatedObject, id);
+            } else {
+                throw new UnknownTypeException(field);
+            }
+            fieldBlock.add(component);
+
+            pane.add(fieldBlock);
+        }
+    }
+
+    @Override
+    public String name() {
+        return Request.OBJECT_COMMAND;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectViewAbstract.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectViewAbstract.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectViewAbstract.java
new file mode 100644
index 0000000..67e55cc
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectViewAbstract.java
@@ -0,0 +1,89 @@
+/*
+ *  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.action.view;
+
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.Persistor;
+import org.apache.isis.viewer.html.action.Action;
+import org.apache.isis.viewer.html.action.ActionException;
+import org.apache.isis.viewer.html.action.view.util.MenuUtil;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.component.ViewPane;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public abstract class ObjectViewAbstract implements Action {
+
+    @Override
+    public final void execute(final Request request, final Context context, final Page page) {
+        final String idString = request.getObjectId();
+        final ObjectAdapter adapter = context.getMappedObject(idString);
+        if (adapter == null) {
+            throw new ActionException("No such object: " + idString);
+        }
+
+        getPersistenceSession().resolveImmediately(adapter);
+
+        page.setTitle(adapter.titleString());
+
+        final ViewPane content = page.getViewPane();
+        content.setWarningsAndMessages(context.getMessages(), context.getWarnings());
+        content.setTitle(adapter.titleString(), adapter.getSpecification().getDescription());
+        content.setIconName(adapter.getIconName());
+
+        if (addObjectToHistory()) {
+            context.addObjectToHistory(idString);
+        }
+
+        context.purgeObjectsAndCollections();
+
+        content.setMenu(MenuUtil.menu(adapter, idString, context));
+
+        String iconName = adapter.getIconName();
+        if (iconName == null) {
+            iconName = adapter.getSpecification().getShortIdentifier();
+        }
+
+        content.setIconName(iconName);
+
+        final String field = request.getProperty();
+        doExecute(context, content, adapter, field);
+
+        context.clearMessagesAndWarnings();
+    }
+
+    protected void doExecute(final Context context, final ViewPane content, final ObjectAdapter object, final String field) {
+    }
+
+    protected boolean addObjectToHistory() {
+        return false;
+    }
+
+    protected AuthenticationSession getAuthenticationSession() {
+        return IsisContext.getAuthenticationSession();
+    }
+
+    protected Persistor getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ServiceView.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ServiceView.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ServiceView.java
new file mode 100644
index 0000000..aac0c72
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ServiceView.java
@@ -0,0 +1,38 @@
+/*
+ *  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.action.view;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.viewer.html.component.ViewPane;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public class ServiceView extends ObjectViewAbstract {
+    @Override
+    protected void doExecute(final Context context, final ViewPane content, final ObjectAdapter object, final String field) {
+        context.setObjectCrumb(object);
+    }
+
+    @Override
+    public String name() {
+        return Request.SERVICE_COMMAND;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java
new file mode 100644
index 0000000..8d7f021
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java
@@ -0,0 +1,110 @@
+/*
+ *  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.action.view.util;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.isis.applib.annotation.Where;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.consent.Consent;
+import org.apache.isis.core.metamodel.spec.ActionType;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.metamodel.spec.feature.ObjectActionContainer.Contributed;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.viewer.html.component.Component;
+import org.apache.isis.viewer.html.context.Context;
+
+public class MenuUtil {
+
+    // REVIEW: confirm this rendering context
+    private final static Where where = Where.OBJECT_FORMS;
+
+    public static Component[] menu(final ObjectAdapter target, final String targetObjectId, final Context context) {
+        final ObjectSpecification specification = target.getSpecification();
+        final List<ObjectAction> actions = specification.getObjectActions(Arrays.asList(ActionType.USER, ActionType.EXPLORATION, ActionType.PROTOTYPE), Contributed.INCLUDED);
+        final Component[] menuItems = createMenu("Actions", target, actions, context, targetObjectId);
+        return menuItems;
+    }
+
+    private static Component[] createMenu(final String menuName, final ObjectAdapter target, final List<ObjectAction> actions, final Context context, final String targetObjectId) {
+        final List<Component> menuItems = new ArrayList<Component>();
+        for (int j = 0; j < actions.size(); j++) {
+            final ObjectAction action = actions.get(j);
+            final String name = action.getName();
+            Component menuItem = null;
+            if (action.getActions().size() > 0) {
+                final Component[] components = createMenu(name, target, action.getActions(), context, targetObjectId);
+                menuItem = context.getComponentFactory().createSubmenu(name, components);
+            } else {
+                if (!action.isVisible(IsisContext.getAuthenticationSession(), target, where).isAllowed()) {
+                    continue;
+                }
+
+                if (action.getType() == ActionType.USER) {
+                    // carry on, process this action
+                } else if (action.getType() == ActionType.EXPLORATION) {
+                    final boolean isExploring = IsisContext.getDeploymentType().isExploring();
+                    if (isExploring) {
+                        // carry on, process this action
+                    } else {
+                        // ignore this action, skip onto next
+                        continue;
+                    }
+                } else if (action.getType() == ActionType.PROTOTYPE) {
+                    final boolean isPrototyping = IsisContext.getDeploymentType().isPrototyping();
+                    if (isPrototyping) {
+                        // carry on, process this action
+                    } else {
+                        // ignore this action, skip onto next
+                        continue;
+                    }
+                } else if (action.getType() == ActionType.DEBUG) {
+                    // TODO: show if debug "gesture" present
+                } else {
+                    // ignore this action, skip onto next
+                    continue;
+                }
+
+                final String actionId = context.mapAction(action);
+                boolean collectParameters;
+                if (action.getParameterCount() == 0) {
+                    collectParameters = false;
+                    // TODO use new promptForParameters method instead of all
+                    // this
+                } else if (action.getParameterCount() == 1 && action.isContributed() && target.getSpecification().isOfType(action.getParameters().get(0).getSpecification())) {
+                    collectParameters = false;
+                } else {
+                    collectParameters = true;
+                }
+                final Consent consent = action.isUsable(IsisContext.getAuthenticationSession(), target, where);
+                final String consentReason = consent.getReason();
+                menuItem = context.getComponentFactory().createMenuItem(actionId, action.getName(), action.getDescription(), consentReason, action.getType(), collectParameters, targetObjectId);
+            }
+            if (menuItem != null) {
+                menuItems.add(menuItem);
+            }
+        }
+        return menuItems.toArray(new Component[] {});
+    }
+
+}


[12/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/site/apt/index.apt b/component/viewer/html/monitoring/src/site/apt/index.apt
deleted file mode 100644
index 80756ec..0000000
--- a/component/viewer/html/monitoring/src/site/apt/index.apt
+++ /dev/null
@@ -1,31 +0,0 @@
-~~  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.
-
-
-
-Monitoring Support
- 
- The <monitoring> module is a small module that provides monitoring tools
- for the <default runtime>.
- 
- []
- 
-Documentation
-
- See the {{{../index.html}default runtime}} documentation 
- ({{{../docbkx/html/guide/isis-default-runtime.html}HTML}} or 
- {{{../docbkx/pdf/isis-default-runtime.pdf}PDF}}).
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/site/apt/jottings.apt
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/site/apt/jottings.apt b/component/viewer/html/monitoring/src/site/apt/jottings.apt
deleted file mode 100644
index 7920f56..0000000
--- a/component/viewer/html/monitoring/src/site/apt/jottings.apt
+++ /dev/null
@@ -1,43 +0,0 @@
-~~  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.
-
-
-
-Jottings
- 
-  This page is to capture any random jottings relating to this module prior 
-  to being moved into formal documentation. 
-
-Support for viewer config files 
-
-  The "Installer" architecture will automatically load configFiles, following 
-  the convention "xxx_yyy.properties".  When run from org.apache.isis.Isis or
-  org.apache.isis.WebServer, a "viewer installer" is also specified, meaning
-  that a config file for this viewer is also loaded (eg viewer_html.properties).
-  However, while IsisWebAppBootstrapper uses the installer architecture for
-  "back-end" components (security, persistor etc), it is not used for the viewers.
-  
-  Therefore, the IsisWebAppBootstrapper will load additional config files for
-  viewers if required, by searching for the "isis.viewers" context-param.
-  
-  For example:
-
-     <context-param>
-        <param-name>isis.viewers</param-name>
-        <param-value>restful</param-value>
-     </context-param>
- 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/monitoring/src/site/site.xml
----------------------------------------------------------------------
diff --git a/component/viewer/html/monitoring/src/site/site.xml b/component/viewer/html/monitoring/src/site/site.xml
deleted file mode 100644
index ec82d2b..0000000
--- a/component/viewer/html/monitoring/src/site/site.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project>
-
-	<body>
-		<breadcrumbs>
-			<item name="Monitoring" href="index.html"/>
-		</breadcrumbs>
-
-		<menu name="Monitoring">
-			<item name="About" href="index.html" />
-            <item name="Jottings" href="jottings.html" />
-		</menu>
-
-        <menu name="Default Runtime">
-            <item name="Implementation" href="../runtime/index.html" />
-            <item name="Objectstores" href="../objectstores/index.html" />
-            <item name="Profilestores" href="../profilestores/index.html" />
-            <item name="Bytecode" href="../bytecode/index.html" />
-            <item name="Monitoring" href="../monitoring/index.html" />
-            <item name="Webapp Support" href="../webapp/index.html" />
-            <item name="Webserver" href="../webserver/index.html" />
-            <item name="Remoting" href="../remoting/index.html" />
-        </menu>
-        
-		<menu name="Maven Reports" ref="reports" />
-	</body>
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/pom.xml
----------------------------------------------------------------------
diff --git a/component/viewer/html/pom.xml b/component/viewer/html/pom.xml
deleted file mode 100644
index 42672af..0000000
--- a/component/viewer/html/pom.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>org.apache.isis.core</groupId>
-		<artifactId>isis</artifactId>
-        <version>1.1.1-SNAPSHOT</version>
-		<relativePath>../../../core/pom.xml</relativePath>
-	</parent>
-
-	<groupId>org.apache.isis.viewer</groupId>
-	<artifactId>isis-viewer-html</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-
-	<name>Isis Html Viewer</name>
-	<packaging>pom</packaging>
-
-	<properties>
-        <siteBaseDir>.</siteBaseDir>
-		<relativeUrl/>
-
-		<docbkxGuideTitle>Apache Isis HTML Viewer</docbkxGuideTitle>
-        <docbkxGuideSubTitle>Configuration, Customization and Deployment Guide</docbkxGuideSubTitle>
-		<docbkxGuideName>isis-html-viewer</docbkxGuideName>
-    </properties>
-
-    <!-- used in Site generation for relative references. -->
-    <url>http://isis.apache.org/${relativeUrl}</url>
-
-	<build>
-		<pluginManagement>
-			<plugins>
-                <!-- Apache Release Audit Tool -->
-                <plugin>
-                    <groupId>org.apache.rat</groupId>
-                    <artifactId>apache-rat-plugin</artifactId>
-                    <version>0.8</version>
-	                <configuration>
-	                    <excludes>
-	                    	<!-- 
-	                    	overriding inherited excludes from oia.core:isis 
-	                    	with a more specific set for this component
-	                    	 -->
-	                        <exclude>**/target/**</exclude>
-	                        <exclude>**/target-ide/**</exclude>
-
-	                        <exclude>**/*.project</exclude>
-	                        <exclude>**/.classpath</exclude>
-	                        <exclude>**/.settings/**</exclude>
-	                    </excludes>
-                    </configuration>
-	            </plugin>
-			</plugins>
-		</pluginManagement>
-		<plugins>
-            <plugin>
-                <groupId>com.agilejava.docbkx</groupId>
-                <artifactId>docbkx-maven-plugin</artifactId>
-				<inherited>false</inherited>
-            </plugin>
-		</plugins>
-	</build>
-
-	<dependencyManagement>
-	    <dependencies>
-	    
-
-	    	<!-- also for benefit of application developers, using scope=import -->
-	    
-			<!-- for this module -->
-		    <dependency>
-			    <groupId>org.apache.isis.viewer</groupId>
-			    <artifactId>isis-viewer-html-impl</artifactId>
-                <version>1.0.0-SNAPSHOT</version>
-		    </dependency>
-
-		    <dependency>
-			    <groupId>org.apache.isis.viewer</groupId>
-			    <artifactId>isis-viewer-html-monitoring</artifactId>
-                <version>1.0.0-SNAPSHOT</version>
-		    </dependency>
-
-	   </dependencies>
-	</dependencyManagement>
-
-	<modules>
-		<module>impl</module>
-		<module>monitoring</module>
-		<module>tck</module>
-	</modules>
-
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/src/main/appended-resources/supplemental-models.xml
----------------------------------------------------------------------
diff --git a/component/viewer/html/src/main/appended-resources/supplemental-models.xml b/component/viewer/html/src/main/appended-resources/supplemental-models.xml
deleted file mode 100644
index ecd3906..0000000
--- a/component/viewer/html/src/main/appended-resources/supplemental-models.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 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. -->
-<supplementalDataModels xmlns="http://maven.apache.org/supplemental-model/1.0.0"
-                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                        xsi:schemaLocation="http://maven.apache.org/supplemental-model/1.0.0 http://maven.apache.org/xsd/supplemental-model-1.0.0.xsd">
-
-  <supplement>
-    <project>
-      <groupId>aopalliance</groupId>
-      <artifactId>aopalliance</artifactId>
-      <version>1.0</version>
-      <licenses>
-          <license>
-              <name>Public Domain</name>
-          </license>
-      </licenses>
-    </project>
-  </supplement>
-
-  <supplement>
-   	<!-- not quite sure why licenses:download-license flags this, since license info seems to be in its POM -->
-    <project>
-		<groupId>org.datanucleus</groupId>
-	    <artifactId>datanucleus-jodatime</artifactId>
-	    <version>3.1.1</version>
-          <licenses>
-			<license>
-	            <name>The Apache Software License, Version 2.0</name>
-	            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-	        </license>
-	    </licenses>
-    </project>
-  </supplement>
-
-  <supplement>
-    <project>
-      <groupId>org.scannotation</groupId>
-      <artifactId>scannotation</artifactId>
-      <version>1.0.3</version>
-      <licenses>
-        <license>
-            <name>The Apache Software License, Version 2.0</name>
-            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-            <distribution>repo</distribution>          
-        </license>
-      </licenses>
-    </project>
-  </supplement>
-    
-  <supplement>
-    <project>
-      <groupId>dom4j</groupId>
-      <artifactId>dom4j</artifactId>
-      <version>1.6.1</version>
-      <licenses>
-        <license>
-            <name>BSD License</name>
-            <url>http://dom4j.sourceforge.net/dom4j-1.6.1/license.html</url>
-            <distribution>repo</distribution>          
-        </license>
-      </licenses>
-    </project>
-  </supplement>
-
-  <supplement>
-    <project>
-      <groupId>net.jcip</groupId>
-      <artifactId>jcip-annotations</artifactId>
-      <version>1.0</version>
-      <licenses>
-        <license>
-            <name>Creative Commons Attribution 2.5 License</name>
-            <url>http://creativecommons.org/licenses/by/2.5/</url>
-            <distribution>repo</distribution>          
-        </license>
-      </licenses>
-    </project>
-  </supplement>
-  
-
-  <supplement>
-    <project>
-      <groupId>xalan</groupId>
-      <artifactId>xalan</artifactId>
-      <version>2.7.0</version>
-      <licenses>
-        <license>
-            <name>The Apache Software License, Version 2.0</name>
-            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-            <distribution>repo</distribution>          
-        </license>
-      </licenses>
-    </project>
-  </supplement>
-
- 
-</supplementalDataModels>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/tck/ide/eclipse/launch/viewer-html-tck.launch
----------------------------------------------------------------------
diff --git a/component/viewer/html/tck/ide/eclipse/launch/viewer-html-tck.launch b/component/viewer/html/tck/ide/eclipse/launch/viewer-html-tck.launch
deleted file mode 100644
index 13af8ed..0000000
--- a/component/viewer/html/tck/ide/eclipse/launch/viewer-html-tck.launch
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
-<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
-<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="isis-viewer-html-tck"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/tck/pom.xml
----------------------------------------------------------------------
diff --git a/component/viewer/html/tck/pom.xml b/component/viewer/html/tck/pom.xml
deleted file mode 100644
index 466dac3..0000000
--- a/component/viewer/html/tck/pom.xml
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.isis.core</groupId>
-        <artifactId>isis-core-tck</artifactId>
-        <version>1.1.1-SNAPSHOT</version>
-        <relativePath>../../../../core/tck/pom.xml</relativePath>
-    </parent>
-
-    <groupId>org.apache.isis.viewer</groupId>
-	<artifactId>isis-viewer-html-tck</artifactId>
-	<name>Isis Html Viewer TCK tests</name>
-
-    <properties>
-        <isis-viewer-html.version>1.0.0-SNAPSHOT</isis-viewer-html.version>
-
-		<siteBaseDir>..</siteBaseDir>
-		<relativeUrl>html-tck/</relativeUrl>
-		<!-- until someone comes up with a better solution -->
-                <distMgmtSiteUrl>file:///tmp/m2-sites/isis/viewer/html</distMgmtSiteUrl>
-    </properties>
-
-	
-	<packaging>war</packaging>
-
-	<build>
-		<plugins>
-            <plugin>
-                <groupId>org.mortbay.jetty</groupId>
-                <artifactId>maven-jetty-plugin</artifactId>
-            </plugin>
-
-			<!-- mvn package -->
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-shade-plugin</artifactId>
-				<executions>
-					<execution>
-						<phase>package</phase>
-						<goals>
-							<goal>shade</goal>
-						</goals>
-						<configuration>
-							<transformers>
-								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-									<mainClass>org.apache.isis.WebServer</mainClass>
-								</transformer>
-							</transformers>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-
-	<dependencies>
-	
-        <!-- other modules in this project -->
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-tck-dom</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-tck-fixture</artifactId>
-        </dependency>
-
-
-        <!-- isis viewer -->
-		<dependency>
-	        <groupId>org.apache.isis.viewer</groupId>
-			<artifactId>isis-viewer-html-impl</artifactId>
-            <version>${isis-viewer-html.version}</version>
-		</dependency>
-        
-
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-bytecode-cglib</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-objectstore</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-profilestore</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-security</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-webserver</artifactId>
-            <scope>runtime</scope>
-            <optional>true</optional>
-        </dependency>
-
-        
-        <dependency>
-            <groupId>org.apache.isis.security</groupId>
-            <artifactId>isis-security-file</artifactId>
-            <version>1.0.1-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.objectstore</groupId>
-            <artifactId>isis-objectstore-xml</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.profilestore</groupId>
-            <artifactId>isis-profilestore-xml</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        
-	</dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/tck/src/main/resources/images/Default.png
----------------------------------------------------------------------
diff --git a/component/viewer/html/tck/src/main/resources/images/Default.png b/component/viewer/html/tck/src/main/resources/images/Default.png
deleted file mode 100644
index 8409e46..0000000
Binary files a/component/viewer/html/tck/src/main/resources/images/Default.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/tck/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/component/viewer/html/tck/src/main/webapp/WEB-INF/isis.properties b/component/viewer/html/tck/src/main/webapp/WEB-INF/isis.properties
deleted file mode 100644
index c3e2f11..0000000
--- a/component/viewer/html/tck/src/main/webapp/WEB-INF/isis.properties
+++ /dev/null
@@ -1,57 +0,0 @@
-#  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.
-isis.services.prefix = org.apache.isis.tck.objstore.dflt
-isis.services =\
-    scalars.ApplibValuedEntityRepositoryDefault,\
-    scalars.JdkValuedEntityRepositoryDefault,\
-    scalars.PrimitiveValuedEntityRepositoryDefault,\
-    scalars.WrapperValuedEntityRepositoryDefault, \
-    simples.SimpleEntityRepositoryDefault,\
-    assocs.ParentEntityRepositoryDefault
-
-isis.fixtures.prefix= org.apache.isis.tck.fixture
-isis.fixtures=\
-    LogonAsSvenFixture,\
-    scalars.ApplibValuedEntityFixture,\
-    scalars.JdkValuedEntityFixture,\
-    scalars.PrimitiveValuedEntityFixture,\
-    scalars.WrapperValuedEntityFixture,\
-    simples.SimpleEntityFixture,\
-    assocs.ParentAndChildEntityFixture
-
-isis.exploration.users=sven, dick, bob
-
-
-isis.reflector.class-substitutor=org.apache.isis.runtimes.dflt.bytecode.dflt.classsubstitutor.CglibClassSubstitutor
-#isis.reflector.class-substitutor=org.apache.isis.runtimes.dflt.bytecode.javassist.classsubstitutor.JavassistClassSubstitutor
-#isis.reflector.class-substitutor=org.apache.isis.runtimes.dflt.bytecode.identity.classsubstitutor.ClassSubstitutorIdentity
-
-isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.dflt.objectfactory.CglibObjectFactory
-#isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.javassist.objectfactory.JavassistObjectFactory
-#isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.identity.objectfactory.ObjectFactoryBasic
-
-
-isis.persistor.domain-object-container=org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault
-#isis.persistor.domain-object-container=org.apache.isis.progmodel.wrapper.metamodel.DomainObjectContainerWrapperFactory
-
-
-#isis.reflector.facets.include=org.apache.isis.runtimes.dflt.runtime.authorization.standard.AuthorizationFacetFactoryImpl
-#isis.authorization.learn=true
-
-isis.user-profile-store=in-memory
-isis.persistor=in-memory
-#isis.xmlos.dir=/tmp/xml
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/tck/src/main/webapp/WEB-INF/logging.properties
----------------------------------------------------------------------
diff --git a/component/viewer/html/tck/src/main/webapp/WEB-INF/logging.properties b/component/viewer/html/tck/src/main/webapp/WEB-INF/logging.properties
deleted file mode 100644
index f2d65e6..0000000
--- a/component/viewer/html/tck/src/main/webapp/WEB-INF/logging.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-#  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.
-# apache's log4j is used to provide system logging.
-log4j.rootCategory=INFO, Console
-
-# The console appender
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.target=System.out
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE}  [%-20c{1} %-10t %-5p]  %m%n
-
-log4j.appender.File=org.apache.log4j.RollingFileAppender
-log4j.appender.File.file=isis.log
-log4j.appender.File.append=false
-log4j.appender.File.layout=org.apache.log4j.PatternLayout
-log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p]  %m%n

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.allow
----------------------------------------------------------------------
diff --git a/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.allow b/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.allow
deleted file mode 100644
index 928983a..0000000
--- a/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.allow
+++ /dev/null
@@ -1,16 +0,0 @@
-#  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.

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.passwords
----------------------------------------------------------------------
diff --git a/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.passwords b/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.passwords
deleted file mode 100644
index 7f07af5..0000000
--- a/component/viewer/html/tck/src/main/webapp/WEB-INF/security_file.passwords
+++ /dev/null
@@ -1,20 +0,0 @@
-#  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.
-sven:pass
-dick:pass
-bob:pass
-joe:pass

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/tck/src/main/webapp/WEB-INF/viewer_html.properties
----------------------------------------------------------------------
diff --git a/component/viewer/html/tck/src/main/webapp/WEB-INF/viewer_html.properties b/component/viewer/html/tck/src/main/webapp/WEB-INF/viewer_html.properties
deleted file mode 100644
index 29b4425..0000000
--- a/component/viewer/html/tck/src/main/webapp/WEB-INF/viewer_html.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-#  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.
-isis.viewer.html.header=<div id="site-header"><div id="site-logo">&nbsp;</div></div>
-isis.viewer.html.footer=<div id="page-footer"><small>Powered by Apache Isis</small></div>
-isis.viewer.html.port=8080

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/tck/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/component/viewer/html/tck/src/main/webapp/WEB-INF/web.xml b/component/viewer/html/tck/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 43154f5..0000000
--- a/component/viewer/html/tck/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<web-app id="WebApp_ID" version="2.4"
-    xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
-    <display-name>Apache Isis HTML Viewer</display-name>
-
-    <listener>
-        <listener-class>org.apache.isis.core.webapp.IsisWebAppBootstrapper</listener-class>
-    </listener>
-
-    <context-param>
-        <param-name>isis.viewers</param-name>
-        <param-value>html</param-value>
-    </context-param>
-
-	<filter>
-		<filter-name>IsisSessionFilter</filter-name>
-		<filter-class>org.apache.isis.core.webapp.IsisSessionFilter</filter-class>
-		<init-param>
-			<param-name>logonPage</param-name>
-			<param-value>/logon.app</param-value>
-		</init-param>
-	</filter>
-
-	<filter>
-		<filter-name>ResourceCachingFilter</filter-name>
-		<filter-class>org.apache.isis.core.webapp.content.ResourceCachingFilter</filter-class>
-		<init-param>
-			<param-name>CacheTime</param-name>
-			<param-value>86400</param-value>
-		</init-param>
-	</filter>
-
-	<filter-mapping>
-		<filter-name>ResourceCachingFilter</filter-name>
-		<url-pattern>*.css</url-pattern>
-	</filter-mapping>
-	<filter-mapping>
-		<filter-name>ResourceCachingFilter</filter-name>
-		<url-pattern>*.png</url-pattern>
-	</filter-mapping>
-	<filter-mapping>
-		<filter-name>ResourceCachingFilter</filter-name>
-		<url-pattern>*.jpg</url-pattern>
-	</filter-mapping>
-	<filter-mapping>
-		<filter-name>ResourceCachingFilter</filter-name>
-		<url-pattern>*.gif</url-pattern>
-	</filter-mapping>
-    
-    <filter-mapping>
-    	<filter-name>IsisSessionFilter</filter-name>
-    	<url-pattern>*.app</url-pattern>
-    </filter-mapping>
-    
-    <servlet>
-        <servlet-name>Logon</servlet-name>
-        <servlet-class>org.apache.isis.viewer.html.servlet.LogonServlet</servlet-class>
-    </servlet>
-
-    <servlet>
-        <servlet-name>Controller</servlet-name>
-        <servlet-class>org.apache.isis.viewer.html.servlet.ControllerServlet</servlet-class>
-    </servlet>
-
-    <servlet>
-        <servlet-name>Resource</servlet-name>
-        <servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
-    </servlet>
-
-    <servlet>
-        <servlet-name>Forward</servlet-name>
-        <servlet-class>org.apache.isis.core.webapp.routing.ForwardingServlet</servlet-class>
-        <init-param>
-            <param-name>forwardTo</param-name>
-            <param-value>logon.app</param-value>
-        </init-param>
-    </servlet>
-
-    <servlet-mapping>
-        <servlet-name>Logon</servlet-name>
-        <url-pattern>/logon.app</url-pattern>
-    </servlet-mapping>
-
-    <servlet-mapping>
-        <servlet-name>Controller</servlet-name>
-        <url-pattern>*.app</url-pattern>
-    </servlet-mapping>
-
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-		<url-pattern>*.css</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-		<url-pattern>*.png</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-		<url-pattern>*.jpg</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-		<url-pattern>*.gif</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Forward</servlet-name>
-        <url-pattern>/</url-pattern>
-    </servlet-mapping>
-	
-</web-app>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/tck/src/main/webapp/default.css
----------------------------------------------------------------------
diff --git a/component/viewer/html/tck/src/main/webapp/default.css b/component/viewer/html/tck/src/main/webapp/default.css
deleted file mode 100644
index 04efa7d..0000000
--- a/component/viewer/html/tck/src/main/webapp/default.css
+++ /dev/null
@@ -1,933 +0,0 @@
-/*
- *  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.
- */
-/* Start Global styles */
-
-body {
-  background: #101254;
-  text-align: center;
-}
-#wrapper {
-  width: 980px;
-  min-height: 800px;
-  border:3px solid #7F81C0;
-  margin:8px auto;
-  text-align: left;
-  background: white;
-}
-
-.header-icon > img {
-	max-width: 40px;
-	height: 40px;
-}
-	
-BODY {
-	font-family: Arial, Sans-Serif;
-	margin: 0 0 10px 0;
-	color: black;
-
-/*
-	background: url(default-images/poweredby-logo.png);
-	background-repeat: no-repeat;
-	background-position: 95% 95%;
-*/
-}
-
-IMG {
-	border: 0;
-}
-
-A {
-	text-decoration: none;
-}
-
-A:hover {
-	text-decoration: underline;
-}
-
-/* End Global styles */ /* Start Heading */ 
-
-div#site-header:after {
-	bottom: 0px;
-	display: block;
-	text-align: right;
-	float:right;
-	bottom: 0;
-	font-size: 70%;
-	color: gray;
-}
-
-div#site-header {
-	background: url(images/banner-bg.png); 
-	background-repeat: repeat-x white-space :   nowrap;
-	list-style: none;
-	margin: 0px;
-	height: 100px;
-}
-
-div#site-logo {
-	background: url(images/banner.png);
-	background-repeat: no-repeat;
-	background-position: left;
-	position: absolute;
-	width: 980px;
-	height: 100px;
-	margin: 0 auto;
-}
-
-div#page-header {
-	display: none;
-}
-
-/* END Heading */
-DIV#body {
-	display: block;
-	padding-bottom: 10px;
-}
-
-div#navigation {
-	margin: 0;
-	padding: 0px;
-}
-
-/* Start options*/
-DIV.options {
-	background-color: #eeeeee;
-	margin: 0;
-	padding: 4px 0px 4px 5px;
-	min-height: 20px;
-	align: right;
-	float:right;
-}
-
-
-DIV.options H4 {
-	display: none;
-}
-
-DIV.options DIV.item {
-	display: inline;
-	border-right: 1px solid #000000;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #00000;
-	font-size: 70%;
-	margin: 0 6px 0 6px;
-	padding 0 0 0 0;
-	min-width: 200px;
-}
-
-DIV.options DIV.item IMG {
-	display: none;
-}
-
-DIV.options DIV.item a:link {
-	color: #000000;
-	text-decoration: none;
-	margin: 0 5px 0 0px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.options DIV.item a:hover {
-	background-color: #dddddd;
-	margin: 0 5px 0 0px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.options DIV.item a:visited {
-	color: #000000;
-	text-decoration: none;
-	margin: 0 5px 0 0px;
-	padding: 0 2px 0 0px;
-}
-
-/* End options */ 
-
-/* Start services */
-DIV.services {
-	background-color: #7F81C0;
-	margin: 0;
-	padding: 4px 20px 4px 5px;
-	min-height: 20px;
-
-}
-
-DIV.services H4 {
-	display: none;
-}
-
-DIV.services DIV.item {
-	display: inline;
-	border-right: 1px solid #ffffff;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #ffffff;
-	font-size: 70%;
-	margin: 3px;
-}
-
-DIV.services DIV.item IMG {
-	display: none;
-}
-
-DIV.services DIV.item a:link {
-	color: #ffffff;
-	text-decoration: none;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item a:hover {
-	background-color: #2683E2;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item a:visited {
-	color: #ffffff;
-	text-decoration: none;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item-selected {
-	background-color: #2683E2;
-	display: inline;
-	border-right: 1px solid #ffffff;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #ffffff;
-	font-size: 70%;
-}
-
-DIV.services DIV.item-selected a:link {
-	color: #ffffff;
-	text-decoration: none;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item-selected a:hover {
-	background-color: #556677;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item-selected a:visited {
-	color: #ffffff;
-	text-decoration: none;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-/* End services */ /* Start History */
-DIV.history {
-	background-color: #D6D6D6;
-	margin: 0;
-	padding: 1px 30px 0 5px;
-	min-height: 26px;
-}
-
-DIV.history H4 {
-	display: none;
-}
-
-DIV.history DIV.item {
-	display: inline;
-	border-right: 1px solid #ffffff;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #29357D;
-	font-size: 70%;
-}
-
-DIV.history DIV.item IMG {
-	position: relative;
-	top: 4px;
-	height: 16px;
-	padding: 0 5px 0 0px;
-}
-
-DIV.history DIV.item a:link {
-	color: #29357D;
-	text-decoration: none;
-	margin: 5px;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item a:hover {
-	background-color: #B7B6B6;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item a:visited {
-	color: #29357D;
-	text-decoration: none;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item-selected {
-	background-color: #2683E2;
-	display: inline;
-	border-right: 1px solid #ffffff;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #29357D;
-	font-size: 70%;
-	height: 30px;
-}
-
-DIV.history DIV.item-selected a:hover {
-	background-color: #556677;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item-selected a:link {
-	color: #29357D;
-	text-decoration: none;
-	margin: 10px;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item-selected a:visited {
-	color: #29357D;
-	text-decoration: none;
-	padding: 1px 3px 1px 3px;
-}
-
-/* INVISIBLE character for empty item. FIREFOX ONLY*/
-DIV.history:after {
-	content: "X";
-	display: inline;
-	text-align: right;
-	font-size: 70%;
-	color: #D6D6D6;
-}
-
-/* End History */ /* Start Context */
-div#context {
-	background-color: #F0F0F0;
-	margin: 0;
-	padding: 1px 30px 0 7px;
-	min-height: 26px;
-}
-
-div#context span.disabled {
-	display: inline;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #666666;
-	font-size: 70%;
-	padding: 0px 5px 0px 7px;
-	white-space: nowrap;
-}
-
-div#context span.disabled IMG {
-	display: none
-}
-
-div#context span.disabled a:link {
-	color: #29357D;
-	text-decoration: none;
-	margin: 5px;
-	padding: 1px 3px 1px 3px;
-}
-
-div#context span.disabled a:hover {
-	background-color: #B7B6B6;
-	padding: 1px 3px 1px 3px;
-}
-
-div#context span.disabled a:visited {
-	color: #29357D;
-	text-decoration: none;
-	padding: 1px 3px 1px 3px;
-}
-
-div#context a.linked {
-	display: inline;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #29357D;
-	font-size: 70%;
-	padding: 0px 5px 0px 7px;
-}
-
-div#context a.linked IMG {
-	display: none
-}
-
-div#context a.linked a:link {
-	color: #29357D;
-	text-decoration: none;
-	margin: 5px;
-	padding: 1px 3px 1px 3px;
-}
-
-div#context a.linked  a:hover {
-	background-color: #29357D;
-	padding: 1px 3px 1px 3px;
-	text-decoration: underline;
-}
-
-div#context a.linked  a:visited {
-	color: #29357D;
-	text-decoration: none;
-	padding: 1px 3px 1px 3px;
-}
-
-/* INVISIBLE character for empty breadcrumbs. FIREFOX ONLY*/
-span.disabled:after {
-	content: "X";
-	display: inline;
-	text-align: right;
-	font-size: 70%;
-	color: #F0F0F0;
-}
-
-/* End Context */ /*
-div#help-bar {
-	position: relative;
-	right: 50px;
-	top: 10px;
-	text-align: right; 
-	font-family : arial, 'sans serif'; 
-	font-weight : normal;  
-	color: #0000FF; 
-	font-size : 90%; 
-	line-height : 110%;
-	text-decoration: underline;
-	height: 22px;
-}
-*/
-DIV#body DIV#view {
-	position: relative;
-	top: 0px;
-	left: 0px;
-	margin: 0px;
-}
-
-/* Start of Message Header */
-DIV.message-header {
-	position: relative;
-	top: 10px;
-	padding: 5px 25px 5px 25px;
-	margin: 0 50px 0 255px;
-	vertical-align: middle;
-	COLOR: #003366;
-	FONT-WEIGHT: bold;
-	FONT-SIZE: 80%;
-	LEFT: auto;
-	FONT-STYLE: normal;
-	FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
-	width: 40%;
-}
-
-DIV.message-header DIV.warning {
-	COLOR: #ff0033;
-	padding: 5px 25px 5px 25px;
-	background: url(default-images/sign-warning.png);
-	background-repeat: no-repeat;
-	background-color: #D6D6D6;
-	background-position: 5px 5px;
-}
-
-DIV.message-header DIV.message {
-	COLOR: #003366;
-	padding: 5px 25px 5px 25px;
-	background: url(default-images/sign-info.png);
-	background-repeat: no-repeat;
-	background-color: #D6D6D6;
-	background-position: 5px 5px;
-}
-
-DIV.message-header DIV.message {
-	FONT-WEIGHT: normal;
-}
-
-/* End of Message Header */ /* Start of Object Header */
-DIV.header {
-	position: relative;
-	top: 40px;
-	display: block;
-	background-color: #F0F0F0;
-	min-height: 48px;
-	margin: 0 50px 0 280px;
-
-}
-
-SPAN.header-icon IMG {
-	float: left;
-}
-
-SPAN.header-text {
-	float: left;
-	position: relative;
-	top: 10px;
-	margin-left: 7px;
-	FONT-WEIGHT: bold;
-	FONT-SIZE: 16px;
-	LEFT: auto;
-	COLOR: #003366;
-	FONT-STYLE: normal;
-	FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
-}
-
-/* End of Object Header */ /* Start of Object Contents */
-DIV#content {
-	position: relative;
-	display: block;
-	top: 40px;
-	margin: 0 50px 10px 280px;
-}
-
-/* Start of Object Fields */
-DIV.field {
-	margin: 0;
-	padding: 5px 0px 5px 0px;
-	border-top: 1px solid #666666;
-	min-height: 20px;
-}
-
-DIV.field SPAN.value IMG,DIV.field DIV.value IMG {
-	position: relative;
-	top: 3px;
-	margin: 0px 5px 0 0;
-	height: 16px;
-}
-
-DIV.field SPAN.value A,DIV.field DIV.value A {
-	position: relative;
-	top: -2px;
-	margin: 0px 5px 0 0;
-	height: 16px;
-}
-
-DIV.field DIV.icon IMG {
-	position: relative;
-	top: 0px;
-	margin: 0px 5px 0 0;
-	height: 16px;
-}
-
-.label,.value {
-	font-size: 80%;
-	color: #333399;
-}
-
-DIV.field DIV.icon {
-	display: inline;
-	color: #333399;
-	position: absolute;
-	left: 200px;
-}
-
-DIV.field span.label,DIV.field DIV.label {
-	width: 170px;
-	display: block;
-	/*content: ":";*/
-	margin: 0 0 -18px 7px;
-}
-
-DIV.field span.separator {
-	display: inline;
-	position: relative;
-	margin: 0 0 -15px 180px;
-	vertical-align: top;
-}
-
-DIV.field span.value, DIV.field DIV.value, DIV.field INPUT.value, DIV.field SELECT.value
-	{
-	top: -2px;
-	position: relative;
-	margin: 0px 10px -5px 0px;
-	display: inline;
-}
-
-DIV.field span.value PRE {
-	color: #333399;
-	margin: 0;
-	font-family: inherit;
-}
-
-
-DIV.field textarea.value {
-	font-family: inherit;
-}
-
-
-DIV.field span.optional {
-	margin: -35px 0 0 0;
-	font-size: 70%;
-	color: grey;
-}
-
-DIV.field span.required {
-	display: inline;
-	position: relative;
-	margin: 0;
-	vertical-align: top;
-	color: red;
-}
-
-DIV.field span.error {
-	display: inline;
-	position: relative;
-	color: red;
-	font-size: 70%;
-}
-
-/* INVISIBLE character for empty value FIREFOX ONLY*/
-DIV.field span.value:after {
-	content: "X";
-	display: inline;
-	text-align: right;
-	font-size: 70%;
-	color: white;
-}
-
-/* INVISIBLE character for empty value FIREFOX ONLY*/
-DIV.field span.label:after {
-	content: "X";
-	display: inline;
-	text-align: right;
-	font-size: 70%;
-	color: white;
-}
-
-/* End of Object Fields */ /* Start of Object Table */
-DIV#content TABLE {
-	position: relative;
-	float: left;
-	width: 100%;
-	border: 0;
-	margin: 0 0 10px 0;
-	border-collapse: collapse;
-}
-
-DIV#content TH {
-	padding: 6px;
-	border: 1px solid #ffffff;
-	background-color: #D6D6D6;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: black;
-	font-size: 70%;
-}
-
-DIV#content TD {
-	background-color: #ffffff;
-	border-right: 0;
-	border-left: 0;
-	border-bottom: 1px solid black;
-	padding: 6px;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	font-size: 80%;
-	color: #333399;
-	margin: 0;
-	text-align: left;
-}
-
-DIV#content TD.rowstart {
-	background-color: #F0F0F0;
-}
-
-DIV#content TD A:visited {
-	color: #0000FF;
-}
-
-DIV#content H4 {
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #000000;
-	font-size: 70%;
-	border-top: 1px solid black;
-	margin: -2px 0 0 0px;
-	padding: 5px;
-}
-
-TD DIV.icon {
-	font-size: 100%;
-	margin-top: 5px;
-}
-
-TD DIV.icon IMG {
-	float: left;
-	margin: -1px 5px 5px 0px;
-	height: 16px;
-}
-
-TD DIV.action-button {
-	background-color: #ffffff;
-	font-size: 130%;
-	text-decoration: none;
-}
-
-/* End of Object Table */
-INPUT.action-button,DIV.action-button {
-	background-color: #F0F0F0;
-	padding: 10px;
-	display: block;
-	margin: 0;
-	min-height: 20px;
-}
-
-INPUT.action-button,DIV.action-button A {
-	background: url(default-images/bg-button.gif);
-	background-repeat: repeat-x;
-	padding: 2px;
-	margin: 5px;
-	border: 1px solid #333399;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #000000;
-	font-size: 70%;
-	font-weight: normal;
-	text-align: center;
-}
-
-DIV.action-button a:link {
-	color: #000000;
-}
-
-DIV.action-button a:visited {
-	color: #000000;
-}
-
-DIV.action-button a:hover {
-	color: #000000;
-	text-decoration: none;
-}
-
-INPUT.action-button,DIV.action-button INPUT {
-	float: left;
-}
-
-/* End of Object Contents */ /* Start of Object Actions Menu */
-DIV#body DIV#view DIV#menu {
-	position: relative;
-	top: 40px;
-	left: 0;
-	background-color: #ffffff;
-	border-top: 1px solid #00336F;
-	margin: 0px;
-	width: 210px;
-	display: block;
-	float: left;
-}
-
-DIV#body DIV#menu H3 {
-	display: none;
-}
-
-DIV#menu SPAN.name {
-	display: block;
-	font-size: 80%;
-	background-color: #ffffff;
-	color: #333399;
-	line-height: 100%;
-	margin: 0 0 0 10px;
-}
-
-DIV.menu-item  a:link {
-	color: #333399;
-}
-
-DIV.menu-item  a:visited {
-	color: #333399;
-}
-
-DIV.submenu-item {
-	font-size: 80%;
-	background-color: #ffffff;
-	color: #1A59A7;
-	margin: 0px;
-	padding: 5px 0px 5px 10px;
-	border-bottom: 1px solid #00336F;
-	line-height: 100%;
-}
-
-DIV.submenu-item DIV.menu-item {
-	background: url(default-images/submenu-bullet.gif);
-	background-repeat: no-repeat;
-	background-position: left;
-	background-color: #ffffff;
-	margin: 0px;
-	line-height: 100%;
-	border: 0;
-	padding: 4px 5px 0px 10px;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #1A59A7;
-	font-size: 85%;
-}
-
-DIV.menu-item {
-	background-color: #ffffff;
-	margin: 0px;
-	line-height: 110%;
-	border-bottom: 1px solid #00336F;
-	padding: 5px 5px 5px 10px;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #1A59A7;
-	font-size: 80%;
-}
-
-DIV.menu-item DIV.disabled {
-	color: #a0a0a0;
-}
-
-DIV.menu-item a:link {
-	color: #1A59A7;
-}
-
-DIV.menu-item a:visited {
-	color: #1A59A7;
-}
-
-DIV.menu-item a:hover {
-	color: #006666;
-	text-decoration: underline;
-}
-
-DIV.submenu-item DIV.menu-item a:link {
-	color: #1A59A7;
-}
-
-DIV.submenu-item DIV.menu-item a:visited {
-	color: #1A59A7;
-}
-
-DIV.submenu-item DIV.menu-item a:hover {
-	color: #006666;
-	text-decoration: underline;
-}
-
-/* End of Object Menu */
-DIV.page-footer {
-	position: absolute;
-	right: 10px;
-	bottom: 10px;
-	font-size: 50%;
-	color: #333399;
-}
-
-H1 {
-	font-size: 140%;
-	margin-top: -8px;
-}
-
-H2 {
-	font-size: 90%;
-	color: #333399;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 0;
-}
-
-H3 {
-	font-size: 80%;
-	color: #ffffff;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 15px 10px 5px 10px;
-}
-
-H4 {
-	font-size: 80%;
-	color: #333399;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 10px 10px 0px 10px;
-}
-
-DIV.text {
-	font-size: 100%;
-	color: #336699;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 10px 10px 0px 10px;
-}
-
-DIV.error {
-	font-size: 120%;
-	color: #cc0000;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 10px 10px 0px 10px;
-}
-
-PRE.error-trace {
-	font-size: 80%;
-	color: #cc0000;
-	margin: 10px 10px 0px 10px;
-}
-
-DIV#debug { /*	float: left;*/
-	background-color: #F0F0F0;
-	margin: 30px;
-	padding: 1px 10px 0 7px;
-	min-height: 22px;
-	border: 1px;
-}
-
-DIV#debug H4 {
-	display: inline;
-	font-size: 80%;
-	color: #999;
-	margin: 0 5px 0 10px;
-}
-
-DIV#debug DIV.detail {
-	display: inline;
-	font-size: 80%;
-	color: #999;
-	margin: 0 5px 0 10px;
-}
-
-DIV#page-footer {
-	display: none;
-}
-
-SPAN.message {
-	position: relative;
-	top: 30px;
-	font-size: 100%;
-	color: #336699;
-	margin: 40px 0 0 0;
-	padding: 10px;
-}
-/* Think this is now redundant
-DIV.items {
-	position: relative;
-} 
-*/
-
-
-SPAN.about {
-	display: block;
-	padding: 4px;
-}
-
-
-SPAN.user {
-	display: block;
-	padding: 4px;
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/tck/src/main/webapp/images/banner-bg.png
----------------------------------------------------------------------
diff --git a/component/viewer/html/tck/src/main/webapp/images/banner-bg.png b/component/viewer/html/tck/src/main/webapp/images/banner-bg.png
deleted file mode 100644
index c731c15..0000000
Binary files a/component/viewer/html/tck/src/main/webapp/images/banner-bg.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/tck/src/main/webapp/images/banner.png
----------------------------------------------------------------------
diff --git a/component/viewer/html/tck/src/main/webapp/images/banner.png b/component/viewer/html/tck/src/main/webapp/images/banner.png
deleted file mode 100644
index adf2159..0000000
Binary files a/component/viewer/html/tck/src/main/webapp/images/banner.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/dom/log4j.properties
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/dom/log4j.properties b/example/application/quickstart_html_sql/dom/log4j.properties
deleted file mode 100644
index 281bfb6..0000000
--- a/example/application/quickstart_html_sql/dom/log4j.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-# LOG4J Configuration
-# ===================
-
-# Basic logging goes to "datanucleus.log"
-log4j.appender.A1=org.apache.log4j.FileAppender
-log4j.appender.A1.File=datanucleus.log
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n
-#log4j.appender.A1.Threshold=INFO
-
-# Categories
-# Each category can be set to a "level", and to direct to an appender
-
-# Default to DEBUG level for all DataNucleus categories
-log4j.logger.DataNucleus = DEBUG, A1
-
-log4j.category.com.mchange.v2.c3p0=INFO, A1
-log4j.category.com.mchange.v2.resourcepool=INFO, A1
-log4j.category.org.logicalcobwebs.proxool=INFO,A1
-
-
-# Hbase libs logging
-log4j.category.org.apache.hadoop=INFO,A1
-log4j.category.org.apache.zookeeper=INFO,A1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/dom/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/dom/pom.xml b/example/application/quickstart_html_sql/dom/pom.xml
deleted file mode 100644
index 409e8db..0000000
--- a/example/application/quickstart_html_sql/dom/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-    	<groupId>org.apache.isis.example.application</groupId>
-    	<artifactId>quickstart_html_sql</artifactId>
-		<version>1.0.0-SNAPSHOT</version>
-	</parent>
-
-	<artifactId>quickstart_html_sql-dom</artifactId>
-	<name>Quickstart (HTML/SQL) DOM</name>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.isis.core</groupId>
-			<artifactId>isis-core-applib</artifactId>
-		</dependency>
-	</dependencies>
-    
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItem.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItem.java b/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItem.java
deleted file mode 100644
index e8af026..0000000
--- a/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItem.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- *  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 dom.todo;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.isis.applib.DomainObjectContainer;
-import org.apache.isis.applib.annotation.Disabled;
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.applib.annotation.MemberGroups;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.MultiLine;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Resolve;
-import org.apache.isis.applib.annotation.Resolve.Type;
-import org.apache.isis.applib.annotation.Title;
-import org.apache.isis.applib.annotation.Where;
-import org.joda.time.LocalDate;
-
-@ObjectType("TODO")
-@MemberGroups({"General", "Detail"})
-public class ToDoItem {
-
-    public static enum Category {
-        Professional, Domestic, Other;
-    }
-
-    // {{ Description
-    private String description;
-
-    @Title
-    @MemberOrder(sequence = "1")
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(final String description) {
-        this.description = description;
-    }
-    // }}
-
-    // {{ Category
-    private Category category;
-
-    @MemberOrder(sequence = "2")
-    public Category getCategory() {
-        return category;
-    }
-
-    public void setCategory(final Category category) {
-        this.category = category;
-    }
-    // }}
-
-    // {{ DueBy (property)
-    private LocalDate dueBy;
-
-    @MemberOrder(name="Detail", sequence = "3")
-    @Optional
-    public LocalDate getDueBy() {
-        return dueBy;
-    }
-
-    public void setDueBy(final LocalDate dueBy) {
-        this.dueBy = dueBy;
-    }
-    // }}
-
-    // {{ Done
-    private boolean done;
-
-    @Disabled
-    @MemberOrder(sequence = "4")
-    public boolean getDone() {
-        return done;
-    }
-
-    public void setDone(final boolean done) {
-        this.done = done;
-    }
-    // }}
-
-    // {{ Notes (property)
-    private String notes;
-
-    @Hidden(where=Where.ALL_TABLES)
-    @Optional
-    @MultiLine(numberOfLines=5)
-    @MemberOrder(name="Detail", sequence = "6")
-    public String getNotes() {
-        return notes;
-    }
-
-    public void setNotes(final String notes) {
-        this.notes = notes;
-    }
-    // }}
-
-    // {{ OwnedBy (property, hidden)
-    private String ownedBy;
-
-    @Hidden
-    public String getOwnedBy() {
-        return ownedBy;
-    }
-
-    public void setOwnedBy(final String ownedBy) {
-        this.ownedBy = ownedBy;
-    }
-    // }}
-
-    // {{ markAsDone (action)
-    @MemberOrder(sequence = "1")
-    public ToDoItem markAsDone() {
-        setDone(true);
-        return this;
-    }
-
-    public String disableMarkAsDone() {
-        return done ? "Already done" : null;
-    }
-    // }}
-
-    // {{ markAsNotDone (action)
-    @MemberOrder(sequence = "2")
-    public ToDoItem markAsNotDone() {
-        setDone(false);
-        return this;
-    }
-
-    public String disableMarkAsNotDone() {
-        return !done ? "Not yet done" : null;
-    }
-    // }}
-
-    // {{ dependencies (Collection)
-    private List<ToDoItem> dependencies = new ArrayList<ToDoItem>();
-
-    @Disabled
-    @MemberOrder(sequence = "1")
-    @Resolve(Type.EAGERLY)
-    public List<ToDoItem> getDependencies() {
-        return dependencies;
-    }
-
-    public void setDependencies(final List<ToDoItem> dependencies) {
-        this.dependencies = dependencies;
-    }
-    // }}
-
-    // {{ add (action)
-    @MemberOrder(name="dependencies", sequence = "3")
-    public ToDoItem add(final ToDoItem toDoItem) {
-        getDependencies().add(toDoItem);
-        return this;
-    }
-    public String validateAdd(final ToDoItem toDoItem) {
-        if(getDependencies().contains(toDoItem)) {
-            return "Already a dependency";
-        }
-        if(toDoItem == this) {
-            return "Can't set up a dependency to self";
-        }
-        return null;
-    }
-    // }}
-
-    // {{ remove (action)
-    @MemberOrder(name="dependencies", sequence = "4")
-    public ToDoItem remove(final ToDoItem toDoItem) {
-        getDependencies().remove(toDoItem);
-        return this;
-    }
-    public String disableRemove(final ToDoItem toDoItem) {
-        return getDependencies().isEmpty()? "No dependencies to remove": null;
-    }
-    public String validateRemove(final ToDoItem toDoItem) {
-        if(!getDependencies().contains(toDoItem)) {
-            return "Not a dependency";
-        }
-        return null;
-    }
-    public List<ToDoItem> choices0Remove() {
-        return getDependencies();
-    }
-    // }}
-
-    // {{ injected: DomainObjectContainer
-    @SuppressWarnings("unused")
-    private DomainObjectContainer container;
-
-    public void setDomainObjectContainer(final DomainObjectContainer container) {
-        this.container = container;
-    }
-    // }}
-
-    // {{ injected: ToDoItems
-    @SuppressWarnings("unused")
-    private ToDoItems toDoItems;
-
-    public void setToDoItems(final ToDoItems toDoItems) {
-        this.toDoItems = toDoItems;
-    }
-    // }}
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItems.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItems.java b/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItems.java
deleted file mode 100644
index 6d4c12d..0000000
--- a/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItems.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- *  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 dom.todo;
-
-import java.util.List;
-
-import com.google.common.base.Objects;
-
-import dom.todo.ToDoItem.Category;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.ActionSemantics;
-import org.apache.isis.applib.annotation.ActionSemantics.Of;
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.NotInServiceMenu;
-import org.apache.isis.applib.filter.Filter;
-
-@Named("ToDos")
-public class ToDoItems extends AbstractFactoryAndRepository {
-
-    // {{ Id, iconName
-    @Override
-    public String getId() {
-        return "toDoItems";
-    }
-
-    public String iconName() {
-        return "ToDoItem";
-    }
-    // }}
-
-    // {{ notYetDone (action)
-    @ActionSemantics(Of.SAFE)
-    @MemberOrder(sequence = "1")
-    public List<ToDoItem> notYetDone() {
-        return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
-            @Override
-            public boolean accept(final ToDoItem t) {
-                return ownedByCurrentUser(t) && !t.getDone();
-            }
-        });
-    }
-    // }}
-
-    // {{ done (action)
-    @ActionSemantics(Of.SAFE)
-    @MemberOrder(sequence = "2")
-    public List<ToDoItem> done() {
-        return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
-            @Override
-            public boolean accept(final ToDoItem t) {
-                return ownedByCurrentUser(t) && t.getDone();
-            }
-        });
-    }
-    // }}
-
-    // {{ newToDo  (action)
-    @MemberOrder(sequence = "2")
-    public ToDoItem newToDo(
-            @Named("Description") String description, 
-            @Named("Category") Category category) {
-        final String ownedBy = getContainer().getUser().getName();
-        return newToDo(description, category, ownedBy);
-    }
-    // }}
-
-    // {{ newToDo  (hidden)
-    @Hidden // for use by fixtures
-    public ToDoItem newToDo(
-            String description, 
-            Category category, 
-            String ownedBy) {
-        final ToDoItem toDoItem = newTransientInstance(ToDoItem.class);
-        toDoItem.setDescription(description);
-        toDoItem.setCategory(category);
-        toDoItem.setOwnedBy(ownedBy);
-        persist(toDoItem);
-        return toDoItem;
-    }
-    // }}
-
-    // {{ similarTo (action)
-    @NotInServiceMenu
-    @ActionSemantics(Of.SAFE)
-    @MemberOrder(sequence = "3")
-    public List<ToDoItem> similarTo(final ToDoItem toDoItem) {
-        return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
-            @Override
-            public boolean accept(ToDoItem t) {
-                return t != toDoItem && Objects.equal(toDoItem.getCategory(), t.getCategory()) && Objects.equal(toDoItem.getOwnedBy(), t.getOwnedBy());
-            }
-        });
-    }
-    // }}
-    
-    // {{ autoComplete (hidden)
-    @Hidden
-    @MemberOrder(sequence = "1")
-    public List<ToDoItem> autoComplete(final String description) {
-        return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
-            @Override
-            public boolean accept(final ToDoItem t) {
-                return ownedByCurrentUser(t) && t.getDescription().contains(description);
-            }
-
-        });
-    }
-    // }}
-
-    // {{ helpers
-    protected boolean ownedByCurrentUser(final ToDoItem t) {
-        return Objects.equal(t.getOwnedBy(), currentUserName());
-    }
-    protected String currentUserName() {
-        return getContainer().getUser().getName();
-    }
-    // }}
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/dom/src/main/resources/images/AuditEntry.png
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/dom/src/main/resources/images/AuditEntry.png b/example/application/quickstart_html_sql/dom/src/main/resources/images/AuditEntry.png
deleted file mode 100644
index 950d792..0000000
Binary files a/example/application/quickstart_html_sql/dom/src/main/resources/images/AuditEntry.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/dom/src/main/resources/images/ToDoItem.gif
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/dom/src/main/resources/images/ToDoItem.gif b/example/application/quickstart_html_sql/dom/src/main/resources/images/ToDoItem.gif
deleted file mode 100644
index cc536e1..0000000
Binary files a/example/application/quickstart_html_sql/dom/src/main/resources/images/ToDoItem.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/fixture/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/fixture/pom.xml b/example/application/quickstart_html_sql/fixture/pom.xml
deleted file mode 100644
index 26d3c53..0000000
--- a/example/application/quickstart_html_sql/fixture/pom.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-    <parent>
-    	<groupId>org.apache.isis.example.application</groupId>
-        <artifactId>quickstart_html_sql</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
-    </parent>
-
-	<artifactId>quickstart_html_sql-fixture</artifactId>
-    
-	<name>Quickstart (HTML/SQL) Fixtures</name>
-
-	<dependencies>
-		<dependency>
-			<groupId>${project.groupId}</groupId>
-			<artifactId>quickstart_html_sql-dom</artifactId>
-		</dependency>
-	</dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/fixture/src/main/java/fixture/LogonAsSvenFixture.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/fixture/src/main/java/fixture/LogonAsSvenFixture.java b/example/application/quickstart_html_sql/fixture/src/main/java/fixture/LogonAsSvenFixture.java
deleted file mode 100644
index 5bdc6fe..0000000
--- a/example/application/quickstart_html_sql/fixture/src/main/java/fixture/LogonAsSvenFixture.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *  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 fixture;
-
-import org.apache.isis.applib.fixtures.LogonFixture;
-
-public class LogonAsSvenFixture extends LogonFixture {
-
-    public LogonAsSvenFixture() {
-        super("sven");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java b/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
deleted file mode 100644
index b0c7b61..0000000
--- a/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *  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 fixture.todo;
-
-import dom.todo.ToDoItem;
-import dom.todo.ToDoItem.Category;
-import dom.todo.ToDoItems;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-
-public class ToDoItemsFixture extends AbstractFixture {
-
-    @Override
-    public void install() {
-        createFiveFor("sven");
-        createThreeFor("dick");
-        createTwoFor("bob");
-        createOneFor("joe");
-
-        // for exploration user
-        createFiveFor("exploration");
-    }
-
-    private void createFiveFor(String ownedBy) {
-        createToDoItem("Buy milk", Category.Domestic, ownedBy);
-        createToDoItem("Pick up laundry", Category.Domestic, ownedBy);
-        createToDoItem("Buy stamps", Category.Domestic, ownedBy);
-        createToDoItem("Write blog post", Category.Professional, ownedBy);
-        createToDoItem("Organize brown bag", Category.Professional, ownedBy);
-    }
-
-    private void createThreeFor(String ownedBy) {
-        createToDoItem("Book car in for service", Category.Domestic, ownedBy);
-        createToDoItem("Buy birthday present for sven", Category.Domestic, ownedBy);
-        createToDoItem("Write presentation for conference", Category.Professional, ownedBy);
-    }
-
-    private void createTwoFor(String ownedBy) {
-        createToDoItem("Write thank you notes", Category.Domestic, ownedBy);
-        createToDoItem("Look into solar panels", Category.Domestic, ownedBy);
-    }
-
-    private void createOneFor(String ownedBy) {
-        createToDoItem("Pitch book idea to publisher", Category.Professional, ownedBy);
-    }
-
-    private ToDoItem createToDoItem(final String description, Category category, String ownedBy) {
-        return toDoItems.newToDo(description, category, ownedBy);
-    }
-
-    private ToDoItems toDoItems;
-
-    public void setToDoItems(final ToDoItems toDoItems) {
-        this.toDoItems = toDoItems;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java b/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java
deleted file mode 100644
index ddb1203..0000000
--- a/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  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 fixture.todo;
-
-import dom.todo.ToDoItems;
-
-import org.apache.isis.applib.AbstractService;
-import org.apache.isis.applib.annotation.Named;
-
-/**
- * Enables fixtures to be installed from the application.
- */
-@Named("Fixtures")
-public class ToDoItemsFixturesService extends AbstractService {
-
-    public void install() {
-        final ToDoItemsFixture fixture = new ToDoItemsFixture();
-        fixture.setContainer(getContainer());
-        fixture.setToDoItems(toDoItems);
-        fixture.install();
-    }
-
-    private ToDoItems toDoItems;
-
-    public void setToDoItems(final ToDoItems toDoItems) {
-        this.toDoItems = toDoItems;
-    }
-
-}


[17/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java
deleted file mode 100644
index 2a12061..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- *  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.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.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;
-
-class CollectionLink extends ComponentAbstract {
-    private final String objectId;
-    private final String fieldId;
-    private final ObjectSpecification specification;
-    private final String title;
-    private final String description;
-
-    public CollectionLink(final PathBuilder pathBuilder, final ObjectAssociation field, final ObjectAdapter collection, final String description, final String objectId) {
-        super(pathBuilder);
-        this.description = description;
-        this.objectId = objectId;
-        fieldId = field.getId();
-        title = collection.titleString();
-        specification = field.getSpecification();
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.print("<span class=\"value\"");
-        if (description != null) {
-            writer.print(" title=\"");
-            writer.print(description);
-            writer.print("\"");
-        }
-        writer.print(">");
-
-        writer.print("<a href=\"");
-        writer.print(pathTo(Request.FIELD_COLLECTION_COMMAND) + "?id=");
-        writer.print(objectId);
-        writer.print("&amp;field=");
-        writer.print(fieldId);
-        writer.print("\"");
-        writer.print("><img src=\"");
-        writer.print(ImageLookup.image(specification));
-        writer.print("\" alt=\"icon\">");
-        // writer.print(elementType);
-        writer.print(title);
-        writer.print("</a>");
-        writer.println("</span>");
-    }
-
-    protected String pathTo(final String prefix) {
-        return pathBuilder.pathTo(prefix);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Div.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Div.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Div.java
deleted file mode 100644
index 4223071..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Div.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- *  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.ComponentComposite;
-
-public class Div extends ComponentComposite implements Block {
-
-    private final String className;
-    private final String id;
-    private final String description;
-
-    public Div(final PathBuilder pathBuilder, final String className, final String description) {
-        this(pathBuilder, className, description, null);
-    }
-
-    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;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        super.write(writer);
-    }
-
-    @Override
-    protected void writeBefore(final PrintWriter writer) {
-        writer.print("<div");
-        if (className != null) {
-            writer.print(" class=\"");
-            writer.print(className);
-            writer.print("\"");
-        }
-        if (id != null) {
-            writer.print(" id=\"");
-            writer.print(id);
-            writer.print("\"");
-        }
-        if (description != null) {
-            writer.print(" title=\"");
-            writer.print(description);
-            writer.print("\"");
-        }
-        writer.print(">");
-    }
-
-    @Override
-    protected void writeAfter(final PrintWriter writer) {
-        writer.println("</div>");
-    }
-
-    @Override
-    public void add(final Component component) {
-        super.add(component);
-    }
-
-    public void add(final String text) {
-        super.add(new Html(pathBuilder, text));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java
deleted file mode 100644
index 0a81342..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *  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.Page;
-import org.apache.isis.viewer.html.component.ViewPane;
-
-public class DynamicHtmlPage extends AbstractHtmlPage implements Page {
-
-    private final Block navigation;
-    private final ViewPane viewPane;
-
-    private Component crumbs;
-    private DebugPane debugPane;
-
-    public DynamicHtmlPage(final 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
-    public Block getNavigation() {
-        return navigation;
-    }
-
-    @Override
-    public ViewPane getViewPane() {
-        return viewPane;
-    }
-
-    @Override
-    public void setCrumbs(final Component crumbs) {
-        this.crumbs = crumbs;
-    }
-
-    @Override
-    public void setDebug(final DebugPane debugPane) {
-        this.debugPane = debugPane;
-    }
-
-    @Override
-    protected void writeContent(final PrintWriter writer) {
-        if (debugPane != null) {
-            debugPane.write(writer);
-        } else {
-            writer.println();
-            writer.println("<div id=\"body\">");
-            navigation.write(writer);
-            if (crumbs != null) {
-                crumbs.write(writer);
-            }
-            viewPane.write(writer);
-            writer.println();
-            writer.println("</div>");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ErrorMessage.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ErrorMessage.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ErrorMessage.java
deleted file mode 100644
index 2482b80..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ErrorMessage.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *  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.component.Component;
-
-public class ErrorMessage implements Component {
-
-    private final Exception e;
-    private final boolean isDebug;
-
-    public ErrorMessage(final Exception e, final boolean isDebug) {
-        this.e = e;
-        this.isDebug = isDebug;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.println("<div class=\"error\">");
-        writer.println(e.getMessage());
-        writer.println("</div>");
-        if (isDebug) {
-            writer.println("<pre class=\"error-trace\">");
-            e.printStackTrace(writer);
-            writer.println("</pre>");
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java
deleted file mode 100644
index 9e9408c..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  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.ComponentAbstract;
-
-public class Heading extends ComponentAbstract {
-    private final String title;
-    private final int level;
-
-    public Heading(final PathBuilder pathBuilder, final String title) {
-        this(pathBuilder, title, 1);
-    }
-
-    public Heading(final PathBuilder pathBuilder, final String title, final int level) {
-        super(pathBuilder);
-        this.title = title;
-        this.level = level;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writeTag(writer, "h" + level);
-        writer.print(title);
-        writer.print("</h");
-        writer.print(level);
-        writer.println(">");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Html.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Html.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Html.java
deleted file mode 100644
index 6a02fd4..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Html.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  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.ComponentAbstract;
-
-class Html extends ComponentAbstract {
-
-    private final String code;
-
-    public Html(final PathBuilder pathBuilder, final String code) {
-        super(pathBuilder);
-        this.code = code;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.print(code);
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java
deleted file mode 100644
index 1b1ec70..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- *  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 static org.apache.isis.viewer.html.HtmlViewerConstants.FOOTER;
-import static org.apache.isis.viewer.html.HtmlViewerConstants.FOOTER_FILE;
-import static org.apache.isis.viewer.html.HtmlViewerConstants.HEADER;
-import static org.apache.isis.viewer.html.HtmlViewerConstants.HEADER_FILE;
-import static org.apache.isis.viewer.html.HtmlViewerConstants.STYLE_SHEET;
-
-import java.io.BufferedReader;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facets.multiline.MultiLineFacet;
-import org.apache.isis.core.metamodel.spec.ActionType;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-import org.apache.isis.core.progmodel.facets.value.booleans.BooleanValueFacet;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-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;
-import org.apache.isis.viewer.html.component.DebugPane;
-import org.apache.isis.viewer.html.component.Form;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.component.Table;
-
-public class HtmlComponentFactory implements ComponentFactory {
-
-    private static final long serialVersionUID = 1L;
-    
-    protected final String footer;
-    protected final String header;
-    protected final String styleSheet;
-    
-    private final PathBuilder pathBuilder;
-
-    public HtmlComponentFactory(final PathBuilder pathBuilder) {
-        this(pathBuilder, getConfiguration());
-    }
-
-    public HtmlComponentFactory(final PathBuilder pathBuilder, final IsisConfiguration configuration) {
-        this.pathBuilder = pathBuilder;
-        this.styleSheet = configuration.getString(STYLE_SHEET);
-        this.header = loadFileElseDefault(configuration, HEADER_FILE, HEADER);
-        this.footer = loadFileElseDefault(configuration, FOOTER_FILE, FOOTER);
-    }
-
-    
-    // /////////////////////////////////////////////////////////////
-    // Pages
-    // /////////////////////////////////////////////////////////////
-
-    @Override
-    public Page createPage() {
-        return new DynamicHtmlPage(this, styleSheet, header, footer);
-    }
-
-    public LogonFormPage createLogonPage(final String user, final String password, final boolean registerLink, final String error) {
-        return new LogonFormPage(this, styleSheet, header, footer, user, password, registerLink, error);
-    }
-
-    public RegisterFormPage createRegisterPage(final String user, final String password, final String error) {
-        return new RegisterFormPage(this, styleSheet, header, footer, user, password, error);
-    }
-
-    // /////////////////////////////////////////////////////////////
-    // Menus
-    // /////////////////////////////////////////////////////////////
-
-    @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(this, actionId, name, description, reasonDisabled, type, hasParameters, targetObjectId);
-    }
-
-    @Override
-    public Component createSubmenu(final String menuName, final Component[] items) {
-        return new Submenu(menuName, items);
-    }
-
-
-    // /////////////////////////////////////////////////////////////
-    // Icons
-    // /////////////////////////////////////////////////////////////
-
-    @Override
-    public Component createCollectionIcon(final ObjectAssociation field, final ObjectAdapter collection, final String id) {
-        return new CollectionLink(this, field, collection, field.getDescription(), id);
-    }
-
-    @Override
-    public Component createCollectionIcon(final ObjectAdapter collection, final String 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(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(this, object, field.getDescription(), objectId, style);
-    }
-
-
-    // /////////////////////////////////////////////////////////////
-    // Options
-    // /////////////////////////////////////////////////////////////
-
-    @Override
-    public Component createEditOption(final String id) {
-        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(this, "remove", "Remove", "Remove item from collection", id, elementId, fieldName);
-    }
-
-    @Override
-    public Component createAddOption(final String id, final String fieldName) {
-        return new ActionComponent(this, "add", "Add Item", "Add item to collection", id, null, fieldName);
-    }
-
-
-    // /////////////////////////////////////////////////////////////
-    // Messages
-    // /////////////////////////////////////////////////////////////
-
-    @Override
-    public Component createErrorMessage(final Exception e, final boolean isDebug) {
-        return new ErrorMessage(e, isDebug);
-    }
-
-
-    // /////////////////////////////////////////////////////////////
-    // Form & Form Widgets
-    // /////////////////////////////////////////////////////////////
-
-    @Override
-    public Form createForm(final String id, final String actionName, final int step, final int noOfPages, final boolean isEditing) {
-        return new HtmlForm(this, id, actionName, step, noOfPages, isEditing);
-    }
-
-    @Override
-    public Component createCheckboxBlock(final boolean isEditable, final boolean isSet) {
-        return new Checkbox(isSet, isEditable);
-    }
-
-    @Override
-    public Component createLink(final String link, final String name, final String description) {
-        return new Link(this, link, name, description);
-    }
-
-
-    @Override
-    public Component createParseableField(final ObjectAssociation field, final ObjectAdapter value, final boolean isEditable) {
-        final BooleanValueFacet facet = field.getSpecification().getFacet(BooleanValueFacet.class);
-        if (facet != null) {
-            return createCheckboxBlock(isEditable, facet.isSet(value));
-        } else {
-            final String titleString = value != null ? value.titleString() : "";
-
-            final MultiLineFacet multiLineFacet = field.getSpecification().getFacet(MultiLineFacet.class);
-            final boolean isWrapped = multiLineFacet != null && !multiLineFacet.preventWrapping();
-
-            if (isWrapped) {
-                return createInlineBlock("value", "<pre>" + titleString + "</pre>", null);
-            } else {
-                return createInlineBlock("value", titleString, null);
-            }
-        }
-    }
-
-    @Override
-    public Table createTable(final int noColumns, final boolean withSelectorColumn) {
-        return new HtmlTable(this, noColumns, withSelectorColumn);
-    }
-
-
-    // /////////////////////////////////////////////////////////////
-    // Furniture
-    // /////////////////////////////////////////////////////////////
-
-    @Override
-    public Block createBlock(final String style, final String description) {
-        return new Div(this, style, description);
-    }
-
-    @Override
-    public Component createBreadCrumbs(final String[] names, final boolean[] isLinked) {
-        return new BreadCrumbs(this, names, isLinked);
-    }
-
-    @Override
-    public Component createInlineBlock(final String style, final String text, final String description) {
-        return new Span(style, text, description);
-    }
-
-    @Override
-    public Component createHeading(final String name) {
-        return new Heading(this, name, 4);
-    }
-
-    @Override
-    public Component createService(final String objectId, final String title, final String iconName) {
-        return new ServiceComponent(this, objectId, title, iconName);
-    }
-
-    @Override
-    public Component createUserSwap(final String name) {
-        return new UserSwapLink(this, name);
-
-    }
-
-    // /////////////////////////////////////////////////////////////
-    // Debug
-    // /////////////////////////////////////////////////////////////
-
-    @Override
-    public DebugPane createDebugPane() {
-        return new HtmlDebug();
-    }
-
-
-    // /////////////////////////////////////////////////////////////
-    // PathBuilder impl
-    // /////////////////////////////////////////////////////////////
-
-    @Override
-    public String getSuffix() {
-        return pathBuilder.getSuffix();
-    }
-
-    @Override
-    public String pathTo(final String prefix) {
-        return pathBuilder.pathTo(prefix);
-    }
-
-    
-    // /////////////////////////////////////////////////////////////
-    // helpers
-    // /////////////////////////////////////////////////////////////
-
-    private static String loadFileElseDefault(final IsisConfiguration configuration, final String fileConstant, final String literalConstant) {
-        final String fileName = configuration.getString(fileConstant);
-        return fileName != null ? loadFile(fileName) : configuration.getString(literalConstant);
-    }
-
-
-    private static String loadFile(final String file) {
-        final StringBuffer content = new StringBuffer();
-        BufferedReader reader = null;
-        try {
-            reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
-            String line;
-            while ((line = reader.readLine()) != null) {
-                content.append(line);
-                content.append("\n");
-            }
-        } catch (final FileNotFoundException e) {
-            throw new WebViewerException("Failed to find file " + file);
-        } catch (final IOException e) {
-            throw new WebViewerException("Failed to load file " + file, e);
-        } finally {
-            if (reader != null) {
-                try {
-                    reader.close();
-                } catch (final IOException ignore) {
-                }
-            }
-        }
-        return content.toString();
-    }
-
-    
-
-    // /////////////////////////////////////////////////////////////
-    // injected services
-    // /////////////////////////////////////////////////////////////
-
-    private static IsisConfiguration getConfiguration() {
-        return IsisContext.getConfiguration();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlDebug.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlDebug.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlDebug.java
deleted file mode 100644
index 815b7ff..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlDebug.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *  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.core.commons.exceptions.IsisException;
-import org.apache.isis.viewer.html.component.DebugPane;
-
-public class HtmlDebug implements DebugPane {
-    private static final String SPACES = "                                    ";
-    private final StringBuffer debug = new StringBuffer();
-    private int indent;
-
-    @Override
-    public void addSection(final String title) {
-        if (debug.length() > 0) {
-            appendln("</pre>");
-        }
-        appendln("<h2>");
-        appendln(title);
-        appendln("</h2><pre>");
-    }
-
-    @Override
-    public void appendln(final String text) {
-        debug.append(SPACES.substring(0, indent * 3));
-        debug.append(text);
-        debug.append("\n");
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        if (debug.length() > 0) {
-            writer.print(debug.toString());
-            writer.println("</pre>");
-        }
-    }
-
-    @Override
-    public void indent() {
-        indent++;
-    }
-
-    @Override
-    public void unindent() {
-        if (indent == 0) {
-            throw new IsisException();
-        }
-        indent--;
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlException.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlException.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlException.java
deleted file mode 100644
index 5a58b0e..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlException.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  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 org.apache.isis.core.commons.exceptions.IsisException;
-
-public class HtmlException extends IsisException {
-    private static final long serialVersionUID = 1L;
-
-    public HtmlException() {
-    }
-
-    public HtmlException(final String msg) {
-        super(msg);
-    }
-
-    public HtmlException(final String msg, final Throwable cause) {
-        super(msg, cause);
-    }
-
-    public HtmlException(final Throwable cause) {
-        super(cause);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java
deleted file mode 100644
index ce0be9f..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- *  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.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.html.PathBuilder;
-import org.apache.isis.viewer.html.component.ComponentComposite;
-import org.apache.isis.viewer.html.component.Form;
-
-public class HtmlForm extends ComponentComposite implements Form {
-
-    private final boolean confirm;
-    private final boolean hasNext;
-    private final boolean hasPrevious;
-    private final boolean isEditing;
-    private final String id;
-
-    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(final PathBuilder pathBuilder, final String id, final String action, final int page, final int noOfPages, final boolean confirm, final boolean isEditing) {
-        super(pathBuilder);
-        this.id = id;
-        this.confirm = confirm;
-        this.isEditing = isEditing;
-        hasPrevious = page >= 1;
-        hasNext = page < noOfPages - 1;
-    }
-
-    private void addField(final String label, final String field, final String description, final boolean readOnly, final boolean required, final String errorMessage) {
-        String error = "";
-        if (errorMessage != null) {
-            error = "<span class=\"error\"> " + errorMessage + "</span>";
-        }
-        String optional = "";
-        if (!readOnly) {
-            if (!required) {
-                optional = "<span class=\"optional\"> (optional)</span>";
-            } else {
-                optional = "<span class=\"required\"> *</span>";
-            }
-        }
-        add(new Html(pathBuilder, "<div class=\"field\" title=\"" + description + "\"><span class=\"label\">" + label + "</span><span class=\"separator\">: </span> " + field + optional + error + "</div>"));
-    }
-
-    @Override
-    public void addField(final ObjectSpecification spec, final String label, final String title, final String field, final String value, final int noLines, final boolean wrap, final int maxLength, final int typicalLength, final boolean required, final String error) {
-        String inputField;
-        /*
-         * REVIEW the following qualification are a bit limited - it's the
-         * simplest thing than will work - we need to determine from the
-         * specification whether something is boolean type or a password.
-         * 
-         * Also see the note in the Form I/F.
-         */
-        boolean ignoreMandatory = false;
-        if (spec.isOfType(IsisContext.getSpecificationLoader().loadSpecification(boolean.class)) || spec.isOfType(IsisContext.getSpecificationLoader().loadSpecification(Boolean.class))) {
-            final String selected = (value != null && value.toLowerCase().equals("true")) ? "checked " : "";
-            inputField = "<input class=\"value\" type=\"checkbox\" name=\"" + field + "\"" + selected + " value=\"true\"/>";
-            ignoreMandatory = true;
-        } else if (spec.getFullIdentifier().endsWith(".Password")) {
-            final String typicalLengthStr = typicalLength == 0 ? "" : (" size=\"" + typicalLength + "\"");
-            final String maxLengthStr = maxLength == 0 ? "" : (" maxlength=\"" + maxLength + "\"");
-            inputField = "<input class=\"value\" type=\"password\" name=\"" + field + "\"" + typicalLengthStr + maxLengthStr + "value=\"" + value + "\"/>";
-
-        } else if (noLines > 1) {
-            final int w = typicalLength > 0 ? typicalLength / noLines : 50;
-            inputField = "<textarea class=\"value\" type=\"text\" name=\"" + field + "\" rows=\"" + noLines + "\" cols=\"" + w + "\" wrap=\"" + (wrap ? "hard" : "off") + "\">" + value + "</textarea>";
-        } else {
-            final String typicalLengthStr = typicalLength == 0 ? "" : (" size=\"" + typicalLength + "\"");
-            final String maxLengthStr = maxLength == 0 ? "" : (" maxlength=\"" + maxLength + "\"");
-            inputField = "<input class=\"value\" type=\"text\" name=\"" + field + "\"" + typicalLengthStr + maxLengthStr + "value=\"" + value + "\"/>";
-        }
-        addField(label, inputField, title, ignoreMandatory, required, error);
-    }
-
-    public void addFieldName(final String fieldLabel) {
-        add(new Heading(pathBuilder, fieldLabel, 4));
-    }
-
-    @Override
-    public void addLookup(final String fieldLabel, final String description, final String fieldId, final int selectedIndex, final String[] instances, final String[] ids, final boolean required, final String errorMessage) {
-        final StringBuffer testInputField = new StringBuffer();
-        testInputField.append("<select class=\"value\" name=\"" + fieldId + "\">");
-        if (!required) {
-            testInputField.append("<option");
-            if (selectedIndex < 0) {
-                testInputField.append(" selected");
-            }
-            testInputField.append(" value=\"");
-            testInputField.append("null");
-            testInputField.append("\" >[not set]</option>");
-        }
-        for (int i = 0; i < instances.length; i++) {
-            testInputField.append("<option");
-            if (i == selectedIndex) {
-                testInputField.append(" selected");
-            }
-            testInputField.append(" value=\"");
-            testInputField.append(ids[i]);
-            testInputField.append("\" >");
-            testInputField.append(instances[i]);
-            testInputField.append("</option>");
-        }
-        testInputField.append("</select>");
-
-        addField(fieldLabel, testInputField.toString(), description, false, required, errorMessage);
-    }
-
-    @Override
-    public void addReadOnlyField(final String fieldLabel, final String title, final String description) {
-        addField(fieldLabel, "<span class=\"value\">" + title + "</span>", description, true, false, null);
-    }
-
-    @Override
-    public void addReadOnlyCheckbox(final String fieldLabel, final boolean isSet, final String description) {
-        addField(fieldLabel, "<input class=\"value\" type=\"checkbox\" disabled " + (isSet ? "checked" : "") + "/>", description, true, false, null);
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        super.write(writer);
-    }
-
-    @Override
-    protected void writeAfter(final PrintWriter writer) {
-        writer.println("<div class=\"field\">");
-        if (hasNext) {
-            writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Next\"/>");
-            if (isEditing) {
-                writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Save\"/>");
-            } else {
-                writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Finish\"/>");
-            }
-        } else {
-            if (isEditing) {
-                writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Save\"/>");
-            } else {
-                writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Ok\"/>");
-            }
-        }
-        if (hasPrevious) {
-            writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Previous\"/>");
-        }
-        writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Cancel\"/>");
-        writer.println("</div>");
-        writer.println("</form>");
-    }
-
-    @Override
-    protected void writeBefore(final PrintWriter writer) {
-        writer.print("<form name=\"form\" action=\"");
-        writer.print(pathTo("task"));
-        writer.print("\" method=\"post\"");
-        if (confirm) {
-            writer.print(" onSubmit=\"return confirm('Are you sure')\"");
-        }
-        writer.println(">");
-        writer.println("<input type=\"hidden\" name=\"id\" value=\"" + id + "\"/>");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java
deleted file mode 100644
index 0a14693..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- *  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.Component;
-import org.apache.isis.viewer.html.component.ComponentComposite;
-import org.apache.isis.viewer.html.component.Table;
-
-public class HtmlTable extends ComponentComposite implements Table {
-    private String summary;
-    private final TableHeader header;
-    private final int noColumns;
-    private Row row;
-    private int cellCount;
-    private final boolean addSelector;
-
-    public HtmlTable(final PathBuilder pathBuilder, final int noColumns, final boolean withSelectorColumn) {
-        super(pathBuilder);
-        this.noColumns = noColumns + (withSelectorColumn ? 1 : 0);
-        addSelector = withSelectorColumn;
-        header = new TableHeader(pathBuilder);
-    }
-
-    public Row newRow() {
-        final Row row = new Row(pathBuilder);
-        add(row);
-        return row;
-    }
-
-    @Override
-    public void setSummary(final String summary) {
-        this.summary = summary;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.print("<table summary=\"" + summary + "\">");
-        writer.print("<tr><th></th>");
-        header.write(writer);
-        writer.println("</tr>");
-        super.write(writer);
-        writer.println("</table>");
-    }
-
-    @Override
-    protected void write(final PrintWriter writer, final Component component) {
-        writer.print("<tr>");
-        component.write(writer);
-        if (addSelector) {
-            writer.print("<td><input type=\"checkbox\" value=\"selected\"/></td>");
-        }
-        writer.println("</tr>");
-    }
-
-    @Override
-    public void addCell(final String value, final boolean truncate) {
-        row.addCell(value, truncate);
-        cellCount++;
-        if (cellCount > noColumns) {
-            throw new HtmlException("Too many cells added: " + cellCount);
-        }
-    }
-
-    @Override
-    public void addEmptyCell() {
-        addCell(new Span("empty-cell", "", null));
-    }
-
-    @Override
-    public void addCell(final Component component) {
-        row.add(component);
-        cellCount++;
-        if (cellCount > noColumns) {
-            throw new HtmlException("Too many cells added: " + cellCount);
-        }
-    }
-
-    @Override
-    public void addColumnHeader(final String name) {
-        header.addHeader(name);
-        cellCount++;
-        if (cellCount > noColumns) {
-            throw new HtmlException("Too many cells added: " + cellCount);
-        }
-    }
-
-    @Override
-    public void addRowHeader(final Component component) {
-        row = new Row(pathBuilder);
-        add(row);
-        cellCount = 0;
-        row.addCell(component);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Link.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Link.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Link.java
deleted file mode 100644
index 79d585f..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Link.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  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.Component;
-
-public class Link implements Component {
-
-    private final PathBuilder pathBuilder;
-    private final String link;
-    private final String name;
-    private final String description;
-
-    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;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.print("<a class=\"link\" title=\"" + description + "\" href=\"" + pathTo(link) + "\">" + name + "</a>");
-    }
-
-    protected String pathTo(final String link) {
-        return pathBuilder.pathTo(link);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java
deleted file mode 100644
index c0993ce..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- *  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 LogonFormPage extends AbstractHtmlPage {
-    private final String user;
-    private final String password;
-    private final boolean registerLink;
-    private final String error;
-
-    public LogonFormPage(final PathBuilder pathBuilder, final String styleSheet, final String header, final String footer, final String user, final String password, final boolean registerLink, final String error) {
-        super(pathBuilder, styleSheet, header, footer);
-        this.user = user;
-        this.password = password;
-        this.registerLink = registerLink;
-        this.error = error;
-    }
-
-    @Override
-    protected void writeContent(final PrintWriter writer) {
-        writer.println("<div id=\"view\">");
-        writer.println("<div class=\"header\">");
-        writer.println("<span class=\"header-text\">Please enter a user name and password.</span>");
-        writer.println("</div>");
-        writer.println("<FORM ACTION=\"" + pathTo("logon") + "\" METHOD=\"post\">");
-        writer.println("<div id=\"content\">");
-        if (error != null) {
-            writer.println("<div class=\"error\">");
-            writer.println(error);
-            writer.println("</div>");
-        }
-        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=\"action-button\"><INPUT TYPE=\"submit\" VALUE=\"Log in\" NAME=\"Log in\"></div>");
-        if (registerLink) {
-            writer.print("<a class=\"link nav-link\" title=\"Register new user name and password\" href=\"" + pathTo("register") + "\">register</a>");
-        }
-        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) {
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java
deleted file mode 100644
index 753be7f..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- *  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.core.metamodel.spec.ActionType;
-import org.apache.isis.viewer.html.PathBuilder;
-import org.apache.isis.viewer.html.component.Component;
-
-public class MenuItem implements Component {
-    private final String actionId;
-    private final String actionName;
-    private final String objectId;
-    private final String actionDescription;
-    private final String reasonDisabled;
-    private final boolean takesParameters;
-    private final ActionType type;
-    private final PathBuilder pathBuilder;
-
-    public MenuItem(final 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.pathBuilder = pathBuilder;
-        this.actionName = actionName;
-        this.actionDescription = actionDescription;
-        this.reasonDisabled = reasonDisabled;
-        this.type = type;
-        this.takesParameters = takesParameters;
-        this.objectId = objectId;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.print("<div class=\"menu-item\">");
-        if (isEmpty(reasonDisabled)) {
-            writeEnabledLink(writer);
-        } else {
-            writeDisabledLink(writer);
-        }
-        writer.println("</div>");
-    }
-
-    private boolean isEmpty(final String str) {
-        return str == null || str.length() == 0;
-    }
-
-    private void writeDisabledLink(final PrintWriter writer) {
-        writer.print("<div class=\"disabled\" title=\"");
-        writer.print(reasonDisabled);
-        writer.print("\">");
-        writer.print(actionName);
-        if (takesParameters) {
-            writer.print(". . .");
-        }
-        writer.print("</div>");
-    }
-
-    private void writeEnabledLink(final PrintWriter writer) {
-        writer.print("<a title=\"");
-        writer.print(actionDescription);
-        writer.print("\" href=\"");
-        writer.print(pathTo("method") + "?id=");
-        writer.print(objectId);
-        writer.print("&amp;action=");
-        writer.print(actionId);
-        writer.print("\">");
-        if (type == ActionType.EXPLORATION) {
-            writer.print("[");
-            writer.print(actionName);
-            writer.print("]");
-        } else {
-            writer.print(actionName);
-        }
-        if (takesParameters) {
-            writer.print(". . .");
-        }
-        writer.print("</a>");
-    }
-
-    protected String pathTo(final String prefix) {
-        return pathBuilder.pathTo(prefix);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java
deleted file mode 100644
index 68211b1..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *  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.core.metamodel.adapter.ObjectAdapter;
-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;
-
-public class ObjectIcon implements Component {
-    private final ObjectAdapter element;
-    private final String id;
-    private final String style;
-    private final String description;
-    private final PathBuilder pathBuilder;
-
-    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;
-        this.style = style;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.print("<div class=\"");
-        writer.print(style);
-        writer.print("\"");
-        if (description != null) {
-            writer.print(" title=\"");
-            writer.print(description);
-            writer.print("\"");
-        }
-        writer.print(">");
-
-        writer.print("<a href=\"");
-        writer.print(pathTo(Request.OBJECT_COMMAND) + "?id=");
-        writer.print(id);
-        writer.print("\"><img src=\"");
-        writer.print(ImageLookup.image(element));
-        writer.print("\" alt=\"");
-        final String singularName = element.getSpecification().getSingularName();
-        writer.print(singularName);
-        writer.print("\"");
-        writer.print("/>");
-        writer.print(element.titleString());
-        writer.print("</a>");
-
-        writer.println("</div>");
-
-    }
-
-    protected String pathTo(final String prefix) {
-        return pathBuilder.pathTo(prefix);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java
deleted file mode 100644
index 751e592..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *  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;
-    private final String error;
-
-    public RegisterFormPage(final PathBuilder pathBuilder, final String styleSheet, final String header, final String footer, final String user, final String password, final String error) {
-        super(pathBuilder, styleSheet, header, footer);
-        this.user = user;
-        this.password = password;
-        this.error = error;
-    }
-
-    @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\">");
-        if (error != null) {
-            writer.println("<div class=\"error\">");
-            writer.println(error);
-            writer.println("</div>");
-        }
-        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=\"password\" NAME=\"password2\" value=\"" + password + "\"></DIV>");
-        writer.println("<div class=\"action-button\"><INPUT TYPE=\"submit\" VALUE=\"Register\" NAME=\"Register\"></div>");
-        writer.print("<a class=\"link nav-link\" title=\"Back to the login page\" href=\"" + pathTo("login") + "\">back to login</a>");
-        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) {
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Row.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Row.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Row.java
deleted file mode 100644
index 92c4ad5..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Row.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  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.Component;
-import org.apache.isis.viewer.html.component.ComponentComposite;
-
-class Row extends ComponentComposite {
-
-    public Row(final PathBuilder pathBuilder) {
-        super(pathBuilder);
-    }
-
-    private static final int TRUNCATE_LENGTH = 18;
-
-    @Override
-    protected void write(final PrintWriter writer, final Component component) {
-        writer.print("<td>");
-        component.write(writer);
-        writer.println("</td>");
-    }
-
-    public void addCell(final String string, final boolean truncate) {
-        String s;
-        if (truncate) {
-            s = string.substring(0, Math.min(TRUNCATE_LENGTH, string.length()));
-            if (string.length() > TRUNCATE_LENGTH) {
-                s += "...";
-            }
-        } else {
-            s = string;
-        }
-        add(new Html(pathBuilder, s));
-    }
-
-    public void addCell(final Component component) {
-        add(component);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java
deleted file mode 100644
index 29c4cfc..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *  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.Component;
-import org.apache.isis.viewer.html.image.ImageLookup;
-
-public class ServiceComponent implements Component {
-
-    private final String id;
-    private final String name;
-    private final String iconName;
-    private final PathBuilder pathBuilder;
-
-    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;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.print("<div class=\"item\">");
-
-        writer.print("<a href=\"");
-        writer.print(pathTo("serviceOption") + "?id=");
-        writer.print(id);
-        writer.print("\"><img src=\"");
-        writer.print(ImageLookup.image(iconName));
-        writer.print("\" alt=\"service\" />");
-        writer.print(name);
-        writer.print("</a>");
-
-        writer.println("</div>");
-    }
-
-    protected String pathTo(final String prefix) {
-        return pathBuilder.pathTo(prefix);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Span.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Span.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Span.java
deleted file mode 100644
index b9684f1..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Span.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *  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.commons.lang.StringEscapeUtils;
-
-import org.apache.isis.viewer.html.component.Component;
-
-public class Span implements Component {
-    private final String className;
-    private final String value;
-    private final String description;
-
-    public Span(final String className, final String value, final String description) {
-        this.className = className;
-        this.value = value;
-        this.description = description;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.print("<span class=\"");
-        writer.print(className);
-        writer.print("\"");
-        if (description != null) {
-            writer.print(" title=\"");
-            writer.print(description);
-            writer.print("\"");
-        }
-        writer.print(">");
-        if (value != null) {
-            writer.print(StringEscapeUtils.escapeHtml(value));
-        }
-        writer.print("</span>");
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Submenu.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Submenu.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Submenu.java
deleted file mode 100644
index 7d5ad56..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Submenu.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  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.component.Component;
-
-public class Submenu implements Component {
-
-    private final String menuName;
-    private final Component[] items;
-
-    public Submenu(final String menuName, final Component[] items) {
-        this.menuName = menuName;
-        this.items = items;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.println("<div class=\"submenu-item\">");
-        writer.println(menuName);
-        for (final Component item : items) {
-            item.write(writer);
-        }
-        writer.println("</div>");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java
deleted file mode 100644
index 3c75955..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *  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.Component;
-import org.apache.isis.viewer.html.component.ComponentComposite;
-
-class TableHeader extends ComponentComposite {
-
-    public TableHeader(final PathBuilder pathBuilder) {
-        super(pathBuilder);
-    }
-
-    @Override
-    protected void write(final PrintWriter writer, final Component component) {
-        writer.print("<th>");
-        component.write(writer);
-        writer.println("</th>");
-    }
-
-    public void addHeader(final String string) {
-        add(new Html(pathBuilder, string));
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java
deleted file mode 100644
index 8f1716a..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *  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.ComponentAbstract;
-
-class TextBlock extends ComponentAbstract {
-    StringBuffer buffer = new StringBuffer();
-
-    public TextBlock(final PathBuilder pathBuilder, final String text) {
-        super(pathBuilder);
-        append(text);
-    }
-
-    public TextBlock(final PathBuilder pathBuilder) {
-        super(pathBuilder);
-    }
-
-    public void append(final String string) {
-        buffer.append(string);
-    }
-
-    public void appendBold(final String string) {
-        buffer.append("<b>");
-        buffer.append(string);
-        buffer.append("</b>");
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writeTag(writer, "p class=\"unknown\"");
-        writer.print(buffer.toString());
-        writer.println("</p>");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java
deleted file mode 100644
index dad71c2..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *  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.Component;
-
-final class UserSwapLink implements Component {
-    private final PathBuilder pathBuilder;
-    private final String name;
-
-    UserSwapLink(final PathBuilder pathBuilder, final String name) {
-        this.pathBuilder = pathBuilder;
-        this.name = name;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.print("<a class=\"user\" href=\"" + pathTo("setuser") + "?name=");
-        writer.print(name);
-        writer.print("\" title=\"Change user to " + name);
-        writer.print("\">");
-        writer.print(name);
-        writer.println("</a>");
-    }
-
-    protected String pathTo(final String prefix) {
-        return pathBuilder.pathTo(prefix);
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ViewDiv.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ViewDiv.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ViewDiv.java
deleted file mode 100644
index 5b99d4e..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ViewDiv.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- *  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 java.util.ArrayList;
-import java.util.List;
-
-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.ViewPane;
-import org.apache.isis.viewer.html.image.ImageLookup;
-
-public class ViewDiv extends ComponentComposite implements ViewPane {
-
-    private String iconName;
-    private String objectId;
-    private Component[] menu = new Component[0];
-    private String title;
-    private final List<String> messages = new ArrayList<String>();
-    private final List<String> warnings = new ArrayList<String>();
-    private String description;
-
-    public ViewDiv(final PathBuilder pathBuilder) {
-        super(pathBuilder);
-    }
-
-    @Override
-    public void setIconName(final String iconName) {
-        this.iconName = iconName;
-    }
-
-    public void setLink(final String objectId) {
-        this.objectId = objectId;
-    }
-
-    @Override
-    public void setMenu(final Component[] menu) {
-        this.menu = menu;
-    }
-
-    @Override
-    public void setTitle(final String title, final String description) {
-        this.title = title;
-        this.description = description;
-    }
-
-    @Override
-    public void setWarningsAndMessages(final List<String> messages, final List<String> warnings) {
-        this.messages.addAll(messages);
-        this.warnings.addAll(warnings);
-    }
-
-    @Override
-    protected void writeBefore(final PrintWriter writer) {
-        writer.println("<div id=\"view\">");
-        writeHeader(writer);
-        writeMenu(writer);
-        writer.println("<div id=\"content\">");
-    }
-
-    @Override
-    protected void writeAfter(final PrintWriter writer) {
-        writer.println("</div>");
-        writer.println("</div>");
-        writeMessages(writer);
-    }
-
-    private void writeMessages(final PrintWriter writer) {
-        if (warnings.size() > 0 || messages.size() > 0) {
-            writer.print("<div class=\"message-header\">");
-            for (final String warning : warnings) {
-                writer.print("<div class=\"warning\">");
-                writer.print(warning);
-                writer.println("</div>");
-            }
-            for (final String message : messages) {
-                writer.print("<div class=\"message\">");
-                writer.print(message);
-                writer.println("</div>");
-            }
-            writer.print("</div>");
-        }
-    }
-
-    private void writeMenu(final PrintWriter writer) {
-        writer.println("<div id=\"menu\">");
-        writer.println("<h3>Actions</h3>");
-        for (final Component element : menu) {
-            element.write(writer);
-        }
-        writer.println("</div>");
-    }
-
-    private void writeHeader(final PrintWriter writer) {
-        writer.print("<div class=\"header\"");
-        if (description != null) {
-            writer.print(" title=\"");
-            writer.print(description);
-            writer.print("\"");
-        }
-        writer.print(">");
-        if (objectId != null) {
-            writer.print("<a href=\"" + pathTo("object") + "?id=");
-            writer.print(objectId);
-            writer.print("\">");
-        }
-        if (iconName != null) {
-            writer.print("<span class=\"header-icon\"><img src=\"");
-            writer.print(ImageLookup.image(iconName));
-            writer.print("\" alt=\"icon\" /></span>");
-        }
-        writer.print("<span class=\"header-text\"");
-        writer.print(">");
-        writer.print(title);
-        writer.println("</span>");
-        if (objectId != null) {
-            writer.print("</a>");
-        }
-        writer.println("</div>");
-    }
-
-    @Override
-    protected String pathTo(final String prefix) {
-        return pathBuilder.pathTo(prefix);
-    }
-}


[16/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/WebViewerException.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/WebViewerException.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/WebViewerException.java
deleted file mode 100644
index 0da52ca..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/WebViewerException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *  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 org.apache.isis.core.commons.exceptions.IsisException;
-
-public class WebViewerException extends IsisException {
-    private static final long serialVersionUID = 1L;
-
-    public WebViewerException() {
-        super();
-    }
-
-    public WebViewerException(final String msg, final Throwable cause) {
-        super(msg, cause);
-    }
-
-    public WebViewerException(final String msg) {
-        super(msg);
-    }
-
-    public WebViewerException(final Throwable cause) {
-        super(cause);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/CollectionMapping.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/CollectionMapping.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/CollectionMapping.java
deleted file mode 100644
index e97f16e..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/CollectionMapping.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- *  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.context;
-
-import java.util.Iterator;
-import java.util.List;
-
-import com.google.common.collect.Lists;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacetUtils;
-import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacet;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-
-/**
- * Has value semantics based on the value semantics of the underlying list that
- * it wraps.
- */
-public class CollectionMapping implements Iterable<String> {
-    
-    private final List<String> list = Lists.newArrayList();
-    private final ObjectSpecification elementSpecification;
-
-    public CollectionMapping(final Context context, final ObjectAdapter collection) {
-        final TypeOfFacet typeOfFacet = collection.getSpecification().getFacet(TypeOfFacet.class);
-        elementSpecification = typeOfFacet.valueSpec();
-
-        final CollectionFacet collectionFacet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
-        
-        for (ObjectAdapter element : collectionFacet.iterable(collection)) {
-            final String objectId = context.mapObject(element);
-            list.add(objectId);
-        }
-    }
-
-    public ObjectAdapter getCollection(final Context context) {
-        final List<Object> elementPojos = Lists.newArrayList();
-        
-        for (String elementId : list) {
-            final ObjectAdapter adapter = context.getMappedObject(elementId);
-            final Object pojo = adapter.getObject();
-            elementPojos.add(pojo);
-        }
-        return getAdapterManager().adapterFor(elementPojos);
-    }
-
-    public ObjectSpecification getElementSpecification() {
-        return elementSpecification;
-    }
-
-    
-    public Iterator<String> iterator() {
-        return list.iterator();
-    }
-
-    public boolean contains(final String id) {
-        for (String elementId : list) {
-            if (elementId.equals(id)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public void remove(final String existingId) {
-        for (final String elementId: list) {
-            if (elementId.equals(existingId)) {
-                list.remove(existingId);
-                break;
-            }
-        }
-    }
-
-
-    // //////////////////////////////////////////////////////
-    // debugging
-    // //////////////////////////////////////////////////////
-
-    public void debug(final DebugBuilder debug) {
-        debug.indent();
-        for (String elementId : list) {
-            debug.appendln(elementId);
-        }
-        debug.unindent();
-    }
-
-
-
-    // //////////////////////////////////////////////////////
-    // equals, hashCode
-    // //////////////////////////////////////////////////////
-
-    /**
-     * Value semantics based on the identity of the underlying list that this
-     * wraps.
-     */
-    @Override
-    public int hashCode() {
-        return list.hashCode();
-    }
-
-    @Override
-    public boolean equals(final Object other) {
-        if (other == this) {
-            return true;
-        }
-        if (other == null) {
-            return false;
-        }
-        if (other.getClass() != this.getClass()) {
-            return false;
-        }
-        return equals((CollectionMapping) other);
-    }
-
-    public boolean equals(final CollectionMapping other) {
-        return this.list.equals(other.list);
-    }
-
-    // //////////////////////////////////////////////////////
-    // Dependencies (from context)
-    // //////////////////////////////////////////////////////
-
-    private static AdapterManager getAdapterManager() {
-        return getPersistenceSession().getAdapterManager();
-    }
-
-    private static PersistenceSession getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/Context.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/Context.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/Context.java
deleted file mode 100644
index c6545fa..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/Context.java
+++ /dev/null
@@ -1,654 +0,0 @@
-/*
- *  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.context;
-
-import java.io.Serializable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Stack;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.commons.ensure.Assert;
-import org.apache.isis.core.commons.exceptions.IsisException;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.adapter.version.ConcurrencyException;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.core.runtime.system.transaction.UpdateNotifier;
-import org.apache.isis.core.runtime.userprofile.UserProfile;
-import org.apache.isis.viewer.html.component.Block;
-import org.apache.isis.viewer.html.component.ComponentFactory;
-import org.apache.isis.viewer.html.crumb.CollectionCrumb;
-import org.apache.isis.viewer.html.crumb.Crumb;
-import org.apache.isis.viewer.html.crumb.ObjectCrumb;
-import org.apache.isis.viewer.html.crumb.ObjectFieldCrumb;
-import org.apache.isis.viewer.html.crumb.TaskCrumb;
-import org.apache.isis.viewer.html.request.Request;
-import org.apache.isis.viewer.html.task.Task;
-
-public class Context implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final Logger LOG = Logger.getLogger(Context.class);
-    
-    private transient ObjectHistory history;
-
-    private final ComponentFactory componentFactory;
-
-    private final Map<String, RootAdapterMapping> objectMap = Maps.newHashMap();
-    private final Map<String, RootAdapterMapping> serviceMap = Maps.newHashMap();
-    private final Map<String, CollectionMapping> collectionMap = Maps.newHashMap();
-    private final Map<String, ObjectAction> actionMap = Maps.newHashMap();
-    
-    private final Stack<Crumb> crumbs = new Stack<Crumb>();
-    private final List<String> messages = Lists.newArrayList();
-    private final List<String> warnings = Lists.newArrayList();
-
-    private AuthenticationSession session;
-    
-    private boolean isValid;
-    private int max;
-
-    // ////////////////////////////////////////////////////
-    // constructor, init
-    // ////////////////////////////////////////////////////
-
-    public Context(final ComponentFactory componentFactory) {
-        this.componentFactory = componentFactory;
-        this.isValid = true;
-        clearMessagesAndWarnings();
-        LOG.debug(this + " created with " + componentFactory);
-    }
-
-    public void init() {
-        final AdapterManager adapterManager = getAdapterManager();
-        final List<Object> services = getUserProfile().getPerspective().getServices();
-        for (final Object service : services) {
-            final ObjectAdapter serviceAdapter = adapterManager.adapterFor(service);
-            if (serviceAdapter == null) {
-                LOG.warn("unable to find service: " + service + "; skipping");
-                continue;
-            }
-            mapObject(serviceAdapter);
-        }
-        serviceMap.putAll(objectMap);
-    }
-
-
-    public ComponentFactory getComponentFactory() {
-        return componentFactory;
-    }
-
-
-    // ////////////////////////////////////////////////////
-    // validity 
-    // ////////////////////////////////////////////////////
-
-    public boolean isValid() {
-        return isValid;
-    }
-
-    public void invalidate() {
-        isValid = false;
-    }
-    
-    
-    // ////////////////////////////////////////////////////
-    // session 
-    // ////////////////////////////////////////////////////
-
-    public boolean isLoggedIn() {
-        return session != null;
-    }
-
-    public void setSession(final AuthenticationSession currentSession) {
-        this.session = currentSession;
-    }
-
-    public AuthenticationSession getSession() {
-        return session;
-    }
-
-
-    // ////////////////////////////////////////////////////
-    // processChanges 
-    // ////////////////////////////////////////////////////
-
-    public void processChanges() {
-        final List<ObjectAdapter> disposedObjects = getUpdateNotifier().getDisposedObjects();
-        for (final ObjectAdapter adapter : disposedObjects) {
-            final RootAdapterMapping mapping = persistentOrTransientObjectMappingFor(adapter);
-            if (objectMap.containsValue(mapping)) {
-                processChangeFor(mapping);
-            }
-        }
-    }
-
-    private void processChangeFor(final RootAdapterMapping mapping) {
-        final String existingId = findExistingInMap(objectMap, mapping);
-        getObjectHistory().remove(existingId);
-
-        final List<Crumb> relatedCrumbs = Lists.newArrayList();
-        for (final Crumb crumb : getCrumbs()) {
-            /*
-             * if (crumb.isFor(existingId)) { relatedCrumbs.add(crumb);
-             * }
-             */}
-        for (final Crumb crumb : relatedCrumbs) {
-            crumbs.remove(crumb);
-        }
-
-        for (final CollectionMapping collection : collectionMap.values()) {
-            collection.remove(existingId);
-        }
-        objectMap.remove(existingId);
-    }
-
-    // ////////////////////////////////////////////////////
-    // changeContext 
-    // ////////////////////////////////////////////////////
-
-    public Request changeContext(final int id) {
-        while (crumbs.size() - 1 > id) {
-            crumbs.pop();
-        }
-        final Crumb c = crumbs.lastElement();
-        return c.changeContext();
-    }
-
-
-    
-    // ////////////////////////////////////////////////////
-    // Crumbs
-    // ////////////////////////////////////////////////////
-
-    public void addCollectionFieldCrumb(final String collectionFieldName) {
-        crumbs.push(new ObjectFieldCrumb(collectionFieldName));
-    }
-
-    public void addCollectionCrumb(final String id) {
-        while (crumbs.size() > 0 && !(crumbs.lastElement() instanceof TaskCrumb)) {
-            crumbs.pop();
-        }
-        crumbs.push(new CollectionCrumb(id, getMappedCollection(id)));
-    }
-
-    public void setObjectCrumb(final ObjectAdapter object) {
-        while (crumbs.size() > 0 && !(crumbs.lastElement() instanceof TaskCrumb)) {
-            crumbs.pop();
-        }
-        final String id = mapObject(object);
-        crumbs.push(new ObjectCrumb(id, object));
-    }
-
-
-    public void addTaskCrumb(final Task task) {
-        while (crumbs.size() > 1 && !(crumbs.lastElement() instanceof ObjectCrumb)) {
-            crumbs.pop();
-        }
-        Assert.assertNotNull(task);
-        Assert.assertTrue(!isTask());
-        task.init(this);
-        crumbs.push(new TaskCrumb(task));
-    }
-
-    
-    public Crumb[] getCrumbs() {
-        final int size = crumbs.size();
-        final Crumb[] taskList = new Crumb[size];
-        for (int i = 0; i < crumbs.size(); i++) {
-            taskList[i] = crumbs.get(i);
-        }
-        return taskList;
-    }
-
-    public boolean[] isLinked() {
-        final int size = crumbs.size();
-        final boolean[] isLinked = new boolean[size];
-        for (int i = size - 1; i >= 0; i--) {
-            final boolean isTask = crumbs.elementAt(i) instanceof TaskCrumb;
-            isLinked[i] = i != size - 1;
-            if (isTask) {
-                break;
-            }
-        }
-        return isLinked;
-    }
-
-
-    // ////////////////////////////////////////////////////
-    // Mappings
-    // ////////////////////////////////////////////////////
-
-    public String mapAction(final ObjectAction action) {
-        return findExistingOrAddToMap(actionMap, action);
-    }
-
-    public String mapObject(final ObjectAdapter adapter) {
-        return findExistingOrAddToMap(objectMap, persistentOrTransientObjectMappingFor(adapter));
-    }
-
-    public String mapCollection(final ObjectAdapter collection) {
-        return findExistingOrAddToMap(collectionMap, new CollectionMapping(this, collection));
-    }
-
-    public ObjectAction getMappedAction(final String id) {
-        return getMappedInstance(actionMap, id);
-    }
-
-    public ObjectAdapter getMappedCollection(final String id) {
-        final CollectionMapping map = getMappedInstance(collectionMap, id);
-        return map.getCollection(this);
-    }
-
-    public ObjectAdapter getMappedObject(final String id) {
-        final RootAdapterMapping mappedObject = getMappedInstance(objectMap, id);
-        final ObjectAdapter adapter = mappedObject.getObject();
-
-        // ensure resolved if currently a ghost;
-        // start/end xactn if required
-        if (adapter.representsPersistent() && adapter.isGhost()) {
-            getPersistenceSession().resolveImmediately(adapter);
-        }
-
-        try {
-            mappedObject.checkVersion(adapter);
-        } catch (final ConcurrencyException e) {
-            LOG.info("concurrency conflict: " + e.getMessage());
-            messages.clear();
-            messages.add(e.getMessage());
-            messages.add("Reloaded object " + adapter.titleString());
-            updateVersion(adapter);
-        }
-        return adapter;
-    }
-
-    
-    private <T> String findExistingOrAddToMap(final Map<String,T> map, final T object) {
-        Assert.assertNotNull(object);
-        if (map.containsValue(object)) {
-            return findExistingInMap(map, object);
-        } else {
-            return addToMap(map, object);
-        }
-    }
-
-    private <T> String addToMap(final Map<String,T> map, final T object) {
-        
-        String id;
-        // bit hacky...
-        if(object instanceof RootAdapterMapping) {
-            // object or (internal) collection
-            RootAdapterMapping adapterMapping = (RootAdapterMapping) object;
-            id = adapterMapping.getOidStr();
-        } else {
-            max++;
-            id = "" + max;
-        }
-        map.put(id, object);
-
-        final String mapName = map == objectMap ? "object" : (map == collectionMap ? "collection" : "action");
-        if(LOG.isDebugEnabled()) {
-            LOG.debug("add " + object + " to " + mapName + " as #" + id);
-        }
-        return id;
-    }
-
-    private <T> String findExistingInMap(final Map<String, T> map, final Object object) {
-        for (final String id : map.keySet()) {
-            if (object.equals(map.get(id))) {
-                return id;
-            }
-        }
-        throw new IsisException();
-    }
-
-    private <T> T getMappedInstance(final Map<String,T> map, final String id) {
-        final T object = map.get(id);
-        if (object == null) {
-            final String mapName = mapNameFor(map);
-            throw new ObjectLookupException("No object in " + mapName + " map with id " + id);
-        }
-        return object;
-    }
-
-    private <T> String mapNameFor(final Map<String, T> map) {
-        return (map == objectMap) ? "object" : (map == collectionMap ? "collection" : "action");
-    }
-
-    private static RootAdapterMapping persistentOrTransientObjectMappingFor(final ObjectAdapter adapter) {
-        return adapter.isTransient() ? new TransientRootAdapterMapping(adapter) : new PersistentRootAdapterMapping(adapter);
-    }
-
-    
-
-    // ////////////////////////////////////////////////////
-    // Instances 
-    // ////////////////////////////////////////////////////
-
-    /**
-     * Returns an array of instances of the specified type that are currently
-     * known in the current context, ie have been recently seen by the user.
-     * 
-     * <p>
-     * These will be resolved if required, with a transaction created (and
-     * ended) if required.
-     */
-    public ObjectAdapter[] getKnownInstances(final ObjectSpecification type) {
-
-        final List<ObjectAdapter> instances = Lists.newArrayList();
-
-        for (final String id : objectMap.keySet()) {
-            final ObjectAdapter adapter = getMappedObject(id);
-            
-            getPersistenceSession().resolveImmediately(adapter);
-            if (adapter.getSpecification().isOfType(type)) {
-                instances.add(adapter);
-            }
-        }
-
-        final ObjectAdapter[] array = new ObjectAdapter[instances.size()];
-        instances.toArray(array);
-        return array;
-    }
-
-    public void restoreAllObjectsToLoader() {
-        for (Map.Entry<String, RootAdapterMapping> mapEntry : objectMap.entrySet()) {
-            final RootAdapterMapping rootAdapterMapping = mapEntry.getValue();
-            rootAdapterMapping.restoreToLoader();
-        }
-    }
-
-    public void purgeObjectsAndCollections() {
-        
-        clearMessagesAndWarnings();
-
-        final Map<String, CollectionMapping> collMappingById = Maps.newHashMap();
-        final Map<String, RootAdapterMapping> objectMappingById = Maps.newHashMap();
-
-        for (HistoryEntry entry : getObjectHistory()) {
-            if (entry.type == HistoryEntry.OBJECT) {
-                copyObjectMapping(objectMappingById, entry);
-            } else if (entry.type == HistoryEntry.COLLECTION) {
-                copyCollectionMapping(collMappingById, objectMappingById, entry);
-            }
-        }
-
-        collectionMap.clear();
-        collectionMap.putAll(collMappingById);
-        objectMap.clear();
-        objectMap.putAll(objectMappingById);
-        objectMap.putAll(serviceMap);
-    }
-
-    private void copyObjectMapping(final Map<String, RootAdapterMapping> objectMappingById, HistoryEntry entry) {
-        final RootAdapterMapping item = objectMap.get(entry.id);
-        objectMappingById.put(entry.id, item);
-        
-        LOG.debug("copied object map " + entry.id + " for " + item);
-        item.updateVersion();
-    }
-    
-    private void copyCollectionMapping(final Map<String, CollectionMapping> collMappingById, final Map<String, RootAdapterMapping> objectMappingById, HistoryEntry entry) {
-        
-        final CollectionMapping coll = collectionMap.get(entry.id);
-        collMappingById.put(entry.id, coll);
-        LOG.debug("copied collection map for " + coll);
-        
-        for (String elementId : coll) {
-            final RootAdapterMapping objMapping = objectMap.get(elementId);
-            
-            if (objMapping != null) {
-                objectMappingById.put(elementId, objMapping);
-                
-                LOG.debug("copied object map " + elementId + " for " + objMapping);
-                objMapping.updateVersion();
-            }
-        }
-    }
-
-    // ////////////////////////////////////////////////////
-    // Tasks 
-    // ////////////////////////////////////////////////////
-
-    public Task getTask(final String taskId) {
-        Task task = null;
-        for (int i = crumbs.size() - 1; i >= 0; i--) {
-            final Object crumb = crumbs.get(i);
-            if (crumb instanceof TaskCrumb) {
-                final TaskCrumb taskCrumb = (TaskCrumb) crumb;
-                final String id = taskCrumb.getTask().getId();
-                if (taskId.equals(id)) {
-                    task = taskCrumb.getTask();
-                    break;
-                }
-            }
-        }
-        return task;
-    }
-
-    public void endTask(final Task task) {
-        for (int i = crumbs.size() - 1; i >= 0; i--) {
-            final Object crumb = crumbs.get(i);
-            if (crumb instanceof TaskCrumb) {
-                final TaskCrumb taskCrumb = (TaskCrumb) crumb;
-                if (taskCrumb.getTask() == task) {
-                    crumbs.remove(taskCrumb);
-                    return;
-                }
-            }
-        }
-        throw new IsisException("No crumb found for " + task);
-    }
-
-
-    public Request cancelTask(final Task task) {
-        if (task != null) {
-            endTask(task);
-        }
-
-        // REVIEW does this take us back to the right object?
-        final Crumb crumb = crumbs.get(crumbs.size() - 1);
-        return crumb.changeContext();
-    }
-
-    private boolean isTask() {
-        final int index = crumbs.size() - 1;
-        return index >= 0 && crumbs.get(index) instanceof TaskCrumb;
-    }
-
-    
-
-    // ////////////////////////////////////////////////////
-    // Messages 
-    // ////////////////////////////////////////////////////
-
-    public List<String> getMessages() {
-        return messages;
-    }
-
-    public String getMessage(final int i) {
-        return messages.get(i);
-    }
-
-    public List<String> getWarnings() {
-        return warnings;
-    }
-
-    public String getWarning(final int i) {
-        return warnings.get(i);
-    }
-
-    public void setMessagesAndWarnings(final List<String> messages, final List<String> warnings) {
-        this.messages.clear();
-        this.messages.addAll(messages);
-        this.warnings.clear();
-        this.warnings.addAll(warnings);
-    }
-
-    public void clearMessagesAndWarnings() {
-        messages.clear();
-        warnings.clear();
-    }
-
-
-    public void listHistory(final Context context, final Block navigation) {
-        getObjectHistory().listObjects(context, navigation);
-    }
-
-    public void addObjectToHistory(final String idString) {
-        getObjectHistory().addObject(idString);
-    }
-
-    public void addCollectionToHistory(final String idString) {
-        getObjectHistory().addCollection(idString);
-    }
-
-    // ////////////////////////////////////////////////////
-    // 
-    // ////////////////////////////////////////////////////
-
-
-    public void updateVersion(final ObjectAdapter adapter) {
-        if (adapter.isTransient()) {
-            return;
-        }
-
-        // TODO refactor this for clarity: removes existing mapping and replaces
-        // it with a new one as it
-        // contains the new version
-        final String id = mapObject(adapter);
-        if (id != null) {
-            final RootAdapterMapping mapping = new PersistentRootAdapterMapping(adapter);
-            objectMap.put(id, mapping);
-        }
-    }
-
-
-    // ////////////////////////////////////////////////////
-    // Debug 
-    // ////////////////////////////////////////////////////
-
-    public void debug(final DebugBuilder debug) {
-        debug.startSection("Web Session Context");
-        debug.appendAsHexln("hash", hashCode());
-        debug.appendln("session", session);
-        debug.appendln("is valid", isValid);
-        debug.appendln("next id", max);
-        debug.appendln("factory", componentFactory);
-        debug.appendln("is task", isTask());
-
-        debug.appendln("crumbs (" + crumbs.size() + ")");
-
-        debug.indent();
-        for (int i = 0; i < crumbs.size(); i++) {
-            final Crumb crumb = crumbs.get(i);
-            debug.appendln(i + 1 + ". " + crumb);
-            debug.indent();
-            crumb.debug(debug);
-            debug.unindent();
-        }
-        debug.unindent();
-
-        debug.startSection("Objects");
-        for (final String id : objectMap.keySet()) {
-            final RootAdapterMapping object = objectMap.get(id);
-            debug.appendln(id + " -> " + object.getOidStr());
-            debug.indent();
-            object.debugData(debug);
-            debug.unindent();
-        }
-        debug.endSection();
-
-        debug.startSection("Collections");
-        for (final String id : collectionMap.keySet()) {
-            final CollectionMapping coll = collectionMap.get(id);
-            debug.appendln(id + " -> collection of " + coll.getElementSpecification().getPluralName());
-            coll.debug(debug);
-        }
-        debug.endSection();
-
-        debug.startSection("Actions");
-        debugMap(debug, actionMap);
-        debug.endSection();
-
-        debug.startSection("History");
-        getObjectHistory().debug(debug);
-        debug.endSection();
-
-        debug.endSection();
-    }
-
-    private void debugMap(final DebugBuilder debug, final Map<String,?> map) {
-        final Iterator<String> names = map.keySet().iterator();
-        while (names.hasNext()) {
-            final String name = names.next();
-            debug.appendln(name + " -> " + map.get(name));
-        }
-    }
-
-
-    // ////////////////////////////////////////////////////
-    // Non-serializable
-    // ////////////////////////////////////////////////////
-    
-    private ObjectHistory getObjectHistory() {
-        if(history == null) {
-            history = new ObjectHistory();
-        }
-        return history;
-    }
-
-
-    // ////////////////////////////////////////////////////
-    // Dependencies (from context)
-    // ////////////////////////////////////////////////////
-
-    protected UserProfile getUserProfile() {
-        return IsisContext.getUserProfile();
-    }
-
-    protected AdapterManager getAdapterManager() {
-        return getPersistenceSession().getAdapterManager();
-    }
-
-
-    protected PersistenceSession getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
-    }
-
-    protected UpdateNotifier getUpdateNotifier() {
-        return IsisContext.getUpdateNotifier();
-    }
-
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/HistoryEntry.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/HistoryEntry.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/HistoryEntry.java
deleted file mode 100644
index 836a0e2..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/HistoryEntry.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  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.context;
-
-public class HistoryEntry {
-    public static final int OBJECT = 1;
-    public static final int COLLECTION = 2;
-
-    public final int type;
-    public final String id;
-
-    public HistoryEntry(final String idString, final int type) {
-        this.id = idString;
-        this.type = type;
-    }
-
-    @Override
-    public int hashCode() {
-        return id.hashCode();
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        return ((HistoryEntry) obj).id.equals(id);
-    }
-
-    @Override
-    public String toString() {
-        return (type == OBJECT ? "object " : "collection ") + id;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectHistory.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectHistory.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectHistory.java
deleted file mode 100644
index 9dfa7cc..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectHistory.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- *  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.context;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.commons.exceptions.IsisException;
-import org.apache.isis.core.commons.exceptions.UnknownTypeException;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.html.component.Block;
-import org.apache.isis.viewer.html.component.Component;
-
-public class ObjectHistory implements Iterable<HistoryEntry> {
-
-    private static final Logger LOG = Logger.getLogger(ObjectHistory.class);
-    private static final int MAX = 8;
-    private final List<HistoryEntry> history = new ArrayList<HistoryEntry>();
-
-    private void add(final HistoryEntry entry) {
-        history.remove(entry);
-        history.add(entry);
-        LOG.debug("added to history: " + entry);
-        if (history.size() > MAX) {
-            LOG.debug("purging from history: " + history.get(0));
-            history.remove(0);
-        }
-    }
-
-    public void debug(final DebugBuilder debug) {
-        for (int i = history.size() - 1; i >= 0; i--) {
-            final HistoryEntry object = history.get(i);
-            debug.appendln(object.toString());
-        }
-    }
-
-    public void listObjects(final Context context, final Block navigation) {
-        final Block taskBar = context.getComponentFactory().createBlock("history", null);
-        taskBar.add(context.getComponentFactory().createHeading("History"));
-        for (int i = history.size() - 1; i >= 0; i--) {
-            try {
-                final HistoryEntry item = history.get(i);
-                Component icon;
-                if (item.type == HistoryEntry.OBJECT) {
-                    final ObjectAdapter object = context.getMappedObject(item.id);
-
-                    IsisContext.getPersistenceSession().resolveImmediately(object);
-
-                    icon = context.getComponentFactory().createObjectIcon(object, item.id, "item");
-                } else if (item.type == HistoryEntry.COLLECTION) {
-                    final ObjectAdapter object = context.getMappedCollection(item.id);
-                    icon = context.getComponentFactory().createCollectionIcon(object, item.id);
-                } else {
-                    throw new UnknownTypeException(item);
-                }
-                taskBar.add(icon);
-            } catch (final IsisException e) { // Catch resolveImmediately
-                                              // exception when object is
-                                              // deleted.
-
-            }
-        }
-        navigation.add(taskBar);
-    }
-
-    public void addObject(final String idString) {
-        add(new HistoryEntry(idString, HistoryEntry.OBJECT));
-    }
-
-    public void addCollection(final String idString) {
-        add(new HistoryEntry(idString, HistoryEntry.COLLECTION));
-    }
-
-    public Iterator<HistoryEntry> iterator() {
-        return history.iterator();
-    }
-
-    public void remove(final String existingId) {
-        for (final HistoryEntry entry : history) {
-            if (entry.id.equals(existingId)) {
-                history.remove(entry);
-                break;
-            }
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectLookupException.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectLookupException.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectLookupException.java
deleted file mode 100644
index 5a616d1..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectLookupException.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  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.context;
-
-import org.apache.isis.viewer.html.action.ActionException;
-
-public class ObjectLookupException extends ActionException {
-    private static final long serialVersionUID = 1L;
-
-    public ObjectLookupException() {
-    }
-
-    public ObjectLookupException(final String msg, final Throwable cause) {
-        super(msg, cause);
-    }
-
-    public ObjectLookupException(final String msg) {
-        super(msg);
-    }
-
-    public ObjectLookupException(final Throwable cause) {
-        super(cause);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java
deleted file mode 100644
index 9ac5a4c..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- *  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.context;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.commons.ensure.Assert;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
-import org.apache.isis.core.metamodel.adapter.version.Version;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-
-public class PersistentRootAdapterMapping extends RootAdapterMappingAbstract {
-    
-    private static final long serialVersionUID = 1L;
-    
-    private Version version;
-
-    public PersistentRootAdapterMapping(final ObjectAdapter adapter) {
-        super(adapter);
-        Assert.assertFalse("OID is for transient", adapter.getOid().isTransient());
-        Assert.assertFalse("adapter is for transient", adapter.isTransient());
-    }
-
-
-    // /////////////////////////////////////////////////////
-    // version
-    // /////////////////////////////////////////////////////
-
-    @Override
-    public Version getVersion() {
-        return version;
-    }
-
-    @Override
-    public void checkVersion(final ObjectAdapter object) {
-        object.checkLock(getVersion());
-    }
-
-    @Override
-    public void updateVersion() {
-        final ObjectAdapter adapter = getAdapterManager().getAdapterFor(getOid());
-        version = adapter.getVersion();
-    }
-
-
-    // /////////////////////////////////////////////////////
-    // restoreToLoader
-    // /////////////////////////////////////////////////////
-
-    @Override
-    public void restoreToLoader() {
-        final RootOidDefault oid = RootOidDefault.deString(getOidStr(), getOidMarshaller());
-        final ObjectAdapter adapter = getAdapterManager().adapterFor(oid);
-        adapter.setVersion(getVersion());
-    }
-
-
-    // /////////////////////////////////////////////////////
-    // value semantics
-    // /////////////////////////////////////////////////////
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (!(obj instanceof PersistentRootAdapterMapping)) {
-            return false;
-        } 
-        return ((PersistentRootAdapterMapping) obj).getOidStr().equals(getOidStr());
-    }
-
-
-    // /////////////////////////////////////////////////////
-    // debugging, toString
-    // /////////////////////////////////////////////////////
-
-    @Override
-    public void debugData(final DebugBuilder debug) {
-        debug.appendln(getOidStr());
-        if (version != null) {
-            debug.appendln(version.toString());
-        }
-    }
-
-    @Override
-    public String toString() {
-        return getOidStr() + " : " + version;
-    }
-
-    // /////////////////////////////////////////////////////
-    // Dependencies (from context)
-    // /////////////////////////////////////////////////////
-
-    protected PersistenceSession getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
-    }
-
-    protected AdapterManager getAdapterManager() {
-        return getPersistenceSession().getAdapterManager();
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMapping.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMapping.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMapping.java
deleted file mode 100644
index d0a6bda..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMapping.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *  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.context;
-
-import java.io.Serializable;
-
-import org.apache.isis.core.commons.debug.Debuggable;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.version.Version;
-
-public interface RootAdapterMapping extends Serializable, Debuggable {
-
-    String getOidStr();
-
-    ObjectAdapter getObject();
-
-    Version getVersion();
-
-    void checkVersion(ObjectAdapter object);
-
-    void restoreToLoader();
-
-    void updateVersion();
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMappingAbstract.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMappingAbstract.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMappingAbstract.java
deleted file mode 100644
index 0c7e1f3..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMappingAbstract.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- *  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.context;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.Oid;
-import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
-import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
-import org.apache.isis.core.metamodel.adapter.version.Version;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.Persistor;
-
-public abstract class RootAdapterMappingAbstract implements RootAdapterMapping {
-    
-    private static final long serialVersionUID = 1L;
-    
-    private final String oidStr;
-
-    public RootAdapterMappingAbstract(final ObjectAdapter adapter) {
-        final Oid oid = adapter.getOid();
-        oidStr = oid.enString(getOidMarshaller());
-    }
-
-    @Override
-    public String getOidStr() {
-        return oidStr;
-    }
-
-    RootOidDefault getOid() {
-        return RootOidDefault.deString(oidStr, getOidMarshaller());
-    }
-
-    @Override
-    public ObjectAdapter getObject() {
-        return getPersistenceSession().loadObject(getOid());
-    }
-
-
-    // /////////////////////////////////////////////////////
-    // version
-    // /////////////////////////////////////////////////////
-
-    @Override
-    public abstract Version getVersion();
-
-    @Override
-    public abstract void checkVersion(final ObjectAdapter object);
-
-    @Override
-    public abstract void updateVersion();
-
-    
-    // /////////////////////////////////////////////////////
-    // restoreToLoader
-    // /////////////////////////////////////////////////////
-
-    @Override
-    public abstract void restoreToLoader();
-
-
-    // /////////////////////////////////////////////////////
-    // value semantics
-    // /////////////////////////////////////////////////////
-
-    @Override
-    public int hashCode() {
-        return oidStr.hashCode();
-    }
-
-    @Override
-    public abstract boolean equals(final Object obj);
-
-
-    // /////////////////////////////////////////////////////
-    // debugging, toString
-    // /////////////////////////////////////////////////////
-
-    @Override
-    public abstract void debugData(final DebugBuilder debug);
-
-    @Override
-    public abstract String toString();
-
-    // /////////////////////////////////////////////////////
-    // Dependencies (from context)
-    // /////////////////////////////////////////////////////
-
-    private static Persistor getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
-    }
-
-    protected OidMarshaller getOidMarshaller() {
-		return IsisContext.getOidMarshaller();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/TransientRootAdapterMapping.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/TransientRootAdapterMapping.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/TransientRootAdapterMapping.java
deleted file mode 100644
index 7656f23..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/TransientRootAdapterMapping.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- *  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.context;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.commons.ensure.Assert;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.version.Version;
-import org.apache.isis.core.runtime.memento.Memento;
-
-public class TransientRootAdapterMapping extends RootAdapterMappingAbstract {
-    
-    private static final long serialVersionUID = 1L;
-    
-    private final Memento memento;
-
-    public TransientRootAdapterMapping(final ObjectAdapter adapter) {
-        super(adapter);
-        Assert.assertFalse("OID is for persistent", !adapter.getOid().isTransient());
-        Assert.assertFalse("adapter is for persistent", !adapter.isTransient());
-        memento = new Memento(adapter);
-    }
-
-    // /////////////////////////////////////////////////////
-    // version
-    // /////////////////////////////////////////////////////
-
-    @Override
-    public Version getVersion() {
-        return null;
-    }
-
-    @Override
-    public void checkVersion(final ObjectAdapter object) {
-    }
-
-    @Override
-    public void updateVersion() {
-    }
-
-    // /////////////////////////////////////////////////////
-    // restoreToLoader
-    // /////////////////////////////////////////////////////
-
-    @Override
-    public void restoreToLoader() {
-        memento.recreateObject();
-    }
-
-    // /////////////////////////////////////////////////////
-    // value semantics
-    // /////////////////////////////////////////////////////
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (!(obj instanceof TransientRootAdapterMapping)) {
-            return false;
-        } 
-        return ((TransientRootAdapterMapping) obj).getOidStr().equals(getOidStr());
-    }
-
-    
-
-    // /////////////////////////////////////////////////////
-    // debugging, toString
-    // /////////////////////////////////////////////////////
-
-    @Override
-    public void debugData(final DebugBuilder debug) {
-        memento.debug(debug);
-    }
-
-    @Override
-    public String toString() {
-        return "TRANSIENT : " + getOidStr() + " : " + memento;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/CollectionCrumb.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/CollectionCrumb.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/CollectionCrumb.java
deleted file mode 100644
index d177118..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/CollectionCrumb.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *  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.crumb;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.commons.lang.ToString;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.viewer.html.request.ForwardRequest;
-import org.apache.isis.viewer.html.request.Request;
-
-public class CollectionCrumb implements Crumb {
-    private final String collectionId;
-    private final String title;
-
-    public CollectionCrumb(final String collectionId, final ObjectAdapter collection) {
-        this.collectionId = collectionId;
-        title = collection.titleString();
-    }
-
-    @Override
-    public void debug(final DebugBuilder string) {
-        string.appendln("Collection Crumb");
-        string.appendln("object", collectionId);
-        string.appendln("title", title);
-    }
-
-    @Override
-    public String title() {
-        return title;
-    }
-
-    @Override
-    public String toString() {
-        return new ToString(this).append(title()).toString();
-    }
-
-    @Override
-    public Request changeContext() {
-        return ForwardRequest.listCollection(collectionId);
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/Crumb.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/Crumb.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/Crumb.java
deleted file mode 100644
index b64a583..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/Crumb.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  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.crumb;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.viewer.html.request.Request;
-
-public interface Crumb {
-    // TODO add icons to crumbs
-
-    String title();
-
-    void debug(DebugBuilder string);
-
-    Request changeContext();
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectCrumb.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectCrumb.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectCrumb.java
deleted file mode 100644
index b0e3c54..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectCrumb.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  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.crumb;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.commons.lang.ToString;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.viewer.html.request.ForwardRequest;
-import org.apache.isis.viewer.html.request.Request;
-
-public class ObjectCrumb implements Crumb {
-    private final String objectId;
-    private final boolean isService;
-    private final String title;
-
-    public ObjectCrumb(final String objectId, final ObjectAdapter object) {
-        this.objectId = objectId;
-        title = object.titleString();
-        isService = object.getSpecification().isService();
-    }
-
-    @Override
-    public void debug(final DebugBuilder string) {
-        string.appendln("Object Crumb");
-        string.appendln("object", objectId);
-        string.appendln("title", title);
-        string.appendln("for service", isService);
-    }
-
-    @Override
-    public String title() {
-        return title;
-    }
-
-    @Override
-    public String toString() {
-        return new ToString(this).append(title()).toString();
-    }
-
-    @Override
-    public Request changeContext() {
-        if (isService) {
-            return ForwardRequest.viewService(objectId);
-        } else {
-            return ForwardRequest.viewObject(objectId);
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectFieldCrumb.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectFieldCrumb.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectFieldCrumb.java
deleted file mode 100644
index 5fbd48d..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectFieldCrumb.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *  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.crumb;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.commons.exceptions.NotYetImplementedException;
-import org.apache.isis.core.commons.lang.ToString;
-import org.apache.isis.viewer.html.request.Request;
-
-public class ObjectFieldCrumb implements Crumb {
-    private final String fieldName;
-
-    public ObjectFieldCrumb(final String fieldName) {
-        this.fieldName = fieldName;
-    }
-
-    @Override
-    public void debug(final DebugBuilder string) {
-        string.appendln("Object Field Crumb");
-        string.appendln("field name", fieldName);
-    }
-
-    @Override
-    public String title() {
-        return fieldName;
-    }
-
-    @Override
-    public String toString() {
-        return new ToString(this).append(title()).toString();
-    }
-
-    @Override
-    public Request changeContext() {
-        throw new NotYetImplementedException();
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/TaskCrumb.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/TaskCrumb.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/TaskCrumb.java
deleted file mode 100644
index c61233d..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/TaskCrumb.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *  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.crumb;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.commons.lang.ToString;
-import org.apache.isis.viewer.html.request.ForwardRequest;
-import org.apache.isis.viewer.html.request.Request;
-import org.apache.isis.viewer.html.task.Task;
-
-public class TaskCrumb implements Crumb {
-    private final Task task;
-
-    public TaskCrumb(final Task task) {
-        this.task = task;
-    }
-
-    public Task getTask() {
-        return task;
-    }
-
-    @Override
-    public void debug(final DebugBuilder string) {
-        string.appendln("Task Crumb");
-        string.appendln("task", task);
-
-        task.debug(string);
-    }
-
-    @Override
-    public String title() {
-        return task.getName();
-    }
-
-    @Override
-    public String toString() {
-        return new ToString(this).append(title()).toString();
-    }
-
-    @Override
-    public Request changeContext() {
-        return ForwardRequest.task(task);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageLookup.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageLookup.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageLookup.java
deleted file mode 100644
index 670205b..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageLookup.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  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.image;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
-/**
- * ImageLookup provides an efficient way of finding the most suitable image to
- * use.
- * 
- * <p>
- * 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 {
-
-    private static ImageProvider imageProvider = new ImageProviderResourceBased();
-
-    public static ImageProvider getInstance() {
-        return imageProvider;
-    }
-
-    public static void setImageDirectory(final String imageDirectory) {
-        if (getInstance() instanceof ImageProviderDirectoryBased) {
-            final ImageProviderDirectoryBased imageProviderDirectoryBased = (ImageProviderDirectoryBased) imageProvider;
-            imageProviderDirectoryBased.setImageDirectory(imageDirectory);
-        }
-    }
-
-    public static void debug(final DebugBuilder debug) {
-        getInstance().debug(debug);
-    }
-
-    public static String image(final ObjectAdapter object) {
-        return getInstance().image(object);
-    }
-
-    public static String image(final ObjectSpecification specification) {
-        return getInstance().image(specification);
-    }
-
-    public static String image(final String name) {
-        return getInstance().image(name);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProvider.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProvider.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProvider.java
deleted file mode 100644
index 2f0912c..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProvider.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  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.image;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
-/**
- * Factors out the {@link ImageLookup} responsibilities into an interface, with
- * a view to moving towards alternative mechanisms.
- */
-public interface ImageProvider {
-
-    public void debug(final DebugBuilder debug);
-
-    /**
-     * 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.
-     * 
-     * @see ObjectAdapter#getIconName()
-     * @see #image(ObjectSpecification)
-     */
-    public String image(final ObjectAdapter object);
-
-    public String image(final ObjectSpecification specification);
-
-    public String image(final String name);
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderAbstract.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderAbstract.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderAbstract.java
deleted file mode 100644
index 27c7a9e..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderAbstract.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- *  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.image;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
-public abstract class ImageProviderAbstract implements ImageProvider {
-
-    private final String DEFAULT_IMAGE = "Default";
-
-    /**
-     * The extensions we'll search for.
-     */
-    private final String[] EXTENSIONS = { "png", "gif", "jpg", "jpeg" };
-
-    private final Map<String, String> images = new HashMap<String, String>();
-
-    @Override
-    public final String image(final ObjectAdapter object) {
-
-        if (object == null) {
-            return image((String) null);
-        }
-
-        final String iconName = object.getIconName();
-        if (iconName != null) {
-            return image(iconName);
-        } else {
-            return image(object.getSpecification());
-        }
-    }
-
-    @Override
-    public final String image(final ObjectSpecification specification) {
-
-        if (specification == null) {
-            return image((String) null);
-        }
-
-        final String specShortName = specification.getShortIdentifier();
-        final String imageName = image(specShortName);
-        if (imageName != null) {
-            return imageName;
-        }
-
-        // search up the hierarchy
-        return image(specification.superclass());
-    }
-
-    @Override
-    public String image(final String name) {
-
-        if (name == null) {
-            return findImage(DEFAULT_IMAGE, EXTENSIONS);
-        }
-
-        // look up from cache
-        String imageName = images.get(name);
-        if (imageName != null) {
-            return imageName;
-        }
-
-        // delegate to subclass to see if can find the image.
-        imageName = findImage(name, EXTENSIONS);
-
-        if (imageName != null) {
-            // cache and return
-            images.put(name, imageName);
-            return imageName;
-        }
-
-        // ie loop round to return the default.
-        return image((String) null);
-    }
-
-    @Override
-    public final void debug(final DebugBuilder debug) {
-        debug.appendTitle("Image Lookup");
-        debug.indent();
-        final Iterator<String> keys = images.keySet().iterator();
-        while (keys.hasNext()) {
-            final Object key = keys.next();
-            final Object value = images.get(key);
-            debug.appendln(key + " -> " + value);
-        }
-        debug.unindent();
-    }
-
-    /**
-     * Hook method for subclass to actually return the image, else <tt>null</tt>
-     * .
-     * 
-     * @param className
-     *            - the short name of the class to search for.
-     * @param extensions
-     *            - the extensions to search for.
-     */
-    protected abstract String findImage(final String className, String[] extensions);
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBased.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBased.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBased.java
deleted file mode 100644
index 73d41b0..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBased.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- *  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.image;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.Map;
-
-import com.google.common.collect.Maps;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.commons.exceptions.IsisException;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
-public class ImageProviderDirectoryBased implements ImageProvider {
-
-	private final static String UNKNOWN_IMAGE = "Default";
-    private final static String[] EXTENSIONS = { "png", "gif", "jpg", "jpeg" };
-    
-    private final Map<String,String> images = Maps.newHashMap();
-    
-    private File imageDirectory;
-    private String unknownImageFile;
-
-    public void setImageDirectory(final String imageDirectory) {
-        this.imageDirectory = new File(imageDirectory);
-        if (!this.imageDirectory.exists()) {
-            throw new IsisException("No image directory found: " + imageDirectory);
-        }
-        unknownImageFile = imageFile(UNKNOWN_IMAGE);
-    }
-
-    ///////////////////////////////////////////////////
-    // API
-    ///////////////////////////////////////////////////
-
-    /**
-     * 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.
-     * 
-     * @see ObjectAdapter#getIconName()
-     * @see #image(ObjectSpecification)
-     */
-    @Override
-    public String image(final ObjectAdapter object) {
-        final String iconName = object.getIconName();
-        if (iconName != null) {
-            return image(iconName);
-        } else {
-            return image(object.getSpecification());
-        }
-    }
-
-    @Override
-    public String image(final ObjectSpecification specification) {
-        final String name = specification.getShortIdentifier();
-        final String imageName = (String) images.get(name);
-        if (imageName != null) {
-            return imageName;
-        } else {
-            return findImage(specification);
-        }
-    }
-
-    @Override
-    public String image(final String name) {
-        final String imageName = (String) images.get(name);
-        if (imageName != null) {
-            return imageName;
-        } else {
-            final String fileName = imageFile(name);
-            return fileName == null ? unknownImageFile : fileName;
-        }
-    }
-
-
-    ///////////////////////////////////////////////////
-    // helpers
-    ///////////////////////////////////////////////////
-
-    private String imageFile(final String imageName) {
-        final String[] files = imageDirectory.list(new FilenameMatchesNamePlusExtension(imageName));
-
-        return files.length == 0 ? null : files[0];
-    }
-
-    private String findImage(final ObjectSpecification specification) {
-        final String name = specification.getShortIdentifier();
-        final String fileName = imageFile(name);
-        if (fileName != null) {
-            images.put(name, fileName);
-            return fileName;
-        } 
-        
-        final ObjectSpecification superclass = specification.superclass();
-		if (superclass != null) {
-		    return findImage(superclass);
-		}
-		
-		return unknownImageFile;
-    }
-
-
-    final static class FilenameMatchesNamePlusExtension implements FilenameFilter {
-		private final String imageName;
-
-		private FilenameMatchesNamePlusExtension(final String imageName) {
-			this.imageName = imageName;
-		}
-
-		@Override
-		public boolean accept(final File dir, final String name) {
-		    final int dot = name.lastIndexOf('.');
-		    if (dot <= 0) {
-		    	return false;
-		    }
-		    for (final String extension : EXTENSIONS) {
-			    if (name.substring(0, dot).equalsIgnoreCase(imageName) && name.substring(dot + 1).equalsIgnoreCase(extension)) {
-			        return true;
-			    }
-			}
-			return false;
-		}
-	}
-
-
-    ///////////////////////////////////////////////////
-    // debugging
-    ///////////////////////////////////////////////////
-
-    @Override
-    public void debug(final DebugBuilder debug) {
-        debug.appendTitle("Image Lookup");
-        debug.indent();
-        for (Map.Entry<String, String> entry: images.entrySet()) {
-            debug.appendln(entry.getKey() + " -> " + entry.getValue());
-        }
-        debug.unindent();
-    }
-
-    
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBasedReworked.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBasedReworked.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBasedReworked.java
deleted file mode 100644
index 16d8a83..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBasedReworked.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  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.image;
-
-import java.io.File;
-import java.io.FilenameFilter;
-
-import org.apache.isis.core.commons.exceptions.IsisException;
-
-public class ImageProviderDirectoryBasedReworked extends ImageProviderAbstract {
-
-    private File imageDirectory;
-
-    public void setImageDirectory(final String imageDirectory) {
-        this.imageDirectory = new File(imageDirectory);
-        if (!this.imageDirectory.exists()) {
-            throw new IsisException("No image directory found: " + imageDirectory);
-        }
-    }
-
-    @Override
-    protected String findImage(final String imageName, final String[] extensions) {
-        final String[] files = imageDirectory.list(new FilenameFilter() {
-            @Override
-            public boolean accept(final File dir, final String name) {
-                final int dot = name.lastIndexOf('.');
-                if (dot > 0) {
-                    final String nameWithoutExtension = name.substring(0, dot);
-                    final String nameExtension = name.substring(dot + 1);
-                    for (final String extension : extensions) {
-                        if (nameWithoutExtension.equalsIgnoreCase(imageName) && nameExtension.equalsIgnoreCase(extension)) {
-                            return true;
-                        }
-                    }
-                }
-                return false;
-            }
-        });
-
-        return files.length == 0 ? null : files[0];
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderResourceBased.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderResourceBased.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderResourceBased.java
deleted file mode 100644
index c1ed289..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderResourceBased.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *  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.image;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.isis.core.commons.lang.Resources;
-
-public class ImageProviderResourceBased extends ImageProviderAbstract {
-
-    /**
-     * Is an array since easy to maintain
-     */
-    public final static String[] DEFAULT_LOCATIONS = { "images", "src/main/resources", "src/main/java" };
-
-    /**
-     * Is a list since easy to inject.
-     */
-    private List<String> locations = new ArrayList<String>();
-
-    /**
-     * Initializes {@link #locations} with {@link #DEFAULT_LOCATIONS}, but can
-     * be overridden using {@link #setLocations(List)}.
-     */
-    public ImageProviderResourceBased() {
-        locations.addAll(Arrays.asList(DEFAULT_LOCATIONS));
-    }
-
-    @Override
-    protected String findImage(final String className, final String[] extensions) {
-
-        for (final String location : locations) {
-            for (final String extension : extensions) {
-                final String candidate = location + "/" + className + "." + extension;
-                if (Resources.getResourceAsFile(candidate) != null) {
-                    return candidate;
-                }
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Optionally inject the locations where the provider will search.
-     * 
-     * <p>
-     * If not specified, will use the locations in {@link #DEFAULT_LOCATIONS}.
-     */
-    public void setLocations(final List<String> locations) {
-        this.locations = locations;
-    }
-
-}


[14/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/Task.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/Task.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/Task.java
deleted file mode 100644
index 208316e..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/Task.java
+++ /dev/null
@@ -1,394 +0,0 @@
-/*
- *  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.task;
-
-import org.apache.isis.applib.profiles.Localization;
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facets.object.bounded.BoundedFacetUtils;
-import org.apache.isis.core.metamodel.facets.object.parseable.InvalidEntryException;
-import org.apache.isis.core.metamodel.facets.object.parseable.ParseableFacet;
-import org.apache.isis.core.metamodel.facets.object.parseable.TextEntryParseException;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.progmodel.facets.value.password.PasswordValueFacet;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-/**
- * Represents a task that the user is working through. Is used for both editing
- * objects and setting up parameters for an action method.
- */
-public abstract class Task {
-
-    private static int nextID = 1;
-    private int[] boundaries;
-    private final String description;
-    protected final String[] errors;
-    protected String error;
-    private final String[] entryText;
-    protected final ObjectAdapter[] initialState;
-    private final String name;
-    protected final String[] names;
-    protected final String[] descriptions;
-    protected final boolean[] optional;
-    protected final boolean[] readOnly;
-    protected final int numberOfEntries;
-    private int step;
-    private final String targetId;
-    protected final ObjectSpecification[] fieldSpecifications;
-    protected final int[] noLines;
-    protected final boolean[] wraps;
-    protected final int[] maxLength;
-    protected final int[] typicalLength;
-    protected final int id = nextID++;
-
-    public Task(final Context context, final String name, final String description, final ObjectAdapter target, final int noFields) {
-        this.name = name;
-        this.description = description;
-        targetId = context.mapObject(target);
-
-        initialState = new ObjectAdapter[noFields];
-        names = new String[noFields];
-        descriptions = new String[noFields];
-        optional = new boolean[noFields];
-        readOnly = new boolean[noFields];
-        fieldSpecifications = new ObjectSpecification[noFields];
-
-        numberOfEntries = noFields;
-        entryText = new String[noFields];
-        errors = new String[noFields];
-
-        noLines = new int[noFields];
-        wraps = new boolean[noFields];
-        maxLength = new int[noFields];
-        typicalLength = new int[noFields];
-    }
-
-    public void init(final Context context) {
-        for (int i = 0; i < entryText.length; i++) {
-            final ObjectAdapter obj = initialState[i];
-            if (obj == null) {
-                entryText[i] = "";
-            } else if (obj.getSpecification().getFacet(PasswordValueFacet.class) != null) {
-                final PasswordValueFacet facet = obj.getSpecification().getFacet(PasswordValueFacet.class);
-                entryText[i] = facet.getEditText(obj);
-            } else if (obj.getSpecification().isParseable()) {
-                entryText[i] = obj.titleString();
-            } else if (obj.getSpecification().isNotCollection()) {
-                if (readOnly[i]) {
-                    entryText[i] = (obj).titleString();
-                } else {
-                    entryText[i] = context.mapObject(obj);
-                }
-            } else if (obj.getSpecification().isParentedOrFreeCollection()) {
-                entryText[i] = (obj).titleString();
-            }
-        }
-
-        divyUpWork();
-    }
-
-    public abstract ObjectAdapter completeTask(Context context, Page page);
-
-    private void copyForThisStep(final Object[] source, final Object[] destination) {
-        for (int i = 0; i < noOfEntriesInThisStep(); i++) {
-            destination[i] = source[firstEntryInThisStep() + i];
-        }
-    }
-
-    private void copyForThisStep(final boolean[] source, final boolean[] destination) {
-        for (int i = 0; i < noOfEntriesInThisStep(); i++) {
-            destination[i] = source[firstEntryInThisStep() + i];
-        }
-    }
-
-    private void copyForThisStep(final int[] source, final int[] destination) {
-        for (int i = 0; i < noOfEntriesInThisStep(); i++) {
-            destination[i] = source[firstEntryInThisStep() + i];
-        }
-    }
-
-    public void checkInstances(final Context context, final ObjectAdapter[] objects) {
-    }
-
-    public void debug(final DebugBuilder debug) {
-        debug.indent();
-        debug.appendln("name", name);
-        debug.appendln("number of steps ", numberOfSteps());
-        debug.appendln("current step", step);
-        debug.appendln("target", targetId);
-        debug.appendln("steps (" + (boundaries.length - 1) + ")");
-        debug.indent();
-        for (int i = 0; i < boundaries.length - 1; i++) {
-            debug.appendln("    " + (i + 1) + ". " + boundaries[i] + " - " + (boundaries[i + 1] - 1));
-        }
-        debug.unindent();
-        debug.appendln("fields (" + names.length + ")");
-        debug.indent();
-        for (int i = 0; i < names.length; i++) {
-            final String status = (readOnly[i] ? "R" : "-") + (optional[i] ? "O" : "M") + (errors[i] == null ? "-" : "E");
-            debug.appendln("    " + i + "  " + names[i] + " (" + status + "):  " + fieldSpecifications[i].getFullIdentifier() + " -> " + entryText[i]);
-        }
-        debug.unindent();
-        debug.unindent();
-    }
-
-    private void divyUpWork() {
-        if (numberOfEntries == 0) {
-            boundaries = new int[2];
-        } else {
-            final int[] b = new int[numberOfEntries + 2];
-            int count = 0;
-            b[count++] = 0;
-
-            ObjectSpecification type = fieldSpecifications[0];
-            boolean direct = simpleField(type, 0);
-
-            for (int i = 1; i < numberOfEntries; i++) {
-                type = fieldSpecifications[i];
-                if (true || direct && (simpleField(type, i))) {
-                    continue;
-                }
-                b[count++] = i;
-                direct = simpleField(type, i);
-            }
-            b[count++] = numberOfEntries;
-            boundaries = new int[count];
-            System.arraycopy(b, 0, boundaries, 0, count);
-        }
-    }
-
-    protected boolean simpleField(final ObjectSpecification specification, final int i) {
-        return readOnly[i] || (specification.isNotCollection() && BoundedFacetUtils.isBoundedSet(specification));
-    }
-
-    private int firstEntryInThisStep() {
-        return boundaries[step];
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public String getError() {
-        return error;
-    }
-
-    /**
-     * Returns an array of errors, one for each element in the task.
-     */
-    public String[] getErrors() {
-        final String[] array = new String[noOfEntriesInThisStep()];
-        copyForThisStep(errors, array);
-        return array;
-    }
-
-    public String[] getFieldDescriptions() {
-        final String[] array = new String[noOfEntriesInThisStep()];
-        copyForThisStep(descriptions, array);
-        return array;
-    }
-
-    public String[] getEntryText() {
-        final String[] array = new String[noOfEntriesInThisStep()];
-        copyForThisStep(entryText, array);
-        return array;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public String[] getNames() {
-        final String[] array = new String[noOfEntriesInThisStep()];
-        copyForThisStep(names, array);
-        return array;
-    }
-
-    public ObjectAdapter[][] getOptions(final Context context) {
-        return getOptions(context, firstEntryInThisStep(), noOfEntriesInThisStep());
-    }
-
-    protected ObjectAdapter[][] getOptions(final Context context, final int from, final int len) {
-        return new ObjectAdapter[len][];
-    }
-
-    protected ObjectAdapter[] getEntries(final Context context) {
-        final ObjectAdapter[] entries = new ObjectAdapter[entryText.length];
-        for (int i = 0; i < entries.length; i++) {
-            if (entryText == null || readOnly[i]) {
-                continue;
-            }
-            final ObjectSpecification fieldSpecification = fieldSpecifications[i];
-            if (fieldSpecification.isParseable()) {
-                final ParseableFacet parser = fieldSpecification.getFacet(ParseableFacet.class);
-                try {
-                    Localization localization = IsisContext.getLocalization(); 
-                    entries[i] = parser.parseTextEntry(initialState[i], entryText[i], localization);
-                } catch (final InvalidEntryException e) {
-                    errors[i] = e.getMessage();
-                } catch (final TextEntryParseException e) {
-                    errors[i] = e.getMessage();
-                }
-            } else if (fieldSpecification.isNotCollection() && entryText[i] != null) {
-                if (entryText[i].equals("null")) {
-                    entries[i] = null;
-                } else {
-                    entries[i] = context.getMappedObject(entryText[i]);
-                }
-            }
-        }
-        return entries;
-    }
-
-    public String getId() {
-        return "" + id;
-    }
-
-    public boolean[] getOptional() {
-        final boolean[] array = new boolean[noOfEntriesInThisStep()];
-        copyForThisStep(optional, array);
-        return array;
-    }
-
-    public int[] getNoLines() {
-        final int[] array = new int[noOfEntriesInThisStep()];
-        copyForThisStep(noLines, array);
-        return array;
-    }
-
-    public boolean[] getWraps() {
-        final boolean[] array = new boolean[noOfEntriesInThisStep()];
-        copyForThisStep(wraps, array);
-        return array;
-    }
-
-    public int[] getMaxLength() {
-        final int[] array = new int[noOfEntriesInThisStep()];
-        copyForThisStep(maxLength, array);
-        return array;
-    }
-
-    public int[] getTypicalLength() {
-        final int[] array = new int[noOfEntriesInThisStep()];
-        copyForThisStep(typicalLength, array);
-        return array;
-    }
-
-    public boolean[] getReadOnly() {
-        final boolean[] array = new boolean[noOfEntriesInThisStep()];
-        copyForThisStep(readOnly, array);
-        return array;
-    }
-
-    public int getStep() {
-        return step;
-    }
-
-    public ObjectAdapter getTarget(final Context context) {
-        return context.getMappedObject(targetId);
-    }
-
-    public String[] getTrail() {
-        final String[] trail = new String[boundaries.length - 1];
-        for (int i = 0; i < trail.length; i++) {
-            trail[i] = "step " + i;
-        }
-        return trail;
-    }
-
-    public ObjectSpecification[] getTypes() {
-        final ObjectSpecification[] array = new ObjectSpecification[noOfEntriesInThisStep()];
-        copyForThisStep(fieldSpecifications, array);
-        return array;
-    }
-
-    public boolean isEditing() {
-        return false;
-    }
-
-    public void nextStep() {
-        step++;
-    }
-
-    private int noOfEntriesInThisStep() {
-        return boundaries[step + 1] - boundaries[step];
-    }
-
-    public int numberOfSteps() {
-        return boundaries.length - 1;
-    }
-
-    public void previousStep() {
-        step--;
-    }
-
-    public void setFromFields(final Request request, final Context context) {
-        int fldNo = 0;
-        for (int i = boundaries[step]; i < boundaries[step + 1]; i++) {
-            String textEntry = request.getFieldEntry(fldNo++);
-            if (readOnly[i]) {
-                continue;
-            }
-            final ObjectSpecification spec = fieldSpecifications[i];
-            // deal with check boxes specially: expect 'true' if checked and no
-            // entry if not checked, hence
-            // need to set as 'false'
-            if (spec.isOfType(IsisContext.getSpecificationLoader().loadSpecification(boolean.class)) || spec.isOfType(IsisContext.getSpecificationLoader().loadSpecification(Boolean.class))) {
-                if (textEntry == null || !textEntry.equals("true")) {
-                    textEntry = "false";
-                }
-            }
-            entryText[i] = textEntry;
-            try {
-                errors[i] = null;
-                setFromField(context, i, spec, textEntry);
-                if (!optional[i] && (textEntry == null || textEntry.equals(""))) {
-                    errors[i] = "Field required";
-                }
-            } catch (final InvalidEntryException e) {
-                errors[i] = e.getMessage();
-            } catch (final TextEntryParseException e) {
-                errors[i] = e.getMessage();
-            }
-        }
-    }
-
-    private void setFromField(final Context context, final int i, final ObjectSpecification spec, final String textEntry) {
-        if (spec.isParseable()) {
-            if (textEntry == null) {
-                return;
-            }
-            // REVIEW this block uses the existing adapter as it contains the
-            // regex needed. This needs to
-            // be reviewed in line with Dan's proposed changes to the reflector.
-            final ObjectAdapter valueAdapter = initialState[i];
-            final ParseableFacet parser = spec.getFacet(ParseableFacet.class);
-            Localization localization = IsisContext.getLocalization(); 
-            parser.parseTextEntry(valueAdapter, textEntry, localization);
-            // REVIEW what do we do when an exception is thrown - a parse fails?
-        }
-    }
-
-    public abstract void checkForValidity(Context context);
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskLookupException.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskLookupException.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskLookupException.java
deleted file mode 100644
index 206bf7d..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskLookupException.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *  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.task;
-
-import org.apache.isis.viewer.html.action.ActionException;
-
-public class TaskLookupException extends ActionException {
-    private static final long serialVersionUID = 1L;
-
-    public TaskLookupException() {
-    }
-
-    public TaskLookupException(final String msg, final Throwable cause) {
-        super(msg, cause);
-    }
-
-    public TaskLookupException(final String msg) {
-        super(msg);
-    }
-
-    public TaskLookupException(final Throwable cause) {
-        super(cause);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskStep.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskStep.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskStep.java
deleted file mode 100644
index 230eace..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskStep.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- *  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.task;
-
-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.isis.core.progmodel.facets.value.booleans.BooleanValueFacet;
-import org.apache.isis.viewer.html.action.Action;
-import org.apache.isis.viewer.html.action.ActionException;
-import org.apache.isis.viewer.html.component.Component;
-import org.apache.isis.viewer.html.component.Form;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.component.ViewPane;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public final class TaskStep implements Action {
-    private void addSelector(final Context context, final Form form, final String currentEntry, final String fieldId, final String fieldLabel, final String fieldDescription, final boolean required, final String errorMessage, final Task task, final ObjectAdapter[] objects) {
-        task.checkInstances(context, objects);
-
-        int size = 0;
-        for (final ObjectAdapter object : objects) {
-            if (object != null) {
-                size++;
-            }
-        }
-
-        final String[] instances = new String[size];
-        final String[] ids = new String[size];
-        int selectedIndex = -1;
-
-        for (int i = 0, j = 0; i < objects.length; i++) {
-            final ObjectAdapter element = objects[i];
-            if (element != null) {
-                instances[j] = element.titleString();
-                ids[j] = context.mapObject(element);
-                if (ids[j].equals(currentEntry)) {
-                    selectedIndex = i;
-                }
-                j++;
-            }
-        }
-        form.addLookup(fieldLabel, fieldDescription, fieldId, selectedIndex, instances, ids, required, errorMessage);
-    }
-
-    private void addSelectorForKnownReferences(final Context context, final Form form, final ObjectSpecification type, final String currentEntry, final String fieldId, final String fieldLabel, final String fieldDescription, final boolean required, final String errorMessage, final Task task) {
-
-        final ObjectAdapter[] objects = context.getKnownInstances(type);
-        addSelector(context, form, currentEntry, fieldId, fieldLabel, fieldDescription, required, errorMessage, task, objects);
-    }
-
-    private void addSelectorForObjectOptions(final Context context, final Form form, final String currentEntry, final String fieldId, final String fieldLabel, final String fieldDescription, final ObjectAdapter[] options, final boolean required, final String errorMessage, final Task task) {
-        final ObjectAdapter[] objects = new ObjectAdapter[options.length];
-        for (int i = 0; i < options.length; i++) {
-            objects[i] = options[i];
-        }
-        addSelector(context, form, currentEntry, fieldId, fieldLabel, fieldDescription, required, errorMessage, task, objects);
-    }
-
-    private void addSelectorForValueOptions(final Form form, final String currentEntry, final String fieldId, final String fieldLabel, final String fieldDescription, final ObjectAdapter[] options, final boolean required, final String errorMessage, final Task task) {
-        int selectedIndex = -1;
-        final String[] instances = new String[options.length];
-        for (int i = 0; i < options.length; i++) {
-            instances[i] = options[i].titleString();
-            if (currentEntry.equals(instances[i])) {
-                selectedIndex = i;
-            }
-        }
-        form.addLookup(fieldLabel, fieldDescription, fieldId, selectedIndex, instances, instances, required, errorMessage);
-    }
-
-    private void addTextFieldForParseable(final Form form, final ObjectSpecification type, final String currentEntryText, final String fieldId, final String fieldLabel, final String fieldDescription, final int noLines, final boolean wrap, final int maxLength, final int typicalLength,
-            final boolean required, final String errorMessage) {
-        form.addField(type, fieldLabel, fieldDescription, fieldId, currentEntryText, noLines, wrap, maxLength, typicalLength, required, errorMessage);
-    }
-
-    private void displayTask(final Context context, final Page page, final Task task) {
-        page.setTitle(task.getName());
-
-        final ViewPane content = page.getViewPane();
-        final ObjectAdapter targetAdapter = task.getTarget(context);
-        String titleString = targetAdapter.titleString();
-        if (targetAdapter.isTransient()) {
-            titleString += " (Unsaved)";
-        }
-        content.setTitle(titleString, targetAdapter.getSpecification().getDescription());
-        String iconName = targetAdapter.getIconName();
-        if (iconName == null) {
-            iconName = targetAdapter.getSpecification().getShortIdentifier();
-        }
-        content.setIconName(iconName);
-
-        final StringBuffer crumbs = new StringBuffer();
-        final String[] trail = task.getTrail();
-        for (final String element : trail) {
-            crumbs.append(" : ");
-            crumbs.append(element);
-        }
-
-        final Component[] action = new Component[1];
-        action[0] = context.getComponentFactory().createInlineBlock("name", task.getName(), task.getDescription());
-        content.setMenu(action);
-
-        if (task.getError() != null) {
-            content.add(context.getComponentFactory().createInlineBlock("error", task.getError(), null));
-        }
-
-        final Form form = context.getComponentFactory().createForm(task.getId(), name(), task.getStep(), task.numberOfSteps(), task.isEditing());
-        final String[] parameterLabels = task.getNames();
-        final String[] parameterDescriptions = task.getFieldDescriptions();
-        final String[] errors = task.getErrors();
-        final String[] entryText = task.getEntryText();
-        final int[] noLines = task.getNoLines();
-        final boolean[] canWrap = task.getWraps();
-        final int[] maxLength = task.getMaxLength();
-        final int[] typicalLength = task.getTypicalLength();
-        final ObjectAdapter[][] options = task.getOptions(context);
-        final boolean[] optional = task.getOptional();
-        final boolean[] readOnly = task.getReadOnly();
-        final ObjectSpecification[] types = task.getTypes();
-        for (int i = 0; i < parameterLabels.length; i++) {
-            final ObjectSpecification paramSpec = types[i];
-            final String fieldId = "fld" + i;
-            final String fieldLabel = parameterLabels[i] == null ? "" : parameterLabels[i];
-            ;
-            final String fieldDescription = parameterDescriptions[i] == null ? "" : parameterDescriptions[i];
-            final String currentEntryTitle = entryText[i];
-            final String error = errors[i];
-            if (readOnly[i]) {
-                addReadOnlyField(form, paramSpec, fieldLabel, fieldDescription, currentEntryTitle);
-            } else if (paramSpec.isParseable() && options[i] != null && options[i].length > 0) {
-                addSelectorForValueOptions(form, currentEntryTitle, fieldId, fieldLabel, fieldDescription, options[i], !optional[i], error, task);
-            } else if (paramSpec.isParseable()) {
-                addTextFieldForParseable(form, paramSpec, currentEntryTitle, fieldId, fieldLabel, fieldDescription, noLines[i], canWrap[i], maxLength[i], typicalLength[i], !optional[i], error);
-            } else if (paramSpec.isNotCollection() && options[i] != null && options[i].length > 0) {
-                addSelectorForObjectOptions(context, form, currentEntryTitle, fieldId, fieldLabel, fieldDescription, options[i], !optional[i], error, task);
-            } else if (paramSpec.isNotCollection()) {
-                addSelectorForKnownReferences(context, form, paramSpec, currentEntryTitle, fieldId, fieldLabel, fieldDescription, !optional[i], error, task);
-            } else {
-                throw new IsisException();
-            }
-        }
-        content.add(form);
-    }
-
-    private void addReadOnlyField(final Form form, final ObjectSpecification paramSpec, final String fieldLabel, final String fieldDescription, final String currentEntryTitle) {
-        if (paramSpec.containsFacet(BooleanValueFacet.class)) {
-            final boolean isSet = Boolean.parseBoolean(currentEntryTitle);
-            form.addReadOnlyCheckbox(fieldLabel, isSet, fieldDescription);
-        } else {
-            form.addReadOnlyField(fieldLabel, currentEntryTitle, fieldDescription);
-        }
-    }
-
-    @Override
-    public void execute(final Request request, final Context context, final Page page) {
-        final String taskId = request.getTaskId();
-        final Task task = context.getTask(taskId);
-        final String button = request.getButtonName();
-        if (task == null && !"Cancel".equals(button)) {
-            throw new TaskLookupException("No task found with id " + taskId);
-        }
-
-        if (button == null) {
-            // start new task
-            displayTask(context, page, task);
-        } else if ("Cancel".equals(button)) {
-            forwardCancel(request, context, task);
-        } else if ("Previous".equals(button)) {
-            task.setFromFields(request, context);
-            task.previousStep();
-            displayTask(context, page, task);
-        } else if ("Next".equals(button)) {
-            task.setFromFields(request, context);
-            task.nextStep();
-            displayTask(context, page, task);
-        } else if ("Finish".equals(button) || "Save".equals(button) || "Ok".equals(button)) {
-            task.setFromFields(request, context);
-            task.checkForValidity(context);
-
-            if (hasErrors(task)) {
-                displayTask(context, page, task);
-            } else {
-                final String targetId = context.mapObject(task.getTarget(context));
-                final ObjectAdapter result = task.completeTask(context, page);
-                if (result instanceof ObjectAdapter) {
-                    final ObjectAdapter object = result;
-                    context.updateVersion(object);
-                }
-                InvokeMethod.displayMethodResult(request, context, page, result, targetId);
-                context.endTask(task);
-            }
-        } else {
-            throw new ActionException("No task action: " + button);
-        }
-    }
-
-    private void forwardCancel(final Request request, final Context context, final Task task) {
-        final Request cancelTask = context.cancelTask(task);
-        request.forward(cancelTask);
-    }
-
-    private boolean hasErrors(final Task task) {
-        if (task.getError() != null) {
-            return true;
-        }
-        final String[] errors = task.getErrors();
-        for (final String error : errors) {
-            if (error != null) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public String name() {
-        return Request.TASK_COMMAND;
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/arrow.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/arrow.gif b/component/viewer/html/impl/src/main/resources/default-images/arrow.gif
deleted file mode 100644
index c6b4db2..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/arrow.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/bg-button.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/bg-button.gif b/component/viewer/html/impl/src/main/resources/default-images/bg-button.gif
deleted file mode 100644
index ee08c8b..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/bg-button.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/branch.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/branch.gif b/component/viewer/html/impl/src/main/resources/default-images/branch.gif
deleted file mode 100644
index 99a2904..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/branch.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/breadcrumbs-bg.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/breadcrumbs-bg.gif b/component/viewer/html/impl/src/main/resources/default-images/breadcrumbs-bg.gif
deleted file mode 100644
index bab1f44..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/breadcrumbs-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/button-bg1.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/button-bg1.gif b/component/viewer/html/impl/src/main/resources/default-images/button-bg1.gif
deleted file mode 100644
index ab37093..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/button-bg1.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/button-bg2.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/button-bg2.gif b/component/viewer/html/impl/src/main/resources/default-images/button-bg2.gif
deleted file mode 100644
index 288fc8f..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/button-bg2.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/help.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/help.gif b/component/viewer/html/impl/src/main/resources/default-images/help.gif
deleted file mode 100644
index 6a151a0..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/help.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/logo-bg.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/logo-bg.gif b/component/viewer/html/impl/src/main/resources/default-images/logo-bg.gif
deleted file mode 100644
index 525bfca..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/logo-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/logo-bg2.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/logo-bg2.gif b/component/viewer/html/impl/src/main/resources/default-images/logo-bg2.gif
deleted file mode 100644
index bfb0f3a..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/logo-bg2.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/menu-bg.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/menu-bg.gif b/component/viewer/html/impl/src/main/resources/default-images/menu-bg.gif
deleted file mode 100644
index 021f996..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/menu-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/menu-bg2.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/menu-bg2.gif b/component/viewer/html/impl/src/main/resources/default-images/menu-bg2.gif
deleted file mode 100644
index e6a42cf..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/menu-bg2.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/object-header-bg.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/object-header-bg.gif b/component/viewer/html/impl/src/main/resources/default-images/object-header-bg.gif
deleted file mode 100644
index 4cf32b9..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/object-header-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/page-header-bg.jpg
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/page-header-bg.jpg b/component/viewer/html/impl/src/main/resources/default-images/page-header-bg.jpg
deleted file mode 100644
index 6e044ed..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/page-header-bg.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/page-header-bg1.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/page-header-bg1.gif b/component/viewer/html/impl/src/main/resources/default-images/page-header-bg1.gif
deleted file mode 100644
index 252075a..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/page-header-bg1.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/page-header-bg2.jpg
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/page-header-bg2.jpg b/component/viewer/html/impl/src/main/resources/default-images/page-header-bg2.jpg
deleted file mode 100644
index 4d041ca..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/page-header-bg2.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/poweredby-logo.png
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/poweredby-logo.png b/component/viewer/html/impl/src/main/resources/default-images/poweredby-logo.png
deleted file mode 100644
index c9f66ac..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/poweredby-logo.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/shadow-bottom.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/shadow-bottom.gif b/component/viewer/html/impl/src/main/resources/default-images/shadow-bottom.gif
deleted file mode 100644
index 16c1c99..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/shadow-bottom.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/sign-info.png
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/sign-info.png b/component/viewer/html/impl/src/main/resources/default-images/sign-info.png
deleted file mode 100644
index 5b8e845..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/sign-info.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/sign-warning.png
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/sign-warning.png b/component/viewer/html/impl/src/main/resources/default-images/sign-warning.png
deleted file mode 100644
index 78e238d..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/sign-warning.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/site-header-bg.jpg
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/site-header-bg.jpg b/component/viewer/html/impl/src/main/resources/default-images/site-header-bg.jpg
deleted file mode 100644
index 39a1c8c..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/site-header-bg.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/submenu-bullet.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/submenu-bullet.gif b/component/viewer/html/impl/src/main/resources/default-images/submenu-bullet.gif
deleted file mode 100644
index 27f305a..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/submenu-bullet.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/tab-bar-bg.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/tab-bar-bg.gif b/component/viewer/html/impl/src/main/resources/default-images/tab-bar-bg.gif
deleted file mode 100644
index 09130d5..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/tab-bar-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/tab-off-bg.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/tab-off-bg.gif b/component/viewer/html/impl/src/main/resources/default-images/tab-off-bg.gif
deleted file mode 100644
index 9305e13..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/tab-off-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default-images/tab-on-bg.gif
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default-images/tab-on-bg.gif b/component/viewer/html/impl/src/main/resources/default-images/tab-on-bg.gif
deleted file mode 100644
index 976c31a..0000000
Binary files a/component/viewer/html/impl/src/main/resources/default-images/tab-on-bg.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/default.css
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/default.css b/component/viewer/html/impl/src/main/resources/default.css
deleted file mode 100644
index 9956ce9..0000000
--- a/component/viewer/html/impl/src/main/resources/default.css
+++ /dev/null
@@ -1,939 +0,0 @@
-/*
- *  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.
- */
-/* Start Global styles */
-
-body {
-  background: #101254;
-  text-align: center;
-}
-#wrapper {
-  width: 980px;
-  min-height: 800px;
-  border:3px solid #7F81C0;
-  margin:8px auto;
-  text-align: left;
-  background: white;
-}
-
-.header-icon > img {
-	max-width: 40px;
-	height: 40px;
-}
-	
-BODY {
-	font-family: Arial, Sans-Serif;
-	margin: 0 0 10px 0;
-	color: black;
-
-/*
-	background: url(default-images/poweredby-logo.png);
-	background-repeat: no-repeat;
-	background-position: 95% 95%;
-*/
-}
-
-IMG {
-	border: 0;
-}
-
-A {
-	text-decoration: none;
-}
-
-A:hover {
-	text-decoration: underline;
-}
-
-/* End Global styles */ /* Start Heading */ 
-
-div#site-header:after {
-	bottom: 0px;
-	display: block;
-	text-align: right;
-	float:right;
-	bottom: 0;
-	font-size: 70%;
-	color: gray;
-}
-
-div#site-header {
-	background: url(images/banner-bg.png); 
-	background-repeat: repeat-x white-space :   nowrap;
-	list-style: none;
-	margin: 0px;
-	height: 100px;
-}
-
-div#site-logo {
-	background: url(images/banner.png);
-	background-repeat: no-repeat;
-	background-position: left;
-	position: absolute;
-	width: 980px;
-	height: 100px;
-	margin: 0 auto;
-}
-
-div#page-header {
-	display: none;
-}
-
-/* END Heading */
-DIV#body {
-	display: block;
-	padding-bottom: 10px;
-}
-
-div#navigation {
-	margin: 0;
-	padding: 0px;
-}
-
-/* Start options*/
-DIV.options {
-	background-color: #eeeeee;
-	margin: 0;
-	padding: 4px 0px 4px 5px;
-	min-height: 20px;
-	align: right;
-	float:right;
-}
-
-
-DIV.options H4 {
-	display: none;
-}
-
-DIV.options DIV.item {
-	display: inline;
-	border-right: 1px solid #000000;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #00000;
-	font-size: 70%;
-	margin: 0 6px 0 6px;
-	padding 0 0 0 0;
-	min-width: 200px;
-}
-
-DIV.options DIV.item IMG {
-	display: none;
-}
-
-DIV.options DIV.item a:link {
-	color: #000000;
-	text-decoration: none;
-	margin: 0 5px 0 0px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.options DIV.item a:hover {
-	background-color: #dddddd;
-	margin: 0 5px 0 0px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.options DIV.item a:visited {
-	color: #000000;
-	text-decoration: none;
-	margin: 0 5px 0 0px;
-	padding: 0 2px 0 0px;
-}
-
-/* End options */ 
-
-/* Start services */
-DIV.services {
-	background-color: #7F81C0;
-	margin: 0;
-	padding: 4px 20px 4px 5px;
-	min-height: 20px;
-
-}
-
-DIV.services H4 {
-	display: none;
-}
-
-DIV.services DIV.item {
-	display: inline;
-	border-right: 1px solid #ffffff;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #ffffff;
-	font-size: 70%;
-	margin: 3px;
-}
-
-DIV.services DIV.item IMG {
-	display: none;
-}
-
-DIV.services DIV.item a:link {
-	color: #ffffff;
-	text-decoration: none;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item a:hover {
-	background-color: #2683E2;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item a:visited {
-	color: #ffffff;
-	text-decoration: none;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item-selected {
-	background-color: #2683E2;
-	display: inline;
-	border-right: 1px solid #ffffff;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #ffffff;
-	font-size: 70%;
-}
-
-DIV.services DIV.item-selected a:link {
-	color: #ffffff;
-	text-decoration: none;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item-selected a:hover {
-	background-color: #556677;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item-selected a:visited {
-	color: #ffffff;
-	text-decoration: none;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-/* End services */ /* Start History */
-DIV.history {
-	background-color: #D6D6D6;
-	margin: 0;
-	padding: 1px 30px 0 5px;
-	min-height: 26px;
-}
-
-DIV.history H4 {
-	display: none;
-}
-
-DIV.history DIV.item {
-	display: inline;
-	border-right: 1px solid #ffffff;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #29357D;
-	font-size: 70%;
-}
-
-DIV.history DIV.item IMG {
-	position: relative;
-	top: 4px;
-	height: 16px;
-	padding: 0 5px 0 0px;
-}
-
-DIV.history DIV.item a:link {
-	color: #29357D;
-	text-decoration: none;
-	margin: 5px;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item a:hover {
-	background-color: #B7B6B6;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item a:visited {
-	color: #29357D;
-	text-decoration: none;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item-selected {
-	background-color: #2683E2;
-	display: inline;
-	border-right: 1px solid #ffffff;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #29357D;
-	font-size: 70%;
-	height: 30px;
-}
-
-DIV.history DIV.item-selected a:hover {
-	background-color: #556677;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item-selected a:link {
-	color: #29357D;
-	text-decoration: none;
-	margin: 10px;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item-selected a:visited {
-	color: #29357D;
-	text-decoration: none;
-	padding: 1px 3px 1px 3px;
-}
-
-/* INVISIBLE character for empty item. FIREFOX ONLY*/
-DIV.history:after {
-	content: "X";
-	display: inline;
-	text-align: right;
-	font-size: 70%;
-	color: #D6D6D6;
-}
-
-/* End History */ /* Start Context */
-div#context {
-	background-color: #F0F0F0;
-	margin: 0;
-	padding: 1px 30px 0 7px;
-	min-height: 26px;
-}
-
-div#context span.disabled {
-	display: inline;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #666666;
-	font-size: 70%;
-	padding: 0px 5px 0px 7px;
-	white-space: nowrap;
-}
-
-div#context span.disabled IMG {
-	display: none
-}
-
-div#context span.disabled a:link {
-	color: #29357D;
-	text-decoration: none;
-	margin: 5px;
-	padding: 1px 3px 1px 3px;
-}
-
-div#context span.disabled a:hover {
-	background-color: #B7B6B6;
-	padding: 1px 3px 1px 3px;
-}
-
-div#context span.disabled a:visited {
-	color: #29357D;
-	text-decoration: none;
-	padding: 1px 3px 1px 3px;
-}
-
-div#context a.linked {
-	display: inline;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #29357D;
-	font-size: 70%;
-	padding: 0px 5px 0px 7px;
-}
-
-div#context a.linked IMG {
-	display: none
-}
-
-div#context a.linked a:link {
-	color: #29357D;
-	text-decoration: none;
-	margin: 5px;
-	padding: 1px 3px 1px 3px;
-}
-
-div#context a.linked  a:hover {
-	background-color: #29357D;
-	padding: 1px 3px 1px 3px;
-	text-decoration: underline;
-}
-
-div#context a.linked  a:visited {
-	color: #29357D;
-	text-decoration: none;
-	padding: 1px 3px 1px 3px;
-}
-
-/* INVISIBLE character for empty breadcrumbs. FIREFOX ONLY*/
-span.disabled:after {
-	content: "X";
-	display: inline;
-	text-align: right;
-	font-size: 70%;
-	color: #F0F0F0;
-}
-
-/* End Context */ /*
-div#help-bar {
-	position: relative;
-	right: 50px;
-	top: 10px;
-	text-align: right; 
-	font-family : arial, 'sans serif'; 
-	font-weight : normal;  
-	color: #0000FF; 
-	font-size : 90%; 
-	line-height : 110%;
-	text-decoration: underline;
-	height: 22px;
-}
-*/
-DIV#body DIV#view {
-	position: relative;
-	top: 0px;
-	left: 0px;
-	margin: 0px;
-}
-
-/* Start of Message Header */
-DIV.message-header {
-	position: relative;
-	top: 40px;
-	padding: 5px 25px 5px 25px;
-	margin: 0 50px 0 255px;
-	vertical-align: middle;
-	COLOR: #003366;
-	FONT-WEIGHT: bold;
-	FONT-SIZE: 80%;
-	LEFT: auto;
-	FONT-STYLE: normal;
-	FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
-	width: 40%;
-}
-
-DIV.message-header DIV.warning {
-	COLOR: #ff0033;
-	padding: 5px 25px 5px 25px;
-	background: url(default-images/sign-warning.png);
-	background-repeat: no-repeat;
-	background-color: #D6D6D6;
-	background-position: 5px 5px;
-}
-
-DIV.message-header DIV.message {
-	COLOR: #003366;
-	padding: 5px 25px 5px 25px;
-	background: url(default-images/sign-info.png);
-	background-repeat: no-repeat;
-	background-color: #D6D6D6;
-	background-position: 5px 5px;
-}
-
-DIV.message-header DIV.message {
-	FONT-WEIGHT: normal;
-}
-
-/* End of Message Header */ /* Start of Object Header */
-DIV.header {
-	position: relative;
-	top: 40px;
-	display: block;
-	background-color: #F0F0F0;
-	min-height: 48px;
-	margin: 0 50px 0 280px;
-
-}
-
-SPAN.header-icon IMG {
-	float: left;
-}
-
-SPAN.header-text {
-	float: left;
-	position: relative;
-	top: 10px;
-	margin-left: 7px;
-	FONT-WEIGHT: bold;
-	FONT-SIZE: 16px;
-	LEFT: auto;
-	COLOR: #003366;
-	FONT-STYLE: normal;
-	FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
-}
-
-/* End of Object Header */ /* Start of Object Contents */
-DIV#content {
-	position: relative;
-	display: block;
-	top: 40px;
-	margin: 0 50px 10px 280px;
-}
-
-/* Start of Object Fields */
-DIV.field {
-	margin: 0;
-	padding: 5px 0px 5px 0px;
-	border-top: 1px solid #666666;
-	min-height: 20px;
-}
-
-DIV.field SPAN.value IMG,DIV.field DIV.value IMG {
-	position: relative;
-	top: 3px;
-	margin: 0px 5px 0 0;
-	height: 16px;
-}
-
-DIV.field SPAN.value A,DIV.field DIV.value A {
-	position: relative;
-	top: -2px;
-	margin: 0px 5px 0 0;
-	height: 16px;
-}
-
-DIV.field DIV.icon IMG {
-	position: relative;
-	top: 0px;
-	margin: 0px 5px 0 0;
-	height: 16px;
-}
-
-.label,.value {
-	font-size: 80%;
-	color: #333399;
-}
-
-DIV.field DIV.icon {
-	display: inline;
-	color: #333399;
-	position: absolute;
-	left: 200px;
-}
-
-DIV.field span.label,DIV.field DIV.label {
-	width: 170px;
-	display: block;
-	/*content: ":";*/
-	margin: 0 0 -18px 7px;
-}
-
-DIV.field span.separator {
-	display: inline;
-	position: relative;
-	margin: 0 0 -15px 180px;
-	vertical-align: top;
-}
-
-DIV.field span.value, DIV.field DIV.value, DIV.field INPUT.value, DIV.field SELECT.value
-	{
-	top: -2px;
-	position: relative;
-	margin: 0px 10px -5px 0px;
-	display: inline;
-}
-
-DIV.field span.value PRE {
-	color: #333399;
-	margin: 0;
-	font-family: inherit;
-}
-
-
-DIV.field textarea.value {
-	font-family: inherit;
-}
-
-
-DIV.field span.optional {
-	margin: -35px 0 0 0;
-	font-size: 70%;
-	color: grey;
-}
-
-DIV.field span.required {
-	display: inline;
-	position: relative;
-	margin: 0;
-	vertical-align: top;
-	color: red;
-}
-
-DIV.field span.error {
-	display: inline;
-	position: relative;
-	color: red;
-	font-size: 70%;
-}
-
-/* INVISIBLE character for empty value FIREFOX ONLY*/
-DIV.field span.value:after {
-	content: "X";
-	display: inline;
-	text-align: right;
-	font-size: 70%;
-	color: white;
-}
-
-/* INVISIBLE character for empty value FIREFOX ONLY*/
-DIV.field span.label:after {
-	content: "X";
-	display: inline;
-	text-align: right;
-	font-size: 70%;
-	color: white;
-}
-
-/* End of Object Fields */ /* Start of Object Table */
-DIV#content TABLE {
-	position: relative;
-	float: left;
-	width: 100%;
-	border: 0;
-	margin: 0 0 10px 0;
-	border-collapse: collapse;
-}
-
-DIV#content TH {
-	padding: 6px;
-	border: 1px solid #ffffff;
-	background-color: #D6D6D6;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: black;
-	font-size: 70%;
-}
-
-DIV#content TD {
-	background-color: #ffffff;
-	border-right: 0;
-	border-left: 0;
-	border-bottom: 1px solid black;
-	padding: 6px;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	font-size: 80%;
-	color: #333399;
-	margin: 0;
-	text-align: left;
-}
-
-DIV#content TD.rowstart {
-	background-color: #F0F0F0;
-}
-
-DIV#content TD A:visited {
-	color: #0000FF;
-}
-
-DIV#content H4 {
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #000000;
-	font-size: 70%;
-	border-top: 1px solid black;
-	margin: -2px 0 0 0px;
-	padding: 5px;
-}
-
-TD DIV.icon {
-	font-size: 100%;
-	margin-top: 5px;
-}
-
-TD DIV.icon IMG {
-	float: left;
-	margin: -1px 5px 5px 0px;
-	height: 16px;
-}
-
-TD DIV.action-button {
-	background-color: #ffffff;
-	font-size: 130%;
-	text-decoration: none;
-}
-
-/* End of Object Table */
-INPUT.action-button,DIV.action-button {
-	background-color: #F0F0F0;
-	padding: 10px;
-	display: block;
-	margin: 0;
-	min-height: 20px;
-}
-
-INPUT.action-button,DIV.action-button A {
-	background: url(default-images/bg-button.gif);
-	background-repeat: repeat-x;
-	padding: 2px;
-	margin: 5px;
-	border: 1px solid #333399;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #000000;
-	font-size: 70%;
-	font-weight: normal;
-	text-align: center;
-}
-
-DIV.action-button a:link {
-	color: #000000;
-}
-
-DIV.action-button a:visited {
-	color: #000000;
-}
-
-DIV.action-button a:hover {
-	color: #000000;
-	text-decoration: none;
-}
-
-INPUT.action-button,DIV.action-button INPUT {
-	float: left;
-}
-
-/* End of Object Contents */ /* Start of Object Actions Menu */
-DIV#body DIV#view DIV#menu {
-	position: relative;
-	top: 40px;
-	left: 0;
-	background-color: #ffffff;
-	border-top: 1px solid #00336F;
-	margin: 0px;
-	width: 210px;
-	display: block;
-	float: left;
-}
-
-DIV#body DIV#menu H3 {
-	display: none;
-}
-
-DIV#menu SPAN.name {
-	display: block;
-	font-size: 80%;
-	background-color: #ffffff;
-	color: #333399;
-	line-height: 100%;
-	margin: 0 0 0 10px;
-}
-
-DIV.menu-item  a:link {
-	color: #333399;
-}
-
-DIV.menu-item  a:visited {
-	color: #333399;
-}
-
-DIV.submenu-item {
-	font-size: 80%;
-	background-color: #ffffff;
-	color: #1A59A7;
-	margin: 0px;
-	padding: 5px 0px 5px 10px;
-	border-bottom: 1px solid #00336F;
-	line-height: 100%;
-}
-
-DIV.submenu-item DIV.menu-item {
-	background: url(default-images/submenu-bullet.gif);
-	background-repeat: no-repeat;
-	background-position: left;
-	background-color: #ffffff;
-	margin: 0px;
-	line-height: 100%;
-	border: 0;
-	padding: 4px 5px 0px 10px;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #1A59A7;
-	font-size: 85%;
-}
-
-DIV.menu-item {
-	background-color: #ffffff;
-	margin: 0px;
-	line-height: 110%;
-	border-bottom: 1px solid #00336F;
-	padding: 5px 5px 5px 10px;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #1A59A7;
-	font-size: 80%;
-}
-
-DIV.menu-item DIV.disabled {
-	color: #a0a0a0;
-}
-
-DIV.menu-item a:link {
-	color: #1A59A7;
-}
-
-DIV.menu-item a:visited {
-	color: #1A59A7;
-}
-
-DIV.menu-item a:hover {
-	color: #006666;
-	text-decoration: underline;
-}
-
-DIV.submenu-item DIV.menu-item a:link {
-	color: #1A59A7;
-}
-
-DIV.submenu-item DIV.menu-item a:visited {
-	color: #1A59A7;
-}
-
-DIV.submenu-item DIV.menu-item a:hover {
-	color: #006666;
-	text-decoration: underline;
-}
-
-/* End of Object Menu */
-DIV.page-footer {
-	position: absolute;
-	right: 10px;
-	bottom: 10px;
-	font-size: 50%;
-	color: #333399;
-}
-
-H1 {
-	font-size: 140%;
-	margin-top: -8px;
-}
-
-H2 {
-	font-size: 90%;
-	color: #333399;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 0;
-}
-
-H3 {
-	font-size: 80%;
-	color: #ffffff;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 15px 10px 5px 10px;
-}
-
-H4 {
-	font-size: 80%;
-	color: #333399;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 10px 10px 0px 10px;
-}
-
-DIV.text {
-	font-size: 100%;
-	color: #336699;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 10px 10px 0px 10px;
-}
-
-DIV.error {
-	font-size: 120%;
-	color: #cc0000;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 10px 10px 0px 10px;
-}
-
-PRE.error-trace {
-	font-size: 80%;
-	color: #cc0000;
-	margin: 10px 10px 0px 10px;
-}
-
-DIV#debug { /*	float: left;*/
-	background-color: #F0F0F0;
-	margin: 30px;
-	padding: 1px 10px 0 7px;
-	min-height: 22px;
-	border: 1px;
-}
-
-DIV#debug H4 {
-	display: inline;
-	font-size: 80%;
-	color: #999;
-	margin: 0 5px 0 10px;
-}
-
-DIV#debug DIV.detail {
-	display: inline;
-	font-size: 80%;
-	color: #999;
-	margin: 0 5px 0 10px;
-}
-
-DIV#page-footer {
-	display: none;
-}
-
-SPAN.message {
-	position: relative;
-	top: 30px;
-	font-size: 100%;
-	color: #336699;
-	margin: 40px 0 0 0;
-	padding: 10px;
-}
-/* Think this is now redundant
-DIV.items {
-	position: relative;
-} 
-*/
-
-
-SPAN.about {
-	display: block;
-	padding: 4px;
-}
-
-
-SPAN.user {
-	display: block;
-	padding: 4px;
-}
-
-.nav-link {
-    display: block;
-    padding: 10px;
-    font-size: 75%;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/htmlviewer.js
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/htmlviewer.js b/component/viewer/html/impl/src/main/resources/htmlviewer.js
deleted file mode 100644
index d05e14b..0000000
--- a/component/viewer/html/impl/src/main/resources/htmlviewer.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- *  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.
- */
-$(document).ready(function()
-{
-    $(".message-header").fadeOut(5000)
-});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/images/Default.png
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/images/Default.png b/component/viewer/html/impl/src/main/resources/images/Default.png
deleted file mode 100644
index 8409e46..0000000
Binary files a/component/viewer/html/impl/src/main/resources/images/Default.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/resources/images/banner.png
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/resources/images/banner.png b/component/viewer/html/impl/src/main/resources/images/banner.png
deleted file mode 100644
index adf2159..0000000
Binary files a/component/viewer/html/impl/src/main/resources/images/banner.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/src-archived/MonitorServlet.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/src-archived/MonitorServlet.java b/component/viewer/html/impl/src/main/src-archived/MonitorServlet.java
deleted file mode 100644
index 80e3dec..0000000
--- a/component/viewer/html/impl/src/main/src-archived/MonitorServlet.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- *  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.extensions.htmlviewer.webapp;
-
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.net.URLDecoder;
-import java.util.Date;
-import java.util.Iterator;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.apache.isis.metamodel.authentication.AuthenticationSession;
-import org.apache.isis.extensions.html.servlet.internal.SessionAccess;
-import org.apache.isis.runtime.system.internal.monitor.MonitorListenerImpl;
-
-
-public class MonitorServlet extends HttpServlet {
-    private static final long serialVersionUID = 1L;
-    private MonitorListenerImpl monitor;
-
-    @Override
-    protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException,
-            IOException {
-        final String queryString = request.getQueryString();
-        final String query = queryString == null ? "Overview" : URLDecoder.decode(queryString, "UTF-8");
-        response.setContentType("text/html");
-        final PrintWriter writer = new PrintWriter(new OutputStreamWriter(response.getOutputStream()));
-        if (query.equals("Sessions")) {
-            writer.println("<HTML><HEAD><TITLE>NOF System Monitor - " + "Sessions" + "</TITLE></HEAD>");
-            writer.println("<BODY>");
-
-            writer.println("<h1>" + "Sessions" + "</h1>");
-            writer.println("<pre>");
-            writer.println(listSessions());
-            writer.println("</pre>");
-            writer.println("</BODY></HTML>");
-        } else {
-            monitor.writeHtmlPage(query, writer);
-        }
-        writer.flush();
-    }
-
-    private static String listSessions() {
-        final StringBuffer str = new StringBuffer();
-        final Iterator<?> it = SessionAccess.getSessions().iterator();
-        while (it.hasNext()) {
-            final HttpSession session = (HttpSession) it.next();
-            final String id = session.getId();
-            str.append(id);
-            str.append(" \t");
-
-            final long creationTime = session.getCreationTime();
-            str.append(new Date(creationTime));
-            str.append(" \t");
-
-            final long lastAccessedTime = session.getLastAccessedTime();
-            str.append(new Date(lastAccessedTime));
-            str.append(" \t");
-
-            final AuthenticationSession nofSession = (AuthenticationSession) session.getAttribute("NOF_SESSION_ATTRIBUTE");
-            if (nofSession != null) {
-                str.append(nofSession.getUserName());
-            }
-
-            str.append("\n");
-        }
-        return str.toString();
-    }
-
-    @Override
-    public void init(final ServletConfig servletConfig) throws ServletException {
-        super.init(servletConfig);
-        monitor = new MonitorListenerImpl();
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/src-archived/SessionAccess.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/src-archived/SessionAccess.java b/component/viewer/html/impl/src/main/src-archived/SessionAccess.java
deleted file mode 100644
index 0855677..0000000
--- a/component/viewer/html/impl/src/main/src-archived/SessionAccess.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- *  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.extensions.html.servlet.internal;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-import org.apache.isis.applib.fixtures.LogonFixture;
-import org.apache.isis.metamodel.authentication.AuthenticationSession;
-import org.apache.isis.runtime.authentication.AuthenticationManager;
-import org.apache.isis.runtime.authentication.PasswordAuthenticationRequest;
-import org.apache.isis.runtime.authentication.standard.ExplorationSession;
-import org.apache.isis.runtime.authentication.standard.SimpleSession;
-import org.apache.isis.runtime.context.IsisContext;
-import org.apache.isis.runtime.system.DeploymentType;
-
-
-public class SessionAccess {
-
-    private static final Logger LOG = Logger.getLogger(SessionAccess.class);
-    private static SessionAccess instance;
-
-    // //////////////////////////////////////////////
-    // Singleton factory
-    // //////////////////////////////////////////////
-
-    /**
-     * Create singleton
-     */
-    public static void createInstance(final AuthenticationManager authenticationManager) {
-        new SessionAccess(authenticationManager);
-    }
-
-    /**
-     * Create singleton
-     */
-    public static void createInstance(
-            final AuthenticationManager authenticationManager,
-            final DeploymentType deploymentType,
-            final LogonFixture logonFixture) {
-        new SessionAccess(authenticationManager, deploymentType, logonFixture);
-    }
-
-    // //////////////////////////////////////////////
-    // Sessions
-    // //////////////////////////////////////////////
-
-    // REVIEW part of decoupling systemaccess from servlet code - moved list sessions to monitorservlet
-    public static List<Object> getSessions() {
-        return instance.sessions;
-    }
-
-    // REVIEW part of decoupling systemaccess from servlet code - changed session to object
-    public static void addSession(final Object session) {
-        instance.sessions.add(session);
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("session started " + session);
-        }
-    }
-
-    // REVIEW part of decoupling systemaccess from servlet code - moved logoff part to sessionlist
-    public static void removeSession(final Object session) {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("session ended " + session);
-        }
-        instance.sessions.remove(session);
-    }
-
-    // //////////////////////////////////////////////
-    // Authentication, logoff
-    // //////////////////////////////////////////////
-
-    public static AuthenticationSession authenticate(final PasswordAuthenticationRequest passwordAuthenticationRequest) {
-        return instance.authenticateInstance(passwordAuthenticationRequest);
-    }
-
-    public static void logoffUser(final AuthenticationSession session) {
-        getAuthenticationManager().closeSession(session);
-    }
-
-    private static AuthenticationManager getAuthenticationManager() {
-        if (instance == null) {
-            throw new IllegalStateException("Server initialisation failed, or not defined as a context listener");
-        }
-        return instance.authenticationManager;
-    }
-
-    // //////////////////////////////////////////////
-    // Request
-    // //////////////////////////////////////////////
-
-    public static void startRequest(final AuthenticationSession authSession) {
-        IsisContext.openSession(authSession);
-    }
-
-    public static void endRequest(final AuthenticationSession authSession) {
-    	// if a Logout has occurred then there won't be any session
-    	// (though should the AuthenticationManagerStandard actually be closing the session? not sure)
-    	
-    	if (IsisContext.inSession()) {
-    		IsisContext.closeSession();
-    	}
-    }
-
-    // //////////////////////////////////////////////
-    // Settings
-    // //////////////////////////////////////////////
-
-    public static boolean inExplorationMode() {
-        return instance.inExplorationModeInstance();
-    }
-
-    // ///////////////////////////////////////////////////////////////////////////
-
-    private final List<Object> sessions = new ArrayList<Object>();
-
-    private final AuthenticationManager authenticationManager;
-    private DeploymentType deploymentType;
-    private LogonFixture logonFixture;
-
-    private SessionAccess(final AuthenticationManager authenticationManager) {
-        this(authenticationManager, DeploymentType.STANDALONE, null);
-    }
-
-    private SessionAccess(
-            final AuthenticationManager authenticationManager,
-            final DeploymentType deploymentType,
-            final LogonFixture logonFixture) {
-        this.authenticationManager = authenticationManager;
-
-        this.deploymentType = deploymentType;
-        this.logonFixture = logonFixture;
-
-        SessionAccess.instance = this;
-    }
-
-    public DeploymentType getDeploymentType() {
-        return deploymentType;
-    }
-
-    public LogonFixture getLogonFixture() {
-        return logonFixture;
-    }
-
-    private AuthenticationSession authenticateInstance(PasswordAuthenticationRequest passwordAuthenticationRequest) {
-
-        if ((deploymentType.isExploring() || deploymentType.isPrototyping()) && 
-             logonFixture != null) {
-            return new SimpleSession(logonFixture.getUsername(), logonFixture.getRoles());
-        }
-
-        if (deploymentType.isExploring()) {
-            return new ExplorationSession();
-        }
-
-        return authenticationManager.authenticate(passwordAuthenticationRequest);
-    }
-
-    private boolean inExplorationModeInstance() {
-        return deploymentType.isExploring();
-    }
-
-}
-

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/src-archived/SessionList.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/src-archived/SessionList.java b/component/viewer/html/impl/src/main/src-archived/SessionList.java
deleted file mode 100644
index 3363656..0000000
--- a/component/viewer/html/impl/src/main/src-archived/SessionList.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *  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.extensions.htmlviewer.webapp;
-
-import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpSessionEvent;
-import javax.servlet.http.HttpSessionListener;
-
-import org.apache.isis.metamodel.authentication.AuthenticationSession;
-import org.apache.isis.extensions.html.context.Context;
-import org.apache.isis.extensions.html.servlet.internal.SessionAccess;
-
-
-public class SessionList implements HttpSessionListener {
-    private static final String NOF_SESSION_ATTRIBUTE = "nof-context";
-
-    public void sessionCreated(final HttpSessionEvent event) {
-        final HttpSession session = event.getSession();
-        SessionAccess.addSession(session);
-    }
-
-    public void sessionDestroyed(final HttpSessionEvent event) {
-        final HttpSession session = event.getSession();
-        SessionAccess.removeSession(session);
-
-        final Context context = (Context) session.getAttribute(NOF_SESSION_ATTRIBUTE);
-        final AuthenticationSession nofSession = context.getSession();
-        if (nofSession != null) {
-            SessionAccess.logoffUser(nofSession);
-        }
-
-    }
-
-}
-

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/site/apt/index.apt b/component/viewer/html/impl/src/site/apt/index.apt
deleted file mode 100644
index d6f3649..0000000
--- a/component/viewer/html/impl/src/site/apt/index.apt
+++ /dev/null
@@ -1,47 +0,0 @@
-~~  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.
-
-
-
-HTML Viewer
-
- The HTML viewer provides a simple webapp interface for interacting with an Isis domain model.
-  
- It renders each domain object or collection of domain objects as a web page, with
- hyperlinks used to navigate between objects.  In addition, object actions can also be invoked,
- with hyperlinks bringing up a page for action parameters if required.
- 
-Customization
- 
-  The HTML viewer offers only very limited customization opportunities; the CSS can be
-  altered, but that's about it. 
- 
-Alternatives
-
-  There are two other webapp viewers which provide more far wider customization opportunities:
-  
-  * the {{{../scimpi/index.html}Scimpi}} viewer uses a JSF-like markup metaphor
-  
-  * the {{{../wicket/index.html}Wicket}} viewer uses a {{{http://wicket.apache.org}Apache Wicket}} components
-    (and allows you to define your own components also).
-    
-  []
-
-Further Info
-  
-  See this module's {{{./apidocs/index.html}Javadoc}} and the {{{./docbkx/html/guide/isis-html-viewer.html}user guide}} for more information.
-  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/site/apt/jottings.apt
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/site/apt/jottings.apt b/component/viewer/html/impl/src/site/apt/jottings.apt
deleted file mode 100644
index 7ef0d29..0000000
--- a/component/viewer/html/impl/src/site/apt/jottings.apt
+++ /dev/null
@@ -1,71 +0,0 @@
-~~  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.
-
-
-
-Jottings
- 
-  This page is to capture any random jottings relating to this module prior 
-  to being moved into formal documentation. 
- 
-* Debugging
-
-  To turn on debugging use the debugon command, e.g.,
-
---------------------------------------------------------
-http://localhost:8080/debugon.app
---------------------------------------------------------
-
-  A control bar appears a the bottom of the page allowing you to
-  display the object graph, specification, connection details and so on
-  
-  To turn it off use the debugoff command:
-
---------------------------------------------------------
-http://localhost:8080/debugoff.app</programlisting>
---------------------------------------------------------
-
-  The debug pages can be displayed directly by providing the commands:
-  debug; spec and dump - along with a object id if necessary. For example to 
-  view the details about the specification for object 28 use:
-
---------------------------------------------------------
-http://localhost:8080/spec.app?id=28
---------------------------------------------------------
- 
- 
- * Other Notes
- 
-  The pages generated by the servlet are broken down into the following sections
-
---------------------------------------------------------
-site-header
-	site-logo
-page-header
-navigation
-	resources
-	history
-content
-	header
-	menu
-	body
-site-footer
---------------------------------------------------------
-
-Objects edited on the web don't fit the save-as-you-go pattern that we adopted in the DND.  
-This means that the options for each field, that the options might depend upon, don't get 
-updated as the fields are not being changed on the fly.

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/site/site.xml
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/site/site.xml b/component/viewer/html/impl/src/site/site.xml
deleted file mode 100644
index aca88eb..0000000
--- a/component/viewer/html/impl/src/site/site.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project>
-
-	<body>
-		<breadcrumbs>
-			<item name="HTML"/>
-		</breadcrumbs>
-
-		<menu name="HTML Viewer">
-			<item name="About" href="index.html" />
-            <item name="Jottings" href="jottings.html" />
-		</menu>
-        
-        <menu name="Viewer Modules">
-            <item name="HTML" href="../html/index.html" />
-            <item name="Scimpi" href="../scimpi/index.html" />
-            <item name="Wicket" href="../wicket/index.html" />
-            <item name="RestfulObjects" href="../restfulobjects/index.html" />
-            <item name="JUnit Support" href="../junit/index.html" />
-            <item name="BDD Integration" href="../bdd/index.html" />
-            <item name="DnD" href="../dnd/index.html" />
-        </menu>
-        
-		<menu name="Documentation">
-			<item name="${docbkxGuideTitle} (PDF)" href="docbkx/pdf/${docbkxGuideName}.pdf" />
-			<item name="${docbkxGuideTitle} (HTML)" href="docbkx/html/guide/${docbkxGuideName}.html" />
-		</menu>
-
-		<menu name="Maven Reports" ref="reports" />
-	</body>
-
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapAction.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapAction.java b/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapAction.java
deleted file mode 100644
index 39260a1..0000000
--- a/component/viewer/html/impl/src/test/java/org/apache/isis/viewer/html/context/ContextTest_mapAction.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *  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.context;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.viewer.html.action.ActionException;
-
-public class ContextTest_mapAction {
-
-    @Rule
-    public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
-    private Context context;
-
-
-    @Before
-    public void setUp() throws Exception {
-        Logger.getRootLogger().setLevel(Level.OFF);
-        context = new Context(null);
-    }
-
-
-    @Test
-    public void getMappedAction_forNonExistentId() {
-        try {
-            assertNull(context.getMappedAction("NON-EXISTENT-ID"));
-            fail();
-        } catch (final ActionException ex) {
-            // expected
-        }
-    }
-
-
-    @Test
-    public void mapAction_then_getMappedAction() {
-        final ObjectAction action = new ObjectActionNoop();
-        final String id = context.mapAction(action);
-        assertEquals(action, context.getMappedAction(id));
-    }
-
-
-    @Test
-    public void mapAction_returnsSameIdForSameAction() {
-        final ObjectAction action = new ObjectActionNoop();
-        final String id = context.mapAction(action);
-        final String id2 = context.mapAction(action);
-        assertEquals(id, id2);
-    }
-
-    @Test
-    public void mapAction_returnsDifferentIdsForDifferentActions() {
-        final String id = context.mapAction(new ObjectActionNoop());
-        final String id2 = context.mapAction(new ObjectActionNoop());
-        assertNotSame(id, id2);
-    }
-
-    
-    private PersistenceSession getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
-    }
-
-    private AdapterManager getAdapterManager() {
-        return getPersistenceSession().getAdapterManager();
-    }
-
-}


[08/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java
new file mode 100644
index 0000000..f7b20e4
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java
@@ -0,0 +1,133 @@
+/*
+ *  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.action.view.util;
+
+import static org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters.PROPERTIES;
+import static org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters.WHEN_VISIBLE_IRRESPECTIVE_OF_WHERE;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.Where;
+import org.apache.isis.applib.filter.Filters;
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
+import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacetUtils;
+import org.apache.isis.core.metamodel.facets.multiline.MultiLineFacet;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
+import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.Persistor;
+import org.apache.isis.viewer.html.component.ComponentFactory;
+import org.apache.isis.viewer.html.component.Table;
+import org.apache.isis.viewer.html.context.Context;
+
+public class TableUtil {
+
+    // REVIEW: should provide this rendering context, rather than hardcoding.
+    // the net effect currently is that class members annotated with
+    // @Hidden(where=Where.ALL_TABLES) or @Disabled(where=Where.ALL_TABLES) will indeed
+    // be hidden from all tables but will be visible/enabled (perhaps incorrectly) 
+    // if annotated with Where.PARENTED_TABLE or Where.STANDALONE_TABLE
+    private final static Where where = Where.ALL_TABLES;
+
+    public static Table createTable(final Context context, final String id, final ObjectAdapter object, final OneToManyAssociation collectionField) {
+
+        final ObjectAdapter collection = collectionField.get(object);
+        final String name = collectionField.getName();
+        final ObjectSpecification type = collectionField.getSpecification();
+
+        final String summary = "Table showing elements of " + name + " field";
+        return createTable(context, collectionField != null, collection, summary, type);
+    }
+
+    public static Table createTable(final Context context, final boolean addSelector, final ObjectAdapter collection, final String summary, final ObjectSpecification elementType) {
+
+        final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
+        final List<ObjectAssociation> columnAssociations = elementType.getAssociations(Filters.and(WHEN_VISIBLE_IRRESPECTIVE_OF_WHERE, PROPERTIES));
+
+        final int len = columnAssociations.size();
+
+        final ComponentFactory factory = context.getComponentFactory();
+        final Table table = factory.createTable(len, addSelector);
+        table.setSummary(summary);
+
+        for (final ObjectAssociation columnAssociation : columnAssociations) {
+            table.addColumnHeader(columnAssociation.getName());
+        }
+
+        for (final ObjectAdapter rowAdapter : facet.iterable(collection)) {
+            getPersistenceSession().resolveImmediately(rowAdapter);
+            final String elementId = context.mapObject(rowAdapter);
+            table.addRowHeader(factory.createObjectIcon(rowAdapter, elementId, "icon"));
+
+            for (final ObjectAssociation columnAssociation : columnAssociations) {
+                final ObjectAdapter columnAdapter = columnAssociation.get(rowAdapter);
+
+                final ObjectSpecification columnSpec = columnAssociation.getSpecification();
+
+                if (!columnAssociation.isVisible(getAuthenticationSession(), rowAdapter, where).isAllowed()) {
+                    table.addEmptyCell();
+                } else if (columnSpec.isParseable()) {
+                    final MultiLineFacet multiline = columnSpec.getFacet(MultiLineFacet.class);
+                    final boolean shouldTruncate = multiline != null && multiline.numberOfLines() > 1;
+                    final String titleString = columnAdapter != null ? columnAdapter.titleString() : "";
+                    table.addCell(titleString, shouldTruncate);
+                } else if (columnAdapter == null) {
+                    table.addEmptyCell();
+                } else {
+                    getPersistenceSession().resolveImmediately(columnAdapter);
+                    final String objectId = context.mapObject(columnAdapter);
+                    table.addCell(factory.createObjectIcon(columnAssociation, columnAdapter, objectId, "icon"));
+                }
+            }
+            /*
+             * if (addSelector) {
+             * table.addCell(context.getFactory().createRemoveOption(id,
+             * elementId, collectionField.getId())); }
+             */
+            // TODO add selection box
+            // table.addCell();
+            /*
+             * if (collectionField != null) { if
+             * (collectionField.isValidToRemove(object, element).isAllowed()) {
+             * table.addCell(context.getFactory().createRemoveOption(id,
+             * elementId, collectionField.getId())); } else {
+             * table.addEmptyCell(); } }
+             */
+
+        }
+        return table;
+    }
+
+    // ////////////////////////////////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // ////////////////////////////////////////////////////////////////////////////////
+
+    private static Persistor getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+    private static AuthenticationSession getAuthenticationSession() {
+        return IsisContext.getAuthenticationSession();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Block.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Block.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Block.java
new file mode 100644
index 0000000..40bff7a
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Block.java
@@ -0,0 +1,26 @@
+/*
+ *  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;
+
+public interface Block extends Component {
+
+    void add(Component component);
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Component.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Component.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Component.java
new file mode 100644
index 0000000..5f9e4de
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Component.java
@@ -0,0 +1,27 @@
+/*
+ *  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;
+
+import java.io.PrintWriter;
+
+public interface Component {
+
+    void write(PrintWriter writer);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java
new file mode 100644
index 0000000..de2625a
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java
@@ -0,0 +1,64 @@
+/*
+ *  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;
+
+import java.io.PrintWriter;
+
+import org.apache.isis.viewer.html.PathBuilder;
+
+public abstract class ComponentAbstract implements Component {
+
+    private String id;
+    private String cls;
+    protected final PathBuilder pathBuilder;
+
+    public ComponentAbstract(final PathBuilder pathBuilder) {
+        this.pathBuilder = pathBuilder;
+    }
+
+    public void setClass(final String cls) {
+        this.cls = cls;
+    }
+
+    public void setId(final String id) {
+        this.id = id;
+    }
+
+    protected void writeTag(final PrintWriter writer, final String tagName) {
+        tag(writer, tagName);
+        writer.print(">");
+    }
+
+    private void tag(final PrintWriter writer, final String tagName) {
+        writer.print("<");
+        writer.print(tagName);
+        if (id != null) {
+            writer.print(" id=\"");
+            writer.print(id);
+            writer.print("\"");
+        }
+        if (cls != null) {
+            writer.print(" class=\"");
+            writer.print(cls);
+            writer.print("\"");
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java
new file mode 100644
index 0000000..c4b7559
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java
@@ -0,0 +1,66 @@
+/*
+ *  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;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.viewer.html.PathBuilder;
+
+public class ComponentComposite implements Component {
+
+    private final List<Component> components = new ArrayList<Component>();
+    protected final PathBuilder pathBuilder;
+
+    public ComponentComposite(final PathBuilder pathBuilder) {
+        super();
+        this.pathBuilder = pathBuilder;
+    }
+
+    protected String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writeBefore(writer);
+        for (final Component component : components) {
+            write(writer, component);
+        }
+        writeAfter(writer);
+        writer.println();
+    }
+
+    protected void write(final PrintWriter writer, final Component component) {
+        component.write(writer);
+    }
+
+    protected void writeBefore(final PrintWriter writer) {
+    }
+
+    protected void writeAfter(final PrintWriter writer) {
+    }
+
+    public void add(final Component component) {
+        components.add(component);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java
new file mode 100644
index 0000000..da3ecab
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java
@@ -0,0 +1,82 @@
+/*
+ *  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;
+
+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 extends PathBuilder {
+
+    Component createAddOption(String id, String id2);
+
+    Block createBlock(String style, String description);
+
+    Component createBreadCrumbs(String[] names, boolean[] isLinked);
+
+    Component createCollectionIcon(ObjectAssociation field, ObjectAdapter collection, String id);
+
+    DebugPane createDebugPane();
+
+    Component createEditOption(String id);
+
+    Component createErrorMessage(Exception e, boolean isDebug);
+
+    Form createForm(String id, String action, int step, int noOfPages, boolean b);
+
+    Component createHeading(String string);
+
+    Component createInlineBlock(String style, String text, String description);
+
+    Component createCheckboxBlock(final boolean isEditable, final boolean isSet);
+
+    Component createSubmenu(String menuName, Component[] items);
+
+    Component createMenuItem(String actionId, String name, String description, String reasonDisabled, ActionType type, boolean hasParameters, String targetObjectId);
+
+    Component createCollectionIcon(ObjectAdapter object, String collectionId);
+
+    Component createObjectIcon(ObjectAdapter object, String objectId, String style);
+
+    Component createObjectIcon(ObjectAssociation field, ObjectAdapter object, String objectId, String style);
+
+    Page createPage();
+
+    Component createRemoveOption(String id, String elementId, String id2);
+
+    Component createService(String objectId, String title, String iconName);
+
+    Table createTable(int noColumns, boolean withSelectorColumn);
+
+    Component createUserSwap(final String name);
+
+    /**
+     * 
+     * @param field
+     * @param value
+     *            - may be <tt>null</tt> so subclass should handle.
+     * @param isEditable
+     * @return
+     */
+    Component createParseableField(ObjectAssociation field, ObjectAdapter value, boolean isEditable);
+
+    Component createLink(String link, String name, String description);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/DebugPane.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/DebugPane.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/DebugPane.java
new file mode 100644
index 0000000..530ae63
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/DebugPane.java
@@ -0,0 +1,32 @@
+/*
+ *  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;
+
+public interface DebugPane extends Component {
+
+    void addSection(String title);
+
+    void appendln(String text);
+
+    void indent();
+
+    void unindent();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Form.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Form.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Form.java
new file mode 100644
index 0000000..db5789b
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Form.java
@@ -0,0 +1,44 @@
+/*
+ *  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;
+
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+
+public interface Form extends Component {
+
+    void addField(ObjectSpecification type, String fieldLabel, String fieldDescription, String fieldId, String currentEntryTitle, int noLines, boolean wrap, int maxLength, int typicalLength, boolean required, String error);
+
+    /*
+     * REVIEW the form should be asked to create specific types, like see
+     * HTMLForm.addForm()
+     * 
+     * void addCheckBox(....)
+     * 
+     * void addPasswordField(....)
+     * 
+     * void addMultilineField(....)
+     */
+
+    void addLookup(String fieldLabel, String fieldDescription, String fieldId, int selectedIndex, String[] options, String[] ids, boolean required, String errorMessage);
+
+    void addReadOnlyField(String fieldLabel, String title, String fieldDescription);
+
+    void addReadOnlyCheckbox(String fieldLabel, boolean isSet, String fieldDescription);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Page.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Page.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Page.java
new file mode 100644
index 0000000..fada9d1
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Page.java
@@ -0,0 +1,40 @@
+/*
+ *  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;
+
+public interface Page extends Component {
+
+    void addDebug(String value);
+
+    void addDebug(String label, String value);
+
+    Block getNavigation();
+
+    Block getPageHeader();
+
+    ViewPane getViewPane();
+
+    void setCrumbs(Component component);
+
+    void setDebug(DebugPane debugPane);
+
+    void setTitle(String title);
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Table.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Table.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Table.java
new file mode 100644
index 0000000..3a4dd5c
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Table.java
@@ -0,0 +1,36 @@
+/*
+ *  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;
+
+public interface Table extends Component {
+
+    void setSummary(String string);
+
+    void addColumnHeader(String name);
+
+    void addRowHeader(Component component);
+
+    void addCell(String string, boolean truncate);
+
+    void addCell(Component component);
+
+    void addEmptyCell();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ViewPane.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ViewPane.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ViewPane.java
new file mode 100644
index 0000000..5aa6cb0
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ViewPane.java
@@ -0,0 +1,35 @@
+/*
+ *  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;
+
+import java.util.List;
+
+public interface ViewPane extends Component {
+
+    void setIconName(String iconName);
+
+    void setTitle(String title, String description);
+
+    void add(Component content);
+
+    void setMenu(Component[] component);
+
+    void setWarningsAndMessages(List<String> list, List<String> list2);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java
new file mode 100644
index 0000000..a96b557
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java
@@ -0,0 +1,129 @@
+/*
+ *  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 java.util.StringTokenizer;
+
+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;
+
+public abstract class AbstractHtmlPage implements Component, Page {
+
+    private final Block pageHeader;
+    private final String siteFooter;
+    private final String siteHeader;
+    private final String styleSheet;
+    private final StringBuffer debug = new StringBuffer();
+
+    private String title = "Apache Isis";
+    protected final PathBuilder pathBuilder;
+
+    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;
+    }
+
+    @Override
+    public void addDebug(final String html) {
+        debug.append("<div class=\"detail\">");
+        debug.append(html);
+        debug.append("</div>");
+    }
+
+    @Override
+    public void addDebug(final String name, final String value) {
+        debug.append("<div class=\"detail\">");
+        debug.append("<span class=\"label\">");
+        debug.append(name);
+        debug.append("</span>: ");
+        debug.append(value);
+        debug.append("</div>");
+    }
+
+    @Override
+    public Block getPageHeader() {
+        return pageHeader;
+    }
+
+    @Override
+    public void setTitle(final String title) {
+        this.title = title;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
+        writer.println("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">");
+        writer.println("  <head>");
+        writer.print("  <title>");
+        writer.print(title);
+        writer.println("</title>");
+        writer.println("  <meta name=\"description\" content=\"Apache Isis Application Web Page\" />");
+
+        final StringTokenizer st = new StringTokenizer(styleSheet, ",");
+        int i = 0;
+        while (st.hasMoreTokens()) {
+            final String style = st.nextToken().trim();
+            writer.print("  <link rel=\"");
+            if (i++ > 0) {
+                writer.print("alternate ");
+            }
+            writer.print("stylesheet\" title=\"Style " + i + "\" href=\"");
+            writer.print(style);
+            writer.println("\" type=\"text/css\" media=\"all\"/>");
+        }
+        writer.println("  <script src=\"jquery-1.7.1.js\" type=\"text/javascript\"></script>");
+        writer.println("  <script src=\"htmlviewer.js\" type=\"text/javascript\"></script>");
+        writer.println("  </head>");
+        writer.println("  <body onLoad=\"window.document.form.fld0.focus()\">");
+        writer.println("  <div id=\"wrapper\">");
+
+        if (siteHeader != null) {
+            writer.println("  <!-- the following block is added externally via configuration -->");
+            writer.println(siteHeader);
+        }
+
+        writeContent(writer);
+
+        if (siteFooter != null) {
+            writer.println("  <!-- the following block is added externally via configuration -->");
+            writer.println(siteFooter);
+        }
+
+        if (debug.length() > 0) {
+            writer.println("<div id=\"debug\">");
+            writer.println("<h4>Debug</h4>");
+            writer.println(debug);
+            writer.println("</div>");
+        }
+
+        writer.println("</div>");
+        writer.println("  </body>");
+        writer.println("</html>");
+    }
+
+    protected abstract void writeContent(PrintWriter writer);
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java
new file mode 100644
index 0000000..a6b12f6
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java
@@ -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.viewer.html.component.html;
+
+import java.io.PrintWriter;
+
+import org.apache.isis.viewer.html.PathBuilder;
+import org.apache.isis.viewer.html.component.Component;
+
+class ActionComponent implements Component {
+
+    private final PathBuilder pathBuilder;
+    private final String objectId;
+    private final String name;
+    private final String description;
+    private final String field;
+    private final String action;
+    private final String elementId;
+
+    public ActionComponent(final PathBuilder pathBuilder, final String action, final String name, final String description, final String objectId, final String elementId, final String field) {
+        this.pathBuilder = pathBuilder;
+        this.action = action;
+        this.name = name;
+        this.description = description;
+        this.objectId = objectId;
+        this.elementId = elementId;
+        this.field = field;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.print("<div class=\"action-button\">");
+        writer.print("<a href=\"");
+        writer.print(pathTo(action));
+        writer.print("?id=");
+        writer.print(objectId);
+        if (field != null) {
+            writer.print("&amp;field=");
+            writer.print(field);
+        }
+        if (elementId != null) {
+            writer.print("&amp;element=");
+            writer.print(elementId);
+        }
+        writer.print("\" title=\"");
+        writer.print(description);
+        writer.print("\"> ");
+        writer.print(name);
+        writer.print("</a>");
+        writer.println("</div>");
+    }
+
+    protected String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java
new file mode 100644
index 0000000..be454e4
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java
@@ -0,0 +1,66 @@
+/*
+ *  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.ComponentAbstract;
+
+public class BreadCrumbs extends ComponentAbstract {
+    private final String[] names;
+    private final boolean[] isLinked;
+
+    public BreadCrumbs(final PathBuilder pathBuilder, final String[] names, final boolean[] isLinked) {
+        super(pathBuilder);
+        this.names = names;
+        this.isLinked = isLinked;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.println("<div id=\"context\">");
+
+        final int length = names.length;
+        for (int i = 0; i < length; i++) {
+            if (i > 0) {
+                writer.print("<span class=\"separator\"> &gt; </span>");
+            }
+            if (isLinked[i]) {
+                writer.print("<a class=\"linked\" href=\"" + pathTo("context") + "?id=");
+                writer.print(i);
+                writer.print("\">");
+                writer.print(names[i]);
+                writer.print("</a>");
+            } else if (!(i == length - 1 && names[i] == null)) {
+                writer.print("<span class=\"disabled\">");
+                writer.print(names[i]);
+                writer.print("</span>");
+            }
+        }
+
+        writer.print("</div>");
+    }
+
+    protected String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Checkbox.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Checkbox.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Checkbox.java
new file mode 100644
index 0000000..b907c5a
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Checkbox.java
@@ -0,0 +1,50 @@
+/*
+ *  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.component.Component;
+
+final class Checkbox implements Component {
+    private final boolean set;
+
+    private final boolean editable;
+
+    Checkbox(final boolean set, final boolean editable) {
+        this.set = set;
+        this.editable = editable;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.print("<input class=\"value\" type=\"checkbox\"");
+        if (set) {
+            writer.print(" checked");
+        }
+        if (!editable) {
+            writer.print(" disabled");
+        }
+        writer.println("/>");
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java
new file mode 100644
index 0000000..b99b351
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java
@@ -0,0 +1,80 @@
+/*
+ *  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.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacet;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+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;
+
+public class CollectionIcon implements Component {
+
+    private final ObjectAdapter collection;
+    private final PathBuilder pathBuilder;
+    private final String id;
+    private final String description;
+
+    public CollectionIcon(final PathBuilder pathBuilder, final ObjectAdapter element, final String description, final String id) {
+        this.pathBuilder = pathBuilder;
+        this.collection = element;
+        this.description = description;
+        this.id = id;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        final TypeOfFacet facet = collection.getSpecification().getFacet(TypeOfFacet.class);
+        final Class<?> elementType = facet.value();
+        final ObjectSpecification elementSpecification = IsisContext.getSpecificationLoader().loadSpecification(elementType);
+
+        writer.print("<div class=\"item\">");
+        writer.print("<a href=\"");
+        writer.print(pathTo(Request.COLLECTION_COMMAND) + "?id=");
+        writer.print(id);
+        writer.print("\"");
+        if (description != null) {
+            writer.print(" title=\"");
+            writer.print(description);
+            writer.print("\"");
+        }
+        writer.print("><img src=\"");
+        writer.print(ImageLookup.image(elementSpecification));
+        writer.print("\" alt=\"");
+        final String singularName = elementSpecification.getSingularName();
+        writer.print(singularName);
+        writer.print(" collection\" />");
+        writer.print(collection.titleString());
+        writer.print("</a>");
+
+        writer.println("</div>");
+
+    }
+
+    protected String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java
new file mode 100644
index 0000000..2a12061
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionLink.java
@@ -0,0 +1,77 @@
+/*
+ *  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.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.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;
+
+class CollectionLink extends ComponentAbstract {
+    private final String objectId;
+    private final String fieldId;
+    private final ObjectSpecification specification;
+    private final String title;
+    private final String description;
+
+    public CollectionLink(final PathBuilder pathBuilder, final ObjectAssociation field, final ObjectAdapter collection, final String description, final String objectId) {
+        super(pathBuilder);
+        this.description = description;
+        this.objectId = objectId;
+        fieldId = field.getId();
+        title = collection.titleString();
+        specification = field.getSpecification();
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.print("<span class=\"value\"");
+        if (description != null) {
+            writer.print(" title=\"");
+            writer.print(description);
+            writer.print("\"");
+        }
+        writer.print(">");
+
+        writer.print("<a href=\"");
+        writer.print(pathTo(Request.FIELD_COLLECTION_COMMAND) + "?id=");
+        writer.print(objectId);
+        writer.print("&amp;field=");
+        writer.print(fieldId);
+        writer.print("\"");
+        writer.print("><img src=\"");
+        writer.print(ImageLookup.image(specification));
+        writer.print("\" alt=\"icon\">");
+        // writer.print(elementType);
+        writer.print(title);
+        writer.print("</a>");
+        writer.println("</span>");
+    }
+
+    protected String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Div.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Div.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Div.java
new file mode 100644
index 0000000..4223071
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Div.java
@@ -0,0 +1,86 @@
+/*
+ *  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.ComponentComposite;
+
+public class Div extends ComponentComposite implements Block {
+
+    private final String className;
+    private final String id;
+    private final String description;
+
+    public Div(final PathBuilder pathBuilder, final String className, final String description) {
+        this(pathBuilder, className, description, null);
+    }
+
+    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;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        super.write(writer);
+    }
+
+    @Override
+    protected void writeBefore(final PrintWriter writer) {
+        writer.print("<div");
+        if (className != null) {
+            writer.print(" class=\"");
+            writer.print(className);
+            writer.print("\"");
+        }
+        if (id != null) {
+            writer.print(" id=\"");
+            writer.print(id);
+            writer.print("\"");
+        }
+        if (description != null) {
+            writer.print(" title=\"");
+            writer.print(description);
+            writer.print("\"");
+        }
+        writer.print(">");
+    }
+
+    @Override
+    protected void writeAfter(final PrintWriter writer) {
+        writer.println("</div>");
+    }
+
+    @Override
+    public void add(final Component component) {
+        super.add(component);
+    }
+
+    public void add(final String text) {
+        super.add(new Html(pathBuilder, text));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java
new file mode 100644
index 0000000..0a81342
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/DynamicHtmlPage.java
@@ -0,0 +1,81 @@
+/*
+ *  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.Page;
+import org.apache.isis.viewer.html.component.ViewPane;
+
+public class DynamicHtmlPage extends AbstractHtmlPage implements Page {
+
+    private final Block navigation;
+    private final ViewPane viewPane;
+
+    private Component crumbs;
+    private DebugPane debugPane;
+
+    public DynamicHtmlPage(final 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
+    public Block getNavigation() {
+        return navigation;
+    }
+
+    @Override
+    public ViewPane getViewPane() {
+        return viewPane;
+    }
+
+    @Override
+    public void setCrumbs(final Component crumbs) {
+        this.crumbs = crumbs;
+    }
+
+    @Override
+    public void setDebug(final DebugPane debugPane) {
+        this.debugPane = debugPane;
+    }
+
+    @Override
+    protected void writeContent(final PrintWriter writer) {
+        if (debugPane != null) {
+            debugPane.write(writer);
+        } else {
+            writer.println();
+            writer.println("<div id=\"body\">");
+            navigation.write(writer);
+            if (crumbs != null) {
+                crumbs.write(writer);
+            }
+            viewPane.write(writer);
+            writer.println();
+            writer.println("</div>");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ErrorMessage.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ErrorMessage.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ErrorMessage.java
new file mode 100644
index 0000000..2482b80
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ErrorMessage.java
@@ -0,0 +1,48 @@
+/*
+ *  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.component.Component;
+
+public class ErrorMessage implements Component {
+
+    private final Exception e;
+    private final boolean isDebug;
+
+    public ErrorMessage(final Exception e, final boolean isDebug) {
+        this.e = e;
+        this.isDebug = isDebug;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.println("<div class=\"error\">");
+        writer.println(e.getMessage());
+        writer.println("</div>");
+        if (isDebug) {
+            writer.println("<pre class=\"error-trace\">");
+            e.printStackTrace(writer);
+            writer.println("</pre>");
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java
new file mode 100644
index 0000000..9e9408c
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Heading.java
@@ -0,0 +1,50 @@
+/*
+ *  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.ComponentAbstract;
+
+public class Heading extends ComponentAbstract {
+    private final String title;
+    private final int level;
+
+    public Heading(final PathBuilder pathBuilder, final String title) {
+        this(pathBuilder, title, 1);
+    }
+
+    public Heading(final PathBuilder pathBuilder, final String title, final int level) {
+        super(pathBuilder);
+        this.title = title;
+        this.level = level;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writeTag(writer, "h" + level);
+        writer.print(title);
+        writer.print("</h");
+        writer.print(level);
+        writer.println(">");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Html.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Html.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Html.java
new file mode 100644
index 0000000..6a02fd4
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Html.java
@@ -0,0 +1,40 @@
+/*
+ *  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.ComponentAbstract;
+
+class Html extends ComponentAbstract {
+
+    private final String code;
+
+    public Html(final PathBuilder pathBuilder, final String code) {
+        super(pathBuilder);
+        this.code = code;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.print(code);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java
new file mode 100644
index 0000000..1b1ec70
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlComponentFactory.java
@@ -0,0 +1,309 @@
+/*
+ *  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 static org.apache.isis.viewer.html.HtmlViewerConstants.FOOTER;
+import static org.apache.isis.viewer.html.HtmlViewerConstants.FOOTER_FILE;
+import static org.apache.isis.viewer.html.HtmlViewerConstants.HEADER;
+import static org.apache.isis.viewer.html.HtmlViewerConstants.HEADER_FILE;
+import static org.apache.isis.viewer.html.HtmlViewerConstants.STYLE_SHEET;
+
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.facets.multiline.MultiLineFacet;
+import org.apache.isis.core.metamodel.spec.ActionType;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
+import org.apache.isis.core.progmodel.facets.value.booleans.BooleanValueFacet;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+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;
+import org.apache.isis.viewer.html.component.DebugPane;
+import org.apache.isis.viewer.html.component.Form;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.component.Table;
+
+public class HtmlComponentFactory implements ComponentFactory {
+
+    private static final long serialVersionUID = 1L;
+    
+    protected final String footer;
+    protected final String header;
+    protected final String styleSheet;
+    
+    private final PathBuilder pathBuilder;
+
+    public HtmlComponentFactory(final PathBuilder pathBuilder) {
+        this(pathBuilder, getConfiguration());
+    }
+
+    public HtmlComponentFactory(final PathBuilder pathBuilder, final IsisConfiguration configuration) {
+        this.pathBuilder = pathBuilder;
+        this.styleSheet = configuration.getString(STYLE_SHEET);
+        this.header = loadFileElseDefault(configuration, HEADER_FILE, HEADER);
+        this.footer = loadFileElseDefault(configuration, FOOTER_FILE, FOOTER);
+    }
+
+    
+    // /////////////////////////////////////////////////////////////
+    // Pages
+    // /////////////////////////////////////////////////////////////
+
+    @Override
+    public Page createPage() {
+        return new DynamicHtmlPage(this, styleSheet, header, footer);
+    }
+
+    public LogonFormPage createLogonPage(final String user, final String password, final boolean registerLink, final String error) {
+        return new LogonFormPage(this, styleSheet, header, footer, user, password, registerLink, error);
+    }
+
+    public RegisterFormPage createRegisterPage(final String user, final String password, final String error) {
+        return new RegisterFormPage(this, styleSheet, header, footer, user, password, error);
+    }
+
+    // /////////////////////////////////////////////////////////////
+    // Menus
+    // /////////////////////////////////////////////////////////////
+
+    @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(this, actionId, name, description, reasonDisabled, type, hasParameters, targetObjectId);
+    }
+
+    @Override
+    public Component createSubmenu(final String menuName, final Component[] items) {
+        return new Submenu(menuName, items);
+    }
+
+
+    // /////////////////////////////////////////////////////////////
+    // Icons
+    // /////////////////////////////////////////////////////////////
+
+    @Override
+    public Component createCollectionIcon(final ObjectAssociation field, final ObjectAdapter collection, final String id) {
+        return new CollectionLink(this, field, collection, field.getDescription(), id);
+    }
+
+    @Override
+    public Component createCollectionIcon(final ObjectAdapter collection, final String 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(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(this, object, field.getDescription(), objectId, style);
+    }
+
+
+    // /////////////////////////////////////////////////////////////
+    // Options
+    // /////////////////////////////////////////////////////////////
+
+    @Override
+    public Component createEditOption(final String id) {
+        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(this, "remove", "Remove", "Remove item from collection", id, elementId, fieldName);
+    }
+
+    @Override
+    public Component createAddOption(final String id, final String fieldName) {
+        return new ActionComponent(this, "add", "Add Item", "Add item to collection", id, null, fieldName);
+    }
+
+
+    // /////////////////////////////////////////////////////////////
+    // Messages
+    // /////////////////////////////////////////////////////////////
+
+    @Override
+    public Component createErrorMessage(final Exception e, final boolean isDebug) {
+        return new ErrorMessage(e, isDebug);
+    }
+
+
+    // /////////////////////////////////////////////////////////////
+    // Form & Form Widgets
+    // /////////////////////////////////////////////////////////////
+
+    @Override
+    public Form createForm(final String id, final String actionName, final int step, final int noOfPages, final boolean isEditing) {
+        return new HtmlForm(this, id, actionName, step, noOfPages, isEditing);
+    }
+
+    @Override
+    public Component createCheckboxBlock(final boolean isEditable, final boolean isSet) {
+        return new Checkbox(isSet, isEditable);
+    }
+
+    @Override
+    public Component createLink(final String link, final String name, final String description) {
+        return new Link(this, link, name, description);
+    }
+
+
+    @Override
+    public Component createParseableField(final ObjectAssociation field, final ObjectAdapter value, final boolean isEditable) {
+        final BooleanValueFacet facet = field.getSpecification().getFacet(BooleanValueFacet.class);
+        if (facet != null) {
+            return createCheckboxBlock(isEditable, facet.isSet(value));
+        } else {
+            final String titleString = value != null ? value.titleString() : "";
+
+            final MultiLineFacet multiLineFacet = field.getSpecification().getFacet(MultiLineFacet.class);
+            final boolean isWrapped = multiLineFacet != null && !multiLineFacet.preventWrapping();
+
+            if (isWrapped) {
+                return createInlineBlock("value", "<pre>" + titleString + "</pre>", null);
+            } else {
+                return createInlineBlock("value", titleString, null);
+            }
+        }
+    }
+
+    @Override
+    public Table createTable(final int noColumns, final boolean withSelectorColumn) {
+        return new HtmlTable(this, noColumns, withSelectorColumn);
+    }
+
+
+    // /////////////////////////////////////////////////////////////
+    // Furniture
+    // /////////////////////////////////////////////////////////////
+
+    @Override
+    public Block createBlock(final String style, final String description) {
+        return new Div(this, style, description);
+    }
+
+    @Override
+    public Component createBreadCrumbs(final String[] names, final boolean[] isLinked) {
+        return new BreadCrumbs(this, names, isLinked);
+    }
+
+    @Override
+    public Component createInlineBlock(final String style, final String text, final String description) {
+        return new Span(style, text, description);
+    }
+
+    @Override
+    public Component createHeading(final String name) {
+        return new Heading(this, name, 4);
+    }
+
+    @Override
+    public Component createService(final String objectId, final String title, final String iconName) {
+        return new ServiceComponent(this, objectId, title, iconName);
+    }
+
+    @Override
+    public Component createUserSwap(final String name) {
+        return new UserSwapLink(this, name);
+
+    }
+
+    // /////////////////////////////////////////////////////////////
+    // Debug
+    // /////////////////////////////////////////////////////////////
+
+    @Override
+    public DebugPane createDebugPane() {
+        return new HtmlDebug();
+    }
+
+
+    // /////////////////////////////////////////////////////////////
+    // PathBuilder impl
+    // /////////////////////////////////////////////////////////////
+
+    @Override
+    public String getSuffix() {
+        return pathBuilder.getSuffix();
+    }
+
+    @Override
+    public String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+
+    
+    // /////////////////////////////////////////////////////////////
+    // helpers
+    // /////////////////////////////////////////////////////////////
+
+    private static String loadFileElseDefault(final IsisConfiguration configuration, final String fileConstant, final String literalConstant) {
+        final String fileName = configuration.getString(fileConstant);
+        return fileName != null ? loadFile(fileName) : configuration.getString(literalConstant);
+    }
+
+
+    private static String loadFile(final String file) {
+        final StringBuffer content = new StringBuffer();
+        BufferedReader reader = null;
+        try {
+            reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
+            String line;
+            while ((line = reader.readLine()) != null) {
+                content.append(line);
+                content.append("\n");
+            }
+        } catch (final FileNotFoundException e) {
+            throw new WebViewerException("Failed to find file " + file);
+        } catch (final IOException e) {
+            throw new WebViewerException("Failed to load file " + file, e);
+        } finally {
+            if (reader != null) {
+                try {
+                    reader.close();
+                } catch (final IOException ignore) {
+                }
+            }
+        }
+        return content.toString();
+    }
+
+    
+
+    // /////////////////////////////////////////////////////////////
+    // injected services
+    // /////////////////////////////////////////////////////////////
+
+    private static IsisConfiguration getConfiguration() {
+        return IsisContext.getConfiguration();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlDebug.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlDebug.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlDebug.java
new file mode 100644
index 0000000..815b7ff
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlDebug.java
@@ -0,0 +1,69 @@
+/*
+ *  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.core.commons.exceptions.IsisException;
+import org.apache.isis.viewer.html.component.DebugPane;
+
+public class HtmlDebug implements DebugPane {
+    private static final String SPACES = "                                    ";
+    private final StringBuffer debug = new StringBuffer();
+    private int indent;
+
+    @Override
+    public void addSection(final String title) {
+        if (debug.length() > 0) {
+            appendln("</pre>");
+        }
+        appendln("<h2>");
+        appendln(title);
+        appendln("</h2><pre>");
+    }
+
+    @Override
+    public void appendln(final String text) {
+        debug.append(SPACES.substring(0, indent * 3));
+        debug.append(text);
+        debug.append("\n");
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        if (debug.length() > 0) {
+            writer.print(debug.toString());
+            writer.println("</pre>");
+        }
+    }
+
+    @Override
+    public void indent() {
+        indent++;
+    }
+
+    @Override
+    public void unindent() {
+        if (indent == 0) {
+            throw new IsisException();
+        }
+        indent--;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlException.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlException.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlException.java
new file mode 100644
index 0000000..5a58b0e
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlException.java
@@ -0,0 +1,42 @@
+/*
+ *  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 org.apache.isis.core.commons.exceptions.IsisException;
+
+public class HtmlException extends IsisException {
+    private static final long serialVersionUID = 1L;
+
+    public HtmlException() {
+    }
+
+    public HtmlException(final String msg) {
+        super(msg);
+    }
+
+    public HtmlException(final String msg, final Throwable cause) {
+        super(msg, cause);
+    }
+
+    public HtmlException(final Throwable cause) {
+        super(cause);
+    }
+
+}


[06/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectHistory.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectHistory.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectHistory.java
new file mode 100644
index 0000000..9dfa7cc
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectHistory.java
@@ -0,0 +1,109 @@
+/*
+ *  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.context;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.commons.exceptions.IsisException;
+import org.apache.isis.core.commons.exceptions.UnknownTypeException;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.viewer.html.component.Block;
+import org.apache.isis.viewer.html.component.Component;
+
+public class ObjectHistory implements Iterable<HistoryEntry> {
+
+    private static final Logger LOG = Logger.getLogger(ObjectHistory.class);
+    private static final int MAX = 8;
+    private final List<HistoryEntry> history = new ArrayList<HistoryEntry>();
+
+    private void add(final HistoryEntry entry) {
+        history.remove(entry);
+        history.add(entry);
+        LOG.debug("added to history: " + entry);
+        if (history.size() > MAX) {
+            LOG.debug("purging from history: " + history.get(0));
+            history.remove(0);
+        }
+    }
+
+    public void debug(final DebugBuilder debug) {
+        for (int i = history.size() - 1; i >= 0; i--) {
+            final HistoryEntry object = history.get(i);
+            debug.appendln(object.toString());
+        }
+    }
+
+    public void listObjects(final Context context, final Block navigation) {
+        final Block taskBar = context.getComponentFactory().createBlock("history", null);
+        taskBar.add(context.getComponentFactory().createHeading("History"));
+        for (int i = history.size() - 1; i >= 0; i--) {
+            try {
+                final HistoryEntry item = history.get(i);
+                Component icon;
+                if (item.type == HistoryEntry.OBJECT) {
+                    final ObjectAdapter object = context.getMappedObject(item.id);
+
+                    IsisContext.getPersistenceSession().resolveImmediately(object);
+
+                    icon = context.getComponentFactory().createObjectIcon(object, item.id, "item");
+                } else if (item.type == HistoryEntry.COLLECTION) {
+                    final ObjectAdapter object = context.getMappedCollection(item.id);
+                    icon = context.getComponentFactory().createCollectionIcon(object, item.id);
+                } else {
+                    throw new UnknownTypeException(item);
+                }
+                taskBar.add(icon);
+            } catch (final IsisException e) { // Catch resolveImmediately
+                                              // exception when object is
+                                              // deleted.
+
+            }
+        }
+        navigation.add(taskBar);
+    }
+
+    public void addObject(final String idString) {
+        add(new HistoryEntry(idString, HistoryEntry.OBJECT));
+    }
+
+    public void addCollection(final String idString) {
+        add(new HistoryEntry(idString, HistoryEntry.COLLECTION));
+    }
+
+    public Iterator<HistoryEntry> iterator() {
+        return history.iterator();
+    }
+
+    public void remove(final String existingId) {
+        for (final HistoryEntry entry : history) {
+            if (entry.id.equals(existingId)) {
+                history.remove(entry);
+                break;
+            }
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectLookupException.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectLookupException.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectLookupException.java
new file mode 100644
index 0000000..5a616d1
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/ObjectLookupException.java
@@ -0,0 +1,42 @@
+/*
+ *  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.context;
+
+import org.apache.isis.viewer.html.action.ActionException;
+
+public class ObjectLookupException extends ActionException {
+    private static final long serialVersionUID = 1L;
+
+    public ObjectLookupException() {
+    }
+
+    public ObjectLookupException(final String msg, final Throwable cause) {
+        super(msg, cause);
+    }
+
+    public ObjectLookupException(final String msg) {
+        super(msg);
+    }
+
+    public ObjectLookupException(final Throwable cause) {
+        super(cause);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java
new file mode 100644
index 0000000..9ac5a4c
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/PersistentRootAdapterMapping.java
@@ -0,0 +1,119 @@
+/*
+ *  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.context;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.commons.ensure.Assert;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
+import org.apache.isis.core.metamodel.adapter.version.Version;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+
+public class PersistentRootAdapterMapping extends RootAdapterMappingAbstract {
+    
+    private static final long serialVersionUID = 1L;
+    
+    private Version version;
+
+    public PersistentRootAdapterMapping(final ObjectAdapter adapter) {
+        super(adapter);
+        Assert.assertFalse("OID is for transient", adapter.getOid().isTransient());
+        Assert.assertFalse("adapter is for transient", adapter.isTransient());
+    }
+
+
+    // /////////////////////////////////////////////////////
+    // version
+    // /////////////////////////////////////////////////////
+
+    @Override
+    public Version getVersion() {
+        return version;
+    }
+
+    @Override
+    public void checkVersion(final ObjectAdapter object) {
+        object.checkLock(getVersion());
+    }
+
+    @Override
+    public void updateVersion() {
+        final ObjectAdapter adapter = getAdapterManager().getAdapterFor(getOid());
+        version = adapter.getVersion();
+    }
+
+
+    // /////////////////////////////////////////////////////
+    // restoreToLoader
+    // /////////////////////////////////////////////////////
+
+    @Override
+    public void restoreToLoader() {
+        final RootOidDefault oid = RootOidDefault.deString(getOidStr(), getOidMarshaller());
+        final ObjectAdapter adapter = getAdapterManager().adapterFor(oid);
+        adapter.setVersion(getVersion());
+    }
+
+
+    // /////////////////////////////////////////////////////
+    // value semantics
+    // /////////////////////////////////////////////////////
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (!(obj instanceof PersistentRootAdapterMapping)) {
+            return false;
+        } 
+        return ((PersistentRootAdapterMapping) obj).getOidStr().equals(getOidStr());
+    }
+
+
+    // /////////////////////////////////////////////////////
+    // debugging, toString
+    // /////////////////////////////////////////////////////
+
+    @Override
+    public void debugData(final DebugBuilder debug) {
+        debug.appendln(getOidStr());
+        if (version != null) {
+            debug.appendln(version.toString());
+        }
+    }
+
+    @Override
+    public String toString() {
+        return getOidStr() + " : " + version;
+    }
+
+    // /////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // /////////////////////////////////////////////////////
+
+    protected PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+    protected AdapterManager getAdapterManager() {
+        return getPersistenceSession().getAdapterManager();
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMapping.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMapping.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMapping.java
new file mode 100644
index 0000000..d0a6bda
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMapping.java
@@ -0,0 +1,41 @@
+/*
+ *  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.context;
+
+import java.io.Serializable;
+
+import org.apache.isis.core.commons.debug.Debuggable;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.version.Version;
+
+public interface RootAdapterMapping extends Serializable, Debuggable {
+
+    String getOidStr();
+
+    ObjectAdapter getObject();
+
+    Version getVersion();
+
+    void checkVersion(ObjectAdapter object);
+
+    void restoreToLoader();
+
+    void updateVersion();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMappingAbstract.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMappingAbstract.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMappingAbstract.java
new file mode 100644
index 0000000..0c7e1f3
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/RootAdapterMappingAbstract.java
@@ -0,0 +1,114 @@
+/*
+ *  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.context;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.Oid;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
+import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
+import org.apache.isis.core.metamodel.adapter.version.Version;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.Persistor;
+
+public abstract class RootAdapterMappingAbstract implements RootAdapterMapping {
+    
+    private static final long serialVersionUID = 1L;
+    
+    private final String oidStr;
+
+    public RootAdapterMappingAbstract(final ObjectAdapter adapter) {
+        final Oid oid = adapter.getOid();
+        oidStr = oid.enString(getOidMarshaller());
+    }
+
+    @Override
+    public String getOidStr() {
+        return oidStr;
+    }
+
+    RootOidDefault getOid() {
+        return RootOidDefault.deString(oidStr, getOidMarshaller());
+    }
+
+    @Override
+    public ObjectAdapter getObject() {
+        return getPersistenceSession().loadObject(getOid());
+    }
+
+
+    // /////////////////////////////////////////////////////
+    // version
+    // /////////////////////////////////////////////////////
+
+    @Override
+    public abstract Version getVersion();
+
+    @Override
+    public abstract void checkVersion(final ObjectAdapter object);
+
+    @Override
+    public abstract void updateVersion();
+
+    
+    // /////////////////////////////////////////////////////
+    // restoreToLoader
+    // /////////////////////////////////////////////////////
+
+    @Override
+    public abstract void restoreToLoader();
+
+
+    // /////////////////////////////////////////////////////
+    // value semantics
+    // /////////////////////////////////////////////////////
+
+    @Override
+    public int hashCode() {
+        return oidStr.hashCode();
+    }
+
+    @Override
+    public abstract boolean equals(final Object obj);
+
+
+    // /////////////////////////////////////////////////////
+    // debugging, toString
+    // /////////////////////////////////////////////////////
+
+    @Override
+    public abstract void debugData(final DebugBuilder debug);
+
+    @Override
+    public abstract String toString();
+
+    // /////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // /////////////////////////////////////////////////////
+
+    private static Persistor getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+    protected OidMarshaller getOidMarshaller() {
+		return IsisContext.getOidMarshaller();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/TransientRootAdapterMapping.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/TransientRootAdapterMapping.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/TransientRootAdapterMapping.java
new file mode 100644
index 0000000..7656f23
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/TransientRootAdapterMapping.java
@@ -0,0 +1,95 @@
+/*
+ *  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.context;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.commons.ensure.Assert;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.version.Version;
+import org.apache.isis.core.runtime.memento.Memento;
+
+public class TransientRootAdapterMapping extends RootAdapterMappingAbstract {
+    
+    private static final long serialVersionUID = 1L;
+    
+    private final Memento memento;
+
+    public TransientRootAdapterMapping(final ObjectAdapter adapter) {
+        super(adapter);
+        Assert.assertFalse("OID is for persistent", !adapter.getOid().isTransient());
+        Assert.assertFalse("adapter is for persistent", !adapter.isTransient());
+        memento = new Memento(adapter);
+    }
+
+    // /////////////////////////////////////////////////////
+    // version
+    // /////////////////////////////////////////////////////
+
+    @Override
+    public Version getVersion() {
+        return null;
+    }
+
+    @Override
+    public void checkVersion(final ObjectAdapter object) {
+    }
+
+    @Override
+    public void updateVersion() {
+    }
+
+    // /////////////////////////////////////////////////////
+    // restoreToLoader
+    // /////////////////////////////////////////////////////
+
+    @Override
+    public void restoreToLoader() {
+        memento.recreateObject();
+    }
+
+    // /////////////////////////////////////////////////////
+    // value semantics
+    // /////////////////////////////////////////////////////
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (!(obj instanceof TransientRootAdapterMapping)) {
+            return false;
+        } 
+        return ((TransientRootAdapterMapping) obj).getOidStr().equals(getOidStr());
+    }
+
+    
+
+    // /////////////////////////////////////////////////////
+    // debugging, toString
+    // /////////////////////////////////////////////////////
+
+    @Override
+    public void debugData(final DebugBuilder debug) {
+        memento.debug(debug);
+    }
+
+    @Override
+    public String toString() {
+        return "TRANSIENT : " + getOidStr() + " : " + memento;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/CollectionCrumb.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/CollectionCrumb.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/CollectionCrumb.java
new file mode 100644
index 0000000..d177118
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/CollectionCrumb.java
@@ -0,0 +1,58 @@
+/*
+ *  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.crumb;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.commons.lang.ToString;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.viewer.html.request.ForwardRequest;
+import org.apache.isis.viewer.html.request.Request;
+
+public class CollectionCrumb implements Crumb {
+    private final String collectionId;
+    private final String title;
+
+    public CollectionCrumb(final String collectionId, final ObjectAdapter collection) {
+        this.collectionId = collectionId;
+        title = collection.titleString();
+    }
+
+    @Override
+    public void debug(final DebugBuilder string) {
+        string.appendln("Collection Crumb");
+        string.appendln("object", collectionId);
+        string.appendln("title", title);
+    }
+
+    @Override
+    public String title() {
+        return title;
+    }
+
+    @Override
+    public String toString() {
+        return new ToString(this).append(title()).toString();
+    }
+
+    @Override
+    public Request changeContext() {
+        return ForwardRequest.listCollection(collectionId);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/Crumb.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/Crumb.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/Crumb.java
new file mode 100644
index 0000000..b64a583
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/Crumb.java
@@ -0,0 +1,33 @@
+/*
+ *  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.crumb;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.viewer.html.request.Request;
+
+public interface Crumb {
+    // TODO add icons to crumbs
+
+    String title();
+
+    void debug(DebugBuilder string);
+
+    Request changeContext();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectCrumb.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectCrumb.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectCrumb.java
new file mode 100644
index 0000000..b0e3c54
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectCrumb.java
@@ -0,0 +1,66 @@
+/*
+ *  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.crumb;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.commons.lang.ToString;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.viewer.html.request.ForwardRequest;
+import org.apache.isis.viewer.html.request.Request;
+
+public class ObjectCrumb implements Crumb {
+    private final String objectId;
+    private final boolean isService;
+    private final String title;
+
+    public ObjectCrumb(final String objectId, final ObjectAdapter object) {
+        this.objectId = objectId;
+        title = object.titleString();
+        isService = object.getSpecification().isService();
+    }
+
+    @Override
+    public void debug(final DebugBuilder string) {
+        string.appendln("Object Crumb");
+        string.appendln("object", objectId);
+        string.appendln("title", title);
+        string.appendln("for service", isService);
+    }
+
+    @Override
+    public String title() {
+        return title;
+    }
+
+    @Override
+    public String toString() {
+        return new ToString(this).append(title()).toString();
+    }
+
+    @Override
+    public Request changeContext() {
+        if (isService) {
+            return ForwardRequest.viewService(objectId);
+        } else {
+            return ForwardRequest.viewObject(objectId);
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectFieldCrumb.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectFieldCrumb.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectFieldCrumb.java
new file mode 100644
index 0000000..5fbd48d
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/ObjectFieldCrumb.java
@@ -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.viewer.html.crumb;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.commons.exceptions.NotYetImplementedException;
+import org.apache.isis.core.commons.lang.ToString;
+import org.apache.isis.viewer.html.request.Request;
+
+public class ObjectFieldCrumb implements Crumb {
+    private final String fieldName;
+
+    public ObjectFieldCrumb(final String fieldName) {
+        this.fieldName = fieldName;
+    }
+
+    @Override
+    public void debug(final DebugBuilder string) {
+        string.appendln("Object Field Crumb");
+        string.appendln("field name", fieldName);
+    }
+
+    @Override
+    public String title() {
+        return fieldName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToString(this).append(title()).toString();
+    }
+
+    @Override
+    public Request changeContext() {
+        throw new NotYetImplementedException();
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/TaskCrumb.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/TaskCrumb.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/TaskCrumb.java
new file mode 100644
index 0000000..c61233d
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/crumb/TaskCrumb.java
@@ -0,0 +1,62 @@
+/*
+ *  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.crumb;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.commons.lang.ToString;
+import org.apache.isis.viewer.html.request.ForwardRequest;
+import org.apache.isis.viewer.html.request.Request;
+import org.apache.isis.viewer.html.task.Task;
+
+public class TaskCrumb implements Crumb {
+    private final Task task;
+
+    public TaskCrumb(final Task task) {
+        this.task = task;
+    }
+
+    public Task getTask() {
+        return task;
+    }
+
+    @Override
+    public void debug(final DebugBuilder string) {
+        string.appendln("Task Crumb");
+        string.appendln("task", task);
+
+        task.debug(string);
+    }
+
+    @Override
+    public String title() {
+        return task.getName();
+    }
+
+    @Override
+    public String toString() {
+        return new ToString(this).append(title()).toString();
+    }
+
+    @Override
+    public Request changeContext() {
+        return ForwardRequest.task(task);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageLookup.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageLookup.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageLookup.java
new file mode 100644
index 0000000..670205b
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageLookup.java
@@ -0,0 +1,66 @@
+/*
+ *  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.image;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+
+/**
+ * ImageLookup provides an efficient way of finding the most suitable image to
+ * use.
+ * 
+ * <p>
+ * 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 {
+
+    private static ImageProvider imageProvider = new ImageProviderResourceBased();
+
+    public static ImageProvider getInstance() {
+        return imageProvider;
+    }
+
+    public static void setImageDirectory(final String imageDirectory) {
+        if (getInstance() instanceof ImageProviderDirectoryBased) {
+            final ImageProviderDirectoryBased imageProviderDirectoryBased = (ImageProviderDirectoryBased) imageProvider;
+            imageProviderDirectoryBased.setImageDirectory(imageDirectory);
+        }
+    }
+
+    public static void debug(final DebugBuilder debug) {
+        getInstance().debug(debug);
+    }
+
+    public static String image(final ObjectAdapter object) {
+        return getInstance().image(object);
+    }
+
+    public static String image(final ObjectSpecification specification) {
+        return getInstance().image(specification);
+    }
+
+    public static String image(final String name) {
+        return getInstance().image(name);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProvider.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProvider.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProvider.java
new file mode 100644
index 0000000..2f0912c
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProvider.java
@@ -0,0 +1,47 @@
+/*
+ *  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.image;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+
+/**
+ * Factors out the {@link ImageLookup} responsibilities into an interface, with
+ * a view to moving towards alternative mechanisms.
+ */
+public interface ImageProvider {
+
+    public void debug(final DebugBuilder debug);
+
+    /**
+     * 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.
+     * 
+     * @see ObjectAdapter#getIconName()
+     * @see #image(ObjectSpecification)
+     */
+    public String image(final ObjectAdapter object);
+
+    public String image(final ObjectSpecification specification);
+
+    public String image(final String name);
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderAbstract.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderAbstract.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderAbstract.java
new file mode 100644
index 0000000..27c7a9e
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderAbstract.java
@@ -0,0 +1,123 @@
+/*
+ *  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.image;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+
+public abstract class ImageProviderAbstract implements ImageProvider {
+
+    private final String DEFAULT_IMAGE = "Default";
+
+    /**
+     * The extensions we'll search for.
+     */
+    private final String[] EXTENSIONS = { "png", "gif", "jpg", "jpeg" };
+
+    private final Map<String, String> images = new HashMap<String, String>();
+
+    @Override
+    public final String image(final ObjectAdapter object) {
+
+        if (object == null) {
+            return image((String) null);
+        }
+
+        final String iconName = object.getIconName();
+        if (iconName != null) {
+            return image(iconName);
+        } else {
+            return image(object.getSpecification());
+        }
+    }
+
+    @Override
+    public final String image(final ObjectSpecification specification) {
+
+        if (specification == null) {
+            return image((String) null);
+        }
+
+        final String specShortName = specification.getShortIdentifier();
+        final String imageName = image(specShortName);
+        if (imageName != null) {
+            return imageName;
+        }
+
+        // search up the hierarchy
+        return image(specification.superclass());
+    }
+
+    @Override
+    public String image(final String name) {
+
+        if (name == null) {
+            return findImage(DEFAULT_IMAGE, EXTENSIONS);
+        }
+
+        // look up from cache
+        String imageName = images.get(name);
+        if (imageName != null) {
+            return imageName;
+        }
+
+        // delegate to subclass to see if can find the image.
+        imageName = findImage(name, EXTENSIONS);
+
+        if (imageName != null) {
+            // cache and return
+            images.put(name, imageName);
+            return imageName;
+        }
+
+        // ie loop round to return the default.
+        return image((String) null);
+    }
+
+    @Override
+    public final void debug(final DebugBuilder debug) {
+        debug.appendTitle("Image Lookup");
+        debug.indent();
+        final Iterator<String> keys = images.keySet().iterator();
+        while (keys.hasNext()) {
+            final Object key = keys.next();
+            final Object value = images.get(key);
+            debug.appendln(key + " -> " + value);
+        }
+        debug.unindent();
+    }
+
+    /**
+     * Hook method for subclass to actually return the image, else <tt>null</tt>
+     * .
+     * 
+     * @param className
+     *            - the short name of the class to search for.
+     * @param extensions
+     *            - the extensions to search for.
+     */
+    protected abstract String findImage(final String className, String[] extensions);
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBased.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBased.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBased.java
new file mode 100644
index 0000000..73d41b0
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBased.java
@@ -0,0 +1,160 @@
+/*
+ *  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.image;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.Map;
+
+import com.google.common.collect.Maps;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.commons.exceptions.IsisException;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+
+public class ImageProviderDirectoryBased implements ImageProvider {
+
+	private final static String UNKNOWN_IMAGE = "Default";
+    private final static String[] EXTENSIONS = { "png", "gif", "jpg", "jpeg" };
+    
+    private final Map<String,String> images = Maps.newHashMap();
+    
+    private File imageDirectory;
+    private String unknownImageFile;
+
+    public void setImageDirectory(final String imageDirectory) {
+        this.imageDirectory = new File(imageDirectory);
+        if (!this.imageDirectory.exists()) {
+            throw new IsisException("No image directory found: " + imageDirectory);
+        }
+        unknownImageFile = imageFile(UNKNOWN_IMAGE);
+    }
+
+    ///////////////////////////////////////////////////
+    // API
+    ///////////////////////////////////////////////////
+
+    /**
+     * 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.
+     * 
+     * @see ObjectAdapter#getIconName()
+     * @see #image(ObjectSpecification)
+     */
+    @Override
+    public String image(final ObjectAdapter object) {
+        final String iconName = object.getIconName();
+        if (iconName != null) {
+            return image(iconName);
+        } else {
+            return image(object.getSpecification());
+        }
+    }
+
+    @Override
+    public String image(final ObjectSpecification specification) {
+        final String name = specification.getShortIdentifier();
+        final String imageName = (String) images.get(name);
+        if (imageName != null) {
+            return imageName;
+        } else {
+            return findImage(specification);
+        }
+    }
+
+    @Override
+    public String image(final String name) {
+        final String imageName = (String) images.get(name);
+        if (imageName != null) {
+            return imageName;
+        } else {
+            final String fileName = imageFile(name);
+            return fileName == null ? unknownImageFile : fileName;
+        }
+    }
+
+
+    ///////////////////////////////////////////////////
+    // helpers
+    ///////////////////////////////////////////////////
+
+    private String imageFile(final String imageName) {
+        final String[] files = imageDirectory.list(new FilenameMatchesNamePlusExtension(imageName));
+
+        return files.length == 0 ? null : files[0];
+    }
+
+    private String findImage(final ObjectSpecification specification) {
+        final String name = specification.getShortIdentifier();
+        final String fileName = imageFile(name);
+        if (fileName != null) {
+            images.put(name, fileName);
+            return fileName;
+        } 
+        
+        final ObjectSpecification superclass = specification.superclass();
+		if (superclass != null) {
+		    return findImage(superclass);
+		}
+		
+		return unknownImageFile;
+    }
+
+
+    final static class FilenameMatchesNamePlusExtension implements FilenameFilter {
+		private final String imageName;
+
+		private FilenameMatchesNamePlusExtension(final String imageName) {
+			this.imageName = imageName;
+		}
+
+		@Override
+		public boolean accept(final File dir, final String name) {
+		    final int dot = name.lastIndexOf('.');
+		    if (dot <= 0) {
+		    	return false;
+		    }
+		    for (final String extension : EXTENSIONS) {
+			    if (name.substring(0, dot).equalsIgnoreCase(imageName) && name.substring(dot + 1).equalsIgnoreCase(extension)) {
+			        return true;
+			    }
+			}
+			return false;
+		}
+	}
+
+
+    ///////////////////////////////////////////////////
+    // debugging
+    ///////////////////////////////////////////////////
+
+    @Override
+    public void debug(final DebugBuilder debug) {
+        debug.appendTitle("Image Lookup");
+        debug.indent();
+        for (Map.Entry<String, String> entry: images.entrySet()) {
+            debug.appendln(entry.getKey() + " -> " + entry.getValue());
+        }
+        debug.unindent();
+    }
+
+    
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBasedReworked.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBasedReworked.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBasedReworked.java
new file mode 100644
index 0000000..16d8a83
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderDirectoryBasedReworked.java
@@ -0,0 +1,60 @@
+/*
+ *  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.image;
+
+import java.io.File;
+import java.io.FilenameFilter;
+
+import org.apache.isis.core.commons.exceptions.IsisException;
+
+public class ImageProviderDirectoryBasedReworked extends ImageProviderAbstract {
+
+    private File imageDirectory;
+
+    public void setImageDirectory(final String imageDirectory) {
+        this.imageDirectory = new File(imageDirectory);
+        if (!this.imageDirectory.exists()) {
+            throw new IsisException("No image directory found: " + imageDirectory);
+        }
+    }
+
+    @Override
+    protected String findImage(final String imageName, final String[] extensions) {
+        final String[] files = imageDirectory.list(new FilenameFilter() {
+            @Override
+            public boolean accept(final File dir, final String name) {
+                final int dot = name.lastIndexOf('.');
+                if (dot > 0) {
+                    final String nameWithoutExtension = name.substring(0, dot);
+                    final String nameExtension = name.substring(dot + 1);
+                    for (final String extension : extensions) {
+                        if (nameWithoutExtension.equalsIgnoreCase(imageName) && nameExtension.equalsIgnoreCase(extension)) {
+                            return true;
+                        }
+                    }
+                }
+                return false;
+            }
+        });
+
+        return files.length == 0 ? null : files[0];
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderResourceBased.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderResourceBased.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderResourceBased.java
new file mode 100644
index 0000000..c1ed289
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/image/ImageProviderResourceBased.java
@@ -0,0 +1,72 @@
+/*
+ *  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.image;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.isis.core.commons.lang.Resources;
+
+public class ImageProviderResourceBased extends ImageProviderAbstract {
+
+    /**
+     * Is an array since easy to maintain
+     */
+    public final static String[] DEFAULT_LOCATIONS = { "images", "src/main/resources", "src/main/java" };
+
+    /**
+     * Is a list since easy to inject.
+     */
+    private List<String> locations = new ArrayList<String>();
+
+    /**
+     * Initializes {@link #locations} with {@link #DEFAULT_LOCATIONS}, but can
+     * be overridden using {@link #setLocations(List)}.
+     */
+    public ImageProviderResourceBased() {
+        locations.addAll(Arrays.asList(DEFAULT_LOCATIONS));
+    }
+
+    @Override
+    protected String findImage(final String className, final String[] extensions) {
+
+        for (final String location : locations) {
+            for (final String extension : extensions) {
+                final String candidate = location + "/" + className + "." + extension;
+                if (Resources.getResourceAsFile(candidate) != null) {
+                    return candidate;
+                }
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Optionally inject the locations where the provider will search.
+     * 
+     * <p>
+     * If not specified, will use the locations in {@link #DEFAULT_LOCATIONS}.
+     */
+    public void setLocations(final List<String> locations) {
+        this.locations = locations;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ForwardRequest.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ForwardRequest.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ForwardRequest.java
new file mode 100644
index 0000000..bfb1808
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ForwardRequest.java
@@ -0,0 +1,138 @@
+/*
+ *  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.request;
+
+import org.apache.isis.viewer.html.task.Task;
+
+public class ForwardRequest implements Request {
+
+    public static Request editObject(final String objectId) {
+        return new ForwardRequest(EDIT_COMMAND, objectId);
+    }
+
+    public static Request listCollection(final String collectionId) {
+        return new ForwardRequest(COLLECTION_COMMAND, collectionId);
+    }
+
+    public static ForwardRequest viewObject(final String objectId) {
+        return new ForwardRequest(OBJECT_COMMAND, objectId);
+    }
+
+    public static Request viewObject(final String objectId, final String collectionField) {
+        return new ForwardRequest(OBJECT_COMMAND, objectId, collectionField);
+    }
+
+    public static Request viewService(final String objectId) {
+        return new ForwardRequest(SERVICE_COMMAND, objectId);
+    }
+
+    public static Request task(final Task task) {
+        final ForwardRequest forwardRequest = new ForwardRequest(TASK_COMMAND, null);
+        forwardRequest.taskId = task.getId();
+        return forwardRequest;
+    }
+
+    public static Request taskComplete() {
+        final ForwardRequest forwardRequest = new ForwardRequest(TASK_COMMAND, null);
+        forwardRequest.submitName = "Ok";
+        return forwardRequest;
+    }
+
+    private final String actionName;
+    private Request forwardedRequest;
+    private final String objectId;
+    private final String fieldName;
+    private String submitName;
+    private String taskId;
+
+    private ForwardRequest(final String actionName, final String id) {
+        this(actionName, id, null);
+    }
+
+    private ForwardRequest(final String actionName, final String objectId, final String fieldName) {
+        this.actionName = actionName;
+        this.objectId = objectId;
+        this.fieldName = fieldName;
+    }
+
+    @Override
+    public void forward(final Request forwardedRequest) {
+        this.forwardedRequest = forwardedRequest;
+    }
+
+    @Override
+    public String getActionId() {
+        return null;
+    }
+
+    @Override
+    public String getElementId() {
+        return null;
+    }
+
+    @Override
+    public String getName() {
+        return null;
+    }
+
+    @Override
+    public String getRequestType() {
+        return actionName;
+    }
+
+    @Override
+    public String getButtonName() {
+        return submitName;
+    }
+
+    @Override
+    public String getProperty() {
+        return fieldName;
+    }
+
+    @Override
+    public String getFieldEntry(final int i) {
+        return null;
+    }
+
+    @Override
+    public String getTaskId() {
+        return taskId;
+    }
+
+    @Override
+    public Request getForward() {
+        return forwardedRequest;
+    }
+
+    @Override
+    public String getObjectId() {
+        return objectId;
+    }
+
+    @Override
+    public String toString() {
+        return "ForwardRequest " + actionName + " " + forwardedRequest;
+    }
+
+    public static Request logon() {
+        return new ForwardRequest("logon", null);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/Request.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/Request.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/Request.java
new file mode 100644
index 0000000..8681660
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/Request.java
@@ -0,0 +1,72 @@
+/*
+ *  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.request;
+
+/**
+ * The Request object represents all the information collected from the user
+ * when requesting the server do something.
+ */
+public interface Request {
+    public static final String EDIT_COMMAND = "edit";
+    public static final String COLLECTION_COMMAND = "collection";
+    public static final String FIELD_COLLECTION_COMMAND = "fieldCollection";
+    public static final String OBJECT_COMMAND = "object";
+    public static final String SERVICE_COMMAND = "serviceOption";
+    public static final String TASK_COMMAND = "task";
+    public static final String LOGON_COMMAND = "task";
+
+    void forward(Request object);
+
+    String getActionId();
+
+    /**
+     * Name of a property within an object.
+     */
+    String getProperty();
+
+    /**
+     * The element within a collection.
+     */
+    String getElementId();
+
+    /**
+     * The users entry into a field on the form.
+     */
+    String getFieldEntry(int i);
+
+    Request getForward();
+
+    String getObjectId();
+
+    /**
+     * Name of the request. See the constants defined in this class.
+     */
+    String getRequestType();
+
+    String getTaskId();
+
+    /**
+     * Name of the button pressed on the form.
+     */
+    String getButtonName();
+
+    String getName();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ServletRequest.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ServletRequest.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ServletRequest.java
new file mode 100644
index 0000000..0ca1bda
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ServletRequest.java
@@ -0,0 +1,98 @@
+/*
+ *  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.request;
+
+import javax.servlet.http.HttpServletRequest;
+
+public class ServletRequest implements Request {
+    private Request forwardRequest;
+    private final HttpServletRequest request;
+    private final String requestType;
+
+    public ServletRequest(final HttpServletRequest request) {
+        this.request = request;
+
+        final String path = request.getServletPath();
+        final int from = path.lastIndexOf('/');
+        final int to = path.lastIndexOf('.');
+        requestType = path.substring(from + 1, to);
+    }
+
+    @Override
+    public void forward(final Request forwardRequest) {
+        this.forwardRequest = forwardRequest;
+    }
+
+    @Override
+    public String getActionId() {
+        return request.getParameter("action");
+    }
+
+    @Override
+    public String getProperty() {
+        return request.getParameter("field");
+    }
+
+    @Override
+    public String getElementId() {
+        return request.getParameter("element");
+    }
+
+    @Override
+    public String getFieldEntry(final int i) {
+        return request.getParameter("fld" + i);
+    }
+
+    @Override
+    public String getTaskId() {
+        return request.getParameter("id");
+    }
+
+    @Override
+    public Request getForward() {
+        return forwardRequest;
+    }
+
+    @Override
+    public String getName() {
+        return request.getParameter("name");
+    }
+
+    @Override
+    public String getObjectId() {
+        return request.getParameter("id");
+    }
+
+    @Override
+    public String getRequestType() {
+        return requestType;
+    }
+
+    @Override
+    public String getButtonName() {
+        return request.getParameter("button");
+    }
+
+    @Override
+    public String toString() {
+        return "ServletRequest " + request.getRequestURI() + "?" + request.getQueryString();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/AbstractHtmlViewerServlet.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/AbstractHtmlViewerServlet.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/AbstractHtmlViewerServlet.java
new file mode 100644
index 0000000..a4cda01
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/AbstractHtmlViewerServlet.java
@@ -0,0 +1,82 @@
+/*
+ *  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.servlet;
+
+import javax.servlet.http.HttpServlet;
+
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.runtime.authentication.AuthenticationManager;
+import org.apache.isis.core.runtime.system.DeploymentType;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.viewer.html.PathBuilder;
+import org.apache.isis.viewer.html.PathBuilderDefault;
+import org.apache.isis.viewer.html.component.html.HtmlComponentFactory;
+
+public abstract class AbstractHtmlViewerServlet extends HttpServlet {
+
+    private static final long serialVersionUID = 1L;
+
+    private PathBuilder pathBuilder;
+    private HtmlComponentFactory componentFactory;
+
+    protected HtmlComponentFactory getHtmlComponentFactory() {
+        if(componentFactory == null) {
+            componentFactory = new HtmlComponentFactory(getPathBuilder());
+        }
+        return componentFactory;
+    }
+
+    protected PathBuilder getPathBuilder() {
+        if (pathBuilder != null) {
+            return pathBuilder;
+        }
+        return pathBuilder = new PathBuilderDefault(getServletContext());
+    }
+
+
+    /**
+     * Convenience.
+     */
+    protected String pathTo(final String prefix) {
+        return getPathBuilder().pathTo(prefix);
+    }
+
+    // //////////////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // //////////////////////////////////////////////////////////////
+
+    protected AuthenticationSession getAuthenticationSession() {
+        return IsisContext.getAuthenticationSession();
+    }
+
+    protected IsisConfiguration getConfiguration() {
+        return IsisContext.getConfiguration();
+    }
+
+    protected AuthenticationManager getAuthenticationManager() {
+        return IsisContext.getAuthenticationManager();
+    }
+
+    protected DeploymentType getDeploymentType() {
+        return IsisContext.getDeploymentType();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/ControllerServlet.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/ControllerServlet.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/ControllerServlet.java
new file mode 100644
index 0000000..3c84343
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/ControllerServlet.java
@@ -0,0 +1,154 @@
+/*
+ *  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.servlet;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.viewer.html.PathBuilder;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+import org.apache.isis.viewer.html.request.ServletRequest;
+import org.apache.isis.viewer.html.servlet.internal.WebController;
+
+public class ControllerServlet extends AbstractHtmlViewerServlet {
+
+    private static final long serialVersionUID = 1L;
+    private static final Logger LOG = Logger.getLogger(ControllerServlet.class);
+
+    private String encoding;
+    private WebController controller;
+
+    // //////////////////////////////////////////////////////////////////
+    // init
+    // //////////////////////////////////////////////////////////////////
+
+    @Override
+    public void init(final ServletConfig servletConfig) throws ServletException {
+        super.init(servletConfig);
+        encoding =
+            getConfiguration().getString(HtmlServletConstants.ENCODING_KEY, HtmlServletConstants.ENCODING_DEFAULT);
+
+        controller = getWebController(getPathBuilder());
+
+        final boolean debugEnabled = getConfiguration().getBoolean(HtmlServletConstants.DEBUG_KEY);
+        controller.setDebug(debugEnabled);
+
+        controller.init();
+    }
+
+    // Don't remove this - It allows other implementations of HtmlViewer to replace the WebController
+    protected WebController getWebController(PathBuilder pathBuilder) {
+        if (controller == null) {
+            controller = new WebController(getPathBuilder());
+        }
+        return controller;
+    }
+
+    // //////////////////////////////////////////////////////////////////
+    // doGet, doPost
+    // //////////////////////////////////////////////////////////////////
+
+    @Override
+    protected void doPost(final HttpServletRequest request, final HttpServletResponse response)
+        throws ServletException, IOException {
+        request.setCharacterEncoding(encoding);
+        processRequest(request, response);
+    }
+
+    @Override
+    protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException,
+        IOException {
+        processRequest(request, response);
+    }
+
+    private void processRequest(final HttpServletRequest request, final HttpServletResponse response)
+        throws ServletException, IOException {
+        LOG.info("request: " + request.getServletPath() + "?" + request.getQueryString());
+
+        final Request req = new ServletRequest(request);
+
+        if (req.getRequestType() == null) {
+            throw new ServletException("No action specified");
+        } else if (!controller.actionExists(req)) {
+            throw new ServletException("No such action " + req.getRequestType());
+        } else {
+            try {
+                final Context context = getContextForRequest(request);
+                processRequest(request, response, req, context);
+            } catch (final Exception e) {
+                LOG.error("exception during request handling", e);
+                throw new ServletException("Internal exception", e);
+            }
+        }
+    }
+
+    private Context getContextForRequest(final HttpServletRequest request) {
+        final AuthenticationSession authSession = getAuthenticationSession();
+        Context context = (Context) authSession.getAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY);
+        if (context == null || !context.isValid()) {
+            context = new Context(getHtmlComponentFactory());
+            authSession.setAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY, context);
+        }
+        return context;
+    }
+
+    private void processRequest(final HttpServletRequest request, final HttpServletResponse response,
+        final Request req, final Context context) throws IOException, ServletException {
+        response.setContentType("text/html");
+        response.setCharacterEncoding(encoding);
+        // no need to check if logged in; the IsisSessionFilter would
+        // have prevented us from getting here.
+
+        final Page page = controller.generatePage(context, req);
+        if (context.isValid()) {
+            if (controller.isDebug()) {
+                controller.addDebug(page, req);
+                addDebug(request, page);
+            }
+            PrintWriter writer;
+            writer = response.getWriter();
+            page.write(writer);
+        } else {
+            response.sendRedirect(getLogonPage());
+        }
+    }
+
+    protected String getLogonPage() {
+        return pathTo(HtmlServletConstants.LOGON_PAGE);
+    }
+
+    private void addDebug(final HttpServletRequest request, final Page page) {
+        page.addDebug("Servlet path", request.getServletPath());
+        page.addDebug("Query string", request.getQueryString());
+        page.addDebug("Context path", request.getContextPath());
+        page.addDebug("Path info", request.getPathInfo());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/HtmlServletConstants.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/HtmlServletConstants.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/HtmlServletConstants.java
new file mode 100644
index 0000000..4f40f75
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/HtmlServletConstants.java
@@ -0,0 +1,48 @@
+/*
+ *  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.servlet;
+
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.commons.config.ConfigurationConstants;
+
+public final class HtmlServletConstants {
+
+    static final String PROPERTY_BASE = ConfigurationConstants.ROOT + "viewer.html.";
+
+    static final String DEBUG_KEY = PROPERTY_BASE + "debug";
+
+    static final String ENCODING_KEY = PROPERTY_BASE + "encoding";
+    static final String ENCODING_DEFAULT = "ISO-8859-1";
+
+    public static final String SUFFIX_INIT_PARAM = "viewer-html.suffix";
+    public static final String SUFFIX_INIT_PARAM_VALUE_DEFAULT = "app";
+
+    /**
+     * Binding to the {@link AuthenticationSession}.
+     */
+    static final String AUTHENTICATION_SESSION_CONTEXT_KEY = "isis-context";
+
+    public static final String LOGON_PAGE = "logon";
+    static final String START_PAGE = "start";
+
+    private HtmlServletConstants() {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/LogonServlet.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/LogonServlet.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/LogonServlet.java
new file mode 100644
index 0000000..79d5859
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/LogonServlet.java
@@ -0,0 +1,124 @@
+/*
+ *  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.servlet;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
+import org.apache.isis.core.runtime.authentication.AuthenticationRequestPassword;
+import org.apache.isis.core.runtime.authentication.exploration.AuthenticationRequestExploration;
+import org.apache.isis.core.runtime.authentication.standard.RegistrationDetailsPassword;
+import org.apache.isis.core.runtime.system.DeploymentType;
+import org.apache.isis.core.webapp.IsisSessionFilter;
+import org.apache.isis.core.webapp.auth.AuthenticationSessionStrategy;
+import org.apache.isis.viewer.html.component.html.HtmlComponentFactory;
+import org.apache.isis.viewer.html.component.html.LogonFormPage;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.monitoring.servermonitor.Monitor;
+
+public class LogonServlet extends AbstractHtmlViewerServlet {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final Logger LOG = Logger.getLogger(LogonServlet.class);
+
+    private AuthenticationSessionStrategy authenticationSessionStrategy;
+
+    @Override
+    public void init() throws ServletException {
+        authenticationSessionStrategy = IsisSessionFilter.lookup(getServletConfig().getInitParameter(IsisSessionFilter.AUTHENTICATION_SESSION_STRATEGY_KEY));
+    }
+
+    @Override
+    protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
+        doPost(request, response);
+    }
+
+    @Override
+    protected void doPost(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
+
+        // look for existing valid session
+        final AuthenticationSession existingAuthSession = authenticationSessionStrategy.lookupValid(request, response);
+        if (existingAuthSession != null) {
+            redirectToStartPage(response, existingAuthSession.getUserName());
+            return;
+        }
+
+        // prompt
+        final String user = request.getParameter("username");
+        final String password = request.getParameter("password");
+        if (user == null && !getDeploymentType().isExploring()) {
+            renderPrompt(response, "", "", null);
+            return;
+        }
+
+        // authenticate; re-prompt if required
+        final AuthenticationSession authSession = authenticate(user, password);
+        if (authSession == null) {
+            renderPrompt(response, user, password, "user/password invalid");
+            return;
+        }
+
+        // authenticated
+        authenticationSessionStrategy.bind(request, response, authSession);
+
+        final Context context = new Context(getHtmlComponentFactory());
+        context.setSession(authSession);
+        authSession.setAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY, context);
+
+        LOG.info("created session");
+        redirectToStartPage(response, user);
+    }
+
+    protected HtmlComponentFactory getHtmlComponentFactory() {
+        return new HtmlComponentFactory(getPathBuilder());
+    }
+
+    private void redirectToStartPage(final HttpServletResponse response, final String user) throws IOException {
+        Monitor.addEvent("Web", "Logon - " + user);
+        response.sendRedirect(pathTo(HtmlServletConstants.START_PAGE));
+    }
+
+    private void renderPrompt(final HttpServletResponse response, final String user, final String password, final String error) throws IOException {
+        response.setContentType("text/html");
+        final HtmlComponentFactory factory = getHtmlComponentFactory();
+        final boolean registerLink = getAuthenticationManager().supportsRegistration(RegistrationDetailsPassword.class);
+        final LogonFormPage page = factory.createLogonPage(user, password, registerLink, error);
+        page.write(response.getWriter());
+    }
+
+    protected AuthenticationSession authenticate(final String user, final String password) {
+        AuthenticationRequest request;
+        if (getDeploymentType() == DeploymentType.EXPLORATION) {
+            request = new AuthenticationRequestExploration();
+        } else {
+            request = new AuthenticationRequestPassword(user, password);
+        }
+        return getAuthenticationManager().authenticate(request);
+    }
+
+}


[07/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java
new file mode 100644
index 0000000..ce0be9f
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlForm.java
@@ -0,0 +1,183 @@
+/*
+ *  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.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.viewer.html.PathBuilder;
+import org.apache.isis.viewer.html.component.ComponentComposite;
+import org.apache.isis.viewer.html.component.Form;
+
+public class HtmlForm extends ComponentComposite implements Form {
+
+    private final boolean confirm;
+    private final boolean hasNext;
+    private final boolean hasPrevious;
+    private final boolean isEditing;
+    private final String id;
+
+    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(final PathBuilder pathBuilder, final String id, final String action, final int page, final int noOfPages, final boolean confirm, final boolean isEditing) {
+        super(pathBuilder);
+        this.id = id;
+        this.confirm = confirm;
+        this.isEditing = isEditing;
+        hasPrevious = page >= 1;
+        hasNext = page < noOfPages - 1;
+    }
+
+    private void addField(final String label, final String field, final String description, final boolean readOnly, final boolean required, final String errorMessage) {
+        String error = "";
+        if (errorMessage != null) {
+            error = "<span class=\"error\"> " + errorMessage + "</span>";
+        }
+        String optional = "";
+        if (!readOnly) {
+            if (!required) {
+                optional = "<span class=\"optional\"> (optional)</span>";
+            } else {
+                optional = "<span class=\"required\"> *</span>";
+            }
+        }
+        add(new Html(pathBuilder, "<div class=\"field\" title=\"" + description + "\"><span class=\"label\">" + label + "</span><span class=\"separator\">: </span> " + field + optional + error + "</div>"));
+    }
+
+    @Override
+    public void addField(final ObjectSpecification spec, final String label, final String title, final String field, final String value, final int noLines, final boolean wrap, final int maxLength, final int typicalLength, final boolean required, final String error) {
+        String inputField;
+        /*
+         * REVIEW the following qualification are a bit limited - it's the
+         * simplest thing than will work - we need to determine from the
+         * specification whether something is boolean type or a password.
+         * 
+         * Also see the note in the Form I/F.
+         */
+        boolean ignoreMandatory = false;
+        if (spec.isOfType(IsisContext.getSpecificationLoader().loadSpecification(boolean.class)) || spec.isOfType(IsisContext.getSpecificationLoader().loadSpecification(Boolean.class))) {
+            final String selected = (value != null && value.toLowerCase().equals("true")) ? "checked " : "";
+            inputField = "<input class=\"value\" type=\"checkbox\" name=\"" + field + "\"" + selected + " value=\"true\"/>";
+            ignoreMandatory = true;
+        } else if (spec.getFullIdentifier().endsWith(".Password")) {
+            final String typicalLengthStr = typicalLength == 0 ? "" : (" size=\"" + typicalLength + "\"");
+            final String maxLengthStr = maxLength == 0 ? "" : (" maxlength=\"" + maxLength + "\"");
+            inputField = "<input class=\"value\" type=\"password\" name=\"" + field + "\"" + typicalLengthStr + maxLengthStr + "value=\"" + value + "\"/>";
+
+        } else if (noLines > 1) {
+            final int w = typicalLength > 0 ? typicalLength / noLines : 50;
+            inputField = "<textarea class=\"value\" type=\"text\" name=\"" + field + "\" rows=\"" + noLines + "\" cols=\"" + w + "\" wrap=\"" + (wrap ? "hard" : "off") + "\">" + value + "</textarea>";
+        } else {
+            final String typicalLengthStr = typicalLength == 0 ? "" : (" size=\"" + typicalLength + "\"");
+            final String maxLengthStr = maxLength == 0 ? "" : (" maxlength=\"" + maxLength + "\"");
+            inputField = "<input class=\"value\" type=\"text\" name=\"" + field + "\"" + typicalLengthStr + maxLengthStr + "value=\"" + value + "\"/>";
+        }
+        addField(label, inputField, title, ignoreMandatory, required, error);
+    }
+
+    public void addFieldName(final String fieldLabel) {
+        add(new Heading(pathBuilder, fieldLabel, 4));
+    }
+
+    @Override
+    public void addLookup(final String fieldLabel, final String description, final String fieldId, final int selectedIndex, final String[] instances, final String[] ids, final boolean required, final String errorMessage) {
+        final StringBuffer testInputField = new StringBuffer();
+        testInputField.append("<select class=\"value\" name=\"" + fieldId + "\">");
+        if (!required) {
+            testInputField.append("<option");
+            if (selectedIndex < 0) {
+                testInputField.append(" selected");
+            }
+            testInputField.append(" value=\"");
+            testInputField.append("null");
+            testInputField.append("\" >[not set]</option>");
+        }
+        for (int i = 0; i < instances.length; i++) {
+            testInputField.append("<option");
+            if (i == selectedIndex) {
+                testInputField.append(" selected");
+            }
+            testInputField.append(" value=\"");
+            testInputField.append(ids[i]);
+            testInputField.append("\" >");
+            testInputField.append(instances[i]);
+            testInputField.append("</option>");
+        }
+        testInputField.append("</select>");
+
+        addField(fieldLabel, testInputField.toString(), description, false, required, errorMessage);
+    }
+
+    @Override
+    public void addReadOnlyField(final String fieldLabel, final String title, final String description) {
+        addField(fieldLabel, "<span class=\"value\">" + title + "</span>", description, true, false, null);
+    }
+
+    @Override
+    public void addReadOnlyCheckbox(final String fieldLabel, final boolean isSet, final String description) {
+        addField(fieldLabel, "<input class=\"value\" type=\"checkbox\" disabled " + (isSet ? "checked" : "") + "/>", description, true, false, null);
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        super.write(writer);
+    }
+
+    @Override
+    protected void writeAfter(final PrintWriter writer) {
+        writer.println("<div class=\"field\">");
+        if (hasNext) {
+            writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Next\"/>");
+            if (isEditing) {
+                writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Save\"/>");
+            } else {
+                writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Finish\"/>");
+            }
+        } else {
+            if (isEditing) {
+                writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Save\"/>");
+            } else {
+                writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Ok\"/>");
+            }
+        }
+        if (hasPrevious) {
+            writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Previous\"/>");
+        }
+        writer.println("<input class=\"action-button\" type=\"submit\" name=\"button\" value=\"Cancel\"/>");
+        writer.println("</div>");
+        writer.println("</form>");
+    }
+
+    @Override
+    protected void writeBefore(final PrintWriter writer) {
+        writer.print("<form name=\"form\" action=\"");
+        writer.print(pathTo("task"));
+        writer.print("\" method=\"post\"");
+        if (confirm) {
+            writer.print(" onSubmit=\"return confirm('Are you sure')\"");
+        }
+        writer.println(">");
+        writer.println("<input type=\"hidden\" name=\"id\" value=\"" + id + "\"/>");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java
new file mode 100644
index 0000000..0a14693
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/HtmlTable.java
@@ -0,0 +1,115 @@
+/*
+ *  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.Component;
+import org.apache.isis.viewer.html.component.ComponentComposite;
+import org.apache.isis.viewer.html.component.Table;
+
+public class HtmlTable extends ComponentComposite implements Table {
+    private String summary;
+    private final TableHeader header;
+    private final int noColumns;
+    private Row row;
+    private int cellCount;
+    private final boolean addSelector;
+
+    public HtmlTable(final PathBuilder pathBuilder, final int noColumns, final boolean withSelectorColumn) {
+        super(pathBuilder);
+        this.noColumns = noColumns + (withSelectorColumn ? 1 : 0);
+        addSelector = withSelectorColumn;
+        header = new TableHeader(pathBuilder);
+    }
+
+    public Row newRow() {
+        final Row row = new Row(pathBuilder);
+        add(row);
+        return row;
+    }
+
+    @Override
+    public void setSummary(final String summary) {
+        this.summary = summary;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.print("<table summary=\"" + summary + "\">");
+        writer.print("<tr><th></th>");
+        header.write(writer);
+        writer.println("</tr>");
+        super.write(writer);
+        writer.println("</table>");
+    }
+
+    @Override
+    protected void write(final PrintWriter writer, final Component component) {
+        writer.print("<tr>");
+        component.write(writer);
+        if (addSelector) {
+            writer.print("<td><input type=\"checkbox\" value=\"selected\"/></td>");
+        }
+        writer.println("</tr>");
+    }
+
+    @Override
+    public void addCell(final String value, final boolean truncate) {
+        row.addCell(value, truncate);
+        cellCount++;
+        if (cellCount > noColumns) {
+            throw new HtmlException("Too many cells added: " + cellCount);
+        }
+    }
+
+    @Override
+    public void addEmptyCell() {
+        addCell(new Span("empty-cell", "", null));
+    }
+
+    @Override
+    public void addCell(final Component component) {
+        row.add(component);
+        cellCount++;
+        if (cellCount > noColumns) {
+            throw new HtmlException("Too many cells added: " + cellCount);
+        }
+    }
+
+    @Override
+    public void addColumnHeader(final String name) {
+        header.addHeader(name);
+        cellCount++;
+        if (cellCount > noColumns) {
+            throw new HtmlException("Too many cells added: " + cellCount);
+        }
+    }
+
+    @Override
+    public void addRowHeader(final Component component) {
+        row = new Row(pathBuilder);
+        add(row);
+        cellCount = 0;
+        row.addCell(component);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Link.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Link.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Link.java
new file mode 100644
index 0000000..79d585f
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Link.java
@@ -0,0 +1,50 @@
+/*
+ *  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.Component;
+
+public class Link implements Component {
+
+    private final PathBuilder pathBuilder;
+    private final String link;
+    private final String name;
+    private final String description;
+
+    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;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.print("<a class=\"link\" title=\"" + description + "\" href=\"" + pathTo(link) + "\">" + name + "</a>");
+    }
+
+    protected String pathTo(final String link) {
+        return pathBuilder.pathTo(link);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java
new file mode 100644
index 0000000..c0993ce
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/LogonFormPage.java
@@ -0,0 +1,91 @@
+/*
+ *  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 LogonFormPage extends AbstractHtmlPage {
+    private final String user;
+    private final String password;
+    private final boolean registerLink;
+    private final String error;
+
+    public LogonFormPage(final PathBuilder pathBuilder, final String styleSheet, final String header, final String footer, final String user, final String password, final boolean registerLink, final String error) {
+        super(pathBuilder, styleSheet, header, footer);
+        this.user = user;
+        this.password = password;
+        this.registerLink = registerLink;
+        this.error = error;
+    }
+
+    @Override
+    protected void writeContent(final PrintWriter writer) {
+        writer.println("<div id=\"view\">");
+        writer.println("<div class=\"header\">");
+        writer.println("<span class=\"header-text\">Please enter a user name and password.</span>");
+        writer.println("</div>");
+        writer.println("<FORM ACTION=\"" + pathTo("logon") + "\" METHOD=\"post\">");
+        writer.println("<div id=\"content\">");
+        if (error != null) {
+            writer.println("<div class=\"error\">");
+            writer.println(error);
+            writer.println("</div>");
+        }
+        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=\"action-button\"><INPUT TYPE=\"submit\" VALUE=\"Log in\" NAME=\"Log in\"></div>");
+        if (registerLink) {
+            writer.print("<a class=\"link nav-link\" title=\"Register new user name and password\" href=\"" + pathTo("register") + "\">register</a>");
+        }
+        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) {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java
new file mode 100644
index 0000000..753be7f
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/MenuItem.java
@@ -0,0 +1,101 @@
+/*
+ *  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.core.metamodel.spec.ActionType;
+import org.apache.isis.viewer.html.PathBuilder;
+import org.apache.isis.viewer.html.component.Component;
+
+public class MenuItem implements Component {
+    private final String actionId;
+    private final String actionName;
+    private final String objectId;
+    private final String actionDescription;
+    private final String reasonDisabled;
+    private final boolean takesParameters;
+    private final ActionType type;
+    private final PathBuilder pathBuilder;
+
+    public MenuItem(final 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.pathBuilder = pathBuilder;
+        this.actionName = actionName;
+        this.actionDescription = actionDescription;
+        this.reasonDisabled = reasonDisabled;
+        this.type = type;
+        this.takesParameters = takesParameters;
+        this.objectId = objectId;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.print("<div class=\"menu-item\">");
+        if (isEmpty(reasonDisabled)) {
+            writeEnabledLink(writer);
+        } else {
+            writeDisabledLink(writer);
+        }
+        writer.println("</div>");
+    }
+
+    private boolean isEmpty(final String str) {
+        return str == null || str.length() == 0;
+    }
+
+    private void writeDisabledLink(final PrintWriter writer) {
+        writer.print("<div class=\"disabled\" title=\"");
+        writer.print(reasonDisabled);
+        writer.print("\">");
+        writer.print(actionName);
+        if (takesParameters) {
+            writer.print(". . .");
+        }
+        writer.print("</div>");
+    }
+
+    private void writeEnabledLink(final PrintWriter writer) {
+        writer.print("<a title=\"");
+        writer.print(actionDescription);
+        writer.print("\" href=\"");
+        writer.print(pathTo("method") + "?id=");
+        writer.print(objectId);
+        writer.print("&amp;action=");
+        writer.print(actionId);
+        writer.print("\">");
+        if (type == ActionType.EXPLORATION) {
+            writer.print("[");
+            writer.print(actionName);
+            writer.print("]");
+        } else {
+            writer.print(actionName);
+        }
+        if (takesParameters) {
+            writer.print(". . .");
+        }
+        writer.print("</a>");
+    }
+
+    protected String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java
new file mode 100644
index 0000000..68211b1
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ObjectIcon.java
@@ -0,0 +1,78 @@
+/*
+ *  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.core.metamodel.adapter.ObjectAdapter;
+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;
+
+public class ObjectIcon implements Component {
+    private final ObjectAdapter element;
+    private final String id;
+    private final String style;
+    private final String description;
+    private final PathBuilder pathBuilder;
+
+    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;
+        this.style = style;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.print("<div class=\"");
+        writer.print(style);
+        writer.print("\"");
+        if (description != null) {
+            writer.print(" title=\"");
+            writer.print(description);
+            writer.print("\"");
+        }
+        writer.print(">");
+
+        writer.print("<a href=\"");
+        writer.print(pathTo(Request.OBJECT_COMMAND) + "?id=");
+        writer.print(id);
+        writer.print("\"><img src=\"");
+        writer.print(ImageLookup.image(element));
+        writer.print("\" alt=\"");
+        final String singularName = element.getSpecification().getSingularName();
+        writer.print(singularName);
+        writer.print("\"");
+        writer.print("/>");
+        writer.print(element.titleString());
+        writer.print("</a>");
+
+        writer.println("</div>");
+
+    }
+
+    protected String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java
new file mode 100644
index 0000000..751e592
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/RegisterFormPage.java
@@ -0,0 +1,87 @@
+/*
+ *  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;
+    private final String error;
+
+    public RegisterFormPage(final PathBuilder pathBuilder, final String styleSheet, final String header, final String footer, final String user, final String password, final String error) {
+        super(pathBuilder, styleSheet, header, footer);
+        this.user = user;
+        this.password = password;
+        this.error = error;
+    }
+
+    @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\">");
+        if (error != null) {
+            writer.println("<div class=\"error\">");
+            writer.println(error);
+            writer.println("</div>");
+        }
+        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=\"password\" NAME=\"password2\" value=\"" + password + "\"></DIV>");
+        writer.println("<div class=\"action-button\"><INPUT TYPE=\"submit\" VALUE=\"Register\" NAME=\"Register\"></div>");
+        writer.print("<a class=\"link nav-link\" title=\"Back to the login page\" href=\"" + pathTo("login") + "\">back to login</a>");
+        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) {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Row.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Row.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Row.java
new file mode 100644
index 0000000..92c4ad5
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Row.java
@@ -0,0 +1,60 @@
+/*
+ *  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.Component;
+import org.apache.isis.viewer.html.component.ComponentComposite;
+
+class Row extends ComponentComposite {
+
+    public Row(final PathBuilder pathBuilder) {
+        super(pathBuilder);
+    }
+
+    private static final int TRUNCATE_LENGTH = 18;
+
+    @Override
+    protected void write(final PrintWriter writer, final Component component) {
+        writer.print("<td>");
+        component.write(writer);
+        writer.println("</td>");
+    }
+
+    public void addCell(final String string, final boolean truncate) {
+        String s;
+        if (truncate) {
+            s = string.substring(0, Math.min(TRUNCATE_LENGTH, string.length()));
+            if (string.length() > TRUNCATE_LENGTH) {
+                s += "...";
+            }
+        } else {
+            s = string;
+        }
+        add(new Html(pathBuilder, s));
+    }
+
+    public void addCell(final Component component) {
+        add(component);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java
new file mode 100644
index 0000000..29c4cfc
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ServiceComponent.java
@@ -0,0 +1,62 @@
+/*
+ *  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.Component;
+import org.apache.isis.viewer.html.image.ImageLookup;
+
+public class ServiceComponent implements Component {
+
+    private final String id;
+    private final String name;
+    private final String iconName;
+    private final PathBuilder pathBuilder;
+
+    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;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.print("<div class=\"item\">");
+
+        writer.print("<a href=\"");
+        writer.print(pathTo("serviceOption") + "?id=");
+        writer.print(id);
+        writer.print("\"><img src=\"");
+        writer.print(ImageLookup.image(iconName));
+        writer.print("\" alt=\"service\" />");
+        writer.print(name);
+        writer.print("</a>");
+
+        writer.println("</div>");
+    }
+
+    protected String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Span.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Span.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Span.java
new file mode 100644
index 0000000..b9684f1
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Span.java
@@ -0,0 +1,55 @@
+/*
+ *  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.commons.lang.StringEscapeUtils;
+
+import org.apache.isis.viewer.html.component.Component;
+
+public class Span implements Component {
+    private final String className;
+    private final String value;
+    private final String description;
+
+    public Span(final String className, final String value, final String description) {
+        this.className = className;
+        this.value = value;
+        this.description = description;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.print("<span class=\"");
+        writer.print(className);
+        writer.print("\"");
+        if (description != null) {
+            writer.print(" title=\"");
+            writer.print(description);
+            writer.print("\"");
+        }
+        writer.print(">");
+        if (value != null) {
+            writer.print(StringEscapeUtils.escapeHtml(value));
+        }
+        writer.print("</span>");
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Submenu.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Submenu.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Submenu.java
new file mode 100644
index 0000000..7d5ad56
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Submenu.java
@@ -0,0 +1,46 @@
+/*
+ *  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.component.Component;
+
+public class Submenu implements Component {
+
+    private final String menuName;
+    private final Component[] items;
+
+    public Submenu(final String menuName, final Component[] items) {
+        this.menuName = menuName;
+        this.items = items;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.println("<div class=\"submenu-item\">");
+        writer.println(menuName);
+        for (final Component item : items) {
+            item.write(writer);
+        }
+        writer.println("</div>");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java
new file mode 100644
index 0000000..3c75955
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TableHeader.java
@@ -0,0 +1,44 @@
+/*
+ *  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.Component;
+import org.apache.isis.viewer.html.component.ComponentComposite;
+
+class TableHeader extends ComponentComposite {
+
+    public TableHeader(final PathBuilder pathBuilder) {
+        super(pathBuilder);
+    }
+
+    @Override
+    protected void write(final PrintWriter writer, final Component component) {
+        writer.print("<th>");
+        component.write(writer);
+        writer.println("</th>");
+    }
+
+    public void addHeader(final String string) {
+        add(new Html(pathBuilder, string));
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java
new file mode 100644
index 0000000..8f1716a
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/TextBlock.java
@@ -0,0 +1,56 @@
+/*
+ *  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.ComponentAbstract;
+
+class TextBlock extends ComponentAbstract {
+    StringBuffer buffer = new StringBuffer();
+
+    public TextBlock(final PathBuilder pathBuilder, final String text) {
+        super(pathBuilder);
+        append(text);
+    }
+
+    public TextBlock(final PathBuilder pathBuilder) {
+        super(pathBuilder);
+    }
+
+    public void append(final String string) {
+        buffer.append(string);
+    }
+
+    public void appendBold(final String string) {
+        buffer.append("<b>");
+        buffer.append(string);
+        buffer.append("</b>");
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writeTag(writer, "p class=\"unknown\"");
+        writer.print(buffer.toString());
+        writer.println("</p>");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java
new file mode 100644
index 0000000..dad71c2
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/UserSwapLink.java
@@ -0,0 +1,52 @@
+/*
+ *  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.Component;
+
+final class UserSwapLink implements Component {
+    private final PathBuilder pathBuilder;
+    private final String name;
+
+    UserSwapLink(final PathBuilder pathBuilder, final String name) {
+        this.pathBuilder = pathBuilder;
+        this.name = name;
+    }
+
+    @Override
+    public void write(final PrintWriter writer) {
+        writer.print("<a class=\"user\" href=\"" + pathTo("setuser") + "?name=");
+        writer.print(name);
+        writer.print("\" title=\"Change user to " + name);
+        writer.print("\">");
+        writer.print(name);
+        writer.println("</a>");
+    }
+
+    protected String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ViewDiv.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ViewDiv.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ViewDiv.java
new file mode 100644
index 0000000..5b99d4e
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ViewDiv.java
@@ -0,0 +1,145 @@
+/*
+ *  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 java.util.ArrayList;
+import java.util.List;
+
+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.ViewPane;
+import org.apache.isis.viewer.html.image.ImageLookup;
+
+public class ViewDiv extends ComponentComposite implements ViewPane {
+
+    private String iconName;
+    private String objectId;
+    private Component[] menu = new Component[0];
+    private String title;
+    private final List<String> messages = new ArrayList<String>();
+    private final List<String> warnings = new ArrayList<String>();
+    private String description;
+
+    public ViewDiv(final PathBuilder pathBuilder) {
+        super(pathBuilder);
+    }
+
+    @Override
+    public void setIconName(final String iconName) {
+        this.iconName = iconName;
+    }
+
+    public void setLink(final String objectId) {
+        this.objectId = objectId;
+    }
+
+    @Override
+    public void setMenu(final Component[] menu) {
+        this.menu = menu;
+    }
+
+    @Override
+    public void setTitle(final String title, final String description) {
+        this.title = title;
+        this.description = description;
+    }
+
+    @Override
+    public void setWarningsAndMessages(final List<String> messages, final List<String> warnings) {
+        this.messages.addAll(messages);
+        this.warnings.addAll(warnings);
+    }
+
+    @Override
+    protected void writeBefore(final PrintWriter writer) {
+        writer.println("<div id=\"view\">");
+        writeHeader(writer);
+        writeMenu(writer);
+        writer.println("<div id=\"content\">");
+    }
+
+    @Override
+    protected void writeAfter(final PrintWriter writer) {
+        writer.println("</div>");
+        writer.println("</div>");
+        writeMessages(writer);
+    }
+
+    private void writeMessages(final PrintWriter writer) {
+        if (warnings.size() > 0 || messages.size() > 0) {
+            writer.print("<div class=\"message-header\">");
+            for (final String warning : warnings) {
+                writer.print("<div class=\"warning\">");
+                writer.print(warning);
+                writer.println("</div>");
+            }
+            for (final String message : messages) {
+                writer.print("<div class=\"message\">");
+                writer.print(message);
+                writer.println("</div>");
+            }
+            writer.print("</div>");
+        }
+    }
+
+    private void writeMenu(final PrintWriter writer) {
+        writer.println("<div id=\"menu\">");
+        writer.println("<h3>Actions</h3>");
+        for (final Component element : menu) {
+            element.write(writer);
+        }
+        writer.println("</div>");
+    }
+
+    private void writeHeader(final PrintWriter writer) {
+        writer.print("<div class=\"header\"");
+        if (description != null) {
+            writer.print(" title=\"");
+            writer.print(description);
+            writer.print("\"");
+        }
+        writer.print(">");
+        if (objectId != null) {
+            writer.print("<a href=\"" + pathTo("object") + "?id=");
+            writer.print(objectId);
+            writer.print("\">");
+        }
+        if (iconName != null) {
+            writer.print("<span class=\"header-icon\"><img src=\"");
+            writer.print(ImageLookup.image(iconName));
+            writer.print("\" alt=\"icon\" /></span>");
+        }
+        writer.print("<span class=\"header-text\"");
+        writer.print(">");
+        writer.print(title);
+        writer.println("</span>");
+        if (objectId != null) {
+            writer.print("</a>");
+        }
+        writer.println("</div>");
+    }
+
+    @Override
+    protected String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/WebViewerException.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/WebViewerException.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/WebViewerException.java
new file mode 100644
index 0000000..0da52ca
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/WebViewerException.java
@@ -0,0 +1,43 @@
+/*
+ *  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 org.apache.isis.core.commons.exceptions.IsisException;
+
+public class WebViewerException extends IsisException {
+    private static final long serialVersionUID = 1L;
+
+    public WebViewerException() {
+        super();
+    }
+
+    public WebViewerException(final String msg, final Throwable cause) {
+        super(msg, cause);
+    }
+
+    public WebViewerException(final String msg) {
+        super(msg);
+    }
+
+    public WebViewerException(final Throwable cause) {
+        super(cause);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/CollectionMapping.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/CollectionMapping.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/CollectionMapping.java
new file mode 100644
index 0000000..e97f16e
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/CollectionMapping.java
@@ -0,0 +1,154 @@
+/*
+ *  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.context;
+
+import java.util.Iterator;
+import java.util.List;
+
+import com.google.common.collect.Lists;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
+import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacetUtils;
+import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacet;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+
+/**
+ * Has value semantics based on the value semantics of the underlying list that
+ * it wraps.
+ */
+public class CollectionMapping implements Iterable<String> {
+    
+    private final List<String> list = Lists.newArrayList();
+    private final ObjectSpecification elementSpecification;
+
+    public CollectionMapping(final Context context, final ObjectAdapter collection) {
+        final TypeOfFacet typeOfFacet = collection.getSpecification().getFacet(TypeOfFacet.class);
+        elementSpecification = typeOfFacet.valueSpec();
+
+        final CollectionFacet collectionFacet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
+        
+        for (ObjectAdapter element : collectionFacet.iterable(collection)) {
+            final String objectId = context.mapObject(element);
+            list.add(objectId);
+        }
+    }
+
+    public ObjectAdapter getCollection(final Context context) {
+        final List<Object> elementPojos = Lists.newArrayList();
+        
+        for (String elementId : list) {
+            final ObjectAdapter adapter = context.getMappedObject(elementId);
+            final Object pojo = adapter.getObject();
+            elementPojos.add(pojo);
+        }
+        return getAdapterManager().adapterFor(elementPojos);
+    }
+
+    public ObjectSpecification getElementSpecification() {
+        return elementSpecification;
+    }
+
+    
+    public Iterator<String> iterator() {
+        return list.iterator();
+    }
+
+    public boolean contains(final String id) {
+        for (String elementId : list) {
+            if (elementId.equals(id)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public void remove(final String existingId) {
+        for (final String elementId: list) {
+            if (elementId.equals(existingId)) {
+                list.remove(existingId);
+                break;
+            }
+        }
+    }
+
+
+    // //////////////////////////////////////////////////////
+    // debugging
+    // //////////////////////////////////////////////////////
+
+    public void debug(final DebugBuilder debug) {
+        debug.indent();
+        for (String elementId : list) {
+            debug.appendln(elementId);
+        }
+        debug.unindent();
+    }
+
+
+
+    // //////////////////////////////////////////////////////
+    // equals, hashCode
+    // //////////////////////////////////////////////////////
+
+    /**
+     * Value semantics based on the identity of the underlying list that this
+     * wraps.
+     */
+    @Override
+    public int hashCode() {
+        return list.hashCode();
+    }
+
+    @Override
+    public boolean equals(final Object other) {
+        if (other == this) {
+            return true;
+        }
+        if (other == null) {
+            return false;
+        }
+        if (other.getClass() != this.getClass()) {
+            return false;
+        }
+        return equals((CollectionMapping) other);
+    }
+
+    public boolean equals(final CollectionMapping other) {
+        return this.list.equals(other.list);
+    }
+
+    // //////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // //////////////////////////////////////////////////////
+
+    private static AdapterManager getAdapterManager() {
+        return getPersistenceSession().getAdapterManager();
+    }
+
+    private static PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/Context.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/Context.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/Context.java
new file mode 100644
index 0000000..c6545fa
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/Context.java
@@ -0,0 +1,654 @@
+/*
+ *  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.context;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Stack;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.commons.ensure.Assert;
+import org.apache.isis.core.commons.exceptions.IsisException;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.version.ConcurrencyException;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.core.runtime.system.transaction.UpdateNotifier;
+import org.apache.isis.core.runtime.userprofile.UserProfile;
+import org.apache.isis.viewer.html.component.Block;
+import org.apache.isis.viewer.html.component.ComponentFactory;
+import org.apache.isis.viewer.html.crumb.CollectionCrumb;
+import org.apache.isis.viewer.html.crumb.Crumb;
+import org.apache.isis.viewer.html.crumb.ObjectCrumb;
+import org.apache.isis.viewer.html.crumb.ObjectFieldCrumb;
+import org.apache.isis.viewer.html.crumb.TaskCrumb;
+import org.apache.isis.viewer.html.request.Request;
+import org.apache.isis.viewer.html.task.Task;
+
+public class Context implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final Logger LOG = Logger.getLogger(Context.class);
+    
+    private transient ObjectHistory history;
+
+    private final ComponentFactory componentFactory;
+
+    private final Map<String, RootAdapterMapping> objectMap = Maps.newHashMap();
+    private final Map<String, RootAdapterMapping> serviceMap = Maps.newHashMap();
+    private final Map<String, CollectionMapping> collectionMap = Maps.newHashMap();
+    private final Map<String, ObjectAction> actionMap = Maps.newHashMap();
+    
+    private final Stack<Crumb> crumbs = new Stack<Crumb>();
+    private final List<String> messages = Lists.newArrayList();
+    private final List<String> warnings = Lists.newArrayList();
+
+    private AuthenticationSession session;
+    
+    private boolean isValid;
+    private int max;
+
+    // ////////////////////////////////////////////////////
+    // constructor, init
+    // ////////////////////////////////////////////////////
+
+    public Context(final ComponentFactory componentFactory) {
+        this.componentFactory = componentFactory;
+        this.isValid = true;
+        clearMessagesAndWarnings();
+        LOG.debug(this + " created with " + componentFactory);
+    }
+
+    public void init() {
+        final AdapterManager adapterManager = getAdapterManager();
+        final List<Object> services = getUserProfile().getPerspective().getServices();
+        for (final Object service : services) {
+            final ObjectAdapter serviceAdapter = adapterManager.adapterFor(service);
+            if (serviceAdapter == null) {
+                LOG.warn("unable to find service: " + service + "; skipping");
+                continue;
+            }
+            mapObject(serviceAdapter);
+        }
+        serviceMap.putAll(objectMap);
+    }
+
+
+    public ComponentFactory getComponentFactory() {
+        return componentFactory;
+    }
+
+
+    // ////////////////////////////////////////////////////
+    // validity 
+    // ////////////////////////////////////////////////////
+
+    public boolean isValid() {
+        return isValid;
+    }
+
+    public void invalidate() {
+        isValid = false;
+    }
+    
+    
+    // ////////////////////////////////////////////////////
+    // session 
+    // ////////////////////////////////////////////////////
+
+    public boolean isLoggedIn() {
+        return session != null;
+    }
+
+    public void setSession(final AuthenticationSession currentSession) {
+        this.session = currentSession;
+    }
+
+    public AuthenticationSession getSession() {
+        return session;
+    }
+
+
+    // ////////////////////////////////////////////////////
+    // processChanges 
+    // ////////////////////////////////////////////////////
+
+    public void processChanges() {
+        final List<ObjectAdapter> disposedObjects = getUpdateNotifier().getDisposedObjects();
+        for (final ObjectAdapter adapter : disposedObjects) {
+            final RootAdapterMapping mapping = persistentOrTransientObjectMappingFor(adapter);
+            if (objectMap.containsValue(mapping)) {
+                processChangeFor(mapping);
+            }
+        }
+    }
+
+    private void processChangeFor(final RootAdapterMapping mapping) {
+        final String existingId = findExistingInMap(objectMap, mapping);
+        getObjectHistory().remove(existingId);
+
+        final List<Crumb> relatedCrumbs = Lists.newArrayList();
+        for (final Crumb crumb : getCrumbs()) {
+            /*
+             * if (crumb.isFor(existingId)) { relatedCrumbs.add(crumb);
+             * }
+             */}
+        for (final Crumb crumb : relatedCrumbs) {
+            crumbs.remove(crumb);
+        }
+
+        for (final CollectionMapping collection : collectionMap.values()) {
+            collection.remove(existingId);
+        }
+        objectMap.remove(existingId);
+    }
+
+    // ////////////////////////////////////////////////////
+    // changeContext 
+    // ////////////////////////////////////////////////////
+
+    public Request changeContext(final int id) {
+        while (crumbs.size() - 1 > id) {
+            crumbs.pop();
+        }
+        final Crumb c = crumbs.lastElement();
+        return c.changeContext();
+    }
+
+
+    
+    // ////////////////////////////////////////////////////
+    // Crumbs
+    // ////////////////////////////////////////////////////
+
+    public void addCollectionFieldCrumb(final String collectionFieldName) {
+        crumbs.push(new ObjectFieldCrumb(collectionFieldName));
+    }
+
+    public void addCollectionCrumb(final String id) {
+        while (crumbs.size() > 0 && !(crumbs.lastElement() instanceof TaskCrumb)) {
+            crumbs.pop();
+        }
+        crumbs.push(new CollectionCrumb(id, getMappedCollection(id)));
+    }
+
+    public void setObjectCrumb(final ObjectAdapter object) {
+        while (crumbs.size() > 0 && !(crumbs.lastElement() instanceof TaskCrumb)) {
+            crumbs.pop();
+        }
+        final String id = mapObject(object);
+        crumbs.push(new ObjectCrumb(id, object));
+    }
+
+
+    public void addTaskCrumb(final Task task) {
+        while (crumbs.size() > 1 && !(crumbs.lastElement() instanceof ObjectCrumb)) {
+            crumbs.pop();
+        }
+        Assert.assertNotNull(task);
+        Assert.assertTrue(!isTask());
+        task.init(this);
+        crumbs.push(new TaskCrumb(task));
+    }
+
+    
+    public Crumb[] getCrumbs() {
+        final int size = crumbs.size();
+        final Crumb[] taskList = new Crumb[size];
+        for (int i = 0; i < crumbs.size(); i++) {
+            taskList[i] = crumbs.get(i);
+        }
+        return taskList;
+    }
+
+    public boolean[] isLinked() {
+        final int size = crumbs.size();
+        final boolean[] isLinked = new boolean[size];
+        for (int i = size - 1; i >= 0; i--) {
+            final boolean isTask = crumbs.elementAt(i) instanceof TaskCrumb;
+            isLinked[i] = i != size - 1;
+            if (isTask) {
+                break;
+            }
+        }
+        return isLinked;
+    }
+
+
+    // ////////////////////////////////////////////////////
+    // Mappings
+    // ////////////////////////////////////////////////////
+
+    public String mapAction(final ObjectAction action) {
+        return findExistingOrAddToMap(actionMap, action);
+    }
+
+    public String mapObject(final ObjectAdapter adapter) {
+        return findExistingOrAddToMap(objectMap, persistentOrTransientObjectMappingFor(adapter));
+    }
+
+    public String mapCollection(final ObjectAdapter collection) {
+        return findExistingOrAddToMap(collectionMap, new CollectionMapping(this, collection));
+    }
+
+    public ObjectAction getMappedAction(final String id) {
+        return getMappedInstance(actionMap, id);
+    }
+
+    public ObjectAdapter getMappedCollection(final String id) {
+        final CollectionMapping map = getMappedInstance(collectionMap, id);
+        return map.getCollection(this);
+    }
+
+    public ObjectAdapter getMappedObject(final String id) {
+        final RootAdapterMapping mappedObject = getMappedInstance(objectMap, id);
+        final ObjectAdapter adapter = mappedObject.getObject();
+
+        // ensure resolved if currently a ghost;
+        // start/end xactn if required
+        if (adapter.representsPersistent() && adapter.isGhost()) {
+            getPersistenceSession().resolveImmediately(adapter);
+        }
+
+        try {
+            mappedObject.checkVersion(adapter);
+        } catch (final ConcurrencyException e) {
+            LOG.info("concurrency conflict: " + e.getMessage());
+            messages.clear();
+            messages.add(e.getMessage());
+            messages.add("Reloaded object " + adapter.titleString());
+            updateVersion(adapter);
+        }
+        return adapter;
+    }
+
+    
+    private <T> String findExistingOrAddToMap(final Map<String,T> map, final T object) {
+        Assert.assertNotNull(object);
+        if (map.containsValue(object)) {
+            return findExistingInMap(map, object);
+        } else {
+            return addToMap(map, object);
+        }
+    }
+
+    private <T> String addToMap(final Map<String,T> map, final T object) {
+        
+        String id;
+        // bit hacky...
+        if(object instanceof RootAdapterMapping) {
+            // object or (internal) collection
+            RootAdapterMapping adapterMapping = (RootAdapterMapping) object;
+            id = adapterMapping.getOidStr();
+        } else {
+            max++;
+            id = "" + max;
+        }
+        map.put(id, object);
+
+        final String mapName = map == objectMap ? "object" : (map == collectionMap ? "collection" : "action");
+        if(LOG.isDebugEnabled()) {
+            LOG.debug("add " + object + " to " + mapName + " as #" + id);
+        }
+        return id;
+    }
+
+    private <T> String findExistingInMap(final Map<String, T> map, final Object object) {
+        for (final String id : map.keySet()) {
+            if (object.equals(map.get(id))) {
+                return id;
+            }
+        }
+        throw new IsisException();
+    }
+
+    private <T> T getMappedInstance(final Map<String,T> map, final String id) {
+        final T object = map.get(id);
+        if (object == null) {
+            final String mapName = mapNameFor(map);
+            throw new ObjectLookupException("No object in " + mapName + " map with id " + id);
+        }
+        return object;
+    }
+
+    private <T> String mapNameFor(final Map<String, T> map) {
+        return (map == objectMap) ? "object" : (map == collectionMap ? "collection" : "action");
+    }
+
+    private static RootAdapterMapping persistentOrTransientObjectMappingFor(final ObjectAdapter adapter) {
+        return adapter.isTransient() ? new TransientRootAdapterMapping(adapter) : new PersistentRootAdapterMapping(adapter);
+    }
+
+    
+
+    // ////////////////////////////////////////////////////
+    // Instances 
+    // ////////////////////////////////////////////////////
+
+    /**
+     * Returns an array of instances of the specified type that are currently
+     * known in the current context, ie have been recently seen by the user.
+     * 
+     * <p>
+     * These will be resolved if required, with a transaction created (and
+     * ended) if required.
+     */
+    public ObjectAdapter[] getKnownInstances(final ObjectSpecification type) {
+
+        final List<ObjectAdapter> instances = Lists.newArrayList();
+
+        for (final String id : objectMap.keySet()) {
+            final ObjectAdapter adapter = getMappedObject(id);
+            
+            getPersistenceSession().resolveImmediately(adapter);
+            if (adapter.getSpecification().isOfType(type)) {
+                instances.add(adapter);
+            }
+        }
+
+        final ObjectAdapter[] array = new ObjectAdapter[instances.size()];
+        instances.toArray(array);
+        return array;
+    }
+
+    public void restoreAllObjectsToLoader() {
+        for (Map.Entry<String, RootAdapterMapping> mapEntry : objectMap.entrySet()) {
+            final RootAdapterMapping rootAdapterMapping = mapEntry.getValue();
+            rootAdapterMapping.restoreToLoader();
+        }
+    }
+
+    public void purgeObjectsAndCollections() {
+        
+        clearMessagesAndWarnings();
+
+        final Map<String, CollectionMapping> collMappingById = Maps.newHashMap();
+        final Map<String, RootAdapterMapping> objectMappingById = Maps.newHashMap();
+
+        for (HistoryEntry entry : getObjectHistory()) {
+            if (entry.type == HistoryEntry.OBJECT) {
+                copyObjectMapping(objectMappingById, entry);
+            } else if (entry.type == HistoryEntry.COLLECTION) {
+                copyCollectionMapping(collMappingById, objectMappingById, entry);
+            }
+        }
+
+        collectionMap.clear();
+        collectionMap.putAll(collMappingById);
+        objectMap.clear();
+        objectMap.putAll(objectMappingById);
+        objectMap.putAll(serviceMap);
+    }
+
+    private void copyObjectMapping(final Map<String, RootAdapterMapping> objectMappingById, HistoryEntry entry) {
+        final RootAdapterMapping item = objectMap.get(entry.id);
+        objectMappingById.put(entry.id, item);
+        
+        LOG.debug("copied object map " + entry.id + " for " + item);
+        item.updateVersion();
+    }
+    
+    private void copyCollectionMapping(final Map<String, CollectionMapping> collMappingById, final Map<String, RootAdapterMapping> objectMappingById, HistoryEntry entry) {
+        
+        final CollectionMapping coll = collectionMap.get(entry.id);
+        collMappingById.put(entry.id, coll);
+        LOG.debug("copied collection map for " + coll);
+        
+        for (String elementId : coll) {
+            final RootAdapterMapping objMapping = objectMap.get(elementId);
+            
+            if (objMapping != null) {
+                objectMappingById.put(elementId, objMapping);
+                
+                LOG.debug("copied object map " + elementId + " for " + objMapping);
+                objMapping.updateVersion();
+            }
+        }
+    }
+
+    // ////////////////////////////////////////////////////
+    // Tasks 
+    // ////////////////////////////////////////////////////
+
+    public Task getTask(final String taskId) {
+        Task task = null;
+        for (int i = crumbs.size() - 1; i >= 0; i--) {
+            final Object crumb = crumbs.get(i);
+            if (crumb instanceof TaskCrumb) {
+                final TaskCrumb taskCrumb = (TaskCrumb) crumb;
+                final String id = taskCrumb.getTask().getId();
+                if (taskId.equals(id)) {
+                    task = taskCrumb.getTask();
+                    break;
+                }
+            }
+        }
+        return task;
+    }
+
+    public void endTask(final Task task) {
+        for (int i = crumbs.size() - 1; i >= 0; i--) {
+            final Object crumb = crumbs.get(i);
+            if (crumb instanceof TaskCrumb) {
+                final TaskCrumb taskCrumb = (TaskCrumb) crumb;
+                if (taskCrumb.getTask() == task) {
+                    crumbs.remove(taskCrumb);
+                    return;
+                }
+            }
+        }
+        throw new IsisException("No crumb found for " + task);
+    }
+
+
+    public Request cancelTask(final Task task) {
+        if (task != null) {
+            endTask(task);
+        }
+
+        // REVIEW does this take us back to the right object?
+        final Crumb crumb = crumbs.get(crumbs.size() - 1);
+        return crumb.changeContext();
+    }
+
+    private boolean isTask() {
+        final int index = crumbs.size() - 1;
+        return index >= 0 && crumbs.get(index) instanceof TaskCrumb;
+    }
+
+    
+
+    // ////////////////////////////////////////////////////
+    // Messages 
+    // ////////////////////////////////////////////////////
+
+    public List<String> getMessages() {
+        return messages;
+    }
+
+    public String getMessage(final int i) {
+        return messages.get(i);
+    }
+
+    public List<String> getWarnings() {
+        return warnings;
+    }
+
+    public String getWarning(final int i) {
+        return warnings.get(i);
+    }
+
+    public void setMessagesAndWarnings(final List<String> messages, final List<String> warnings) {
+        this.messages.clear();
+        this.messages.addAll(messages);
+        this.warnings.clear();
+        this.warnings.addAll(warnings);
+    }
+
+    public void clearMessagesAndWarnings() {
+        messages.clear();
+        warnings.clear();
+    }
+
+
+    public void listHistory(final Context context, final Block navigation) {
+        getObjectHistory().listObjects(context, navigation);
+    }
+
+    public void addObjectToHistory(final String idString) {
+        getObjectHistory().addObject(idString);
+    }
+
+    public void addCollectionToHistory(final String idString) {
+        getObjectHistory().addCollection(idString);
+    }
+
+    // ////////////////////////////////////////////////////
+    // 
+    // ////////////////////////////////////////////////////
+
+
+    public void updateVersion(final ObjectAdapter adapter) {
+        if (adapter.isTransient()) {
+            return;
+        }
+
+        // TODO refactor this for clarity: removes existing mapping and replaces
+        // it with a new one as it
+        // contains the new version
+        final String id = mapObject(adapter);
+        if (id != null) {
+            final RootAdapterMapping mapping = new PersistentRootAdapterMapping(adapter);
+            objectMap.put(id, mapping);
+        }
+    }
+
+
+    // ////////////////////////////////////////////////////
+    // Debug 
+    // ////////////////////////////////////////////////////
+
+    public void debug(final DebugBuilder debug) {
+        debug.startSection("Web Session Context");
+        debug.appendAsHexln("hash", hashCode());
+        debug.appendln("session", session);
+        debug.appendln("is valid", isValid);
+        debug.appendln("next id", max);
+        debug.appendln("factory", componentFactory);
+        debug.appendln("is task", isTask());
+
+        debug.appendln("crumbs (" + crumbs.size() + ")");
+
+        debug.indent();
+        for (int i = 0; i < crumbs.size(); i++) {
+            final Crumb crumb = crumbs.get(i);
+            debug.appendln(i + 1 + ". " + crumb);
+            debug.indent();
+            crumb.debug(debug);
+            debug.unindent();
+        }
+        debug.unindent();
+
+        debug.startSection("Objects");
+        for (final String id : objectMap.keySet()) {
+            final RootAdapterMapping object = objectMap.get(id);
+            debug.appendln(id + " -> " + object.getOidStr());
+            debug.indent();
+            object.debugData(debug);
+            debug.unindent();
+        }
+        debug.endSection();
+
+        debug.startSection("Collections");
+        for (final String id : collectionMap.keySet()) {
+            final CollectionMapping coll = collectionMap.get(id);
+            debug.appendln(id + " -> collection of " + coll.getElementSpecification().getPluralName());
+            coll.debug(debug);
+        }
+        debug.endSection();
+
+        debug.startSection("Actions");
+        debugMap(debug, actionMap);
+        debug.endSection();
+
+        debug.startSection("History");
+        getObjectHistory().debug(debug);
+        debug.endSection();
+
+        debug.endSection();
+    }
+
+    private void debugMap(final DebugBuilder debug, final Map<String,?> map) {
+        final Iterator<String> names = map.keySet().iterator();
+        while (names.hasNext()) {
+            final String name = names.next();
+            debug.appendln(name + " -> " + map.get(name));
+        }
+    }
+
+
+    // ////////////////////////////////////////////////////
+    // Non-serializable
+    // ////////////////////////////////////////////////////
+    
+    private ObjectHistory getObjectHistory() {
+        if(history == null) {
+            history = new ObjectHistory();
+        }
+        return history;
+    }
+
+
+    // ////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // ////////////////////////////////////////////////////
+
+    protected UserProfile getUserProfile() {
+        return IsisContext.getUserProfile();
+    }
+
+    protected AdapterManager getAdapterManager() {
+        return getPersistenceSession().getAdapterManager();
+    }
+
+
+    protected PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+    protected UpdateNotifier getUpdateNotifier() {
+        return IsisContext.getUpdateNotifier();
+    }
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/HistoryEntry.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/HistoryEntry.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/HistoryEntry.java
new file mode 100644
index 0000000..836a0e2
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/context/HistoryEntry.java
@@ -0,0 +1,49 @@
+/*
+ *  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.context;
+
+public class HistoryEntry {
+    public static final int OBJECT = 1;
+    public static final int COLLECTION = 2;
+
+    public final int type;
+    public final String id;
+
+    public HistoryEntry(final String idString, final int type) {
+        this.id = idString;
+        this.type = type;
+    }
+
+    @Override
+    public int hashCode() {
+        return id.hashCode();
+    }
+
+    @Override
+    public boolean equals(final Object obj) {
+        return ((HistoryEntry) obj).id.equals(id);
+    }
+
+    @Override
+    public String toString() {
+        return (type == OBJECT ? "object " : "collection ") + id;
+    }
+
+}


[18/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/RemoveItemFromCollection.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/RemoveItemFromCollection.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/RemoveItemFromCollection.java
deleted file mode 100644
index 88c61e9..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/RemoveItemFromCollection.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *  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.action.edit;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
-import org.apache.isis.viewer.html.action.Action;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.ForwardRequest;
-import org.apache.isis.viewer.html.request.Request;
-
-public class RemoveItemFromCollection implements Action {
-
-    @Override
-    public void execute(final Request request, final Context context, final Page page) {
-        final String objectId = request.getObjectId();
-        final String elementId = request.getElementId();
-        final String collectionField = request.getProperty();
-
-        final ObjectAdapter target = context.getMappedObject(objectId);
-        final ObjectAdapter element = context.getMappedObject(elementId);
-        final ObjectSpecification specification = target.getSpecification();
-        final OneToManyAssociation field = (OneToManyAssociation) specification.getAssociation(collectionField);
-        field.removeElement(target, element);
-
-        request.forward(ForwardRequest.viewObject(objectId, collectionField));
-    }
-
-    @Override
-    public String name() {
-        return "remove";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/Save.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/Save.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/Save.java
deleted file mode 100644
index e424770..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/Save.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *  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.action.edit;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.core.runtime.system.transaction.IsisTransactionManager;
-import org.apache.isis.viewer.html.action.Action;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.ForwardRequest;
-import org.apache.isis.viewer.html.request.Request;
-
-public class Save implements Action {
-
-    @Override
-    public void execute(final Request request, final Context context, final Page page) {
-
-        final ObjectAdapter adapter = context.getMappedObject(request.getObjectId());
-
-        // xactn mgmt now done by PersistenceSession#makePersistent()
-        // getTransactionManager().startTransaction();
-        getPersistenceSession().makePersistent(adapter);
-        // getTransactionManager().endTransaction();
-
-        // return to view
-        request.forward(ForwardRequest.viewObject(request.getObjectId()));
-    }
-
-    // /////////////////////////////////////////////////////
-    // Dependencies (from context)
-    // /////////////////////////////////////////////////////
-
-    private IsisTransactionManager getTransactionManager() {
-        return getPersistenceSession().getTransactionManager();
-    }
-
-    private PersistenceSession getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
-    }
-
-    @Override
-    public String name() {
-        return "save";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/About.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/About.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/About.java
deleted file mode 100644
index 8d05fda..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/About.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  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.action.misc;
-
-import org.apache.isis.core.runtime.about.AboutIsis;
-import org.apache.isis.viewer.html.action.Action;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.component.ViewPane;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public class About implements Action {
-
-    @Override
-    public void execute(final Request request, final Context context, final Page page) {
-        final ViewPane content = page.getViewPane();
-        content.setTitle("About", null);
-
-        content.add(context.getComponentFactory().createInlineBlock("about", AboutIsis.getApplicationName(), null));
-        content.add(context.getComponentFactory().createInlineBlock("about", AboutIsis.getApplicationVersion(), null));
-        content.add(context.getComponentFactory().createInlineBlock("about", AboutIsis.getApplicationCopyrightNotice(), null));
-
-        content.add(context.getComponentFactory().createInlineBlock("about", AboutIsis.getFrameworkName(), null));
-        content.add(context.getComponentFactory().createInlineBlock("about", AboutIsis.getFrameworkVersion(), null));
-        content.add(context.getComponentFactory().createInlineBlock("about", AboutIsis.getFrameworkCopyrightNotice(), null));
-    }
-
-    @Override
-    public String name() {
-        return "about";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SetUser.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SetUser.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SetUser.java
deleted file mode 100644
index 1ef5d66..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SetUser.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  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.action.misc;
-
-import org.apache.isis.core.runtime.authentication.exploration.MultiUserExplorationSession;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.html.action.Action;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.component.ViewPane;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public class SetUser implements Action {
-
-    @Override
-    public void execute(final Request request, final Context context, final Page page) {
-        final String name = request.getName();
-        final MultiUserExplorationSession session = (MultiUserExplorationSession) IsisContext.getAuthenticationSession();
-        session.setCurrentSession(name);
-
-        final ViewPane content = page.getViewPane();
-        content.setTitle("Exploration User changed to " + name, null);
-
-    }
-
-    @Override
-    public String name() {
-        return "setuser";
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SwapUser.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SwapUser.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SwapUser.java
deleted file mode 100644
index 381c353..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/misc/SwapUser.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  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.action.misc;
-
-import java.util.StringTokenizer;
-
-import org.apache.isis.core.runtime.authentication.exploration.ExplorationAuthenticatorConstants;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.html.action.Action;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.component.ViewPane;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public class SwapUser implements Action {
-
-    @Override
-    public void execute(final Request request, final Context context, final Page page) {
-        final ViewPane content = page.getViewPane();
-        content.setTitle("Swap Exploration User", null);
-
-        // TODO pick out users from the perspectives, but only show when in
-        // exploration mode
-        final String users = IsisContext.getConfiguration().getString(ExplorationAuthenticatorConstants.USERS);
-        if (users != null) {
-            final StringTokenizer st = new StringTokenizer(users, ",");
-            if (st.countTokens() > 0) {
-                while (st.hasMoreTokens()) {
-                    final String token = st.nextToken();
-                    int end = token.indexOf(':');
-                    if (end == -1) {
-                        end = token.length();
-                    }
-                    final String name = token.substring(0, end).trim();
-
-                    content.add(context.getComponentFactory().createUserSwap(name));
-                }
-            }
-        }
-
-        // TODO find user list and interate through them
-        /*
-         * content.add(context.getFactory().createInlineBlock("title",
-         * AboutIsis.getApplicationName(), null));
-         * content.add(context.getFactory().createInlineBlock("title",
-         * AboutIsis.getApplicationVersion(), null));
-         * content.add(context.getFactory().createInlineBlock("title",
-         * AboutIsis.getApplicationCopyrightNotice(), null));
-         * 
-         * content.add(context.getFactory().createInlineBlock("title",
-         * AboutIsis.getFrameworkName(), null));
-         * content.add(context.getFactory().createInlineBlock("title",
-         * AboutIsis.getFrameworkVersion(), null));
-         * content.add(context.getFactory().createInlineBlock("title",
-         * AboutIsis.getFrameworkCopyrightNotice(), null));
-         */
-    }
-
-    @Override
-    public String name() {
-        return "swapuser";
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/CollectionView.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/CollectionView.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/CollectionView.java
deleted file mode 100644
index 2164e4b..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/CollectionView.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  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.action.view;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacet;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters;
-import org.apache.isis.viewer.html.action.Action;
-import org.apache.isis.viewer.html.action.ActionException;
-import org.apache.isis.viewer.html.action.view.util.TableUtil;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.component.Table;
-import org.apache.isis.viewer.html.component.ViewPane;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public class CollectionView implements Action {
-
-    @Override
-    public final void execute(final Request request, final Context context, final Page page) {
-        final String idString = request.getObjectId();
-        final ObjectAdapter collection = context.getMappedCollection(idString);
-        if (collection == null) {
-            throw new ActionException("No such collection: " + idString);
-        }
-        final String titleString = collection.titleString();
-
-        page.setTitle(titleString);
-
-        final TypeOfFacet facet = collection.getSpecification().getFacet(TypeOfFacet.class);
-        final ObjectSpecification elementSpecification = facet.valueSpec();
-
-        final ViewPane content = page.getViewPane();
-        content.setWarningsAndMessages(context.getMessages(), context.getWarnings());
-        content.setTitle(titleString, null);
-        String iconName = collection.getIconName();
-        if (iconName == null) {
-            iconName = elementSpecification.getShortIdentifier();
-        }
-        content.setIconName(iconName);
-
-        if (elementSpecification.getAssociations(ObjectAssociationFilters.WHEN_VISIBLE_IRRESPECTIVE_OF_WHERE).size() != 0) {
-            final Table table = TableUtil.createTable(context, false, collection, titleString, elementSpecification);
-            content.add(table);
-        } else {
-            // TODO this should create a list component instead of a table
-            final Table table = TableUtil.createTable(context, false, collection, titleString, elementSpecification);
-            content.add(table);
-        }
-
-        context.addCollectionCrumb(idString);
-
-        context.addCollectionToHistory(idString);
-        context.clearMessagesAndWarnings();
-    }
-
-    @Override
-    public String name() {
-        return Request.COLLECTION_COMMAND;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/FieldCollectionView.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/FieldCollectionView.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/FieldCollectionView.java
deleted file mode 100644
index 1e4babe..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/FieldCollectionView.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  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.action.view;
-
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.html.action.view.util.TableUtil;
-import org.apache.isis.viewer.html.component.Table;
-import org.apache.isis.viewer.html.component.ViewPane;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public class FieldCollectionView extends ObjectViewAbstract {
-    
-    private final Where where = Where.PARENTED_TABLES;
-
-    @Override
-    protected void doExecute(final Context context, final ViewPane content, final ObjectAdapter object, final String field) {
-        final String id = context.mapObject(object);
-        final ObjectSpecification specification = object.getSpecification();
-
-        final OneToManyAssociation collection = (OneToManyAssociation) specification.getAssociation(field);
-
-        IsisContext.getPersistenceSession().resolveField(object, collection);
-
-        context.addCollectionFieldCrumb(collection.getName());
-        content.add(context.getComponentFactory().createHeading(collection.getName()));
-        final Table table = TableUtil.createTable(context, id, object, collection);
-        content.add(table);
-        if (collection.isUsable(IsisContext.getAuthenticationSession(), object, where).isAllowed()) {
-            content.add(context.getComponentFactory().createAddOption(id, collection.getId()));
-        }
-    }
-
-    @Override
-    public String name() {
-        return Request.FIELD_COLLECTION_COMMAND;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java
deleted file mode 100644
index e7a9682..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- *  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.action.view;
-
-import java.util.List;
-
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.commons.exceptions.UnknownTypeException;
-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.core.metamodel.spec.feature.ObjectAssociationFilters;
-import org.apache.isis.viewer.html.component.Block;
-import org.apache.isis.viewer.html.component.Component;
-import org.apache.isis.viewer.html.component.ComponentFactory;
-import org.apache.isis.viewer.html.component.ViewPane;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public class ObjectView extends ObjectViewAbstract {
-
-    // REVIEW: confirm this rendering context
-    private final Where where = Where.OBJECT_FORMS;
-
-    @Override
-    protected boolean addObjectToHistory() {
-        return true;
-    }
-
-    @Override
-    protected void doExecute(final Context context, final ViewPane content, final ObjectAdapter adapter, final String field) {
-        final String id = context.mapObject(adapter);
-        final ObjectSpecification specification = adapter.getSpecification();
-
-        final AuthenticationSession authenticationSession = getAuthenticationSession();
-
-        createObjectView(context, adapter, content, id);
-
-        // // TODO: this test should be done by the ImmutableFacetFactory
-        // installing an immutableFacet on every
-        // // member
-        // final boolean immutable =
-        // ImmutableFacetUtils.isAlwaysImmutable(specification)
-        // || (adapter.isPersistent() &&
-        // ImmutableFacetUtils.isImmutableOncePersisted(specification));
-
-        boolean atLeastOneFieldVisibleAndEditable = false;
-        final List<ObjectAssociation> flds = specification.getAssociations();
-        for (int i = 0; i < flds.size(); i++) {
-            if (flds.get(i).isVisible(authenticationSession, adapter, where).isAllowed() && flds.get(i).isUsable(authenticationSession, adapter, where).isAllowed()) {
-                atLeastOneFieldVisibleAndEditable = true;
-                break;
-            }
-        }
-        if (/* !immutable && */atLeastOneFieldVisibleAndEditable) {
-            content.add(context.getComponentFactory().createEditOption(id));
-        }
-
-        context.setObjectCrumb(adapter);
-    }
-
-    private void createObjectView(final Context context, final ObjectAdapter object, final ViewPane pane, final String id) {
-
-        final ObjectSpecification specification = object.getSpecification();
-        final List<ObjectAssociation> visibleFields = specification.getAssociations(ObjectAssociationFilters.dynamicallyVisible(getAuthenticationSession(), object, where));
-        for (int i = 0; i < visibleFields.size(); i++) {
-            final ObjectAssociation field = visibleFields.get(i);
-
-            final ComponentFactory factory = context.getComponentFactory();
-            final Block fieldBlock = factory.createBlock("field", field.getDescription());
-            fieldBlock.add(factory.createInlineBlock("label", field.getName(), null));
-            fieldBlock.add(factory.createInlineBlock("separator", ":  ", null));
-
-            getPersistenceSession().resolveField(object, field);
-
-            // ordering is important here;
-            // look at parseable fields before objects
-            final ObjectAdapter associatedObject = field.get(object);
-            Component component = null;
-            if (field.getSpecification().isParseable()) {
-                component = factory.createParseableField(field, associatedObject, false);
-            } else if (field.isOneToOneAssociation()) {
-                if (associatedObject == null) {
-                    component = factory.createInlineBlock("value", "", null);
-                    fieldBlock.add(component);
-                } else {
-                    // previously there was a called to resolveImmediately here
-                    // on the
-                    // associated object, but it has been removed (presumably we
-                    // don't
-                    // want to force eager loading).
-                    final String elementId = context.mapObject(associatedObject);
-                    component = factory.createObjectIcon(field, associatedObject, elementId, "value");
-                }
-            } else if (field.isOneToManyAssociation()) {
-                component = factory.createCollectionIcon(field, associatedObject, id);
-            } else {
-                throw new UnknownTypeException(field);
-            }
-            fieldBlock.add(component);
-
-            pane.add(fieldBlock);
-        }
-    }
-
-    @Override
-    public String name() {
-        return Request.OBJECT_COMMAND;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectViewAbstract.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectViewAbstract.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectViewAbstract.java
deleted file mode 100644
index 67e55cc..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ObjectViewAbstract.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *  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.action.view;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.Persistor;
-import org.apache.isis.viewer.html.action.Action;
-import org.apache.isis.viewer.html.action.ActionException;
-import org.apache.isis.viewer.html.action.view.util.MenuUtil;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.component.ViewPane;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public abstract class ObjectViewAbstract implements Action {
-
-    @Override
-    public final void execute(final Request request, final Context context, final Page page) {
-        final String idString = request.getObjectId();
-        final ObjectAdapter adapter = context.getMappedObject(idString);
-        if (adapter == null) {
-            throw new ActionException("No such object: " + idString);
-        }
-
-        getPersistenceSession().resolveImmediately(adapter);
-
-        page.setTitle(adapter.titleString());
-
-        final ViewPane content = page.getViewPane();
-        content.setWarningsAndMessages(context.getMessages(), context.getWarnings());
-        content.setTitle(adapter.titleString(), adapter.getSpecification().getDescription());
-        content.setIconName(adapter.getIconName());
-
-        if (addObjectToHistory()) {
-            context.addObjectToHistory(idString);
-        }
-
-        context.purgeObjectsAndCollections();
-
-        content.setMenu(MenuUtil.menu(adapter, idString, context));
-
-        String iconName = adapter.getIconName();
-        if (iconName == null) {
-            iconName = adapter.getSpecification().getShortIdentifier();
-        }
-
-        content.setIconName(iconName);
-
-        final String field = request.getProperty();
-        doExecute(context, content, adapter, field);
-
-        context.clearMessagesAndWarnings();
-    }
-
-    protected void doExecute(final Context context, final ViewPane content, final ObjectAdapter object, final String field) {
-    }
-
-    protected boolean addObjectToHistory() {
-        return false;
-    }
-
-    protected AuthenticationSession getAuthenticationSession() {
-        return IsisContext.getAuthenticationSession();
-    }
-
-    protected Persistor getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ServiceView.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ServiceView.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ServiceView.java
deleted file mode 100644
index aac0c72..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/ServiceView.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *  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.action.view;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.viewer.html.component.ViewPane;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public class ServiceView extends ObjectViewAbstract {
-    @Override
-    protected void doExecute(final Context context, final ViewPane content, final ObjectAdapter object, final String field) {
-        context.setObjectCrumb(object);
-    }
-
-    @Override
-    public String name() {
-        return Request.SERVICE_COMMAND;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java
deleted file mode 100644
index 8d7f021..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- *  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.action.view.util;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.spec.ActionType;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.metamodel.spec.feature.ObjectActionContainer.Contributed;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.html.component.Component;
-import org.apache.isis.viewer.html.context.Context;
-
-public class MenuUtil {
-
-    // REVIEW: confirm this rendering context
-    private final static Where where = Where.OBJECT_FORMS;
-
-    public static Component[] menu(final ObjectAdapter target, final String targetObjectId, final Context context) {
-        final ObjectSpecification specification = target.getSpecification();
-        final List<ObjectAction> actions = specification.getObjectActions(Arrays.asList(ActionType.USER, ActionType.EXPLORATION, ActionType.PROTOTYPE), Contributed.INCLUDED);
-        final Component[] menuItems = createMenu("Actions", target, actions, context, targetObjectId);
-        return menuItems;
-    }
-
-    private static Component[] createMenu(final String menuName, final ObjectAdapter target, final List<ObjectAction> actions, final Context context, final String targetObjectId) {
-        final List<Component> menuItems = new ArrayList<Component>();
-        for (int j = 0; j < actions.size(); j++) {
-            final ObjectAction action = actions.get(j);
-            final String name = action.getName();
-            Component menuItem = null;
-            if (action.getActions().size() > 0) {
-                final Component[] components = createMenu(name, target, action.getActions(), context, targetObjectId);
-                menuItem = context.getComponentFactory().createSubmenu(name, components);
-            } else {
-                if (!action.isVisible(IsisContext.getAuthenticationSession(), target, where).isAllowed()) {
-                    continue;
-                }
-
-                if (action.getType() == ActionType.USER) {
-                    // carry on, process this action
-                } else if (action.getType() == ActionType.EXPLORATION) {
-                    final boolean isExploring = IsisContext.getDeploymentType().isExploring();
-                    if (isExploring) {
-                        // carry on, process this action
-                    } else {
-                        // ignore this action, skip onto next
-                        continue;
-                    }
-                } else if (action.getType() == ActionType.PROTOTYPE) {
-                    final boolean isPrototyping = IsisContext.getDeploymentType().isPrototyping();
-                    if (isPrototyping) {
-                        // carry on, process this action
-                    } else {
-                        // ignore this action, skip onto next
-                        continue;
-                    }
-                } else if (action.getType() == ActionType.DEBUG) {
-                    // TODO: show if debug "gesture" present
-                } else {
-                    // ignore this action, skip onto next
-                    continue;
-                }
-
-                final String actionId = context.mapAction(action);
-                boolean collectParameters;
-                if (action.getParameterCount() == 0) {
-                    collectParameters = false;
-                    // TODO use new promptForParameters method instead of all
-                    // this
-                } else if (action.getParameterCount() == 1 && action.isContributed() && target.getSpecification().isOfType(action.getParameters().get(0).getSpecification())) {
-                    collectParameters = false;
-                } else {
-                    collectParameters = true;
-                }
-                final Consent consent = action.isUsable(IsisContext.getAuthenticationSession(), target, where);
-                final String consentReason = consent.getReason();
-                menuItem = context.getComponentFactory().createMenuItem(actionId, action.getName(), action.getDescription(), consentReason, action.getType(), collectParameters, targetObjectId);
-            }
-            if (menuItem != null) {
-                menuItems.add(menuItem);
-            }
-        }
-        return menuItems.toArray(new Component[] {});
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java
deleted file mode 100644
index f7b20e4..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- *  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.action.view.util;
-
-import static org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters.PROPERTIES;
-import static org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters.WHEN_VISIBLE_IRRESPECTIVE_OF_WHERE;
-
-import java.util.List;
-
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.applib.filter.Filters;
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacetUtils;
-import org.apache.isis.core.metamodel.facets.multiline.MultiLineFacet;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.Persistor;
-import org.apache.isis.viewer.html.component.ComponentFactory;
-import org.apache.isis.viewer.html.component.Table;
-import org.apache.isis.viewer.html.context.Context;
-
-public class TableUtil {
-
-    // REVIEW: should provide this rendering context, rather than hardcoding.
-    // the net effect currently is that class members annotated with
-    // @Hidden(where=Where.ALL_TABLES) or @Disabled(where=Where.ALL_TABLES) will indeed
-    // be hidden from all tables but will be visible/enabled (perhaps incorrectly) 
-    // if annotated with Where.PARENTED_TABLE or Where.STANDALONE_TABLE
-    private final static Where where = Where.ALL_TABLES;
-
-    public static Table createTable(final Context context, final String id, final ObjectAdapter object, final OneToManyAssociation collectionField) {
-
-        final ObjectAdapter collection = collectionField.get(object);
-        final String name = collectionField.getName();
-        final ObjectSpecification type = collectionField.getSpecification();
-
-        final String summary = "Table showing elements of " + name + " field";
-        return createTable(context, collectionField != null, collection, summary, type);
-    }
-
-    public static Table createTable(final Context context, final boolean addSelector, final ObjectAdapter collection, final String summary, final ObjectSpecification elementType) {
-
-        final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
-        final List<ObjectAssociation> columnAssociations = elementType.getAssociations(Filters.and(WHEN_VISIBLE_IRRESPECTIVE_OF_WHERE, PROPERTIES));
-
-        final int len = columnAssociations.size();
-
-        final ComponentFactory factory = context.getComponentFactory();
-        final Table table = factory.createTable(len, addSelector);
-        table.setSummary(summary);
-
-        for (final ObjectAssociation columnAssociation : columnAssociations) {
-            table.addColumnHeader(columnAssociation.getName());
-        }
-
-        for (final ObjectAdapter rowAdapter : facet.iterable(collection)) {
-            getPersistenceSession().resolveImmediately(rowAdapter);
-            final String elementId = context.mapObject(rowAdapter);
-            table.addRowHeader(factory.createObjectIcon(rowAdapter, elementId, "icon"));
-
-            for (final ObjectAssociation columnAssociation : columnAssociations) {
-                final ObjectAdapter columnAdapter = columnAssociation.get(rowAdapter);
-
-                final ObjectSpecification columnSpec = columnAssociation.getSpecification();
-
-                if (!columnAssociation.isVisible(getAuthenticationSession(), rowAdapter, where).isAllowed()) {
-                    table.addEmptyCell();
-                } else if (columnSpec.isParseable()) {
-                    final MultiLineFacet multiline = columnSpec.getFacet(MultiLineFacet.class);
-                    final boolean shouldTruncate = multiline != null && multiline.numberOfLines() > 1;
-                    final String titleString = columnAdapter != null ? columnAdapter.titleString() : "";
-                    table.addCell(titleString, shouldTruncate);
-                } else if (columnAdapter == null) {
-                    table.addEmptyCell();
-                } else {
-                    getPersistenceSession().resolveImmediately(columnAdapter);
-                    final String objectId = context.mapObject(columnAdapter);
-                    table.addCell(factory.createObjectIcon(columnAssociation, columnAdapter, objectId, "icon"));
-                }
-            }
-            /*
-             * if (addSelector) {
-             * table.addCell(context.getFactory().createRemoveOption(id,
-             * elementId, collectionField.getId())); }
-             */
-            // TODO add selection box
-            // table.addCell();
-            /*
-             * if (collectionField != null) { if
-             * (collectionField.isValidToRemove(object, element).isAllowed()) {
-             * table.addCell(context.getFactory().createRemoveOption(id,
-             * elementId, collectionField.getId())); } else {
-             * table.addEmptyCell(); } }
-             */
-
-        }
-        return table;
-    }
-
-    // ////////////////////////////////////////////////////////////////////////////////
-    // Dependencies (from context)
-    // ////////////////////////////////////////////////////////////////////////////////
-
-    private static Persistor getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
-    }
-
-    private static AuthenticationSession getAuthenticationSession() {
-        return IsisContext.getAuthenticationSession();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Block.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Block.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Block.java
deleted file mode 100644
index 40bff7a..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Block.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *  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;
-
-public interface Block extends Component {
-
-    void add(Component component);
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Component.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Component.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Component.java
deleted file mode 100644
index 5f9e4de..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Component.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- *  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;
-
-import java.io.PrintWriter;
-
-public interface Component {
-
-    void write(PrintWriter writer);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java
deleted file mode 100644
index de2625a..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentAbstract.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *  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;
-
-import java.io.PrintWriter;
-
-import org.apache.isis.viewer.html.PathBuilder;
-
-public abstract class ComponentAbstract implements Component {
-
-    private String id;
-    private String cls;
-    protected final PathBuilder pathBuilder;
-
-    public ComponentAbstract(final PathBuilder pathBuilder) {
-        this.pathBuilder = pathBuilder;
-    }
-
-    public void setClass(final String cls) {
-        this.cls = cls;
-    }
-
-    public void setId(final String id) {
-        this.id = id;
-    }
-
-    protected void writeTag(final PrintWriter writer, final String tagName) {
-        tag(writer, tagName);
-        writer.print(">");
-    }
-
-    private void tag(final PrintWriter writer, final String tagName) {
-        writer.print("<");
-        writer.print(tagName);
-        if (id != null) {
-            writer.print(" id=\"");
-            writer.print(id);
-            writer.print("\"");
-        }
-        if (cls != null) {
-            writer.print(" class=\"");
-            writer.print(cls);
-            writer.print("\"");
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java
deleted file mode 100644
index c4b7559..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentComposite.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  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;
-
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.isis.viewer.html.PathBuilder;
-
-public class ComponentComposite implements Component {
-
-    private final List<Component> components = new ArrayList<Component>();
-    protected final PathBuilder pathBuilder;
-
-    public ComponentComposite(final PathBuilder pathBuilder) {
-        super();
-        this.pathBuilder = pathBuilder;
-    }
-
-    protected String pathTo(final String prefix) {
-        return pathBuilder.pathTo(prefix);
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writeBefore(writer);
-        for (final Component component : components) {
-            write(writer, component);
-        }
-        writeAfter(writer);
-        writer.println();
-    }
-
-    protected void write(final PrintWriter writer, final Component component) {
-        component.write(writer);
-    }
-
-    protected void writeBefore(final PrintWriter writer) {
-    }
-
-    protected void writeAfter(final PrintWriter writer) {
-    }
-
-    public void add(final Component component) {
-        components.add(component);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java
deleted file mode 100644
index da3ecab..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ComponentFactory.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *  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;
-
-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 extends PathBuilder {
-
-    Component createAddOption(String id, String id2);
-
-    Block createBlock(String style, String description);
-
-    Component createBreadCrumbs(String[] names, boolean[] isLinked);
-
-    Component createCollectionIcon(ObjectAssociation field, ObjectAdapter collection, String id);
-
-    DebugPane createDebugPane();
-
-    Component createEditOption(String id);
-
-    Component createErrorMessage(Exception e, boolean isDebug);
-
-    Form createForm(String id, String action, int step, int noOfPages, boolean b);
-
-    Component createHeading(String string);
-
-    Component createInlineBlock(String style, String text, String description);
-
-    Component createCheckboxBlock(final boolean isEditable, final boolean isSet);
-
-    Component createSubmenu(String menuName, Component[] items);
-
-    Component createMenuItem(String actionId, String name, String description, String reasonDisabled, ActionType type, boolean hasParameters, String targetObjectId);
-
-    Component createCollectionIcon(ObjectAdapter object, String collectionId);
-
-    Component createObjectIcon(ObjectAdapter object, String objectId, String style);
-
-    Component createObjectIcon(ObjectAssociation field, ObjectAdapter object, String objectId, String style);
-
-    Page createPage();
-
-    Component createRemoveOption(String id, String elementId, String id2);
-
-    Component createService(String objectId, String title, String iconName);
-
-    Table createTable(int noColumns, boolean withSelectorColumn);
-
-    Component createUserSwap(final String name);
-
-    /**
-     * 
-     * @param field
-     * @param value
-     *            - may be <tt>null</tt> so subclass should handle.
-     * @param isEditable
-     * @return
-     */
-    Component createParseableField(ObjectAssociation field, ObjectAdapter value, boolean isEditable);
-
-    Component createLink(String link, String name, String description);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/DebugPane.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/DebugPane.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/DebugPane.java
deleted file mode 100644
index 530ae63..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/DebugPane.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *  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;
-
-public interface DebugPane extends Component {
-
-    void addSection(String title);
-
-    void appendln(String text);
-
-    void indent();
-
-    void unindent();
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Form.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Form.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Form.java
deleted file mode 100644
index db5789b..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Form.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *  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;
-
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-
-public interface Form extends Component {
-
-    void addField(ObjectSpecification type, String fieldLabel, String fieldDescription, String fieldId, String currentEntryTitle, int noLines, boolean wrap, int maxLength, int typicalLength, boolean required, String error);
-
-    /*
-     * REVIEW the form should be asked to create specific types, like see
-     * HTMLForm.addForm()
-     * 
-     * void addCheckBox(....)
-     * 
-     * void addPasswordField(....)
-     * 
-     * void addMultilineField(....)
-     */
-
-    void addLookup(String fieldLabel, String fieldDescription, String fieldId, int selectedIndex, String[] options, String[] ids, boolean required, String errorMessage);
-
-    void addReadOnlyField(String fieldLabel, String title, String fieldDescription);
-
-    void addReadOnlyCheckbox(String fieldLabel, boolean isSet, String fieldDescription);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Page.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Page.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Page.java
deleted file mode 100644
index fada9d1..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Page.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  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;
-
-public interface Page extends Component {
-
-    void addDebug(String value);
-
-    void addDebug(String label, String value);
-
-    Block getNavigation();
-
-    Block getPageHeader();
-
-    ViewPane getViewPane();
-
-    void setCrumbs(Component component);
-
-    void setDebug(DebugPane debugPane);
-
-    void setTitle(String title);
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Table.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Table.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Table.java
deleted file mode 100644
index 3a4dd5c..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/Table.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *  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;
-
-public interface Table extends Component {
-
-    void setSummary(String string);
-
-    void addColumnHeader(String name);
-
-    void addRowHeader(Component component);
-
-    void addCell(String string, boolean truncate);
-
-    void addCell(Component component);
-
-    void addEmptyCell();
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ViewPane.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ViewPane.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ViewPane.java
deleted file mode 100644
index 5aa6cb0..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/ViewPane.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  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;
-
-import java.util.List;
-
-public interface ViewPane extends Component {
-
-    void setIconName(String iconName);
-
-    void setTitle(String title, String description);
-
-    void add(Component content);
-
-    void setMenu(Component[] component);
-
-    void setWarningsAndMessages(List<String> list, List<String> list2);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java
deleted file mode 100644
index a96b557..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/AbstractHtmlPage.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- *  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 java.util.StringTokenizer;
-
-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;
-
-public abstract class AbstractHtmlPage implements Component, Page {
-
-    private final Block pageHeader;
-    private final String siteFooter;
-    private final String siteHeader;
-    private final String styleSheet;
-    private final StringBuffer debug = new StringBuffer();
-
-    private String title = "Apache Isis";
-    protected final PathBuilder pathBuilder;
-
-    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;
-    }
-
-    @Override
-    public void addDebug(final String html) {
-        debug.append("<div class=\"detail\">");
-        debug.append(html);
-        debug.append("</div>");
-    }
-
-    @Override
-    public void addDebug(final String name, final String value) {
-        debug.append("<div class=\"detail\">");
-        debug.append("<span class=\"label\">");
-        debug.append(name);
-        debug.append("</span>: ");
-        debug.append(value);
-        debug.append("</div>");
-    }
-
-    @Override
-    public Block getPageHeader() {
-        return pageHeader;
-    }
-
-    @Override
-    public void setTitle(final String title) {
-        this.title = title;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
-        writer.println("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">");
-        writer.println("  <head>");
-        writer.print("  <title>");
-        writer.print(title);
-        writer.println("</title>");
-        writer.println("  <meta name=\"description\" content=\"Apache Isis Application Web Page\" />");
-
-        final StringTokenizer st = new StringTokenizer(styleSheet, ",");
-        int i = 0;
-        while (st.hasMoreTokens()) {
-            final String style = st.nextToken().trim();
-            writer.print("  <link rel=\"");
-            if (i++ > 0) {
-                writer.print("alternate ");
-            }
-            writer.print("stylesheet\" title=\"Style " + i + "\" href=\"");
-            writer.print(style);
-            writer.println("\" type=\"text/css\" media=\"all\"/>");
-        }
-        writer.println("  <script src=\"jquery-1.7.1.js\" type=\"text/javascript\"></script>");
-        writer.println("  <script src=\"htmlviewer.js\" type=\"text/javascript\"></script>");
-        writer.println("  </head>");
-        writer.println("  <body onLoad=\"window.document.form.fld0.focus()\">");
-        writer.println("  <div id=\"wrapper\">");
-
-        if (siteHeader != null) {
-            writer.println("  <!-- the following block is added externally via configuration -->");
-            writer.println(siteHeader);
-        }
-
-        writeContent(writer);
-
-        if (siteFooter != null) {
-            writer.println("  <!-- the following block is added externally via configuration -->");
-            writer.println(siteFooter);
-        }
-
-        if (debug.length() > 0) {
-            writer.println("<div id=\"debug\">");
-            writer.println("<h4>Debug</h4>");
-            writer.println(debug);
-            writer.println("</div>");
-        }
-
-        writer.println("</div>");
-        writer.println("  </body>");
-        writer.println("</html>");
-    }
-
-    protected abstract void writeContent(PrintWriter writer);
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java
deleted file mode 100644
index a6b12f6..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/ActionComponent.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *  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.Component;
-
-class ActionComponent implements Component {
-
-    private final PathBuilder pathBuilder;
-    private final String objectId;
-    private final String name;
-    private final String description;
-    private final String field;
-    private final String action;
-    private final String elementId;
-
-    public ActionComponent(final PathBuilder pathBuilder, final String action, final String name, final String description, final String objectId, final String elementId, final String field) {
-        this.pathBuilder = pathBuilder;
-        this.action = action;
-        this.name = name;
-        this.description = description;
-        this.objectId = objectId;
-        this.elementId = elementId;
-        this.field = field;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.print("<div class=\"action-button\">");
-        writer.print("<a href=\"");
-        writer.print(pathTo(action));
-        writer.print("?id=");
-        writer.print(objectId);
-        if (field != null) {
-            writer.print("&amp;field=");
-            writer.print(field);
-        }
-        if (elementId != null) {
-            writer.print("&amp;element=");
-            writer.print(elementId);
-        }
-        writer.print("\" title=\"");
-        writer.print(description);
-        writer.print("\"> ");
-        writer.print(name);
-        writer.print("</a>");
-        writer.println("</div>");
-    }
-
-    protected String pathTo(final String prefix) {
-        return pathBuilder.pathTo(prefix);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java
deleted file mode 100644
index be454e4..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/BreadCrumbs.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  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.ComponentAbstract;
-
-public class BreadCrumbs extends ComponentAbstract {
-    private final String[] names;
-    private final boolean[] isLinked;
-
-    public BreadCrumbs(final PathBuilder pathBuilder, final String[] names, final boolean[] isLinked) {
-        super(pathBuilder);
-        this.names = names;
-        this.isLinked = isLinked;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.println("<div id=\"context\">");
-
-        final int length = names.length;
-        for (int i = 0; i < length; i++) {
-            if (i > 0) {
-                writer.print("<span class=\"separator\"> &gt; </span>");
-            }
-            if (isLinked[i]) {
-                writer.print("<a class=\"linked\" href=\"" + pathTo("context") + "?id=");
-                writer.print(i);
-                writer.print("\">");
-                writer.print(names[i]);
-                writer.print("</a>");
-            } else if (!(i == length - 1 && names[i] == null)) {
-                writer.print("<span class=\"disabled\">");
-                writer.print(names[i]);
-                writer.print("</span>");
-            }
-        }
-
-        writer.print("</div>");
-    }
-
-    protected String pathTo(final String prefix) {
-        return pathBuilder.pathTo(prefix);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Checkbox.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Checkbox.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Checkbox.java
deleted file mode 100644
index b907c5a..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/Checkbox.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  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.component.Component;
-
-final class Checkbox implements Component {
-    private final boolean set;
-
-    private final boolean editable;
-
-    Checkbox(final boolean set, final boolean editable) {
-        this.set = set;
-        this.editable = editable;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        writer.print("<input class=\"value\" type=\"checkbox\"");
-        if (set) {
-            writer.print(" checked");
-        }
-        if (!editable) {
-            writer.print(" disabled");
-        }
-        writer.println("/>");
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java
deleted file mode 100644
index b99b351..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/component/html/CollectionIcon.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *  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.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facets.typeof.TypeOfFacet;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-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;
-
-public class CollectionIcon implements Component {
-
-    private final ObjectAdapter collection;
-    private final PathBuilder pathBuilder;
-    private final String id;
-    private final String description;
-
-    public CollectionIcon(final PathBuilder pathBuilder, final ObjectAdapter element, final String description, final String id) {
-        this.pathBuilder = pathBuilder;
-        this.collection = element;
-        this.description = description;
-        this.id = id;
-    }
-
-    @Override
-    public void write(final PrintWriter writer) {
-        final TypeOfFacet facet = collection.getSpecification().getFacet(TypeOfFacet.class);
-        final Class<?> elementType = facet.value();
-        final ObjectSpecification elementSpecification = IsisContext.getSpecificationLoader().loadSpecification(elementType);
-
-        writer.print("<div class=\"item\">");
-        writer.print("<a href=\"");
-        writer.print(pathTo(Request.COLLECTION_COMMAND) + "?id=");
-        writer.print(id);
-        writer.print("\"");
-        if (description != null) {
-            writer.print(" title=\"");
-            writer.print(description);
-            writer.print("\"");
-        }
-        writer.print("><img src=\"");
-        writer.print(ImageLookup.image(elementSpecification));
-        writer.print("\" alt=\"");
-        final String singularName = elementSpecification.getSingularName();
-        writer.print(singularName);
-        writer.print(" collection\" />");
-        writer.print(collection.titleString());
-        writer.print("</a>");
-
-        writer.println("</div>");
-
-    }
-
-    protected String pathTo(final String prefix) {
-        return pathBuilder.pathTo(prefix);
-    }
-
-}


[10/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/src/main/appended-resources/supplemental-models.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/src/main/appended-resources/supplemental-models.xml b/mothballed/component/security/ldap/src/main/appended-resources/supplemental-models.xml
new file mode 100644
index 0000000..ecd3906
--- /dev/null
+++ b/mothballed/component/security/ldap/src/main/appended-resources/supplemental-models.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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. -->
+<supplementalDataModels xmlns="http://maven.apache.org/supplemental-model/1.0.0"
+                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                        xsi:schemaLocation="http://maven.apache.org/supplemental-model/1.0.0 http://maven.apache.org/xsd/supplemental-model-1.0.0.xsd">
+
+  <supplement>
+    <project>
+      <groupId>aopalliance</groupId>
+      <artifactId>aopalliance</artifactId>
+      <version>1.0</version>
+      <licenses>
+          <license>
+              <name>Public Domain</name>
+          </license>
+      </licenses>
+    </project>
+  </supplement>
+
+  <supplement>
+   	<!-- not quite sure why licenses:download-license flags this, since license info seems to be in its POM -->
+    <project>
+		<groupId>org.datanucleus</groupId>
+	    <artifactId>datanucleus-jodatime</artifactId>
+	    <version>3.1.1</version>
+          <licenses>
+			<license>
+	            <name>The Apache Software License, Version 2.0</name>
+	            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+	        </license>
+	    </licenses>
+    </project>
+  </supplement>
+
+  <supplement>
+    <project>
+      <groupId>org.scannotation</groupId>
+      <artifactId>scannotation</artifactId>
+      <version>1.0.3</version>
+      <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>          
+        </license>
+      </licenses>
+    </project>
+  </supplement>
+    
+  <supplement>
+    <project>
+      <groupId>dom4j</groupId>
+      <artifactId>dom4j</artifactId>
+      <version>1.6.1</version>
+      <licenses>
+        <license>
+            <name>BSD License</name>
+            <url>http://dom4j.sourceforge.net/dom4j-1.6.1/license.html</url>
+            <distribution>repo</distribution>          
+        </license>
+      </licenses>
+    </project>
+  </supplement>
+
+  <supplement>
+    <project>
+      <groupId>net.jcip</groupId>
+      <artifactId>jcip-annotations</artifactId>
+      <version>1.0</version>
+      <licenses>
+        <license>
+            <name>Creative Commons Attribution 2.5 License</name>
+            <url>http://creativecommons.org/licenses/by/2.5/</url>
+            <distribution>repo</distribution>          
+        </license>
+      </licenses>
+    </project>
+  </supplement>
+  
+
+  <supplement>
+    <project>
+      <groupId>xalan</groupId>
+      <artifactId>xalan</artifactId>
+      <version>2.7.0</version>
+      <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>          
+        </license>
+      </licenses>
+    </project>
+  </supplement>
+
+ 
+</supplementalDataModels>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationConstants.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationConstants.java b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationConstants.java
new file mode 100644
index 0000000..4997151
--- /dev/null
+++ b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationConstants.java
@@ -0,0 +1,39 @@
+/*
+ *  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.ldap.authentication;
+
+import org.apache.isis.core.commons.config.ConfigurationConstants;
+import org.apache.isis.core.runtime.authentication.AuthenticationManagerInstaller;
+
+public final class LdapAuthenticationConstants {
+
+    public static final String ROOT = ConfigurationConstants.ROOT + AuthenticationManagerInstaller.TYPE + "." + LdapAuthenticationManagerInstaller.NAME + ".";
+
+    public static final String SERVER_KEY = ROOT + "server";
+    public static final String SERVER_DEFAULT = "com.sun.jndi.ldap.LdapCtxFactory";
+
+    public static final String LDAPDN_KEY = ROOT + "dn";
+
+    public static String FILTER = "(objectclass=organizationalRole)";
+
+    private LdapAuthenticationConstants() {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationManagerInstaller.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationManagerInstaller.java b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationManagerInstaller.java
new file mode 100644
index 0000000..4f8abd3
--- /dev/null
+++ b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticationManagerInstaller.java
@@ -0,0 +1,42 @@
+/*
+ *  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.ldap.authentication;
+
+import java.util.List;
+
+import com.google.common.collect.Lists;
+
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.runtime.authentication.AuthenticationManagerStandardInstallerAbstractForDfltRuntime;
+import org.apache.isis.core.runtime.authentication.standard.Authenticator;
+
+public class LdapAuthenticationManagerInstaller extends AuthenticationManagerStandardInstallerAbstractForDfltRuntime {
+
+    public static String NAME = "ldap";
+
+    public LdapAuthenticationManagerInstaller() {
+        super(NAME);
+    }
+
+    @Override
+    protected List<Authenticator> createAuthenticators(final IsisConfiguration configuration) {
+        return Lists.<Authenticator> newArrayList(new LdapAuthenticator(configuration));
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticator.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticator.java b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticator.java
new file mode 100644
index 0000000..19f5ec1
--- /dev/null
+++ b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authentication/LdapAuthenticator.java
@@ -0,0 +1,116 @@
+/*
+ *  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.ldap.authentication;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import javax.naming.AuthenticationException;
+import javax.naming.Context;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.commons.ensure.Assert;
+import org.apache.isis.core.commons.exceptions.IsisException;
+import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
+import org.apache.isis.core.runtime.authentication.AuthenticationRequestPassword;
+import org.apache.isis.core.runtime.authentication.standard.AuthenticatorAbstract;
+
+public class LdapAuthenticator extends AuthenticatorAbstract {
+
+    private static final Logger LOG = Logger.getLogger(LdapAuthenticator.class);
+
+    private final String ldapProvider;
+    private final String ldapDn;
+
+    public LdapAuthenticator(final IsisConfiguration configuration) {
+        super(configuration);
+        ldapProvider = getConfiguration().getString(LdapAuthenticationConstants.SERVER_KEY);
+        ldapDn = getConfiguration().getString(LdapAuthenticationConstants.LDAPDN_KEY);
+    }
+
+    @Override
+    public final boolean canAuthenticate(final Class<? extends AuthenticationRequest> authenticationRequestClass) {
+        return AuthenticationRequestPassword.class.isAssignableFrom(authenticationRequestClass);
+    }
+
+    private void setRoles(final DirContext authContext, final AuthenticationRequest request, final String username) throws NamingException {
+        final List<String> roles = new ArrayList<String>();
+        final SearchControls controls = new SearchControls();
+        controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
+        controls.setReturningAttributes(new String[] { "cn" });
+        final String name = "uid=" + username + ", " + ldapDn;
+        final NamingEnumeration<SearchResult> answer = authContext.search(name, LdapAuthenticationConstants.FILTER, controls);
+        while (answer.hasMore()) {
+            final SearchResult result = answer.nextElement();
+            final String roleName = (String) result.getAttributes().get("cn").get(0);
+            roles.add(roleName);
+            LOG.debug("Adding role: " + roleName);
+        }
+        request.setRoles(roles);
+    }
+
+    @Override
+    public boolean isValid(final AuthenticationRequest request) {
+        final AuthenticationRequestPassword passwordRequest = (AuthenticationRequestPassword) request;
+        final String username = passwordRequest.getName();
+        Assert.assertNotNull(username);
+        if (username.equals("")) {
+            LOG.debug("empty username");
+            return false; // failed authentication
+        }
+        final String password = passwordRequest.getPassword();
+        Assert.assertNotNull(password);
+
+        final Hashtable<String, String> env = new Hashtable<String, String>(4);
+        env.put(Context.INITIAL_CONTEXT_FACTORY, LdapAuthenticationConstants.SERVER_DEFAULT);
+        env.put(Context.PROVIDER_URL, ldapProvider);
+        env.put(Context.SECURITY_PRINCIPAL, "uid=" + username + ", " + ldapDn);
+        env.put(Context.SECURITY_CREDENTIALS, password);
+
+        DirContext authContext = null;
+        try {
+            authContext = new InitialDirContext(env);
+            setRoles(authContext, request, username);
+            return true;
+        } catch (final AuthenticationException e) {
+            return false;
+        } catch (final NamingException e) {
+            throw new IsisException("Failed to authenticate using LDAP", e);
+        } finally {
+            try {
+                if (authContext != null) {
+                    authContext.close();
+                }
+            } catch (final NamingException e) {
+                throw new IsisException("Failed to authenticate using LDAP", e);
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationConstants.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationConstants.java b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationConstants.java
new file mode 100644
index 0000000..973e853
--- /dev/null
+++ b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationConstants.java
@@ -0,0 +1,44 @@
+/*
+ *  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.ldap.authorization;
+
+import org.apache.isis.core.commons.config.ConfigurationConstants;
+import org.apache.isis.core.runtime.authorization.AuthorizationManagerInstaller;
+import org.apache.isis.core.runtime.authorization.standard.AuthorizationConstants;
+import org.apache.isis.security.ldap.authentication.LdapAuthenticationConstants;
+
+public final class LdapAuthorizationConstants {
+
+    private static final String ROOT = ConfigurationConstants.ROOT + AuthorizationManagerInstaller.TYPE + "." + LdapAuthorizationManagerInstaller.NAME + ".";
+
+    public static final String SERVER_KEY = ROOT + "server";
+    public static final String SERVER_DEFAULT = LdapAuthenticationConstants.SERVER_DEFAULT;
+
+    public static final String LDAPDN_KEY = ROOT + "dn";
+
+    public static final String APP_DN_KEY = ROOT + "application.dn";
+
+    public static final String LEARN_KEY = AuthorizationConstants.LEARN;
+    public static final boolean LEARN_DEFAULT = AuthorizationConstants.LEARN_DEFAULT;
+
+    private LdapAuthorizationConstants() {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationManagerInstaller.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationManagerInstaller.java b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationManagerInstaller.java
new file mode 100644
index 0000000..7b9d5ad
--- /dev/null
+++ b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizationManagerInstaller.java
@@ -0,0 +1,39 @@
+/*
+ *  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.ldap.authorization;
+
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.runtime.authorization.standard.AuthorizationManagerStandardInstallerAbstract;
+import org.apache.isis.core.runtime.authorization.standard.Authorizor;
+
+public class LdapAuthorizationManagerInstaller extends AuthorizationManagerStandardInstallerAbstract {
+
+    public static String NAME = "ldap";
+
+    public LdapAuthorizationManagerInstaller() {
+        super(NAME);
+    }
+
+    @Override
+    protected Authorizor createAuthorizor(final IsisConfiguration configuration) {
+        return new LdapAuthorizor(configuration);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java
new file mode 100644
index 0000000..d88255e
--- /dev/null
+++ b/mothballed/component/security/ldap/src/main/java/org/apache/isis/security/ldap/authorization/LdapAuthorizor.java
@@ -0,0 +1,274 @@
+/*
+ *  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.ldap.authorization;
+
+import java.util.Hashtable;
+
+import javax.naming.AuthenticationException;
+import javax.naming.Context;
+import javax.naming.NameAlreadyBoundException;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.applib.Identifier;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.commons.exceptions.IsisException;
+import org.apache.isis.core.runtime.authorization.standard.AuthorizorAbstract;
+
+public class LdapAuthorizor extends AuthorizorAbstract {
+
+    private static final Logger LOG = Logger.getLogger(LdapAuthorizor.class);
+
+    private static final String FILTER = "(&(uniquemember={0}) (|(cn={1}) (cn={2}) (cn={3})))";
+    private static final String ACCESS_QUALIFIER_RW = "RW";
+
+    private final String ldapProvider;
+    @SuppressWarnings("unused")
+    private final String ldapDn;
+    private final String appDn;
+    private final boolean learn;
+
+    public LdapAuthorizor(final IsisConfiguration configuration) {
+        super(configuration);
+
+        ldapProvider = getConfiguration().getString(LdapAuthorizationConstants.SERVER_KEY);
+        ldapDn = getConfiguration().getString(LdapAuthorizationConstants.LDAPDN_KEY);
+        appDn = getConfiguration().getString(LdapAuthorizationConstants.APP_DN_KEY);
+        learn = getConfiguration().getBoolean(LdapAuthorizationConstants.LEARN_KEY, LdapAuthorizationConstants.LEARN_DEFAULT);
+    }
+
+    // ////////////////////////////////////////////////////////
+    // init, shutdown
+    // ////////////////////////////////////////////////////////
+
+    @Override
+    public void init() {
+    }
+
+    @Override
+    public void shutdown() {
+        // do nothing
+    }
+
+    // ////////////////////////////////////////////////////////
+    // API
+    // ////////////////////////////////////////////////////////
+
+    @Override
+    public boolean isUsableInRole(final String role, final Identifier member) {
+        if(role == null) {
+            return false;
+        }
+        return isAuthorised(role, member, ACCESS_QUALIFIER_RW);
+    }
+
+    @Override
+    public boolean isVisibleInRole(final String role, final Identifier member) {
+        if(role == null) {
+            return false;
+        }
+        return isAuthorised(role, member, null);
+    }
+
+    private boolean isAuthorised(final String role, final Identifier member, final String flag) {
+
+        final Hashtable<String, String> env = new Hashtable<String, String>(4);
+        env.put(Context.INITIAL_CONTEXT_FACTORY, LdapAuthorizationConstants.SERVER_DEFAULT);
+        env.put(Context.PROVIDER_URL, ldapProvider);
+
+        if (learn) {
+            env.put(Context.SECURITY_PRINCIPAL, "uid=admin, ou=system");
+            env.put(Context.SECURITY_CREDENTIALS, "secret");
+        }
+
+        DirContext authContext = null;
+        try {
+            authContext = new InitialDirContext(env);
+            if (learn) {
+                return bindNames(authContext, role, member);
+            }
+            return isPermitted(authContext, role, member, flag);
+        } catch (final AuthenticationException e) {
+            throw new IsisException("Failed to authorise using LDAP", e);
+        } catch (final NameNotFoundException e) {
+            // missing class in ldap server - treat as authorisation failure
+            LOG.error(e);
+            return false;
+        } catch (final NamingException e) {
+            throw new IsisException("Failed to authorise using LDAP", e);
+        } finally {
+            try {
+                if (authContext != null) {
+                    authContext.close();
+                }
+            } catch (final NamingException e) {
+                throw new IsisException("Failed to authorise using LDAP", e);
+            }
+        }
+    }
+
+    private boolean isPermitted(final DirContext authContext, final String role, final Identifier member, final String flag) throws NamingException {
+        final String cls = member.toIdentityString(Identifier.CLASS);
+        final String name = member.toIdentityString(Identifier.MEMBERNAME_ONLY);
+        final String parms = member.toIdentityString(Identifier.PARAMETERS_ONLY);
+
+        final Object[] args = new Object[] { role, cls, name, parms };
+        final SearchControls controls = new SearchControls();
+        controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
+        final String searchName = buildSearchName(cls, appDn);
+        final NamingEnumeration<SearchResult> answer = authContext.search(searchName, FILTER, args, controls);
+        while (answer.hasMore()) {
+            // if we have a class match must be OK
+            // if we have a name match must be OK (parent must be class by
+            // definition)
+            // but parm matches need to check that parent = name
+            final SearchResult result = answer.nextElement();
+            final String cn = (String) result.getAttributes().get("cn").get(0);
+            // result.getname gives relative path from class - so if contains
+            // 'name' it is parent of parms
+            // entry
+            if (cn.equals(cls) || cn.equals(name) || ((cn.equals(parms) && result.getName().contains(name)))) {
+                // last check if there is a flag attribute
+                if (flag != null) {
+                    final Attribute flagAttribute = result.getAttributes().get("flag");
+                    if (flagAttribute != null) {
+                        // since there is a flag need to check is match
+                        return flag.equalsIgnoreCase((String) flagAttribute.get(0));
+                    }
+                }
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private String buildSearchName(final String cls, final String appDn) {
+        final StringBuffer search = new StringBuffer();
+        search.append("cn=").append(cls).append(", ").append(appDn);
+        final String searchName = search.toString();
+        return searchName;
+    }
+
+    private Attributes createCommonAttributes(final String cnName, final String role, final boolean isClass) {
+        final Attributes attrs = new BasicAttributes(true); // case-ignore
+        final Attribute objclass = new BasicAttribute("objectclass");
+        objclass.add("top");
+        objclass.add("javaContainer");
+        objclass.add("groupOfUniqueNames");
+        if (isClass) {
+            objclass.add("javaObject");
+        }
+        final Attribute cn = new BasicAttribute("cn");
+        cn.add(cnName);
+        final Attribute uniqueMember = new BasicAttribute("uniquemember");
+        uniqueMember.add(role);
+        if (isClass) {
+            final Attribute javaClass = new BasicAttribute("javaclassname");
+            javaClass.add(cnName);
+            attrs.put(javaClass);
+        }
+        attrs.put(objclass);
+        attrs.put(cn);
+        attrs.put(uniqueMember);
+        return attrs;
+    }
+
+    private String createClassBindname(final String cls) {
+        final StringBuffer bindName = new StringBuffer();
+        bindName.append("cn=").append(cls).append(", ").append(appDn);
+        return bindName.toString();
+    }
+
+    private void bindClass(final DirContext authContext, final String role, final Identifier member) throws NamingException {
+        final String cls = member.toIdentityString(Identifier.CLASS);
+        final Attributes attrs = createCommonAttributes(cls, role, true);
+        try {
+            authContext.createSubcontext(createClassBindname(cls), attrs);
+        } catch (final NameAlreadyBoundException e) {
+            // ignore as this is just debug code
+            // and we don't check if this is already bound first
+            LOG.debug(e);
+        }
+    }
+
+    private String createNameBindname(final String cls, final String name) {
+        final StringBuffer bindName = new StringBuffer();
+        bindName.append("cn=").append(name).append(", ");
+        bindName.append(createClassBindname(cls));
+        return bindName.toString();
+    }
+
+    private void bindName(final DirContext authContext, final String role, final Identifier member) throws NamingException {
+        final String cls = member.toIdentityString(Identifier.CLASS);
+        final String name = member.toIdentityString(Identifier.MEMBERNAME_ONLY);
+        final Attributes attrs = createCommonAttributes(name, role, false);
+        try {
+            authContext.createSubcontext(createNameBindname(cls, name), attrs);
+        } catch (final NameAlreadyBoundException e) {
+            // ignore as this is just debug code
+            // and we don't check if this is already bound first
+            LOG.debug(e);
+        }
+    }
+
+    private String createParmsBindname(final String cls, final String name, final String parms) {
+        final StringBuffer bindName = new StringBuffer();
+        bindName.append("cn=").append(parms).append(", ");
+        bindName.append(createNameBindname(cls, name));
+        return bindName.toString();
+    }
+
+    private void bindParms(final DirContext authContext, final String role, final Identifier member) throws NamingException {
+        final String cls = member.toIdentityString(Identifier.CLASS);
+        final String name = member.toIdentityString(Identifier.MEMBERNAME_ONLY);
+        // have to escape any commas in parms string or ldap parser is not happy
+        final String parms = member.toIdentityString(Identifier.PARAMETERS_ONLY).replace(",", "\\,");
+        if (parms.length() == 0) {
+            return;
+        }
+        final Attributes attrs = createCommonAttributes(parms, role, false);
+        try {
+            authContext.createSubcontext(createParmsBindname(cls, name, parms), attrs);
+        } catch (final NameAlreadyBoundException e) {
+            // ignore as this is just debug code
+            // and we don't check if this is already bound first
+            LOG.debug(e);
+        }
+    }
+
+    private boolean bindNames(final DirContext authContext, final String role, final Identifier member) throws NamingException {
+        bindClass(authContext, role, member);
+        bindName(authContext, role, member);
+        bindParms(authContext, role, member);
+        return true;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/src/site/apt/index.apt b/mothballed/component/security/ldap/src/site/apt/index.apt
new file mode 100644
index 0000000..8978117
--- /dev/null
+++ b/mothballed/component/security/ldap/src/site/apt/index.apt
@@ -0,0 +1,44 @@
+~~  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.
+
+
+
+Security LDAP Implementation
+
+ The <ldap security> module provides an implementation of Isis' authentication and
+ authorization APIs where credentials are stored in a well-known LDAP server.
+ 
+ This makes the LDAP security implementation suitable for deployment where an
+ LDAP exists.  Optionally it may be combined with other implementations (for example
+ the authorization might be performed using the file-based implementation).
+ 
+ See the security 
+ {{{../docbkx/html/guide/isis-security.html}HTML}} or 
+ {{{../docbkx/pdf/isis-security.pdf}PDF}} documentation for more detail.
+ 
+Alternatives
+
+  Alternatives include:
+  
+  * the {{{../dflt/index.html}default}} (no-op) security implementation, for prototyping use only
+
+  * the {{{../file/index.html}file-based}} security (reading from simple flat files)
+
+  * the {{{../sql/index.html}SQL}} security (reading from simple SQL tables)
+
+  []
+  

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/src/site/apt/jottings.apt
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/src/site/apt/jottings.apt b/mothballed/component/security/ldap/src/site/apt/jottings.apt
new file mode 100644
index 0000000..c5d1200
--- /dev/null
+++ b/mothballed/component/security/ldap/src/site/apt/jottings.apt
@@ -0,0 +1,24 @@
+~~  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.
+
+
+
+Jottings
+ 
+  This page is to capture any random jottings relating to this module prior 
+  to being moved into formal documentation. 
+ 

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/src/site/site.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/src/site/site.xml b/mothballed/component/security/ldap/src/site/site.xml
new file mode 100644
index 0000000..1f465f4
--- /dev/null
+++ b/mothballed/component/security/ldap/src/site/site.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project>
+
+	<body>
+		<breadcrumbs>
+			<item name="LDAP" href="index.html"/>
+		</breadcrumbs>
+
+		<menu name="LDAP Security">
+			<item name="About" href="index.html" />
+            <item name="Jottings" href="jottings.html" />
+		</menu>
+
+        <menu name="Security Modules">
+            <item name="Default (No-op)" href="../dflt/index.html" />
+            <item name="File" href="../file/index.html" />
+            <item name="LDAP" href="../ldap/index.html" />
+            <item name="SQL" href="../sql/index.html" />
+        </menu>
+
+        <menu name="Maven Reports" ref="reports" />
+	</body>
+</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/src/test/java/org/apache/isis/security/ldap/authentication/LdapAuthenticatorTester.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/src/test/java/org/apache/isis/security/ldap/authentication/LdapAuthenticatorTester.java b/mothballed/component/security/ldap/src/test/java/org/apache/isis/security/ldap/authentication/LdapAuthenticatorTester.java
new file mode 100644
index 0000000..e84ec1c
--- /dev/null
+++ b/mothballed/component/security/ldap/src/test/java/org/apache/isis/security/ldap/authentication/LdapAuthenticatorTester.java
@@ -0,0 +1,53 @@
+/*
+ *  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.ldap.authentication;
+
+import org.apache.isis.core.runtime.authentication.AuthenticationRequestPassword;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
+public class LdapAuthenticatorTester {
+
+    public static void main(final String[] args) {
+        final LdapAuthenticator auth = new LdapAuthenticator(IsisContext.getConfiguration());
+
+        AuthenticationRequestPassword req = new AuthenticationRequestPassword("unauth", "pass");
+        try {
+            System.out.println("unauth auth=" + auth.isValid(req));
+        } catch (final Exception e) {
+            System.out.println("unauth failed authentication!");
+            e.printStackTrace();
+        }
+        req = new AuthenticationRequestPassword("joe", "pass");
+        try {
+            System.out.println("joe auth=" + auth.isValid(req));
+        } catch (final Exception e) {
+            System.out.println("joe auth failed!!");
+            e.printStackTrace();
+        }
+        req = new AuthenticationRequestPassword("joe", "wrongpass");
+        try {
+            System.out.println("joe wrongpass auth=" + auth.isValid(req));
+        } catch (final Exception e) {
+            System.out.println("joe wrongpass auth failed!!");
+            e.printStackTrace();
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/NOTICE
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/NOTICE b/mothballed/component/security/sql/NOTICE
new file mode 100755
index 0000000..ba21d0c
--- /dev/null
+++ b/mothballed/component/security/sql/NOTICE
@@ -0,0 +1,7 @@
+Apache Isis
+Copyright 2010-2013 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/hsql-db/authenticator-tests.script
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/hsql-db/authenticator-tests.script b/mothballed/component/security/sql/hsql-db/authenticator-tests.script
new file mode 100644
index 0000000..18d5aac
--- /dev/null
+++ b/mothballed/component/security/sql/hsql-db/authenticator-tests.script
@@ -0,0 +1,51 @@
+SET DATABASE UNIQUE NAME HSQLDB3B5AA06E81
+SET DATABASE GC 0
+SET DATABASE DEFAULT RESULT MEMORY ROWS 0
+SET DATABASE EVENT LOG LEVEL 0
+SET DATABASE SQL NAMES FALSE
+SET DATABASE SQL REGULAR NAMES TRUE
+SET DATABASE SQL REFERENCES FALSE
+SET DATABASE SQL SIZE TRUE
+SET DATABASE SQL TYPES FALSE
+SET DATABASE SQL TDC DELETE TRUE
+SET DATABASE SQL TDC UPDATE TRUE
+SET DATABASE SQL TRANSLATE TTI TYPES TRUE
+SET DATABASE SQL CONCAT NULLS TRUE
+SET DATABASE SQL NULLS FIRST TRUE
+SET DATABASE SQL UNIQUE NULLS TRUE
+SET DATABASE SQL CONVERT TRUNCATE TRUE
+SET DATABASE SQL AVG SCALE 0
+SET DATABASE SQL DOUBLE NAN TRUE
+SET DATABASE SQL LONGVAR IS LOB FALSE
+SET DATABASE TRANSACTION CONTROL LOCKS
+SET DATABASE DEFAULT ISOLATION LEVEL READ COMMITTED
+SET DATABASE TRANSACTION ROLLBACK ON CONFLICT TRUE
+SET DATABASE TEXT TABLE DEFAULTS ''
+SET FILES WRITE DELAY 500 MILLIS
+SET FILES BACKUP INCREMENT TRUE
+SET FILES CACHE SIZE 10000
+SET FILES CACHE ROWS 50000
+SET FILES SCALE 32
+SET FILES LOB SCALE 32
+SET FILES DEFRAG 0
+SET FILES NIO TRUE
+SET FILES NIO SIZE 256
+SET FILES LOG TRUE
+SET FILES LOG SIZE 50
+CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e'
+ALTER USER SA SET LOCAL TRUE
+CREATE SCHEMA PUBLIC AUTHORIZATION DBA
+SET SCHEMA PUBLIC
+CREATE MEMORY TABLE PUBLIC.USERS(EMAIL VARCHAR(32),PASSWORD VARCHAR(32))
+ALTER SEQUENCE SYSTEM_LOBS.LOB_ID RESTART WITH 1
+SET DATABASE DEFAULT INITIAL SCHEMA PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.YES_OR_NO TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.TIME_STAMP TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CARDINAL_NUMBER TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CHARACTER_DATA TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.SQL_IDENTIFIER TO PUBLIC
+GRANT DBA TO SA
+SET SCHEMA SYSTEM_LOBS
+INSERT INTO BLOCKS VALUES(0,2147483647,0)
+SET SCHEMA PUBLIC
+INSERT INTO USERS VALUES('user1','password1')

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/pom.xml b/mothballed/component/security/sql/pom.xml
new file mode 100755
index 0000000..1463ac4
--- /dev/null
+++ b/mothballed/component/security/sql/pom.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.isis.core</groupId>
+		<artifactId>isis</artifactId>
+        <version>1.1.1-SNAPSHOT</version>
+		<relativePath>../../../core/pom.xml</relativePath>
+	</parent>
+
+	<groupId>org.apache.isis.security</groupId>
+	<artifactId>isis-security-sql</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+
+	<name>Isis SQL Security</name>
+
+	<properties>
+        <siteBaseDir>.</siteBaseDir>
+		<relativeUrl/>
+	</properties>
+
+    <!-- used in Site generation for relative references. -->
+    <url>http://isis.apache.org/${relativeUrl}</url>
+
+	<build>
+		<pluginManagement>
+			<plugins>
+                <!-- Apache Release Audit Tool -->
+                <plugin>
+                    <groupId>org.apache.rat</groupId>
+                    <artifactId>apache-rat-plugin</artifactId>
+                    <version>0.8</version>
+	                <configuration>
+	                    <excludes>
+	                    	<!-- 
+	                    	overriding inherited excludes from oia.core:isis 
+	                    	with a more specific set for this component
+	                    	 -->
+	                        <exclude>**/target/**</exclude>
+	                        <exclude>**/target-ide/**</exclude>
+
+	                        <exclude>**/*.project</exclude>
+	                        <exclude>**/.classpath</exclude>
+	                        <exclude>**/.settings/**</exclude>
+	                    </excludes>
+                    </configuration>
+	            </plugin>
+			</plugins>
+		</pluginManagement>
+	</build>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-project-info-reports-plugin</artifactId>
+				<version>${maven-project-info-reports-plugin}</version>
+                <inherited>false</inherited>
+                <configuration>
+                	<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+                </configuration>
+                <reportSets>
+                    <reportSet>
+                        <inherited>false</inherited>
+                        <reports>
+                            <report>dependencies</report>
+                            <report>dependency-convergence</report>
+                            <report>plugins</report>
+                            <report>summary</report>
+                        </reports>
+                    </reportSet>
+                </reportSets>
+            </plugin>
+        </plugins>
+    </reporting>
+
+    <dependencyManagement>
+    	<!-- for benefit of application developers, using scope=import -->
+    	<dependencies>
+			<dependency>
+			    <groupId>org.apache.isis.security</groupId>
+			    <artifactId>isis-security-sql</artifactId>
+				<version>1.0.0-SNAPSHOT</version>
+			</dependency>
+    	</dependencies>
+    </dependencyManagement>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.hsqldb</groupId>
+			<artifactId>hsqldb</artifactId>
+			<scope>test</scope>
+		</dependency>
+		
+		<dependency>
+		    <groupId>org.apache.isis.core</groupId>
+		    <artifactId>isis-core-runtime</artifactId>
+		</dependency>
+		<dependency>
+		    <groupId>org.apache.isis.core</groupId>
+		    <artifactId>isis-core-runtime</artifactId>
+		    <type>test-jar</type>
+		    <scope>test</scope>
+		</dependency>
+	</dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/src/main/appended-resources/supplemental-models.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/src/main/appended-resources/supplemental-models.xml b/mothballed/component/security/sql/src/main/appended-resources/supplemental-models.xml
new file mode 100644
index 0000000..ecd3906
--- /dev/null
+++ b/mothballed/component/security/sql/src/main/appended-resources/supplemental-models.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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. -->
+<supplementalDataModels xmlns="http://maven.apache.org/supplemental-model/1.0.0"
+                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                        xsi:schemaLocation="http://maven.apache.org/supplemental-model/1.0.0 http://maven.apache.org/xsd/supplemental-model-1.0.0.xsd">
+
+  <supplement>
+    <project>
+      <groupId>aopalliance</groupId>
+      <artifactId>aopalliance</artifactId>
+      <version>1.0</version>
+      <licenses>
+          <license>
+              <name>Public Domain</name>
+          </license>
+      </licenses>
+    </project>
+  </supplement>
+
+  <supplement>
+   	<!-- not quite sure why licenses:download-license flags this, since license info seems to be in its POM -->
+    <project>
+		<groupId>org.datanucleus</groupId>
+	    <artifactId>datanucleus-jodatime</artifactId>
+	    <version>3.1.1</version>
+          <licenses>
+			<license>
+	            <name>The Apache Software License, Version 2.0</name>
+	            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+	        </license>
+	    </licenses>
+    </project>
+  </supplement>
+
+  <supplement>
+    <project>
+      <groupId>org.scannotation</groupId>
+      <artifactId>scannotation</artifactId>
+      <version>1.0.3</version>
+      <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>          
+        </license>
+      </licenses>
+    </project>
+  </supplement>
+    
+  <supplement>
+    <project>
+      <groupId>dom4j</groupId>
+      <artifactId>dom4j</artifactId>
+      <version>1.6.1</version>
+      <licenses>
+        <license>
+            <name>BSD License</name>
+            <url>http://dom4j.sourceforge.net/dom4j-1.6.1/license.html</url>
+            <distribution>repo</distribution>          
+        </license>
+      </licenses>
+    </project>
+  </supplement>
+
+  <supplement>
+    <project>
+      <groupId>net.jcip</groupId>
+      <artifactId>jcip-annotations</artifactId>
+      <version>1.0</version>
+      <licenses>
+        <license>
+            <name>Creative Commons Attribution 2.5 License</name>
+            <url>http://creativecommons.org/licenses/by/2.5/</url>
+            <distribution>repo</distribution>          
+        </license>
+      </licenses>
+    </project>
+  </supplement>
+  
+
+  <supplement>
+    <project>
+      <groupId>xalan</groupId>
+      <artifactId>xalan</artifactId>
+      <version>2.7.0</version>
+      <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>          
+        </license>
+      </licenses>
+    </project>
+  </supplement>
+
+ 
+</supplementalDataModels>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationConstants.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationConstants.java b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationConstants.java
new file mode 100755
index 0000000..24c7298
--- /dev/null
+++ b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationConstants.java
@@ -0,0 +1,27 @@
+/*
+ *  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.sql.authentication;
+
+public class SqlAuthenticationConstants {
+
+    private SqlAuthenticationConstants() {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationManagerInstaller.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationManagerInstaller.java b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationManagerInstaller.java
new file mode 100755
index 0000000..9dc53e2
--- /dev/null
+++ b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationManagerInstaller.java
@@ -0,0 +1,70 @@
+/*
+ *  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.sql.authentication;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+
+import com.google.common.collect.Lists;
+
+import org.apache.isis.applib.ApplicationException;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.runtime.authentication.AuthenticationManagerStandardInstallerAbstractForDfltRuntime;
+import org.apache.isis.core.runtime.authentication.standard.Authenticator;
+
+public class SqlAuthenticationManagerInstaller extends AuthenticationManagerStandardInstallerAbstractForDfltRuntime {
+
+    public static final String NAME = "sql";
+
+    public SqlAuthenticationManagerInstaller() {
+        super(NAME);
+    }
+
+    @Override
+    protected List<Authenticator> createAuthenticators(final IsisConfiguration configuration) {
+        return Lists.<Authenticator> newArrayList(createAuthenticator(configuration));
+    }
+
+    protected Authenticator createAuthenticator(final IsisConfiguration configuration) {
+        final String className = configuration.getString("isis.authentication.authenticator");
+        if (className == null) {
+            return new SqlAuthenticator(configuration);
+        }
+        try {
+            final Class<?> authenticatorClass = Class.forName(className);
+            return (Authenticator) authenticatorClass.getConstructor(IsisConfiguration.class).newInstance(configuration);
+        } catch (final ClassNotFoundException e) {
+            throw new ApplicationException("Unable to find authenticator class", e);
+        } catch (final IllegalArgumentException e) {
+            throw new ApplicationException("IllegalArgumentException creating authenticator class", e);
+        } catch (final SecurityException e) {
+            throw new ApplicationException("SecurityException creating authenticator class", e);
+        } catch (final InstantiationException e) {
+            throw new ApplicationException("InstantiationException creating authenticator class", e);
+        } catch (final IllegalAccessException e) {
+            throw new ApplicationException("IllegalAccessException creating authenticator class", e);
+        } catch (final InvocationTargetException e) {
+            throw new ApplicationException("InvocationTargetException creating authenticator class", e);
+        } catch (final NoSuchMethodException e) {
+            throw new ApplicationException("NoSuchMethodException creating authenticator class", e);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticator.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticator.java b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticator.java
new file mode 100755
index 0000000..63df436
--- /dev/null
+++ b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticator.java
@@ -0,0 +1,325 @@
+/*
+ *  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.sql.authentication;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import com.google.common.base.Strings;
+import com.google.inject.Inject;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.applib.ApplicationException;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.commons.ensure.Assert;
+import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
+import org.apache.isis.core.runtime.authentication.AuthenticationRequestPassword;
+import org.apache.isis.core.runtime.authentication.standard.PasswordRequestAuthenticatorAbstract;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
+public class SqlAuthenticator extends PasswordRequestAuthenticatorAbstract {
+    private static final Logger LOG = Logger.getLogger(SqlAuthenticator.class);
+
+    static SqlAuthenticator instance;
+
+    public static SqlAuthenticator getInstance() {
+        return instance;
+    }
+
+    // Override this method if dbPasswords are encoded.
+    protected boolean verifyPasswordsAreEqual(final String loginPassword, final String dbPassword) {
+        return dbPassword.equals(loginPassword);
+    }
+
+    // Override this method
+    protected ResultSet postProcessLogin(final String user, final String password, final ResultSet results) {
+        return results;
+    }
+
+    // override this method
+    protected String getRoles(final ResultSet results, final String roles) {
+        try {
+            if (userRoleField != null) {
+                final String dbRoles = results.getString(userRoleField);
+                return roles + "|" + dbRoles;
+            }
+        } catch (final SQLException e) {
+            LOG.warn("Error fetching role", e);
+        }
+        return roles;
+    }
+
+    // Override this method, if you want to create data.
+    public void initialise() {
+    }
+
+    static final String PROPERTY_BASE = "isis.authentication.sql";
+    static final String USER_TABLE = PROPERTY_BASE + ".userTable";
+    static final String USER_TABLE_NAME_FIELD = PROPERTY_BASE + ".userNameField";
+    static final String USER_TABLE_PASSWORD_FIELD = PROPERTY_BASE + ".passwordField";
+    static final String USER_TABLE_ROLE_FIELD = PROPERTY_BASE + ".roleField";
+
+    private Connection connection;
+
+    final String passwordField;
+    final String userTable;
+    final String userNameField;
+    final String userRoleField;
+
+    public static String getPropertyBase() {
+        return PROPERTY_BASE;
+    }
+
+    public static String getPropertyUserTable() {
+        return USER_TABLE;
+    }
+
+    public static String getPropertyUserTableNameField() {
+        return USER_TABLE_NAME_FIELD;
+    }
+
+    public static String getPropertyUserTablePasswordField() {
+        return USER_TABLE_PASSWORD_FIELD;
+    }
+
+    public static String getPropertyUserTableRoleField() {
+        return USER_TABLE_ROLE_FIELD;
+    }
+
+    @Inject
+    public SqlAuthenticator(final IsisConfiguration configuration) {
+        super(configuration);
+
+        userTable = configuration.getString(USER_TABLE);
+        userNameField = configuration.getString(USER_TABLE_NAME_FIELD);
+        passwordField = configuration.getString(USER_TABLE_PASSWORD_FIELD);
+        userRoleField = configuration.getString(USER_TABLE_ROLE_FIELD);
+
+        instance = this;
+    }
+
+    @Override
+    public void init() {
+        if (connection != null) {
+            LOG.info("close");
+        }
+
+        final String BASE = PROPERTY_BASE + ".jdbc.";
+        final IsisConfiguration params = IsisContext.getConfiguration().getProperties(BASE);
+
+        try {
+            final String driver = params.getString(BASE + "driver");
+            final String url = params.getString(BASE + "connection");
+            final String user = params.getString(BASE + "user");
+            final String password = params.getString(BASE + "password");
+
+            if (connection != null) {
+                throw new ApplicationException("Connection already established");
+            }
+
+            if (driver == null) {
+                throw new ApplicationException("No driver specified for database connection");
+            }
+            if (url == null) {
+                throw new ApplicationException("No connection URL specified to database");
+            }
+            if (user == null) {
+                throw new ApplicationException("No user specified for database connection");
+            }
+            if (password == null) {
+                throw new ApplicationException("No password specified for database connection");
+            }
+
+            Class.forName(driver);
+            LOG.info("Connecting to " + url + " as " + user);
+            connection = DriverManager.getConnection(url, user, password);
+            if (connection == null) {
+                throw new ApplicationException("No connection established to " + url);
+            }
+        } catch (final SQLException e) {
+            throw new ApplicationException("Failed to start", e);
+        } catch (final ClassNotFoundException e) {
+            throw new ApplicationException("Could not find database driver", e);
+        }
+
+    }
+
+    @Override
+    public void shutdown() {
+        String sql;
+        sql = "SHUTDOWN";
+        update(sql);
+        closeConnection();
+    }
+
+    private void closeConnection() {
+        try {
+            connection.close();
+            connection = null;
+        } catch (final SQLException e) {
+            LOG.warn("Failed to close connection:" + e);
+        }
+    }
+
+    @Override
+    public final boolean isValid(final AuthenticationRequest request) {
+        final AuthenticationRequestPassword passwordRequest = (AuthenticationRequestPassword) request;
+        final String username = passwordRequest.getName();
+        if (Strings.isNullOrEmpty(username)) {
+            return false;
+        }
+        final String password = passwordRequest.getPassword();
+        Assert.assertNotNull(password);
+
+        return isPasswordValidForUser(passwordRequest, username, password);
+
+    }
+
+    private boolean isPasswordValidForUser(final AuthenticationRequest request, final String user, final String password) {
+        final ResultSet results = loadUserDetails(user, password);
+        if (results != null) {
+            final String roles = getRoles(results, "org.apache.isis.viewer.wicket.roles.USER|org.starobjects.wicket.roles.USER");
+            setRoles(request, roles);
+
+            return true;
+        }
+        return false;
+    }
+
+    protected ResultSet loadUserDetails(final String user, final String password) {
+        final String sql = "SELECT * FROM " + userTable + " WHERE UPPER(" + userNameField + ") = ?";
+        addToQueryValues(user.toUpperCase());
+        final ResultSet results = select(sql);
+        try {
+            while (results.next()) {
+                final String dbPassword = results.getString(passwordField);
+                if (verifyPasswordsAreEqual(password, dbPassword)) {
+                    return postProcessLogin(user, password, results);
+                }
+            }
+        } catch (final SQLException e) {
+            LOG.error("Error loading user details: " + sql);
+            throw new ApplicationException("Error loading user details", e);
+        }
+
+        return null;
+    }
+
+    private final void setRoles(final AuthenticationRequest request, final String line) {
+        final StringTokenizer tokens = new StringTokenizer(line, "|", false);
+        final String[] roles = new String[tokens.countTokens()];
+        for (int i = 0; tokens.hasMoreTokens(); i++) {
+            roles[i] = tokens.nextToken();
+        }
+        request.setRoles(Arrays.asList(roles));
+    }
+
+    public boolean isSetup() {
+        return hasTable(userTable);
+    }
+
+    // {{ JDBC Connection SQL helpers
+    protected int update(final String sql) {
+        LOG.debug("SQL: " + sql);
+        PreparedStatement statement;
+        try {
+            statement = connection.prepareStatement(sql);
+            addPreparedValues(statement);
+            final int updateCount = statement.executeUpdate();
+            statement.close();
+            return updateCount;
+        } catch (final SQLException e) {
+            LOG.error("failed to execute " + sql, e);
+            throw new ApplicationException("Error executing update", e);
+        } finally {
+            clearPreparedValues();
+        }
+
+    }
+
+    private ResultSet select(final String sql) {
+        LOG.debug("SQL: " + sql);
+        PreparedStatement statement;
+        try {
+            statement = connection.prepareStatement(sql);
+            addPreparedValues(statement);
+            return (statement.executeQuery());
+        } catch (final SQLException e) {
+            LOG.error("failed to execte select: " + sql, e);
+            throw new ApplicationException("Error executing select", e);
+        } finally {
+            clearPreparedValues();
+        }
+    }
+
+    private final List<Object> queryValues = new ArrayList<Object>();
+
+    public String addToQueryValues(final Object o) {
+        queryValues.add(o);
+        return "?";
+    }
+
+    private void clearPreparedValues() {
+        queryValues.clear();
+    }
+
+    private void addPreparedValues(final PreparedStatement statement) throws SQLException {
+        if (queryValues.size() > 0) {
+            int i = 1;
+            try {
+                for (final Object value : queryValues) {
+                    statement.setObject(i, value);
+                    i++;
+                }
+            } catch (final SQLException e) {
+                LOG.error("Error adding prepared value " + i + " of type " + queryValues.get(i - 1).getClass().getSimpleName(), e);
+                throw e;
+            }
+        }
+    }
+
+    private boolean hasTable(final String tableName) {
+        try {
+            final ResultSet set = connection.getMetaData().getTables(null, null, tableName, null);
+            if (set.next()) {
+                LOG.debug("Found " + set.getString("TABLE_NAME"));
+                set.close();
+                return true;
+            } else {
+                set.close();
+                return false;
+            }
+        } catch (final SQLException e) {
+            LOG.error("failed to find table: " + tableName, e);
+            throw new ApplicationException("Error checking for table: " + tableName, e);
+        }
+    }
+
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizationManagerInstaller.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizationManagerInstaller.java b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizationManagerInstaller.java
new file mode 100755
index 0000000..16e78fc
--- /dev/null
+++ b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizationManagerInstaller.java
@@ -0,0 +1,39 @@
+/*
+ *  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.sql.authorization;
+
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.runtime.authorization.standard.AuthorizationManagerStandardInstallerAbstract;
+import org.apache.isis.core.runtime.authorization.standard.Authorizor;
+
+public class SqlAuthorizationManagerInstaller extends AuthorizationManagerStandardInstallerAbstract {
+
+    public static final String NAME = "sql";
+
+    public SqlAuthorizationManagerInstaller() {
+        super(NAME);
+    }
+
+    @Override
+    protected Authorizor createAuthorizor(final IsisConfiguration configuration) {
+        return new SqlAuthorizor(configuration);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java
new file mode 100755
index 0000000..de12010
--- /dev/null
+++ b/mothballed/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java
@@ -0,0 +1,73 @@
+/*
+ *  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.sql.authorization;
+
+import org.apache.isis.applib.Identifier;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.runtime.authorization.standard.AuthorizorAbstract;
+
+public class SqlAuthorizor extends AuthorizorAbstract {
+    // TODO: Need to implement this class.
+
+    // private static final Logger LOG = Logger.getLogger(SqlAuthorizor.class);
+
+    public SqlAuthorizor(final IsisConfiguration configuration) {
+        super(configuration);
+
+    }
+
+    // //////////////////////////////////////////////////////////////
+    // init, shutdown
+    // //////////////////////////////////////////////////////////////
+
+    @Override
+    public void init() {
+        // does nothing
+    }
+
+    @Override
+    public void shutdown() {
+        // does nothing
+    }
+
+    // //////////////////////////////////////////////////////////////
+    // API
+    // //////////////////////////////////////////////////////////////
+
+    @Override
+    public boolean isUsableInRole(final String role, final Identifier identifier) {
+        return true;
+    }
+
+    @Override
+    public boolean isVisibleInRole(final String user, final Identifier identifier) {
+        return true;
+    }
+
+    @Override
+    public boolean isVisibleInAnyRole(Identifier identifier) {
+        return true;
+    }
+
+    @Override
+    public boolean isUsableInAnyRole(Identifier identifier) {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/src/site.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/src/site.xml b/mothballed/component/security/sql/src/site.xml
new file mode 100755
index 0000000..66aa164
--- /dev/null
+++ b/mothballed/component/security/sql/src/site.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project>
+
+	<body>
+		<breadcrumbs>
+			<item name="SQL" href="index.html"/>
+		</breadcrumbs>
+
+		<menu name="SQL Security">
+			<item name="About" href="index.html" />
+            <item name="Jottings" href="jottings.html" />
+		</menu>
+
+        <menu name="Security Modules">
+            <item name="Default (No-op)" href="../dflt/index.html" />
+            <item name="File" href="../file/index.html" />
+            <item name="LDAP" href="../ldap/index.html" />
+            <item name="SQL" href="../sql/index.html" />
+        </menu>
+
+        <menu name="Maven Reports" ref="reports" />
+	</body>
+</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/src/site/apt/index.apt b/mothballed/component/security/sql/src/site/apt/index.apt
new file mode 100755
index 0000000..8451f4c
--- /dev/null
+++ b/mothballed/component/security/sql/src/site/apt/index.apt
@@ -0,0 +1,124 @@
+~~  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.
+
+
+
+Security SQL Implementation
+ 
+ The <SQL security> module is a simple implementation of Isis' authentication and
+ authorization APIs, that uses flat SQL tables to store user/passwords/roles (for authentication)
+ and role-based permissions (for authorization).
+ 
+ No additional helpers are provided to maintain the SQL tables used, so you will have
+ to find your own table viewers/editors to maintain them.
+
+ At the moment, authorisation learning has not been implemented.
+ 
+ The SqlAuthenticator classes use jdbc to access the database tables, with no reliance on the 
+ Isis SqlObjectStore.
+ 
+ 
+Alternatives
+
+  Alternatives include:
+  
+  * the {{{../dflt/index.html}default}} (no-op) security implementation, for prototyping use only
+
+  * the {{{../file/index.html}file}} security
+
+  * the {{{../ldap/index.html}LDAP}} security
+  
+ See the security 
+ {{{../docbkx/html/guide/isis-security.html}HTML}} or 
+ {{{../docbkx/pdf/isis-security.pdf}PDF}} documentation for more details on these others.
+
+Setup
+ 
+ The SQL Authenticator is relatively easy to setup - just add the following to isis.properties:
+ Change the connection, userTable, etc, definitions, to reflect that of your configuration.
+ 
++--
+ isis.authentication=sql
+ isis.authentication.sql.jdbc.driver=org.hsqldb.jdbcDriver
+
+ # Connection string: e.g.
+ isis.authentication.sql.jdbc.connection=jdbc:hsqldb:file:hsql-db/authentication
+
+ # Connection authentication
+ isis.authentication.sql.jdbc.user=sa
+ isis.authentication.sql.jdbc.password=
+
+ isis.authentication.sql.userTable=RealNameOfUserTable 
+ isis.authentication.sql.userNameField=RealFieldThatContainsUsernames
+ isis.authentication.sql.passwordField=RealFieldThatContainsPassword 
+
+ # The following property is optional, for specifying roles:
+ # Roles are of the forms ROLE1|ROLE2|ROLE3
+ isis.authentication.sql.roleField=RealFieldThatContainsRoles
+ 
+  # Optional: If you wish to override the default SqlAuthenticator, you can specify 
+  # your own, by providing the fully qualified class name of your class that extends
+  # PasswordRequestAuthenticatorAbstract:
+  isis.authentication.authenticator=domain.package.MyCustomSqlAuthenticator
++--
+
+  * Operation
+  
+  The default SqlAuthenticator loads the record set from <<isis.authentication.sql.userTable>> with
+  values where <<isis.authentication.sql.userNameField>> matches the login form's username (converted to
+  upper-case, so the match is case-<<in>>sensitive). 
+  
+  A simple case-sensitive string comparison is performed to match the login form's password with the value
+  in <<isis.authentication.sql.passwordField>>.
+  
+  If a match is found, the user roles are loaded from the field 
+  <<isis.authentication.sql.roleField>>, if specified.      
+  
+Custom Authenticator
+  
+  If you want to replace or extend the current behaviour, you need to 
+  extend <<org.apache.isis.security.sql.authentication.SqlAuthenticator>> and optionally override 
+  whichever of the following methods you need to:
+  
++--
+  boolean verifyPasswordsAreEqual(String userPassword, String dbPassword)
+  ResultSet postProcessLogin(String user, String password, ResultSet results)
+  String getRoles(final ResultSet results, final String roles)
++--  
+
+  * <<verifyPasswordsAreEqual>>
+  
+  Lets you override the default password comparison check, which is a simple <loginPassword.equals(dbPassword)> check.
+  
+  Use this if your database passwords are encrypted.
+  
+  This method is called before postProcessLogin, which is only called if this method returns true.
+
+  * <<postProcessLogin>>
+  
+  Lets you perform additional processing to see if the found RecordSet (which has already been verified to match the
+  provided username and password, should be allowed to login.
+  
+  Simply return the results RecordSet, if so, else return null.
+  
+  * <<getRoles>>
+  
+  Lets you add additional roles to the default. Simply return your custom roles appended to the provided roles String.
+  Separate roles with a "|", e.g. <return roles+"|ROLE1|ROLE2">.    
+
+  []
+ 

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/src/site/apt/jottings.apt
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/src/site/apt/jottings.apt b/mothballed/component/security/sql/src/site/apt/jottings.apt
new file mode 100755
index 0000000..c5d1200
--- /dev/null
+++ b/mothballed/component/security/sql/src/site/apt/jottings.apt
@@ -0,0 +1,24 @@
+~~  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.
+
+
+
+Jottings
+ 
+  This page is to capture any random jottings relating to this module prior 
+  to being moved into formal documentation. 
+ 

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/sql/src/site/site.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/security/sql/src/site/site.xml b/mothballed/component/security/sql/src/site/site.xml
new file mode 100755
index 0000000..66aa164
--- /dev/null
+++ b/mothballed/component/security/sql/src/site/site.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project>
+
+	<body>
+		<breadcrumbs>
+			<item name="SQL" href="index.html"/>
+		</breadcrumbs>
+
+		<menu name="SQL Security">
+			<item name="About" href="index.html" />
+            <item name="Jottings" href="jottings.html" />
+		</menu>
+
+        <menu name="Security Modules">
+            <item name="Default (No-op)" href="../dflt/index.html" />
+            <item name="File" href="../file/index.html" />
+            <item name="LDAP" href="../ldap/index.html" />
+            <item name="SQL" href="../sql/index.html" />
+        </menu>
+
+        <menu name="Maven Reports" ref="reports" />
+	</body>
+</project>


[05/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/RegisterServlet.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/RegisterServlet.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/RegisterServlet.java
new file mode 100644
index 0000000..d103d9a
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/RegisterServlet.java
@@ -0,0 +1,98 @@
+/*
+ *  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.servlet;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.google.common.base.Objects;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.core.runtime.authentication.standard.RegistrationDetailsPassword;
+import org.apache.isis.viewer.html.component.html.HtmlComponentFactory;
+import org.apache.isis.viewer.html.component.html.RegisterFormPage;
+import org.apache.isis.viewer.html.monitoring.servermonitor.Monitor;
+
+public class RegisterServlet extends AbstractHtmlViewerServlet {
+
+    private static final long serialVersionUID = 1L;
+
+    @SuppressWarnings("unused")
+    private static final Logger LOG = Logger.getLogger(RegisterServlet.class);
+
+    @Override
+    public void init() throws ServletException {
+    }
+
+    @Override
+    protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
+        doPost(request, response);
+    }
+
+    @Override
+    protected void doPost(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
+
+        // prompt
+        final String user = request.getParameter("username");
+        final String password = request.getParameter("password");
+        final String password2 = request.getParameter("password2");
+        if (user == null) {
+            renderPrompt(response, "", "", "", "");
+            return;
+        }
+
+        // register; re-prompt if required
+        if (!Objects.equal(password, password2)) {
+            renderPrompt(response, user, "", "", "passwords don't match");
+            return;
+        }
+
+        // register; re-prompt if required
+        final boolean registered = register(user, password, password2);
+        if (!registered) {
+            renderPrompt(response, user, "", "", "user name already taken");
+            return;
+        }
+
+        // registered
+        redirectToLogonPage(response, user);
+    }
+
+    private void redirectToLogonPage(final HttpServletResponse response, final String user) throws IOException {
+        Monitor.addEvent("Web", "Logon - " + user);
+        response.sendRedirect(pathTo(HtmlServletConstants.LOGON_PAGE));
+    }
+
+    private void renderPrompt(final HttpServletResponse response, final String user, final String password, final String password2, final String message) throws IOException {
+        response.setContentType("text/html");
+        final HtmlComponentFactory factory = new HtmlComponentFactory(getPathBuilder());
+        final RegisterFormPage page = factory.createRegisterPage(user, password, message);
+        page.write(response.getWriter());
+    }
+
+    private boolean register(final String user, final String password, final String password2) {
+        return getAuthenticationManager().register(new RegistrationDetailsPassword(user, password));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java
new file mode 100644
index 0000000..0d72805
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java
@@ -0,0 +1,460 @@
+/*
+ *  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.servlet.internal;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.commons.debug.DebugString;
+import org.apache.isis.core.commons.exceptions.IsisApplicationException;
+import org.apache.isis.core.commons.exceptions.IsisException;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.util.Dump;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.userprofile.UserProfile;
+import org.apache.isis.core.runtime.userprofile.UserProfilesDebugUtil;
+import org.apache.isis.viewer.html.PathBuilder;
+import org.apache.isis.viewer.html.action.Action;
+import org.apache.isis.viewer.html.action.ActionException;
+import org.apache.isis.viewer.html.action.ChangeContext;
+import org.apache.isis.viewer.html.action.LogOut;
+import org.apache.isis.viewer.html.action.Welcome;
+import org.apache.isis.viewer.html.action.edit.AddItemToCollection;
+import org.apache.isis.viewer.html.action.edit.EditObject;
+import org.apache.isis.viewer.html.action.edit.RemoveItemFromCollection;
+import org.apache.isis.viewer.html.action.edit.Save;
+import org.apache.isis.viewer.html.action.misc.About;
+import org.apache.isis.viewer.html.action.misc.SetUser;
+import org.apache.isis.viewer.html.action.misc.SwapUser;
+import org.apache.isis.viewer.html.action.view.CollectionView;
+import org.apache.isis.viewer.html.action.view.FieldCollectionView;
+import org.apache.isis.viewer.html.action.view.ObjectView;
+import org.apache.isis.viewer.html.action.view.ServiceView;
+import org.apache.isis.viewer.html.component.Block;
+import org.apache.isis.viewer.html.component.Component;
+import org.apache.isis.viewer.html.component.ComponentFactory;
+import org.apache.isis.viewer.html.component.DebugPane;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.context.ObjectLookupException;
+import org.apache.isis.viewer.html.crumb.Crumb;
+import org.apache.isis.viewer.html.image.ImageLookup;
+import org.apache.isis.viewer.html.monitoring.servermonitor.Monitor;
+import org.apache.isis.viewer.html.request.Request;
+import org.apache.isis.viewer.html.task.InvokeMethod;
+import org.apache.isis.viewer.html.task.TaskLookupException;
+import org.apache.isis.viewer.html.task.TaskStep;
+
+public class WebController {
+
+    private static final Logger LOG = Logger.getLogger(WebController.class);
+    private static final Logger ACCESS_LOG = Logger.getLogger("access_log");
+
+    private static final String ERROR_REASON = "This error occurs when you go back to a page " + "using the browsers back button.  To avoid this error in the future please avoid using the back button";
+
+    protected class DebugView implements Action {
+        public DebugView() {
+        }
+
+        @Override
+        public void execute(final Request request, final Context context, final Page page) {
+            page.setTitle("Debug");
+
+            final DebugPane debugPane = context.getComponentFactory().createDebugPane();
+            page.setDebug(debugPane);
+
+            final DebugString debug = new DebugString();
+
+            final AuthenticationSession authenticationSession = IsisContext.getAuthenticationSession();
+            debug.appendTitle("Session");
+            if (authenticationSession != null) {
+                debug.appendln("user", authenticationSession.getUserName());
+                debug.appendln("roles", authenticationSession.getRoles());
+            } else {
+                debug.appendln("none");
+            }
+
+            final UserProfile userProfile = IsisContext.getUserProfile();
+            debug.appendTitle("User profile");
+            if (userProfile != null) {
+                UserProfilesDebugUtil.asDebuggableWithTitle(userProfile).debugData(debug);
+            } else {
+                debug.appendln("none");
+            }
+
+            debug.appendTitle("Actions");
+            final Iterator e = actions.entrySet().iterator();
+            debug.indent();
+            while (e.hasNext()) {
+                final Map.Entry element = (Map.Entry) e.next();
+                debug.appendln(element.getKey() + " -> " + element.getValue());
+            }
+            debug.unindent();
+
+            context.debug(debug);
+
+            ImageLookup.debug(debug);
+
+            debugPane.appendln("<pre>" + debug.toString() + "</pre>");
+        }
+
+        @Override
+        public String name() {
+            return "debug";
+        }
+    }
+
+    protected class DebugSpecification implements Action {
+        public DebugSpecification() {
+        }
+
+        @Override
+        public void execute(final Request request, final Context context, final Page page) {
+            final DebugPane debugPane = context.getComponentFactory().createDebugPane();
+            page.setDebug(debugPane);
+
+            debugPane.addSection("Specification");
+            final ObjectAdapter object = context.getMappedObject(request.getObjectId());
+            debugPane.appendln(Dump.specification(object));
+        }
+
+        @Override
+        public String name() {
+            return "spec";
+        }
+    }
+
+    protected class DebugObject implements Action {
+        public DebugObject() {
+        }
+
+        @Override
+        public void execute(final Request request, final Context context, final Page page) {
+            final DebugPane debugPane = context.getComponentFactory().createDebugPane();
+            page.setDebug(debugPane);
+
+            debugPane.addSection("Adapter");
+            final ObjectAdapter object = context.getMappedObject(request.getObjectId());
+            debugPane.appendln(Dump.adapter(object));
+            debugPane.addSection("Graph");
+            debugPane.appendln(Dump.graph(object, IsisContext.getAuthenticationSession()));
+        }
+
+        @Override
+        public String name() {
+            return "dump";
+        }
+    }
+
+    protected class DebugOn implements Action {
+        private final WebController controller;
+
+        public DebugOn(final WebController controller) {
+            this.controller = controller;
+        }
+
+        @Override
+        public void execute(final Request request, final Context context, final Page page) {
+            controller.setDebug(true);
+        }
+
+        @Override
+        public String name() {
+            return "debugon";
+        }
+    }
+
+    protected class DebugOff implements Action {
+        private final WebController controller;
+
+        public DebugOff(final WebController controller) {
+            this.controller = controller;
+        }
+
+        @Override
+        public void execute(final Request request, final Context context, final Page page) {
+            controller.setDebug(false);
+        }
+
+        @Override
+        public String name() {
+            return "debugoff";
+        }
+    }
+
+    private final Map actions = new HashMap();
+
+    private boolean isDebug;
+    private final PathBuilder pathBuilder;
+
+    public WebController(final PathBuilder pathBuilder) {
+        this.pathBuilder = pathBuilder;
+    }
+
+    public boolean actionExists(final Request req) {
+        return actions.containsKey(req.getRequestType());
+    }
+
+    protected void addAction(final Action action) {
+        actions.put(action.name(), action);
+    }
+
+    private void addCrumbs(final Context context, final Page page) {
+        final Crumb[] crumbs = context.getCrumbs();
+        final String[] names = new String[crumbs.length];
+        final boolean[] isLinked = context.isLinked();
+
+        for (int i = 0; i < crumbs.length; i++) {
+            names[i] = crumbs[i].title();
+        }
+
+        final ComponentFactory factory = context.getComponentFactory();
+        final Component breadCrumbs = factory.createBreadCrumbs(names, isLinked);
+
+        page.setCrumbs(breadCrumbs);
+    }
+
+    public void addDebug(final Page page, final Request req) {
+        page.addDebug("<a href=\"" + pathTo("debug") + "\">Debug</a>");
+        final String id = req.getObjectId();
+        if (id != null) {
+            page.addDebug("<a href=\"" + pathTo("dump") + "?id=" + id + "\">Object</a>");
+            page.addDebug("<a href=\"" + pathTo("spec") + "?id=" + id + "\">Spec</a>");
+        }
+        page.addDebug("<a href=\"" + pathTo("about") + "\">About</a>");
+        page.addDebug("<a href=\"" + pathTo("debugoff") + "\">Debug off</a>");
+    }
+
+    public Page generatePage(final Context context, final Request request) {
+        context.restoreAllObjectsToLoader();
+        final Page page = context.getComponentFactory().createPage();
+        pageHeader(context, page);
+        final Block navigation = page.getNavigation();
+
+        final Block optionBar = context.getComponentFactory().createBlock("options", null);
+        optionBar.add(context.getComponentFactory().createHeading("Options"));
+
+        Block block = context.getComponentFactory().createBlock("item", null);
+        Component option = context.getComponentFactory().createLink("logout", "Log Out", "End the current session");
+        block.add(option);
+        optionBar.add(block);
+
+        block = context.getComponentFactory().createBlock("item", null);
+        option = context.getComponentFactory().createLink("about", "About", "Details about this application");
+        block.add(option);
+        optionBar.add(block);
+
+        // boolean isExploring = SessionAccess.inExplorationMode();
+        final boolean isExploring = IsisContext.getDeploymentType().isExploring();
+        if (isExploring) {
+            block = context.getComponentFactory().createBlock("item", null);
+            option = context.getComponentFactory().createLink("swapuser", "Swap User", "Swap the exploration user");
+            block.add(option);
+            optionBar.add(block);
+        }
+
+        navigation.add(optionBar);
+
+        listServices(context, navigation);
+        listHistory(context, navigation);
+        Monitor.addEvent("Web", "Request " + request);
+        runAction(context, request, page);
+        addCrumbs(context, page);
+
+        // The web viewer has no views of other objects, so changes can be
+        // ignored
+        if (IsisContext.inSession() && IsisContext.inTransaction()) {
+            IsisContext.getUpdateNotifier().clear();
+        }
+        // TODO deal with disposed objects
+
+        return page;
+    }
+
+    public void init() {
+        addAction(new About());
+        addAction(new SwapUser());
+        addAction(new SetUser());
+        addAction(new DebugView());
+        addAction(new DebugSpecification());
+        addAction(new DebugObject());
+        addAction(new Welcome());
+        addAction(new ObjectView());
+        addAction(new CollectionView());
+        addAction(new FieldCollectionView());
+        addAction(new InvokeMethod());
+        addAction(new TaskStep());
+        addAction(new EditObject());
+        addAction(new Save());
+        addAction(new ServiceView());
+        addAction(new LogOut());
+        addAction(new RemoveItemFromCollection());
+        addAction(new AddItemToCollection());
+        addAction(new ChangeContext());
+
+        // TODO allow these to be exclude by configuration so they cannot be run
+        // in a real system
+        addAction(new DebugOn(this));
+        addAction(new DebugOff(this));
+
+        Logger.getLogger(this.getClass()).info("init");
+    }
+
+    public boolean isDebug() {
+        return isDebug;
+    }
+
+    private void listHistory(final Context context, final Block navigation) {
+        context.listHistory(context, navigation);
+    }
+
+    private void listServices(final Context context, final Block navigationBar) {
+        final Block taskBar = context.getComponentFactory().createBlock("services", null);
+        taskBar.add(context.getComponentFactory().createHeading("Services"));
+        final AdapterManager adapterManager = IsisContext.getPersistenceSession().getAdapterManager();
+        final List<Object> services = getUserProfile().getPerspective().getServices();
+        for (final Object service : services) {
+            final ObjectAdapter serviceAdapter = adapterManager.adapterFor(service);
+            if (serviceAdapter == null) {
+                LOG.warn("unable to find service Id: " + service + "; skipping");
+                continue;
+            }
+            if (isHidden(serviceAdapter)) {
+                continue;
+            }
+            final String serviceMapId = context.mapObject(serviceAdapter);
+            taskBar.add(createServiceComponent(context, serviceMapId, serviceAdapter));
+        }
+        navigationBar.add(taskBar);
+    }
+
+    private Component createServiceComponent(final Context context, final String serviceMapId, final ObjectAdapter serviceNO) {
+        final String serviceName = serviceNO.titleString();
+        final String serviceIcon = serviceNO.getIconName();
+        return context.getComponentFactory().createService(serviceMapId, serviceName, serviceIcon);
+    }
+
+    private boolean isHidden(final ObjectAdapter serviceNO) {
+        final ObjectSpecification serviceNoSpec = serviceNO.getSpecification();
+        final boolean isHidden = serviceNoSpec.isHidden();
+        return isHidden;
+    }
+
+    private void pageHeader(final Context context, final Page page) {
+        page.getPageHeader().add(context.getComponentFactory().createInlineBlock("none", "", null));
+    }
+
+    private void runAction(final Context context, final Request request, final Page page) {
+        try {
+            ACCESS_LOG.info("request " + request.toString());
+            Request r = request;
+            final DebugString debug = new DebugString();
+            debug.startSection("Request");
+            debug.appendln("http", request.toString());
+            debug.endSection();
+            do {
+                final Action action = (Action) actions.get(r.getRequestType());
+                try {
+                    action.execute(r, context, page);
+                } catch (final ObjectLookupException e) {
+                    final String error = "The object/service you selected has timed out.  Please navigate to the object via the history bar.";
+                    displayError(context, page, error);
+                } catch (final TaskLookupException e) {
+                    final String error = "The task you went back to has already been completed or cancelled.  Please start the task again.";
+                    displayError(context, page, error);
+                }
+                r = r.getForward();
+                if (r != null) {
+                    LOG.debug("forward to " + r);
+                }
+            } while (r != null);
+            if (LOG.isDebugEnabled()) {
+                context.debug(debug);
+                debug.appendln();
+                if (IsisContext.inSession()) {
+                    IsisContext.getSession(getExecutionContextId()).debugAll(debug);
+                } else {
+                    debug.appendln("No session");
+                }
+                LOG.debug(debug.toString());
+            }
+        } catch (final ActionException e) {
+            page.setTitle("Error");
+            page.getViewPane().setTitle("Error", "Action Exception");
+            LOG.error("ActionException, executing action " + request.getRequestType(), e);
+            page.getViewPane().add(context.getComponentFactory().createErrorMessage(e, isDebug));
+        } catch (final IsisApplicationException e) {
+            page.setTitle("Error");
+            page.getViewPane().setTitle("Error", "Application Exception");
+            LOG.error("ApplicationException, executing action " + request.getRequestType(), e);
+            page.getViewPane().add(context.getComponentFactory().createErrorMessage(e, isDebug));
+        } catch (final IsisException e) {
+            page.setTitle("Error");
+            page.getViewPane().setTitle("Error", "System Exception");
+            LOG.error("ObjectAdapterRuntimeException, executing action " + request.getRequestType(), e);
+            page.getViewPane().add(context.getComponentFactory().createErrorMessage(e, true));
+        } catch (final RuntimeException e) {
+            page.setTitle("Error");
+            page.getViewPane().setTitle("Error", "System Exception");
+            LOG.error("RuntimeException, executing action " + request.getRequestType(), e);
+            page.getViewPane().add(context.getComponentFactory().createErrorMessage(e, true));
+        }
+    }
+
+    private void displayError(final Context context, final Page page, final String errorMessage) {
+        page.setTitle("Error");
+        page.getViewPane().setTitle("Error", "");
+
+        final Block block1 = context.getComponentFactory().createBlock("error", "");
+        block1.add(context.getComponentFactory().createInlineBlock("", errorMessage, ""));
+        page.getViewPane().add(block1);
+
+        final Block block2 = context.getComponentFactory().createBlock("text", "");
+        block2.add(context.getComponentFactory().createInlineBlock("", ERROR_REASON, ""));
+        page.getViewPane().add(block2);
+    }
+
+    public void setDebug(final boolean on) {
+        this.isDebug = on;
+    }
+
+    protected String pathTo(final String prefix) {
+        return pathBuilder.pathTo(prefix);
+    }
+
+    // ///////////////////////////////////////////////////////
+    // Dependencies (from singleton)
+    // ///////////////////////////////////////////////////////
+
+    private UserProfile getUserProfile() {
+        return IsisContext.getUserProfile();
+    }
+
+    private String getExecutionContextId() {
+        return IsisContext.getSessionId();
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/AddItemToCollectionTask.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/AddItemToCollectionTask.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/AddItemToCollectionTask.java
new file mode 100644
index 0000000..babb1f9
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/AddItemToCollectionTask.java
@@ -0,0 +1,95 @@
+/*
+ *  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.task;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.consent.Consent;
+import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
+import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacetUtils;
+import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.Persistor;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+
+public class AddItemToCollectionTask extends Task {
+    private final OneToManyAssociation field;
+
+    public AddItemToCollectionTask(final Context context, final ObjectAdapter target, final OneToManyAssociation fld) {
+        super(context, "Add to collection", "", target, 1);
+        names[0] = fld.getName();
+        descriptions[0] = fld.getDescription();
+        fieldSpecifications[0] = fld.getSpecification();
+        initialState[0] = null;
+        optional[0] = true;
+        // TODO add defaults and options
+        this.field = fld;
+    }
+
+    @Override
+    public void checkForValidity(final Context context) {
+        final ObjectAdapter target = getTarget(context);
+        final ObjectAdapter[] parameters = getEntries(context);
+
+        final Consent valueValid = field.isValidToAdd(target, parameters[0]);
+        errors[0] = valueValid.getReason();
+    }
+
+    @Override
+    public void checkInstances(final Context context, final ObjectAdapter[] objects) {
+        final ObjectAdapter collection = field.get(getTarget(context));
+        final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
+        final ObjectAdapter target = getTarget(context);
+        for (int i = 0; i < objects.length; i++) {
+            final Consent valueValid = field.isValidToAdd(target, objects[i]);
+            if (valueValid.isVetoed()) {
+                objects[i] = null;
+            } else if (facet.contains(collection, objects[i])) {
+                objects[i] = null;
+            }
+        }
+    }
+
+    @Override
+    public ObjectAdapter completeTask(final Context context, final Page page) {
+        final ObjectAdapter targetAdapter = getTarget(context);
+        final ObjectAdapter[] parameterAdapters = getEntries(context);
+        field.addElement(targetAdapter, parameterAdapters[0]);
+
+        if (targetAdapter.isTransient()) {
+            getPersistenceSession().makePersistent(targetAdapter);
+        }
+        return targetAdapter;
+    }
+
+    @Override
+    public boolean isEditing() {
+        return true;
+    }
+
+    // /////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // /////////////////////////////////////////////////////
+
+    private static Persistor getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/EditTask.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/EditTask.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/EditTask.java
new file mode 100644
index 0000000..3a2649d
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/EditTask.java
@@ -0,0 +1,231 @@
+/*
+ *  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.task;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.Where;
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.util.AdapterUtils;
+import org.apache.isis.core.metamodel.consent.Consent;
+import org.apache.isis.core.metamodel.facets.maxlen.MaxLengthFacet;
+import org.apache.isis.core.metamodel.facets.multiline.MultiLineFacet;
+import org.apache.isis.core.metamodel.facets.typicallen.TypicalLengthFacet;
+import org.apache.isis.core.metamodel.spec.ActionType;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters;
+import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+
+public class EditTask extends Task {
+
+    // REVIEW: should provide this rendering context, rather than hardcoding.
+    // the net effect currently is that class members annotated with 
+    // @Hidden(where=Where.ANYWHERE) or @Disabled(where=Where.ANYWHERE) will indeed
+    // be hidden/disabled, but will be visible/enabled (perhaps incorrectly) 
+    // for any other value for Where
+    private final static Where where = Where.ANYWHERE;
+
+    private static int size(final ObjectAdapter object) {
+        final List<ObjectAssociation> fields = object.getSpecification().getAssociations(ObjectAssociationFilters.dynamicallyVisible(getAuthenticationSession(), object, where));
+        return fields.size();
+    }
+
+    private static boolean skipField(final ObjectAdapter object, final ObjectAssociation fld) {
+        return fld.isOneToManyAssociation() || fld.isUsable(getAuthenticationSession(), object, where).isVetoed();
+    }
+
+    private final ObjectAssociation[] fields;
+    private final String newType;
+
+    public EditTask(final Context context, final ObjectAdapter adapter) {
+        super(context, "Edit", "", adapter, size(adapter));
+
+        final List<ObjectAssociation> allFields = adapter.getSpecification().getAssociations(ObjectAssociationFilters.dynamicallyVisible(getAuthenticationSession(), adapter, where));
+
+        fields = new ObjectAssociation[names.length];
+        for (int i = 0, j = 0; j < allFields.size(); j++) {
+            final ObjectAssociation fld = allFields.get(j);
+            fields[i] = fld;
+            names[i] = fld.getName();
+            descriptions[i] = fld.getDescription();
+
+            final Consent usableByUser = fld.isUsable(getAuthenticationSession(), adapter, where);
+            if (usableByUser.isVetoed()) {
+                descriptions[i] = usableByUser.getReason();
+            }
+
+            fieldSpecifications[i] = fld.getSpecification();
+            initialState[i] = fld.get(adapter);
+            if (skipField(adapter, fld)) {
+                readOnly[i] = true;
+            } else {
+                readOnly[i] = false;
+                optional[i] = !fld.isMandatory();
+                if (fieldSpecifications[i].isParseable()) {
+                    final MultiLineFacet multilineFacet = fld.getFacet(MultiLineFacet.class);
+                    noLines[i] = multilineFacet.numberOfLines();
+                    wraps[i] = !multilineFacet.preventWrapping();
+
+                    final MaxLengthFacet maxLengthFacet = fld.getFacet(MaxLengthFacet.class);
+                    maxLength[i] = maxLengthFacet.value();
+
+                    final TypicalLengthFacet typicalLengthFacet = fld.getFacet(TypicalLengthFacet.class);
+                    typicalLength[i] = typicalLengthFacet.value();
+                }
+            }
+            i++;
+        }
+
+        final boolean isTransient = adapter.isTransient();
+        newType = isTransient ? getTarget(context).getSpecification().getSingularName() : null;
+    }
+
+    @Override
+    protected ObjectAdapter[][] getOptions(final Context context, final int from, final int len) {
+        final ObjectAdapter target = getTarget(context);
+        final ObjectAdapter[][] options = new ObjectAdapter[len][];
+        for (int i = from, j = 0; j < len; i++, j++) {
+            if (skipField(target, fields[i])) {
+            } else {
+                options[j] = fields[i].getChoices(target);
+            }
+        }
+        return options;
+    }
+
+    @Override
+    public void checkForValidity(final Context context) {
+        final ObjectAdapter target = getTarget(context);
+        final ObjectAdapter[] entries = getEntries(context);
+
+        final int len = fields.length;
+        for (int i = 0; i < len; i++) {
+            if (readOnly[i] || errors[i] != null) {
+                continue;
+            }
+            final ObjectAssociation fld = fields[i];
+            if (fld.isOneToOneAssociation()) {
+                final OneToOneAssociation oneToOneAssociation = (OneToOneAssociation) fld;
+                final ObjectAdapter entryReference = entries[i];
+                final ObjectAdapter currentReference = oneToOneAssociation.get(target);
+                if (currentReference != entryReference) {
+                    final Consent valueValid = ((OneToOneAssociation) fld).isAssociationValid(target, entryReference);
+                    errors[i] = valueValid.getReason();
+                }
+            }
+        }
+
+        if (target.isTransient()) {
+            saveState(target, entries);
+            final Consent isValid = target.getSpecification().isValid(target);
+            error = isValid.isVetoed() ? isValid.getReason() : null;
+        }
+    }
+
+    @Override
+    public ObjectAdapter completeTask(final Context context, final Page page) {
+        final ObjectAdapter targetAdapter = getTarget(context);
+        final ObjectAdapter[] entryAdapters = getEntries(context);
+
+        if (targetAdapter.isTransient()) {
+            final ObjectAction action = targetAdapter.getSpecification().getObjectAction(ActionType.USER, "save", ObjectSpecification.EMPTY_LIST);
+            if (action == null) {
+                getPersistenceSession().makePersistent(targetAdapter);
+            } else {
+                action.execute(targetAdapter, new ObjectAdapter[0]);
+            }
+        } else {
+            saveState(targetAdapter, entryAdapters);
+        }
+
+        return targetAdapter;
+    }
+
+    private void saveState(final ObjectAdapter targetAdapter, final ObjectAdapter[] entryAdapters) {
+        getPersistenceSession().getTransactionManager().startTransaction();
+        for (int i = 0; i < fields.length; i++) {
+            final ObjectAssociation fld = fields[i];
+            final ObjectAdapter entryAdapter = entryAdapters[i];
+            final boolean isReadOnly = readOnly[i];
+
+            if (isReadOnly) {
+                continue;
+            }
+
+            if (fld.isOneToOneAssociation()) {
+                final OneToOneAssociation oneToOneAssociation = ((OneToOneAssociation) fld);
+                final Object entryPojo = AdapterUtils.unwrap(entryAdapter);
+                if (entryPojo == null) {
+                    if (oneToOneAssociation.get(targetAdapter) != null) {
+                        oneToOneAssociation.clearAssociation(targetAdapter);
+                    }
+                } else {
+                    final ObjectAdapter currentAdapter = oneToOneAssociation.get(targetAdapter);
+                    final Object currentPojo = AdapterUtils.unwrap(currentAdapter);
+                    if (currentAdapter == null || currentPojo == null || !currentPojo.equals(entryPojo)) {
+                        if (entryAdapter.isTransient()){ 
+                            getPersistenceSession().makePersistent(entryAdapter);
+                        }
+                        oneToOneAssociation.setAssociation(targetAdapter, entryAdapter);
+                    }
+                }
+            }
+        }
+        getPersistenceSession().getTransactionManager().endTransaction();
+    }
+
+    @Override
+    protected boolean simpleField(final ObjectSpecification type, final int i) {
+        return !fields[i].hasChoices() || super.simpleField(type, i);
+    }
+
+    @Override
+    public boolean isEditing() {
+        return true;
+    }
+
+    @Override
+    public String getName() {
+        if (newType == null) {
+            return super.getName();
+        }
+        return "New " + newType;
+    }
+
+    // /////////////////////////////////////////////////////
+    // Dependencies (from context)
+    // /////////////////////////////////////////////////////
+
+    private static PersistenceSession getPersistenceSession() {
+        return IsisContext.getPersistenceSession();
+    }
+
+    private static AuthenticationSession getAuthenticationSession() {
+        return IsisContext.getAuthenticationSession();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java
new file mode 100644
index 0000000..684b2ef
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java
@@ -0,0 +1,129 @@
+/*
+ *  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.task;
+
+import java.util.List;
+
+import org.apache.isis.core.commons.exceptions.UnknownTypeException;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
+import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacetUtils;
+import org.apache.isis.core.metamodel.spec.Persistability;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.transaction.MessageBroker;
+import org.apache.isis.viewer.html.action.Action;
+import org.apache.isis.viewer.html.action.ActionException;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.ForwardRequest;
+import org.apache.isis.viewer.html.request.Request;
+
+public final class InvokeMethod implements Action {
+
+    @Override
+    public void execute(final Request request, final Context context, final Page page) {
+        final String idString = request.getObjectId();
+        if (idString == null) {
+            throw new ActionException("Task no longer in progress");
+        }
+        final ObjectAdapter target = context.getMappedObject(idString);
+        final String id = request.getActionId();
+        final ObjectAction action = context.getMappedAction(id);
+        if (action == null) {
+            throw new ActionException("No such action: " + id);
+        }
+
+        boolean executeImmediately = false;
+        // TODO use new promptForParameters method instead of all this
+        final boolean isContributedMethod = action.isContributed();
+        if (action.getParameterCount() == 0) {
+            executeImmediately = true;
+        } else if (action.getParameterCount() == 1 && isContributedMethod && target.getSpecification().isOfType(action.getParameters().get(0).getSpecification())) {
+            executeImmediately = true;
+        }
+
+        if (executeImmediately) {
+            final ObjectAdapter[] parameters = isContributedMethod ? new ObjectAdapter[] { target } : null;
+            final ObjectAdapter result = action.execute(target, parameters);
+            final MessageBroker broker = IsisContext.getMessageBroker();
+            final List<String> messages = broker.getMessages();
+            final List<String> warnings = broker.getWarnings();
+            context.setMessagesAndWarnings(messages, warnings);
+            context.processChanges();
+            final String targetId = context.mapObject(target);
+            displayMethodResult(request, context, page, result, targetId);
+        } else {
+            final MethodTask methodTask = new MethodTask(context, target, action);
+            context.addTaskCrumb(methodTask);
+            request.forward(ForwardRequest.task(methodTask));
+        }
+    }
+
+    static void displayMethodResult(final Request request, final Context context, final Page page, final ObjectAdapter result, final String targetId) {
+        if (result == null) {
+            // TODO ask context for page to display - this will be the most
+            // recent object prior to the task
+            // null object - so just view service
+            request.forward(ForwardRequest.viewService(targetId));
+        } else {
+            if (result.getSpecification().isParentedOrFreeCollection()) {
+                final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(result);
+                if (facet.size(result) == 1) {
+                    forwardObjectResult(request, context, facet.firstElement(result));
+                } else {
+                    forwardCollectionResult(request, context, result);
+                }
+            } else if (result.getSpecification().isValueOrIsParented()) {
+                // TODO deal with this object properly, it might not be just a
+                // simple string
+                final List<String> messages = context.getMessages();
+                messages.add(0, "Action returned: " + result.titleString());
+                request.forward(ForwardRequest.viewObject(targetId));
+            } else if (result.getSpecification().isNotCollection()) {
+                forwardObjectResult(request, context, result);
+            } else {
+                throw new UnknownTypeException(result.getSpecification().getFullIdentifier());
+            }
+        }
+    }
+
+    static void forwardCollectionResult(final Request request, final Context context, final ObjectAdapter coll) {
+        final String collectionId = context.mapCollection(coll);
+        request.forward(ForwardRequest.listCollection(collectionId));
+    }
+
+    static void forwardObjectResult(final Request request, final Context context, final ObjectAdapter resultAdapter) {
+        final String objectId = context.mapObject(resultAdapter);
+        if (resultAdapter.isTransient() && resultAdapter.getSpecification().persistability() == Persistability.USER_PERSISTABLE) {
+            request.forward(ForwardRequest.editObject(objectId));
+        } else if (resultAdapter.getSpecification().isService()) {
+            request.forward(ForwardRequest.viewService(objectId));
+        } else {
+            request.forward(ForwardRequest.viewObject(objectId));
+        }
+    }
+
+    @Override
+    public String name() {
+        return "method";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java
new file mode 100644
index 0000000..d0e1343
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java
@@ -0,0 +1,135 @@
+/*
+ *  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.task;
+
+import java.util.List;
+
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.consent.Consent;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
+import org.apache.isis.core.metamodel.spec.feature.ParseableEntryActionParameter;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.transaction.MessageBroker;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+
+public final class MethodTask extends Task {
+    private final ObjectAction action;
+
+    protected MethodTask(final Context context, final ObjectAdapter target, final ObjectAction action) {
+        super(context, action.getName(), action.getDescription(), target, action.getParameterCount());
+        this.action = action;
+
+        final List<ObjectActionParameter> parameters = action.getParameters();
+        final int len = parameters.size();
+
+        for (int i = 0; i < len; i++) {
+            names[i] = parameters.get(i).getName();
+            descriptions[i] = parameters.get(i).getDescription();
+            fieldSpecifications[i] = parameters.get(i).getSpecification();
+            optional[i] = parameters.get(i).isOptional();
+
+            if (parameters.get(i).getSpecification().isParseable()) {
+                final ParseableEntryActionParameter valueParameter = (ParseableEntryActionParameter) parameters.get(i);
+                noLines[i] = valueParameter.getNoLines();
+                wraps[i] = valueParameter.canWrap();
+                maxLength[i] = valueParameter.getMaximumLength();
+                typicalLength[i] = valueParameter.getTypicalLineLength();
+            }
+
+        }
+        
+        // String[] names = action.getParameterNames();
+        // String[] descriptions = action.getParameterDescriptions();
+        // ObjectSpecification[] types = action.getParameterTypes();
+        final ObjectAdapter[] defaultParameterValues = action.getDefaults(target);
+        // boolean[] optional = action.getOptionalParameters();
+        for (int i = 0; i < names.length; i++) {
+            // this.names[i] = names[i];
+            // this.descriptions[i] = descriptions[i];
+            // this.fieldSpecifications[i] = types[i];
+            // this.optional[i] = optional[i];
+
+        	if (defaultParameterValues[i] == null) {
+
+        		// TODO: review; this isn't sufficient, because could provide an invalid value for a reference type, I think?
+                if (action.isContributed() && parameters.get(i).isObject()) {
+                    initialState[i] = target;
+                } else {
+                    initialState[i] = null;
+                }
+            } else {
+                initialState[i] = defaultParameterValues[i];
+            }
+            /*
+             * noLines[i] = action.getParameterNoLines()[i]; wraps[i] =
+             * action.canParametersWrap()[i]; maxLength[i] =
+             * action.getParameterMaxLengths()[i]; typicalLength[i] =
+             * action.getParameterTypicalLengths()[i];
+             */
+        }
+
+    }
+
+    @Override
+    public void checkForValidity(final Context context) {
+        final ObjectAdapter[] parameters = getEntries(context);
+        final ObjectAdapter target = getTarget(context);
+        final Consent consent = action.isProposedArgumentSetValid(target, parameters);
+        error = consent.getReason();
+    }
+
+    @Override
+    public ObjectAdapter completeTask(final Context context, final Page page) {
+        final ObjectAdapter[] parameters = getEntries(context);
+        final ObjectAdapter target = getTarget(context);
+        final ObjectAdapter result = action.execute(target, parameters);
+        final MessageBroker broker = IsisContext.getMessageBroker();
+        final List<String> messages = broker.getMessages();
+        final List<String> warnings = broker.getWarnings();
+        context.setMessagesAndWarnings(messages, warnings);
+        return result;
+    }
+
+    @Override
+    public void debug(final DebugBuilder debug) {
+        debug.appendln("action: " + action);
+        super.debug(debug);
+    }
+
+    @Override
+    protected ObjectAdapter[][] getOptions(final Context context, final int from, final int len) {
+        final ObjectAdapter[][] allOptions = action.getChoices(getTarget(context));
+        final ObjectAdapter[][] options = new ObjectAdapter[len][];
+        for (int i = from, j = 0; j < len; i++, j++) {
+            options[j] = allOptions[i];
+        }
+        return options;
+    }
+
+    public boolean collectParameters() {
+        // TODO use new promptForParameters method instead of all this
+
+        final int expectedNoParameters = action.isContributed() ? 1 : 0;
+        return action.getParameterCount() == expectedNoParameters;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/Task.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/Task.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/Task.java
new file mode 100644
index 0000000..208316e
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/Task.java
@@ -0,0 +1,394 @@
+/*
+ *  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.task;
+
+import org.apache.isis.applib.profiles.Localization;
+import org.apache.isis.core.commons.debug.DebugBuilder;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.facets.object.bounded.BoundedFacetUtils;
+import org.apache.isis.core.metamodel.facets.object.parseable.InvalidEntryException;
+import org.apache.isis.core.metamodel.facets.object.parseable.ParseableFacet;
+import org.apache.isis.core.metamodel.facets.object.parseable.TextEntryParseException;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.progmodel.facets.value.password.PasswordValueFacet;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+/**
+ * Represents a task that the user is working through. Is used for both editing
+ * objects and setting up parameters for an action method.
+ */
+public abstract class Task {
+
+    private static int nextID = 1;
+    private int[] boundaries;
+    private final String description;
+    protected final String[] errors;
+    protected String error;
+    private final String[] entryText;
+    protected final ObjectAdapter[] initialState;
+    private final String name;
+    protected final String[] names;
+    protected final String[] descriptions;
+    protected final boolean[] optional;
+    protected final boolean[] readOnly;
+    protected final int numberOfEntries;
+    private int step;
+    private final String targetId;
+    protected final ObjectSpecification[] fieldSpecifications;
+    protected final int[] noLines;
+    protected final boolean[] wraps;
+    protected final int[] maxLength;
+    protected final int[] typicalLength;
+    protected final int id = nextID++;
+
+    public Task(final Context context, final String name, final String description, final ObjectAdapter target, final int noFields) {
+        this.name = name;
+        this.description = description;
+        targetId = context.mapObject(target);
+
+        initialState = new ObjectAdapter[noFields];
+        names = new String[noFields];
+        descriptions = new String[noFields];
+        optional = new boolean[noFields];
+        readOnly = new boolean[noFields];
+        fieldSpecifications = new ObjectSpecification[noFields];
+
+        numberOfEntries = noFields;
+        entryText = new String[noFields];
+        errors = new String[noFields];
+
+        noLines = new int[noFields];
+        wraps = new boolean[noFields];
+        maxLength = new int[noFields];
+        typicalLength = new int[noFields];
+    }
+
+    public void init(final Context context) {
+        for (int i = 0; i < entryText.length; i++) {
+            final ObjectAdapter obj = initialState[i];
+            if (obj == null) {
+                entryText[i] = "";
+            } else if (obj.getSpecification().getFacet(PasswordValueFacet.class) != null) {
+                final PasswordValueFacet facet = obj.getSpecification().getFacet(PasswordValueFacet.class);
+                entryText[i] = facet.getEditText(obj);
+            } else if (obj.getSpecification().isParseable()) {
+                entryText[i] = obj.titleString();
+            } else if (obj.getSpecification().isNotCollection()) {
+                if (readOnly[i]) {
+                    entryText[i] = (obj).titleString();
+                } else {
+                    entryText[i] = context.mapObject(obj);
+                }
+            } else if (obj.getSpecification().isParentedOrFreeCollection()) {
+                entryText[i] = (obj).titleString();
+            }
+        }
+
+        divyUpWork();
+    }
+
+    public abstract ObjectAdapter completeTask(Context context, Page page);
+
+    private void copyForThisStep(final Object[] source, final Object[] destination) {
+        for (int i = 0; i < noOfEntriesInThisStep(); i++) {
+            destination[i] = source[firstEntryInThisStep() + i];
+        }
+    }
+
+    private void copyForThisStep(final boolean[] source, final boolean[] destination) {
+        for (int i = 0; i < noOfEntriesInThisStep(); i++) {
+            destination[i] = source[firstEntryInThisStep() + i];
+        }
+    }
+
+    private void copyForThisStep(final int[] source, final int[] destination) {
+        for (int i = 0; i < noOfEntriesInThisStep(); i++) {
+            destination[i] = source[firstEntryInThisStep() + i];
+        }
+    }
+
+    public void checkInstances(final Context context, final ObjectAdapter[] objects) {
+    }
+
+    public void debug(final DebugBuilder debug) {
+        debug.indent();
+        debug.appendln("name", name);
+        debug.appendln("number of steps ", numberOfSteps());
+        debug.appendln("current step", step);
+        debug.appendln("target", targetId);
+        debug.appendln("steps (" + (boundaries.length - 1) + ")");
+        debug.indent();
+        for (int i = 0; i < boundaries.length - 1; i++) {
+            debug.appendln("    " + (i + 1) + ". " + boundaries[i] + " - " + (boundaries[i + 1] - 1));
+        }
+        debug.unindent();
+        debug.appendln("fields (" + names.length + ")");
+        debug.indent();
+        for (int i = 0; i < names.length; i++) {
+            final String status = (readOnly[i] ? "R" : "-") + (optional[i] ? "O" : "M") + (errors[i] == null ? "-" : "E");
+            debug.appendln("    " + i + "  " + names[i] + " (" + status + "):  " + fieldSpecifications[i].getFullIdentifier() + " -> " + entryText[i]);
+        }
+        debug.unindent();
+        debug.unindent();
+    }
+
+    private void divyUpWork() {
+        if (numberOfEntries == 0) {
+            boundaries = new int[2];
+        } else {
+            final int[] b = new int[numberOfEntries + 2];
+            int count = 0;
+            b[count++] = 0;
+
+            ObjectSpecification type = fieldSpecifications[0];
+            boolean direct = simpleField(type, 0);
+
+            for (int i = 1; i < numberOfEntries; i++) {
+                type = fieldSpecifications[i];
+                if (true || direct && (simpleField(type, i))) {
+                    continue;
+                }
+                b[count++] = i;
+                direct = simpleField(type, i);
+            }
+            b[count++] = numberOfEntries;
+            boundaries = new int[count];
+            System.arraycopy(b, 0, boundaries, 0, count);
+        }
+    }
+
+    protected boolean simpleField(final ObjectSpecification specification, final int i) {
+        return readOnly[i] || (specification.isNotCollection() && BoundedFacetUtils.isBoundedSet(specification));
+    }
+
+    private int firstEntryInThisStep() {
+        return boundaries[step];
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public String getError() {
+        return error;
+    }
+
+    /**
+     * Returns an array of errors, one for each element in the task.
+     */
+    public String[] getErrors() {
+        final String[] array = new String[noOfEntriesInThisStep()];
+        copyForThisStep(errors, array);
+        return array;
+    }
+
+    public String[] getFieldDescriptions() {
+        final String[] array = new String[noOfEntriesInThisStep()];
+        copyForThisStep(descriptions, array);
+        return array;
+    }
+
+    public String[] getEntryText() {
+        final String[] array = new String[noOfEntriesInThisStep()];
+        copyForThisStep(entryText, array);
+        return array;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String[] getNames() {
+        final String[] array = new String[noOfEntriesInThisStep()];
+        copyForThisStep(names, array);
+        return array;
+    }
+
+    public ObjectAdapter[][] getOptions(final Context context) {
+        return getOptions(context, firstEntryInThisStep(), noOfEntriesInThisStep());
+    }
+
+    protected ObjectAdapter[][] getOptions(final Context context, final int from, final int len) {
+        return new ObjectAdapter[len][];
+    }
+
+    protected ObjectAdapter[] getEntries(final Context context) {
+        final ObjectAdapter[] entries = new ObjectAdapter[entryText.length];
+        for (int i = 0; i < entries.length; i++) {
+            if (entryText == null || readOnly[i]) {
+                continue;
+            }
+            final ObjectSpecification fieldSpecification = fieldSpecifications[i];
+            if (fieldSpecification.isParseable()) {
+                final ParseableFacet parser = fieldSpecification.getFacet(ParseableFacet.class);
+                try {
+                    Localization localization = IsisContext.getLocalization(); 
+                    entries[i] = parser.parseTextEntry(initialState[i], entryText[i], localization);
+                } catch (final InvalidEntryException e) {
+                    errors[i] = e.getMessage();
+                } catch (final TextEntryParseException e) {
+                    errors[i] = e.getMessage();
+                }
+            } else if (fieldSpecification.isNotCollection() && entryText[i] != null) {
+                if (entryText[i].equals("null")) {
+                    entries[i] = null;
+                } else {
+                    entries[i] = context.getMappedObject(entryText[i]);
+                }
+            }
+        }
+        return entries;
+    }
+
+    public String getId() {
+        return "" + id;
+    }
+
+    public boolean[] getOptional() {
+        final boolean[] array = new boolean[noOfEntriesInThisStep()];
+        copyForThisStep(optional, array);
+        return array;
+    }
+
+    public int[] getNoLines() {
+        final int[] array = new int[noOfEntriesInThisStep()];
+        copyForThisStep(noLines, array);
+        return array;
+    }
+
+    public boolean[] getWraps() {
+        final boolean[] array = new boolean[noOfEntriesInThisStep()];
+        copyForThisStep(wraps, array);
+        return array;
+    }
+
+    public int[] getMaxLength() {
+        final int[] array = new int[noOfEntriesInThisStep()];
+        copyForThisStep(maxLength, array);
+        return array;
+    }
+
+    public int[] getTypicalLength() {
+        final int[] array = new int[noOfEntriesInThisStep()];
+        copyForThisStep(typicalLength, array);
+        return array;
+    }
+
+    public boolean[] getReadOnly() {
+        final boolean[] array = new boolean[noOfEntriesInThisStep()];
+        copyForThisStep(readOnly, array);
+        return array;
+    }
+
+    public int getStep() {
+        return step;
+    }
+
+    public ObjectAdapter getTarget(final Context context) {
+        return context.getMappedObject(targetId);
+    }
+
+    public String[] getTrail() {
+        final String[] trail = new String[boundaries.length - 1];
+        for (int i = 0; i < trail.length; i++) {
+            trail[i] = "step " + i;
+        }
+        return trail;
+    }
+
+    public ObjectSpecification[] getTypes() {
+        final ObjectSpecification[] array = new ObjectSpecification[noOfEntriesInThisStep()];
+        copyForThisStep(fieldSpecifications, array);
+        return array;
+    }
+
+    public boolean isEditing() {
+        return false;
+    }
+
+    public void nextStep() {
+        step++;
+    }
+
+    private int noOfEntriesInThisStep() {
+        return boundaries[step + 1] - boundaries[step];
+    }
+
+    public int numberOfSteps() {
+        return boundaries.length - 1;
+    }
+
+    public void previousStep() {
+        step--;
+    }
+
+    public void setFromFields(final Request request, final Context context) {
+        int fldNo = 0;
+        for (int i = boundaries[step]; i < boundaries[step + 1]; i++) {
+            String textEntry = request.getFieldEntry(fldNo++);
+            if (readOnly[i]) {
+                continue;
+            }
+            final ObjectSpecification spec = fieldSpecifications[i];
+            // deal with check boxes specially: expect 'true' if checked and no
+            // entry if not checked, hence
+            // need to set as 'false'
+            if (spec.isOfType(IsisContext.getSpecificationLoader().loadSpecification(boolean.class)) || spec.isOfType(IsisContext.getSpecificationLoader().loadSpecification(Boolean.class))) {
+                if (textEntry == null || !textEntry.equals("true")) {
+                    textEntry = "false";
+                }
+            }
+            entryText[i] = textEntry;
+            try {
+                errors[i] = null;
+                setFromField(context, i, spec, textEntry);
+                if (!optional[i] && (textEntry == null || textEntry.equals(""))) {
+                    errors[i] = "Field required";
+                }
+            } catch (final InvalidEntryException e) {
+                errors[i] = e.getMessage();
+            } catch (final TextEntryParseException e) {
+                errors[i] = e.getMessage();
+            }
+        }
+    }
+
+    private void setFromField(final Context context, final int i, final ObjectSpecification spec, final String textEntry) {
+        if (spec.isParseable()) {
+            if (textEntry == null) {
+                return;
+            }
+            // REVIEW this block uses the existing adapter as it contains the
+            // regex needed. This needs to
+            // be reviewed in line with Dan's proposed changes to the reflector.
+            final ObjectAdapter valueAdapter = initialState[i];
+            final ParseableFacet parser = spec.getFacet(ParseableFacet.class);
+            Localization localization = IsisContext.getLocalization(); 
+            parser.parseTextEntry(valueAdapter, textEntry, localization);
+            // REVIEW what do we do when an exception is thrown - a parse fails?
+        }
+    }
+
+    public abstract void checkForValidity(Context context);
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskLookupException.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskLookupException.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskLookupException.java
new file mode 100644
index 0000000..206bf7d
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskLookupException.java
@@ -0,0 +1,42 @@
+/*
+ *  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.task;
+
+import org.apache.isis.viewer.html.action.ActionException;
+
+public class TaskLookupException extends ActionException {
+    private static final long serialVersionUID = 1L;
+
+    public TaskLookupException() {
+    }
+
+    public TaskLookupException(final String msg, final Throwable cause) {
+        super(msg, cause);
+    }
+
+    public TaskLookupException(final String msg) {
+        super(msg);
+    }
+
+    public TaskLookupException(final Throwable cause) {
+        super(cause);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskStep.java
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskStep.java b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskStep.java
new file mode 100644
index 0000000..230eace
--- /dev/null
+++ b/mothballed/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/TaskStep.java
@@ -0,0 +1,238 @@
+/*
+ *  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.task;
+
+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.isis.core.progmodel.facets.value.booleans.BooleanValueFacet;
+import org.apache.isis.viewer.html.action.Action;
+import org.apache.isis.viewer.html.action.ActionException;
+import org.apache.isis.viewer.html.component.Component;
+import org.apache.isis.viewer.html.component.Form;
+import org.apache.isis.viewer.html.component.Page;
+import org.apache.isis.viewer.html.component.ViewPane;
+import org.apache.isis.viewer.html.context.Context;
+import org.apache.isis.viewer.html.request.Request;
+
+public final class TaskStep implements Action {
+    private void addSelector(final Context context, final Form form, final String currentEntry, final String fieldId, final String fieldLabel, final String fieldDescription, final boolean required, final String errorMessage, final Task task, final ObjectAdapter[] objects) {
+        task.checkInstances(context, objects);
+
+        int size = 0;
+        for (final ObjectAdapter object : objects) {
+            if (object != null) {
+                size++;
+            }
+        }
+
+        final String[] instances = new String[size];
+        final String[] ids = new String[size];
+        int selectedIndex = -1;
+
+        for (int i = 0, j = 0; i < objects.length; i++) {
+            final ObjectAdapter element = objects[i];
+            if (element != null) {
+                instances[j] = element.titleString();
+                ids[j] = context.mapObject(element);
+                if (ids[j].equals(currentEntry)) {
+                    selectedIndex = i;
+                }
+                j++;
+            }
+        }
+        form.addLookup(fieldLabel, fieldDescription, fieldId, selectedIndex, instances, ids, required, errorMessage);
+    }
+
+    private void addSelectorForKnownReferences(final Context context, final Form form, final ObjectSpecification type, final String currentEntry, final String fieldId, final String fieldLabel, final String fieldDescription, final boolean required, final String errorMessage, final Task task) {
+
+        final ObjectAdapter[] objects = context.getKnownInstances(type);
+        addSelector(context, form, currentEntry, fieldId, fieldLabel, fieldDescription, required, errorMessage, task, objects);
+    }
+
+    private void addSelectorForObjectOptions(final Context context, final Form form, final String currentEntry, final String fieldId, final String fieldLabel, final String fieldDescription, final ObjectAdapter[] options, final boolean required, final String errorMessage, final Task task) {
+        final ObjectAdapter[] objects = new ObjectAdapter[options.length];
+        for (int i = 0; i < options.length; i++) {
+            objects[i] = options[i];
+        }
+        addSelector(context, form, currentEntry, fieldId, fieldLabel, fieldDescription, required, errorMessage, task, objects);
+    }
+
+    private void addSelectorForValueOptions(final Form form, final String currentEntry, final String fieldId, final String fieldLabel, final String fieldDescription, final ObjectAdapter[] options, final boolean required, final String errorMessage, final Task task) {
+        int selectedIndex = -1;
+        final String[] instances = new String[options.length];
+        for (int i = 0; i < options.length; i++) {
+            instances[i] = options[i].titleString();
+            if (currentEntry.equals(instances[i])) {
+                selectedIndex = i;
+            }
+        }
+        form.addLookup(fieldLabel, fieldDescription, fieldId, selectedIndex, instances, instances, required, errorMessage);
+    }
+
+    private void addTextFieldForParseable(final Form form, final ObjectSpecification type, final String currentEntryText, final String fieldId, final String fieldLabel, final String fieldDescription, final int noLines, final boolean wrap, final int maxLength, final int typicalLength,
+            final boolean required, final String errorMessage) {
+        form.addField(type, fieldLabel, fieldDescription, fieldId, currentEntryText, noLines, wrap, maxLength, typicalLength, required, errorMessage);
+    }
+
+    private void displayTask(final Context context, final Page page, final Task task) {
+        page.setTitle(task.getName());
+
+        final ViewPane content = page.getViewPane();
+        final ObjectAdapter targetAdapter = task.getTarget(context);
+        String titleString = targetAdapter.titleString();
+        if (targetAdapter.isTransient()) {
+            titleString += " (Unsaved)";
+        }
+        content.setTitle(titleString, targetAdapter.getSpecification().getDescription());
+        String iconName = targetAdapter.getIconName();
+        if (iconName == null) {
+            iconName = targetAdapter.getSpecification().getShortIdentifier();
+        }
+        content.setIconName(iconName);
+
+        final StringBuffer crumbs = new StringBuffer();
+        final String[] trail = task.getTrail();
+        for (final String element : trail) {
+            crumbs.append(" : ");
+            crumbs.append(element);
+        }
+
+        final Component[] action = new Component[1];
+        action[0] = context.getComponentFactory().createInlineBlock("name", task.getName(), task.getDescription());
+        content.setMenu(action);
+
+        if (task.getError() != null) {
+            content.add(context.getComponentFactory().createInlineBlock("error", task.getError(), null));
+        }
+
+        final Form form = context.getComponentFactory().createForm(task.getId(), name(), task.getStep(), task.numberOfSteps(), task.isEditing());
+        final String[] parameterLabels = task.getNames();
+        final String[] parameterDescriptions = task.getFieldDescriptions();
+        final String[] errors = task.getErrors();
+        final String[] entryText = task.getEntryText();
+        final int[] noLines = task.getNoLines();
+        final boolean[] canWrap = task.getWraps();
+        final int[] maxLength = task.getMaxLength();
+        final int[] typicalLength = task.getTypicalLength();
+        final ObjectAdapter[][] options = task.getOptions(context);
+        final boolean[] optional = task.getOptional();
+        final boolean[] readOnly = task.getReadOnly();
+        final ObjectSpecification[] types = task.getTypes();
+        for (int i = 0; i < parameterLabels.length; i++) {
+            final ObjectSpecification paramSpec = types[i];
+            final String fieldId = "fld" + i;
+            final String fieldLabel = parameterLabels[i] == null ? "" : parameterLabels[i];
+            ;
+            final String fieldDescription = parameterDescriptions[i] == null ? "" : parameterDescriptions[i];
+            final String currentEntryTitle = entryText[i];
+            final String error = errors[i];
+            if (readOnly[i]) {
+                addReadOnlyField(form, paramSpec, fieldLabel, fieldDescription, currentEntryTitle);
+            } else if (paramSpec.isParseable() && options[i] != null && options[i].length > 0) {
+                addSelectorForValueOptions(form, currentEntryTitle, fieldId, fieldLabel, fieldDescription, options[i], !optional[i], error, task);
+            } else if (paramSpec.isParseable()) {
+                addTextFieldForParseable(form, paramSpec, currentEntryTitle, fieldId, fieldLabel, fieldDescription, noLines[i], canWrap[i], maxLength[i], typicalLength[i], !optional[i], error);
+            } else if (paramSpec.isNotCollection() && options[i] != null && options[i].length > 0) {
+                addSelectorForObjectOptions(context, form, currentEntryTitle, fieldId, fieldLabel, fieldDescription, options[i], !optional[i], error, task);
+            } else if (paramSpec.isNotCollection()) {
+                addSelectorForKnownReferences(context, form, paramSpec, currentEntryTitle, fieldId, fieldLabel, fieldDescription, !optional[i], error, task);
+            } else {
+                throw new IsisException();
+            }
+        }
+        content.add(form);
+    }
+
+    private void addReadOnlyField(final Form form, final ObjectSpecification paramSpec, final String fieldLabel, final String fieldDescription, final String currentEntryTitle) {
+        if (paramSpec.containsFacet(BooleanValueFacet.class)) {
+            final boolean isSet = Boolean.parseBoolean(currentEntryTitle);
+            form.addReadOnlyCheckbox(fieldLabel, isSet, fieldDescription);
+        } else {
+            form.addReadOnlyField(fieldLabel, currentEntryTitle, fieldDescription);
+        }
+    }
+
+    @Override
+    public void execute(final Request request, final Context context, final Page page) {
+        final String taskId = request.getTaskId();
+        final Task task = context.getTask(taskId);
+        final String button = request.getButtonName();
+        if (task == null && !"Cancel".equals(button)) {
+            throw new TaskLookupException("No task found with id " + taskId);
+        }
+
+        if (button == null) {
+            // start new task
+            displayTask(context, page, task);
+        } else if ("Cancel".equals(button)) {
+            forwardCancel(request, context, task);
+        } else if ("Previous".equals(button)) {
+            task.setFromFields(request, context);
+            task.previousStep();
+            displayTask(context, page, task);
+        } else if ("Next".equals(button)) {
+            task.setFromFields(request, context);
+            task.nextStep();
+            displayTask(context, page, task);
+        } else if ("Finish".equals(button) || "Save".equals(button) || "Ok".equals(button)) {
+            task.setFromFields(request, context);
+            task.checkForValidity(context);
+
+            if (hasErrors(task)) {
+                displayTask(context, page, task);
+            } else {
+                final String targetId = context.mapObject(task.getTarget(context));
+                final ObjectAdapter result = task.completeTask(context, page);
+                if (result instanceof ObjectAdapter) {
+                    final ObjectAdapter object = result;
+                    context.updateVersion(object);
+                }
+                InvokeMethod.displayMethodResult(request, context, page, result, targetId);
+                context.endTask(task);
+            }
+        } else {
+            throw new ActionException("No task action: " + button);
+        }
+    }
+
+    private void forwardCancel(final Request request, final Context context, final Task task) {
+        final Request cancelTask = context.cancelTask(task);
+        request.forward(cancelTask);
+    }
+
+    private boolean hasErrors(final Task task) {
+        if (task.getError() != null) {
+            return true;
+        }
+        final String[] errors = task.getErrors();
+        for (final String error : errors) {
+            if (error != null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public String name() {
+        return Request.TASK_COMMAND;
+    }
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/arrow.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/arrow.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/arrow.gif
new file mode 100644
index 0000000..c6b4db2
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/arrow.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/bg-button.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/bg-button.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/bg-button.gif
new file mode 100644
index 0000000..ee08c8b
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/bg-button.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/branch.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/branch.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/branch.gif
new file mode 100644
index 0000000..99a2904
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/branch.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/breadcrumbs-bg.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/breadcrumbs-bg.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/breadcrumbs-bg.gif
new file mode 100644
index 0000000..bab1f44
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/breadcrumbs-bg.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/button-bg1.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/button-bg1.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/button-bg1.gif
new file mode 100644
index 0000000..ab37093
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/button-bg1.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/button-bg2.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/button-bg2.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/button-bg2.gif
new file mode 100644
index 0000000..288fc8f
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/button-bg2.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/help.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/help.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/help.gif
new file mode 100644
index 0000000..6a151a0
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/help.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/logo-bg.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/logo-bg.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/logo-bg.gif
new file mode 100644
index 0000000..525bfca
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/logo-bg.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/logo-bg2.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/logo-bg2.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/logo-bg2.gif
new file mode 100644
index 0000000..bfb0f3a
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/logo-bg2.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/menu-bg.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/menu-bg.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/menu-bg.gif
new file mode 100644
index 0000000..021f996
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/menu-bg.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/impl/src/main/resources/default-images/menu-bg2.gif
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/impl/src/main/resources/default-images/menu-bg2.gif b/mothballed/component/viewer/html/impl/src/main/resources/default-images/menu-bg2.gif
new file mode 100644
index 0000000..e6a42cf
Binary files /dev/null and b/mothballed/component/viewer/html/impl/src/main/resources/default-images/menu-bg2.gif differ


[11/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/pom.xml b/example/application/quickstart_html_sql/pom.xml
deleted file mode 100644
index b2f3e61..0000000
--- a/example/application/quickstart_html_sql/pom.xml
+++ /dev/null
@@ -1,261 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>org.apache.isis.example.application</groupId>
-    <artifactId>quickstart_html_sql</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-
-    <name>Quickstart (HTML/SQL) App</name>
-
-    <packaging>pom</packaging>
-    
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-
-        <isis.version>1.1.1-SNAPSHOT</isis.version>
-        <isis-objectstore-sql.version>1.0.0-SNAPSHOT</isis-objectstore-sql.version>
-        <isis-objectstore-xml.version>1.0.0-SNAPSHOT</isis-objectstore-xml.version>
-        <isis-viewer-dnd.version>1.0.0-SNAPSHOT</isis-viewer-dnd.version>
-        <isis-viewer-scimpi.version>1.0.0-SNAPSHOT</isis-viewer-scimpi.version>
-        <isis-viewer-html.version>1.0.0-SNAPSHOT</isis-viewer-html.version>
-        <isis-security-file.version>1.0.1-SNAPSHOT</isis-security-file.version>
-    </properties>
-
-    <repositories>
-        <repository>
-              <id>apache.snapshots</id>
-              <name>Apache Snapshots</name>
-              <url>https://repository.apache.org/content/repositories/snapshots/</url>
-              <releases>
-                  <enabled>false</enabled>
-              </releases>
-              <snapshots>
-                  <enabled>true</enabled>
-              </snapshots>
-          </repository>
-    </repositories>
-
-    <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>2.3.1</version>
-                    <configuration>
-                        <source>1.6</source>
-                        <target>1.6</target>
-                    </configuration>
-                    <executions>
-                        <execution>
-                            <id>source</id>
-                            <phase>compile</phase>
-                        </execution>
-                        <execution>
-                            <id>test</id>
-                            <phase>test-compile</phase>
-                        </execution>
-                    </executions>
-                </plugin>
-
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>2.5</version>
-                    <configuration>
-                        <excludes>
-                            <exclude>**/Test*.java</exclude>
-                        </excludes>
-                        <useFile>true</useFile>
-                        <printSummary>false</printSummary>
-                        <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
-                    </configuration>
-                </plugin>
-
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-report-plugin</artifactId>
-                    <version>2.5</version>
-                    <configuration>
-                        <excludes>
-                            <exclude>**/Test*.java</exclude>
-                        </excludes>
-                        <showSuccess>false</showSuccess>
-                    </configuration>
-                    <executions>
-                        <execution>
-                            <phase>test</phase>
-                        </execution>
-                    </executions>
-                </plugin>
-
-                <plugin>
-                    <groupId>org.mortbay.jetty</groupId>
-                    <artifactId>maven-jetty-plugin</artifactId>
-                    <version>6.1.25</version>
-                </plugin>
-
-				<plugin>
-					<groupId>org.apache.maven.plugins</groupId>
-					<artifactId>maven-shade-plugin</artifactId>
-					<version>1.4</version>
-				</plugin>
-
-				<plugin>
-					<groupId>org.apache.maven.plugins</groupId>
-					<artifactId>maven-antrun-plugin</artifactId>
-					<version>1.6</version>
-					<executions>
-						<execution>
-					        <goals>
-					          <goal>run</goal>
-					        </goals>
-						</execution>
-					</executions>
-				</plugin>
-                <!-- http://simplericity.com/2009/11/10/1257880778509.html -->
-                <plugin>
-                    <groupId>org.simplericity.jettyconsole</groupId>
-                    <artifactId>jetty-console-maven-plugin</artifactId>
-                    <version>1.43</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-report-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-
-    <modules>
-        <module>dom</module>
-        <module>fixture</module>
-        <module>viewer-html</module>
-    </modules>
-
-    <dependencyManagement>
-        <dependencies>
-
-            <dependency>
-                <groupId>org.apache.isis.core</groupId>
-                <artifactId>isis</artifactId>
-                <version>${isis.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.isis.objectstore</groupId>
-                <artifactId>isis-objectstore-xml</artifactId>
-                <version>${isis-objectstore-xml.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.isis.objectstore</groupId>
-                <artifactId>isis-objectstore-sql</artifactId>
-                <version>${isis-objectstore-sql.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>isis-viewer-dnd</artifactId>
-                <version>${isis-viewer-dnd.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>isis-viewer-scimpi</artifactId>
-                <version>${isis-viewer-scimpi.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>isis-viewer-html</artifactId>
-                <version>${isis-viewer-html.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.isis.security</groupId>
-                <artifactId>isis-security-file</artifactId>
-                <version>${isis-security-file.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-
-
-            <!-- this project's own modules -->
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>quickstart_html_sql-dom</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>quickstart_html_sql-fixture</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>quickstart_html_sql-viewer-html</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-
-
-
-        </dependencies>
-    </dependencyManagement>
-
-    <profiles>
-        <profile>
-            <id>m2e</id>
-            <activation>
-                <property>
-                    <name>m2e.version</name>
-                </property>
-            </activation>
-            <build>
-                <directory>target-ide</directory>
-            </build>
-        </profile>
-    </profiles>
-
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.lck
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.lck b/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.lck
deleted file mode 100644
index 5cd2e57..0000000
Binary files a/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.lck and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.log
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.log b/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.log
deleted file mode 100644
index 7b4d229..0000000
--- a/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.log
+++ /dev/null
@@ -1,2 +0,0 @@
-/*C3*/SET SCHEMA PUBLIC
-create table ISIS_ADMIN_SERVICES (PK_ID int, ID varchar(255))

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.properties
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.properties b/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.properties
deleted file mode 100644
index e17168d..0000000
--- a/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#HSQL Database Engine 2.2.8
-#Wed Oct 10 18:15:49 BST 2012
-version=2.2.8
-modified=yes

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.script
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.script b/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.script
deleted file mode 100644
index 13c8dd0..0000000
--- a/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.script
+++ /dev/null
@@ -1,46 +0,0 @@
-SET DATABASE UNIQUE NAME HSQLDB3A4BACD59D
-SET DATABASE GC 0
-SET DATABASE DEFAULT RESULT MEMORY ROWS 0
-SET DATABASE EVENT LOG LEVEL 0
-SET DATABASE SQL NAMES FALSE
-SET DATABASE SQL REFERENCES FALSE
-SET DATABASE SQL SIZE TRUE
-SET DATABASE SQL TYPES FALSE
-SET DATABASE SQL TDC DELETE TRUE
-SET DATABASE SQL TDC UPDATE TRUE
-SET DATABASE SQL TRANSLATE TTI TYPES TRUE
-SET DATABASE SQL CONCAT NULLS TRUE
-SET DATABASE SQL NULLS FIRST TRUE
-SET DATABASE SQL UNIQUE NULLS TRUE
-SET DATABASE SQL CONVERT TRUNCATE TRUE
-SET DATABASE SQL AVG SCALE 0
-SET DATABASE SQL DOUBLE NAN TRUE
-SET DATABASE SQL LONGVAR IS LOB FALSE
-SET DATABASE TRANSACTION CONTROL LOCKS
-SET DATABASE DEFAULT ISOLATION LEVEL READ COMMITTED
-SET DATABASE TRANSACTION ROLLBACK ON CONFLICT TRUE
-SET DATABASE TEXT TABLE DEFAULTS ''
-SET FILES WRITE DELAY 500 MILLIS
-SET FILES BACKUP INCREMENT TRUE
-SET FILES CACHE SIZE 10000
-SET FILES CACHE ROWS 50000
-SET FILES SCALE 8
-SET FILES LOB SCALE 32
-SET FILES DEFRAG 0
-SET FILES NIO TRUE
-SET FILES NIO SIZE 256
-SET FILES LOG TRUE
-SET FILES LOG SIZE 50
-CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e'
-ALTER USER SA SET LOCAL TRUE
-CREATE SCHEMA PUBLIC AUTHORIZATION DBA
-ALTER SEQUENCE SYSTEM_LOBS.LOB_ID RESTART WITH 1
-SET DATABASE DEFAULT INITIAL SCHEMA PUBLIC
-GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.YES_OR_NO TO PUBLIC
-GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.TIME_STAMP TO PUBLIC
-GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CARDINAL_NUMBER TO PUBLIC
-GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CHARACTER_DATA TO PUBLIC
-GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.SQL_IDENTIFIER TO PUBLIC
-GRANT DBA TO SA
-SET SCHEMA SYSTEM_LOBS
-INSERT INTO BLOCKS VALUES(0,2147483647,0)

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/ide/eclipse/launch/quickstart-viewer-html.launch
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/ide/eclipse/launch/quickstart-viewer-html.launch b/example/application/quickstart_html_sql/viewer-html/ide/eclipse/launch/quickstart-viewer-html.launch
deleted file mode 100644
index 99a0ac6..0000000
--- a/example/application/quickstart_html_sql/viewer-html/ide/eclipse/launch/quickstart-viewer-html.launch
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
-<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
-<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type server_exploration"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="quickstart-viewer-html"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/lib/.gitignore
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/lib/.gitignore b/example/application/quickstart_html_sql/viewer-html/lib/.gitignore
deleted file mode 100644
index 70eee7e..0000000
--- a/example/application/quickstart_html_sql/viewer-html/lib/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# explicitly ignoring Microsoft JDBC4 jar
-# (cannot redistribute, licensing)
-#
-sqljdbc4.jar

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/pom.xml b/example/application/quickstart_html_sql/viewer-html/pom.xml
deleted file mode 100644
index 43ae71f..0000000
--- a/example/application/quickstart_html_sql/viewer-html/pom.xml
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.isis.example.application</groupId>
-        <artifactId>quickstart_html_sql</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
-    </parent>
-
-	<artifactId>quickstart_html_sql-viewer-html</artifactId>
-    
-	<name>Quickstart (HTML/SQL) HTML Viewer</name>
-	<description>This module runs Isis' HTML webapp viewer.  By default it is configured to
-	run using the sql object store.  See other viewer modules for more persistence
-	options.</description>
-	
-	<packaging>war</packaging>
-
-	<build>
-		<plugins>
-            <plugin>
-                <groupId>org.mortbay.jetty</groupId>
-                <artifactId>maven-jetty-plugin</artifactId>
-            </plugin>
-
-            <!-- mvn package -->
-            <plugin>
-                <groupId>org.simplericity.jettyconsole</groupId>
-                <artifactId>jetty-console-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>createconsole</goal>
-                        </goals>
-                        <configuration>
-                            <backgroundImage>${basedir}/src/main/jettyconsole/isis-banner.png</backgroundImage>
-                        </configuration>
-                        <phase>package</phase>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <!-- prereqs: mvn package -->
-            <!-- mvn antrun:run -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <configuration>
-                    <tasks>
-                        <exec executable="java" failonerror="true">
-                            <arg value="-jar"/>
-                            <arg value="${project.build.directory}/${project.build.finalName}-jetty-console.war"/>
-                        </exec>
-                    </tasks>
-                </configuration>
-            </plugin>
-
-		</plugins>
-	</build>
-
-	<dependencies>
-	
-        <!-- other modules in this project -->
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>quickstart_html_sql-dom</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>${project.groupId}</groupId>
-            <artifactId>quickstart_html_sql-fixture</artifactId>
-        </dependency>
-
-
-
-        <!-- objectstore/domain service/repository implementations -->
-
-		<dependency>
-			<groupId>org.apache.isis.objectstore</groupId>
-			<artifactId>isis-objectstore-sql-impl</artifactId>
-		</dependency>
-        
-
-        <!-- isis viewer -->
-		<dependency>
-	        <groupId>org.apache.isis.viewer</groupId>
-			<artifactId>isis-viewer-html-impl</artifactId>
-		</dependency>
-
-
-
-        <!-- isis core -->
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-metamodel</artifactId>
-        </dependency>
-
-        <!-- isis default runtime -->
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-runtime</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-objectstore</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.objectstore</groupId>
-            <artifactId>isis-objectstore-xml</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-profilestore</artifactId>
-        </dependency>
-        
-        <!-- isis defaults (other) -->
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-security</artifactId>
-        </dependency>
-        
-        <!-- to run using WebServer (optional) -->
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-webserver</artifactId>
-            <scope>runtime</scope>
-            <optional>true</optional>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_2.5_spec</artifactId>
-            <version>1.2</version>
-        </dependency>
-
-
-		<!-- 
-		  JDBC drivers 
-		  (if using jdo or sql object store)
-		  -->
-
-        <dependency>
-            <groupId>org.hsqldb</groupId>
-            <artifactId>hsqldb</artifactId>
-            <version>2.2.8</version>
-        </dependency>
-
-		<!-- 
-		<dependency>
-			<groupId>com.microsoft.sqlserver</groupId>
-			<artifactId>jdbc</artifactId>
-			<version>4.0</version>
-			<scope>system</scope>
-			<optional>true</optional>
-			<systemPath>${basedir}/lib/sqljdbc4.jar</systemPath>
-		</dependency>
-		-->	
-			
-		<dependency>
-		  <groupId>org.lazyluke</groupId>
-		  <artifactId>log4jdbc-remix</artifactId>
-		  <version>0.2.7</version>
-		</dependency>
-
-	</dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.pdn
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.pdn b/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.pdn
deleted file mode 100644
index ee6b1c4..0000000
Binary files a/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.pdn and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.png
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.png b/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.png
deleted file mode 100644
index c6dea47..0000000
Binary files a/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/resources/images/Default.png
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/resources/images/Default.png b/example/application/quickstart_html_sql/viewer-html/src/main/resources/images/Default.png
deleted file mode 100644
index 8409e46..0000000
Binary files a/example/application/quickstart_html_sql/viewer-html/src/main/resources/images/Default.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.passwords
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.passwords b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.passwords
deleted file mode 100644
index 97b228e..0000000
--- a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.passwords
+++ /dev/null
@@ -1,28 +0,0 @@
-#  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.
-
-
-#
-# configuration file for the file-based authentication
-# not used by the onlinedemo
-#
-
-# list of users, and their password, and optionally roles
-sven:pass:role1|role2|role3
-dick:pass
-bob:pass
-joe:pass

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.properties
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.properties b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.properties
deleted file mode 100644
index 62b9dae..0000000
--- a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-#  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.
-
-#
-# configuration file for the File-based authentication mechanism
-#
-
-
-#
-# (intentionally empty)
-#

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.allow
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.allow b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.allow
deleted file mode 100644
index 4407ec2..0000000
--- a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.allow
+++ /dev/null
@@ -1,28 +0,0 @@
-#  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.
-
-
-#
-# configuration file for the file-based authorization
-#
-
-
-#
-# (intentionally empty)
-#
-
-

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.properties
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.properties b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.properties
deleted file mode 100644
index f44bb6c..0000000
--- a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-#  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.
-
-#
-# configuration file for the File-based authorization mechanism
-#
-
-
-#
-# the whitelist file
-# (value shown below is the default)
-#
-
-#isis.authorization.file.whitelist=authorization_file.allow
-
-
-
-#
-# the blacklist file
-# (there is no default value; provide a filename)
-#
-
-#isis.authorization.file.blacklist=
-
-
-
-#
-# switch on "learning mode".  In this mode the authorization mechanism
-# will grant all requests, and log those requests into the allow file.
-#
-
-#isis.authorization.learn=true
-

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/isis.properties b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/isis.properties
deleted file mode 100644
index c46aeb5..0000000
--- a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/isis.properties
+++ /dev/null
@@ -1,180 +0,0 @@
-#  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.
-
-
-#################################################################################
-#
-# specify system components.
-#
-# The values correspond to the named components in the installer-registry.properties file
-# in the org.apache.isis.runtimes.dflt:runtime JAR (in the org.apache.isis.runtimes.dflt.runtime package)
-#
-# Although all configuration could reside in isis.properties, the recommendation is
-# to split out into component specific files:
-# 
-#    xxx_yyy.properties files
-#
-# where
-#    * xxx is the component type, and
-#    * yyy is the component name.
-#
-# For example, persistor_sql.properties holds configuration information specific to the
-#
-#
-# If the components are changed, also remember to edit pom.xml (further comments can be 
-# found in the persistor_xxx.properties files)
-#
-#################################################################################
-
-#
-# configure the persistor (object store) to use
-#
-# * in-memory   requires no additional configuration, but stores object in-memory.
-#               Only suitable for prototyping
-# * datanucleus uses JDO DataNucleus to persist objects to relational database.
-#               for objectstore-specific properties, see persistor_datanucleus.properties   
-# * fileserver  uses a simple FileServer to persist objects as JSON documents.  It requires the fileserver component to be running
-#               for objectstore-specific properties, see persistor_fileserver.properties 
-# * mongodb     uses MongoDB to be persist objects as JSON documents.  It requires MongoDB to be installed and running
-#               for objectstore-specific properties, see persistor_fileserver.properties  
-# * sql         uses an RDBMS to persist objects as table rows.  
-#               for objectstore-specific properties, see persistor_sql.properties
-# * xml         uses the XML ObjectStore to be persist objects to a set of XML files.  Only suitable for prototyping.
-#               for objectstore-specific properties, see persistor_xml.properties 
-#
-# NOTE:
-# * if using non-naive implementations of services, edit isis.services (below) and 
-# * if necessary, update the pom.xml to reference appropriate objstore-xxx module
-# * for sql and datanucleus objectstores, update the pom.xml to reference appropriate JDBC driver
-# 
-
-isis.persistor=sql
-
-
-#
-# configure authentication mechanism to use (to logon to the system)
-# note:
-# - authentication is disabled if running in exploration mode
-# - the Scimpi viewer allows access to anonymous users
-#
- 
-# default is file in SERVER mode, none in SERVER_EXPLORATION.  Configure in web.xml 
-isis.authentication=file
-
-
-#
-# configure authorization mechanism to use
-#
-# The authorization mechanism define each users' permissions to view/edit object properties 
-# or collections, and to view/invoke object actions
-#
-# configuring this component automatically refines the metamodel (installing a facet factory
-# which vetoes access as required)
-#
-
-# default is file in SERVER mode, none in SERVER_EXPLORATION.  Configure in web.xml 
-#isis.authorization=file
-
-
-
-#
-# configure the user profile store to use.
-# 
-# the user profile store is supported by some viewers as a way to store 
-# user-specific settings (eg colours, themes etc)
-# 
-isis.user-profile-store=in-memory
-
-
-
-
-#################################################################################
-#
-# MetaModel
-#
-# The metamodel typically does not require additional configuration, although
-# the system components (defined above) may refine the metamodel for their needs.
-#
-#################################################################################
-
-
-#
-# additional programming model facets
-#
-
-#isis.reflector.facets.include=
-#isis.reflector.facets.exclude=
-
-# normally these facets would be installed by virtue of configuring the JDO object store
-# need to be configured manually if running some other object store only because the
-# JDO enhancer is still configured to run on the DOM project.
-isis.reflector.facets.include=\
-	org.apache.isis.core.progmodel.facets.object.ignore.jdo.RemoveJdoEnhancementTypesFacetFactory,\
-	org.apache.isis.core.progmodel.facets.object.ignore.jdo.RemoveJdoPrefixedMethodsFacetFactory
-
-#
-# metamodel validator
-#
-
-#isis.reflector.validator=
-
-
-
-#################################################################################
-#
-# Application Services and fixtures
-#
-#################################################################################
-
-#
-# Specify the domain services.
-# 
-# These are the most important configuration properties in the system, as they define
-# the set of the classes for Isis to instantiate as domain service singletons.
-# From these domain service instances the rest of the metamodel is discovered, while the 
-# end-user gains access to other domain objects by invoking the actions of the domain services.
-#
-# The implementations depend on the configured (see isis.persistor above) 
-#
-
-
-# if using the in-memory, XML, SQL, fileserver or mongo object stores:
-isis.services.prefix = dom
-isis.services = todo.ToDoItems
-
-
-# if using the DataNucleus object store
-# (with support for JDO's audit service, and installing fixtures using a domain service)
-#isis.services.prefix = 
-#isis.services = objstore.jdo.todo.ToDoItemsJdo,\
-#                fixture.todo.ToDoItemsFixturesService,\
-#                dom.audit.AuditServiceDemo
-
-
-
-
-
-#
-# Specify the (optional) test fixtures
-#
-# Fixtures are used to seed the object store with an initial set of data.  For the 
-# in-memory object store, the fixtures are installed on every run.  For other
-# object stores, they are used only when the object store is first initialized.
-#
-isis.fixtures.prefix= fixture
-isis.fixtures= todo.ToDoItemsFixture
-

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/logging.properties
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/logging.properties b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/logging.properties
deleted file mode 100644
index 50b23d7..0000000
--- a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/logging.properties
+++ /dev/null
@@ -1,89 +0,0 @@
-#  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.
-
-
-#
-# Isis uses log4j is used to provide system logging
-#
-log4j.rootCategory=INFO, Console
-
-# The console appender
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.target=System.out
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE}  [%-20c{1} %-10t %-5p]  %m%n
-
-log4j.appender.File=org.apache.log4j.RollingFileAppender
-log4j.appender.File.file=isis.log
-log4j.appender.File.append=false
-log4j.appender.File.layout=org.apache.log4j.PatternLayout
-log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p]  %m%n
-
-
-
-
-
-! turn on the internal log4j debugging flag so we can see what it is doing
-#log4j.debug=true
-
-
-log4j.logger.jdbc.sqlonly=DEBUG, sql, Console
-log4j.additivity.jdbc.sqlonly=false
-
-log4j.logger.jdbc.resultsettable=DEBUG, jdbc, Console
-log4j.additivity.jdbc.resultsettable=false
-
-
-
-log4j.logger.jdbc.audit=DEBUG,jdbc, Console
-log4j.additivity.jdbc.audit=false
-
-log4j.logger.jdbc.resultset=DEBUG,jdbc
-log4j.additivity.jdbc.resultset=false
-
-log4j.logger.jdbc.sqltiming=WARNING,sqltiming
-log4j.additivity.jdbc.sqltiming=false
-
-log4j.logger.jdbc.connection=FATAL,connection
-log4j.additivity.jdbc.connection=false
-
-
-
-log4j.appender.sql=org.apache.log4j.FileAppender
-log4j.appender.sql.File=./logs/sql.log
-log4j.appender.sql.Append=false
-log4j.appender.sql.layout=org.apache.log4j.PatternLayout
-log4j.appender.sql.layout.ConversionPattern=-----> %d{yyyy-MM-dd HH:mm:ss.SSS} %m%n%n
-
-log4j.appender.sqltiming=org.apache.log4j.FileAppender
-log4j.appender.sqltiming.File=./logs/sqltiming.log
-log4j.appender.sqltiming.Append=false
-log4j.appender.sqltiming.layout=org.apache.log4j.PatternLayout
-log4j.appender.sqltiming.layout.ConversionPattern=-----> %d{yyyy-MM-dd HH:mm:ss.SSS} %m%n%n
-
-log4j.appender.jdbc=org.apache.log4j.FileAppender
-log4j.appender.jdbc.File=./logs/jdbc.log
-log4j.appender.jdbc.Append=false
-log4j.appender.jdbc.layout=org.apache.log4j.PatternLayout
-log4j.appender.jdbc.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n
-
-log4j.appender.connection=org.apache.log4j.FileAppender
-log4j.appender.connection.File=./logs/connection.log
-log4j.appender.connection.Append=false
-log4j.appender.connection.layout=org.apache.log4j.PatternLayout
-log4j.appender.connection.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %m%n
-

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/persistor_sql.properties
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/persistor_sql.properties b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/persistor_sql.properties
deleted file mode 100644
index d3b04f9..0000000
--- a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/persistor_sql.properties
+++ /dev/null
@@ -1,72 +0,0 @@
-#  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.
-
-#
-# configuration file for the SQL objectstore
-#
-
-
-#
-# HSQLDB in-memory (using log4jdbc-remix)
-#
-#isis.persistor.sql.jdbc.driver=net.sf.log4jdbc.DriverSpy
-#isis.persistor.sql.jdbc.connection=jdbc:log4jdbc:hsqldb:mem:test
-#isis.persistor.sql.jdbc.user=sa
-#isis.persistor.sql.jdbc.password=
-
-
-#
-# HSQLDB (file)
-#
-isis.persistor.sql.jdbc.driver=org.hsqldb.jdbcDriver
-isis.persistor.sql.jdbc.connection=jdbc:hsqldb:mem:test
-isis.persistor.sql.jdbc.user=sa
-isis.persistor.sql.jdbc.password=
-
-
-
-#
-# HSQLDB (file)
-#
-#isis.persistor.sql.jdbc.driver=org.hsqldb.jdbcDriver
-#isis.persistor.sql.jdbc.connection=jdbc:hsqldb:file:hsql-db/tests
-#isis.persistor.sql.jdbc.user=sa
-#isis.persistor.sql.jdbc.password=
-
-
-#
-# configuration for MS SQL
-# (also edit pom.xml of objstore-mongodb)
-#
-#isis.persistor.sql.jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
-#isis.persistor.sql.jdbc.connection=jdbc:sqlserver://localhost:1433;databaseName=todoapp;integratedSecurity=true;
-#isis.persistor.sql.jdbc.user=sa
-#isis.persistor.sql.jdbc.password=
-
-
-#
-# configuration for Ingres
-# (also edit pom.xml of objstore-mongodb)
-#
-#isis.persistor.sql.jdbc.driver=com.ingres.jdbc.IngresDriver
-#isis.persistor.sql.jdbc.connection=jdbc:ingres://localhost:II7/todoapp
-##isis.persistor.sql.jdbc.user=NOTUSED_IF_localhost
-##isis.persistor.sql.jdbc.password=NOTUSED_IF_localhost
-#isis.persistor.sql.datatypes.datetime=TIMESTAMP
-#isis.persistor.sql.datatypes.timestamp=TIMESTAMP
-#isis.persistor.sql.datatypes.double=DOUBLE PRECISION
-

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/viewer_html.properties
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/viewer_html.properties b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/viewer_html.properties
deleted file mode 100644
index d714f3e..0000000
--- a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/viewer_html.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-#  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.
-
-#
-# configuration file for the HTML viewer
-#
-
-#
-# customization for the header and footer
-#
-isis.viewer.html.header=<div id="site-header"><div id="site-logo">&nbsp;</div></div>
-isis.viewer.html.footer=<div id="page-footer"><small>Powered by Apache Isis</small><div><small><a href="index.html">home</a>&nbsp;|&nbsp;<a href="index.shtml">scimpi</a>&nbsp;|&nbsp;<a href="services">rest</a>&nbsp;|&nbsp;<a href="mobile/index.html">mobile</a></small></div></div>
-
-#
-# stylesheet
-#
-isis.viewer.html.style-sheet=htmlviewer/style/default.css

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/web.xml b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 5739ebd..0000000
--- a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,233 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<web-app id="WebApp_ID" version="2.4"
-    xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
-    <display-name>Apache Isis Webapp</display-name>
-
-
-    <welcome-file-list>
-        <welcome-file>index.html</welcome-file>
-    </welcome-file-list>
-    
-    <context-param>
-        <param-name>deploymentType</param-name>
-        <!-- 
-        <param-value>SERVER</param-value>
-         -->
-        <param-value>SERVER_EXPLORATION</param-value>
-    </context-param>
-    
-    
-    
-    
-    <!--
-    -
-    -
-    - config common to all viewer(s)
-    -
-    -
-    -->
-    
-    <!-- bootstrap the Isis metamodel and runtime -->
-    <listener>
-        <listener-class>org.apache.isis.core.webapp.IsisWebAppBootstrapper</listener-class>
-    </listener>
-
-    <!-- which (optional) configuration file(s) to load -->
-    <context-param>
-        <param-name>isis.viewers</param-name>
-        <param-value>html</param-value>
-    </context-param>
-
-
-    <!-- which configuration directory to read overloaded property files from -->
-    <!-- 
-    Normally configuration like this should be done from outside your web 
-    application. Especially if your configuration is not know in advance or
-    if it can change depending on where the application gets deployed.
-    
-    For instance to configure this in Tomcat outside the application WAR add
-    the following line to your application context ( For more detail see:
-    http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Context_Parameters )
-     
-    <Parameter name="isis.config.dir" value="/usr/local/tomcat/conf/"
-         override="true"/>
-         
-    If your configuration directory is fixed you can enable the following 
-    context parameter in here and forget about the outside part.
-         
-    <context-param>
-      <param-name>isis.config.dir</param-name>
-      <param-value>location of your config directory if fixed</param-value>
-    </context-param>
-    -->
-
-    <!-- cache static resources for 1 day -->
-    <filter>
-        <filter-name>ResourceCachingFilter</filter-name>
-        <filter-class>org.apache.isis.core.webapp.content.ResourceCachingFilter</filter-class>
-        <init-param>
-            <param-name>CacheTime</param-name>
-            <param-value>86400</param-value>
-        </init-param>
-    </filter>
-    <filter-mapping>
-        <filter-name>ResourceCachingFilter</filter-name>
-        <url-pattern>*.js</url-pattern>
-    </filter-mapping>
-    <filter-mapping>
-        <filter-name>ResourceCachingFilter</filter-name>
-        <url-pattern>*.css</url-pattern>
-    </filter-mapping>
-    <filter-mapping>
-        <filter-name>ResourceCachingFilter</filter-name>
-        <url-pattern>*.png</url-pattern>
-    </filter-mapping>
-    <filter-mapping>
-        <filter-name>ResourceCachingFilter</filter-name>
-        <url-pattern>*.jpg</url-pattern>
-    </filter-mapping>
-    <filter-mapping>
-        <filter-name>ResourceCachingFilter</filter-name>
-        <url-pattern>*.gif</url-pattern>
-    </filter-mapping>
-    <filter-mapping>
-        <filter-name>ResourceCachingFilter</filter-name>
-        <url-pattern>*.html</url-pattern>
-    </filter-mapping>
-    
-    <servlet>
-        <servlet-name>Resource</servlet-name>
-        <servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
-    </servlet>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-        <url-pattern>*.css</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-        <url-pattern>*.png</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-        <url-pattern>*.jpg</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-        <url-pattern>*.gif</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-        <url-pattern>*.js</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-        <url-pattern>*.html</url-pattern>
-    </servlet-mapping>
-    
-
-
-
-
-    <!--
-    -
-    -
-    - config specific to the html-viewer
-    -
-    -
-    -->
-    <!-- determine the format of the paths of the links etc that it generates -->
-    <context-param>
-        <param-name>viewer-html.suffix</param-name>
-        <param-value>htmlviewer</param-value>
-    </context-param>
-
-    <!-- redirect requests to 'htmlviewer' to the HTML viewer's start page -->
-    <filter>
-        <filter-name>RedirectFilterForHtml</filter-name>
-        <filter-class>org.apache.isis.core.webapp.routing.RedirectFilter</filter-class>
-        <init-param>
-            <param-name>redirectTo</param-name>
-            <param-value>/start.htmlviewer</param-value>
-        </init-param>
-    </filter>
-    <filter-mapping>
-        <filter-name>RedirectFilterForHtml</filter-name>
-        <url-pattern>/htmlviewer</url-pattern>
-    </filter-mapping>
-
-    <!-- authenticate user, and set up an Isis Session -->
-    <filter>
-        <filter-name>IsisSessionFilterForHtml</filter-name>
-        <filter-class>org.apache.isis.core.webapp.IsisSessionFilter</filter-class>
-        <init-param>
-            <!-- lookup from cache, or if a logon filter was provided -->
-            <param-name>authenticationSessionStrategy</param-name>
-            <param-value>org.apache.isis.core.webapp.auth.AuthenticationSessionStrategyDefault</param-value>
-        </init-param>
-        <init-param>
-            <!-- what to do if no session was found; we indicate access only to a restricted list of paths -->
-            <param-name>whenNoSession</param-name>
-            <param-value>restricted</param-value>
-        </init-param>
-        <init-param>
-            <!-- the list of paths that are accessible if no session was found -->
-            <param-name>restricted</param-name>
-            <param-value>/logon.htmlviewer,/register.htmlviewer</param-value>
-        </init-param>
-    </filter>
-    <filter-mapping>
-        <filter-name>IsisSessionFilterForHtml</filter-name>
-        <servlet-name>HtmlLogin</servlet-name>
-    </filter-mapping>
-    <filter-mapping>
-        <filter-name>IsisSessionFilterForHtml</filter-name>
-        <servlet-name>HtmlDispatcher</servlet-name>
-    </filter-mapping>
-
-    <servlet>
-        <servlet-name>HtmlLogon</servlet-name>
-        <servlet-class>org.apache.isis.viewer.html.servlet.LogonServlet</servlet-class>
-        <init-param>
-            <param-name>authenticationSessionStrategy</param-name>
-            <param-value>org.apache.isis.core.webapp.auth.AuthenticationSessionStrategyDefault</param-value>
-        </init-param>
-        <init-param>
-            <param-name>startPage</param-name>
-            <param-value>start.htmlviewer</param-value>
-        </init-param>
-    </servlet>
-    <servlet-mapping>
-        <servlet-name>HtmlLogon</servlet-name>
-        <url-pattern>/logon.htmlviewer</url-pattern>
-    </servlet-mapping>
-
-    <servlet>
-        <servlet-name>HtmlDispatcher</servlet-name>
-        <servlet-class>org.apache.isis.viewer.html.servlet.ControllerServlet</servlet-class>
-    </servlet>
-    <servlet-mapping>
-        <servlet-name>HtmlDispatcher</servlet-name>
-        <url-pattern>*.htmlviewer</url-pattern>
-    </servlet-mapping>
-	
-</web-app>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner-bg.png
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner-bg.png b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner-bg.png
deleted file mode 100644
index c731c15..0000000
Binary files a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner-bg.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner.png
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner.png b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner.png
deleted file mode 100644
index adf2159..0000000
Binary files a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/images/banner.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/style/default.css
----------------------------------------------------------------------
diff --git a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/style/default.css b/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/style/default.css
deleted file mode 100644
index b5df867..0000000
--- a/example/application/quickstart_html_sql/viewer-html/src/main/webapp/htmlviewer/style/default.css
+++ /dev/null
@@ -1,928 +0,0 @@
-/*
- *  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.
- */
-/* Start Global styles */
-
-body {
-  background: #101254;
-  text-align: center;
-}
-#wrapper {
-  width: 980px;
-  min-height: 800px;
-  border:3px solid #7F81C0;
-  margin:8px auto;
-  text-align: left;
-  background: white;
-}
-
-.header-icon > img {
-	max-width: 40px;
-	height: 40px;
-    margin-top: 5px;
-}
-	
-BODY {
-	font-family: Arial, Sans-Serif;
-	margin: 0 0 10px 0;
-	color: black;
-}
-
-IMG {
-	border: 0;
-}
-
-A {
-	text-decoration: none;
-}
-
-A:hover {
-	text-decoration: underline;
-}
-
-/* End Global styles */ /* Start Heading */ 
-
-div#site-header:after {
-	bottom: 0px;
-	display: block;
-	text-align: right;
-	float:right;
-	bottom: 0;
-	font-size: 70%;
-	color: gray;
-}
-
-div#site-header {
-	background: url(../images/banner-bg.png); 
-	background-repeat: repeat-x white-space :   nowrap;
-	list-style: none;
-	margin: 0px;
-	height: 100px;
-}
-
-div#site-logo {
-	background: url(../images/banner.png);
-	background-repeat: no-repeat;
-	background-position: left;
-	position: absolute;
-	width: 980px;
-	height: 100px;
-	margin: 0 auto;
-}
-
-div#page-header {
-	/*display: none;*/
-}
-
-/* END Heading */
-DIV#body {
-	display: block;
-	padding-bottom: 10px;
-}
-
-div#navigation {
-	margin: 0;
-	padding: 0px;
-}
-
-/* Start options*/
-DIV.options {
-	background-color: #eeeeee;
-	margin: 0;
-	padding: 4px 0px 4px 5px;
-	min-height: 20px;
-	align: right;
-	float:right;
-}
-
-
-DIV.options H4 {
-	display: none;
-}
-
-DIV.options DIV.item {
-	display: inline;
-	border-right: 1px solid #000000;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #00000;
-	font-size: 70%;
-	margin: 0 6px 0 6px;
-	padding 0 0 0 0;
-	min-width: 200px;
-}
-
-DIV.options DIV.item IMG {
-	display: none;
-}
-
-DIV.options DIV.item a:link {
-	color: #000000;
-	text-decoration: none;
-	margin: 0 5px 0 0px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.options DIV.item a:hover {
-	background-color: #dddddd;
-	margin: 0 5px 0 0px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.options DIV.item a:visited {
-	color: #000000;
-	text-decoration: none;
-	margin: 0 5px 0 0px;
-	padding: 0 2px 0 0px;
-}
-
-/* End options */ 
-
-/* Start services */
-DIV.services {
-	background-color: #7F81C0;
-	margin: 0;
-	padding: 4px 20px 4px 5px;
-	min-height: 20px;
-
-}
-
-DIV.services H4 {
-	display: none;
-}
-
-DIV.services DIV.item {
-	display: inline;
-	border-right: 1px solid #ffffff;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #ffffff;
-	font-size: 70%;
-	margin: 3px;
-}
-
-DIV.services DIV.item IMG {
-	display: none;
-}
-
-DIV.services DIV.item a:link {
-	color: #ffffff;
-	text-decoration: none;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item a:hover {
-	background-color: #2683E2;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item a:visited {
-	color: #ffffff;
-	text-decoration: none;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item-selected {
-	background-color: #2683E2;
-	display: inline;
-	border-right: 1px solid #ffffff;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #ffffff;
-	font-size: 70%;
-}
-
-DIV.services DIV.item-selected a:link {
-	color: #ffffff;
-	text-decoration: none;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item-selected a:hover {
-	background-color: #556677;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item-selected a:visited {
-	color: #ffffff;
-	text-decoration: none;
-	margin: 0 5px 0 5px;
-	padding: 0 2px 0 0px;
-}
-
-/* End services */ /* Start History */
-DIV.history {
-	background-color: #D6D6D6;
-	margin: 0;
-	padding: 1px 30px 0 5px;
-	min-height: 26px;
-}
-
-DIV.history H4 {
-	display: none;
-}
-
-DIV.history DIV.item {
-	display: inline;
-	border-right: 1px solid #ffffff;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #29357D;
-	font-size: 70%;
-}
-
-DIV.history DIV.item IMG {
-	position: relative;
-	top: 4px;
-	height: 16px;
-	padding: 0 5px 0 0px;
-}
-
-DIV.history DIV.item a:link {
-	color: #29357D;
-	text-decoration: none;
-	margin: 5px;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item a:hover {
-	background-color: #B7B6B6;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item a:visited {
-	color: #29357D;
-	text-decoration: none;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item-selected {
-	background-color: #2683E2;
-	display: inline;
-	border-right: 1px solid #ffffff;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: #29357D;
-	font-size: 70%;
-	height: 30px;
-}
-
-DIV.history DIV.item-selected a:hover {
-	background-color: #556677;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item-selected a:link {
-	color: #29357D;
-	text-decoration: none;
-	margin: 10px;
-	padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item-selected a:visited {
-	color: #29357D;
-	text-decoration: none;
-	padding: 1px 3px 1px 3px;
-}
-
-/* INVISIBLE character for empty item. FIREFOX ONLY*/
-DIV.history:after {
-	content: "X";
-	display: inline;
-	text-align: right;
-	font-size: 70%;
-	color: #D6D6D6;
-}
-
-/* End History */ /* Start Context */
-div#context {
-	background-color: #F0F0F0;
-	margin: 0;
-	padding: 1px 30px 0 7px;
-	min-height: 26px;
-}
-
-div#context span.disabled {
-	display: inline;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #666666;
-	font-size: 70%;
-	padding: 0px 5px 0px 7px;
-	white-space: nowrap;
-}
-
-div#context span.disabled IMG {
-	display: none
-}
-
-div#context span.disabled a:link {
-	color: #29357D;
-	text-decoration: none;
-	margin: 5px;
-	padding: 1px 3px 1px 3px;
-}
-
-div#context span.disabled a:hover {
-	background-color: #B7B6B6;
-	padding: 1px 3px 1px 3px;
-}
-
-div#context span.disabled a:visited {
-	color: #29357D;
-	text-decoration: none;
-	padding: 1px 3px 1px 3px;
-}
-
-div#context a.linked {
-	display: inline;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #29357D;
-	font-size: 70%;
-	padding: 0px 5px 0px 7px;
-}
-
-div#context a.linked IMG {
-	display: none
-}
-
-div#context a.linked a:link {
-	color: #29357D;
-	text-decoration: none;
-	margin: 5px;
-	padding: 1px 3px 1px 3px;
-}
-
-div#context a.linked  a:hover {
-	background-color: #29357D;
-	padding: 1px 3px 1px 3px;
-	text-decoration: underline;
-}
-
-div#context a.linked  a:visited {
-	color: #29357D;
-	text-decoration: none;
-	padding: 1px 3px 1px 3px;
-}
-
-/* INVISIBLE character for empty breadcrumbs. FIREFOX ONLY*/
-span.disabled:after {
-	content: "X";
-	display: inline;
-	text-align: right;
-	font-size: 70%;
-	color: #F0F0F0;
-}
-
-/* End Context */ /*
-div#help-bar {
-	position: relative;
-	right: 50px;
-	top: 10px;
-	text-align: right; 
-	font-family : arial, 'sans serif'; 
-	font-weight : normal;  
-	color: #0000FF; 
-	font-size : 90%; 
-	line-height : 110%;
-	text-decoration: underline;
-	height: 22px;
-}
-*/
-#view {
-    min-height: 400px;
-}
-
-DIV#body DIV#view {
-	position: relative;
-	top: 0px;
-	left: 0px;
-	margin: 0px;
-}
-
-/* Start of Message Header */
-DIV.message-header {
-	position: relative;
-	top: 40px;
-	padding: 5px 25px 5px 25px;
-	margin: 0 50px 0 255px;
-	vertical-align: middle;
-	COLOR: #003366;
-	FONT-WEIGHT: bold;
-	FONT-SIZE: 80%;
-	LEFT: auto;
-	FONT-STYLE: normal;
-	FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
-	width: 40%;
-}
-
-DIV.message-header DIV.warning {
-	COLOR: #ff0033;
-	padding: 5px 25px 5px 25px;
-	background: url(default-images/sign-warning.png);
-	background-repeat: no-repeat;
-	background-color: #D6D6D6;
-	background-position: 5px 5px;
-}
-
-DIV.message-header DIV.message {
-	COLOR: #003366;
-	padding: 5px 25px 5px 25px;
-	background: url(default-images/sign-info.png);
-	background-repeat: no-repeat;
-	background-color: #D6D6D6;
-	background-position: 5px 5px;
-}
-
-DIV.message-header DIV.message {
-	FONT-WEIGHT: normal;
-}
-
-/* End of Message Header */ /* Start of Object Header */
-DIV.header {
-	position: relative;
-	top: 40px;
-	display: block;
-	background-color: #F0F0F0;
-	min-height: 48px;
-	margin: 0 50px 0 280px;
-
-}
-
-SPAN.header-icon IMG {
-	float: left;
-}
-
-SPAN.header-text {
-	float: left;
-	position: relative;
-	top: 10px;
-	margin-left: 7px;
-	FONT-WEIGHT: bold;
-	FONT-SIZE: 16px;
-	LEFT: auto;
-	COLOR: #003366;
-	FONT-STYLE: normal;
-	FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
-}
-
-/* End of Object Header */ /* Start of Object Contents */
-DIV#content {
-	position: relative;
-	display: block;
-	top: 40px;
-	margin: 0 50px 10px 280px;
-}
-
-/* Start of Object Fields */
-DIV.field {
-	margin: 0;
-	padding: 5px 0px 5px 0px;
-	border-top: 1px solid #666666;
-	min-height: 20px;
-}
-
-DIV.field SPAN.value IMG,DIV.field DIV.value IMG {
-	position: relative;
-	top: 3px;
-	margin: 0px 5px 0 0;
-	height: 16px;
-}
-
-DIV.field SPAN.value A,DIV.field DIV.value A {
-	position: relative;
-	top: -2px;
-	margin: 0px 5px 0 0;
-	height: 16px;
-}
-
-DIV.field DIV.icon IMG {
-	position: relative;
-	top: 0px;
-	margin: 0px 5px 0 0;
-	height: 16px;
-}
-
-.label,.value {
-	font-size: 80%;
-	color: #333399;
-}
-
-DIV.field DIV.icon {
-	display: inline;
-	color: #333399;
-	position: absolute;
-	left: 200px;
-}
-
-DIV.field span.label,DIV.field DIV.label {
-	width: 170px;
-	display: block;
-	/*content: ":";*/
-	margin: 0 0 -18px 7px;
-}
-
-DIV.field span.separator {
-	display: inline;
-	position: relative;
-	margin: 0 0 -15px 180px;
-	vertical-align: top;
-}
-
-DIV.field span.value, DIV.field DIV.value, DIV.field INPUT.value, DIV.field SELECT.value
-	{
-	top: -2px;
-	position: relative;
-	margin: 0px 10px -5px 0px;
-	display: inline;
-}
-
-DIV.field span.value PRE {
-	color: #333399;
-	margin: 0;
-	font-family: inherit;
-}
-
-
-DIV.field textarea.value {
-	font-family: inherit;
-}
-
-
-DIV.field span.optional {
-	margin: -35px 0 0 0;
-	font-size: 70%;
-	color: grey;
-}
-
-DIV.field span.required {
-	display: inline;
-	position: relative;
-	margin: 0;
-	vertical-align: top;
-	color: red;
-}
-
-DIV.field span.error {
-	display: inline;
-	position: relative;
-	color: red;
-	font-size: 70%;
-}
-
-/* INVISIBLE character for empty value FIREFOX ONLY*/
-DIV.field span.value:after {
-	content: "X";
-	display: inline;
-	text-align: right;
-	font-size: 70%;
-	color: white;
-}
-
-/* INVISIBLE character for empty value FIREFOX ONLY*/
-DIV.field span.label:after {
-	content: "X";
-	display: inline;
-	text-align: right;
-	font-size: 70%;
-	color: white;
-}
-
-/* End of Object Fields */ /* Start of Object Table */
-DIV#content TABLE {
-	position: relative;
-	float: left;
-	width: 100%;
-	border: 0;
-	margin: 0 0 10px 0;
-	border-collapse: collapse;
-}
-
-DIV#content TH {
-	padding: 6px;
-	border: 1px solid #ffffff;
-	background-color: #D6D6D6;
-	font-family: arial, 'sans serif';
-	font-weight: bold;
-	color: black;
-	font-size: 70%;
-}
-
-DIV#content TD {
-	background-color: #ffffff;
-	border-right: 0;
-	border-left: 0;
-	border-bottom: 1px solid black;
-	padding: 6px;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	font-size: 80%;
-	color: #333399;
-	margin: 0;
-	text-align: left;
-}
-
-DIV#content TD.rowstart {
-	background-color: #F0F0F0;
-}
-
-DIV#content TD A:visited {
-	color: #0000FF;
-}
-
-DIV#content H4 {
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #000000;
-	font-size: 70%;
-	border-top: 1px solid black;
-	margin: -2px 0 0 0px;
-	padding: 5px;
-}
-
-TD DIV.icon {
-	font-size: 100%;
-	margin-top: 5px;
-}
-
-TD DIV.icon IMG {
-	float: left;
-	margin: -1px 5px 5px 0px;
-	height: 16px;
-}
-
-TD DIV.action-button {
-	background-color: #ffffff;
-	font-size: 130%;
-	text-decoration: none;
-}
-
-/* End of Object Table */
-INPUT.action-button,DIV.action-button {
-	background-color: #F0F0F0;
-	padding: 10px;
-	display: block;
-	margin: 0;
-	min-height: 20px;
-}
-
-INPUT.action-button,DIV.action-button A {
-	background: url(default-images/bg-button.gif);
-	background-repeat: repeat-x;
-	padding: 2px;
-	margin: 5px;
-	border: 1px solid #333399;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #000000;
-	font-size: 70%;
-	font-weight: normal;
-	text-align: center;
-}
-
-DIV.action-button a:link {
-	color: #000000;
-}
-
-DIV.action-button a:visited {
-	color: #000000;
-}
-
-DIV.action-button a:hover {
-	color: #000000;
-	text-decoration: none;
-}
-
-INPUT.action-button,DIV.action-button INPUT {
-	float: left;
-}
-
-/* End of Object Contents */ /* Start of Object Actions Menu */
-DIV#body DIV#view DIV#menu {
-	position: relative;
-	top: 40px;
-	left: 0;
-	background-color: #ffffff;
-	border-top: 1px solid #00336F;
-	margin: 0px;
-	width: 210px;
-	display: block;
-	float: left;
-}
-
-DIV#body DIV#menu H3 {
-	display: none;
-}
-
-DIV#menu SPAN.name {
-	display: block;
-	font-size: 80%;
-	background-color: #ffffff;
-	color: #333399;
-	line-height: 100%;
-	margin: 0 0 0 10px;
-}
-
-DIV.menu-item  a:link {
-	color: #333399;
-}
-
-DIV.menu-item  a:visited {
-	color: #333399;
-}
-
-DIV.submenu-item {
-	font-size: 80%;
-	background-color: #ffffff;
-	color: #1A59A7;
-	margin: 0px;
-	padding: 5px 0px 5px 10px;
-	border-bottom: 1px solid #00336F;
-	line-height: 100%;
-}
-
-DIV.submenu-item DIV.menu-item {
-	background: url(default-images/submenu-bullet.gif);
-	background-repeat: no-repeat;
-	background-position: left;
-	background-color: #ffffff;
-	margin: 0px;
-	line-height: 100%;
-	border: 0;
-	padding: 4px 5px 0px 10px;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #1A59A7;
-	font-size: 85%;
-}
-
-DIV.menu-item {
-	background-color: #ffffff;
-	margin: 0px;
-	line-height: 110%;
-	border-bottom: 1px solid #00336F;
-	padding: 5px 5px 5px 10px;
-	font-family: arial, 'sans serif';
-	font-weight: normal;
-	color: #1A59A7;
-	font-size: 80%;
-}
-
-DIV.menu-item DIV.disabled {
-	color: #a0a0a0;
-}
-
-DIV.menu-item a:link {
-	color: #1A59A7;
-}
-
-DIV.menu-item a:visited {
-	color: #1A59A7;
-}
-
-DIV.menu-item a:hover {
-	color: #006666;
-	text-decoration: underline;
-}
-
-DIV.submenu-item DIV.menu-item a:link {
-	color: #1A59A7;
-}
-
-DIV.submenu-item DIV.menu-item a:visited {
-	color: #1A59A7;
-}
-
-DIV.submenu-item DIV.menu-item a:hover {
-	color: #006666;
-	text-decoration: underline;
-}
-
-/* End of Object Menu */
-DIV.page-footer {
-	right: 10px;
-	bottom: 10px;
-	font-size: 50%;
-	color: #333399;
-}
-
-H1 {
-	font-size: 140%;
-	margin-top: -8px;
-}
-
-H2 {
-	font-size: 90%;
-	color: #333399;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 0;
-}
-
-H3 {
-	font-size: 80%;
-	color: #ffffff;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 15px 10px 5px 10px;
-}
-
-H4 {
-	font-size: 80%;
-	color: #333399;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 10px 10px 0px 10px;
-}
-
-DIV.text {
-	font-size: 100%;
-	color: #336699;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 10px 10px 0px 10px;
-}
-
-DIV.error {
-	font-size: 120%;
-	color: #cc0000;
-	letter-spacing: 1pt;
-	text-indent:-1pt;
-	margin: 10px 10px 0px 10px;
-}
-
-PRE.error-trace {
-	font-size: 80%;
-	color: #cc0000;
-	margin: 10px 10px 0px 10px;
-}
-
-DIV#debug { /*	float: left;*/
-	background-color: #F0F0F0;
-	margin: 30px;
-	padding: 1px 10px 0 7px;
-	min-height: 22px;
-	border: 1px;
-}
-
-DIV#debug H4 {
-	display: inline;
-	font-size: 80%;
-	color: #999;
-	margin: 0 5px 0 10px;
-}
-
-DIV#debug DIV.detail {
-	display: inline;
-	font-size: 80%;
-	color: #999;
-	margin: 0 5px 0 10px;
-}
-
-SPAN.message {
-	position: relative;
-	top: 30px;
-	font-size: 100%;
-	color: #336699;
-	margin: 40px 0 0 0;
-	padding: 10px;
-}
-
-
-SPAN.about {
-	display: block;
-	padding: 4px;
-}
-
-
-SPAN.user {
-	display: block;
-	padding: 4px;
-}
-
-.nav-link {
-    display: block;
-    padding: 10px;
-    font-size: 75%;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/README.md
----------------------------------------------------------------------
diff --git a/mothballed/README.md b/mothballed/README.md
new file mode 100644
index 0000000..c165679
--- /dev/null
+++ b/mothballed/README.md
@@ -0,0 +1,11 @@
+Mothballed Components
+===========
+
+These components are no longer being actively worked on (there have been no releases of them since Isis graduated as an Apache top-level project.
+
+Instead of the HTML viewer, we suggest you use the Wicket viewer or the Scimpi viewer.
+
+Instead of the SQL or LDAP security implementations, we suggest you use the Shiro security integration.
+
+For further information, see our [website](http://isis.apache.org).
+

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/NOTICE
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/NOTICE b/mothballed/component/security/ldap/NOTICE
new file mode 100644
index 0000000..ba21d0c
--- /dev/null
+++ b/mothballed/component/security/ldap/NOTICE
@@ -0,0 +1,7 @@
+Apache Isis
+Copyright 2010-2013 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/ldap-conf/example.ldif
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/ldap-conf/example.ldif b/mothballed/component/security/ldap/ldap-conf/example.ldif
new file mode 100644
index 0000000..1ede7b0
--- /dev/null
+++ b/mothballed/component/security/ldap/ldap-conf/example.ldif
@@ -0,0 +1,46 @@
+dn: dc=isis,dc=org
+objectClass: top
+objectclass: dcObject
+objectclass: organization
+o: [[NAME]] Group
+dc: isis
+
+dn: cn=Manager,dc=isis,dc=org
+objectclass: organizationalRole
+cn: Manager
+
+
+dn: ou=people,dc=isis,dc=org
+objectClass: top
+objectClass: organizationalUnit
+ou: people
+
+dn: uid=joe,ou=people,dc=isis,dc=org
+objectClass: person
+objectClass: inetOrgPerson
+cn: Joe Bloggs
+displayName: Joe Bloggs
+givenName: Joe
+sn: Bloggs
+uid: joe
+userPassword: pass
+
+dn: uid=john,ou=people,dc=isis,dc=org
+objectClass: person
+objectClass: inetOrgPerson
+cn: John Bloggs
+displayName: John
+givenName: John
+sn: Bloggs
+uid: john
+userPassword: pass
+
+dn: uid=jack,ou=people,dc=isis,dc=org
+objectClass: person
+objectClass: inetOrgPerson
+cn: Jack Bloggs
+displayName: Jack Bloggs
+givenName: Jack
+sn: Bloggs
+uid: jack
+userPassword: pass
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/ldap-conf/readme.txt
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/ldap-conf/readme.txt b/mothballed/component/security/ldap/ldap-conf/readme.txt
new file mode 100644
index 0000000..8f0dbfb
--- /dev/null
+++ b/mothballed/component/security/ldap/ldap-conf/readme.txt
@@ -0,0 +1,12 @@
+An LDAP browser can be downloaded from http://jxplorer.org/
+Windows port of OpenLDAP is at http://lucas.bergmans.us/hacks/openldap/
+
+Files:
+
+example.ldif - sample file for loading into ldap (using ldapadd)
+  usage
+  ldapadd -x -D "cn=Manager,dc=<MY-DOMAIN>,dc=<COM>" -W -f example.ldif
+  e.g.
+  ldapadd -x -D "cn=Manager,dc=isis,dc=org" -W -f example.ldif
+
+slapd.conf - sample configuration for the OpenLDAP server (Windows port)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/ldap-conf/slapd.conf
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/ldap-conf/slapd.conf b/mothballed/component/security/ldap/ldap-conf/slapd.conf
new file mode 100644
index 0000000..a5f32b7
--- /dev/null
+++ b/mothballed/component/security/ldap/ldap-conf/slapd.conf
@@ -0,0 +1,80 @@
+# Setup for Windows port of OpenLDAP
+#
+# See slapd.conf(5) for details on configuration options.
+# This file should NOT be world readable.
+#
+ucdata-path	./ucdata
+include		./schema/core.schema
+# DGS - add JNDI support, inetorgperson has additional attributes for network users
+include		./schema/java.schema
+include		./schema/cosine.schema
+include		./schema/inetorgperson.schema
+
+# Define global ACLs to disable default read access.
+
+# Do not enable referrals until AFTER you have a working directory
+# service AND an understanding of referrals.
+#referral	ldap:/root.openldap.org
+
+pidfile		./run/slapd.pid
+argsfile	./run/slapd.args
+
+# Load dynamic backend modules:
+# modulepath	./libexec/openldap
+# moduleload	back_bdb.la
+# moduleload	back_ldap.la
+# moduleload	back_ldbm.la
+# moduleload	back_passwd.la
+# moduleload	back_shell.la
+
+# Sample security restrictions
+#	Require integrity protection (prevent hijacking)
+#	Require 112-bit (3DES or better) encryption for updates
+#	Require 63-bit encryption for simple bind
+# security ssf=1 update_ssf=112 simple_bind=64
+
+# Sample access control policy:
+#	Root DSE: allow anyone to read it
+#	Subschema (sub)entry DSE: allow anyone to read it
+#	Other DSEs:
+#		Allow self write access
+#		Allow authenticated users read access
+#		Allow anonymous users to authenticate
+#	Directives needed to implement policy:
+# access to dn.base="" by * read
+# access to dn.base="cn=Subschema" by * read
+# access to *
+#	by self write
+#	by users read
+#	by anonymous auth
+#
+# if no access controls are present, the default policy
+# allows anyone and everyone to read anything but restricts
+# updates to rootdn.  (e.g., "access to * by * read")
+#
+# rootdn can always read and write EVERYTHING!
+
+#######################################################################
+# BDB database definitions
+#######################################################################
+
+database	bdb
+# DGS - set suffix to isis
+#suffix		"dc=my-domain,dc=com"
+#rootdn		"cn=Manager,dc=my-domain,dc=com"
+suffix		"dc=isis,dc=org"
+rootdn		"cn=Manager,dc=isis,dc=org"
+
+# Cleartext passwords, especially for the rootdn, should
+# be avoid.  See slappasswd(8) and slapd.conf(5) for details.
+# Use of strong authentication encouraged.
+rootpw		secret
+# The database directory MUST exist prior to running slapd AND 
+# should only be accessible by the slapd and slap tools.
+# Mode 700 recommended.
+directory	./data
+# Indices to maintain
+index	objectClass	eq
+
+# DGS - improve index?
+index   cn,sn,st                   pres,eq,sub

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/security/ldap/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/security/ldap/pom.xml b/mothballed/component/security/ldap/pom.xml
new file mode 100644
index 0000000..8487518
--- /dev/null
+++ b/mothballed/component/security/ldap/pom.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.isis.core</groupId>
+		<artifactId>isis</artifactId>
+        <version>1.1.1-SNAPSHOT</version>
+		<relativePath>../../../core/pom.xml</relativePath>
+	</parent>
+
+	<groupId>org.apache.isis.security</groupId>
+	<artifactId>isis-security-ldap</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+
+	<name>Isis LDAP Security</name>
+
+	<properties>
+        <siteBaseDir>.</siteBaseDir>
+		<relativeUrl/>
+	</properties>
+
+    <!-- used in Site generation for relative references. -->
+    <url>http://isis.apache.org/${relativeUrl}</url>
+
+	<build>
+		<pluginManagement>
+			<plugins>
+                <!-- Apache Release Audit Tool -->
+                <plugin>
+                    <groupId>org.apache.rat</groupId>
+                    <artifactId>apache-rat-plugin</artifactId>
+                    <version>0.8</version>
+	                <configuration>
+	                    <excludes>
+	                    	<!-- 
+	                    	overriding inherited excludes from oia.core:isis 
+	                    	with a more specific set for this component
+	                    	 -->
+	                        <exclude>**/target/**</exclude>
+	                        <exclude>**/target-ide/**</exclude>
+
+	                        <exclude>**/*.project</exclude>
+	                        <exclude>**/.classpath</exclude>
+	                        <exclude>**/.settings/**</exclude>
+	                    </excludes>
+                    </configuration>
+	            </plugin>
+			</plugins>
+		</pluginManagement>
+	</build>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-project-info-reports-plugin</artifactId>
+				<version>${maven-project-info-reports-plugin}</version>
+                <inherited>false</inherited>
+                <configuration>
+                	<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+                </configuration>
+                <reportSets>
+                    <reportSet>
+                        <inherited>false</inherited>
+                        <reports>
+                            <report>dependencies</report>
+                            <report>dependency-convergence</report>
+                            <report>plugins</report>
+                            <report>summary</report>
+                        </reports>
+                    </reportSet>
+                </reportSets>
+            </plugin>
+        </plugins>
+    </reporting>
+
+    <dependencyManagement>
+    	<!-- for benefit of application developers, using scope=import -->
+    	<dependencies>
+			<dependency>
+			    <groupId>org.apache.isis.security</groupId>
+			    <artifactId>isis-security-ldap</artifactId>
+				<version>1.0.0-SNAPSHOT</version>
+			</dependency>
+    	</dependencies>
+    </dependencyManagement>
+
+	<dependencies>
+		<dependency>
+		    <groupId>org.apache.isis.core</groupId>
+		    <artifactId>isis-core-runtime</artifactId>
+		</dependency>
+		<dependency>
+		    <groupId>org.apache.isis.core</groupId>
+		    <artifactId>isis-core-runtime</artifactId>
+		    <type>test-jar</type>
+		    <scope>test</scope>
+		</dependency>
+	</dependencies>
+</project>


[15/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ForwardRequest.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ForwardRequest.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ForwardRequest.java
deleted file mode 100644
index bfb1808..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ForwardRequest.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- *  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.request;
-
-import org.apache.isis.viewer.html.task.Task;
-
-public class ForwardRequest implements Request {
-
-    public static Request editObject(final String objectId) {
-        return new ForwardRequest(EDIT_COMMAND, objectId);
-    }
-
-    public static Request listCollection(final String collectionId) {
-        return new ForwardRequest(COLLECTION_COMMAND, collectionId);
-    }
-
-    public static ForwardRequest viewObject(final String objectId) {
-        return new ForwardRequest(OBJECT_COMMAND, objectId);
-    }
-
-    public static Request viewObject(final String objectId, final String collectionField) {
-        return new ForwardRequest(OBJECT_COMMAND, objectId, collectionField);
-    }
-
-    public static Request viewService(final String objectId) {
-        return new ForwardRequest(SERVICE_COMMAND, objectId);
-    }
-
-    public static Request task(final Task task) {
-        final ForwardRequest forwardRequest = new ForwardRequest(TASK_COMMAND, null);
-        forwardRequest.taskId = task.getId();
-        return forwardRequest;
-    }
-
-    public static Request taskComplete() {
-        final ForwardRequest forwardRequest = new ForwardRequest(TASK_COMMAND, null);
-        forwardRequest.submitName = "Ok";
-        return forwardRequest;
-    }
-
-    private final String actionName;
-    private Request forwardedRequest;
-    private final String objectId;
-    private final String fieldName;
-    private String submitName;
-    private String taskId;
-
-    private ForwardRequest(final String actionName, final String id) {
-        this(actionName, id, null);
-    }
-
-    private ForwardRequest(final String actionName, final String objectId, final String fieldName) {
-        this.actionName = actionName;
-        this.objectId = objectId;
-        this.fieldName = fieldName;
-    }
-
-    @Override
-    public void forward(final Request forwardedRequest) {
-        this.forwardedRequest = forwardedRequest;
-    }
-
-    @Override
-    public String getActionId() {
-        return null;
-    }
-
-    @Override
-    public String getElementId() {
-        return null;
-    }
-
-    @Override
-    public String getName() {
-        return null;
-    }
-
-    @Override
-    public String getRequestType() {
-        return actionName;
-    }
-
-    @Override
-    public String getButtonName() {
-        return submitName;
-    }
-
-    @Override
-    public String getProperty() {
-        return fieldName;
-    }
-
-    @Override
-    public String getFieldEntry(final int i) {
-        return null;
-    }
-
-    @Override
-    public String getTaskId() {
-        return taskId;
-    }
-
-    @Override
-    public Request getForward() {
-        return forwardedRequest;
-    }
-
-    @Override
-    public String getObjectId() {
-        return objectId;
-    }
-
-    @Override
-    public String toString() {
-        return "ForwardRequest " + actionName + " " + forwardedRequest;
-    }
-
-    public static Request logon() {
-        return new ForwardRequest("logon", null);
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/Request.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/Request.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/Request.java
deleted file mode 100644
index 8681660..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/Request.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *  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.request;
-
-/**
- * The Request object represents all the information collected from the user
- * when requesting the server do something.
- */
-public interface Request {
-    public static final String EDIT_COMMAND = "edit";
-    public static final String COLLECTION_COMMAND = "collection";
-    public static final String FIELD_COLLECTION_COMMAND = "fieldCollection";
-    public static final String OBJECT_COMMAND = "object";
-    public static final String SERVICE_COMMAND = "serviceOption";
-    public static final String TASK_COMMAND = "task";
-    public static final String LOGON_COMMAND = "task";
-
-    void forward(Request object);
-
-    String getActionId();
-
-    /**
-     * Name of a property within an object.
-     */
-    String getProperty();
-
-    /**
-     * The element within a collection.
-     */
-    String getElementId();
-
-    /**
-     * The users entry into a field on the form.
-     */
-    String getFieldEntry(int i);
-
-    Request getForward();
-
-    String getObjectId();
-
-    /**
-     * Name of the request. See the constants defined in this class.
-     */
-    String getRequestType();
-
-    String getTaskId();
-
-    /**
-     * Name of the button pressed on the form.
-     */
-    String getButtonName();
-
-    String getName();
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ServletRequest.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ServletRequest.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ServletRequest.java
deleted file mode 100644
index 0ca1bda..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/request/ServletRequest.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *  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.request;
-
-import javax.servlet.http.HttpServletRequest;
-
-public class ServletRequest implements Request {
-    private Request forwardRequest;
-    private final HttpServletRequest request;
-    private final String requestType;
-
-    public ServletRequest(final HttpServletRequest request) {
-        this.request = request;
-
-        final String path = request.getServletPath();
-        final int from = path.lastIndexOf('/');
-        final int to = path.lastIndexOf('.');
-        requestType = path.substring(from + 1, to);
-    }
-
-    @Override
-    public void forward(final Request forwardRequest) {
-        this.forwardRequest = forwardRequest;
-    }
-
-    @Override
-    public String getActionId() {
-        return request.getParameter("action");
-    }
-
-    @Override
-    public String getProperty() {
-        return request.getParameter("field");
-    }
-
-    @Override
-    public String getElementId() {
-        return request.getParameter("element");
-    }
-
-    @Override
-    public String getFieldEntry(final int i) {
-        return request.getParameter("fld" + i);
-    }
-
-    @Override
-    public String getTaskId() {
-        return request.getParameter("id");
-    }
-
-    @Override
-    public Request getForward() {
-        return forwardRequest;
-    }
-
-    @Override
-    public String getName() {
-        return request.getParameter("name");
-    }
-
-    @Override
-    public String getObjectId() {
-        return request.getParameter("id");
-    }
-
-    @Override
-    public String getRequestType() {
-        return requestType;
-    }
-
-    @Override
-    public String getButtonName() {
-        return request.getParameter("button");
-    }
-
-    @Override
-    public String toString() {
-        return "ServletRequest " + request.getRequestURI() + "?" + request.getQueryString();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/AbstractHtmlViewerServlet.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/AbstractHtmlViewerServlet.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/AbstractHtmlViewerServlet.java
deleted file mode 100644
index a4cda01..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/AbstractHtmlViewerServlet.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *  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.servlet;
-
-import javax.servlet.http.HttpServlet;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.runtime.authentication.AuthenticationManager;
-import org.apache.isis.core.runtime.system.DeploymentType;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.html.PathBuilder;
-import org.apache.isis.viewer.html.PathBuilderDefault;
-import org.apache.isis.viewer.html.component.html.HtmlComponentFactory;
-
-public abstract class AbstractHtmlViewerServlet extends HttpServlet {
-
-    private static final long serialVersionUID = 1L;
-
-    private PathBuilder pathBuilder;
-    private HtmlComponentFactory componentFactory;
-
-    protected HtmlComponentFactory getHtmlComponentFactory() {
-        if(componentFactory == null) {
-            componentFactory = new HtmlComponentFactory(getPathBuilder());
-        }
-        return componentFactory;
-    }
-
-    protected PathBuilder getPathBuilder() {
-        if (pathBuilder != null) {
-            return pathBuilder;
-        }
-        return pathBuilder = new PathBuilderDefault(getServletContext());
-    }
-
-
-    /**
-     * Convenience.
-     */
-    protected String pathTo(final String prefix) {
-        return getPathBuilder().pathTo(prefix);
-    }
-
-    // //////////////////////////////////////////////////////////////
-    // Dependencies (from context)
-    // //////////////////////////////////////////////////////////////
-
-    protected AuthenticationSession getAuthenticationSession() {
-        return IsisContext.getAuthenticationSession();
-    }
-
-    protected IsisConfiguration getConfiguration() {
-        return IsisContext.getConfiguration();
-    }
-
-    protected AuthenticationManager getAuthenticationManager() {
-        return IsisContext.getAuthenticationManager();
-    }
-
-    protected DeploymentType getDeploymentType() {
-        return IsisContext.getDeploymentType();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/ControllerServlet.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/ControllerServlet.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/ControllerServlet.java
deleted file mode 100644
index 3c84343..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/ControllerServlet.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- *  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.servlet;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.viewer.html.PathBuilder;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-import org.apache.isis.viewer.html.request.ServletRequest;
-import org.apache.isis.viewer.html.servlet.internal.WebController;
-
-public class ControllerServlet extends AbstractHtmlViewerServlet {
-
-    private static final long serialVersionUID = 1L;
-    private static final Logger LOG = Logger.getLogger(ControllerServlet.class);
-
-    private String encoding;
-    private WebController controller;
-
-    // //////////////////////////////////////////////////////////////////
-    // init
-    // //////////////////////////////////////////////////////////////////
-
-    @Override
-    public void init(final ServletConfig servletConfig) throws ServletException {
-        super.init(servletConfig);
-        encoding =
-            getConfiguration().getString(HtmlServletConstants.ENCODING_KEY, HtmlServletConstants.ENCODING_DEFAULT);
-
-        controller = getWebController(getPathBuilder());
-
-        final boolean debugEnabled = getConfiguration().getBoolean(HtmlServletConstants.DEBUG_KEY);
-        controller.setDebug(debugEnabled);
-
-        controller.init();
-    }
-
-    // Don't remove this - It allows other implementations of HtmlViewer to replace the WebController
-    protected WebController getWebController(PathBuilder pathBuilder) {
-        if (controller == null) {
-            controller = new WebController(getPathBuilder());
-        }
-        return controller;
-    }
-
-    // //////////////////////////////////////////////////////////////////
-    // doGet, doPost
-    // //////////////////////////////////////////////////////////////////
-
-    @Override
-    protected void doPost(final HttpServletRequest request, final HttpServletResponse response)
-        throws ServletException, IOException {
-        request.setCharacterEncoding(encoding);
-        processRequest(request, response);
-    }
-
-    @Override
-    protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException,
-        IOException {
-        processRequest(request, response);
-    }
-
-    private void processRequest(final HttpServletRequest request, final HttpServletResponse response)
-        throws ServletException, IOException {
-        LOG.info("request: " + request.getServletPath() + "?" + request.getQueryString());
-
-        final Request req = new ServletRequest(request);
-
-        if (req.getRequestType() == null) {
-            throw new ServletException("No action specified");
-        } else if (!controller.actionExists(req)) {
-            throw new ServletException("No such action " + req.getRequestType());
-        } else {
-            try {
-                final Context context = getContextForRequest(request);
-                processRequest(request, response, req, context);
-            } catch (final Exception e) {
-                LOG.error("exception during request handling", e);
-                throw new ServletException("Internal exception", e);
-            }
-        }
-    }
-
-    private Context getContextForRequest(final HttpServletRequest request) {
-        final AuthenticationSession authSession = getAuthenticationSession();
-        Context context = (Context) authSession.getAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY);
-        if (context == null || !context.isValid()) {
-            context = new Context(getHtmlComponentFactory());
-            authSession.setAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY, context);
-        }
-        return context;
-    }
-
-    private void processRequest(final HttpServletRequest request, final HttpServletResponse response,
-        final Request req, final Context context) throws IOException, ServletException {
-        response.setContentType("text/html");
-        response.setCharacterEncoding(encoding);
-        // no need to check if logged in; the IsisSessionFilter would
-        // have prevented us from getting here.
-
-        final Page page = controller.generatePage(context, req);
-        if (context.isValid()) {
-            if (controller.isDebug()) {
-                controller.addDebug(page, req);
-                addDebug(request, page);
-            }
-            PrintWriter writer;
-            writer = response.getWriter();
-            page.write(writer);
-        } else {
-            response.sendRedirect(getLogonPage());
-        }
-    }
-
-    protected String getLogonPage() {
-        return pathTo(HtmlServletConstants.LOGON_PAGE);
-    }
-
-    private void addDebug(final HttpServletRequest request, final Page page) {
-        page.addDebug("Servlet path", request.getServletPath());
-        page.addDebug("Query string", request.getQueryString());
-        page.addDebug("Context path", request.getContextPath());
-        page.addDebug("Path info", request.getPathInfo());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/HtmlServletConstants.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/HtmlServletConstants.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/HtmlServletConstants.java
deleted file mode 100644
index 4f40f75..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/HtmlServletConstants.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *  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.servlet;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.commons.config.ConfigurationConstants;
-
-public final class HtmlServletConstants {
-
-    static final String PROPERTY_BASE = ConfigurationConstants.ROOT + "viewer.html.";
-
-    static final String DEBUG_KEY = PROPERTY_BASE + "debug";
-
-    static final String ENCODING_KEY = PROPERTY_BASE + "encoding";
-    static final String ENCODING_DEFAULT = "ISO-8859-1";
-
-    public static final String SUFFIX_INIT_PARAM = "viewer-html.suffix";
-    public static final String SUFFIX_INIT_PARAM_VALUE_DEFAULT = "app";
-
-    /**
-     * Binding to the {@link AuthenticationSession}.
-     */
-    static final String AUTHENTICATION_SESSION_CONTEXT_KEY = "isis-context";
-
-    public static final String LOGON_PAGE = "logon";
-    static final String START_PAGE = "start";
-
-    private HtmlServletConstants() {
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/LogonServlet.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/LogonServlet.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/LogonServlet.java
deleted file mode 100644
index 79d5859..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/LogonServlet.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- *  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.servlet;
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
-import org.apache.isis.core.runtime.authentication.AuthenticationRequestPassword;
-import org.apache.isis.core.runtime.authentication.exploration.AuthenticationRequestExploration;
-import org.apache.isis.core.runtime.authentication.standard.RegistrationDetailsPassword;
-import org.apache.isis.core.runtime.system.DeploymentType;
-import org.apache.isis.core.webapp.IsisSessionFilter;
-import org.apache.isis.core.webapp.auth.AuthenticationSessionStrategy;
-import org.apache.isis.viewer.html.component.html.HtmlComponentFactory;
-import org.apache.isis.viewer.html.component.html.LogonFormPage;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.monitoring.servermonitor.Monitor;
-
-public class LogonServlet extends AbstractHtmlViewerServlet {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final Logger LOG = Logger.getLogger(LogonServlet.class);
-
-    private AuthenticationSessionStrategy authenticationSessionStrategy;
-
-    @Override
-    public void init() throws ServletException {
-        authenticationSessionStrategy = IsisSessionFilter.lookup(getServletConfig().getInitParameter(IsisSessionFilter.AUTHENTICATION_SESSION_STRATEGY_KEY));
-    }
-
-    @Override
-    protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
-        doPost(request, response);
-    }
-
-    @Override
-    protected void doPost(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
-
-        // look for existing valid session
-        final AuthenticationSession existingAuthSession = authenticationSessionStrategy.lookupValid(request, response);
-        if (existingAuthSession != null) {
-            redirectToStartPage(response, existingAuthSession.getUserName());
-            return;
-        }
-
-        // prompt
-        final String user = request.getParameter("username");
-        final String password = request.getParameter("password");
-        if (user == null && !getDeploymentType().isExploring()) {
-            renderPrompt(response, "", "", null);
-            return;
-        }
-
-        // authenticate; re-prompt if required
-        final AuthenticationSession authSession = authenticate(user, password);
-        if (authSession == null) {
-            renderPrompt(response, user, password, "user/password invalid");
-            return;
-        }
-
-        // authenticated
-        authenticationSessionStrategy.bind(request, response, authSession);
-
-        final Context context = new Context(getHtmlComponentFactory());
-        context.setSession(authSession);
-        authSession.setAttribute(HtmlServletConstants.AUTHENTICATION_SESSION_CONTEXT_KEY, context);
-
-        LOG.info("created session");
-        redirectToStartPage(response, user);
-    }
-
-    protected HtmlComponentFactory getHtmlComponentFactory() {
-        return new HtmlComponentFactory(getPathBuilder());
-    }
-
-    private void redirectToStartPage(final HttpServletResponse response, final String user) throws IOException {
-        Monitor.addEvent("Web", "Logon - " + user);
-        response.sendRedirect(pathTo(HtmlServletConstants.START_PAGE));
-    }
-
-    private void renderPrompt(final HttpServletResponse response, final String user, final String password, final String error) throws IOException {
-        response.setContentType("text/html");
-        final HtmlComponentFactory factory = getHtmlComponentFactory();
-        final boolean registerLink = getAuthenticationManager().supportsRegistration(RegistrationDetailsPassword.class);
-        final LogonFormPage page = factory.createLogonPage(user, password, registerLink, error);
-        page.write(response.getWriter());
-    }
-
-    protected AuthenticationSession authenticate(final String user, final String password) {
-        AuthenticationRequest request;
-        if (getDeploymentType() == DeploymentType.EXPLORATION) {
-            request = new AuthenticationRequestExploration();
-        } else {
-            request = new AuthenticationRequestPassword(user, password);
-        }
-        return getAuthenticationManager().authenticate(request);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/RegisterServlet.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/RegisterServlet.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/RegisterServlet.java
deleted file mode 100644
index d103d9a..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/RegisterServlet.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *  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.servlet;
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.google.common.base.Objects;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.core.runtime.authentication.standard.RegistrationDetailsPassword;
-import org.apache.isis.viewer.html.component.html.HtmlComponentFactory;
-import org.apache.isis.viewer.html.component.html.RegisterFormPage;
-import org.apache.isis.viewer.html.monitoring.servermonitor.Monitor;
-
-public class RegisterServlet extends AbstractHtmlViewerServlet {
-
-    private static final long serialVersionUID = 1L;
-
-    @SuppressWarnings("unused")
-    private static final Logger LOG = Logger.getLogger(RegisterServlet.class);
-
-    @Override
-    public void init() throws ServletException {
-    }
-
-    @Override
-    protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
-        doPost(request, response);
-    }
-
-    @Override
-    protected void doPost(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
-
-        // prompt
-        final String user = request.getParameter("username");
-        final String password = request.getParameter("password");
-        final String password2 = request.getParameter("password2");
-        if (user == null) {
-            renderPrompt(response, "", "", "", "");
-            return;
-        }
-
-        // register; re-prompt if required
-        if (!Objects.equal(password, password2)) {
-            renderPrompt(response, user, "", "", "passwords don't match");
-            return;
-        }
-
-        // register; re-prompt if required
-        final boolean registered = register(user, password, password2);
-        if (!registered) {
-            renderPrompt(response, user, "", "", "user name already taken");
-            return;
-        }
-
-        // registered
-        redirectToLogonPage(response, user);
-    }
-
-    private void redirectToLogonPage(final HttpServletResponse response, final String user) throws IOException {
-        Monitor.addEvent("Web", "Logon - " + user);
-        response.sendRedirect(pathTo(HtmlServletConstants.LOGON_PAGE));
-    }
-
-    private void renderPrompt(final HttpServletResponse response, final String user, final String password, final String password2, final String message) throws IOException {
-        response.setContentType("text/html");
-        final HtmlComponentFactory factory = new HtmlComponentFactory(getPathBuilder());
-        final RegisterFormPage page = factory.createRegisterPage(user, password, message);
-        page.write(response.getWriter());
-    }
-
-    private boolean register(final String user, final String password, final String password2) {
-        return getAuthenticationManager().register(new RegistrationDetailsPassword(user, password));
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java
deleted file mode 100644
index 0d72805..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/servlet/internal/WebController.java
+++ /dev/null
@@ -1,460 +0,0 @@
-/*
- *  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.servlet.internal;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.commons.debug.DebugString;
-import org.apache.isis.core.commons.exceptions.IsisApplicationException;
-import org.apache.isis.core.commons.exceptions.IsisException;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.util.Dump;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.userprofile.UserProfile;
-import org.apache.isis.core.runtime.userprofile.UserProfilesDebugUtil;
-import org.apache.isis.viewer.html.PathBuilder;
-import org.apache.isis.viewer.html.action.Action;
-import org.apache.isis.viewer.html.action.ActionException;
-import org.apache.isis.viewer.html.action.ChangeContext;
-import org.apache.isis.viewer.html.action.LogOut;
-import org.apache.isis.viewer.html.action.Welcome;
-import org.apache.isis.viewer.html.action.edit.AddItemToCollection;
-import org.apache.isis.viewer.html.action.edit.EditObject;
-import org.apache.isis.viewer.html.action.edit.RemoveItemFromCollection;
-import org.apache.isis.viewer.html.action.edit.Save;
-import org.apache.isis.viewer.html.action.misc.About;
-import org.apache.isis.viewer.html.action.misc.SetUser;
-import org.apache.isis.viewer.html.action.misc.SwapUser;
-import org.apache.isis.viewer.html.action.view.CollectionView;
-import org.apache.isis.viewer.html.action.view.FieldCollectionView;
-import org.apache.isis.viewer.html.action.view.ObjectView;
-import org.apache.isis.viewer.html.action.view.ServiceView;
-import org.apache.isis.viewer.html.component.Block;
-import org.apache.isis.viewer.html.component.Component;
-import org.apache.isis.viewer.html.component.ComponentFactory;
-import org.apache.isis.viewer.html.component.DebugPane;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.context.ObjectLookupException;
-import org.apache.isis.viewer.html.crumb.Crumb;
-import org.apache.isis.viewer.html.image.ImageLookup;
-import org.apache.isis.viewer.html.monitoring.servermonitor.Monitor;
-import org.apache.isis.viewer.html.request.Request;
-import org.apache.isis.viewer.html.task.InvokeMethod;
-import org.apache.isis.viewer.html.task.TaskLookupException;
-import org.apache.isis.viewer.html.task.TaskStep;
-
-public class WebController {
-
-    private static final Logger LOG = Logger.getLogger(WebController.class);
-    private static final Logger ACCESS_LOG = Logger.getLogger("access_log");
-
-    private static final String ERROR_REASON = "This error occurs when you go back to a page " + "using the browsers back button.  To avoid this error in the future please avoid using the back button";
-
-    protected class DebugView implements Action {
-        public DebugView() {
-        }
-
-        @Override
-        public void execute(final Request request, final Context context, final Page page) {
-            page.setTitle("Debug");
-
-            final DebugPane debugPane = context.getComponentFactory().createDebugPane();
-            page.setDebug(debugPane);
-
-            final DebugString debug = new DebugString();
-
-            final AuthenticationSession authenticationSession = IsisContext.getAuthenticationSession();
-            debug.appendTitle("Session");
-            if (authenticationSession != null) {
-                debug.appendln("user", authenticationSession.getUserName());
-                debug.appendln("roles", authenticationSession.getRoles());
-            } else {
-                debug.appendln("none");
-            }
-
-            final UserProfile userProfile = IsisContext.getUserProfile();
-            debug.appendTitle("User profile");
-            if (userProfile != null) {
-                UserProfilesDebugUtil.asDebuggableWithTitle(userProfile).debugData(debug);
-            } else {
-                debug.appendln("none");
-            }
-
-            debug.appendTitle("Actions");
-            final Iterator e = actions.entrySet().iterator();
-            debug.indent();
-            while (e.hasNext()) {
-                final Map.Entry element = (Map.Entry) e.next();
-                debug.appendln(element.getKey() + " -> " + element.getValue());
-            }
-            debug.unindent();
-
-            context.debug(debug);
-
-            ImageLookup.debug(debug);
-
-            debugPane.appendln("<pre>" + debug.toString() + "</pre>");
-        }
-
-        @Override
-        public String name() {
-            return "debug";
-        }
-    }
-
-    protected class DebugSpecification implements Action {
-        public DebugSpecification() {
-        }
-
-        @Override
-        public void execute(final Request request, final Context context, final Page page) {
-            final DebugPane debugPane = context.getComponentFactory().createDebugPane();
-            page.setDebug(debugPane);
-
-            debugPane.addSection("Specification");
-            final ObjectAdapter object = context.getMappedObject(request.getObjectId());
-            debugPane.appendln(Dump.specification(object));
-        }
-
-        @Override
-        public String name() {
-            return "spec";
-        }
-    }
-
-    protected class DebugObject implements Action {
-        public DebugObject() {
-        }
-
-        @Override
-        public void execute(final Request request, final Context context, final Page page) {
-            final DebugPane debugPane = context.getComponentFactory().createDebugPane();
-            page.setDebug(debugPane);
-
-            debugPane.addSection("Adapter");
-            final ObjectAdapter object = context.getMappedObject(request.getObjectId());
-            debugPane.appendln(Dump.adapter(object));
-            debugPane.addSection("Graph");
-            debugPane.appendln(Dump.graph(object, IsisContext.getAuthenticationSession()));
-        }
-
-        @Override
-        public String name() {
-            return "dump";
-        }
-    }
-
-    protected class DebugOn implements Action {
-        private final WebController controller;
-
-        public DebugOn(final WebController controller) {
-            this.controller = controller;
-        }
-
-        @Override
-        public void execute(final Request request, final Context context, final Page page) {
-            controller.setDebug(true);
-        }
-
-        @Override
-        public String name() {
-            return "debugon";
-        }
-    }
-
-    protected class DebugOff implements Action {
-        private final WebController controller;
-
-        public DebugOff(final WebController controller) {
-            this.controller = controller;
-        }
-
-        @Override
-        public void execute(final Request request, final Context context, final Page page) {
-            controller.setDebug(false);
-        }
-
-        @Override
-        public String name() {
-            return "debugoff";
-        }
-    }
-
-    private final Map actions = new HashMap();
-
-    private boolean isDebug;
-    private final PathBuilder pathBuilder;
-
-    public WebController(final PathBuilder pathBuilder) {
-        this.pathBuilder = pathBuilder;
-    }
-
-    public boolean actionExists(final Request req) {
-        return actions.containsKey(req.getRequestType());
-    }
-
-    protected void addAction(final Action action) {
-        actions.put(action.name(), action);
-    }
-
-    private void addCrumbs(final Context context, final Page page) {
-        final Crumb[] crumbs = context.getCrumbs();
-        final String[] names = new String[crumbs.length];
-        final boolean[] isLinked = context.isLinked();
-
-        for (int i = 0; i < crumbs.length; i++) {
-            names[i] = crumbs[i].title();
-        }
-
-        final ComponentFactory factory = context.getComponentFactory();
-        final Component breadCrumbs = factory.createBreadCrumbs(names, isLinked);
-
-        page.setCrumbs(breadCrumbs);
-    }
-
-    public void addDebug(final Page page, final Request req) {
-        page.addDebug("<a href=\"" + pathTo("debug") + "\">Debug</a>");
-        final String id = req.getObjectId();
-        if (id != null) {
-            page.addDebug("<a href=\"" + pathTo("dump") + "?id=" + id + "\">Object</a>");
-            page.addDebug("<a href=\"" + pathTo("spec") + "?id=" + id + "\">Spec</a>");
-        }
-        page.addDebug("<a href=\"" + pathTo("about") + "\">About</a>");
-        page.addDebug("<a href=\"" + pathTo("debugoff") + "\">Debug off</a>");
-    }
-
-    public Page generatePage(final Context context, final Request request) {
-        context.restoreAllObjectsToLoader();
-        final Page page = context.getComponentFactory().createPage();
-        pageHeader(context, page);
-        final Block navigation = page.getNavigation();
-
-        final Block optionBar = context.getComponentFactory().createBlock("options", null);
-        optionBar.add(context.getComponentFactory().createHeading("Options"));
-
-        Block block = context.getComponentFactory().createBlock("item", null);
-        Component option = context.getComponentFactory().createLink("logout", "Log Out", "End the current session");
-        block.add(option);
-        optionBar.add(block);
-
-        block = context.getComponentFactory().createBlock("item", null);
-        option = context.getComponentFactory().createLink("about", "About", "Details about this application");
-        block.add(option);
-        optionBar.add(block);
-
-        // boolean isExploring = SessionAccess.inExplorationMode();
-        final boolean isExploring = IsisContext.getDeploymentType().isExploring();
-        if (isExploring) {
-            block = context.getComponentFactory().createBlock("item", null);
-            option = context.getComponentFactory().createLink("swapuser", "Swap User", "Swap the exploration user");
-            block.add(option);
-            optionBar.add(block);
-        }
-
-        navigation.add(optionBar);
-
-        listServices(context, navigation);
-        listHistory(context, navigation);
-        Monitor.addEvent("Web", "Request " + request);
-        runAction(context, request, page);
-        addCrumbs(context, page);
-
-        // The web viewer has no views of other objects, so changes can be
-        // ignored
-        if (IsisContext.inSession() && IsisContext.inTransaction()) {
-            IsisContext.getUpdateNotifier().clear();
-        }
-        // TODO deal with disposed objects
-
-        return page;
-    }
-
-    public void init() {
-        addAction(new About());
-        addAction(new SwapUser());
-        addAction(new SetUser());
-        addAction(new DebugView());
-        addAction(new DebugSpecification());
-        addAction(new DebugObject());
-        addAction(new Welcome());
-        addAction(new ObjectView());
-        addAction(new CollectionView());
-        addAction(new FieldCollectionView());
-        addAction(new InvokeMethod());
-        addAction(new TaskStep());
-        addAction(new EditObject());
-        addAction(new Save());
-        addAction(new ServiceView());
-        addAction(new LogOut());
-        addAction(new RemoveItemFromCollection());
-        addAction(new AddItemToCollection());
-        addAction(new ChangeContext());
-
-        // TODO allow these to be exclude by configuration so they cannot be run
-        // in a real system
-        addAction(new DebugOn(this));
-        addAction(new DebugOff(this));
-
-        Logger.getLogger(this.getClass()).info("init");
-    }
-
-    public boolean isDebug() {
-        return isDebug;
-    }
-
-    private void listHistory(final Context context, final Block navigation) {
-        context.listHistory(context, navigation);
-    }
-
-    private void listServices(final Context context, final Block navigationBar) {
-        final Block taskBar = context.getComponentFactory().createBlock("services", null);
-        taskBar.add(context.getComponentFactory().createHeading("Services"));
-        final AdapterManager adapterManager = IsisContext.getPersistenceSession().getAdapterManager();
-        final List<Object> services = getUserProfile().getPerspective().getServices();
-        for (final Object service : services) {
-            final ObjectAdapter serviceAdapter = adapterManager.adapterFor(service);
-            if (serviceAdapter == null) {
-                LOG.warn("unable to find service Id: " + service + "; skipping");
-                continue;
-            }
-            if (isHidden(serviceAdapter)) {
-                continue;
-            }
-            final String serviceMapId = context.mapObject(serviceAdapter);
-            taskBar.add(createServiceComponent(context, serviceMapId, serviceAdapter));
-        }
-        navigationBar.add(taskBar);
-    }
-
-    private Component createServiceComponent(final Context context, final String serviceMapId, final ObjectAdapter serviceNO) {
-        final String serviceName = serviceNO.titleString();
-        final String serviceIcon = serviceNO.getIconName();
-        return context.getComponentFactory().createService(serviceMapId, serviceName, serviceIcon);
-    }
-
-    private boolean isHidden(final ObjectAdapter serviceNO) {
-        final ObjectSpecification serviceNoSpec = serviceNO.getSpecification();
-        final boolean isHidden = serviceNoSpec.isHidden();
-        return isHidden;
-    }
-
-    private void pageHeader(final Context context, final Page page) {
-        page.getPageHeader().add(context.getComponentFactory().createInlineBlock("none", "", null));
-    }
-
-    private void runAction(final Context context, final Request request, final Page page) {
-        try {
-            ACCESS_LOG.info("request " + request.toString());
-            Request r = request;
-            final DebugString debug = new DebugString();
-            debug.startSection("Request");
-            debug.appendln("http", request.toString());
-            debug.endSection();
-            do {
-                final Action action = (Action) actions.get(r.getRequestType());
-                try {
-                    action.execute(r, context, page);
-                } catch (final ObjectLookupException e) {
-                    final String error = "The object/service you selected has timed out.  Please navigate to the object via the history bar.";
-                    displayError(context, page, error);
-                } catch (final TaskLookupException e) {
-                    final String error = "The task you went back to has already been completed or cancelled.  Please start the task again.";
-                    displayError(context, page, error);
-                }
-                r = r.getForward();
-                if (r != null) {
-                    LOG.debug("forward to " + r);
-                }
-            } while (r != null);
-            if (LOG.isDebugEnabled()) {
-                context.debug(debug);
-                debug.appendln();
-                if (IsisContext.inSession()) {
-                    IsisContext.getSession(getExecutionContextId()).debugAll(debug);
-                } else {
-                    debug.appendln("No session");
-                }
-                LOG.debug(debug.toString());
-            }
-        } catch (final ActionException e) {
-            page.setTitle("Error");
-            page.getViewPane().setTitle("Error", "Action Exception");
-            LOG.error("ActionException, executing action " + request.getRequestType(), e);
-            page.getViewPane().add(context.getComponentFactory().createErrorMessage(e, isDebug));
-        } catch (final IsisApplicationException e) {
-            page.setTitle("Error");
-            page.getViewPane().setTitle("Error", "Application Exception");
-            LOG.error("ApplicationException, executing action " + request.getRequestType(), e);
-            page.getViewPane().add(context.getComponentFactory().createErrorMessage(e, isDebug));
-        } catch (final IsisException e) {
-            page.setTitle("Error");
-            page.getViewPane().setTitle("Error", "System Exception");
-            LOG.error("ObjectAdapterRuntimeException, executing action " + request.getRequestType(), e);
-            page.getViewPane().add(context.getComponentFactory().createErrorMessage(e, true));
-        } catch (final RuntimeException e) {
-            page.setTitle("Error");
-            page.getViewPane().setTitle("Error", "System Exception");
-            LOG.error("RuntimeException, executing action " + request.getRequestType(), e);
-            page.getViewPane().add(context.getComponentFactory().createErrorMessage(e, true));
-        }
-    }
-
-    private void displayError(final Context context, final Page page, final String errorMessage) {
-        page.setTitle("Error");
-        page.getViewPane().setTitle("Error", "");
-
-        final Block block1 = context.getComponentFactory().createBlock("error", "");
-        block1.add(context.getComponentFactory().createInlineBlock("", errorMessage, ""));
-        page.getViewPane().add(block1);
-
-        final Block block2 = context.getComponentFactory().createBlock("text", "");
-        block2.add(context.getComponentFactory().createInlineBlock("", ERROR_REASON, ""));
-        page.getViewPane().add(block2);
-    }
-
-    public void setDebug(final boolean on) {
-        this.isDebug = on;
-    }
-
-    protected String pathTo(final String prefix) {
-        return pathBuilder.pathTo(prefix);
-    }
-
-    // ///////////////////////////////////////////////////////
-    // Dependencies (from singleton)
-    // ///////////////////////////////////////////////////////
-
-    private UserProfile getUserProfile() {
-        return IsisContext.getUserProfile();
-    }
-
-    private String getExecutionContextId() {
-        return IsisContext.getSessionId();
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/AddItemToCollectionTask.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/AddItemToCollectionTask.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/AddItemToCollectionTask.java
deleted file mode 100644
index babb1f9..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/AddItemToCollectionTask.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- *  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.task;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacetUtils;
-import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.Persistor;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-
-public class AddItemToCollectionTask extends Task {
-    private final OneToManyAssociation field;
-
-    public AddItemToCollectionTask(final Context context, final ObjectAdapter target, final OneToManyAssociation fld) {
-        super(context, "Add to collection", "", target, 1);
-        names[0] = fld.getName();
-        descriptions[0] = fld.getDescription();
-        fieldSpecifications[0] = fld.getSpecification();
-        initialState[0] = null;
-        optional[0] = true;
-        // TODO add defaults and options
-        this.field = fld;
-    }
-
-    @Override
-    public void checkForValidity(final Context context) {
-        final ObjectAdapter target = getTarget(context);
-        final ObjectAdapter[] parameters = getEntries(context);
-
-        final Consent valueValid = field.isValidToAdd(target, parameters[0]);
-        errors[0] = valueValid.getReason();
-    }
-
-    @Override
-    public void checkInstances(final Context context, final ObjectAdapter[] objects) {
-        final ObjectAdapter collection = field.get(getTarget(context));
-        final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
-        final ObjectAdapter target = getTarget(context);
-        for (int i = 0; i < objects.length; i++) {
-            final Consent valueValid = field.isValidToAdd(target, objects[i]);
-            if (valueValid.isVetoed()) {
-                objects[i] = null;
-            } else if (facet.contains(collection, objects[i])) {
-                objects[i] = null;
-            }
-        }
-    }
-
-    @Override
-    public ObjectAdapter completeTask(final Context context, final Page page) {
-        final ObjectAdapter targetAdapter = getTarget(context);
-        final ObjectAdapter[] parameterAdapters = getEntries(context);
-        field.addElement(targetAdapter, parameterAdapters[0]);
-
-        if (targetAdapter.isTransient()) {
-            getPersistenceSession().makePersistent(targetAdapter);
-        }
-        return targetAdapter;
-    }
-
-    @Override
-    public boolean isEditing() {
-        return true;
-    }
-
-    // /////////////////////////////////////////////////////
-    // Dependencies (from context)
-    // /////////////////////////////////////////////////////
-
-    private static Persistor getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/EditTask.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/EditTask.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/EditTask.java
deleted file mode 100644
index 3a2649d..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/EditTask.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- *  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.task;
-
-import java.util.List;
-
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.util.AdapterUtils;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.facets.maxlen.MaxLengthFacet;
-import org.apache.isis.core.metamodel.facets.multiline.MultiLineFacet;
-import org.apache.isis.core.metamodel.facets.typicallen.TypicalLengthFacet;
-import org.apache.isis.core.metamodel.spec.ActionType;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters;
-import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-
-public class EditTask extends Task {
-
-    // REVIEW: should provide this rendering context, rather than hardcoding.
-    // the net effect currently is that class members annotated with 
-    // @Hidden(where=Where.ANYWHERE) or @Disabled(where=Where.ANYWHERE) will indeed
-    // be hidden/disabled, but will be visible/enabled (perhaps incorrectly) 
-    // for any other value for Where
-    private final static Where where = Where.ANYWHERE;
-
-    private static int size(final ObjectAdapter object) {
-        final List<ObjectAssociation> fields = object.getSpecification().getAssociations(ObjectAssociationFilters.dynamicallyVisible(getAuthenticationSession(), object, where));
-        return fields.size();
-    }
-
-    private static boolean skipField(final ObjectAdapter object, final ObjectAssociation fld) {
-        return fld.isOneToManyAssociation() || fld.isUsable(getAuthenticationSession(), object, where).isVetoed();
-    }
-
-    private final ObjectAssociation[] fields;
-    private final String newType;
-
-    public EditTask(final Context context, final ObjectAdapter adapter) {
-        super(context, "Edit", "", adapter, size(adapter));
-
-        final List<ObjectAssociation> allFields = adapter.getSpecification().getAssociations(ObjectAssociationFilters.dynamicallyVisible(getAuthenticationSession(), adapter, where));
-
-        fields = new ObjectAssociation[names.length];
-        for (int i = 0, j = 0; j < allFields.size(); j++) {
-            final ObjectAssociation fld = allFields.get(j);
-            fields[i] = fld;
-            names[i] = fld.getName();
-            descriptions[i] = fld.getDescription();
-
-            final Consent usableByUser = fld.isUsable(getAuthenticationSession(), adapter, where);
-            if (usableByUser.isVetoed()) {
-                descriptions[i] = usableByUser.getReason();
-            }
-
-            fieldSpecifications[i] = fld.getSpecification();
-            initialState[i] = fld.get(adapter);
-            if (skipField(adapter, fld)) {
-                readOnly[i] = true;
-            } else {
-                readOnly[i] = false;
-                optional[i] = !fld.isMandatory();
-                if (fieldSpecifications[i].isParseable()) {
-                    final MultiLineFacet multilineFacet = fld.getFacet(MultiLineFacet.class);
-                    noLines[i] = multilineFacet.numberOfLines();
-                    wraps[i] = !multilineFacet.preventWrapping();
-
-                    final MaxLengthFacet maxLengthFacet = fld.getFacet(MaxLengthFacet.class);
-                    maxLength[i] = maxLengthFacet.value();
-
-                    final TypicalLengthFacet typicalLengthFacet = fld.getFacet(TypicalLengthFacet.class);
-                    typicalLength[i] = typicalLengthFacet.value();
-                }
-            }
-            i++;
-        }
-
-        final boolean isTransient = adapter.isTransient();
-        newType = isTransient ? getTarget(context).getSpecification().getSingularName() : null;
-    }
-
-    @Override
-    protected ObjectAdapter[][] getOptions(final Context context, final int from, final int len) {
-        final ObjectAdapter target = getTarget(context);
-        final ObjectAdapter[][] options = new ObjectAdapter[len][];
-        for (int i = from, j = 0; j < len; i++, j++) {
-            if (skipField(target, fields[i])) {
-            } else {
-                options[j] = fields[i].getChoices(target);
-            }
-        }
-        return options;
-    }
-
-    @Override
-    public void checkForValidity(final Context context) {
-        final ObjectAdapter target = getTarget(context);
-        final ObjectAdapter[] entries = getEntries(context);
-
-        final int len = fields.length;
-        for (int i = 0; i < len; i++) {
-            if (readOnly[i] || errors[i] != null) {
-                continue;
-            }
-            final ObjectAssociation fld = fields[i];
-            if (fld.isOneToOneAssociation()) {
-                final OneToOneAssociation oneToOneAssociation = (OneToOneAssociation) fld;
-                final ObjectAdapter entryReference = entries[i];
-                final ObjectAdapter currentReference = oneToOneAssociation.get(target);
-                if (currentReference != entryReference) {
-                    final Consent valueValid = ((OneToOneAssociation) fld).isAssociationValid(target, entryReference);
-                    errors[i] = valueValid.getReason();
-                }
-            }
-        }
-
-        if (target.isTransient()) {
-            saveState(target, entries);
-            final Consent isValid = target.getSpecification().isValid(target);
-            error = isValid.isVetoed() ? isValid.getReason() : null;
-        }
-    }
-
-    @Override
-    public ObjectAdapter completeTask(final Context context, final Page page) {
-        final ObjectAdapter targetAdapter = getTarget(context);
-        final ObjectAdapter[] entryAdapters = getEntries(context);
-
-        if (targetAdapter.isTransient()) {
-            final ObjectAction action = targetAdapter.getSpecification().getObjectAction(ActionType.USER, "save", ObjectSpecification.EMPTY_LIST);
-            if (action == null) {
-                getPersistenceSession().makePersistent(targetAdapter);
-            } else {
-                action.execute(targetAdapter, new ObjectAdapter[0]);
-            }
-        } else {
-            saveState(targetAdapter, entryAdapters);
-        }
-
-        return targetAdapter;
-    }
-
-    private void saveState(final ObjectAdapter targetAdapter, final ObjectAdapter[] entryAdapters) {
-        getPersistenceSession().getTransactionManager().startTransaction();
-        for (int i = 0; i < fields.length; i++) {
-            final ObjectAssociation fld = fields[i];
-            final ObjectAdapter entryAdapter = entryAdapters[i];
-            final boolean isReadOnly = readOnly[i];
-
-            if (isReadOnly) {
-                continue;
-            }
-
-            if (fld.isOneToOneAssociation()) {
-                final OneToOneAssociation oneToOneAssociation = ((OneToOneAssociation) fld);
-                final Object entryPojo = AdapterUtils.unwrap(entryAdapter);
-                if (entryPojo == null) {
-                    if (oneToOneAssociation.get(targetAdapter) != null) {
-                        oneToOneAssociation.clearAssociation(targetAdapter);
-                    }
-                } else {
-                    final ObjectAdapter currentAdapter = oneToOneAssociation.get(targetAdapter);
-                    final Object currentPojo = AdapterUtils.unwrap(currentAdapter);
-                    if (currentAdapter == null || currentPojo == null || !currentPojo.equals(entryPojo)) {
-                        if (entryAdapter.isTransient()){ 
-                            getPersistenceSession().makePersistent(entryAdapter);
-                        }
-                        oneToOneAssociation.setAssociation(targetAdapter, entryAdapter);
-                    }
-                }
-            }
-        }
-        getPersistenceSession().getTransactionManager().endTransaction();
-    }
-
-    @Override
-    protected boolean simpleField(final ObjectSpecification type, final int i) {
-        return !fields[i].hasChoices() || super.simpleField(type, i);
-    }
-
-    @Override
-    public boolean isEditing() {
-        return true;
-    }
-
-    @Override
-    public String getName() {
-        if (newType == null) {
-            return super.getName();
-        }
-        return "New " + newType;
-    }
-
-    // /////////////////////////////////////////////////////
-    // Dependencies (from context)
-    // /////////////////////////////////////////////////////
-
-    private static PersistenceSession getPersistenceSession() {
-        return IsisContext.getPersistenceSession();
-    }
-
-    private static AuthenticationSession getAuthenticationSession() {
-        return IsisContext.getAuthenticationSession();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java
deleted file mode 100644
index 684b2ef..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/InvokeMethod.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- *  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.task;
-
-import java.util.List;
-
-import org.apache.isis.core.commons.exceptions.UnknownTypeException;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacet;
-import org.apache.isis.core.metamodel.facets.collections.modify.CollectionFacetUtils;
-import org.apache.isis.core.metamodel.spec.Persistability;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.transaction.MessageBroker;
-import org.apache.isis.viewer.html.action.Action;
-import org.apache.isis.viewer.html.action.ActionException;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.ForwardRequest;
-import org.apache.isis.viewer.html.request.Request;
-
-public final class InvokeMethod implements Action {
-
-    @Override
-    public void execute(final Request request, final Context context, final Page page) {
-        final String idString = request.getObjectId();
-        if (idString == null) {
-            throw new ActionException("Task no longer in progress");
-        }
-        final ObjectAdapter target = context.getMappedObject(idString);
-        final String id = request.getActionId();
-        final ObjectAction action = context.getMappedAction(id);
-        if (action == null) {
-            throw new ActionException("No such action: " + id);
-        }
-
-        boolean executeImmediately = false;
-        // TODO use new promptForParameters method instead of all this
-        final boolean isContributedMethod = action.isContributed();
-        if (action.getParameterCount() == 0) {
-            executeImmediately = true;
-        } else if (action.getParameterCount() == 1 && isContributedMethod && target.getSpecification().isOfType(action.getParameters().get(0).getSpecification())) {
-            executeImmediately = true;
-        }
-
-        if (executeImmediately) {
-            final ObjectAdapter[] parameters = isContributedMethod ? new ObjectAdapter[] { target } : null;
-            final ObjectAdapter result = action.execute(target, parameters);
-            final MessageBroker broker = IsisContext.getMessageBroker();
-            final List<String> messages = broker.getMessages();
-            final List<String> warnings = broker.getWarnings();
-            context.setMessagesAndWarnings(messages, warnings);
-            context.processChanges();
-            final String targetId = context.mapObject(target);
-            displayMethodResult(request, context, page, result, targetId);
-        } else {
-            final MethodTask methodTask = new MethodTask(context, target, action);
-            context.addTaskCrumb(methodTask);
-            request.forward(ForwardRequest.task(methodTask));
-        }
-    }
-
-    static void displayMethodResult(final Request request, final Context context, final Page page, final ObjectAdapter result, final String targetId) {
-        if (result == null) {
-            // TODO ask context for page to display - this will be the most
-            // recent object prior to the task
-            // null object - so just view service
-            request.forward(ForwardRequest.viewService(targetId));
-        } else {
-            if (result.getSpecification().isParentedOrFreeCollection()) {
-                final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(result);
-                if (facet.size(result) == 1) {
-                    forwardObjectResult(request, context, facet.firstElement(result));
-                } else {
-                    forwardCollectionResult(request, context, result);
-                }
-            } else if (result.getSpecification().isValueOrIsParented()) {
-                // TODO deal with this object properly, it might not be just a
-                // simple string
-                final List<String> messages = context.getMessages();
-                messages.add(0, "Action returned: " + result.titleString());
-                request.forward(ForwardRequest.viewObject(targetId));
-            } else if (result.getSpecification().isNotCollection()) {
-                forwardObjectResult(request, context, result);
-            } else {
-                throw new UnknownTypeException(result.getSpecification().getFullIdentifier());
-            }
-        }
-    }
-
-    static void forwardCollectionResult(final Request request, final Context context, final ObjectAdapter coll) {
-        final String collectionId = context.mapCollection(coll);
-        request.forward(ForwardRequest.listCollection(collectionId));
-    }
-
-    static void forwardObjectResult(final Request request, final Context context, final ObjectAdapter resultAdapter) {
-        final String objectId = context.mapObject(resultAdapter);
-        if (resultAdapter.isTransient() && resultAdapter.getSpecification().persistability() == Persistability.USER_PERSISTABLE) {
-            request.forward(ForwardRequest.editObject(objectId));
-        } else if (resultAdapter.getSpecification().isService()) {
-            request.forward(ForwardRequest.viewService(objectId));
-        } else {
-            request.forward(ForwardRequest.viewObject(objectId));
-        }
-    }
-
-    @Override
-    public String name() {
-        return "method";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java
deleted file mode 100644
index d0e1343..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- *  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.task;
-
-import java.util.List;
-
-import org.apache.isis.core.commons.debug.DebugBuilder;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.consent.Consent;
-import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
-import org.apache.isis.core.metamodel.spec.feature.ParseableEntryActionParameter;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.transaction.MessageBroker;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-
-public final class MethodTask extends Task {
-    private final ObjectAction action;
-
-    protected MethodTask(final Context context, final ObjectAdapter target, final ObjectAction action) {
-        super(context, action.getName(), action.getDescription(), target, action.getParameterCount());
-        this.action = action;
-
-        final List<ObjectActionParameter> parameters = action.getParameters();
-        final int len = parameters.size();
-
-        for (int i = 0; i < len; i++) {
-            names[i] = parameters.get(i).getName();
-            descriptions[i] = parameters.get(i).getDescription();
-            fieldSpecifications[i] = parameters.get(i).getSpecification();
-            optional[i] = parameters.get(i).isOptional();
-
-            if (parameters.get(i).getSpecification().isParseable()) {
-                final ParseableEntryActionParameter valueParameter = (ParseableEntryActionParameter) parameters.get(i);
-                noLines[i] = valueParameter.getNoLines();
-                wraps[i] = valueParameter.canWrap();
-                maxLength[i] = valueParameter.getMaximumLength();
-                typicalLength[i] = valueParameter.getTypicalLineLength();
-            }
-
-        }
-        
-        // String[] names = action.getParameterNames();
-        // String[] descriptions = action.getParameterDescriptions();
-        // ObjectSpecification[] types = action.getParameterTypes();
-        final ObjectAdapter[] defaultParameterValues = action.getDefaults(target);
-        // boolean[] optional = action.getOptionalParameters();
-        for (int i = 0; i < names.length; i++) {
-            // this.names[i] = names[i];
-            // this.descriptions[i] = descriptions[i];
-            // this.fieldSpecifications[i] = types[i];
-            // this.optional[i] = optional[i];
-
-        	if (defaultParameterValues[i] == null) {
-
-        		// TODO: review; this isn't sufficient, because could provide an invalid value for a reference type, I think?
-                if (action.isContributed() && parameters.get(i).isObject()) {
-                    initialState[i] = target;
-                } else {
-                    initialState[i] = null;
-                }
-            } else {
-                initialState[i] = defaultParameterValues[i];
-            }
-            /*
-             * noLines[i] = action.getParameterNoLines()[i]; wraps[i] =
-             * action.canParametersWrap()[i]; maxLength[i] =
-             * action.getParameterMaxLengths()[i]; typicalLength[i] =
-             * action.getParameterTypicalLengths()[i];
-             */
-        }
-
-    }
-
-    @Override
-    public void checkForValidity(final Context context) {
-        final ObjectAdapter[] parameters = getEntries(context);
-        final ObjectAdapter target = getTarget(context);
-        final Consent consent = action.isProposedArgumentSetValid(target, parameters);
-        error = consent.getReason();
-    }
-
-    @Override
-    public ObjectAdapter completeTask(final Context context, final Page page) {
-        final ObjectAdapter[] parameters = getEntries(context);
-        final ObjectAdapter target = getTarget(context);
-        final ObjectAdapter result = action.execute(target, parameters);
-        final MessageBroker broker = IsisContext.getMessageBroker();
-        final List<String> messages = broker.getMessages();
-        final List<String> warnings = broker.getWarnings();
-        context.setMessagesAndWarnings(messages, warnings);
-        return result;
-    }
-
-    @Override
-    public void debug(final DebugBuilder debug) {
-        debug.appendln("action: " + action);
-        super.debug(debug);
-    }
-
-    @Override
-    protected ObjectAdapter[][] getOptions(final Context context, final int from, final int len) {
-        final ObjectAdapter[][] allOptions = action.getChoices(getTarget(context));
-        final ObjectAdapter[][] options = new ObjectAdapter[len][];
-        for (int i = from, j = 0; j < len; i++, j++) {
-            options[j] = allOptions[i];
-        }
-        return options;
-    }
-
-    public boolean collectParameters() {
-        // TODO use new promptForParameters method instead of all this
-
-        final int expectedNoParameters = action.isContributed() ? 1 : 0;
-        return action.getParameterCount() == expectedNoParameters;
-    }
-}


[19/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/pom.xml
----------------------------------------------------------------------
diff --git a/component/security/sql/pom.xml b/component/security/sql/pom.xml
deleted file mode 100755
index 1463ac4..0000000
--- a/component/security/sql/pom.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>org.apache.isis.core</groupId>
-		<artifactId>isis</artifactId>
-        <version>1.1.1-SNAPSHOT</version>
-		<relativePath>../../../core/pom.xml</relativePath>
-	</parent>
-
-	<groupId>org.apache.isis.security</groupId>
-	<artifactId>isis-security-sql</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-
-	<name>Isis SQL Security</name>
-
-	<properties>
-        <siteBaseDir>.</siteBaseDir>
-		<relativeUrl/>
-	</properties>
-
-    <!-- used in Site generation for relative references. -->
-    <url>http://isis.apache.org/${relativeUrl}</url>
-
-	<build>
-		<pluginManagement>
-			<plugins>
-                <!-- Apache Release Audit Tool -->
-                <plugin>
-                    <groupId>org.apache.rat</groupId>
-                    <artifactId>apache-rat-plugin</artifactId>
-                    <version>0.8</version>
-	                <configuration>
-	                    <excludes>
-	                    	<!-- 
-	                    	overriding inherited excludes from oia.core:isis 
-	                    	with a more specific set for this component
-	                    	 -->
-	                        <exclude>**/target/**</exclude>
-	                        <exclude>**/target-ide/**</exclude>
-
-	                        <exclude>**/*.project</exclude>
-	                        <exclude>**/.classpath</exclude>
-	                        <exclude>**/.settings/**</exclude>
-	                    </excludes>
-                    </configuration>
-	            </plugin>
-			</plugins>
-		</pluginManagement>
-	</build>
-
-    <reporting>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-project-info-reports-plugin</artifactId>
-				<version>${maven-project-info-reports-plugin}</version>
-                <inherited>false</inherited>
-                <configuration>
-                	<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
-                </configuration>
-                <reportSets>
-                    <reportSet>
-                        <inherited>false</inherited>
-                        <reports>
-                            <report>dependencies</report>
-                            <report>dependency-convergence</report>
-                            <report>plugins</report>
-                            <report>summary</report>
-                        </reports>
-                    </reportSet>
-                </reportSets>
-            </plugin>
-        </plugins>
-    </reporting>
-
-    <dependencyManagement>
-    	<!-- for benefit of application developers, using scope=import -->
-    	<dependencies>
-			<dependency>
-			    <groupId>org.apache.isis.security</groupId>
-			    <artifactId>isis-security-sql</artifactId>
-				<version>1.0.0-SNAPSHOT</version>
-			</dependency>
-    	</dependencies>
-    </dependencyManagement>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.hsqldb</groupId>
-			<artifactId>hsqldb</artifactId>
-			<scope>test</scope>
-		</dependency>
-		
-		<dependency>
-		    <groupId>org.apache.isis.core</groupId>
-		    <artifactId>isis-core-runtime</artifactId>
-		</dependency>
-		<dependency>
-		    <groupId>org.apache.isis.core</groupId>
-		    <artifactId>isis-core-runtime</artifactId>
-		    <type>test-jar</type>
-		    <scope>test</scope>
-		</dependency>
-	</dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/src/main/appended-resources/supplemental-models.xml
----------------------------------------------------------------------
diff --git a/component/security/sql/src/main/appended-resources/supplemental-models.xml b/component/security/sql/src/main/appended-resources/supplemental-models.xml
deleted file mode 100644
index ecd3906..0000000
--- a/component/security/sql/src/main/appended-resources/supplemental-models.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 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. -->
-<supplementalDataModels xmlns="http://maven.apache.org/supplemental-model/1.0.0"
-                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                        xsi:schemaLocation="http://maven.apache.org/supplemental-model/1.0.0 http://maven.apache.org/xsd/supplemental-model-1.0.0.xsd">
-
-  <supplement>
-    <project>
-      <groupId>aopalliance</groupId>
-      <artifactId>aopalliance</artifactId>
-      <version>1.0</version>
-      <licenses>
-          <license>
-              <name>Public Domain</name>
-          </license>
-      </licenses>
-    </project>
-  </supplement>
-
-  <supplement>
-   	<!-- not quite sure why licenses:download-license flags this, since license info seems to be in its POM -->
-    <project>
-		<groupId>org.datanucleus</groupId>
-	    <artifactId>datanucleus-jodatime</artifactId>
-	    <version>3.1.1</version>
-          <licenses>
-			<license>
-	            <name>The Apache Software License, Version 2.0</name>
-	            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-	        </license>
-	    </licenses>
-    </project>
-  </supplement>
-
-  <supplement>
-    <project>
-      <groupId>org.scannotation</groupId>
-      <artifactId>scannotation</artifactId>
-      <version>1.0.3</version>
-      <licenses>
-        <license>
-            <name>The Apache Software License, Version 2.0</name>
-            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-            <distribution>repo</distribution>          
-        </license>
-      </licenses>
-    </project>
-  </supplement>
-    
-  <supplement>
-    <project>
-      <groupId>dom4j</groupId>
-      <artifactId>dom4j</artifactId>
-      <version>1.6.1</version>
-      <licenses>
-        <license>
-            <name>BSD License</name>
-            <url>http://dom4j.sourceforge.net/dom4j-1.6.1/license.html</url>
-            <distribution>repo</distribution>          
-        </license>
-      </licenses>
-    </project>
-  </supplement>
-
-  <supplement>
-    <project>
-      <groupId>net.jcip</groupId>
-      <artifactId>jcip-annotations</artifactId>
-      <version>1.0</version>
-      <licenses>
-        <license>
-            <name>Creative Commons Attribution 2.5 License</name>
-            <url>http://creativecommons.org/licenses/by/2.5/</url>
-            <distribution>repo</distribution>          
-        </license>
-      </licenses>
-    </project>
-  </supplement>
-  
-
-  <supplement>
-    <project>
-      <groupId>xalan</groupId>
-      <artifactId>xalan</artifactId>
-      <version>2.7.0</version>
-      <licenses>
-        <license>
-            <name>The Apache Software License, Version 2.0</name>
-            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-            <distribution>repo</distribution>          
-        </license>
-      </licenses>
-    </project>
-  </supplement>
-
- 
-</supplementalDataModels>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationConstants.java
----------------------------------------------------------------------
diff --git a/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationConstants.java b/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationConstants.java
deleted file mode 100755
index 24c7298..0000000
--- a/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationConstants.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- *  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.sql.authentication;
-
-public class SqlAuthenticationConstants {
-
-    private SqlAuthenticationConstants() {
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationManagerInstaller.java
----------------------------------------------------------------------
diff --git a/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationManagerInstaller.java b/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationManagerInstaller.java
deleted file mode 100755
index 9dc53e2..0000000
--- a/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticationManagerInstaller.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *  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.sql.authentication;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
-
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.ApplicationException;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.runtime.authentication.AuthenticationManagerStandardInstallerAbstractForDfltRuntime;
-import org.apache.isis.core.runtime.authentication.standard.Authenticator;
-
-public class SqlAuthenticationManagerInstaller extends AuthenticationManagerStandardInstallerAbstractForDfltRuntime {
-
-    public static final String NAME = "sql";
-
-    public SqlAuthenticationManagerInstaller() {
-        super(NAME);
-    }
-
-    @Override
-    protected List<Authenticator> createAuthenticators(final IsisConfiguration configuration) {
-        return Lists.<Authenticator> newArrayList(createAuthenticator(configuration));
-    }
-
-    protected Authenticator createAuthenticator(final IsisConfiguration configuration) {
-        final String className = configuration.getString("isis.authentication.authenticator");
-        if (className == null) {
-            return new SqlAuthenticator(configuration);
-        }
-        try {
-            final Class<?> authenticatorClass = Class.forName(className);
-            return (Authenticator) authenticatorClass.getConstructor(IsisConfiguration.class).newInstance(configuration);
-        } catch (final ClassNotFoundException e) {
-            throw new ApplicationException("Unable to find authenticator class", e);
-        } catch (final IllegalArgumentException e) {
-            throw new ApplicationException("IllegalArgumentException creating authenticator class", e);
-        } catch (final SecurityException e) {
-            throw new ApplicationException("SecurityException creating authenticator class", e);
-        } catch (final InstantiationException e) {
-            throw new ApplicationException("InstantiationException creating authenticator class", e);
-        } catch (final IllegalAccessException e) {
-            throw new ApplicationException("IllegalAccessException creating authenticator class", e);
-        } catch (final InvocationTargetException e) {
-            throw new ApplicationException("InvocationTargetException creating authenticator class", e);
-        } catch (final NoSuchMethodException e) {
-            throw new ApplicationException("NoSuchMethodException creating authenticator class", e);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticator.java
----------------------------------------------------------------------
diff --git a/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticator.java b/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticator.java
deleted file mode 100755
index 63df436..0000000
--- a/component/security/sql/src/main/java/org/apache/isis/security/sql/authentication/SqlAuthenticator.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- *  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.sql.authentication;
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.StringTokenizer;
-
-import com.google.common.base.Strings;
-import com.google.inject.Inject;
-
-import org.apache.log4j.Logger;
-
-import org.apache.isis.applib.ApplicationException;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.commons.ensure.Assert;
-import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
-import org.apache.isis.core.runtime.authentication.AuthenticationRequestPassword;
-import org.apache.isis.core.runtime.authentication.standard.PasswordRequestAuthenticatorAbstract;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-public class SqlAuthenticator extends PasswordRequestAuthenticatorAbstract {
-    private static final Logger LOG = Logger.getLogger(SqlAuthenticator.class);
-
-    static SqlAuthenticator instance;
-
-    public static SqlAuthenticator getInstance() {
-        return instance;
-    }
-
-    // Override this method if dbPasswords are encoded.
-    protected boolean verifyPasswordsAreEqual(final String loginPassword, final String dbPassword) {
-        return dbPassword.equals(loginPassword);
-    }
-
-    // Override this method
-    protected ResultSet postProcessLogin(final String user, final String password, final ResultSet results) {
-        return results;
-    }
-
-    // override this method
-    protected String getRoles(final ResultSet results, final String roles) {
-        try {
-            if (userRoleField != null) {
-                final String dbRoles = results.getString(userRoleField);
-                return roles + "|" + dbRoles;
-            }
-        } catch (final SQLException e) {
-            LOG.warn("Error fetching role", e);
-        }
-        return roles;
-    }
-
-    // Override this method, if you want to create data.
-    public void initialise() {
-    }
-
-    static final String PROPERTY_BASE = "isis.authentication.sql";
-    static final String USER_TABLE = PROPERTY_BASE + ".userTable";
-    static final String USER_TABLE_NAME_FIELD = PROPERTY_BASE + ".userNameField";
-    static final String USER_TABLE_PASSWORD_FIELD = PROPERTY_BASE + ".passwordField";
-    static final String USER_TABLE_ROLE_FIELD = PROPERTY_BASE + ".roleField";
-
-    private Connection connection;
-
-    final String passwordField;
-    final String userTable;
-    final String userNameField;
-    final String userRoleField;
-
-    public static String getPropertyBase() {
-        return PROPERTY_BASE;
-    }
-
-    public static String getPropertyUserTable() {
-        return USER_TABLE;
-    }
-
-    public static String getPropertyUserTableNameField() {
-        return USER_TABLE_NAME_FIELD;
-    }
-
-    public static String getPropertyUserTablePasswordField() {
-        return USER_TABLE_PASSWORD_FIELD;
-    }
-
-    public static String getPropertyUserTableRoleField() {
-        return USER_TABLE_ROLE_FIELD;
-    }
-
-    @Inject
-    public SqlAuthenticator(final IsisConfiguration configuration) {
-        super(configuration);
-
-        userTable = configuration.getString(USER_TABLE);
-        userNameField = configuration.getString(USER_TABLE_NAME_FIELD);
-        passwordField = configuration.getString(USER_TABLE_PASSWORD_FIELD);
-        userRoleField = configuration.getString(USER_TABLE_ROLE_FIELD);
-
-        instance = this;
-    }
-
-    @Override
-    public void init() {
-        if (connection != null) {
-            LOG.info("close");
-        }
-
-        final String BASE = PROPERTY_BASE + ".jdbc.";
-        final IsisConfiguration params = IsisContext.getConfiguration().getProperties(BASE);
-
-        try {
-            final String driver = params.getString(BASE + "driver");
-            final String url = params.getString(BASE + "connection");
-            final String user = params.getString(BASE + "user");
-            final String password = params.getString(BASE + "password");
-
-            if (connection != null) {
-                throw new ApplicationException("Connection already established");
-            }
-
-            if (driver == null) {
-                throw new ApplicationException("No driver specified for database connection");
-            }
-            if (url == null) {
-                throw new ApplicationException("No connection URL specified to database");
-            }
-            if (user == null) {
-                throw new ApplicationException("No user specified for database connection");
-            }
-            if (password == null) {
-                throw new ApplicationException("No password specified for database connection");
-            }
-
-            Class.forName(driver);
-            LOG.info("Connecting to " + url + " as " + user);
-            connection = DriverManager.getConnection(url, user, password);
-            if (connection == null) {
-                throw new ApplicationException("No connection established to " + url);
-            }
-        } catch (final SQLException e) {
-            throw new ApplicationException("Failed to start", e);
-        } catch (final ClassNotFoundException e) {
-            throw new ApplicationException("Could not find database driver", e);
-        }
-
-    }
-
-    @Override
-    public void shutdown() {
-        String sql;
-        sql = "SHUTDOWN";
-        update(sql);
-        closeConnection();
-    }
-
-    private void closeConnection() {
-        try {
-            connection.close();
-            connection = null;
-        } catch (final SQLException e) {
-            LOG.warn("Failed to close connection:" + e);
-        }
-    }
-
-    @Override
-    public final boolean isValid(final AuthenticationRequest request) {
-        final AuthenticationRequestPassword passwordRequest = (AuthenticationRequestPassword) request;
-        final String username = passwordRequest.getName();
-        if (Strings.isNullOrEmpty(username)) {
-            return false;
-        }
-        final String password = passwordRequest.getPassword();
-        Assert.assertNotNull(password);
-
-        return isPasswordValidForUser(passwordRequest, username, password);
-
-    }
-
-    private boolean isPasswordValidForUser(final AuthenticationRequest request, final String user, final String password) {
-        final ResultSet results = loadUserDetails(user, password);
-        if (results != null) {
-            final String roles = getRoles(results, "org.apache.isis.viewer.wicket.roles.USER|org.starobjects.wicket.roles.USER");
-            setRoles(request, roles);
-
-            return true;
-        }
-        return false;
-    }
-
-    protected ResultSet loadUserDetails(final String user, final String password) {
-        final String sql = "SELECT * FROM " + userTable + " WHERE UPPER(" + userNameField + ") = ?";
-        addToQueryValues(user.toUpperCase());
-        final ResultSet results = select(sql);
-        try {
-            while (results.next()) {
-                final String dbPassword = results.getString(passwordField);
-                if (verifyPasswordsAreEqual(password, dbPassword)) {
-                    return postProcessLogin(user, password, results);
-                }
-            }
-        } catch (final SQLException e) {
-            LOG.error("Error loading user details: " + sql);
-            throw new ApplicationException("Error loading user details", e);
-        }
-
-        return null;
-    }
-
-    private final void setRoles(final AuthenticationRequest request, final String line) {
-        final StringTokenizer tokens = new StringTokenizer(line, "|", false);
-        final String[] roles = new String[tokens.countTokens()];
-        for (int i = 0; tokens.hasMoreTokens(); i++) {
-            roles[i] = tokens.nextToken();
-        }
-        request.setRoles(Arrays.asList(roles));
-    }
-
-    public boolean isSetup() {
-        return hasTable(userTable);
-    }
-
-    // {{ JDBC Connection SQL helpers
-    protected int update(final String sql) {
-        LOG.debug("SQL: " + sql);
-        PreparedStatement statement;
-        try {
-            statement = connection.prepareStatement(sql);
-            addPreparedValues(statement);
-            final int updateCount = statement.executeUpdate();
-            statement.close();
-            return updateCount;
-        } catch (final SQLException e) {
-            LOG.error("failed to execute " + sql, e);
-            throw new ApplicationException("Error executing update", e);
-        } finally {
-            clearPreparedValues();
-        }
-
-    }
-
-    private ResultSet select(final String sql) {
-        LOG.debug("SQL: " + sql);
-        PreparedStatement statement;
-        try {
-            statement = connection.prepareStatement(sql);
-            addPreparedValues(statement);
-            return (statement.executeQuery());
-        } catch (final SQLException e) {
-            LOG.error("failed to execte select: " + sql, e);
-            throw new ApplicationException("Error executing select", e);
-        } finally {
-            clearPreparedValues();
-        }
-    }
-
-    private final List<Object> queryValues = new ArrayList<Object>();
-
-    public String addToQueryValues(final Object o) {
-        queryValues.add(o);
-        return "?";
-    }
-
-    private void clearPreparedValues() {
-        queryValues.clear();
-    }
-
-    private void addPreparedValues(final PreparedStatement statement) throws SQLException {
-        if (queryValues.size() > 0) {
-            int i = 1;
-            try {
-                for (final Object value : queryValues) {
-                    statement.setObject(i, value);
-                    i++;
-                }
-            } catch (final SQLException e) {
-                LOG.error("Error adding prepared value " + i + " of type " + queryValues.get(i - 1).getClass().getSimpleName(), e);
-                throw e;
-            }
-        }
-    }
-
-    private boolean hasTable(final String tableName) {
-        try {
-            final ResultSet set = connection.getMetaData().getTables(null, null, tableName, null);
-            if (set.next()) {
-                LOG.debug("Found " + set.getString("TABLE_NAME"));
-                set.close();
-                return true;
-            } else {
-                set.close();
-                return false;
-            }
-        } catch (final SQLException e) {
-            LOG.error("failed to find table: " + tableName, e);
-            throw new ApplicationException("Error checking for table: " + tableName, e);
-        }
-    }
-
-    // }}
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizationManagerInstaller.java
----------------------------------------------------------------------
diff --git a/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizationManagerInstaller.java b/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizationManagerInstaller.java
deleted file mode 100755
index 16e78fc..0000000
--- a/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizationManagerInstaller.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  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.sql.authorization;
-
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.runtime.authorization.standard.AuthorizationManagerStandardInstallerAbstract;
-import org.apache.isis.core.runtime.authorization.standard.Authorizor;
-
-public class SqlAuthorizationManagerInstaller extends AuthorizationManagerStandardInstallerAbstract {
-
-    public static final String NAME = "sql";
-
-    public SqlAuthorizationManagerInstaller() {
-        super(NAME);
-    }
-
-    @Override
-    protected Authorizor createAuthorizor(final IsisConfiguration configuration) {
-        return new SqlAuthorizor(configuration);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java
----------------------------------------------------------------------
diff --git a/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java b/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java
deleted file mode 100755
index de12010..0000000
--- a/component/security/sql/src/main/java/org/apache/isis/security/sql/authorization/SqlAuthorizor.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *  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.sql.authorization;
-
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.runtime.authorization.standard.AuthorizorAbstract;
-
-public class SqlAuthorizor extends AuthorizorAbstract {
-    // TODO: Need to implement this class.
-
-    // private static final Logger LOG = Logger.getLogger(SqlAuthorizor.class);
-
-    public SqlAuthorizor(final IsisConfiguration configuration) {
-        super(configuration);
-
-    }
-
-    // //////////////////////////////////////////////////////////////
-    // init, shutdown
-    // //////////////////////////////////////////////////////////////
-
-    @Override
-    public void init() {
-        // does nothing
-    }
-
-    @Override
-    public void shutdown() {
-        // does nothing
-    }
-
-    // //////////////////////////////////////////////////////////////
-    // API
-    // //////////////////////////////////////////////////////////////
-
-    @Override
-    public boolean isUsableInRole(final String role, final Identifier identifier) {
-        return true;
-    }
-
-    @Override
-    public boolean isVisibleInRole(final String user, final Identifier identifier) {
-        return true;
-    }
-
-    @Override
-    public boolean isVisibleInAnyRole(Identifier identifier) {
-        return true;
-    }
-
-    @Override
-    public boolean isUsableInAnyRole(Identifier identifier) {
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/src/site.xml
----------------------------------------------------------------------
diff --git a/component/security/sql/src/site.xml b/component/security/sql/src/site.xml
deleted file mode 100755
index 66aa164..0000000
--- a/component/security/sql/src/site.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project>
-
-	<body>
-		<breadcrumbs>
-			<item name="SQL" href="index.html"/>
-		</breadcrumbs>
-
-		<menu name="SQL Security">
-			<item name="About" href="index.html" />
-            <item name="Jottings" href="jottings.html" />
-		</menu>
-
-        <menu name="Security Modules">
-            <item name="Default (No-op)" href="../dflt/index.html" />
-            <item name="File" href="../file/index.html" />
-            <item name="LDAP" href="../ldap/index.html" />
-            <item name="SQL" href="../sql/index.html" />
-        </menu>
-
-        <menu name="Maven Reports" ref="reports" />
-	</body>
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/src/site/apt/index.apt
----------------------------------------------------------------------
diff --git a/component/security/sql/src/site/apt/index.apt b/component/security/sql/src/site/apt/index.apt
deleted file mode 100755
index 8451f4c..0000000
--- a/component/security/sql/src/site/apt/index.apt
+++ /dev/null
@@ -1,124 +0,0 @@
-~~  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.
-
-
-
-Security SQL Implementation
- 
- The <SQL security> module is a simple implementation of Isis' authentication and
- authorization APIs, that uses flat SQL tables to store user/passwords/roles (for authentication)
- and role-based permissions (for authorization).
- 
- No additional helpers are provided to maintain the SQL tables used, so you will have
- to find your own table viewers/editors to maintain them.
-
- At the moment, authorisation learning has not been implemented.
- 
- The SqlAuthenticator classes use jdbc to access the database tables, with no reliance on the 
- Isis SqlObjectStore.
- 
- 
-Alternatives
-
-  Alternatives include:
-  
-  * the {{{../dflt/index.html}default}} (no-op) security implementation, for prototyping use only
-
-  * the {{{../file/index.html}file}} security
-
-  * the {{{../ldap/index.html}LDAP}} security
-  
- See the security 
- {{{../docbkx/html/guide/isis-security.html}HTML}} or 
- {{{../docbkx/pdf/isis-security.pdf}PDF}} documentation for more details on these others.
-
-Setup
- 
- The SQL Authenticator is relatively easy to setup - just add the following to isis.properties:
- Change the connection, userTable, etc, definitions, to reflect that of your configuration.
- 
-+--
- isis.authentication=sql
- isis.authentication.sql.jdbc.driver=org.hsqldb.jdbcDriver
-
- # Connection string: e.g.
- isis.authentication.sql.jdbc.connection=jdbc:hsqldb:file:hsql-db/authentication
-
- # Connection authentication
- isis.authentication.sql.jdbc.user=sa
- isis.authentication.sql.jdbc.password=
-
- isis.authentication.sql.userTable=RealNameOfUserTable 
- isis.authentication.sql.userNameField=RealFieldThatContainsUsernames
- isis.authentication.sql.passwordField=RealFieldThatContainsPassword 
-
- # The following property is optional, for specifying roles:
- # Roles are of the forms ROLE1|ROLE2|ROLE3
- isis.authentication.sql.roleField=RealFieldThatContainsRoles
- 
-  # Optional: If you wish to override the default SqlAuthenticator, you can specify 
-  # your own, by providing the fully qualified class name of your class that extends
-  # PasswordRequestAuthenticatorAbstract:
-  isis.authentication.authenticator=domain.package.MyCustomSqlAuthenticator
-+--
-
-  * Operation
-  
-  The default SqlAuthenticator loads the record set from <<isis.authentication.sql.userTable>> with
-  values where <<isis.authentication.sql.userNameField>> matches the login form's username (converted to
-  upper-case, so the match is case-<<in>>sensitive). 
-  
-  A simple case-sensitive string comparison is performed to match the login form's password with the value
-  in <<isis.authentication.sql.passwordField>>.
-  
-  If a match is found, the user roles are loaded from the field 
-  <<isis.authentication.sql.roleField>>, if specified.      
-  
-Custom Authenticator
-  
-  If you want to replace or extend the current behaviour, you need to 
-  extend <<org.apache.isis.security.sql.authentication.SqlAuthenticator>> and optionally override 
-  whichever of the following methods you need to:
-  
-+--
-  boolean verifyPasswordsAreEqual(String userPassword, String dbPassword)
-  ResultSet postProcessLogin(String user, String password, ResultSet results)
-  String getRoles(final ResultSet results, final String roles)
-+--  
-
-  * <<verifyPasswordsAreEqual>>
-  
-  Lets you override the default password comparison check, which is a simple <loginPassword.equals(dbPassword)> check.
-  
-  Use this if your database passwords are encrypted.
-  
-  This method is called before postProcessLogin, which is only called if this method returns true.
-
-  * <<postProcessLogin>>
-  
-  Lets you perform additional processing to see if the found RecordSet (which has already been verified to match the
-  provided username and password, should be allowed to login.
-  
-  Simply return the results RecordSet, if so, else return null.
-  
-  * <<getRoles>>
-  
-  Lets you add additional roles to the default. Simply return your custom roles appended to the provided roles String.
-  Separate roles with a "|", e.g. <return roles+"|ROLE1|ROLE2">.    
-
-  []
- 

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/src/site/apt/jottings.apt
----------------------------------------------------------------------
diff --git a/component/security/sql/src/site/apt/jottings.apt b/component/security/sql/src/site/apt/jottings.apt
deleted file mode 100755
index c5d1200..0000000
--- a/component/security/sql/src/site/apt/jottings.apt
+++ /dev/null
@@ -1,24 +0,0 @@
-~~  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.
-
-
-
-Jottings
- 
-  This page is to capture any random jottings relating to this module prior 
-  to being moved into formal documentation. 
- 

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/src/site/site.xml
----------------------------------------------------------------------
diff --git a/component/security/sql/src/site/site.xml b/component/security/sql/src/site/site.xml
deleted file mode 100755
index 66aa164..0000000
--- a/component/security/sql/src/site/site.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project>
-
-	<body>
-		<breadcrumbs>
-			<item name="SQL" href="index.html"/>
-		</breadcrumbs>
-
-		<menu name="SQL Security">
-			<item name="About" href="index.html" />
-            <item name="Jottings" href="jottings.html" />
-		</menu>
-
-        <menu name="Security Modules">
-            <item name="Default (No-op)" href="../dflt/index.html" />
-            <item name="File" href="../file/index.html" />
-            <item name="LDAP" href="../ldap/index.html" />
-            <item name="SQL" href="../sql/index.html" />
-        </menu>
-
-        <menu name="Maven Reports" ref="reports" />
-	</body>
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/security/sql/src/test/java/org/apache/isis/security/sql/authentication/SqlAuthenticatorTest.java
----------------------------------------------------------------------
diff --git a/component/security/sql/src/test/java/org/apache/isis/security/sql/authentication/SqlAuthenticatorTest.java b/component/security/sql/src/test/java/org/apache/isis/security/sql/authentication/SqlAuthenticatorTest.java
deleted file mode 100755
index df7de99..0000000
--- a/component/security/sql/src/test/java/org/apache/isis/security/sql/authentication/SqlAuthenticatorTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- *  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.sql.authentication;
-
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-import org.apache.isis.core.commons.config.IsisConfigurationDefault;
-import org.apache.isis.core.runtime.authentication.AuthenticationRequestPassword;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-public class SqlAuthenticatorTest {
-    IsisConfigurationDefault configuration;
-    SqlAuthenticator saipSqlAuthenticator;
-
-    private static final String PASSWORD_FIELD = "password";
-    private static final String USERNAME_FIELD = "email";
-    private static final String USERS = "USERS";
-
-    @Before
-    public void setUp() {
-        // Setup properties files
-        final Properties properties = new Properties();
-        properties.setProperty(SqlAuthenticator.USER_TABLE, USERS);
-        properties.setProperty(SqlAuthenticator.USER_TABLE_NAME_FIELD, USERNAME_FIELD);
-        properties.setProperty(SqlAuthenticator.USER_TABLE_PASSWORD_FIELD, PASSWORD_FIELD);
-
-        properties.put(SqlAuthenticator.PROPERTY_BASE + ".jdbc.driver", "org.hsqldb.jdbcDriver");
-        properties.put(SqlAuthenticator.PROPERTY_BASE + ".jdbc.connection", "jdbc:hsqldb:file:hsql-db/authenticator-tests");
-        properties.put(SqlAuthenticator.PROPERTY_BASE + ".jdbc.user", "sa");
-        properties.put(SqlAuthenticator.PROPERTY_BASE + ".jdbc.password", "");
-
-        configuration = new IsisConfigurationDefault();
-        configuration.add(properties);
-
-        // setup configuration
-        IsisContext.setConfiguration(configuration);
-
-        // Setup database
-        String sql;
-
-        saipSqlAuthenticator = new SqlAuthenticator(configuration);
-        saipSqlAuthenticator.init();
-
-        if (saipSqlAuthenticator.isSetup()) { // clear existing data
-            sql = "DROP TABLE " + USERS;
-            saipSqlAuthenticator.update(sql);
-        }
-
-        sql = "CREATE TABLE " + USERS + " (" + USERNAME_FIELD + " VARCHAR(32), " + PASSWORD_FIELD + " VARCHAR(32)) ";
-        saipSqlAuthenticator.update(sql);
-
-        // create data
-        sql = "INSERT INTO " + USERS + " VALUES ('user1','password1')";
-        saipSqlAuthenticator.update(sql);
-
-    }
-
-    @Test
-    public void VerifyThatIsValidReturnsTrue() {
-        final AuthenticationRequestPassword request = new AuthenticationRequestPassword("user1", "password1");
-        Assert.assertTrue(saipSqlAuthenticator.isValid(request));
-    }
-
-    @Test
-    public void VerifyThatIsValidReturnsTrueInMixedCase() {
-        final AuthenticationRequestPassword request = new AuthenticationRequestPassword("uSer1", "password1");
-        Assert.assertTrue(saipSqlAuthenticator.isValid(request));
-    }
-
-    @Test
-    public void VerifyThatIsValidReturnsFalseForNoPassword() {
-        final AuthenticationRequestPassword request = new AuthenticationRequestPassword("user1", "");
-        Assert.assertFalse(saipSqlAuthenticator.isValid(request));
-    }
-
-    @Test
-    public void VerifyThatIsValidReturnsFalseForWrongPassword() {
-        final AuthenticationRequestPassword request = new AuthenticationRequestPassword("user1", "password12");
-        Assert.assertFalse(saipSqlAuthenticator.isValid(request));
-    }
-
-    @Test
-    public void VerifyThatIsValidReturnsFalseForWrongUsername() {
-        final AuthenticationRequestPassword request = new AuthenticationRequestPassword("user", "password1");
-        Assert.assertFalse(saipSqlAuthenticator.isValid(request));
-    }
-
-    @After
-    public void tearDown() {
-        saipSqlAuthenticator.shutdown();
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/NOTICE
----------------------------------------------------------------------
diff --git a/component/viewer/html/NOTICE b/component/viewer/html/NOTICE
deleted file mode 100644
index ba21d0c..0000000
--- a/component/viewer/html/NOTICE
+++ /dev/null
@@ -1,7 +0,0 @@
-Apache Isis
-Copyright 2010-2013 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/pom.xml
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/pom.xml b/component/viewer/html/impl/pom.xml
deleted file mode 100644
index 4f029ef..0000000
--- a/component/viewer/html/impl/pom.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<parent>
-		<groupId>org.apache.isis.viewer</groupId>
-		<artifactId>isis-viewer-html</artifactId>
-		<version>1.0.0-SNAPSHOT</version>
-	</parent>
-
-	<artifactId>isis-viewer-html-impl</artifactId>
-
-	<name>Isis Html Viewer Implementation</name>
-
-	<properties>
-        <siteBaseDir>..</siteBaseDir>
-		<relativeUrl>html</relativeUrl>
-    </properties>
-
-    <reporting>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-project-info-reports-plugin</artifactId>
-				<version>${maven-project-info-reports-plugin}</version>
-                <inherited>false</inherited>
-                <configuration>
-                	<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
-                </configuration>
-                <reportSets>
-                    <reportSet>
-                        <inherited>false</inherited>
-                        <reports>
-                            <report>dependency-convergence</report>
-                            <report>dependencies</report>
-                            <report>plugins</report>
-                            <report>summary</report>
-                        </reports>
-                    </reportSet>
-                </reportSets>
-            </plugin>
-        </plugins>
-    </reporting>
-
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.isis.core</groupId>
-			<artifactId>isis-core-metamodel</artifactId>
-			<type>test-jar</type>
-            <scope>test</scope>
-		</dependency>
-
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-unittestsupport</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-		<dependency>
-			<groupId>org.apache.isis.core</groupId>
-			<artifactId>isis-core-runtime</artifactId>
-			<type>test-jar</type>
-            <scope>test</scope>
-		</dependency>
-
-        <dependency>
-            <groupId>org.apache.isis.core</groupId>
-            <artifactId>isis-core-integtestsupport</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-		<dependency>
-			<groupId>org.apache.isis.core</groupId>
-			<artifactId>isis-core-runtime</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.isis.viewer</groupId>
-			<artifactId>isis-viewer-html-monitoring</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>commons-lang</groupId>
-			<artifactId>commons-lang</artifactId>
-		</dependency>
-		<dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_2.5_spec</artifactId>
-			<scope>provided</scope>
-		</dependency>
-	</dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/docbkx/guide/isis-html-viewer.xml
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/docbkx/guide/isis-html-viewer.xml b/component/viewer/html/impl/src/docbkx/guide/isis-html-viewer.xml
deleted file mode 100644
index ad4f63f..0000000
--- a/component/viewer/html/impl/src/docbkx/guide/isis-html-viewer.xml
+++ /dev/null
@@ -1,226 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"file:./src/docbkx/dtd-4.5/docbookx.dtd">
-<!--
-  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.
--->
-<book>
-  <bookinfo>
-    <title><?eval ${docbkxGuideTitle}?></title>
-
-    <subtitle><?eval ${docbkxGuideSubTitle}?></subtitle>
-
-    <releaseinfo><?eval ${project.version}?></releaseinfo>
-
-    <authorgroup>
-      <author>
-        <firstname>Robert</firstname>
-
-        <surname>Matthews</surname>
-      </author>
-    </authorgroup>
-
-    <legalnotice>
-      <para>Permission is granted to make and distribute verbatim copies of
-      this manual provided that the copyright notice and this permission
-      notice are preserved on all copies.</para>
-    </legalnotice>
-  </bookinfo>
-
-  <!-- front matter -->
-
-  <toc></toc>
-
-  <preface id="preface">
-    <title>Preface</title>
-
-    <para><emphasis>Apache Isis</emphasis> is designed to allow programmers
-    rapidly develop domain-driven applications following the <ulink
-    url="http://en.wikipedia.org/wiki/Naked_Objects">Naked Objects</ulink>
-    pattern. It is made up of a core framework plus a number of alternate
-    implementations, and supports various viewers and object stores. Apache
-    Isis is hosted at the <ulink url="http://incubator.apache.org/isis">Apache
-    Foundation</ulink>, and is licensed under <ulink
-    url="http://www.apache.org/licenses/LICENSE-2.0.html">Apache Software
-    License v2</ulink>.</para>
-
-    <para>This guide is written for programmers looking to customize,
-    configure and deploy <emphasis>Apache Isis</emphasis> applications using
-    the <emphasis>HTML viewer</emphasis> as the primary user interface.</para>
-  </preface>
-
-  <!-- main content -->
-
-  <chapter id="chp.Intro">
-    <title>Introduction</title>
-
-    <abstract>
-      <para>*** yada yada</para>
-    </abstract>
-
-    <sect1>
-      <title>***</title>
-
-      <para><emphasis>*** yada yada</emphasis></para>
-    </sect1>
-  </chapter>
-
-  <chapter>
-    <title>***</title>
-
-    <abstract>
-      <para>*** yada yada</para>
-    </abstract>
-
-    <sect1>
-      <title>***</title>
-
-      <para><emphasis>*** yada yada</emphasis></para>
-
-      <sect2>
-        <title>Properties</title>
-
-        <para>The html viewer has only two properties</para>
-
-        <programlisting format="linespecific">isis.viewer.html.debug=true</programlisting>
-
-        <para>Which enables debugging on the web controller.</para>
-
-        <programlisting format="linespecific">isis.viewer.html.encoding=UTF-8</programlisting>
-
-        <para>Which enables the character set encoding used by the
-        HTTPServletRequest. This is ISO-8859-1 by default.</para>
-
-        <para></para>
-
-        <para></para>
-      </sect2>
-
-      <sect2>
-        <title>Reading HTML viewer specific properties</title>
-
-        <para></para>
-
-        <para></para>
-
-        <programlisting>&lt;web.xml&gt;
-    ...
-    &lt;context-param&gt;
-        &lt;param-name&gt;isis.viewers&lt;/param-name&gt;
-        &lt;param-value&gt;html&lt;/param-value&gt;
-    &lt;/context-param&gt;
-    ...
-&lt;/web.xml&gt;</programlisting>
-
-        <para>This will cause the viewer_html.properties file to be read if it
-        is present.</para>
-
-        <para></para>
-
-        <para></para>
-
-        <para>NB: the value for this parameter is actually comma-separated, to
-        allow for multiple viewers to be configured in the same webapp.</para>
-
-        <para></para>
-      </sect2>
-
-      <sect2>
-        <title>Hosting multiple viewers at the same time</title>
-
-        <para></para>
-
-        <para>*** combine the servlet, filter and listener entries.</para>
-
-        <para></para>
-
-        <para></para>
-
-        <para></para>
-
-        <para>By default the htmlviewer uses ".app" as the suffix for its .
-        this can be changed using the viewer-html.suffix init-param in
-        web.xml:</para>
-
-        <para></para>
-
-        <para>avoid name clashes.</para>
-
-        <para></para>
-
-        <para></para>
-
-        <para></para>
-
-        <programlisting>&lt;web.xml&gt;
-    ...
-    &lt;context-param&gt;
-        &lt;param-name&gt;viewer-html.suffix&lt;/param-name&gt;
-        &lt;param-value&gt;htmlviewer&lt;/param-value&gt;
-    &lt;/context-param&gt;
-    ...
-&lt;/web.xml&gt;</programlisting>
-
-        <para></para>
-
-        <para></para>
-
-        <para></para>
-      </sect2>
-
-      <sect2>
-        <title>Debugging</title>
-
-        <para>To turn on debuging use the debugon command, e.g.,</para>
-
-        <programlisting>http://localhost:8080/debugon.app</programlisting>
-
-        <para>A control bar appears a the bottom of the page allowing you to
-        display the object graph, specification, connection details and so on.
-        To turn it off use the debugoff command:</para>
-
-        <programlisting>http://localhost:8080/debugoff.app</programlisting>
-
-        <para>The debug pages can be displayed directly by providing the
-        commands: debug; spec and dump - along with a object id if necessary.
-        For example to view the details about the specification for object 28
-        use:</para>
-
-        <programlisting>http://localhost:8080/spec.app?id=28</programlisting>
-
-        <para></para>
-
-        <para></para>
-      </sect2>
-    </sect1>
-  </chapter>
-
-  <appendix>
-    <title>***</title>
-
-    <abstract>
-      <para>*** yada yada</para>
-    </abstract>
-
-    <sect1 id="sec.module-ui">
-      <title>***</title>
-
-      <para>*** yada yada</para>
-    </sect1>
-  </appendix>
-</book>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerConstants.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerConstants.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerConstants.java
deleted file mode 100644
index d59ea24..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerConstants.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  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 org.apache.isis.core.commons.config.ConfigurationConstants;
-
-public final class HtmlViewerConstants {
-
-    public static final String PROPERTY_BASE = ConfigurationConstants.ROOT + "viewer.html.";
-    public static final String STYLE_SHEET = PROPERTY_BASE + "style-sheet";
-    public static final String HEADER_FILE = PROPERTY_BASE + "header-file";
-    /**
-     * Used if {@link #HEADER_FILE} is not specified or does not refer to a
-     * valid resource.
-     */
-    public static final String HEADER = PROPERTY_BASE + "header";
-    public static final String FOOTER_FILE = PROPERTY_BASE + "footer-file";
-    /**
-     * Used if {@link #FOOTER_FILE} is not specified or does not refer to a
-     * valid resource.
-     */
-    public static final String FOOTER = PROPERTY_BASE + "footer";
-
-    public static final String VIEWER_HTML_RESOURCE_BASE_KEY = PROPERTY_BASE + "resourceBase";
-
-    private HtmlViewerConstants() {
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java
deleted file mode 100644
index 1d8729e..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/HtmlViewerInstaller.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- *  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 org.apache.isis.core.commons.lang.MapUtils;
-import org.apache.isis.core.runtime.Isis;
-import org.apache.isis.core.runtime.installerregistry.installerapi.IsisViewerInstallerAbstract;
-import org.apache.isis.core.runtime.viewer.IsisViewer;
-import org.apache.isis.core.runtime.viewer.web.WebAppSpecification;
-import org.apache.isis.core.runtime.web.EmbeddedWebViewer;
-import org.apache.isis.core.webapp.IsisSessionFilter;
-import org.apache.isis.core.webapp.content.ResourceCachingFilter;
-import org.apache.isis.core.webapp.content.ResourceServlet;
-import org.apache.isis.viewer.html.servlet.ControllerServlet;
-import org.apache.isis.viewer.html.servlet.HtmlServletConstants;
-import org.apache.isis.viewer.html.servlet.LogonServlet;
-
-/**
- * Convenience implementation of a {@link IsisViewer} providing the ability to
- * run a Jetty web server configured for the HTML viewer from the {@link Isis
- * command line}.
- * 
- * <p>
- * To run, use the <tt>--viewer html</tt> flag.
- * 
- * <p>
- * In a production deployment the configuration represented by the
- * {@link WebAppSpecification} would be specified in the <tt>web.xml<tt> file.
- */
-public class HtmlViewerInstaller extends IsisViewerInstallerAbstract {
-
-    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" };
-    private static final String DYNAMIC_CONTENT = "*.app";
-
-    public HtmlViewerInstaller() {
-        super("html");
-    }
-
-    @Override
-    public IsisViewer doCreateViewer() {
-        return new EmbeddedWebViewer() {
-            @Override
-            public WebAppSpecification getWebAppSpecification() {
-
-                final WebAppSpecification webAppSpec = new WebAppSpecification();
-
-                webAppSpec.addContextParams("isis.viewers", "html");
-
-                webAppSpec.addFilterSpecification(IsisSessionFilter.class, MapUtils.asMap(IsisSessionFilter.RESTRICTED_KEY, LOGON_PAGE_MAPPED), DYNAMIC_CONTENT);
-                webAppSpec.addServletSpecification(LogonServlet.class, LOGON_PAGE_MAPPED);
-                webAppSpec.addServletSpecification(ControllerServlet.class, DYNAMIC_CONTENT);
-
-                webAppSpec.addFilterSpecification(ResourceCachingFilter.class, MapUtils.asMap("CacheTime", "86400"), STATIC_CONTENT);
-                webAppSpec.addServletSpecification(ResourceServlet.class, STATIC_CONTENT);
-
-                final String resourceBaseDir = getConfiguration().getString(HtmlViewerConstants.VIEWER_HTML_RESOURCE_BASE_KEY);
-                if (resourceBaseDir != null) {
-                    webAppSpec.addResourcePath(resourceBaseDir);
-                }
-                webAppSpec.addResourcePath("./src/main/resources");
-                webAppSpec.addResourcePath("./src/main/webapp");
-                webAppSpec.addResourcePath("./web");
-                webAppSpec.addResourcePath(".");
-
-                webAppSpec.setLogHint("open a web browser and browse to logon.app to connect");
-
-                return webAppSpec;
-            }
-        };
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilder.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilder.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilder.java
deleted file mode 100644
index 37ea6db..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilder.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *  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 java.io.Serializable;
-
-public interface PathBuilder extends Serializable {
-
-    public String getSuffix();
-
-    public String pathTo(final String prefix);
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java
deleted file mode 100644
index 962507c..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/PathBuilderDefault.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  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 static final long serialVersionUID = 1L;
-    
-    private final String 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 PathBuilderDefault(final ServletContext servletContext) {
-        this(getSuffixInitParam(servletContext));
-    }
-
-    public PathBuilderDefault(final String suffix) {
-        this.suffix = suffix;
-    }
-
-    @Override
-    public String getSuffix() {
-        return suffix;
-    }
-
-    @Override
-    public String pathTo(final String prefix) {
-        final StringBuilder buf = new StringBuilder(prefix);
-        if (!prefix.endsWith(".")) {
-            buf.append(".");
-        }
-        buf.append(suffix);
-        return buf.toString();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Action.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Action.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Action.java
deleted file mode 100644
index fab30ba..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Action.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *  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.action;
-
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public interface Action {
-
-    void execute(Request request, Context context, Page page);
-
-    String name();
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ActionException.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ActionException.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ActionException.java
deleted file mode 100644
index 723392e..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ActionException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *  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.action;
-
-import org.apache.isis.core.commons.exceptions.IsisException;
-
-public class ActionException extends IsisException {
-    private static final long serialVersionUID = 1L;
-
-    public ActionException() {
-        super();
-    }
-
-    public ActionException(final String msg, final Throwable cause) {
-        super(msg, cause);
-    }
-
-    public ActionException(final String msg) {
-        super(msg);
-    }
-
-    public ActionException(final Throwable cause) {
-        super(cause);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ChangeContext.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ChangeContext.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ChangeContext.java
deleted file mode 100644
index a72df6b..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/ChangeContext.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  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.action;
-
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public class ChangeContext implements Action {
-
-    @Override
-    public void execute(final Request request, final Context context, final Page page) {
-        final int id = Integer.valueOf(request.getObjectId()).intValue();
-        request.forward(context.changeContext(id));
-    }
-
-    @Override
-    public String name() {
-        return "context";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/LogOut.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/LogOut.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/LogOut.java
deleted file mode 100644
index 4cea18c..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/LogOut.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  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.action;
-
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.runtime.authentication.AuthenticationManager;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public class LogOut implements Action {
-    @Override
-    public void execute(final Request request, final Context context, final Page page) {
-        final AuthenticationSession authSession = IsisContext.getAuthenticationSession();
-        if (authSession != null) {
-            getAuthenticationManager().closeSession(authSession);
-        }
-        context.invalidate();
-    }
-
-    private static AuthenticationManager getAuthenticationManager() {
-        return IsisContext.getAuthenticationManager();
-    }
-
-    @Override
-    public String name() {
-        return "logout";
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Welcome.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Welcome.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Welcome.java
deleted file mode 100644
index 7d67c92..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/Welcome.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *  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.action;
-
-import org.apache.isis.core.runtime.about.AboutIsis;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.component.ViewPane;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.Request;
-
-public class Welcome implements Action {
-    public static final String COMMAND = "start";
-
-    @Override
-    public void execute(final Request request, final Context context, final Page page) {
-        page.setTitle("Isis Application");
-
-        context.init();
-
-        final ViewPane content = page.getViewPane();
-        content.setTitle("Welcome", null);
-
-        String name = AboutIsis.getApplicationName();
-        if (name == null) {
-            name = AboutIsis.getFrameworkName();
-        }
-        content.add(context.getComponentFactory().createInlineBlock("message", "Welcome to " + name + ", accessed via the HTML Viewer", null));
-    }
-
-    @Override
-    public String name() {
-        return COMMAND;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/AddItemToCollection.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/AddItemToCollection.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/AddItemToCollection.java
deleted file mode 100644
index 647d12b..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/AddItemToCollection.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *  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.action.edit;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
-import org.apache.isis.viewer.html.action.Action;
-import org.apache.isis.viewer.html.action.ActionException;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.ForwardRequest;
-import org.apache.isis.viewer.html.request.Request;
-import org.apache.isis.viewer.html.task.AddItemToCollectionTask;
-
-public class AddItemToCollection implements Action {
-
-    @Override
-    public void execute(final Request request, final Context context, final Page page) {
-        final String collectionField = request.getProperty();
-
-        final String idString = request.getObjectId();
-        if (idString == null) {
-            throw new ActionException("Task no longer in progress");
-        }
-        final ObjectAdapter object = context.getMappedObject(idString);
-        final ObjectSpecification specification = object.getSpecification();
-        final OneToManyAssociation field = (OneToManyAssociation) specification.getAssociation(collectionField);
-        final AddItemToCollectionTask addTask = new AddItemToCollectionTask(context, object, field);
-        context.addTaskCrumb(addTask);
-        request.forward(ForwardRequest.task(addTask));
-    }
-
-    @Override
-    public String name() {
-        return "add";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/EditObject.java
----------------------------------------------------------------------
diff --git a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/EditObject.java b/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/EditObject.java
deleted file mode 100644
index eb575db..0000000
--- a/component/viewer/html/impl/src/main/java/org/apache/isis/viewer/html/action/edit/EditObject.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *  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.action.edit;
-
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.viewer.html.action.Action;
-import org.apache.isis.viewer.html.action.ActionException;
-import org.apache.isis.viewer.html.component.Page;
-import org.apache.isis.viewer.html.context.Context;
-import org.apache.isis.viewer.html.request.ForwardRequest;
-import org.apache.isis.viewer.html.request.Request;
-import org.apache.isis.viewer.html.task.EditTask;
-
-public class EditObject implements Action {
-
-    @Override
-    public void execute(final Request request, final Context context, final Page page) {
-        final String idString = request.getObjectId();
-        if (idString == null) {
-            throw new ActionException("Task no longer in progress");
-        }
-        final ObjectAdapter object = context.getMappedObject(idString);
-        if (!(object.isTransient())) {
-            context.setObjectCrumb(object);
-        }
-        final EditTask editTask = new EditTask(context, object);
-        context.addTaskCrumb(editTask);
-        request.forward(ForwardRequest.task(editTask));
-    }
-
-    @Override
-    public String name() {
-        return Request.EDIT_COMMAND;
-    }
-}


[02/20] ISIS-381: mothballing HTML viewer, SQL security, LDAP security

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/web.xml b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..43154f5
--- /dev/null
+++ b/mothballed/component/viewer/html/tck/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<web-app id="WebApp_ID" version="2.4"
+    xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+    <display-name>Apache Isis HTML Viewer</display-name>
+
+    <listener>
+        <listener-class>org.apache.isis.core.webapp.IsisWebAppBootstrapper</listener-class>
+    </listener>
+
+    <context-param>
+        <param-name>isis.viewers</param-name>
+        <param-value>html</param-value>
+    </context-param>
+
+	<filter>
+		<filter-name>IsisSessionFilter</filter-name>
+		<filter-class>org.apache.isis.core.webapp.IsisSessionFilter</filter-class>
+		<init-param>
+			<param-name>logonPage</param-name>
+			<param-value>/logon.app</param-value>
+		</init-param>
+	</filter>
+
+	<filter>
+		<filter-name>ResourceCachingFilter</filter-name>
+		<filter-class>org.apache.isis.core.webapp.content.ResourceCachingFilter</filter-class>
+		<init-param>
+			<param-name>CacheTime</param-name>
+			<param-value>86400</param-value>
+		</init-param>
+	</filter>
+
+	<filter-mapping>
+		<filter-name>ResourceCachingFilter</filter-name>
+		<url-pattern>*.css</url-pattern>
+	</filter-mapping>
+	<filter-mapping>
+		<filter-name>ResourceCachingFilter</filter-name>
+		<url-pattern>*.png</url-pattern>
+	</filter-mapping>
+	<filter-mapping>
+		<filter-name>ResourceCachingFilter</filter-name>
+		<url-pattern>*.jpg</url-pattern>
+	</filter-mapping>
+	<filter-mapping>
+		<filter-name>ResourceCachingFilter</filter-name>
+		<url-pattern>*.gif</url-pattern>
+	</filter-mapping>
+    
+    <filter-mapping>
+    	<filter-name>IsisSessionFilter</filter-name>
+    	<url-pattern>*.app</url-pattern>
+    </filter-mapping>
+    
+    <servlet>
+        <servlet-name>Logon</servlet-name>
+        <servlet-class>org.apache.isis.viewer.html.servlet.LogonServlet</servlet-class>
+    </servlet>
+
+    <servlet>
+        <servlet-name>Controller</servlet-name>
+        <servlet-class>org.apache.isis.viewer.html.servlet.ControllerServlet</servlet-class>
+    </servlet>
+
+    <servlet>
+        <servlet-name>Resource</servlet-name>
+        <servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
+    </servlet>
+
+    <servlet>
+        <servlet-name>Forward</servlet-name>
+        <servlet-class>org.apache.isis.core.webapp.routing.ForwardingServlet</servlet-class>
+        <init-param>
+            <param-name>forwardTo</param-name>
+            <param-value>logon.app</param-value>
+        </init-param>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>Logon</servlet-name>
+        <url-pattern>/logon.app</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>Controller</servlet-name>
+        <url-pattern>*.app</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+		<url-pattern>*.css</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+		<url-pattern>*.png</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+		<url-pattern>*.jpg</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+		<url-pattern>*.gif</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Forward</servlet-name>
+        <url-pattern>/</url-pattern>
+    </servlet-mapping>
+	
+</web-app>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/tck/src/main/webapp/default.css
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/tck/src/main/webapp/default.css b/mothballed/component/viewer/html/tck/src/main/webapp/default.css
new file mode 100644
index 0000000..04efa7d
--- /dev/null
+++ b/mothballed/component/viewer/html/tck/src/main/webapp/default.css
@@ -0,0 +1,933 @@
+/*
+ *  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.
+ */
+/* Start Global styles */
+
+body {
+  background: #101254;
+  text-align: center;
+}
+#wrapper {
+  width: 980px;
+  min-height: 800px;
+  border:3px solid #7F81C0;
+  margin:8px auto;
+  text-align: left;
+  background: white;
+}
+
+.header-icon > img {
+	max-width: 40px;
+	height: 40px;
+}
+	
+BODY {
+	font-family: Arial, Sans-Serif;
+	margin: 0 0 10px 0;
+	color: black;
+
+/*
+	background: url(default-images/poweredby-logo.png);
+	background-repeat: no-repeat;
+	background-position: 95% 95%;
+*/
+}
+
+IMG {
+	border: 0;
+}
+
+A {
+	text-decoration: none;
+}
+
+A:hover {
+	text-decoration: underline;
+}
+
+/* End Global styles */ /* Start Heading */ 
+
+div#site-header:after {
+	bottom: 0px;
+	display: block;
+	text-align: right;
+	float:right;
+	bottom: 0;
+	font-size: 70%;
+	color: gray;
+}
+
+div#site-header {
+	background: url(images/banner-bg.png); 
+	background-repeat: repeat-x white-space :   nowrap;
+	list-style: none;
+	margin: 0px;
+	height: 100px;
+}
+
+div#site-logo {
+	background: url(images/banner.png);
+	background-repeat: no-repeat;
+	background-position: left;
+	position: absolute;
+	width: 980px;
+	height: 100px;
+	margin: 0 auto;
+}
+
+div#page-header {
+	display: none;
+}
+
+/* END Heading */
+DIV#body {
+	display: block;
+	padding-bottom: 10px;
+}
+
+div#navigation {
+	margin: 0;
+	padding: 0px;
+}
+
+/* Start options*/
+DIV.options {
+	background-color: #eeeeee;
+	margin: 0;
+	padding: 4px 0px 4px 5px;
+	min-height: 20px;
+	align: right;
+	float:right;
+}
+
+
+DIV.options H4 {
+	display: none;
+}
+
+DIV.options DIV.item {
+	display: inline;
+	border-right: 1px solid #000000;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #00000;
+	font-size: 70%;
+	margin: 0 6px 0 6px;
+	padding 0 0 0 0;
+	min-width: 200px;
+}
+
+DIV.options DIV.item IMG {
+	display: none;
+}
+
+DIV.options DIV.item a:link {
+	color: #000000;
+	text-decoration: none;
+	margin: 0 5px 0 0px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.options DIV.item a:hover {
+	background-color: #dddddd;
+	margin: 0 5px 0 0px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.options DIV.item a:visited {
+	color: #000000;
+	text-decoration: none;
+	margin: 0 5px 0 0px;
+	padding: 0 2px 0 0px;
+}
+
+/* End options */ 
+
+/* Start services */
+DIV.services {
+	background-color: #7F81C0;
+	margin: 0;
+	padding: 4px 20px 4px 5px;
+	min-height: 20px;
+
+}
+
+DIV.services H4 {
+	display: none;
+}
+
+DIV.services DIV.item {
+	display: inline;
+	border-right: 1px solid #ffffff;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #ffffff;
+	font-size: 70%;
+	margin: 3px;
+}
+
+DIV.services DIV.item IMG {
+	display: none;
+}
+
+DIV.services DIV.item a:link {
+	color: #ffffff;
+	text-decoration: none;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item a:hover {
+	background-color: #2683E2;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item a:visited {
+	color: #ffffff;
+	text-decoration: none;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item-selected {
+	background-color: #2683E2;
+	display: inline;
+	border-right: 1px solid #ffffff;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #ffffff;
+	font-size: 70%;
+}
+
+DIV.services DIV.item-selected a:link {
+	color: #ffffff;
+	text-decoration: none;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item-selected a:hover {
+	background-color: #556677;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+DIV.services DIV.item-selected a:visited {
+	color: #ffffff;
+	text-decoration: none;
+	margin: 0 5px 0 5px;
+	padding: 0 2px 0 0px;
+}
+
+/* End services */ /* Start History */
+DIV.history {
+	background-color: #D6D6D6;
+	margin: 0;
+	padding: 1px 30px 0 5px;
+	min-height: 26px;
+}
+
+DIV.history H4 {
+	display: none;
+}
+
+DIV.history DIV.item {
+	display: inline;
+	border-right: 1px solid #ffffff;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #29357D;
+	font-size: 70%;
+}
+
+DIV.history DIV.item IMG {
+	position: relative;
+	top: 4px;
+	height: 16px;
+	padding: 0 5px 0 0px;
+}
+
+DIV.history DIV.item a:link {
+	color: #29357D;
+	text-decoration: none;
+	margin: 5px;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item a:hover {
+	background-color: #B7B6B6;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item a:visited {
+	color: #29357D;
+	text-decoration: none;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item-selected {
+	background-color: #2683E2;
+	display: inline;
+	border-right: 1px solid #ffffff;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: #29357D;
+	font-size: 70%;
+	height: 30px;
+}
+
+DIV.history DIV.item-selected a:hover {
+	background-color: #556677;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item-selected a:link {
+	color: #29357D;
+	text-decoration: none;
+	margin: 10px;
+	padding: 1px 3px 1px 3px;
+}
+
+DIV.history DIV.item-selected a:visited {
+	color: #29357D;
+	text-decoration: none;
+	padding: 1px 3px 1px 3px;
+}
+
+/* INVISIBLE character for empty item. FIREFOX ONLY*/
+DIV.history:after {
+	content: "X";
+	display: inline;
+	text-align: right;
+	font-size: 70%;
+	color: #D6D6D6;
+}
+
+/* End History */ /* Start Context */
+div#context {
+	background-color: #F0F0F0;
+	margin: 0;
+	padding: 1px 30px 0 7px;
+	min-height: 26px;
+}
+
+div#context span.disabled {
+	display: inline;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #666666;
+	font-size: 70%;
+	padding: 0px 5px 0px 7px;
+	white-space: nowrap;
+}
+
+div#context span.disabled IMG {
+	display: none
+}
+
+div#context span.disabled a:link {
+	color: #29357D;
+	text-decoration: none;
+	margin: 5px;
+	padding: 1px 3px 1px 3px;
+}
+
+div#context span.disabled a:hover {
+	background-color: #B7B6B6;
+	padding: 1px 3px 1px 3px;
+}
+
+div#context span.disabled a:visited {
+	color: #29357D;
+	text-decoration: none;
+	padding: 1px 3px 1px 3px;
+}
+
+div#context a.linked {
+	display: inline;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #29357D;
+	font-size: 70%;
+	padding: 0px 5px 0px 7px;
+}
+
+div#context a.linked IMG {
+	display: none
+}
+
+div#context a.linked a:link {
+	color: #29357D;
+	text-decoration: none;
+	margin: 5px;
+	padding: 1px 3px 1px 3px;
+}
+
+div#context a.linked  a:hover {
+	background-color: #29357D;
+	padding: 1px 3px 1px 3px;
+	text-decoration: underline;
+}
+
+div#context a.linked  a:visited {
+	color: #29357D;
+	text-decoration: none;
+	padding: 1px 3px 1px 3px;
+}
+
+/* INVISIBLE character for empty breadcrumbs. FIREFOX ONLY*/
+span.disabled:after {
+	content: "X";
+	display: inline;
+	text-align: right;
+	font-size: 70%;
+	color: #F0F0F0;
+}
+
+/* End Context */ /*
+div#help-bar {
+	position: relative;
+	right: 50px;
+	top: 10px;
+	text-align: right; 
+	font-family : arial, 'sans serif'; 
+	font-weight : normal;  
+	color: #0000FF; 
+	font-size : 90%; 
+	line-height : 110%;
+	text-decoration: underline;
+	height: 22px;
+}
+*/
+DIV#body DIV#view {
+	position: relative;
+	top: 0px;
+	left: 0px;
+	margin: 0px;
+}
+
+/* Start of Message Header */
+DIV.message-header {
+	position: relative;
+	top: 10px;
+	padding: 5px 25px 5px 25px;
+	margin: 0 50px 0 255px;
+	vertical-align: middle;
+	COLOR: #003366;
+	FONT-WEIGHT: bold;
+	FONT-SIZE: 80%;
+	LEFT: auto;
+	FONT-STYLE: normal;
+	FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
+	width: 40%;
+}
+
+DIV.message-header DIV.warning {
+	COLOR: #ff0033;
+	padding: 5px 25px 5px 25px;
+	background: url(default-images/sign-warning.png);
+	background-repeat: no-repeat;
+	background-color: #D6D6D6;
+	background-position: 5px 5px;
+}
+
+DIV.message-header DIV.message {
+	COLOR: #003366;
+	padding: 5px 25px 5px 25px;
+	background: url(default-images/sign-info.png);
+	background-repeat: no-repeat;
+	background-color: #D6D6D6;
+	background-position: 5px 5px;
+}
+
+DIV.message-header DIV.message {
+	FONT-WEIGHT: normal;
+}
+
+/* End of Message Header */ /* Start of Object Header */
+DIV.header {
+	position: relative;
+	top: 40px;
+	display: block;
+	background-color: #F0F0F0;
+	min-height: 48px;
+	margin: 0 50px 0 280px;
+
+}
+
+SPAN.header-icon IMG {
+	float: left;
+}
+
+SPAN.header-text {
+	float: left;
+	position: relative;
+	top: 10px;
+	margin-left: 7px;
+	FONT-WEIGHT: bold;
+	FONT-SIZE: 16px;
+	LEFT: auto;
+	COLOR: #003366;
+	FONT-STYLE: normal;
+	FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
+}
+
+/* End of Object Header */ /* Start of Object Contents */
+DIV#content {
+	position: relative;
+	display: block;
+	top: 40px;
+	margin: 0 50px 10px 280px;
+}
+
+/* Start of Object Fields */
+DIV.field {
+	margin: 0;
+	padding: 5px 0px 5px 0px;
+	border-top: 1px solid #666666;
+	min-height: 20px;
+}
+
+DIV.field SPAN.value IMG,DIV.field DIV.value IMG {
+	position: relative;
+	top: 3px;
+	margin: 0px 5px 0 0;
+	height: 16px;
+}
+
+DIV.field SPAN.value A,DIV.field DIV.value A {
+	position: relative;
+	top: -2px;
+	margin: 0px 5px 0 0;
+	height: 16px;
+}
+
+DIV.field DIV.icon IMG {
+	position: relative;
+	top: 0px;
+	margin: 0px 5px 0 0;
+	height: 16px;
+}
+
+.label,.value {
+	font-size: 80%;
+	color: #333399;
+}
+
+DIV.field DIV.icon {
+	display: inline;
+	color: #333399;
+	position: absolute;
+	left: 200px;
+}
+
+DIV.field span.label,DIV.field DIV.label {
+	width: 170px;
+	display: block;
+	/*content: ":";*/
+	margin: 0 0 -18px 7px;
+}
+
+DIV.field span.separator {
+	display: inline;
+	position: relative;
+	margin: 0 0 -15px 180px;
+	vertical-align: top;
+}
+
+DIV.field span.value, DIV.field DIV.value, DIV.field INPUT.value, DIV.field SELECT.value
+	{
+	top: -2px;
+	position: relative;
+	margin: 0px 10px -5px 0px;
+	display: inline;
+}
+
+DIV.field span.value PRE {
+	color: #333399;
+	margin: 0;
+	font-family: inherit;
+}
+
+
+DIV.field textarea.value {
+	font-family: inherit;
+}
+
+
+DIV.field span.optional {
+	margin: -35px 0 0 0;
+	font-size: 70%;
+	color: grey;
+}
+
+DIV.field span.required {
+	display: inline;
+	position: relative;
+	margin: 0;
+	vertical-align: top;
+	color: red;
+}
+
+DIV.field span.error {
+	display: inline;
+	position: relative;
+	color: red;
+	font-size: 70%;
+}
+
+/* INVISIBLE character for empty value FIREFOX ONLY*/
+DIV.field span.value:after {
+	content: "X";
+	display: inline;
+	text-align: right;
+	font-size: 70%;
+	color: white;
+}
+
+/* INVISIBLE character for empty value FIREFOX ONLY*/
+DIV.field span.label:after {
+	content: "X";
+	display: inline;
+	text-align: right;
+	font-size: 70%;
+	color: white;
+}
+
+/* End of Object Fields */ /* Start of Object Table */
+DIV#content TABLE {
+	position: relative;
+	float: left;
+	width: 100%;
+	border: 0;
+	margin: 0 0 10px 0;
+	border-collapse: collapse;
+}
+
+DIV#content TH {
+	padding: 6px;
+	border: 1px solid #ffffff;
+	background-color: #D6D6D6;
+	font-family: arial, 'sans serif';
+	font-weight: bold;
+	color: black;
+	font-size: 70%;
+}
+
+DIV#content TD {
+	background-color: #ffffff;
+	border-right: 0;
+	border-left: 0;
+	border-bottom: 1px solid black;
+	padding: 6px;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	font-size: 80%;
+	color: #333399;
+	margin: 0;
+	text-align: left;
+}
+
+DIV#content TD.rowstart {
+	background-color: #F0F0F0;
+}
+
+DIV#content TD A:visited {
+	color: #0000FF;
+}
+
+DIV#content H4 {
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #000000;
+	font-size: 70%;
+	border-top: 1px solid black;
+	margin: -2px 0 0 0px;
+	padding: 5px;
+}
+
+TD DIV.icon {
+	font-size: 100%;
+	margin-top: 5px;
+}
+
+TD DIV.icon IMG {
+	float: left;
+	margin: -1px 5px 5px 0px;
+	height: 16px;
+}
+
+TD DIV.action-button {
+	background-color: #ffffff;
+	font-size: 130%;
+	text-decoration: none;
+}
+
+/* End of Object Table */
+INPUT.action-button,DIV.action-button {
+	background-color: #F0F0F0;
+	padding: 10px;
+	display: block;
+	margin: 0;
+	min-height: 20px;
+}
+
+INPUT.action-button,DIV.action-button A {
+	background: url(default-images/bg-button.gif);
+	background-repeat: repeat-x;
+	padding: 2px;
+	margin: 5px;
+	border: 1px solid #333399;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #000000;
+	font-size: 70%;
+	font-weight: normal;
+	text-align: center;
+}
+
+DIV.action-button a:link {
+	color: #000000;
+}
+
+DIV.action-button a:visited {
+	color: #000000;
+}
+
+DIV.action-button a:hover {
+	color: #000000;
+	text-decoration: none;
+}
+
+INPUT.action-button,DIV.action-button INPUT {
+	float: left;
+}
+
+/* End of Object Contents */ /* Start of Object Actions Menu */
+DIV#body DIV#view DIV#menu {
+	position: relative;
+	top: 40px;
+	left: 0;
+	background-color: #ffffff;
+	border-top: 1px solid #00336F;
+	margin: 0px;
+	width: 210px;
+	display: block;
+	float: left;
+}
+
+DIV#body DIV#menu H3 {
+	display: none;
+}
+
+DIV#menu SPAN.name {
+	display: block;
+	font-size: 80%;
+	background-color: #ffffff;
+	color: #333399;
+	line-height: 100%;
+	margin: 0 0 0 10px;
+}
+
+DIV.menu-item  a:link {
+	color: #333399;
+}
+
+DIV.menu-item  a:visited {
+	color: #333399;
+}
+
+DIV.submenu-item {
+	font-size: 80%;
+	background-color: #ffffff;
+	color: #1A59A7;
+	margin: 0px;
+	padding: 5px 0px 5px 10px;
+	border-bottom: 1px solid #00336F;
+	line-height: 100%;
+}
+
+DIV.submenu-item DIV.menu-item {
+	background: url(default-images/submenu-bullet.gif);
+	background-repeat: no-repeat;
+	background-position: left;
+	background-color: #ffffff;
+	margin: 0px;
+	line-height: 100%;
+	border: 0;
+	padding: 4px 5px 0px 10px;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #1A59A7;
+	font-size: 85%;
+}
+
+DIV.menu-item {
+	background-color: #ffffff;
+	margin: 0px;
+	line-height: 110%;
+	border-bottom: 1px solid #00336F;
+	padding: 5px 5px 5px 10px;
+	font-family: arial, 'sans serif';
+	font-weight: normal;
+	color: #1A59A7;
+	font-size: 80%;
+}
+
+DIV.menu-item DIV.disabled {
+	color: #a0a0a0;
+}
+
+DIV.menu-item a:link {
+	color: #1A59A7;
+}
+
+DIV.menu-item a:visited {
+	color: #1A59A7;
+}
+
+DIV.menu-item a:hover {
+	color: #006666;
+	text-decoration: underline;
+}
+
+DIV.submenu-item DIV.menu-item a:link {
+	color: #1A59A7;
+}
+
+DIV.submenu-item DIV.menu-item a:visited {
+	color: #1A59A7;
+}
+
+DIV.submenu-item DIV.menu-item a:hover {
+	color: #006666;
+	text-decoration: underline;
+}
+
+/* End of Object Menu */
+DIV.page-footer {
+	position: absolute;
+	right: 10px;
+	bottom: 10px;
+	font-size: 50%;
+	color: #333399;
+}
+
+H1 {
+	font-size: 140%;
+	margin-top: -8px;
+}
+
+H2 {
+	font-size: 90%;
+	color: #333399;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 0;
+}
+
+H3 {
+	font-size: 80%;
+	color: #ffffff;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 15px 10px 5px 10px;
+}
+
+H4 {
+	font-size: 80%;
+	color: #333399;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 10px 10px 0px 10px;
+}
+
+DIV.text {
+	font-size: 100%;
+	color: #336699;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 10px 10px 0px 10px;
+}
+
+DIV.error {
+	font-size: 120%;
+	color: #cc0000;
+	letter-spacing: 1pt;
+	text-indent:-1pt;
+	margin: 10px 10px 0px 10px;
+}
+
+PRE.error-trace {
+	font-size: 80%;
+	color: #cc0000;
+	margin: 10px 10px 0px 10px;
+}
+
+DIV#debug { /*	float: left;*/
+	background-color: #F0F0F0;
+	margin: 30px;
+	padding: 1px 10px 0 7px;
+	min-height: 22px;
+	border: 1px;
+}
+
+DIV#debug H4 {
+	display: inline;
+	font-size: 80%;
+	color: #999;
+	margin: 0 5px 0 10px;
+}
+
+DIV#debug DIV.detail {
+	display: inline;
+	font-size: 80%;
+	color: #999;
+	margin: 0 5px 0 10px;
+}
+
+DIV#page-footer {
+	display: none;
+}
+
+SPAN.message {
+	position: relative;
+	top: 30px;
+	font-size: 100%;
+	color: #336699;
+	margin: 40px 0 0 0;
+	padding: 10px;
+}
+/* Think this is now redundant
+DIV.items {
+	position: relative;
+} 
+*/
+
+
+SPAN.about {
+	display: block;
+	padding: 4px;
+}
+
+
+SPAN.user {
+	display: block;
+	padding: 4px;
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/tck/src/main/webapp/images/banner-bg.png
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/tck/src/main/webapp/images/banner-bg.png b/mothballed/component/viewer/html/tck/src/main/webapp/images/banner-bg.png
new file mode 100644
index 0000000..c731c15
Binary files /dev/null and b/mothballed/component/viewer/html/tck/src/main/webapp/images/banner-bg.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/component/viewer/html/tck/src/main/webapp/images/banner.png
----------------------------------------------------------------------
diff --git a/mothballed/component/viewer/html/tck/src/main/webapp/images/banner.png b/mothballed/component/viewer/html/tck/src/main/webapp/images/banner.png
new file mode 100644
index 0000000..adf2159
Binary files /dev/null and b/mothballed/component/viewer/html/tck/src/main/webapp/images/banner.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/dom/log4j.properties
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/dom/log4j.properties b/mothballed/example/application/quickstart_html_sql/dom/log4j.properties
new file mode 100644
index 0000000..281bfb6
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/dom/log4j.properties
@@ -0,0 +1,24 @@
+# LOG4J Configuration
+# ===================
+
+# Basic logging goes to "datanucleus.log"
+log4j.appender.A1=org.apache.log4j.FileAppender
+log4j.appender.A1.File=datanucleus.log
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n
+#log4j.appender.A1.Threshold=INFO
+
+# Categories
+# Each category can be set to a "level", and to direct to an appender
+
+# Default to DEBUG level for all DataNucleus categories
+log4j.logger.DataNucleus = DEBUG, A1
+
+log4j.category.com.mchange.v2.c3p0=INFO, A1
+log4j.category.com.mchange.v2.resourcepool=INFO, A1
+log4j.category.org.logicalcobwebs.proxool=INFO,A1
+
+
+# Hbase libs logging
+log4j.category.org.apache.hadoop=INFO,A1
+log4j.category.org.apache.zookeeper=INFO,A1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/dom/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/dom/pom.xml b/mothballed/example/application/quickstart_html_sql/dom/pom.xml
new file mode 100644
index 0000000..409e8db
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/dom/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+    	<groupId>org.apache.isis.example.application</groupId>
+    	<artifactId>quickstart_html_sql</artifactId>
+		<version>1.0.0-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>quickstart_html_sql-dom</artifactId>
+	<name>Quickstart (HTML/SQL) DOM</name>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.isis.core</groupId>
+			<artifactId>isis-core-applib</artifactId>
+		</dependency>
+	</dependencies>
+    
+</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItem.java
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItem.java b/mothballed/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItem.java
new file mode 100644
index 0000000..e8af026
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItem.java
@@ -0,0 +1,225 @@
+/*
+ *  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 dom.todo;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.MemberGroups;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.MultiLine;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Resolve;
+import org.apache.isis.applib.annotation.Resolve.Type;
+import org.apache.isis.applib.annotation.Title;
+import org.apache.isis.applib.annotation.Where;
+import org.joda.time.LocalDate;
+
+@ObjectType("TODO")
+@MemberGroups({"General", "Detail"})
+public class ToDoItem {
+
+    public static enum Category {
+        Professional, Domestic, Other;
+    }
+
+    // {{ Description
+    private String description;
+
+    @Title
+    @MemberOrder(sequence = "1")
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(final String description) {
+        this.description = description;
+    }
+    // }}
+
+    // {{ Category
+    private Category category;
+
+    @MemberOrder(sequence = "2")
+    public Category getCategory() {
+        return category;
+    }
+
+    public void setCategory(final Category category) {
+        this.category = category;
+    }
+    // }}
+
+    // {{ DueBy (property)
+    private LocalDate dueBy;
+
+    @MemberOrder(name="Detail", sequence = "3")
+    @Optional
+    public LocalDate getDueBy() {
+        return dueBy;
+    }
+
+    public void setDueBy(final LocalDate dueBy) {
+        this.dueBy = dueBy;
+    }
+    // }}
+
+    // {{ Done
+    private boolean done;
+
+    @Disabled
+    @MemberOrder(sequence = "4")
+    public boolean getDone() {
+        return done;
+    }
+
+    public void setDone(final boolean done) {
+        this.done = done;
+    }
+    // }}
+
+    // {{ Notes (property)
+    private String notes;
+
+    @Hidden(where=Where.ALL_TABLES)
+    @Optional
+    @MultiLine(numberOfLines=5)
+    @MemberOrder(name="Detail", sequence = "6")
+    public String getNotes() {
+        return notes;
+    }
+
+    public void setNotes(final String notes) {
+        this.notes = notes;
+    }
+    // }}
+
+    // {{ OwnedBy (property, hidden)
+    private String ownedBy;
+
+    @Hidden
+    public String getOwnedBy() {
+        return ownedBy;
+    }
+
+    public void setOwnedBy(final String ownedBy) {
+        this.ownedBy = ownedBy;
+    }
+    // }}
+
+    // {{ markAsDone (action)
+    @MemberOrder(sequence = "1")
+    public ToDoItem markAsDone() {
+        setDone(true);
+        return this;
+    }
+
+    public String disableMarkAsDone() {
+        return done ? "Already done" : null;
+    }
+    // }}
+
+    // {{ markAsNotDone (action)
+    @MemberOrder(sequence = "2")
+    public ToDoItem markAsNotDone() {
+        setDone(false);
+        return this;
+    }
+
+    public String disableMarkAsNotDone() {
+        return !done ? "Not yet done" : null;
+    }
+    // }}
+
+    // {{ dependencies (Collection)
+    private List<ToDoItem> dependencies = new ArrayList<ToDoItem>();
+
+    @Disabled
+    @MemberOrder(sequence = "1")
+    @Resolve(Type.EAGERLY)
+    public List<ToDoItem> getDependencies() {
+        return dependencies;
+    }
+
+    public void setDependencies(final List<ToDoItem> dependencies) {
+        this.dependencies = dependencies;
+    }
+    // }}
+
+    // {{ add (action)
+    @MemberOrder(name="dependencies", sequence = "3")
+    public ToDoItem add(final ToDoItem toDoItem) {
+        getDependencies().add(toDoItem);
+        return this;
+    }
+    public String validateAdd(final ToDoItem toDoItem) {
+        if(getDependencies().contains(toDoItem)) {
+            return "Already a dependency";
+        }
+        if(toDoItem == this) {
+            return "Can't set up a dependency to self";
+        }
+        return null;
+    }
+    // }}
+
+    // {{ remove (action)
+    @MemberOrder(name="dependencies", sequence = "4")
+    public ToDoItem remove(final ToDoItem toDoItem) {
+        getDependencies().remove(toDoItem);
+        return this;
+    }
+    public String disableRemove(final ToDoItem toDoItem) {
+        return getDependencies().isEmpty()? "No dependencies to remove": null;
+    }
+    public String validateRemove(final ToDoItem toDoItem) {
+        if(!getDependencies().contains(toDoItem)) {
+            return "Not a dependency";
+        }
+        return null;
+    }
+    public List<ToDoItem> choices0Remove() {
+        return getDependencies();
+    }
+    // }}
+
+    // {{ injected: DomainObjectContainer
+    @SuppressWarnings("unused")
+    private DomainObjectContainer container;
+
+    public void setDomainObjectContainer(final DomainObjectContainer container) {
+        this.container = container;
+    }
+    // }}
+
+    // {{ injected: ToDoItems
+    @SuppressWarnings("unused")
+    private ToDoItems toDoItems;
+
+    public void setToDoItems(final ToDoItems toDoItems) {
+        this.toDoItems = toDoItems;
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItems.java
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItems.java b/mothballed/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItems.java
new file mode 100644
index 0000000..6d4c12d
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/dom/src/main/java/dom/todo/ToDoItems.java
@@ -0,0 +1,139 @@
+/*
+ *  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 dom.todo;
+
+import java.util.List;
+
+import com.google.common.base.Objects;
+
+import dom.todo.ToDoItem.Category;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.annotation.ActionSemantics;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.NotInServiceMenu;
+import org.apache.isis.applib.filter.Filter;
+
+@Named("ToDos")
+public class ToDoItems extends AbstractFactoryAndRepository {
+
+    // {{ Id, iconName
+    @Override
+    public String getId() {
+        return "toDoItems";
+    }
+
+    public String iconName() {
+        return "ToDoItem";
+    }
+    // }}
+
+    // {{ notYetDone (action)
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "1")
+    public List<ToDoItem> notYetDone() {
+        return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
+            @Override
+            public boolean accept(final ToDoItem t) {
+                return ownedByCurrentUser(t) && !t.getDone();
+            }
+        });
+    }
+    // }}
+
+    // {{ done (action)
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "2")
+    public List<ToDoItem> done() {
+        return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
+            @Override
+            public boolean accept(final ToDoItem t) {
+                return ownedByCurrentUser(t) && t.getDone();
+            }
+        });
+    }
+    // }}
+
+    // {{ newToDo  (action)
+    @MemberOrder(sequence = "2")
+    public ToDoItem newToDo(
+            @Named("Description") String description, 
+            @Named("Category") Category category) {
+        final String ownedBy = getContainer().getUser().getName();
+        return newToDo(description, category, ownedBy);
+    }
+    // }}
+
+    // {{ newToDo  (hidden)
+    @Hidden // for use by fixtures
+    public ToDoItem newToDo(
+            String description, 
+            Category category, 
+            String ownedBy) {
+        final ToDoItem toDoItem = newTransientInstance(ToDoItem.class);
+        toDoItem.setDescription(description);
+        toDoItem.setCategory(category);
+        toDoItem.setOwnedBy(ownedBy);
+        persist(toDoItem);
+        return toDoItem;
+    }
+    // }}
+
+    // {{ similarTo (action)
+    @NotInServiceMenu
+    @ActionSemantics(Of.SAFE)
+    @MemberOrder(sequence = "3")
+    public List<ToDoItem> similarTo(final ToDoItem toDoItem) {
+        return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
+            @Override
+            public boolean accept(ToDoItem t) {
+                return t != toDoItem && Objects.equal(toDoItem.getCategory(), t.getCategory()) && Objects.equal(toDoItem.getOwnedBy(), t.getOwnedBy());
+            }
+        });
+    }
+    // }}
+    
+    // {{ autoComplete (hidden)
+    @Hidden
+    @MemberOrder(sequence = "1")
+    public List<ToDoItem> autoComplete(final String description) {
+        return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
+            @Override
+            public boolean accept(final ToDoItem t) {
+                return ownedByCurrentUser(t) && t.getDescription().contains(description);
+            }
+
+        });
+    }
+    // }}
+
+    // {{ helpers
+    protected boolean ownedByCurrentUser(final ToDoItem t) {
+        return Objects.equal(t.getOwnedBy(), currentUserName());
+    }
+    protected String currentUserName() {
+        return getContainer().getUser().getName();
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/dom/src/main/resources/images/AuditEntry.png
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/dom/src/main/resources/images/AuditEntry.png b/mothballed/example/application/quickstart_html_sql/dom/src/main/resources/images/AuditEntry.png
new file mode 100644
index 0000000..950d792
Binary files /dev/null and b/mothballed/example/application/quickstart_html_sql/dom/src/main/resources/images/AuditEntry.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/dom/src/main/resources/images/ToDoItem.gif
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/dom/src/main/resources/images/ToDoItem.gif b/mothballed/example/application/quickstart_html_sql/dom/src/main/resources/images/ToDoItem.gif
new file mode 100644
index 0000000..cc536e1
Binary files /dev/null and b/mothballed/example/application/quickstart_html_sql/dom/src/main/resources/images/ToDoItem.gif differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/fixture/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/fixture/pom.xml b/mothballed/example/application/quickstart_html_sql/fixture/pom.xml
new file mode 100644
index 0000000..26d3c53
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/fixture/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+    	<groupId>org.apache.isis.example.application</groupId>
+        <artifactId>quickstart_html_sql</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>quickstart_html_sql-fixture</artifactId>
+    
+	<name>Quickstart (HTML/SQL) Fixtures</name>
+
+	<dependencies>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>quickstart_html_sql-dom</artifactId>
+		</dependency>
+	</dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/fixture/src/main/java/fixture/LogonAsSvenFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/fixture/src/main/java/fixture/LogonAsSvenFixture.java b/mothballed/example/application/quickstart_html_sql/fixture/src/main/java/fixture/LogonAsSvenFixture.java
new file mode 100644
index 0000000..5bdc6fe
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/fixture/src/main/java/fixture/LogonAsSvenFixture.java
@@ -0,0 +1,30 @@
+/*
+ *  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 fixture;
+
+import org.apache.isis.applib.fixtures.LogonFixture;
+
+public class LogonAsSvenFixture extends LogonFixture {
+
+    public LogonAsSvenFixture() {
+        super("sven");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java b/mothballed/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
new file mode 100644
index 0000000..b0c7b61
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
@@ -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 fixture.todo;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItem.Category;
+import dom.todo.ToDoItems;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+
+public class ToDoItemsFixture extends AbstractFixture {
+
+    @Override
+    public void install() {
+        createFiveFor("sven");
+        createThreeFor("dick");
+        createTwoFor("bob");
+        createOneFor("joe");
+
+        // for exploration user
+        createFiveFor("exploration");
+    }
+
+    private void createFiveFor(String ownedBy) {
+        createToDoItem("Buy milk", Category.Domestic, ownedBy);
+        createToDoItem("Pick up laundry", Category.Domestic, ownedBy);
+        createToDoItem("Buy stamps", Category.Domestic, ownedBy);
+        createToDoItem("Write blog post", Category.Professional, ownedBy);
+        createToDoItem("Organize brown bag", Category.Professional, ownedBy);
+    }
+
+    private void createThreeFor(String ownedBy) {
+        createToDoItem("Book car in for service", Category.Domestic, ownedBy);
+        createToDoItem("Buy birthday present for sven", Category.Domestic, ownedBy);
+        createToDoItem("Write presentation for conference", Category.Professional, ownedBy);
+    }
+
+    private void createTwoFor(String ownedBy) {
+        createToDoItem("Write thank you notes", Category.Domestic, ownedBy);
+        createToDoItem("Look into solar panels", Category.Domestic, ownedBy);
+    }
+
+    private void createOneFor(String ownedBy) {
+        createToDoItem("Pitch book idea to publisher", Category.Professional, ownedBy);
+    }
+
+    private ToDoItem createToDoItem(final String description, Category category, String ownedBy) {
+        return toDoItems.newToDo(description, category, ownedBy);
+    }
+
+    private ToDoItems toDoItems;
+
+    public void setToDoItems(final ToDoItems toDoItems) {
+        this.toDoItems = toDoItems;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java b/mothballed/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java
new file mode 100644
index 0000000..ddb1203
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java
@@ -0,0 +1,46 @@
+/*
+ *  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 fixture.todo;
+
+import dom.todo.ToDoItems;
+
+import org.apache.isis.applib.AbstractService;
+import org.apache.isis.applib.annotation.Named;
+
+/**
+ * Enables fixtures to be installed from the application.
+ */
+@Named("Fixtures")
+public class ToDoItemsFixturesService extends AbstractService {
+
+    public void install() {
+        final ToDoItemsFixture fixture = new ToDoItemsFixture();
+        fixture.setContainer(getContainer());
+        fixture.setToDoItems(toDoItems);
+        fixture.install();
+    }
+
+    private ToDoItems toDoItems;
+
+    public void setToDoItems(final ToDoItems toDoItems) {
+        this.toDoItems = toDoItems;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/pom.xml b/mothballed/example/application/quickstart_html_sql/pom.xml
new file mode 100644
index 0000000..b2f3e61
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/pom.xml
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.isis.example.application</groupId>
+    <artifactId>quickstart_html_sql</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+
+    <name>Quickstart (HTML/SQL) App</name>
+
+    <packaging>pom</packaging>
+    
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+
+        <isis.version>1.1.1-SNAPSHOT</isis.version>
+        <isis-objectstore-sql.version>1.0.0-SNAPSHOT</isis-objectstore-sql.version>
+        <isis-objectstore-xml.version>1.0.0-SNAPSHOT</isis-objectstore-xml.version>
+        <isis-viewer-dnd.version>1.0.0-SNAPSHOT</isis-viewer-dnd.version>
+        <isis-viewer-scimpi.version>1.0.0-SNAPSHOT</isis-viewer-scimpi.version>
+        <isis-viewer-html.version>1.0.0-SNAPSHOT</isis-viewer-html.version>
+        <isis-security-file.version>1.0.1-SNAPSHOT</isis-security-file.version>
+    </properties>
+
+    <repositories>
+        <repository>
+              <id>apache.snapshots</id>
+              <name>Apache Snapshots</name>
+              <url>https://repository.apache.org/content/repositories/snapshots/</url>
+              <releases>
+                  <enabled>false</enabled>
+              </releases>
+              <snapshots>
+                  <enabled>true</enabled>
+              </snapshots>
+          </repository>
+    </repositories>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>2.3.1</version>
+                    <configuration>
+                        <source>1.6</source>
+                        <target>1.6</target>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>source</id>
+                            <phase>compile</phase>
+                        </execution>
+                        <execution>
+                            <id>test</id>
+                            <phase>test-compile</phase>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.5</version>
+                    <configuration>
+                        <excludes>
+                            <exclude>**/Test*.java</exclude>
+                        </excludes>
+                        <useFile>true</useFile>
+                        <printSummary>false</printSummary>
+                        <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
+                    </configuration>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-report-plugin</artifactId>
+                    <version>2.5</version>
+                    <configuration>
+                        <excludes>
+                            <exclude>**/Test*.java</exclude>
+                        </excludes>
+                        <showSuccess>false</showSuccess>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <phase>test</phase>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.mortbay.jetty</groupId>
+                    <artifactId>maven-jetty-plugin</artifactId>
+                    <version>6.1.25</version>
+                </plugin>
+
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-shade-plugin</artifactId>
+					<version>1.4</version>
+				</plugin>
+
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-antrun-plugin</artifactId>
+					<version>1.6</version>
+					<executions>
+						<execution>
+					        <goals>
+					          <goal>run</goal>
+					        </goals>
+						</execution>
+					</executions>
+				</plugin>
+                <!-- http://simplericity.com/2009/11/10/1257880778509.html -->
+                <plugin>
+                    <groupId>org.simplericity.jettyconsole</groupId>
+                    <artifactId>jetty-console-maven-plugin</artifactId>
+                    <version>1.43</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-report-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+    <modules>
+        <module>dom</module>
+        <module>fixture</module>
+        <module>viewer-html</module>
+    </modules>
+
+    <dependencyManagement>
+        <dependencies>
+
+            <dependency>
+                <groupId>org.apache.isis.core</groupId>
+                <artifactId>isis</artifactId>
+                <version>${isis.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.isis.objectstore</groupId>
+                <artifactId>isis-objectstore-xml</artifactId>
+                <version>${isis-objectstore-xml.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.isis.objectstore</groupId>
+                <artifactId>isis-objectstore-sql</artifactId>
+                <version>${isis-objectstore-sql.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.isis.viewer</groupId>
+                <artifactId>isis-viewer-dnd</artifactId>
+                <version>${isis-viewer-dnd.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.isis.viewer</groupId>
+                <artifactId>isis-viewer-scimpi</artifactId>
+                <version>${isis-viewer-scimpi.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.isis.viewer</groupId>
+                <artifactId>isis-viewer-html</artifactId>
+                <version>${isis-viewer-html.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.isis.security</groupId>
+                <artifactId>isis-security-file</artifactId>
+                <version>${isis-security-file.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+
+
+            <!-- this project's own modules -->
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>quickstart_html_sql-dom</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>quickstart_html_sql-fixture</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>quickstart_html_sql-viewer-html</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+
+
+        </dependencies>
+    </dependencyManagement>
+
+    <profiles>
+        <profile>
+            <id>m2e</id>
+            <activation>
+                <property>
+                    <name>m2e.version</name>
+                </property>
+            </activation>
+            <build>
+                <directory>target-ide</directory>
+            </build>
+        </profile>
+    </profiles>
+
+</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.lck
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.lck b/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.lck
new file mode 100644
index 0000000..5cd2e57
Binary files /dev/null and b/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.lck differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.log
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.log b/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.log
new file mode 100644
index 0000000..7b4d229
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.log
@@ -0,0 +1,2 @@
+/*C3*/SET SCHEMA PUBLIC
+create table ISIS_ADMIN_SERVICES (PK_ID int, ID varchar(255))

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.properties
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.properties b/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.properties
new file mode 100644
index 0000000..e17168d
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.properties
@@ -0,0 +1,4 @@
+#HSQL Database Engine 2.2.8
+#Wed Oct 10 18:15:49 BST 2012
+version=2.2.8
+modified=yes

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.script
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.script b/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.script
new file mode 100644
index 0000000..13c8dd0
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/hsql-db/tests.script
@@ -0,0 +1,46 @@
+SET DATABASE UNIQUE NAME HSQLDB3A4BACD59D
+SET DATABASE GC 0
+SET DATABASE DEFAULT RESULT MEMORY ROWS 0
+SET DATABASE EVENT LOG LEVEL 0
+SET DATABASE SQL NAMES FALSE
+SET DATABASE SQL REFERENCES FALSE
+SET DATABASE SQL SIZE TRUE
+SET DATABASE SQL TYPES FALSE
+SET DATABASE SQL TDC DELETE TRUE
+SET DATABASE SQL TDC UPDATE TRUE
+SET DATABASE SQL TRANSLATE TTI TYPES TRUE
+SET DATABASE SQL CONCAT NULLS TRUE
+SET DATABASE SQL NULLS FIRST TRUE
+SET DATABASE SQL UNIQUE NULLS TRUE
+SET DATABASE SQL CONVERT TRUNCATE TRUE
+SET DATABASE SQL AVG SCALE 0
+SET DATABASE SQL DOUBLE NAN TRUE
+SET DATABASE SQL LONGVAR IS LOB FALSE
+SET DATABASE TRANSACTION CONTROL LOCKS
+SET DATABASE DEFAULT ISOLATION LEVEL READ COMMITTED
+SET DATABASE TRANSACTION ROLLBACK ON CONFLICT TRUE
+SET DATABASE TEXT TABLE DEFAULTS ''
+SET FILES WRITE DELAY 500 MILLIS
+SET FILES BACKUP INCREMENT TRUE
+SET FILES CACHE SIZE 10000
+SET FILES CACHE ROWS 50000
+SET FILES SCALE 8
+SET FILES LOB SCALE 32
+SET FILES DEFRAG 0
+SET FILES NIO TRUE
+SET FILES NIO SIZE 256
+SET FILES LOG TRUE
+SET FILES LOG SIZE 50
+CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e'
+ALTER USER SA SET LOCAL TRUE
+CREATE SCHEMA PUBLIC AUTHORIZATION DBA
+ALTER SEQUENCE SYSTEM_LOBS.LOB_ID RESTART WITH 1
+SET DATABASE DEFAULT INITIAL SCHEMA PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.YES_OR_NO TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.TIME_STAMP TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CARDINAL_NUMBER TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CHARACTER_DATA TO PUBLIC
+GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.SQL_IDENTIFIER TO PUBLIC
+GRANT DBA TO SA
+SET SCHEMA SYSTEM_LOBS
+INSERT INTO BLOCKS VALUES(0,2147483647,0)

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/ide/eclipse/launch/quickstart-viewer-html.launch
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/ide/eclipse/launch/quickstart-viewer-html.launch b/mothballed/example/application/quickstart_html_sql/viewer-html/ide/eclipse/launch/quickstart-viewer-html.launch
new file mode 100644
index 0000000..99a0ac6
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/ide/eclipse/launch/quickstart-viewer-html.launch
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
+<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="--type server_exploration"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="quickstart-viewer-html"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
+</launchConfiguration>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/lib/.gitignore
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/lib/.gitignore b/mothballed/example/application/quickstart_html_sql/viewer-html/lib/.gitignore
new file mode 100644
index 0000000..70eee7e
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/lib/.gitignore
@@ -0,0 +1,5 @@
+#
+# explicitly ignoring Microsoft JDBC4 jar
+# (cannot redistribute, licensing)
+#
+sqljdbc4.jar

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/pom.xml b/mothballed/example/application/quickstart_html_sql/viewer-html/pom.xml
new file mode 100644
index 0000000..43ae71f
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/pom.xml
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.isis.example.application</groupId>
+        <artifactId>quickstart_html_sql</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>quickstart_html_sql-viewer-html</artifactId>
+    
+	<name>Quickstart (HTML/SQL) HTML Viewer</name>
+	<description>This module runs Isis' HTML webapp viewer.  By default it is configured to
+	run using the sql object store.  See other viewer modules for more persistence
+	options.</description>
+	
+	<packaging>war</packaging>
+
+	<build>
+		<plugins>
+            <plugin>
+                <groupId>org.mortbay.jetty</groupId>
+                <artifactId>maven-jetty-plugin</artifactId>
+            </plugin>
+
+            <!-- mvn package -->
+            <plugin>
+                <groupId>org.simplericity.jettyconsole</groupId>
+                <artifactId>jetty-console-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>createconsole</goal>
+                        </goals>
+                        <configuration>
+                            <backgroundImage>${basedir}/src/main/jettyconsole/isis-banner.png</backgroundImage>
+                        </configuration>
+                        <phase>package</phase>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- prereqs: mvn package -->
+            <!-- mvn antrun:run -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <configuration>
+                    <tasks>
+                        <exec executable="java" failonerror="true">
+                            <arg value="-jar"/>
+                            <arg value="${project.build.directory}/${project.build.finalName}-jetty-console.war"/>
+                        </exec>
+                    </tasks>
+                </configuration>
+            </plugin>
+
+		</plugins>
+	</build>
+
+	<dependencies>
+	
+        <!-- other modules in this project -->
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>quickstart_html_sql-dom</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>quickstart_html_sql-fixture</artifactId>
+        </dependency>
+
+
+
+        <!-- objectstore/domain service/repository implementations -->
+
+		<dependency>
+			<groupId>org.apache.isis.objectstore</groupId>
+			<artifactId>isis-objectstore-sql-impl</artifactId>
+		</dependency>
+        
+
+        <!-- isis viewer -->
+		<dependency>
+	        <groupId>org.apache.isis.viewer</groupId>
+			<artifactId>isis-viewer-html-impl</artifactId>
+		</dependency>
+
+
+
+        <!-- isis core -->
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-metamodel</artifactId>
+        </dependency>
+
+        <!-- isis default runtime -->
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-runtime</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-objectstore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.objectstore</groupId>
+            <artifactId>isis-objectstore-xml</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-profilestore</artifactId>
+        </dependency>
+        
+        <!-- isis defaults (other) -->
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-security</artifactId>
+        </dependency>
+        
+        <!-- to run using WebServer (optional) -->
+        <dependency>
+            <groupId>org.apache.isis.core</groupId>
+            <artifactId>isis-core-webserver</artifactId>
+            <scope>runtime</scope>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.5_spec</artifactId>
+            <version>1.2</version>
+        </dependency>
+
+
+		<!-- 
+		  JDBC drivers 
+		  (if using jdo or sql object store)
+		  -->
+
+        <dependency>
+            <groupId>org.hsqldb</groupId>
+            <artifactId>hsqldb</artifactId>
+            <version>2.2.8</version>
+        </dependency>
+
+		<!-- 
+		<dependency>
+			<groupId>com.microsoft.sqlserver</groupId>
+			<artifactId>jdbc</artifactId>
+			<version>4.0</version>
+			<scope>system</scope>
+			<optional>true</optional>
+			<systemPath>${basedir}/lib/sqljdbc4.jar</systemPath>
+		</dependency>
+		-->	
+			
+		<dependency>
+		  <groupId>org.lazyluke</groupId>
+		  <artifactId>log4jdbc-remix</artifactId>
+		  <version>0.2.7</version>
+		</dependency>
+
+	</dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.pdn
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.pdn b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.pdn
new file mode 100644
index 0000000..ee6b1c4
Binary files /dev/null and b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.pdn differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.png
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.png b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.png
new file mode 100644
index 0000000..c6dea47
Binary files /dev/null and b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/jettyconsole/isis-banner.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/resources/images/Default.png
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/resources/images/Default.png b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/resources/images/Default.png
new file mode 100644
index 0000000..8409e46
Binary files /dev/null and b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/resources/images/Default.png differ

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.passwords
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.passwords b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.passwords
new file mode 100644
index 0000000..97b228e
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.passwords
@@ -0,0 +1,28 @@
+#  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.
+
+
+#
+# configuration file for the file-based authentication
+# not used by the onlinedemo
+#
+
+# list of users, and their password, and optionally roles
+sven:pass:role1|role2|role3
+dick:pass
+bob:pass
+joe:pass

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.properties
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.properties b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.properties
new file mode 100644
index 0000000..62b9dae
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authentication_file.properties
@@ -0,0 +1,25 @@
+#  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.
+
+#
+# configuration file for the File-based authentication mechanism
+#
+
+
+#
+# (intentionally empty)
+#

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.allow
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.allow b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.allow
new file mode 100644
index 0000000..4407ec2
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.allow
@@ -0,0 +1,28 @@
+#  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.
+
+
+#
+# configuration file for the file-based authorization
+#
+
+
+#
+# (intentionally empty)
+#
+
+

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.properties
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.properties b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.properties
new file mode 100644
index 0000000..f44bb6c
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/authorization_file.properties
@@ -0,0 +1,47 @@
+#  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.
+
+#
+# configuration file for the File-based authorization mechanism
+#
+
+
+#
+# the whitelist file
+# (value shown below is the default)
+#
+
+#isis.authorization.file.whitelist=authorization_file.allow
+
+
+
+#
+# the blacklist file
+# (there is no default value; provide a filename)
+#
+
+#isis.authorization.file.blacklist=
+
+
+
+#
+# switch on "learning mode".  In this mode the authorization mechanism
+# will grant all requests, and log those requests into the allow file.
+#
+
+#isis.authorization.learn=true
+

http://git-wip-us.apache.org/repos/asf/isis/blob/91a8000b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/isis.properties b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/isis.properties
new file mode 100644
index 0000000..c46aeb5
--- /dev/null
+++ b/mothballed/example/application/quickstart_html_sql/viewer-html/src/main/webapp/WEB-INF/isis.properties
@@ -0,0 +1,180 @@
+#  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.
+
+
+#################################################################################
+#
+# specify system components.
+#
+# The values correspond to the named components in the installer-registry.properties file
+# in the org.apache.isis.runtimes.dflt:runtime JAR (in the org.apache.isis.runtimes.dflt.runtime package)
+#
+# Although all configuration could reside in isis.properties, the recommendation is
+# to split out into component specific files:
+# 
+#    xxx_yyy.properties files
+#
+# where
+#    * xxx is the component type, and
+#    * yyy is the component name.
+#
+# For example, persistor_sql.properties holds configuration information specific to the
+#
+#
+# If the components are changed, also remember to edit pom.xml (further comments can be 
+# found in the persistor_xxx.properties files)
+#
+#################################################################################
+
+#
+# configure the persistor (object store) to use
+#
+# * in-memory   requires no additional configuration, but stores object in-memory.
+#               Only suitable for prototyping
+# * datanucleus uses JDO DataNucleus to persist objects to relational database.
+#               for objectstore-specific properties, see persistor_datanucleus.properties   
+# * fileserver  uses a simple FileServer to persist objects as JSON documents.  It requires the fileserver component to be running
+#               for objectstore-specific properties, see persistor_fileserver.properties 
+# * mongodb     uses MongoDB to be persist objects as JSON documents.  It requires MongoDB to be installed and running
+#               for objectstore-specific properties, see persistor_fileserver.properties  
+# * sql         uses an RDBMS to persist objects as table rows.  
+#               for objectstore-specific properties, see persistor_sql.properties
+# * xml         uses the XML ObjectStore to be persist objects to a set of XML files.  Only suitable for prototyping.
+#               for objectstore-specific properties, see persistor_xml.properties 
+#
+# NOTE:
+# * if using non-naive implementations of services, edit isis.services (below) and 
+# * if necessary, update the pom.xml to reference appropriate objstore-xxx module
+# * for sql and datanucleus objectstores, update the pom.xml to reference appropriate JDBC driver
+# 
+
+isis.persistor=sql
+
+
+#
+# configure authentication mechanism to use (to logon to the system)
+# note:
+# - authentication is disabled if running in exploration mode
+# - the Scimpi viewer allows access to anonymous users
+#
+ 
+# default is file in SERVER mode, none in SERVER_EXPLORATION.  Configure in web.xml 
+isis.authentication=file
+
+
+#
+# configure authorization mechanism to use
+#
+# The authorization mechanism define each users' permissions to view/edit object properties 
+# or collections, and to view/invoke object actions
+#
+# configuring this component automatically refines the metamodel (installing a facet factory
+# which vetoes access as required)
+#
+
+# default is file in SERVER mode, none in SERVER_EXPLORATION.  Configure in web.xml 
+#isis.authorization=file
+
+
+
+#
+# configure the user profile store to use.
+# 
+# the user profile store is supported by some viewers as a way to store 
+# user-specific settings (eg colours, themes etc)
+# 
+isis.user-profile-store=in-memory
+
+
+
+
+#################################################################################
+#
+# MetaModel
+#
+# The metamodel typically does not require additional configuration, although
+# the system components (defined above) may refine the metamodel for their needs.
+#
+#################################################################################
+
+
+#
+# additional programming model facets
+#
+
+#isis.reflector.facets.include=
+#isis.reflector.facets.exclude=
+
+# normally these facets would be installed by virtue of configuring the JDO object store
+# need to be configured manually if running some other object store only because the
+# JDO enhancer is still configured to run on the DOM project.
+isis.reflector.facets.include=\
+	org.apache.isis.core.progmodel.facets.object.ignore.jdo.RemoveJdoEnhancementTypesFacetFactory,\
+	org.apache.isis.core.progmodel.facets.object.ignore.jdo.RemoveJdoPrefixedMethodsFacetFactory
+
+#
+# metamodel validator
+#
+
+#isis.reflector.validator=
+
+
+
+#################################################################################
+#
+# Application Services and fixtures
+#
+#################################################################################
+
+#
+# Specify the domain services.
+# 
+# These are the most important configuration properties in the system, as they define
+# the set of the classes for Isis to instantiate as domain service singletons.
+# From these domain service instances the rest of the metamodel is discovered, while the 
+# end-user gains access to other domain objects by invoking the actions of the domain services.
+#
+# The implementations depend on the configured (see isis.persistor above) 
+#
+
+
+# if using the in-memory, XML, SQL, fileserver or mongo object stores:
+isis.services.prefix = dom
+isis.services = todo.ToDoItems
+
+
+# if using the DataNucleus object store
+# (with support for JDO's audit service, and installing fixtures using a domain service)
+#isis.services.prefix = 
+#isis.services = objstore.jdo.todo.ToDoItemsJdo,\
+#                fixture.todo.ToDoItemsFixturesService,\
+#                dom.audit.AuditServiceDemo
+
+
+
+
+
+#
+# Specify the (optional) test fixtures
+#
+# Fixtures are used to seed the object store with an initial set of data.  For the 
+# in-memory object store, the fixtures are installed on every run.  For other
+# object stores, they are used only when the object store is first initialized.
+#
+isis.fixtures.prefix= fixture
+isis.fixtures= todo.ToDoItemsFixture
+