incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1228005 - in /incubator/isis/trunk/examples: onlinedemo/webapp/src/main/webapp/WEB-INF/ quickstart/ quickstart/dom/src/main/java/dom/todo/ quickstart/fixture/src/main/java/fixture/todo/ quickstart/objstore-default/src/main/java/objstore/df...
Date Fri, 06 Jan 2012 07:44:58 GMT
Author: danhaywood
Date: Fri Jan  6 07:44:57 2012
New Revision: 1228005

URL: http://svn.apache.org/viewvc?rev=1228005&view=rev
Log:
ISIS-168: webapp module combining html and json modules; renaming ToDoItemRepository to ToDoItems

Added:
    incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItems.java
      - copied, changed from r1209407, incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItemRepository.java
    incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemsDefault.java
      - copied, changed from r1209407, incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemRepositoryDefault.java
    incubator/isis/trunk/examples/quickstart/webapp/
    incubator/isis/trunk/examples/quickstart/webapp/pom.xml
Removed:
    incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItemRepository.java
    incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemRepositoryDefault.java
Modified:
    incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/WEB-INF/web.xml
    incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItem.java
    incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
    incubator/isis/trunk/examples/quickstart/pom.xml
    incubator/isis/trunk/examples/quickstart/tests-bdd/src/test/resources/viewer/bdd/common/BootstrapInExplorationMode.html
    incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/AbstractTest.java
    incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/todo/ToDoItemRepositoryTest.java
    incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/todo/ToDoItemTest.java

Modified: incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/WEB-INF/web.xml?rev=1228005&r1=1228004&r2=1228005&view=diff
==============================================================================
--- incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ incubator/isis/trunk/examples/onlinedemo/webapp/src/main/webapp/WEB-INF/web.xml Fri Jan
 6 07:44:57 2012
@@ -23,50 +23,28 @@
 
     <display-name>Apache Isis Online Demo</display-name>
 
-    <listener>
-        <!-- bootstrap the Isis metamodel and runtime -->
-        <listener-class>org.apache.isis.runtimes.dflt.webapp.IsisWebAppBootstrapper</listener-class>
-    </listener>
 
+    <!--
+    -
+    -
+    - config common to all viewer(s)
+    -
+    -
+    -->
+    
+    <!-- bootstrap the Isis metamodel and runtime -->
     <listener>
-        <!-- bootstrap the RestEasy framework (on which the json-viewer is implemented)
-->
-        <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
+        <listener-class>org.apache.isis.runtimes.dflt.webapp.IsisWebAppBootstrapper</listener-class>
     </listener>
 
+    <!-- which (optional) configuration file(s) to load -->
     <context-param>
-        <!-- indicates which (optional) configuration file(s) to load -->
         <param-name>isis.viewers</param-name>
         <param-value>html,json</param-value>
     </context-param>
 
-    <context-param>
-        <!-- used by the HTML viewer to determine the format of the paths of the links
etc that it generates  -->
-        <param-name>viewer-html.suffix</param-name>
-        <param-value>htmlviewer</param-value>
-    </context-param>
-
-    <context-param>
-        <!-- used by RestEasy to determine the JAX-RS resources and other related configuration
-->
-        <param-name>javax.ws.rs.Application</param-name>
-        <param-value>org.apache.isis.viewer.json.viewer.JsonApplication</param-value>
-    </context-param>
-
-    <filter>
-        <!-- redirect to /index.html if not explicitly accessing the json viewer -->
-        <filter-name>RedirectToDocsFilter</filter-name>
-        <filter-class>org.apache.isis.examples.onlinedemo.filters.RedirectToDocsFilter</filter-class>
-        <init-param>
-            <param-name>redirectTo</param-name>
-            <param-value>/doc/index.html</param-value>
-        </init-param>
-    </filter>
-    <filter-mapping>
-        <filter-name>RedirectToDocsFilter</filter-name>
-        <url-pattern>*</url-pattern>
-    </filter-mapping>
-
+    <!-- cache static resources for 1 day -->
     <filter>
