incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1206679 - in /incubator/isis/trunk/examples: onlinedemo/ onlinedemo/dom/ onlinedemo/dom/src/main/java/dom/todo/ onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ onlinedemo/dom/src/main/java/org/apache/isis/exampl...
Date Sun, 27 Nov 2011 07:59:44 GMT
Author: danhaywood
Date: Sun Nov 27 07:59:35 2011
New Revision: 1206679

URL: http://svn.apache.org/viewvc?rev=1206679&view=rev
Log:
ISIS-130: more on the online demo app

Added:
    incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/
      - copied from r1206608, incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/todo/
    incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Categories.java
    incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Category.java
    incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItems.java
      - copied, changed from r1206608, incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/todo/ToDoItemRepository.java
    incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/users/
    incubator/isis/trunk/examples/onlinedemo/dom/src/main/resources/images/Category.gif  
(with props)
    incubator/isis/trunk/examples/onlinedemo/dom/src/main/resources/images/User.gif   (with
props)
    incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/
      - copied from r1206608, incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/todo/
    incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/
    incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/CategoriesDefault.java
    incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/ToDoItemsDefault.java
      - copied, changed from r1206608, incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/todo/ToDoItemRepositoryDefault.java
Removed:
    incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/dom/todo/
    incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItemRepository.java
    incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/todo/
    incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/fixture/todo/
    incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/todo/
    incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/objstore/dflt/todo/
    incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/todo/
Modified:
    incubator/isis/trunk/examples/onlinedemo/   (props changed)
    incubator/isis/trunk/examples/onlinedemo/dom/   (props changed)
    incubator/isis/trunk/examples/onlinedemo/dom/pom.xml
    incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItem.java
    incubator/isis/trunk/examples/onlinedemo/fixture/   (props changed)
    incubator/isis/trunk/examples/onlinedemo/fixture/pom.xml
    incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/ToDoItemsFixture.java
    incubator/isis/trunk/examples/onlinedemo/objstore-default/   (props changed)
    incubator/isis/trunk/examples/onlinedemo/objstore-default/pom.xml
    incubator/isis/trunk/examples/onlinedemo/pom.xml
    incubator/isis/trunk/examples/onlinedemo/webapp/   (props changed)
    incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/WEB-INF/isis.properties
    incubator/isis/trunk/examples/quickstart/viewer-json/pom.xml
    incubator/isis/trunk/examples/quickstart/viewer-json/src/main/webapp/WEB-INF/web.xml

Propchange: incubator/isis/trunk/examples/onlinedemo/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Nov 27 07:59:35 2011
@@ -0,0 +1,2 @@
+.settings
+.project

Propchange: incubator/isis/trunk/examples/onlinedemo/dom/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Nov 27 07:59:35 2011
@@ -0,0 +1,4 @@
+.settings
+.classpath
+.project
+target

Modified: incubator/isis/trunk/examples/onlinedemo/dom/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/dom/pom.xml?rev=1206679&r1=1206678&r2=1206679&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/dom/pom.xml (original)
+++ incubator/isis/trunk/examples/onlinedemo/dom/pom.xml Sun Nov 27 07:59:35 2011
@@ -19,6 +19,11 @@
 --><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>
 
+    <!--
+    mvn javadoc:javadoc
+    mvn org.apache.maven.plugins:maven-jxr-plugin:2.2:jxr 
+    -->
+    
 	<parent>
     	<groupId>org.apache.isis.examples</groupId>
     	<artifactId>onlinedemo</artifactId>
@@ -26,7 +31,7 @@
 	</parent>
 
 	<artifactId>onlinedemo-dom</artifactId>
-	<name>Quickstart DOM</name>
+	<name>Online Demo DOM</name>
 
 	<dependencies>
 		<dependency>
@@ -34,5 +39,5 @@
 			<artifactId>applib</artifactId>
 		</dependency>
     </dependencies>
-    
+
 </project>

