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 2010/11/03 00:33:09 UTC

svn commit: r1030286 [1/2] - in /incubator/isis/trunk/support/prototype: ./ dom/ dom/src/ dom/src/main/ dom/src/main/java/ dom/src/main/java/META-INF/ dom/src/main/java/org/ dom/src/main/java/org/apache/ dom/src/main/java/org/apache/isis/ dom/src/main/...

Author: danhaywood
Date: Tue Nov  2 23:33:06 2010
New Revision: 1030286

URL: http://svn.apache.org/viewvc?rev=1030286&view=rev
Log:
adding new support/prototype app (work-in-progress)

Added:
    incubator/isis/trunk/support/prototype/
    incubator/isis/trunk/support/prototype/dom/
    incubator/isis/trunk/support/prototype/dom/pom.xml
    incubator/isis/trunk/support/prototype/dom/src/
    incubator/isis/trunk/support/prototype/dom/src/main/
    incubator/isis/trunk/support/prototype/dom/src/main/java/
    incubator/isis/trunk/support/prototype/dom/src/main/java/META-INF/
    incubator/isis/trunk/support/prototype/dom/src/main/java/META-INF/MANIFEST.MF
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Approver.java
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Claim.java
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimItem.java
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimRepository.java
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimWizard.java
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Claimant.java
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimantExpenseSummary.java
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/employee/
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/employee/Employee.java
    incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/employee/EmployeeRepository.java
    incubator/isis/trunk/support/prototype/dom/src/main/resources/
    incubator/isis/trunk/support/prototype/dom/src/main/resources/images/
    incubator/isis/trunk/support/prototype/dom/src/main/resources/images/Claim.gif   (with props)
    incubator/isis/trunk/support/prototype/dom/src/main/resources/images/ClaimItem.gif   (with props)
    incubator/isis/trunk/support/prototype/dom/src/main/resources/images/ClaimRepository.gif   (with props)
    incubator/isis/trunk/support/prototype/dom/src/main/resources/images/Employee.gif   (with props)
    incubator/isis/trunk/support/prototype/dom/src/main/resources/images/EmployeeRepository.gif   (with props)
    incubator/isis/trunk/support/prototype/dom/src/main/resources/images/FredSmith.jpg   (with props)
    incubator/isis/trunk/support/prototype/dom/src/main/resources/images/SamJones.jpg   (with props)
    incubator/isis/trunk/support/prototype/dom/src/main/resources/images/TomBrown.jpg   (with props)
    incubator/isis/trunk/support/prototype/dom/src/test/
    incubator/isis/trunk/support/prototype/fixture/
    incubator/isis/trunk/support/prototype/fixture/pom.xml
    incubator/isis/trunk/support/prototype/fixture/src/
    incubator/isis/trunk/support/prototype/fixture/src/main/
    incubator/isis/trunk/support/prototype/fixture/src/main/java/
    incubator/isis/trunk/support/prototype/fixture/src/main/java/META-INF/
    incubator/isis/trunk/support/prototype/fixture/src/main/java/META-INF/MANIFEST.MF
    incubator/isis/trunk/support/prototype/fixture/src/main/java/org/
    incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/
    incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/
    incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/
    incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/prototype/
    incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/prototype/fixture/
    incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/prototype/fixture/ClaimsFixture.java
    incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/prototype/fixture/ClaimsLogonFixture.java
    incubator/isis/trunk/support/prototype/objstore-default/
    incubator/isis/trunk/support/prototype/objstore-default/pom.xml
    incubator/isis/trunk/support/prototype/objstore-default/src/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/META-INF/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/META-INF/MANIFEST.MF
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/claim/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/claim/ClaimRepositoryInMemory.java
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/employee/
    incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/employee/EmployeeRepositoryInMemory.java
    incubator/isis/trunk/support/prototype/pom.xml
    incubator/isis/trunk/support/prototype/quickrun/
    incubator/isis/trunk/support/prototype/quickrun/pom.xml
    incubator/isis/trunk/support/prototype/quickrun/src/
    incubator/isis/trunk/support/prototype/quickrun/src/main/
    incubator/isis/trunk/support/prototype/quickrun/src/main/java/
    incubator/isis/trunk/support/prototype/quickrun/src/main/resources/
    incubator/isis/trunk/support/prototype/quickrun/src/test/
    incubator/isis/trunk/support/prototype/quickrun/src/test/java/
    incubator/isis/trunk/support/prototype/viewer-html/
    incubator/isis/trunk/support/prototype/viewer-html/pom.xml
    incubator/isis/trunk/support/prototype/viewer-html/src/
    incubator/isis/trunk/support/prototype/viewer-html/src/main/
    incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/
    incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/allow
    incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/images/
    incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/images/Default.png   (with props)
    incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/isis.properties
    incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/passwords
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/META-INF/
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/META-INF/MANIFEST.MF
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/config/
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/lib/
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/logging.properties
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/web.xml
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/default.css
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/images/
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/images/banner-bg.png   (with props)
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/images/banner.jpg   (with props)
    incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/images/banner.png   (with props)
    incubator/isis/trunk/support/prototype/viewer-wicket/
    incubator/isis/trunk/support/prototype/viewer-wicket/pom.xml
    incubator/isis/trunk/support/prototype/viewer-wicket/src/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/isis/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/isis/support/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/isis/support/prototype/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/isis/support/prototype/viewer/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/isis/support/prototype/viewer/wicket/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/isis/support/prototype/viewer/wicket/app/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/isis/support/prototype/viewer/wicket/app/ClaimsApplication.java
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/isis/support/prototype/viewer/wicket/claimwizard/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/isis/support/prototype/viewer/wicket/claimwizard/ClaimWizardComponentFactory.java
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/isis/support/prototype/viewer/wicket/claimwizard/ClaimWizardPanel.css
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/isis/support/prototype/viewer/wicket/claimwizard/ClaimWizardPanel.html
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/java/org/apache/isis/support/prototype/viewer/wicket/claimwizard/ClaimWizardPanel.java
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/resources/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/resources/META-INF/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/resources/META-INF/services/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/resources/META-INF/services/org.apache.isis.extensions.wicket.ui.ComponentFactory
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/resources/css/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/resources/css/application.css
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/resources/images/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/resources/images/Default.png   (with props)
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/webapp/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/webapp/META-INF/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/webapp/META-INF/MANIFEST.MF
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/webapp/WEB-INF/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/webapp/WEB-INF/lib/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/main/webapp/WEB-INF/web.xml
    incubator/isis/trunk/support/prototype/viewer-wicket/src/test/
    incubator/isis/trunk/support/prototype/viewer-wicket/src/test/java/