-        <!-- cache all static resources for 1 day -->
         <filter-name>ResourceCachingFilter</filter-name>
         <filter-class>org.apache.isis.core.webapp.content.ResourceCachingFilter</filter-class>
         <init-param>
@@ -99,8 +77,84 @@
         <url-pattern>*.html</url-pattern>
     </filter-mapping>
     
+    <servlet>
+        <servlet-name>Resource</servlet-name>
+        <servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+        <url-pattern>*.css</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+        <url-pattern>*.png</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+        <url-pattern>*.jpg</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+        <url-pattern>*.gif</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+        <url-pattern>*.js</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>Resource</servlet-name>
+        <url-pattern>*.html</url-pattern>
+    </servlet-mapping>
+    
+
+
+
+
+    <!--
+    -
+    -
+    - config for demo only
+    -
+    -
+    -->
+
+    <!-- redirect to /doc/index.html if accessing "/" using web browser -->
+    <filter>
+        <filter-name>RedirectToDocsFilter</filter-name>
+        <filter-class>org.apache.isis.examples.onlinedemo.filters.RedirectToDocsFilter</filter-class>
+        <init-param>
+            <param-name>redirectTo</param-name>
+            <param-value>/doc/index.html</param-value>
+        </init-param>
+    </filter>
+    <filter-mapping>
+        <filter-name>RedirectToDocsFilter</filter-name>
+        <url-pattern>*</url-pattern>
+    </filter-mapping>
+
+    <welcome-file-list>
+       <!-- override Tomcat's default -->
+       <welcome-file>/</welcome-file>
+    </welcome-file-list>
+
+
+
+
+    <!--
+    -
+    -
+    - config specific to the html-viewer
+    -
+    -
+    -->
+    <!-- determine the format of the paths of the links etc that it generates -->
+    <context-param>
+        <param-name>viewer-html.suffix</param-name>
+        <param-value>htmlviewer</param-value>
+    </context-param>
+
+    <!-- authenticate user, and set up an Isis Session -->
     <filter>
-        <!-- authenticate user for accessing the HTML viewer, and set up an Isis Session
-->
         <filter-name>IsisSessionFilterForHtml</filter-name>
         <filter-class>org.apache.isis.runtimes.dflt.webapp.IsisSessionFilter</filter-class>
         <init-param>
@@ -128,33 +182,6 @@
         <url-pattern>/htmlviewer</url-pattern>
     </filter-mapping>
 
-    <filter>
-        <!-- authenticate user for accessing the JSON viewer, and set up an Isis Session
-->
-        <filter-name>IsisSessionFilterForJson</filter-name>
-        <filter-class>org.apache.isis.runtimes.dflt.webapp.IsisSessionFilter</filter-class>
-        <!-- authentication required for REST -->
-        <init-param>
-            <param-name>authenticationSessionStrategy</param-name>
-            <param-value>org.apache.isis.viewer.json.viewer.authentication.AuthenticationSessionStrategyBasicAuth</param-value>
-        </init-param>
-        <init-param>
-            <!-- what to do if no session was found; we indicate to issue a 401 basic
authentication challenge -->
-            <param-name>whenNoSession</param-name>
-            <param-value>basicAuthChallenge</param-value>
-        </init-param>
-        <init-param>
-            <!-- ignores any requests to the HTML viewer resources -->
-            <param-name>ignoreExtensions</param-name>
-            <param-value>htmlviewer</param-value>
-        </init-param>
-    </filter>
-    <filter-mapping>
-        <!-- this is mapped to the entire app; however the IsisSessionFilter will "notice"
if the session filter has already been
-             executed for the request pipeline, and if so will do nothing -->
-        <filter-name>IsisSessionFilterForJson</filter-name>
-        <url-pattern>*</url-pattern>
-    </filter-mapping>
-
     <servlet>
         <servlet-name>Logon</servlet-name>
         <servlet-class>org.apache.isis.viewer.html.servlet.LogonServlet</servlet-class>
@@ -190,6 +217,56 @@
         <url-pattern>*.htmlviewer</url-pattern>
     </servlet-mapping>
 