Added: incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Categories.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Categories.java?rev=1206679&view=auto
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Categories.java
(added)
+++ incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Categories.java
Sun Nov 27 07:59:35 2011
@@ -0,0 +1,37 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.examples.onlinedemo.dom.items;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.QueryOnly;
+
+@Named("Categories")
+public interface Categories {
+
+    @QueryOnly
+    @MemberOrder(sequence="1")
+    public List<Category> all();
+
+    public Category newCategory(
+        @Named("Description") String description);
+}

Added: incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Category.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Category.java?rev=1206679&view=auto
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Category.java
(added)
+++ incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/Category.java
Sun Nov 27 07:59:35 2011
@@ -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.examples.onlinedemo.dom.items;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+
+public class Category extends AbstractDomainObject {
+
+    // {{ Title
+    public String title() {
+        return getDescription();
+    }
+    // }}
+
+    // {{ Description
+    private String description;
+
+    @MemberOrder(sequence = "1")
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+    // }}
+
+}

Modified: incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItem.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItem.java?rev=1206679&r1=1206608&r2=1206679&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItem.java
(original)
+++ incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItem.java
Sun Nov 27 07:59:35 2011
@@ -17,25 +17,20 @@
  *  under the License.
  */
 
-package org.apache.isis.examples.onlinedemo.dom.todo;
+package org.apache.isis.examples.onlinedemo.dom.items;
 