Added: incubator/isis/trunk/support/prototype/dom/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/pom.xml?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/dom/pom.xml (added)
+++ incubator/isis/trunk/support/prototype/dom/pom.xml Tue Nov  2 23:33:06 2010
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.support</groupId>
+    	<artifactId>prototype</artifactId>
+		<version>0.1-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>prototype-dom</artifactId>
+	<name>Prototype DOM</name>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.isis</groupId>
+			<artifactId>applib</artifactId>
+		</dependency>
+		
+		<dependency>
+			<groupId>org.apache.isis.viewer</groupId>
+			<artifactId>wicket-applib</artifactId>
+		</dependency>
+		
+        <!-- 
+		<dependency>
+			<groupId>net.sourceforge.isiscontrib.viewer.wicket</groupId>
+			<artifactId>view-calendarviews-applib</artifactId>
+		</dependency>
+		
+		<dependency>
+			<groupId>net.sourceforge.isiscontrib.viewer.wicket</groupId>
+			<artifactId>view-gmap2-applib</artifactId>
+		</dependency>
+		
+		<dependency>
+			<groupId>net.sourceforge.isiscontrib.viewer.wicket</groupId>
+			<artifactId>view-googlecharts-applib</artifactId>
+		</dependency>
+        -->        
+		
+	</dependencies>
+</project>

Added: incubator/isis/trunk/support/prototype/dom/src/main/java/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/java/META-INF/MANIFEST.MF?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/dom/src/main/java/META-INF/MANIFEST.MF (added)
+++ incubator/isis/trunk/support/prototype/dom/src/main/java/META-INF/MANIFEST.MF Tue Nov  2 23:33:06 2010
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Added: incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Approver.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Approver.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Approver.java (added)
+++ incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Approver.java Tue Nov  2 23:33:06 2010
@@ -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.
+ */
+
+
+package org.apache.isis.support.prototype.dom.claim;
+
+public interface Approver {
+	
+}

Added: incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Claim.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Claim.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Claim.java (added)
+++ incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Claim.java Tue Nov  2 23:33:06 2010
@@ -0,0 +1,258 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.isis.support.prototype.dom.claim;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.MaxLength;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.util.Reasons;
+import org.apache.isis.applib.value.Date;
+import org.apache.isis.applib.value.Money;
+
+public class Claim extends AbstractDomainObject /* implements Calendarable */ {
+
+    // {{ Title
+    public String title() {
+        return getStatus() + " - " + getDate();
+    }
+
+    // }}
+
+    // {{ Lifecycle
+    public void created() {
+        status = "New";
+        date = new Date();
+    }
+
+    // }}
+
+    // {{ Rush
+    private boolean rush;
+
+    @MemberOrder(sequence = "1.2")
+    public boolean getRush() {
+        return rush;
+    }
+
+    public void setRush(final boolean flag) {
+        this.rush = flag;
+    }
+
+    // }}
+
+    // {{ Description
+    private String description;
+
+    @MemberOrder(sequence = "1")
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String validateDescription(final String description) {
+        if (description == null)
+            return null;
+        if (description.contains("foobar")) {
+            return "can't contain foobar!";
+        }
+        return null;
+    }
+
+    // }}
+
+    // {{ Date
+    private Date date;
+
+    @MemberOrder(sequence = "2")
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+    // }}
+
+    // {{ Status
+    private String status;
+
+    @Disabled
+    @MemberOrder(sequence = "3")
+    @MaxLength(5)
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    private String ifAlreadySubmitted() {
+        return "Submitted".equals(getStatus()) ? "Already submitted" : null;
+    }
+
+    // }}
+
+    // {{ Claimant
+    private Claimant claimant;
+
+    @Disabled
+    @MemberOrder(sequence = "4")
+    public Claimant getClaimant() {
+        return claimant;
+    }
+
+    public void setClaimant(Claimant claimant) {
+        this.claimant = claimant;
+    }
+
+    // }}
+
+    // {{ Approver
+    private Approver approver;
+
+    // @Disabled
+    @MemberOrder(sequence = "5")
+    @Optional
+    public Approver getApprover() {
+        return approver;
+    }
+
+    public void setApprover(Approver approver) {
+        this.approver = approver;
+    }
+
+    public String disableApprover() {
+        return getDescription().contains("baz") ? "desc contains baz" : null;
+    }
+
+    public String validateApprover(final Approver approver) {
+        if (approver == null)
+            return null;
+        return approver == getClaimant() ? "Can't approve own claims" : null;
+    }
+
+    // }}
+
+    // {{ Items
+    private List<ClaimItem> items = new ArrayList<ClaimItem>();
+
+    @MemberOrder(sequence = "6")
+    public List<ClaimItem> getItems() {
+        return items;
+    }
+
+    public void addToItems(ClaimItem item) {
+        items.add(item);
+    }
+    public void removeFromItems(ClaimItem item) {
+        items.remove(item);
+    }
+    // }}
+
+
+
+    // }}
+
+    // {{ action: Submit
+    public void submit(Approver approver) {
+        setStatus("Submitted");
+        setApprover(approver);
+    }
+
+    public String disableSubmit() {
+        return getStatus().equals("New") ? null
+                : "Claim has already been submitted";
+    }
+
+    public Approver default0Submit() {
+        return getClaimant().getApprover();
+    }
+
+    // }}
+
+    // {{ action: addItem
+    @MemberOrder(sequence = "1")
+    public void addItem(@Named("Days since") int days,
+            @Named("Amount") double amount,
+            @Named("Description") String description) {
+        ClaimItem claimItem = newTransientInstance(ClaimItem.class);
+        Date date = new Date();
+        date = date.add(0, 0, days);
+        claimItem.setDateIncurred(date);
+        claimItem.setDescription(description);
+        claimItem.setAmount(new Money(amount, "USD"));
+        persist(claimItem);
+        addToItems(claimItem);
+    }
+
+    public String disableAddItem() {
+        return Reasons.coalesce(ifAlreadySubmitted());
+    }
+
+    // }}
+
+    
+    // {{ removeItem
+    @MemberOrder(sequence = "2")
+    public void removeItem(final ClaimItem claimItem) {
+        removeFromItems(claimItem);
+    }
+    public String disableRemoveItem() {
+        return Reasons.coalesce(ifAlreadySubmitted());
+    }
+    public ClaimItem default0RemoveItem() {
+        if(getItems().size()>0) {
+            return getItems().get(getItems().size()-1);
+        } else {
+            return null;
+        }
+    }
+    public List<ClaimItem> choices0RemoveItem() {
+        return Collections.unmodifiableList(getItems());
+    }
+    // }}
+
+
+    public String validate() {
+        if (getDescription().contains("foobaz")) {
+            return "no foobaz allowed in description!";
+        }
+        return null;
+    }
+
+//    @Ignore
+//    @Override
+//    public CalendarEvent getCalendarEvent() {
+//        return CalendarEvent.newAllDayEvent(getDate().dateValue());
+//    }
+     
+}