+
+
+
+    <!--
+    -
+    -
+    - config specific to the json-viewer
+    -
+    -
+    -->
+    
+    <!-- bootstrap the RestEasy framework -->
+    <listener>
+        <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
+    </listener>
+
+    <!-- used by RestEasy to determine the JAX-RS resources and other related configuration
-->
+    <context-param>
+        <param-name>javax.ws.rs.Application</param-name>
+        <param-value>org.apache.isis.viewer.json.viewer.JsonApplication</param-value>
+    </context-param>
+
+    <!-- authenticate user, set up an Isis session -->
+    <filter>
+        <filter-name>IsisSessionFilterForJson</filter-name>
+        <filter-class>org.apache.isis.runtimes.dflt.webapp.IsisSessionFilter</filter-class>
+        <!-- authentication required for REST -->
+        <init-param>
+            <param-name>authenticationSessionStrategy</param-name>
+            <param-value>org.apache.isis.viewer.json.viewer.authentication.AuthenticationSessionStrategyBasicAuth</param-value>
+        </init-param>
+        <init-param>
+            <!-- what to do if no session was found; we indicate to issue a 401 basic
authentication challenge -->
+            <param-name>whenNoSession</param-name>
+            <param-value>basicAuthChallenge</param-value>
+        </init-param>
+        <init-param>
+            <!-- ignores any requests to the HTML viewer resources -->
+            <param-name>ignoreExtensions</param-name>
+            <param-value>htmlviewer</param-value>
+        </init-param>
+    </filter>
+    <filter-mapping>
+        <!-- this is mapped to the entire app; however the IsisSessionFilter will "notice"
if the session filter has already been
+             executed for the request pipeline, and if so will do nothing -->
+        <filter-name>IsisSessionFilterForJson</filter-name>
+        <url-pattern>*</url-pattern>
+    </filter-mapping>
+
+
     <servlet>
         <servlet-name>RestEasy</servlet-name>
         <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
@@ -198,39 +275,5 @@
         <servlet-name>RestEasy</servlet-name>
         <url-pattern>/</url-pattern>
     </servlet-mapping>
-
-    <servlet>
-        <servlet-name>Resource</servlet-name>
-        <servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
-    </servlet>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-        <url-pattern>*.css</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-        <url-pattern>*.png</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-        <url-pattern>*.jpg</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-        <url-pattern>*.gif</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-        <url-pattern>*.js</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>Resource</servlet-name>
-        <url-pattern>*.html</url-pattern>
-    </servlet-mapping>
-	
-	<welcome-file-list>
-	   <!-- override Tomcat's default -->
-	   <welcome-file>/</welcome-file>
-	</welcome-file-list>
 	
 </web-app>

Modified: incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItem.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItem.java?rev=1228005&r1=1228004&r2=1228005&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItem.java (original)
+++ incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItem.java Fri
Jan  6 07:44:57 2012
@@ -52,7 +52,7 @@ public class ToDoItem extends AbstractDo
 
     @Disabled
     @MemberOrder(sequence = "3")