-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;
-
-public class ToDoItem extends AbstractDomainObject {
-
-    // {{ Title
-    public String title() {
-        return getDescription();
-    }
-    // }}
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.Title;
+import org.apache.isis.applib.value.Date;
 
+public class ToDoItem {
 
     // {{ Description
     private String description;
 
+    @Title
     @MemberOrder(sequence = "1")
     public String getDescription() {
         return description;
@@ -46,41 +41,85 @@ public class ToDoItem extends AbstractDo
     }
     // }}
 
+    // {{ Date (property)
+    private Date dueBy;
     
-    // {{ Done
-    private boolean done;
+    @MemberOrder(sequence = "1")
+    public Date getDate() {
+        return dueBy;
+    }
 
-    @Disabled
-    @MemberOrder(sequence = "3")
-    public boolean getDone() {
-        return done;
+    public void setDate(final Date dueBy) {
+        this.dueBy = dueBy;
+    }
+    // }}
+
+    // {{ Category (property)
+    private Category category;
+
+    @MemberOrder(sequence = "1")
+    public Category getCategory() {
+        return category;
     }
 
-    public void setDone(boolean done) {
-        this.done = done;
+    public void setCategory(final Category category) {
+        this.category = category;
     }
     // }}
 
 
 
-    // {{ markAsDone
+    // {{ Complete
+    private boolean complete;
+
+    @Disabled
+    @MemberOrder(sequence = "3")
+    public boolean getComplete() {
+        return complete;
+    }
+
+    public void setComplete(boolean complete) {
+        this.complete = complete;
+    }
+    // }}
+
+    // {{ completed
     @MemberOrder(sequence = "1")
-    public void markAsDone() {
-        setDone(true);
+    public void completed() {
+        setComplete(true);
     }
-    public String disableMarkAsDone() {
-        return done?"Already done":null;
+    public String disableCompleted() {
+        return complete?"Already completed":null;
     }
     // }}
 
-    // {{ markAsNotDone
+    // {{ notYetCompleted
     @MemberOrder(sequence = "2")
-    public void markAsNotDone() {
-        setDone(false);
+    public void notYetCompleted() {
+        setComplete(false);
+    }
+    public String disableNotYetCompleted() {
+        return !complete?"Not yet completed":null;
+    }
+    // }}
+
+    // {{ clone (action)
+    @Named("Clone")
+    @MemberOrder(sequence = "1")
+    public ToDoItem duplicate() {
+        return toDoItems.newToDo(getDescription(), getCategory()); 
     }
-    public String disableMarkAsNotDone() {
-        return !done?"Not yet done":null;
+    // }}
+
+
+    
+    // {{ injected: ToDoItems
+    private ToDoItems toDoItems;
+
+    public void setToDoItems(final ToDoItems toDoItems) {
+        this.toDoItems = toDoItems;
     }
     // }}
 
+    
 }

Copied: incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItems.java
(from r1206608, incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/todo/ToDoItemRepository.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItems.java?p2=incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItems.java&p1=incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/todo/ToDoItemRepository.java&r1=1206608&r2=1206679&rev=1206679&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/todo/ToDoItemRepository.java
(original)
+++ incubator/isis/trunk/examples/onlinedemo/dom/src/main/java/org/apache/isis/examples/onlinedemo/dom/items/ToDoItems.java
Sun Nov 27 07:59:35 2011
@@ -17,7 +17,7 @@
  *  under the License.
  */
 
-package org.apache.isis.examples.onlinedemo.dom.todo;
+package org.apache.isis.examples.onlinedemo.dom.items;
 
 import java.util.List;
 
@@ -26,14 +26,15 @@ import org.apache.isis.applib.annotation
 import org.apache.isis.applib.annotation.QueryOnly;
 
 @Named("ToDos")
-public interface ToDoItemRepository {
+public interface ToDoItems {
 
     @QueryOnly
     @MemberOrder(sequence="1")
-    public List<ToDoItem> notYetDone();
+    public List<ToDoItem> toDosForToday();
 
     @MemberOrder(sequence="2")
     public ToDoItem newToDo(
-        @Named("Description") String description);
+        @Named("Description") String description, 
+        Category category);
 
 }

Added: incubator/isis/trunk/examples/onlinedemo/dom/src/main/resources/images/Category.gif
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/dom/src/main/resources/images/Category.gif?rev=1206679&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/examples/onlinedemo/dom/src/main/resources/images/Category.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/isis/trunk/examples/onlinedemo/dom/src/main/resources/images/User.gif
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/dom/src/main/resources/images/User.gif?rev=1206679&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/isis/trunk/examples/onlinedemo/dom/src/main/resources/images/User.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Propchange: incubator/isis/trunk/examples/onlinedemo/fixture/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Nov 27 07:59:35 2011
@@ -0,0 +1,3 @@
+.settings
+.classpath
+.project

Modified: incubator/isis/trunk/examples/onlinedemo/fixture/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/fixture/pom.xml?rev=1206679&r1=1206678&r2=1206679&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/fixture/pom.xml (original)
+++ incubator/isis/trunk/examples/onlinedemo/fixture/pom.xml Sun Nov 27 07:59:35 2011
@@ -26,7 +26,7 @@
     </parent>
 
 	<artifactId>onlinedemo-fixture</artifactId>
-	<name>Quickstart Fixtures</name>
+	<name>Online Demo Fixtures</name>
 
 	<dependencies>
 		<dependency>

Modified: incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/ToDoItemsFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/ToDoItemsFixture.java?rev=1206679&r1=1206608&r2=1206679&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/ToDoItemsFixture.java
(original)
+++ incubator/isis/trunk/examples/onlinedemo/fixture/src/main/java/org/apache/isis/examples/onlinedemo/fixture/items/ToDoItemsFixture.java
Sun Nov 27 07:59:35 2011
@@ -18,33 +18,53 @@
  */
 
 
-package org.apache.isis.examples.onlinedemo.fixture.todo;
+package org.apache.isis.examples.onlinedemo.fixture.items;
 
 
 import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.examples.onlinedemo.dom.todo.ToDoItem;
-import org.apache.isis.examples.onlinedemo.dom.todo.ToDoItemRepository;
+import org.apache.isis.examples.onlinedemo.dom.items.Categories;
+import org.apache.isis.examples.onlinedemo.dom.items.Category;
+import org.apache.isis.examples.onlinedemo.dom.items.ToDoItem;
+import org.apache.isis.examples.onlinedemo.dom.items.ToDoItems;
 
 
 public class ToDoItemsFixture extends AbstractFixture {
 
     @Override
     public void install() {
-        createToDoItem("Buy milk");
-        createToDoItem("Pick up laundry");
-        createToDoItem("Buy stamps");
-        createToDoItem("Write blog post");
-        createToDoItem("Organize brown bag");
+        Category domesticCategory = createCategory("Domestic");
+        Category professionalCategory = createCategory("Professional");
+        
+        createToDoItem("Buy milk", domesticCategory);
+        createToDoItem("Pick up laundry", domesticCategory);
+        createToDoItem("Buy stamps", domesticCategory);
+        createToDoItem("Write blog post", professionalCategory);
+        createToDoItem("Organize brown bag", professionalCategory);
     }
-    
-    private ToDoItem createToDoItem(String description) {
-        return toDoItemRepository.newToDo(description);
+
+    private Category createCategory(String description) {
+        return categories.newCategory(description);
     }
 
-    
-    private ToDoItemRepository toDoItemRepository;
-    public void setToDoItemRepository(ToDoItemRepository toDoItemRepository) {
-        this.toDoItemRepository = toDoItemRepository;
+    private ToDoItem createToDoItem(String description, Category category) {
+        return toDoItems.newToDo(description, category);
+    }
+
+
+    // {{ injected: Categories
+    private Categories categories;
+
+    public void setCategories(final Categories categories) {
+        this.categories = categories;
+    }
+    // }}
+
+
+    // {{ injected: ToDoItems
+    private ToDoItems toDoItems;
+    public void setToDoItems(ToDoItems toDoItems) {
+        this.toDoItems = toDoItems;
     }
+    // }}
     
 }

Propchange: incubator/isis/trunk/examples/onlinedemo/objstore-default/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Nov 27 07:59:35 2011
@@ -0,0 +1,3 @@
+.settings
+.classpath
+.project

Modified: incubator/isis/trunk/examples/onlinedemo/objstore-default/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/objstore-default/pom.xml?rev=1206679&r1=1206678&r2=1206679&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/objstore-default/pom.xml (original)
+++ incubator/isis/trunk/examples/onlinedemo/objstore-default/pom.xml Sun Nov 27 07:59:35
2011
@@ -26,7 +26,7 @@
     </parent>
 
 	<artifactId>onlinedemo-objstore-dflt</artifactId>
-	<name>Quickstart Repositories (for ObjectStore Default)</name>
+	<name>Online Demo Repositories (for ObjectStore Default)</name>
 
 	<dependencies>
 	

Added: incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/CategoriesDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/CategoriesDefault.java?rev=1206679&view=auto
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/CategoriesDefault.java
(added)
+++ incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/CategoriesDefault.java
Sun Nov 27 07:59:35 2011
@@ -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.examples.onlinedemo.objstore.dflt.items;
+
+import java.util.List;
+
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.filter.Filter;
+import org.apache.isis.examples.onlinedemo.dom.items.Categories;
+import org.apache.isis.examples.onlinedemo.dom.items.Category;
+import org.apache.isis.examples.onlinedemo.dom.items.ToDoItem;
+import org.apache.isis.examples.onlinedemo.dom.items.ToDoItems;
+
+public class CategoriesDefault extends AbstractFactoryAndRepository implements Categories
{
+
+    // {{ Id, iconName
+    @Override
+    public String getId() {
+        return "categories";
+    }
+
+    public String iconName() {
+        return "Category";
+    }
+    // }}
+
+    @Override
+    public List<Category> all() {
+        return allInstances(Category.class);
+    }
+
+    @Override
+    public Category newCategory(String description) {
+        final Category category = newTransientInstance(Category.class);
+        category.setDescription(description);
+        persist(category);
+        return category;
+    }
+
+}

Copied: incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/ToDoItemsDefault.java
(from r1206608, incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/todo/ToDoItemRepositoryDefault.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/ToDoItemsDefault.java?p2=incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/ToDoItemsDefault.java&p1=incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/todo/ToDoItemRepositoryDefault.java&r1=1206608&r2=1206679&rev=1206679&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/todo/ToDoItemRepositoryDefault.java
(original)
+++ incubator/isis/trunk/examples/onlinedemo/objstore-default/src/main/java/org/apache/isis/examples/onlinedemo/objstore/dflt/items/ToDoItemsDefault.java
Sun Nov 27 07:59:35 2011
@@ -17,17 +17,18 @@
  *  under the License.
  */
 
-package org.apache.isis.examples.onlinedemo.objstore.dflt.todo;
+package org.apache.isis.examples.onlinedemo.objstore.dflt.items;
 
 import java.util.List;
 
 
 import org.apache.isis.applib.AbstractFactoryAndRepository;
 import org.apache.isis.applib.filter.Filter;
-import org.apache.isis.examples.onlinedemo.dom.todo.ToDoItem;
-import org.apache.isis.examples.onlinedemo.dom.todo.ToDoItemRepository;
+import org.apache.isis.examples.onlinedemo.dom.items.Category;
+import org.apache.isis.examples.onlinedemo.dom.items.ToDoItem;
+import org.apache.isis.examples.onlinedemo.dom.items.ToDoItems;
 
-public class ToDoItemRepositoryDefault extends AbstractFactoryAndRepository implements ToDoItemRepository
{
+public class ToDoItemsDefault extends AbstractFactoryAndRepository implements ToDoItems {
 
     // {{ Id, iconName
     @Override
@@ -42,11 +43,11 @@ public class ToDoItemRepositoryDefault e
 
     
     @Override
-    public List<ToDoItem> notYetDone() {
+    public List<ToDoItem> toDosForToday() {
         return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
             @Override
             public boolean accept(ToDoItem t) {
-                return !t.getDone();
+                return !t.getComplete();
             }
         });
     }
@@ -54,9 +55,10 @@ public class ToDoItemRepositoryDefault e
     
     // {{ NewToDo
     @Override
-    public ToDoItem newToDo(String description) {
+    public ToDoItem newToDo(String description, Category category) {
         ToDoItem toDoItem = newTransientInstance(ToDoItem.class);
         toDoItem.setDescription(description);
+        toDoItem.setCategory(category);
         persist(toDoItem);
         return toDoItem;
     }

Modified: incubator/isis/trunk/examples/onlinedemo/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/pom.xml?rev=1206679&r1=1206678&r2=1206679&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/pom.xml (original)
+++ incubator/isis/trunk/examples/onlinedemo/pom.xml Sun Nov 27 07:59:35 2011
@@ -23,7 +23,7 @@
     <artifactId>onlinedemo</artifactId>
     <version>0.2.0-incubating-SNAPSHOT</version>
 
-    <name>Quickstart App</name>
+    <name>Online Demo</name>
 
     <packaging>pom</packaging>
     
@@ -166,48 +166,10 @@
 
             <dependency>
                 <groupId>${project.groupId}</groupId>
-                <artifactId>onlinedemo-viewer-html</artifactId>
+                <artifactId>onlinedemo-webapp</artifactId>
                 <version>0.2.0-incubating-SNAPSHOT</version>
             </dependency>
 
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>onlinedemo-viewer-json</artifactId>
-                <version>0.2.0-incubating-SNAPSHOT</version>
-            </dependency>
-
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>onlinedemo-tests-bdd</artifactId>
-                <version>0.2.0-incubating-SNAPSHOT</version>
-            </dependency>
-
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>tests-junit</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-
-            <!-- 
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>quickstart-quickrun</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>quickstart-viewer-scimpi</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>${project.groupId}</groupId>
-                <artifactId>quickstart-viewer-wicket</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            -->
-
 
             <!-- isis: applib -->
             <dependency>
@@ -369,16 +331,6 @@
                 <version>${isis.version}</version>
             </dependency>
 
-            <!-- isis: runtimes-dflt: objectstores: nosql -->
-            <!-- 
-            <dependency>
-                <groupId>org.apache.isis.runtimes.dflt.objectstores</groupId>
-                <artifactId>nosql</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            -->
-
-
             <!-- isis: runtimes-dflt: profilestores: dflt -->
             <dependency>
                 <groupId>org.apache.isis.runtimes.dflt.profilestores</groupId>
@@ -393,51 +345,6 @@
                 <version>${isis.version}</version>
             </dependency>
 
-            <!-- isis: runtimes-dflt: remoting -->
-            <!-- 
-            <dependency>
-                <groupId>org.apache.isis.runtimes.dflt.remoting</groupId>
-                <artifactId>common</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.runtimes.dflt.remoting</groupId>
-                <artifactId>transport-sockets</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.runtimes.dflt.remoting</groupId>
-                <artifactId>marshalling-encode</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.runtimes.dflt.remoting</groupId>
-                <artifactId>marshalling-serialize</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.isis.runtimes.dflt.remoting</groupId>
-                <artifactId>transport-http</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.runtimes.dflt.remoting</groupId>
-                <artifactId>transport-http-client</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.runtimes.dflt.remoting</groupId>
-                <artifactId>transport-http-server</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.runtimes.dflt.remoting</groupId>
-                <artifactId>marshalling-xstream</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            -->
-
             <!-- isis: runtimes: embedded -->
             <dependency>
                 <groupId>org.apache.isis.runtimes</groupId>
@@ -470,107 +377,14 @@
                 <version>${isis.version}</version>
             </dependency>
 
-            <!-- isis: viewer: junit -->
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>junit</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-
-            <!-- isis: viewer: bdd -->
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>bdd</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>bdd-common</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>bdd-concordion</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>junit</groupId>
-                <artifactId>junit</artifactId>
-                <version>4.8.2</version>
-            </dependency>
-
-
-            <!-- isis: viewer: scimpi -->
-            <!-- 
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>scimpi</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>scimpi-dispatcher</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>scimpi-servlet</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            -->
-
-
-            <!-- isis: viewer: dnd -->
-            <!-- 
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>dnd</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            -->
-
-            <!-- isis: viewer: wicket -->
-            <!-- 
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>wicket</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>wicket-applib</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>wicket-facets</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>wicket-model</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>wicket-ui</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.isis.viewer</groupId>
-                <artifactId>wicket-viewer</artifactId>
-                <version>${isis.version}</version>
-            </dependency>
-            -->
-
         </dependencies>
     </dependencyManagement>
 
-  <modules>
-    <module>dom</module>
-    <module>fixture</module>
-    <module>objstore-default</module>
-    <module>webapp</module>
-  </modules>
+    <modules>
+	    <module>dom</module>
+	    <module>fixture</module>
+	    <module>objstore-default</module>
+	    <module>webapp</module>
+    </modules>
+  
 </project>

Propchange: incubator/isis/trunk/examples/onlinedemo/webapp/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Nov 27 07:59:35 2011
@@ -0,0 +1,3 @@
+.settings
+.classpath
+.project

Modified: incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/WEB-INF/isis.properties
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/WEB-INF/isis.properties?rev=1206679&r1=1206678&r2=1206679&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/WEB-INF/isis.properties
(original)
+++ incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/WEB-INF/isis.properties
Sun Nov 27 07:59:35 2011
@@ -15,11 +15,11 @@
 #  specific language governing permissions and limitations
 #  under the License.
 isis.services.prefix = org.apache.isis.examples.onlinedemo.objstore.dflt
-isis.services = todo.ToDoItemRepositoryDefault
+isis.services = items.ToDoItemsDefault, items.CategoriesDefault
 
 isis.fixtures.prefix= org.apache.isis.examples.onlinedemo.fixture
 //isis.fixtures= LogonAsSvenFixture,todo.ToDoItemsFixture
-isis.fixtures= todo.ToDoItemsFixture
+isis.fixtures= items.ToDoItemsFixture
 
 isis.exploration.users=sven, dick, bob
 

Modified: incubator/isis/trunk/examples/quickstart/viewer-json/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/viewer-json/pom.xml?rev=1206679&r1=1206678&r2=1206679&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/viewer-json/pom.xml (original)
+++ incubator/isis/trunk/examples/quickstart/viewer-json/pom.xml Sun Nov 27 07:59:35 2011
@@ -90,6 +90,10 @@
             <groupId>org.apache.isis.runtimes.dflt.profilestores</groupId>
             <artifactId>dflt</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.isis.runtimes.dflt.profilestores</groupId>
+            <artifactId>xml</artifactId>
+        </dependency>
         
         <!-- isis progmodel -->
         <dependency>

Modified: incubator/isis/trunk/examples/quickstart/viewer-json/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/viewer-json/src/main/webapp/WEB-INF/web.xml?rev=1206679&r1=1206678&r2=1206679&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/viewer-json/src/main/webapp/WEB-INF/web.xml (original)
+++ incubator/isis/trunk/examples/quickstart/viewer-json/src/main/webapp/WEB-INF/web.xml Sun
Nov 27 07:59:35 2011
@@ -21,7 +21,7 @@
 	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>JSON Claims</display-name>
+	<display-name>Apache Isis JSON Viewer</display-name>
 
 	<listener>
 		<listener-class>org.apache.isis.runtimes.dflt.webapp.IsisWebAppBootstrapper</listener-class>



Mime
View raw message