You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2013/10/22 00:52:46 UTC
[2/7] ISIS-437: updating quickstart archetype
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_attachment.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_attachment.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_attachment.java
deleted file mode 100644
index 20df589..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_attachment.java
+++ /dev/null
@@ -1,86 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package integtests.props;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import integtests.AbstractIntegTest;
-
-import java.nio.charset.Charset;
-import java.util.List;
-
-import javax.activation.MimeType;
-
-import dom.todo.ToDoItem;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import org.apache.isis.applib.value.Blob;
-
-public class ToDoItem_attachment extends AbstractIntegTest {
-
- private ToDoItem toDoItem;
- private Blob attachment;
-
- @Before
- public void setUp() throws Exception {
- // given
- final List<ToDoItem> all = wrap(toDoItems).notYetComplete();
- toDoItem = wrap(all.get(0));
-
- // to reset after
- attachment = toDoItem.getAttachment();
- }
-
- @After
- public void tearDown() throws Exception {
- unwrap(toDoItem).setAttachment(attachment);
- }
-
- @Test
- public void happyCase() throws Exception {
-
- byte[] bytes = "{${symbol_escape}"foo${symbol_escape}": ${symbol_escape}"bar${symbol_escape}"}".getBytes(Charset.forName("UTF-8"));
- final Blob newAttachment = new Blob("myfile.json", new MimeType("application/json"), bytes);
-
- // when
- toDoItem.setAttachment(newAttachment);
-
- // then
- assertThat(toDoItem.getAttachment(), is(newAttachment));
- }
-
- @Test
- public void canBeNull() throws Exception {
-
- // when
- toDoItem.setAttachment((Blob)null);
-
- // then
- assertThat(toDoItem.getAttachment(), is((Blob)null));
- }
-
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_category.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_category.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_category.java
deleted file mode 100644
index 6897ad4..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_category.java
+++ /dev/null
@@ -1,86 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package integtests.props;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import integtests.AbstractIntegTest;
-
-import java.util.List;
-
-import dom.todo.ToDoItem;
-import dom.todo.ToDoItem.Category;
-
-import org.joda.time.LocalDate;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import org.apache.isis.applib.clock.Clock;
-
-public class ToDoItem_category extends AbstractIntegTest {
-
- private ToDoItem toDoItem;
- private Category category;
-
- @Before
- public void setUp() throws Exception {
- // given
- final List<ToDoItem> all = wrap(toDoItems).notYetComplete();
- toDoItem = wrap(all.get(0));
-
- // to reset after
- category = toDoItem.getCategory();
- }
-
- @After
- public void tearDown() throws Exception {
- unwrap(toDoItem).setCategory(category);
- }
-
- @Test
- public void happyCase() throws Exception {
-
- // when
- toDoItem.setCategory(Category.Professional);
-
- // then
- assertThat(toDoItem.getCategory(), is(Category.Professional));
-
- // when
- toDoItem.setCategory(Category.Domestic);
-
- // then
- assertThat(toDoItem.getCategory(), is(Category.Domestic));
- }
-
-
- @Test
- public void cannotBeNull() throws Exception {
-
- // when, then
- expectedExceptions.expectMessage("Mandatory");
- toDoItem.setCategory(null);
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_cost.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_cost.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_cost.java
deleted file mode 100644
index 0dc734c..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_cost.java
+++ /dev/null
@@ -1,100 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package integtests.props;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import integtests.AbstractIntegTest;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-import dom.todo.ToDoItem;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ToDoItem_cost extends AbstractIntegTest {
-
- private ToDoItem toDoItem;
- private BigDecimal cost;
-
- @Before
- public void setUp() throws Exception {
- // given
- final List<ToDoItem> all = wrap(toDoItems).notYetComplete();
- toDoItem = wrap(all.get(0));
-
- // to reset after
- cost = toDoItem.getCost();
- }
-
- @After
- public void tearDown() throws Exception {
- unwrap(toDoItem).setCost(cost);
- }
-
- @Test
- public void happyCaseUsingProperty() throws Exception {
-
- final BigDecimal newCost = new BigDecimal("123.45");
-
- // when
- toDoItem.setCost(newCost);
-
- // then
- assertThat(toDoItem.getCost(), is(newCost));
- }
-
- @Test
- public void happyCaseUsingAction() throws Exception {
-
- final BigDecimal newCost = new BigDecimal("123.45");
-
- // when
- toDoItem.updateCost(newCost);
-
- // then
- assertThat(toDoItem.getCost(), is(newCost));
- }
-
- @Test
- public void canBeNull() throws Exception {
-
- // when
- toDoItem.setCost((BigDecimal)null);
-
- // then
- assertThat(toDoItem.getCost(), is((BigDecimal)null));
- }
-
- @Test
- public void defaultForAction() throws Exception {
-
- // then
- assertThat(unwrap(toDoItem).default0UpdateCost(), is(cost));
- }
-
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_description.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_description.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_description.java
deleted file mode 100644
index 70350c9..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_description.java
+++ /dev/null
@@ -1,87 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package integtests.props;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import integtests.AbstractIntegTest;
-
-import java.util.List;
-
-import dom.todo.ToDoItem;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ToDoItem_description extends AbstractIntegTest {
-
- private ToDoItem toDoItem;
- private String description;
-
- @Before
- public void setUp() throws Exception {
- // given
- final List<ToDoItem> all = wrap(toDoItems).notYetComplete();
- toDoItem = wrap(all.get(0));
-
- // to reset after
- description = toDoItem.getDescription();
- }
-
- @After
- public void tearDown() throws Exception {
- unwrap(toDoItem).setDescription(description);
- }
-
- @Test
- public void happyCase() throws Exception {
-
- // given
- assertThat(toDoItem.getDescription(), is("Buy milk"));
-
- // when
- toDoItem.setDescription("Buy milk and butter");
-
- // then
- assertThat(toDoItem.getDescription(), is("Buy milk and butter"));
- }
-
-
- @Test
- public void failsRegex() throws Exception {
-
- // when
- expectedExceptions.expectMessage("Doesn't match pattern");
- toDoItem.setDescription("exclamation marks are not allowed!!!");
- }
-
- @Test
- public void cannotBeNull() throws Exception {
-
- // when, then
- expectedExceptions.expectMessage("Mandatory");
- toDoItem.setDescription(null);
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_dueBy.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_dueBy.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_dueBy.java
deleted file mode 100644
index 08f59de..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_dueBy.java
+++ /dev/null
@@ -1,105 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package integtests.props;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import integtests.AbstractIntegTest;
-
-import java.util.List;
-
-import dom.todo.ToDoItem;
-
-import org.joda.time.LocalDate;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import org.apache.isis.applib.clock.Clock;
-
-public class ToDoItem_dueBy extends AbstractIntegTest {
-
- private ToDoItem toDoItem;
- private LocalDate dueBy;
-
- @Before
- public void setUp() throws Exception {
- // given
- final List<ToDoItem> all = wrap(toDoItems).notYetComplete();
- toDoItem = wrap(all.get(0));
-
- // to reset after
- dueBy = toDoItem.getDueBy();
- }
-
- @After
- public void tearDown() throws Exception {
- unwrap(toDoItem).setDueBy(dueBy);
- }
-
- @Test
- public void happyCase() throws Exception {
-
- // when
- final LocalDate fiveDaysFromNow = Clock.getTimeAsLocalDate().plusDays(5);
- toDoItem.setDueBy(fiveDaysFromNow);
-
- // then
- assertThat(toDoItem.getDueBy(), is(fiveDaysFromNow));
- }
-
-
- @Test
- public void canBeNull() throws Exception {
-
- // when
- toDoItem.setDueBy((LocalDate)null);
-
- // then
- assertThat(toDoItem.getDueBy(), is((LocalDate)null));
- }
-
- @Test
- public void canBeUpToSixDaysInPast() throws Exception {
-
- final LocalDate sixDaysAgo = Clock.getTimeAsLocalDate().plusDays(-6);
-
- // when
- toDoItem.setDueBy(sixDaysAgo);
-
- // then
- assertThat(toDoItem.getDueBy(), is(sixDaysAgo));
- }
-
-
- @Test
- public void cannotBeMoreThanSixDaysInPast() throws Exception {
-
- final LocalDate sevenDaysAgo = Clock.getTimeAsLocalDate().plusDays(-7);
-
- // when, then
- expectedExceptions.expectMessage("Due by date cannot be more than one week old");
- toDoItem.setDueBy(sevenDaysAgo);
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_notes.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_notes.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_notes.java
deleted file mode 100644
index 46d3f14..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_notes.java
+++ /dev/null
@@ -1,81 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package integtests.props;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import integtests.AbstractIntegTest;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-import dom.todo.ToDoItem;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class ToDoItem_notes extends AbstractIntegTest {
-
- private ToDoItem toDoItem;
- private String notes;
-
- @Before
- public void setUp() throws Exception {
- // given
- final List<ToDoItem> all = wrap(toDoItems).notYetComplete();
- toDoItem = wrap(all.get(0));
-
- // to reset after
- notes = toDoItem.getNotes();
- }
-
- @After
- public void tearDown() throws Exception {
- unwrap(toDoItem).setNotes(notes);
- }
-
- @Test
- public void happyCase() throws Exception {
-
- final String newNotes = "Lorem ipsum yada yada";
-
- // when
- toDoItem.setNotes(newNotes);
-
- // then
- assertThat(toDoItem.getNotes(), is(newNotes));
- }
-
- @Test
- public void canBeNull() throws Exception {
-
- // when
- toDoItem.setNotes((String)null);
-
- // then
- assertThat(toDoItem.getNotes(), is((String)null));
- }
-
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_ownedBy.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_ownedBy.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_ownedBy.java
deleted file mode 100644
index bf7cf96..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/props/ToDoItem_ownedBy.java
+++ /dev/null
@@ -1,53 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package integtests.props;
-
-import integtests.AbstractIntegTest;
-
-import java.util.List;
-
-import dom.todo.ToDoItem;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class ToDoItem_ownedBy extends AbstractIntegTest {
-
- private ToDoItem toDoItem;
-
- @Before
- public void setUp() throws Exception {
- // given
- final List<ToDoItem> all = wrap(toDoItems).notYetComplete();
- toDoItem = wrap(all.get(0));
- }
-
- @Test
- public void cannotModify() throws Exception {
-
- // when, then
- expectedExceptions.expectMessage("Always hidden");
- toDoItem.setOwnedBy("other");
- }
-
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/repo/ToDoItems_finders.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/repo/ToDoItems_finders.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/repo/ToDoItems_finders.java
deleted file mode 100644
index ac6156a..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/repo/ToDoItems_finders.java
+++ /dev/null
@@ -1,80 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package integtests.repo;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import integtests.AbstractIntegTest;
-
-import java.util.List;
-
-import dom.todo.ToDoItem;
-
-import org.junit.Test;
-
-public class ToDoItems_finders extends AbstractIntegTest {
-
- @Test
- public void t010_notYetCompleted() throws Exception {
-
- // when
- final List<ToDoItem> notYetCompleteItems = wrap(toDoItems).notYetComplete();
-
- // then
- assertThat(notYetCompleteItems.size(), is(5));
- }
-
- @Test
- public void t020_complete() throws Exception {
-
- // when
- final List<ToDoItem> completedItems = wrap(toDoItems).complete();
-
- // then
- assertThat(completedItems.size(), is(0));
- }
-
- @Test
- public void t030_complete_and_notYetComplete() throws Exception {
-
- // given
- List<ToDoItem> notYetCompleteItems = wrap(toDoItems).notYetComplete();
- final ToDoItem toDoItem = wrap(notYetCompleteItems.get(0));
-
- // when
- toDoItem.completed();
-
- // then
- assertThat(wrap(toDoItems).notYetComplete().size(), is(4));
- assertThat(wrap(toDoItems).complete().size(), is(1));
-
- // and when
- toDoItem.notYetCompleted();
-
- // then
- assertThat(wrap(toDoItems).notYetComplete().size(), is(5));
- assertThat(wrap(toDoItems).complete().size(), is(0));
- }
-
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/repo/ToDoItems_newToDo_and_delete.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/repo/ToDoItems_newToDo_and_delete.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/repo/ToDoItems_newToDo_and_delete.java
deleted file mode 100644
index cd0d432..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/integtests/src/test/java/integtests/repo/ToDoItems_newToDo_and_delete.java
+++ /dev/null
@@ -1,55 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package integtests.repo;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-import integtests.AbstractIntegTest;
-import dom.todo.ToDoItem;
-import dom.todo.ToDoItem.Category;
-
-import org.junit.Test;
-
-public class ToDoItems_newToDo_and_delete extends AbstractIntegTest {
-
- @Test
- public void happyCase() throws Exception {
-
- // given
- int size = wrap(toDoItems).notYetComplete().size();
-
- // when
- final ToDoItem newToDo = wrap(toDoItems).newToDo("new todo", Category.Professional, null, null);
-
- // then
- assertThat(newToDo.getDescription(), is("new todo"));
- assertThat(newToDo.getCategory(), is(Category.Professional));
- assertThat(wrap(toDoItems).notYetComplete().size(), is(size+1));
-
- // when
- newToDo.delete();
-
- // then
- assertThat(wrap(toDoItems).notYetComplete().size(), is(size));
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/.gitignore
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/.gitignore b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/.gitignore
deleted file mode 100644
index 1c85271..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/target-ide
-/target-ide
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/lib/.gitignore
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/lib/.gitignore b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/lib/.gitignore
deleted file mode 100644
index 70eee7e..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/lib/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# explicitly ignoring Microsoft JDBC4 jar
-# (cannot redistribute, licensing)
-#
-sqljdbc4.jar
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/pom.xml b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/pom.xml
deleted file mode 100644
index a4f7f1d..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/pom.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>${groupId}</groupId>
- <artifactId>${rootArtifactId}</artifactId>
- <version>${version}</version>
- </parent>
-
- <artifactId>${artifactId}</artifactId>
- <name>Quickstart Wicket/Restful/JDO Repositories (for JDO)</name>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.7.5</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <!-- other modules in this project -->
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${rootArtifactId}-dom</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.objectstore</groupId>
- <artifactId>isis-objectstore-jdo-datanucleus</artifactId>
- </dependency>
-
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/src/main/java/objstore/jdo/todo/ToDoItemsJdo.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/src/main/java/objstore/jdo/todo/ToDoItemsJdo.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/src/main/java/objstore/jdo/todo/ToDoItemsJdo.java
deleted file mode 100644
index 4e6d5a7..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/objstore-jdo/src/main/java/objstore/jdo/todo/ToDoItemsJdo.java
+++ /dev/null
@@ -1,91 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package objstore.jdo.todo;
-
-import java.util.Collections;
-import java.util.List;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-
-import dom.todo.ToDoItem;
-import dom.todo.ToDoItems;
-
-import org.apache.isis.applib.query.QueryDefault;
-
-public class ToDoItemsJdo extends ToDoItems {
-
- // {{ notYetComplete (action)
- @Override
- protected List<ToDoItem> doNotYetComplete() {
- return allMatches(
- new QueryDefault<ToDoItem>(ToDoItem.class,
- "todo_notYetComplete",
- "ownedBy", currentUserName()));
- }
- // }}
-
- // {{ done (action)
- @Override
- protected List<ToDoItem> doComplete() {
- return allMatches(
- new QueryDefault<ToDoItem>(ToDoItem.class,
- "todo_complete",
- "ownedBy", currentUserName()));
- }
- // }}
-
- // {{ similarTo (action)
- @Override
- public List<ToDoItem> similarTo(final ToDoItem thisToDoItem) {
- final List<ToDoItem> similarToDoItems = allMatches(
- new QueryDefault<ToDoItem>(ToDoItem.class,
- "todo_similarTo",
- "ownedBy", currentUserName(),
- "category", thisToDoItem.getCategory()));
- return Lists.newArrayList(Iterables.filter(similarToDoItems, excluding(thisToDoItem)));
- }
-
- private static Predicate<ToDoItem> excluding(final ToDoItem toDoItem) {
- return new Predicate<ToDoItem>() {
- @Override
- public boolean apply(ToDoItem input) {
- return input != toDoItem;
- }
- };
- }
- // }}
-
- // {{ autoComplete (action)
- @Override
- public List<ToDoItem> autoComplete(String description) {
-
- return allMatches(
- new QueryDefault<ToDoItem>(ToDoItem.class,
- "todo_autoComplete",
- "ownedBy", currentUserName(),
- "description", description));
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/pom.xml b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/pom.xml
index 8a188d8..81352e8 100644
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/pom.xml
+++ b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/pom.xml
@@ -28,11 +28,15 @@
<packaging>pom</packaging>
<properties>
- <isis.version>1.2.0</isis.version>
- <isis-objectstore-jdo.version>1.1.0</isis-objectstore-jdo.version>
- <isis-viewer-wicket.version>1.2.0</isis-viewer-wicket.version>
- <isis-viewer-restfulobjects.version>2.0.0</isis-viewer-restfulobjects.version>
- <isis-security-shiro.version>1.1.1</isis-security-shiro.version>
+ <isis.version>1.3.0</isis.version>
+ <isis-objectstore-jdo.version>1.3.0</isis-objectstore-jdo.version>
+ <isis-viewer-wicket.version>1.3.0</isis-viewer-wicket.version>
+ <isis-viewer-restfulobjects.version>2.1.0</isis-viewer-restfulobjects.version>
+ <isis-security-shiro.version>1.3.0</isis-security-shiro.version>
+
+ <!-- must be consistent with the versions defined by the JDO Objectstore -->
+ <datanucleus-core.version>3.2.7</datanucleus-core.version>
+ <jdo-api.version>3.0.1</jdo-api.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -77,13 +81,20 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.5</version>
+ <version>2.10</version>
<configuration>
+ <includes>
+ <include>**/*Test.java</include>
+ <include>**/*Test_*.java</include>
+ <include>**/*Spec*.java</include>
+ </includes>
<excludes>
<exclude>**/Test*.java</exclude>
+ <exclude>**/*ForTesting.java</exclude>
+ <exclude>**/*Abstract*.java</exclude>
</excludes>
<useFile>true</useFile>
- <printSummary>false</printSummary>
+ <printSummary>true</printSummary>
<outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
</configuration>
</plugin>
@@ -91,10 +102,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.5</version>
+ <version>2.10</version>
<configuration>
+ <includes>
+ <include>**/*Test.java</include>
+ <include>**/*Test_*.java</include>
+ <include>**/*Spec*.java</include>
+ </includes>
<excludes>
<exclude>**/Test*.java</exclude>
+ <exclude>**/*ForTesting.java</exclude>
+ <exclude>**/*Abstract*.java</exclude>
</excludes>
<showSuccess>false</showSuccess>
</configuration>
@@ -300,11 +318,6 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>${rootArtifactId}-objstore-jdo</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
<artifactId>${rootArtifactId}-webapp</artifactId>
<version>${version}</version>
</dependency>
@@ -315,9 +328,9 @@
<!--
GMAP3: uncomment to use https://github.com/danhaywood/isis-wicket-gmap3
<dependency>
- <groupId>com.danhaywood.isis.wicket.ui.components</groupId>
+ <groupId>com.danhaywood.isis.wicket</groupId>
<artifactId>danhaywood-isis-wicket-gmap3</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -326,9 +339,9 @@
<!--
WICKEDCHARTS: uncomment to use https://github.com/danhaywood/isis-wicket-wickedcharts
<dependency>
- <groupId>com.danhaywood.isis.wicket.ui.components</groupId>
+ <groupId>com.danhaywood.isis.wicket</groupId>
<artifactId>danhaywood-isis-wicket-wickedcharts</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -337,9 +350,18 @@
<!--
EXCEL: uncomment to use https://github.com/danhaywood/isis-wicket-excel
<dependency>
- <groupId>com.danhaywood.isis.wicket.ui.components</groupId>
+ <groupId>com.danhaywood.isis.wicket</groupId>
<artifactId>danhaywood-isis-wicket-excel</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.2.0</version>
+ </dependency>
+ -->
+
+ <!--
+ FULLCALENDAR: uncomment to use https://github.com/danhaywood/isis-wicket-fullcalendar
+ <dependency>
+ <groupId>com.danhaywood.isis.wicket</groupId>
+ <artifactId>danhaywood-isis-wicket-fullcalendar</artifactId>
+ <version>1.2.0</version>
</dependency>
-->
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/ToDoApp-no-fixtures-PROTOTYPE.launch
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/ToDoApp-no-fixtures-PROTOTYPE.launch b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/ToDoApp-no-fixtures-PROTOTYPE.launch
new file mode 100644
index 0000000..05b2bd4
--- /dev/null
+++ b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/ToDoApp-no-fixtures-PROTOTYPE.launch
@@ -0,0 +1,26 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+ <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+ <listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
+ </listAttribute>
+ <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+ <listEntry value="1"/>
+ </listAttribute>
+ <mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+ <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[debug]"/>
+ <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[run]"/>
+ </mapAttribute>
+ <stringAttribute value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector" key="org.eclipse.debug.core.source_locator_id"/>
+ <listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+ <listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+ <listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+ </listAttribute>
+ <booleanAttribute value="true" key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS"/>
+ <stringAttribute value="org.eclipse.m2e.launchconfig.classpathProvider" key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER"/>
+ <stringAttribute value="org.apache.isis.WebServer" key="org.eclipse.jdt.launching.MAIN_TYPE"/>
+ <stringAttribute value="--port 8080 --type SERVER_PROTOTYPE" key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"/>
+ <stringAttribute value="${rootArtifactId}-webapp" key="org.eclipse.jdt.launching.PROJECT_ATTR"/>
+ <stringAttribute value="org.eclipse.m2e.launchconfig.sourcepathProvider" key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"/>
+</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/ToDoApp-no-fixtures-SERVER.launch
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/ToDoApp-no-fixtures-SERVER.launch b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/ToDoApp-no-fixtures-SERVER.launch
new file mode 100644
index 0000000..d47d2ee
--- /dev/null
+++ b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/ToDoApp-no-fixtures-SERVER.launch
@@ -0,0 +1,22 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+ <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+ <listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
+ </listAttribute>
+ <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+ <listEntry value="1"/>
+ </listAttribute>
+ <mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+ <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[debug]"/>
+ <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[run]"/>
+ </mapAttribute>
+ <stringAttribute value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector" key="org.eclipse.debug.core.source_locator_id"/>
+ <booleanAttribute value="true" key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS"/>
+ <stringAttribute value="org.eclipse.m2e.launchconfig.classpathProvider" key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER"/>
+ <stringAttribute value="org.apache.isis.WebServer" key="org.eclipse.jdt.launching.MAIN_TYPE"/>
+ <stringAttribute value="--port 8080 --type SERVER" key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"/>
+ <stringAttribute value="${rootArtifactId}-webapp" key="org.eclipse.jdt.launching.PROJECT_ATTR"/>
+ <stringAttribute value="org.eclipse.m2e.launchconfig.sourcepathProvider" key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"/>
+</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/ToDoApp-with-fixtures.launch
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/ToDoApp-with-fixtures.launch b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/ToDoApp-with-fixtures.launch
new file mode 100644
index 0000000..7c08d90
--- /dev/null
+++ b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/ToDoApp-with-fixtures.launch
@@ -0,0 +1,26 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+ <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+ <listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
+ </listAttribute>
+ <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+ <listEntry value="1"/>
+ </listAttribute>
+ <mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+ <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[debug]"/>
+ <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[run]"/>
+ </mapAttribute>
+ <stringAttribute value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector" key="org.eclipse.debug.core.source_locator_id"/>
+ <listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+ <listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+ <listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+ </listAttribute>
+ <booleanAttribute value="true" key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS"/>
+ <stringAttribute value="org.eclipse.m2e.launchconfig.classpathProvider" key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER"/>
+ <stringAttribute value="org.apache.isis.WebServer" key="org.eclipse.jdt.launching.MAIN_TYPE"/>
+ <stringAttribute value="--port 8080 -D isis.persistor.datanucleus.install-fixtures=true --type SERVER_PROTOTYPE" key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"/>
+ <stringAttribute value="${rootArtifactId}-webapp" key="org.eclipse.jdt.launching.PROJECT_ATTR"/>
+ <stringAttribute value="org.eclipse.m2e.launchconfig.sourcepathProvider" key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"/>
+</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/quickstart_wicket_restful_jdo-webapp-with-fixtures.launch
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/quickstart_wicket_restful_jdo-webapp-with-fixtures.launch b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/quickstart_wicket_restful_jdo-webapp-with-fixtures.launch
deleted file mode 100644
index 21feb8c..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/quickstart_wicket_restful_jdo-webapp-with-fixtures.launch
+++ /dev/null
@@ -1,22 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
- <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
- <listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
- </listAttribute>
- <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
- <listEntry value="1"/>
- </listAttribute>
- <mapAttribute key="org.eclipse.debug.core.preferred_launchers">
- <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[debug]"/>
- <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[run]"/>
- </mapAttribute>
- <stringAttribute value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector" key="org.eclipse.debug.core.source_locator_id"/>
- <booleanAttribute value="true" key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS"/>
- <stringAttribute value="org.eclipse.m2e.launchconfig.classpathProvider" key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER"/>
- <stringAttribute value="org.apache.isis.WebServer" key="org.eclipse.jdt.launching.MAIN_TYPE"/>
- <stringAttribute value="${rootArtifactId}-webapp" key="org.eclipse.jdt.launching.PROJECT_ATTR"/>
- <stringAttribute value="--port 8080 -D isis.persistor.datanucleus.install-fixtures=true -t SERVER_EXPLORATION" key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"/>
- <stringAttribute value="org.eclipse.m2e.launchconfig.sourcepathProvider" key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"/>
-</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/quickstart_wicket_restful_jdo-webapp.launch
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/quickstart_wicket_restful_jdo-webapp.launch b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/quickstart_wicket_restful_jdo-webapp.launch
deleted file mode 100644
index 38b7883..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/ide/eclipse/launch/quickstart_wicket_restful_jdo-webapp.launch
+++ /dev/null
@@ -1,21 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
- <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
- <listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
- </listAttribute>
- <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
- <listEntry value="1"/>
- </listAttribute>
- <mapAttribute key="org.eclipse.debug.core.preferred_launchers">
- <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[debug]"/>
- <mapEntry value="org.eclipse.jdt.launching.localJavaApplication" key="[run]"/>
- </mapAttribute>
- <stringAttribute value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector" key="org.eclipse.debug.core.source_locator_id"/>
- <booleanAttribute value="true" key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS"/>
- <stringAttribute value="org.eclipse.m2e.launchconfig.classpathProvider" key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER"/>
- <stringAttribute value="org.apache.isis.WebServer" key="org.eclipse.jdt.launching.MAIN_TYPE"/>
- <stringAttribute value="${rootArtifactId}-webapp" key="org.eclipse.jdt.launching.PROJECT_ATTR"/>
- <stringAttribute value="org.eclipse.m2e.launchconfig.sourcepathProvider" key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"/>
-</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/pom.xml
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/pom.xml b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/pom.xml
index fe71824..ed817d9 100644
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/pom.xml
+++ b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/pom.xml
@@ -167,22 +167,13 @@
</exclusion>
</exclusions>
</dependency>
-
- <!-- objectstore/domain service/repository implementations (brings in dependency to objectstore-jdo)-->
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>${rootArtifactId}-objstore-jdo</artifactId>
- <exclusions>
- <exclusion>
- <!-- so don't pick up transitive dependency to asm 4.0.0 -->
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-enhancer</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<!-- other isis components -->
<dependency>
+ <groupId>org.apache.isis.objectstore</groupId>
+ <artifactId>isis-objectstore-jdo-datanucleus</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.isis.viewer</groupId>
<artifactId>isis-viewer-wicket-impl</artifactId>
</dependency>
@@ -273,28 +264,35 @@
<!--
GMAP3: uncomment to use https://github.com/danhaywood/isis-wicket-gmap3
<dependency>
- <groupId>com.danhaywood.isis.wicket.ui.components</groupId>
+ <groupId>com.danhaywood.isis.wicket</groupId>
<artifactId>danhaywood-isis-wicket-gmap3-ui</artifactId>
</dependency>
-->
<!--
WICKEDCHARTS: uncomment to use https://github.com/danhaywood/isis-wicket-wickedcharts
<dependency>
- <groupId>com.danhaywood.isis.wicket.ui.components</groupId>
+ <groupId>com.danhaywood.isis.wicket</groupId>
<artifactId>danhaywood-isis-wicket-wickedcharts-scalarchart</artifactId>
</dependency>
<dependency>
- <groupId>com.danhaywood.isis.wicket.ui.components</groupId>
+ <groupId>com.danhaywood.isis.wicket</groupId>
<artifactId>danhaywood-isis-wicket-wickedcharts-summarycharts</artifactId>
</dependency>
-->
<!--
EXCEL: uncomment to use https://github.com/danhaywood/isis-wicket-excel
<dependency>
- <groupId>com.danhaywood.isis.wicket.ui.components</groupId>
+ <groupId>com.danhaywood.isis.wicket</groupId>
<artifactId>danhaywood-isis-wicket-excel</artifactId>
</dependency>
-->
+ <!--
+ FULLCALENDAR: uncomment to use https://github.com/danhaywood/isis-wicket-fullcalendar
+ <dependency>
+ <groupId>com.danhaywood.isis.wicket</groupId>
+ <artifactId>danhaywood-isis-wicket-fullcalendar</artifactId>
+ </dependency>
+ -->
</dependencies>
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/app/ComponentFactoryRegistrarForQuickStart.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/app/ComponentFactoryRegistrarForQuickStart.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/app/ComponentFactoryRegistrarForQuickStart.java
deleted file mode 100644
index f14dd49..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/app/ComponentFactoryRegistrarForQuickStart.java
+++ /dev/null
@@ -1,36 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package app;
-
-import com.google.inject.Singleton;
-
-import org.apache.isis.viewer.wicket.viewer.registries.components.ComponentFactoryRegistrarDefault;
-
-@Singleton
-public class ComponentFactoryRegistrarForQuickStart extends ComponentFactoryRegistrarDefault {
-
- @Override
- public void addComponentFactories(ComponentFactoryList componentFactories) {
- super.addComponentFactories(componentFactories);
- // currently no replacements
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/app/QuickStartApplication.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/app/QuickStartApplication.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/app/QuickStartApplication.java
deleted file mode 100644
index 85d4100..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/app/QuickStartApplication.java
+++ /dev/null
@@ -1,106 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package app;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.nio.charset.Charset;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.jar.Attributes;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-
-import javax.servlet.ServletContext;
-
-import org.apache.commons.collections.EnumerationUtils;
-import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistrar;
-import org.apache.isis.viewer.wicket.viewer.IsisWicketApplication;
-
-import com.google.common.base.Joiner;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Iterators;
-import com.google.common.collect.Lists;
-import com.google.common.io.Resources;
-import com.google.inject.AbstractModule;
-import com.google.inject.Module;
-import com.google.inject.name.Names;
-import com.google.inject.util.Modules;
-import com.google.inject.util.Providers;
-
-
-/**
- * As specified in <tt>web.xml</tt>.
- *
- * <p>
- * See:
- * <pre>
- * <filter>
- * <filter-name>wicket</filter-name>
- * <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
- * <init-param>
- * <param-name>applicationClassName</param-name>
- * <param-value>app.QuickStartApplication</param-value>
- * </init-param>
- * </filter>
- * </pre>
- *
- */
-public class QuickStartApplication extends IsisWicketApplication {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- protected Module newIsisWicketModule() {
- final Module isisDefaults = super.newIsisWicketModule();
-
- final Module quickstartOverrides = new AbstractModule() {
- @Override
- protected void configure() {
- bind(ComponentFactoryRegistrar.class).to(ComponentFactoryRegistrarForQuickStart.class);
-
- bind(String.class).annotatedWith(Names.named("applicationName")).toInstance("Quick Start App");
- bind(String.class).annotatedWith(Names.named("applicationCss")).toInstance("css/application.css");
- bind(String.class).annotatedWith(Names.named("applicationJs")).toInstance("scripts/application.js");
- bind(String.class).annotatedWith(Names.named("welcomeMessage")).toInstance(readLines("welcome.html"));
- bind(String.class).annotatedWith(Names.named("aboutMessage")).toInstance("QuickStart");
- bind(InputStream.class).annotatedWith(Names.named("metaInfManifest")).toProvider(Providers.of(getServletContext().getResourceAsStream("/META-INF/MANIFEST.MF")));
- }
- };
-
- return Modules.override(isisDefaults).with(quickstartOverrides);
- }
-
- private static String readLines(final String resourceName) {
- try {
- List<String> readLines = Resources.readLines(Resources.getResource(QuickStartApplication.class, resourceName), Charset.defaultCharset());
- final String aboutText = Joiner.on("${symbol_escape}n").join(readLines);
- return aboutText;
- } catch (IOException e) {
- return "This is Quick Start";
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/ComponentFactoryRegistrarForToDoApp.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/ComponentFactoryRegistrarForToDoApp.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/ComponentFactoryRegistrarForToDoApp.java
new file mode 100644
index 0000000..7f7f0cf
--- /dev/null
+++ b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/ComponentFactoryRegistrarForToDoApp.java
@@ -0,0 +1,36 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package webapp;
+
+import com.google.inject.Singleton;
+
+import org.apache.isis.viewer.wicket.viewer.registries.components.ComponentFactoryRegistrarDefault;
+
+@Singleton
+public class ComponentFactoryRegistrarForToDoApp extends ComponentFactoryRegistrarDefault {
+
+ @Override
+ public void addComponentFactories(ComponentFactoryList componentFactories) {
+ super.addComponentFactories(componentFactories);
+ // currently no replacements
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/PageClassListForToDoApp.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/PageClassListForToDoApp.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/PageClassListForToDoApp.java
new file mode 100644
index 0000000..1cd024b
--- /dev/null
+++ b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/PageClassListForToDoApp.java
@@ -0,0 +1,64 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package webapp;
+
+import org.apache.wicket.Page;
+
+import org.apache.isis.viewer.wicket.ui.ComponentFactory;
+import org.apache.isis.viewer.wicket.viewer.registries.pages.PageClassListDefault;
+
+public class PageClassListForToDoApp extends PageClassListDefault {
+
+ @Override
+ protected Class<? extends Page> getSignInPageClass() {
+ // no override
+ return super.getSignInPageClass();
+ }
+
+ @Override
+ protected Class<? extends Page> getHomePageClass() {
+ // no override
+ return super.getHomePageClass();
+ }
+
+ @Override
+ protected Class<? extends Page> getAboutPageClass() {
+ // no override
+ return super.getAboutPageClass();
+ }
+
+ /**
+ * More typically, override using custom {@link ComponentFactory}s.
+ */
+ @Override
+ protected Class<? extends Page> getEntityPageClass() {
+ // no override
+ return super.getEntityPageClass();
+ }
+
+ /**
+ * More typically, override using custom {@link ComponentFactory}s.
+ */
+ @Override
+ protected Class<? extends Page> getActionPageClass() {
+ // no override
+ return super.getActionPageClass();
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/ToDoApplication.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/ToDoApplication.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/ToDoApplication.java
new file mode 100644
index 0000000..dd871ba
--- /dev/null
+++ b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/ToDoApplication.java
@@ -0,0 +1,146 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package webapp;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.Charset;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.google.common.base.Joiner;
+import com.google.common.io.Resources;
+import com.google.inject.AbstractModule;
+import com.google.inject.Module;
+import com.google.inject.name.Names;
+import com.google.inject.util.Modules;
+import com.google.inject.util.Providers;
+
+import org.apache.wicket.Session;
+import org.apache.wicket.request.Request;
+import org.apache.wicket.request.Response;
+import org.apache.wicket.request.http.WebRequest;
+
+import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistrar;
+import org.apache.isis.viewer.wicket.ui.pages.PageClassList;
+import org.apache.isis.viewer.wicket.viewer.IsisWicketApplication;
+import org.apache.isis.viewer.wicket.viewer.integration.wicket.AuthenticatedWebSessionForIsis;
+import org.apache.isis.viewer.wicket.viewer.registries.pages.PageClassListDefault;
+
+
+/**
+ * As specified in <tt>web.xml</tt>.
+ *
+ * <p>
+ * See:
+ * <pre>
+ * <filter>
+ * <filter-name>wicket</filter-name>
+ * <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+ * <init-param>
+ * <param-name>applicationClassName</param-name>
+ * <param-value>webapp.ToDoApplication</param-value>
+ * </init-param>
+ * </filter>
+ * </pre>
+ *
+ */
+public class ToDoApplication extends IsisWicketApplication {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * uncomment for a (slightly hacky) way of allowing logins using query args, eg:
+ *
+ * <tt>?user=sven&pass=pass</tt>
+ *
+ * <p>
+ * for demos only, obvious.
+ */
+ private final static boolean DEMO_MODE_USING_CREDENTIALS_AS_QUERYARGS = false;
+
+ @Override
+ public Session newSession(final Request request, final Response response) {
+ if(!DEMO_MODE_USING_CREDENTIALS_AS_QUERYARGS) {
+ return super.newSession(request, response);
+ }
+
+ // else demo mode
+ final AuthenticatedWebSessionForIsis s = (AuthenticatedWebSessionForIsis) super.newSession(request, response);
+ final org.apache.wicket.util.string.StringValue user = request.getRequestParameters().getParameterValue("user");
+ final org.apache.wicket.util.string.StringValue password = request.getRequestParameters().getParameterValue("pass");
+ s.signIn(user.toString(), password.toString());
+ return s;
+ }
+
+ @Override
+ public WebRequest newWebRequest(HttpServletRequest servletRequest, String filterPath) {
+ if(!DEMO_MODE_USING_CREDENTIALS_AS_QUERYARGS) {
+ return super.newWebRequest(servletRequest, filterPath);
+ }
+
+ // else demo mode
+ try {
+ String uname = servletRequest.getParameter("user");
+ if (uname != null) {
+ servletRequest.getSession().invalidate();
+ }
+ } catch (Exception e) {
+ }
+ WebRequest request = super.newWebRequest(servletRequest, filterPath);
+ return request;
+ }
+
+ @Override
+ protected Module newIsisWicketModule() {
+ final Module isisDefaults = super.newIsisWicketModule();
+
+ final Module quickstartOverrides = new AbstractModule() {
+ @Override
+ protected void configure() {
+ bind(ComponentFactoryRegistrar.class).to(ComponentFactoryRegistrarForToDoApp.class);
+ bind(PageClassList.class).to(PageClassListForToDoApp.class);
+
+ bind(String.class).annotatedWith(Names.named("applicationName")).toInstance("Quick Start App");
+ bind(String.class).annotatedWith(Names.named("applicationCss")).toInstance("css/application.css");
+ bind(String.class).annotatedWith(Names.named("applicationJs")).toInstance("scripts/application.js");
+ bind(String.class).annotatedWith(Names.named("welcomeMessage")).toInstance(readLines("welcome.html"));
+ bind(String.class).annotatedWith(Names.named("aboutMessage")).toInstance("QuickStart");
+ bind(InputStream.class).annotatedWith(Names.named("metaInfManifest")).toProvider(Providers.of(getServletContext().getResourceAsStream("/META-INF/MANIFEST.MF")));
+ }
+ };
+
+ return Modules.override(isisDefaults).with(quickstartOverrides);
+ }
+
+ private static String readLines(final String resourceName) {
+ try {
+ List<String> readLines = Resources.readLines(Resources.getResource(ToDoApplication.class, resourceName), Charset.defaultCharset());
+ final String aboutText = Joiner.on("${symbol_escape}n").join(readLines);
+ return aboutText;
+ } catch (IOException e) {
+ return "This is Quick Start";
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/prototyping/DeveloperUtilities.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/prototyping/DeveloperUtilities.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/prototyping/DeveloperUtilities.java
new file mode 100644
index 0000000..c889c63
--- /dev/null
+++ b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/prototyping/DeveloperUtilities.java
@@ -0,0 +1,45 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package webapp.prototyping;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.value.Blob;
+import org.apache.isis.applib.value.Clob;
+import org.apache.isis.core.metamodel.services.devutils.DeveloperUtilitiesServiceDefault;
+
+/**
+ * These overrides are simply to 'move' the action underneath the
+ * {@link ToDoItemsFixturesService fixtures} menu.
+ */
+public class DeveloperUtilities extends DeveloperUtilitiesServiceDefault {
+
+ @MemberOrder(name="Prototyping", sequence="90")
+ @Override
+ public Clob downloadMetaModel() {
+ return super.downloadMetaModel();
+ }
+
+ @MemberOrder(name="Prototyping", sequence="92")
+ @Override
+ public Blob downloadLayouts() {
+ return super.downloadLayouts();
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/prototyping/ToDoItemsFixturesService.java
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/prototyping/ToDoItemsFixturesService.java b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/prototyping/ToDoItemsFixturesService.java
new file mode 100644
index 0000000..d30470b
--- /dev/null
+++ b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/java/webapp/prototyping/ToDoItemsFixturesService.java
@@ -0,0 +1,87 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package webapp.prototyping;
+
+import java.util.List;
+
+import com.google.common.collect.Lists;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItems;
+import fixture.todo.ToDoItemsFixture;
+
+import org.apache.isis.applib.AbstractService;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.Prototype;
+import org.apache.isis.core.runtime.fixtures.FixturesInstallerDelegate;
+
+/**
+ * Enables fixtures to be installed from the application.
+ */
+@Named("Prototyping") // has the effect of defining a "Prototyping" menu item
+public class ToDoItemsFixturesService extends AbstractService {
+
+ @Prototype
+ public String installFixtures() {
+ installFixturesFor(null); // ie current user
+ return "Example fixtures installed";
+ }
+
+ // //////////////////////////////////////
+
+ @Prototype
+ public String installFixturesForUser(@Named("User") String user) {
+ installFixturesFor(user);
+ return "Example fixtures installed for " + user;
+ }
+ public String default0InstallFixturesForUser() {
+ return "guest";
+ }
+ public List<String> choices0InstallFixturesForUser() {
+ return Lists.newArrayList("guest", "sven", "dick", "bob", "joe");
+ }
+
+ // //////////////////////////////////////
+
+ @Prototype
+ public ToDoItem installFixturesAndReturnFirst() {
+ installFixtures();
+ List<ToDoItem> notYetComplete = toDoItems.notYetComplete();
+ return !notYetComplete.isEmpty() ? notYetComplete.get(0) : null;
+ }
+
+ // //////////////////////////////////////
+
+ private static void installFixturesFor(String user) {
+ final FixturesInstallerDelegate installer = new FixturesInstallerDelegate().withOverride();
+ installer.addFixture(new ToDoItemsFixture(user));
+ installer.installFixtures();
+ }
+
+ // //////////////////////////////////////
+
+ private ToDoItems toDoItems;
+ public void injectToDoItems(ToDoItems toDoItems) {
+ this.toDoItems = toDoItems;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/c742898c/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/resources/app/welcome.html
----------------------------------------------------------------------
diff --git a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/resources/app/welcome.html b/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/resources/app/welcome.html
deleted file mode 100644
index 228283d..0000000
--- a/example/archetype/quickstart_wicket_restful_jdo/src/main/resources/archetype-resources/webapp/src/main/resources/app/welcome.html
+++ /dev/null
@@ -1,31 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?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.
--->
-<p class="intro">
-This is a <a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.java" target="_blank">single-class</a> domain application, configured to run with Isis' wicket viewer and the JDO/DataNucleus objectstore.
-</p>
-
-<br/>
-<br/>
-<p>
-For more details, see the <a href="http://isis.apache.org/documentation.html" target="_blank">Isis website</a>.
-</p>