Added: incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimItem.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimItem.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimItem.java (added)
+++ incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimItem.java Tue Nov  2 23:33:06 2010
@@ -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.support.prototype.dom.claim;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.value.Date;
+import org.apache.isis.applib.value.Money;
+
+public class ClaimItem extends AbstractDomainObject {
+
+    // {{ Title
+    public String title() {
+        return getDescription();
+    }
+
+    // }}
+
+    // {{ DateIncurred
+    private Date dateIncurred;
+
+    @MemberOrder(sequence = "1")
+    public Date getDateIncurred() {
+        return dateIncurred;
+    }
+
+    public void setDateIncurred(Date dateIncurred) {
+        this.dateIncurred = dateIncurred;
+    }
+
+    // }}
+
+    // {{ Description
+    private String description;
+
+    @MemberOrder(sequence = "2")
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    // }}
+
+    // {{ Amount
+    private Money amount;
+
+    @MemberOrder(sequence = "3")
+    public Money getAmount() {
+        return amount;
+    }
+
+    public void setAmount(Money price) {
+        this.amount = price;
+    }
+    // }}
+
+}

Added: incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimRepository.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimRepository.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimRepository.java (added)
+++ incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimRepository.java Tue Nov  2 23:33:06 2010
@@ -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.support.prototype.dom.claim;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.NotContributed;
+import org.apache.isis.applib.annotation.NotInRepositoryMenu;
+import org.apache.isis.applib.value.Date;
+
+@Named("Claims")
+public interface ClaimRepository {
+
+    public List<Claim> allClaims();
+
+    public List<Claim> findClaims(@Named("Description") String description);
+
+    public List<Claim> claimsFor(Claimant claimant);
+
+    @NotInRepositoryMenu
+    public List<Claim> claimsSince(Claimant claimant, Date since);
+
+    public ClaimWizard newClaim(Claimant claimant);
+
+    @NotContributed
+    public List<ClaimantExpenseSummary> analyseClaimantExpenses();
+
+}