-    public boolean getDone() {
+    public boolean isComplete() {
         return done;
     }
 

Copied: incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItems.java
(from r1209407, incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItemRepository.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItems.java?p2=incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItems.java&p1=incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItemRepository.java&r1=1209407&r2=1228005&rev=1228005&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItemRepository.java
(original)
+++ incubator/isis/trunk/examples/quickstart/dom/src/main/java/dom/todo/ToDoItems.java Fri
Jan  6 07:44:57 2012
@@ -25,7 +25,7 @@ import org.apache.isis.applib.annotation
 import org.apache.isis.applib.annotation.Named;
 
 @Named("ToDos")
-public interface ToDoItemRepository {
+public interface ToDoItems {
 
     @MemberOrder(sequence="1")
     public List<ToDoItem> notYetDone();

Modified: incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java?rev=1228005&r1=1228004&r2=1228005&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
(original)
+++ incubator/isis/trunk/examples/quickstart/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
Fri Jan  6 07:44:57 2012
@@ -21,7 +21,7 @@
 package fixture.todo;
 
 import dom.todo.ToDoItem;
-import dom.todo.ToDoItemRepository;
+import dom.todo.ToDoItems;
 
 import org.apache.isis.applib.fixtures.AbstractFixture;
 
@@ -38,13 +38,13 @@ public class ToDoItemsFixture extends Ab
     }
     
     private ToDoItem createToDoItem(String description) {
-        return toDoItemRepository.newToDo(description);
+        return toDoItems.newToDo(description);
     }
 
     
-    private ToDoItemRepository toDoItemRepository;
-    public void setToDoItemRepository(ToDoItemRepository toDoItemRepository) {
-        this.toDoItemRepository = toDoItemRepository;
+    private ToDoItems toDoItems;
+    public void setToDoItemRepository(ToDoItems toDoItems) {
+        this.toDoItems = toDoItems;
     }
     
 }

Copied: incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemsDefault.java
(from r1209407, incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemRepositoryDefault.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemsDefault.java?p2=incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemsDefault.java&p1=incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemRepositoryDefault.java&r1=1209407&r2=1228005&rev=1228005&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemRepositoryDefault.java
(original)
+++ incubator/isis/trunk/examples/quickstart/objstore-default/src/main/java/objstore/dflt/todo/ToDoItemsDefault.java
Fri Jan  6 07:44:57 2012
@@ -22,12 +22,12 @@ package objstore.dflt.todo;
 import java.util.List;
 
 import dom.todo.ToDoItem;
-import dom.todo.ToDoItemRepository;
+import dom.todo.ToDoItems;
 
 import org.apache.isis.applib.AbstractFactoryAndRepository;
 import org.apache.isis.applib.filter.Filter;
 
-public class ToDoItemRepositoryDefault extends AbstractFactoryAndRepository implements ToDoItemRepository
{
+public class ToDoItemsDefault extends AbstractFactoryAndRepository implements ToDoItems {
 
     // {{ Id, iconName
     @Override
@@ -46,7 +46,7 @@ public class ToDoItemRepositoryDefault e
         return allMatches(ToDoItem.class, new Filter<ToDoItem>() {
             @Override
             public boolean accept(ToDoItem t) {
-                return !t.getDone();
+                return !t.isComplete();
             }
         });
     }

Modified: incubator/isis/trunk/examples/quickstart/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/pom.xml?rev=1228005&r1=1228004&r2=1228005&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/pom.xml (original)
+++ incubator/isis/trunk/examples/quickstart/pom.xml Fri Jan  6 07:44:57 2012
@@ -149,12 +149,13 @@
         <module>dom</module>
         <module>fixture</module>
         <module>objstore-default</module>
-        <module>viewer-html</module>
-        <module>viewer-json</module>
+        <module>webapp</module>
         <module>tests-junit</module>
         <module>tests-bdd</module>
         <!-- 
         <module>quickrun</module>
+        <module>viewer-html</module>
+        <module>viewer-json</module>
         <module>viewer-scimpi</module>
         <module>viewer-wicket</module>
         -->
@@ -184,6 +185,12 @@
 
             <dependency>
                 <groupId>${project.groupId}</groupId>
+                <artifactId>quickstart-webapp</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>${project.groupId}</groupId>
                 <artifactId>quickstart-viewer-html</artifactId>
                 <version>${project.version}</version>
             </dependency>

Modified: incubator/isis/trunk/examples/quickstart/tests-bdd/src/test/resources/viewer/bdd/common/BootstrapInExplorationMode.html
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/tests-bdd/src/test/resources/viewer/bdd/common/BootstrapInExplorationMode.html?rev=1228005&r1=1228004&r2=1228005&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/tests-bdd/src/test/resources/viewer/bdd/common/BootstrapInExplorationMode.html
(original)
+++ incubator/isis/trunk/examples/quickstart/tests-bdd/src/test/resources/viewer/bdd/common/BootstrapInExplorationMode.html
Fri Jan  6 07:44:57 2012
@@ -29,7 +29,7 @@ The system:
 <li>
 <p concordion:execute="#result=bootstrapIsis(#configDir,#deploymentType)">
 <span concordion:assertTrue="#result">bootstrapped</span> from
-config directory <span concordion:set="#configDir">src/main/resources</span>
+config directory <span concordion:set="#configDir">../webapp/src/main/webapp/WEB-INF</span>
 and running in <span concordion:set="#deploymentType">exploration</span>
 mode,
 </p>

Modified: incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/AbstractTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/AbstractTest.java?rev=1228005&r1=1228004&r2=1228005&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/AbstractTest.java
(original)
+++ incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/AbstractTest.java
Fri Jan  6 07:44:57 2012
@@ -19,13 +19,13 @@
 
 package junit;
 
-import objstore.dflt.todo.ToDoItemRepositoryDefault;
+import objstore.dflt.todo.ToDoItemsDefault;
 
 import org.junit.After;
 import org.junit.Before;
 import org.junit.runner.RunWith;
 
-import dom.todo.ToDoItemRepository;
+import dom.todo.ToDoItems;
 
 import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.progmodel.wrapper.applib.WrapperFactory;
@@ -36,22 +36,22 @@ import org.apache.isis.viewer.junit.Serv
 import org.apache.isis.viewer.junit.Services;
 
 @RunWith(IsisTestRunner.class)
-@ConfigDir("../quickrun/src/main/resources")
-@Services({ @Service(ToDoItemRepositoryDefault.class) })
+@ConfigDir("../webapp/src/main/webapp/WEB-INF")
+@Services({ @Service(ToDoItemsDefault.class) })
 public abstract class AbstractTest {
 
     private DomainObjectContainer domainObjectContainer;
     private WrapperFactory wrapperFactory;
 
     /**
-     * The {@link WrapperFactory#wrap(Object) wrapped} equivalent of the {@link #setFoobarRepository(ToDoItemRepository)
-     * injected} {@link ToDoItemRepository}.
+     * The {@link WrapperFactory#wrap(Object) wrapped} equivalent of the {@link #setToDoItems(ToDoItems)
+     * injected} {@link ToDoItems}.
      */
-    protected ToDoItemRepository toDoItemRepository;
+    protected ToDoItems toDoItems;
 
     @Before
     public void wrapInjectedServices() throws Exception {
-        toDoItemRepository = wrapped(toDoItemRepository);
+        toDoItems = wrapped(toDoItems);
     }
 
     @Before
@@ -95,8 +95,8 @@ public abstract class AbstractTest {
         this.domainObjectContainer = domainObjectContainer;
     }
 
-    public void setFoobarRepository(final ToDoItemRepository toDoItemRepository) {
-        this.toDoItemRepository = toDoItemRepository;
+    public void setToDoItems(final ToDoItems toDoItems) {
+        this.toDoItems = toDoItems;
     }
 
 }

Modified: incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/todo/ToDoItemRepositoryTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/todo/ToDoItemRepositoryTest.java?rev=1228005&r1=1228004&r2=1228005&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/todo/ToDoItemRepositoryTest.java
(original)
+++ incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/todo/ToDoItemRepositoryTest.java
Fri Jan  6 07:44:57 2012
@@ -41,13 +41,13 @@ public class ToDoItemRepositoryTest exte
 
     @Test
     public void canFindAllItemsNotYetDone() throws Exception {
-        final List<ToDoItem> foobarList = toDoItemRepository.notYetDone();
+        final List<ToDoItem> foobarList = toDoItems.notYetDone();
         assertThat(foobarList.size(), is(5));
     }
 
     @Test
     public void canCreateToDoItem() throws Exception {
-        ToDoItem newItem = toDoItemRepository.newToDo("item description");
+        ToDoItem newItem = toDoItems.newToDo("item description");
         assertThat(newItem, is(not(nullValue())));
         assertThat(newItem.getDescription(), is("item description"));
         assertThat(getDomainObjectContainer().isPersistent(newItem), is(true));

Modified: incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/todo/ToDoItemTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/todo/ToDoItemTest.java?rev=1228005&r1=1228004&r2=1228005&view=diff
==============================================================================
--- incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/todo/ToDoItemTest.java
(original)
+++ incubator/isis/trunk/examples/quickstart/tests-junit/src/test/java/junit/todo/ToDoItemTest.java
Fri Jan  6 07:44:57 2012
@@ -42,21 +42,21 @@ public class ToDoItemTest extends Abstra
     @Override
     @Before
     public void setUp() {
-        firstItem = wrapped(toDoItemRepository.notYetDone().get(0));
+        firstItem = wrapped(toDoItems.notYetDone().get(0));
     }
     
     @Test
-    public void canMarkAsDone() throws Exception {
+    public void canMarkAsComplete() throws Exception {
         firstItem.markAsDone();
-        assertThat(firstItem.getDone(), is(true));
+        assertThat(firstItem.isComplete(), is(true));
     }
 
     @Test
-    public void cannotMarkAsDoneTwice() throws Exception {
+    public void cannotMarkAsCompleteTwice() throws Exception {
         firstItem.markAsDone();
         try {
             firstItem.markAsDone();
-            fail("Should not been disabled");
+            fail("Should have been disabled");
         } catch (DisabledException e) {
             assertThat(e.getMessage(), is("Already done"));
         }

Added: incubator/isis/trunk/examples/quickstart/webapp/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/examples/quickstart/webapp/pom.xml?rev=1228005&view=auto
==============================================================================
--- incubator/isis/trunk/examples/quickstart/webapp/pom.xml (added)
+++ incubator/isis/trunk/examples/quickstart/webapp/pom.xml Fri Jan  6 07:44:57 2012
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+         http://www.apache.org/licenses/LICENSE-2.0
+         
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.isis.examples</groupId>
+        <artifactId>quickstart</artifactId>
+        <version>0.2.0-incubating-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>quickstart-webapp</artifactId>
+	<name>Quickstart Webapp with HTML+JSON Viewers</name>
+	
+	<packaging>war</packaging>
+
+	<build>
+		<plugins>
+            <plugin>
+                <groupId>org.mortbay.jetty</groupId>
+                <artifactId>maven-jetty-plugin</artifactId>
+            </plugin>
+
+            <!-- mvn package -->
+            <plugin>
+                <groupId>org.simplericity.jettyconsole</groupId>
+                <artifactId>jetty-console-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>createconsole</goal>
+                        </goals>
+                        <configuration>
+                            <backgroundImage>${basedir}/src/main/jettyconsole/isis-banner.png</backgroundImage>
+                        </configuration>
+                        <phase>package</phase>
+                    </execution>
+                </executions>
+            </plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+	
+        <!-- other modules in this project -->
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>quickstart-dom</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>quickstart-fixture</artifactId>
+        </dependency>
+
+
+        <!-- isis viewer -->
+		<dependency>
+	        <groupId>org.apache.isis.viewer</groupId>
+			<artifactId>html</artifactId>
+		</dependency>
+
+        <dependency>
+            <groupId>org.apache.isis.viewer</groupId>
+            <artifactId>json-viewer</artifactId>
+        </dependency>
+
+        <!-- isis runtime -->
+        <dependency>
+            <groupId>org.apache.isis.runtimes.dflt.bytecode</groupId>
+            <artifactId>dflt</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.runtimes.dflt.objectstores</groupId>
+            <artifactId>dflt</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.runtimes.dflt.objectstores</groupId>
+            <artifactId>xml</artifactId>
+        </dependency>
+        <dependency>
+            <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>
+            <groupId>org.apache.isis.progmodels</groupId>
+            <artifactId>dflt</artifactId>
+        </dependency>
+
+        <!-- isis security implementations -->        
+        <dependency>
+            <groupId>org.apache.isis.security</groupId>
+            <artifactId>file</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.isis.security</groupId>
+            <artifactId>dflt</artifactId>
+        </dependency>
+        
+        <!-- to run using WebServer (optional) -->
+        <dependency>
+            <groupId>org.apache.isis.runtimes.dflt</groupId>
+            <artifactId>webserver</artifactId>
+            <scope>runtime</scope>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.5_spec</artifactId>
+            <version>1.2</version>
+        </dependency>
+
+	</dependencies>
+
+</project>



Mime
View raw message