Added: incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimWizard.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimWizard.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimWizard.java (added)
+++ incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimWizard.java Tue Nov  2 23:33:06 2010
@@ -0,0 +1,332 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.isis.support.prototype.dom.claim;
+
+import java.util.Calendar;
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.Ignore;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.NotPersistable;
+import org.apache.isis.applib.clock.Clock;
+import org.apache.isis.support.prototype.dom.employee.EmployeeRepository;
+import org.apache.isis.viewer.wicket.applib.WizardPageDescription;
+
+@NotPersistable
+public class ClaimWizard extends AbstractDomainObject {
+
+    public enum Page {
+        INTRO("This wizard will take you through the process of creating a claim"), 
+        CLAIMANT("Enter the claimant that is making this claim"), 
+        APPROVER("By default, the claimant's own approver will approve this claim.  " +
+        		"Update here if another approver will approve this claim."), 
+        DESCRIPTION("Update the description if required."), 
+        SUMMARY("Confirm all details, or go back and amend if needed");
+
+        private String description;
+
+        private Page(String description) {
+            this.description = description;
+        }
+        public String getDescription() {
+            return description;
+        }
+
+        public boolean hasPrevious() {
+            return ordinal() > 0;
+        }
+
+        public Page previous() {
+            if (hasPrevious()) {
+                return values()[ordinal() - 1];
+            } else {
+                return this;
+            }
+        }
+
+        public boolean hasNext() {
+            return ordinal() < values().length - 1;
+        }
+
+        public Page next() {
+            if (hasNext()) {
+                return values()[ordinal() + 1];
+            } else {
+                return this;
+            }
+        }
+
+        @Ignore
+        public boolean is(Page... pages) {
+            for (Page page : pages) {
+                if (page == this) {
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+
+    public void created() {
+        setPage(Page.INTRO);
+        setDescription("Expenses for week #" + weekNum());
+    }
+
+    private int weekNum() {
+        return getTimeAsCalendar().get(Calendar.WEEK_OF_YEAR);
+    }
+
+    protected Calendar getTimeAsCalendar() {
+        return Clock.getTimeAsCalendar();
+    }
+
+    // {{ Page
+    private Page page;
+
+    @Hidden
+    public Page getPage() {
+        return page;
+    }
+
+    public void setPage(final Page page) {
+        this.page = page;
+    }
+
+    // }}
+
+    // {{ Page Description
+    @WizardPageDescription
+    @MemberOrder(sequence = "1")
+    public String getPageDescription() {
+        return getPage().getDescription();
+    }
+
+    // }}
+
+    // {{ Claimant
+    private Claimant claimant;
+
+    @MemberOrder(sequence = "2")
+    public Claimant getClaimant() {
+        return claimant;
+    }
+
+    public void setClaimant(final Claimant claimant) {
+        this.claimant = claimant;
+    }
+
+    public void modifyClaimant(final Claimant claimant) {
+        Claimant currentClaimant = getClaimant();
+        // check for no-op
+        if (claimant == null || claimant.equals(currentClaimant)) {
+            return;
+        }
+        // associate new
+        setClaimant(claimant);
+        // additional business logic
+        onModifyClaimant(currentClaimant, claimant);
+    }
+
+    public void clearClaimant() {
+        Claimant currentClaimant = getClaimant();
+        // check for no-op
+        if (currentClaimant == null) {
+            return;
+        }
+        // dissociate existing
+        setClaimant(null);
+        // additional business logic
+        onClearClaimant(currentClaimant);
+    }
+
+    protected void onModifyClaimant(final Claimant oldClaimant,
+            final Claimant newClaimant) {
+        setApprover(newClaimant.getApprover());
+    }
+
+    protected void onClearClaimant(final Claimant oldClaimant) {
+    }
+
+    @SuppressWarnings("unchecked")
+    public List<Claimant> choicesClaimant() {
+        List allEmployees = employeeRepository.allEmployees();
+        return allEmployees;
+    }
+
+    public String disableClaimant() {
+        return coalesce(claimCreated(), confirmIfOnSummaryPage());
+    }
+
+    public boolean hideClaimant() {
+        return !getPage().is(Page.CLAIMANT, Page.SUMMARY);
+    }
+
+    // }}
+
+    // {{ Approver
+    private Approver approver;
+
+    @MemberOrder(sequence = "3")
+    public Approver getApprover() {
+        return approver;
+    }
+
+    public void setApprover(final Approver approver) {
+        this.approver = approver;
+    }
+
+    public String disableApprover() {
+        return coalesce(claimCreated(), confirmIfOnSummaryPage());
+    }
+
+    public boolean hideApprover() {
+        return !getPage().is(Page.APPROVER, Page.SUMMARY);
+    }
+
+    // }}
+
+    // {{ Description
+    private String description;
+
+    @MemberOrder(sequence = "4")
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(final String description) {
+        this.description = description;
+    }
+
+    public String disableDescription() {
+        return coalesce(claimCreated(), confirmIfOnSummaryPage());
+    }
+
+    public boolean hideDescription() {
+        return !getPage().is(Page.DESCRIPTION, Page.SUMMARY);
+    }
+    
+    private String claimCreated() {
+        return claim != null ? "Claim created" : null;
+    }
+
+    // }}
+
+    // {{ Claim
+    private Claim claim;
+
+    @Disabled
+    @MemberOrder(sequence = "5")
+    public Claim getClaim() {
+        return claim;
+    }
+
+    public void setClaim(final Claim claim) {
+        this.claim = claim;
+    }
+
+    public boolean hideClaim() {
+        return claim == null;
+    }
+
+    // }}
+
+    // {{ previous
+    @MemberOrder(sequence = "1")
+    public void previous() {
+        setPage(getPage().previous());
+    }
+
+    public String disablePrevious() {
+        return coalesce(noPreviousPage(), confirmIfOnSummaryPage());
+    }
+
+    private String noPreviousPage() {
+        return !getPage().hasPrevious() ? "no previous page" : null;
+    }
+
+    // }}
+
+    // {{ next
+    @MemberOrder(sequence = "2")
+    public void next() {
+        setPage(getPage().next());
+    }
+
+    public String disableNext() {
+        return coalesce(noNextPage(), confirmIfOnSummaryPage());
+    }
+
+    private String noNextPage() {
+        return !getPage().hasNext() ? "no next page" : null;
+    }
+
+    // }}
+
+    // {{ finish
+    @MemberOrder(sequence = "3")
+    public Claim finish() {
+        Claim claim = newTransientInstance(Claim.class);
+        claim.setClaimant(getClaimant());
+        claim.setApprover(getApprover());
+        claim.setDescription(getDescription());
+
+        setClaim(claim);
+        persist(claim);
+        return claim;
+    }
+
+    public String disableFinish() {
+        if (getPage().hasNext()) {
+            return "wizard has further pages to complete";
+        }
+        return getContainer().validate(this);
+    }
+
+    // }}
+
+    // {{ helpers
+    private String confirmIfOnSummaryPage() {
+        return getPage().is(Page.SUMMARY) ? "confirm" : null;
+    }
+
+    private static String coalesce(String... strings) {
+        for (String string : strings) {
+            if (string != null)
+                return string;
+        }
+        return null;
+    }
+
+    // }}
+
+    // {{ injected: EmployeeRepository
+    private EmployeeRepository employeeRepository;
+
+    public void setEmployeeRepository(
+            final EmployeeRepository employeeRepository) {
+        this.employeeRepository = employeeRepository;
+    }
+    // }}
+
+}

Added: incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Claimant.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Claimant.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Claimant.java (added)
+++ incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/Claimant.java Tue Nov  2 23:33:06 2010
@@ -0,0 +1,29 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.isis.support.prototype.dom.claim;
+
+public interface Claimant {
+
+    Approver getApprover();
+
+    String title();
+
+}

Added: incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimantExpenseSummary.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimantExpenseSummary.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimantExpenseSummary.java (added)
+++ incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/claim/ClaimantExpenseSummary.java Tue Nov  2 23:33:06 2010
@@ -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.support.prototype.dom.claim;
+
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.Ignore;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.NotPersistable;
+import org.apache.isis.applib.value.Money;
+
+@NotPersistable
+public class ClaimantExpenseSummary /* implements  PieChartable, 
+        Comparable<ClaimantExpenseSummary> */ {
+
+    // {{ Identification
+    public String title() {
+        return getClaimant() != null ? getClaimant().title() : "(untitled)";
+    }
+
+    // }}
+
+    // {{ Claimant
+    private Claimant claimant;
+
+    @MemberOrder(sequence = "1")
+    public Claimant getClaimant() {
+        return claimant;
+    }
+
+    public void setClaimant(final Claimant claimant) {
+        this.claimant = claimant;
+    }
+
+    // }}
+
+    // {{ Amount
+    private Money amount;
+
+    @Disabled
+    @MemberOrder(sequence = "1")
+    public Money getAmount() {
+        return amount;
+    }
+
+    public void setAmount(final Money amount) {
+        this.amount = amount;
+    }
+
+    // }}
+
+    // {{ programmatic
+    @Ignore
+    public void addAmount(Money amount) {
+        if (this.amount == null) {
+            this.amount = amount;
+        } else {
+            this.amount = this.amount.add(amount);
+        }
+    }
+
+    // }}
+
+//    // {{ PieChartable impl
+//    @Ignore
+//    @Override
+//    public double getPieChartValue() {
+//        return getAmount().doubleValue();
+//    }
+//
+//    @Ignore
+//    @Override
+//    public String getPieChartLabel() {
+//        return title();
+//    }
+//
+//    // }}
+//    @Override
+//    public int compareTo(ClaimantExpenseSummary o) {
+//        if (getPieChartValue() < o.getPieChartValue())
+//            return -1;
+//        if (getPieChartValue() > o.getPieChartValue())
+//            return +1;
+//        return 0;
+//    }
+
+}

Added: incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/employee/Employee.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/employee/Employee.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/employee/Employee.java (added)
+++ incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/employee/Employee.java Tue Nov  2 23:33:06 2010
@@ -0,0 +1,108 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.isis.support.prototype.dom.employee;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.support.prototype.dom.claim.Approver;
+import org.apache.isis.support.prototype.dom.claim.Claimant;
+
+public class Employee extends AbstractDomainObject implements Claimant,
+        Approver /* , Locatable */{
+
+    // {{ Title
+    public String title() {
+        return getName();
+    }
+
+    // }}
+
+    // {{ Icon
+    public String iconName() {
+        return getName().replaceAll(" ", "");
+    }
+
+    // }}
+
+    // {{ Name
+    private String name;
+
+    @MemberOrder(sequence = "1")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String lastName) {
+        this.name = lastName;
+    }
+
+    // }}
+
+    // {{ Approver
+    private Approver approver;
+
+    @MemberOrder(sequence = "2")
+    public Approver getApprover() {
+        return approver;
+    }
+
+    public void setApprover(Approver approver) {
+        this.approver = approver;
+    }
+
+    // }}
+
+//    // {{ Location
+//    private Location location;
+//
+//    @Disabled
+//    @MemberOrder(sequence = "1")
+//    public Location getLocation() {
+//        return location;
+//    }
+//
+//    public void setLocation(final Location location) {
+//        this.location = location;
+//    }
+//    // }}
+    
+
+    
+    // {{ Limit
+    private int limit;
+
+    @Optional
+    @MemberOrder(sequence = "1")
+    public int getLimit() {
+        return limit;
+    }
+
+    public void setLimit(final int limit) {
+        this.limit = limit;
+    }
+    // }}
+
+
+    
+}
+

Added: incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/employee/EmployeeRepository.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/employee/EmployeeRepository.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/employee/EmployeeRepository.java (added)
+++ incubator/isis/trunk/support/prototype/dom/src/main/java/org/apache/isis/support/prototype/dom/employee/EmployeeRepository.java Tue Nov  2 23:33:06 2010
@@ -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.support.prototype.dom.employee;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.Named;
+
+@Named("Employees")
+public interface EmployeeRepository {
+
+    public List<Employee> allEmployees();
+
+    public List<Employee> findEmployees(@Named("Name") String name);
+}

Added: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/Claim.gif
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/resources/images/Claim.gif?rev=1030286&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/Claim.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/ClaimItem.gif
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/resources/images/ClaimItem.gif?rev=1030286&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/ClaimItem.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/ClaimRepository.gif
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/resources/images/ClaimRepository.gif?rev=1030286&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/ClaimRepository.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/Employee.gif
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/resources/images/Employee.gif?rev=1030286&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/Employee.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/EmployeeRepository.gif
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/resources/images/EmployeeRepository.gif?rev=1030286&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/EmployeeRepository.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/FredSmith.jpg
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/resources/images/FredSmith.jpg?rev=1030286&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/FredSmith.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/SamJones.jpg
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/resources/images/SamJones.jpg?rev=1030286&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/SamJones.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/TomBrown.jpg
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/dom/src/main/resources/images/TomBrown.jpg?rev=1030286&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/support/prototype/dom/src/main/resources/images/TomBrown.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/isis/trunk/support/prototype/fixture/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/fixture/pom.xml?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/fixture/pom.xml (added)
+++ incubator/isis/trunk/support/prototype/fixture/pom.xml Tue Nov  2 23:33:06 2010
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.support</groupId>
+        <artifactId>prototype</artifactId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>prototype-fixture</artifactId>
+	<name>Prototype Fixtures</name>
+
+	<dependencies>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>prototype-objstore-dflt</artifactId>
+		</dependency>
+	</dependencies>
+
+</project>

Added: incubator/isis/trunk/support/prototype/fixture/src/main/java/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/fixture/src/main/java/META-INF/MANIFEST.MF?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/fixture/src/main/java/META-INF/MANIFEST.MF (added)
+++ incubator/isis/trunk/support/prototype/fixture/src/main/java/META-INF/MANIFEST.MF Tue Nov  2 23:33:06 2010
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Added: incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/prototype/fixture/ClaimsFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/prototype/fixture/ClaimsFixture.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/prototype/fixture/ClaimsFixture.java (added)
+++ incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/prototype/fixture/ClaimsFixture.java Tue Nov  2 23:33:06 2010
@@ -0,0 +1,105 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.isis.support.prototype.fixture;
+
+import java.awt.Image;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.applib.value.Date;
+import org.apache.isis.applib.value.Money;
+import org.apache.isis.support.prototype.dom.claim.Claim;
+import org.apache.isis.support.prototype.dom.claim.ClaimItem;
+import org.apache.isis.support.prototype.dom.employee.Employee;
+
+
+public class ClaimsFixture extends AbstractFixture {
+
+    @Override
+    public void install() {
+        Employee fred = createEmployee("Fred Smith", null /*, new Location().north(0.5)*/);
+        Employee tom = createEmployee("Tom Brown", fred /*, new Location().west(0.5)*/);
+        createEmployee("Sam Jones", fred /*, new Location().west(1).south(0.25)*/);
+
+        Claim claim = createClaim(tom, -16, "Meeting with client");
+        addItem(claim, -16, 38.50, "Lunch with client");
+        addItem(claim, -16, 16.50, "Euston - Mayfair (return)");
+        
+        claim = createClaim(tom, -18, "Meeting in city office");
+        addItem(claim, -16, 18.00, "Car parking");
+        addItem(claim, -16, 26.50, "Reading - London (return)");
+
+        claim = createClaim(fred, -14, "Meeting at clients");
+        addItem(claim, -14, 18.00, "Car parking");
+        addItem(claim, -14, 26.50, "Reading - London (return)");
+
+    }
+    
+    private Employee createEmployee(String name, Employee approver /*, Location location*/) {
+        Employee claimant;
+        claimant = newTransientInstance(Employee.class);
+        claimant.setName(name);
+        claimant.setApprover(approver);
+        //claimant.setLocation(location);
+        persist(claimant);
+        return claimant;
+    }
+
+    @SuppressWarnings("unused")
+    private Image asImage(String name) {
+        String imageFileName = asImageFileName(name);
+        try {
+            return ImageIO.read(new File(imageFileName));
+        } catch (IOException e) {
+            return null;
+        }
+    }
+
+    private String asImageFileName(String name) {
+        return "images/"+name.replaceAll("[ ]", "")+".jpg";
+    }
+
+    private Claim createClaim(Employee claimant, int days, String description) { 
+        Claim claim = newTransientInstance(Claim.class);
+        claim.setClaimant(claimant);
+        claim.setDescription(description);
+        Date date = new Date();
+        date = date.add(0,0, days);
+        claim.setDate(date);
+        persist(claim);
+        return claim;
+    }
+
+    private void addItem(Claim claim, int days, double amount, String description) { 
+        ClaimItem claimItem = newTransientInstance(ClaimItem.class);
+        Date date = new Date();
+        date = date.add(0,0, days);
+        claimItem.setDateIncurred(date);
+        claimItem.setDescription(description);
+        claimItem.setAmount(new Money(amount, "USD"));
+        persist(claimItem);
+        claim.addToItems(claimItem);
+    }
+
+}

Added: incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/prototype/fixture/ClaimsLogonFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/prototype/fixture/ClaimsLogonFixture.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/prototype/fixture/ClaimsLogonFixture.java (added)
+++ incubator/isis/trunk/support/prototype/fixture/src/main/java/org/apache/isis/support/prototype/fixture/ClaimsLogonFixture.java Tue Nov  2 23:33:06 2010
@@ -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.support.prototype.fixture;
+
+import org.apache.isis.applib.fixtures.LogonFixture;
+
+public class ClaimsLogonFixture extends LogonFixture {
+
+	public ClaimsLogonFixture() {
+		super("bill");
+	}
+
+}

Added: incubator/isis/trunk/support/prototype/objstore-default/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/objstore-default/pom.xml?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/objstore-default/pom.xml (added)
+++ incubator/isis/trunk/support/prototype/objstore-default/pom.xml Tue Nov  2 23:33:06 2010
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.support</groupId>
+        <artifactId>prototype</artifactId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>prototype-objstore-dflt</artifactId>
+	<name>Prototype Repositories (for ObjectStore Default)</name>
+
+	<dependencies>
+	
+		<!-- other modules in this project -->
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>prototype-dom</artifactId>
+		</dependency>
+		
+	</dependencies>
+
+</project>

Added: incubator/isis/trunk/support/prototype/objstore-default/src/main/java/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/objstore-default/src/main/java/META-INF/MANIFEST.MF?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/objstore-default/src/main/java/META-INF/MANIFEST.MF (added)
+++ incubator/isis/trunk/support/prototype/objstore-default/src/main/java/META-INF/MANIFEST.MF Tue Nov  2 23:33:06 2010
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Added: incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/claim/ClaimRepositoryInMemory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/claim/ClaimRepositoryInMemory.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/claim/ClaimRepositoryInMemory.java (added)
+++ incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/claim/ClaimRepositoryInMemory.java Tue Nov  2 23:33:06 2010
@@ -0,0 +1,134 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.isis.support.prototype.objstore.dflt.claim;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.Filter;
+import org.apache.isis.applib.value.Date;
+import org.apache.isis.applib.value.Money;
+import org.apache.isis.support.prototype.dom.claim.Claim;
+import org.apache.isis.support.prototype.dom.claim.ClaimItem;
+import org.apache.isis.support.prototype.dom.claim.ClaimRepository;
+import org.apache.isis.support.prototype.dom.claim.ClaimWizard;
+import org.apache.isis.support.prototype.dom.claim.Claimant;
+import org.apache.isis.support.prototype.dom.claim.ClaimantExpenseSummary;
+
+import com.google.common.collect.Maps;
+
+
+public class ClaimRepositoryInMemory extends AbstractFactoryAndRepository implements ClaimRepository {
+
+	// {{ Id, iconName
+    public String getId() {
+        return "claims";
+    }
+    public String iconName() {
+        return "ClaimRepository";
+    }
+    // }}
+
+    
+    // {{ action: allClaims
+    public List<Claim> allClaims() {
+        return allInstances(Claim.class);
+    }
+    // }}
+
+    
+    // {{ action: findClaims
+    public List<Claim> findClaims(String description
+    		) {
+        return allMatches(Claim.class, description);
+    }
+    // }}
+
+    
+    // {{ action: claimsFor
+    public List<Claim> claimsFor(Claimant claimant) {
+        Claim pattern = newTransientInstance(Claim.class);
+        pattern.setStatus(null);
+        pattern.setDate(null);
+        pattern.setClaimant(claimant);
+        return allMatches(Claim.class, pattern);
+    }
+    // }}
+    
+    // {{ action: newClaim
+	public ClaimWizard newClaim(Claimant claimant) {
+        final ClaimWizard claimWizard = newTransientInstance(ClaimWizard.class);
+        claimWizard.modifyClaimant(claimant);
+		return claimWizard;
+	}
+	// }}
+	
+	
+    // {{ action: claimsSince
+	@Override
+	public List<Claim> claimsSince(final Claimant claimant, final Date since) {
+		return allMatches(Claim.class, new Filter<Claim>(){
+
+			@Override
+			public boolean accept(Claim pojo) {
+				return pojo.getClaimant() == claimant && pojo.getDate() != null && pojo.getDate().isGreaterThan(since);
+			}});
+	}
+	public String validateClaimsSince(final Claimant claimant, final Date since) {
+		Date today = new Date();
+		return since.isGreaterThan(today)?"cannot be after today":null;
+	}
+	// }}
+	
+	// {{ analyseClaimantExpenses
+	@Override
+	public List<ClaimantExpenseSummary> analyseClaimantExpenses() {
+		final Map<Claimant, ClaimantExpenseSummary> summaries =
+			Maps.newHashMap();
+		final List<Claim> claims = allInstances(Claim.class);
+		for (Claim claim : claims) {
+			final Claimant claimant = claim.getClaimant();
+			ClaimantExpenseSummary summary = findOrCreateSummary(claimant, summaries);
+			final List<ClaimItem> items = claim.getItems();
+			for (ClaimItem item : items) {
+				final Money amount = item.getAmount();
+				summary.addAmount(amount);
+			}
+		}
+		return new ArrayList<ClaimantExpenseSummary>(summaries.values());
+	// }}
+
+
+	}
+	private ClaimantExpenseSummary findOrCreateSummary(Claimant claimant,
+			Map<Claimant, ClaimantExpenseSummary> summaries) {
+		ClaimantExpenseSummary summary = summaries.get(claimant);
+		if (summary == null) {
+			summary = newTransientInstance(ClaimantExpenseSummary.class);
+			summary.setClaimant(claimant);
+			summaries.put(claimant, summary);
+		}
+		return summary;
+	}
+    
+}

Added: incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/employee/EmployeeRepositoryInMemory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/employee/EmployeeRepositoryInMemory.java?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/employee/EmployeeRepositoryInMemory.java (added)
+++ incubator/isis/trunk/support/prototype/objstore-default/src/main/java/org/apache/isis/support/prototype/objstore/dflt/employee/EmployeeRepositoryInMemory.java Tue Nov  2 23:33:06 2010
@@ -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.support.prototype.objstore.dflt.employee;
+
+import java.util.List;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.support.prototype.dom.employee.Employee;
+import org.apache.isis.support.prototype.dom.employee.EmployeeRepository;
+
+
+public class EmployeeRepositoryInMemory extends AbstractFactoryAndRepository implements EmployeeRepository {
+
+	// {{ Id, iconName
+    public String getId() {
+        return "claimants";
+    }
+    public String iconName() {
+        return "EmployeeRepository";
+    }
+    // }}
+
+    
+    // {{ action: allEmployees
+    public List<Employee> allEmployees() {
+        return allInstances(Employee.class);
+    }
+    // }}
+
+    
+    // {{ action: findEmployees
+    public List<Employee> findEmployees(String name) {
+        return allMatches(Employee.class, name);
+    }
+    // }}
+}

Added: incubator/isis/trunk/support/prototype/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/pom.xml?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/pom.xml (added)
+++ incubator/isis/trunk/support/prototype/pom.xml Tue Nov  2 23:33:06 2010
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.support</groupId>
+	<artifactId>prototype</artifactId>
+	<version>0.1-SNAPSHOT</version>
+	
+	<name>Prototype App</name>
+	
+	<packaging>pom</packaging>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<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.4.2</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>
+				<configuration>
+					<excludes>
+						<exclude>**/Test*.java</exclude>
+					</excludes>
+					<showSuccess>false</showSuccess>
+				</configuration>
+				<executions>
+					<execution>
+						<phase>test</phase>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+	<modules>
+		<module>dom</module>
+		<module>fixture</module>
+		<module>objstore-default</module>
+		<module>quickrun</module>
+		<module>viewer-html</module>
+		<module>viewer-wicket</module>
+	</modules>
+
+	<dependencyManagement>
+		<dependencies>
+
+			<!-- Apache Isis -->
+			<dependency>
+				<groupId>org.apache.isis</groupId>
+				<artifactId>release</artifactId>
+				<version>0.1-SNAPSHOT</version>
+				<type>pom</type>
+				<scope>import</scope>
+			</dependency>
+
+			<!-- Isis Wicket Viewer -->
+			<dependency>
+				<groupId>org.apache.isis.viewer</groupId>
+				<artifactId>wicket-applib</artifactId>
+				<version>0.1-SNAPSHOT</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.apache.isis.viewer</groupId>
+				<artifactId>wicket-viewer</artifactId>
+				<version>0.1-SNAPSHOT</version>
+			</dependency>
+
+			<!-- this project's own modules -->
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>prototype-dom</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>prototype-domsvc</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>prototype-fixture</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>prototype-quickrun</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>prototype-objstore-dflt</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>viewer-dnd</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>viewer-html</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>viewer-scimpi</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>viewer-wicket</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>viewer-restful</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>tests-bdd</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>${project.groupId}</groupId>
+				<artifactId>tests-unit</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+
+			<!-- Isis Wicket Viewer: view API extensions -->
+            <!-- 
+			<dependency>
+				<groupId>net.sf.isiscontrib.viewer.wicket</groupId>
+				<artifactId>view-gmap2-applib</artifactId>
+				<version>0.1-SNAPSHOT</version>
+			</dependency>
+
+			<dependency>
+				<groupId>net.sf.isiscontrib.viewer.wicket</groupId>
+				<artifactId>view-gmap2-view</artifactId>
+				<version>0.1-SNAPSHOT</version>
+			</dependency>
+
+			<dependency>
+				<groupId>net.sf.isiscontrib.viewer.wicket</groupId>
+				<artifactId>view-googlecharts-applib</artifactId>
+				<version>0.1-SNAPSHOT</version>
+			</dependency>
+
+			<dependency>
+				<groupId>net.sf.isiscontrib.viewer.wicket</groupId>
+				<artifactId>view-googlecharts-view</artifactId>
+				<version>0.1-SNAPSHOT</version>
+			</dependency>
+
+			<dependency>
+				<groupId>net.sf.isiscontrib.viewer.wicket</groupId>
+				<artifactId>view-calendarviews-applib</artifactId>
+				<version>0.1-SNAPSHOT</version>
+			</dependency>
+		
+			<dependency>
+				<groupId>net.sf.isiscontrib.viewer.wicket</groupId>
+				<artifactId>view-calendarviews-view</artifactId>
+				<version>0.1-SNAPSHOT</version>
+			</dependency>
+		
+			<dependency>
+				<groupId>net.sf.isiscontrib.viewer.wicket</groupId>
+				<artifactId>view-cooldatasoftmenu-view</artifactId>
+				<version>0.1-SNAPSHOT</version>
+			</dependency>
+            -->            
+
+			<!-- 3rd party -->
+			<dependency>
+				<groupId>com.google.collections</groupId>
+				<artifactId>google-collections</artifactId>
+				<version>1.0</version>
+			</dependency>
+
+		</dependencies>
+	</dependencyManagement>
+	
+	<dependencies>
+		<dependency>
+			<groupId>com.google.collections</groupId>
+			<artifactId>google-collections</artifactId>
+		</dependency>
+	</dependencies>
+
+
+</project>

Added: incubator/isis/trunk/support/prototype/quickrun/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/quickrun/pom.xml?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/quickrun/pom.xml (added)
+++ incubator/isis/trunk/support/prototype/quickrun/pom.xml Tue Nov  2 23:33:06 2010
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.support</groupId>
+    	<artifactId>prototype</artifactId>
+		<version>0.1-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>prototype-quickrun</artifactId>
+	<name>Prototype Quick Run</name>
+
+	<properties>
+		<jetty.version>6.1.4</jetty.version>
+	</properties>
+
+	<dependencies>
+		<!-- other modules in this project -->
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>prototype-fixture</artifactId>
+		</dependency>
+
+		<!-- apache isis -->
+        <dependency>
+			<groupId>org.apache.isis.core</groupId>
+            <artifactId>webserver</artifactId>
+        </dependency>
+		<dependency>
+			<groupId>org.apache.isis.viewer</groupId>
+			<artifactId>dnd</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.isis.viewer</groupId>
+			<artifactId>html</artifactId>
+		</dependency>
+
+	    <dependency>
+			<groupId>org.apache.isis.defaults</groupId>
+	        <artifactId>bytecode</artifactId>
+	    </dependency>
+	    <dependency>
+			<groupId>org.apache.isis.alternatives.bytecode</groupId>
+	        <artifactId>javassist</artifactId>
+	    </dependency>
+
+		<dependency>
+			<groupId>org.apache.isis.alternatives.objectstore</groupId>
+			<artifactId>xml</artifactId>
+		</dependency>
+        
+		<!--  JETTY DEPENDENCIES FOR TESTING  -->
+		<dependency>
+			<groupId>org.mortbay.jetty</groupId>
+			<artifactId>jetty</artifactId>
+			<version>${jetty.version}</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.mortbay.jetty</groupId>
+			<artifactId>jetty-util</artifactId>
+			<version>${jetty.version}</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.mortbay.jetty</groupId>
+			<artifactId>jetty-management</artifactId>
+			<version>${jetty.version}</version>
+			<scope>provided</scope>
+		</dependency>
+
+	</dependencies>
+
+</project>

Added: incubator/isis/trunk/support/prototype/viewer-html/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/viewer-html/pom.xml?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/viewer-html/pom.xml (added)
+++ incubator/isis/trunk/support/prototype/viewer-html/pom.xml Tue Nov  2 23:33:06 2010
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.support</groupId>
+        <artifactId>prototype</artifactId>
+        <version>0.1-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>prototype-viewer-html</artifactId>
+	<name>Prototype HTML Viewer</name>
+	
+	<packaging>war</packaging>
+
+	<build>
+		<plugins>
+            <plugin>
+                <groupId>org.mortbay.jetty</groupId>
+                <artifactId>maven-jetty-plugin</artifactId>
+            </plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+	
+		<!-- other modules in this project -->
+
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>prototype-fixture</artifactId>
+		</dependency>
+
+
+
+		<!-- Isis -->
+		<dependency>
+	        <groupId>org.apache.isis.viewer</groupId>
+			<artifactId>html</artifactId>
+		</dependency>
+		<dependency>
+	        <groupId>org.apache.isis.alternatives.objectstore</groupId>
+			<artifactId>xml</artifactId>
+		</dependency>
+		<!--
+		comment in to run simple web server (uses Jetty)
+		<dependency>
+	        <groupId>org.apache.isis.core</groupId>
+			<artifactId>webserver</artifactId>
+		</dependency>
+		-->
+
+	    <dependency>
+	        <groupId>org.apache.isis.defaults</groupId>
+	        <artifactId>bytecode</artifactId>
+	    </dependency>
+	    <dependency>
+	        <groupId>org.apache.isis.alternatives.bytecode</groupId>
+	        <artifactId>javassist</artifactId>
+	    </dependency>
+
+
+	</dependencies>
+
+</project>

Added: incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/allow
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/allow?rev=1030286&view=auto
==============================================================================
    (empty)

Added: incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/images/Default.png
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/images/Default.png?rev=1030286&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/images/Default.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/isis.properties
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/isis.properties?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/isis.properties (added)
+++ incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/isis.properties Tue Nov  2 23:33:06 2010
@@ -0,0 +1,29 @@
+isis.services.prefix = org.apache.isis.examples.apps.wicket.claims.service
+isis.services = employee.EmployeeRepositoryInMemory, \
+                claim.ClaimRepositoryInMemory
+
+isis.fixtures.prefix= org.apache.isis.examples.apps.wicket.claims.fixture
+isis.fixtures= ClaimsFixture
+
+
+isis.reflector.class-substitutor=org.apache.isis.bytecode.cglib.specloader.classsubstitutor.CglibClassSubstitutor
+#isis.reflector.class-substitutor=org.apache.isis.bytecode.javassist.specloader.classsubstitutor.JavassistClassSubstitutor
+#isis.reflector.class-substitutor=org.apache.isis.metamodel.specloader.classsubstitutor.ClassSubstitutorIdentity
+
+
+isis.persistor.object-factory=org.apache.isis.bytecode.cglib.persistence.objectfactory.CglibObjectFactory
+#isis.persistor.object-factory=org.apache.isis.bytecode.javassist.persistence.objectfactory.JavassistObjectFactory
+#isis.persistor.object-factory=org.apache.isis.runtime.persistence.objectfactory.ObjectFactoryBasic
+
+
+isis.persistor.domain-object-container=org.apache.isis.metamodel.services.container.DomainObjectContainerDefault
+#isis.persistor.domain-object-container=org.apache.isis.plugins.headless.viewer.DomainObjectContainerHeadlessViewer
+
+
+#isis.reflector.facets.include=org.apache.isis.runtime.authorization.standard.AuthorizationFacetFactoryImpl
+#isis.authorization.learn=true
+
+isis.reflector.facets.include=org.apache.isis.viewer.wicket.metamodel.facets.WizardPageDescriptionAnnotationFacetFactory
+
+#isis.persistor=in-memory
+isis.xmlos.dir=/tmp/xml

Added: incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/passwords
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/passwords?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/passwords (added)
+++ incubator/isis/trunk/support/prototype/viewer-html/src/main/resources/passwords Tue Nov  2 23:33:06 2010
@@ -0,0 +1,4 @@
+sven:pass
+dick:pass
+bob:pass
+joe:pass

Added: incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/META-INF/MANIFEST.MF?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/META-INF/MANIFEST.MF (added)
+++ incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/META-INF/MANIFEST.MF Tue Nov  2 23:33:06 2010
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+

Added: incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/logging.properties
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/logging.properties?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/logging.properties (added)
+++ incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/logging.properties Tue Nov  2 23:33:06 2010
@@ -0,0 +1,22 @@
+# apache's log4j is used to provide system logging.
+#log4j.rootCategory=DEBUG, Console, File
+log4j.rootCategory=INFO, Console, File
+
+# 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.maxFileSize=500KB
+#log4j.appender.File.maxBackupIndex=1
+log4j.appender.File.layout=org.apache.log4j.PatternLayout
+log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p]  %m%n
+
+
+
+

Added: incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/web.xml?rev=1030286&view=auto
==============================================================================
--- incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/web.xml (added)
+++ incubator/isis/trunk/support/prototype/viewer-html/src/main/webapp/WEB-INF/web.xml Tue Nov  2 23:33:06 2010
@@ -0,0 +1,24 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+<web-app>
+    <display-name>Wicket Objects Viewer</display-name>
+
+	<filter>
+		<filter-name>wicket.claims</filter-name>
+		<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+		<init-param>
+			<param-name>applicationClassName</param-name>
+			<param-value>org.apache.isis.viewer.wicket.viewer.IsisWicketApplication</param-value>
+			<!--
+			<param-value>org.apache.isis.examples.apps.wicket.claims.ClaimsApplication</param-value>
+			-->
+		</init-param>
+	</filter>
+
+	<filter-mapping>
+		<filter-name>wicket.claims</filter-name>
+		<url-pattern>/*</url-pattern>
+	</filter-mapping>
+
+</web-app>