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/04 12:28:47 UTC
git commit: ISIS-553: updates to example todoapp to demonstrate
ViewModel functionality
Updated Branches:
refs/heads/master 6ede1ba8f -> 7897c9a0c
ISIS-553: updates to example todoapp to demonstrate ViewModel functionality
* new ToDoItemsByCategoryViewModel
* new ToDoItemAnalysis and ToDoItemAnalysisContributions
in addition:
* reorganized the menu items a little ("Prototyping" menu instead of "Fixtures")
* renamed QuickStartApp -> ToDoApp etc
* moved app.* to webapp.* in the webapp module
(because new view model stuff is now in an 'app' package in the dom module)
also:
* fixed styling issue with multiline text strings
* added AbstractContainedObject#removeIfNotAlready(...)
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/7897c9a0
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/7897c9a0
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/7897c9a0
Branch: refs/heads/master
Commit: 7897c9a0cb9192868b4dbf239d03705b4c220906
Parents: 6ede1ba
Author: Dan Haywood <da...@apache.org>
Authored: Fri Oct 4 11:13:39 2013 +0100
Committer: Dan Haywood <da...@apache.org>
Committed: Fri Oct 4 11:13:39 2013 +0100
----------------------------------------------------------------------
.../scalars/string/MultiLineStringPanel.css | 3 +
.../isis/applib/AbstractContainedObject.java | 8 +
.../dom/src/main/java/app/ToDoItemAnalysis.java | 88 ++++++++
.../java/app/ToDoItemAnalysisContributions.java | 55 +++++
.../java/app/ToDoItemsByCategoryViewModel.java | 200 +++++++++++++++++++
.../ToDoItemsByCategoryViewModel.layout.json | 43 ++++
.../dom/src/main/java/dom/todo/ToDoItem.java | 169 +++++++++++-----
.../src/main/java/dom/todo/ToDoItem.layout.json | 6 +-
.../java/dom/todo/ToDoItemContributions.java | 9 +-
.../dom/src/main/java/dom/todo/ToDoItems.java | 15 +-
.../java/integration/ToDoSystemInitializer.java | 2 +
.../java/integration/tests/ToDoIntegTest.java | 2 -
.../ComponentFactoryRegistrarForQuickStart.java | 33 ---
.../java/app/PageClassListForQuickstart.java | 61 ------
.../main/java/app/QuickStartApplication.java | 143 -------------
.../java/app/services/DeveloperUtilities.java | 42 ----
.../app/services/ToDoItemsFixturesService.java | 84 --------
.../ComponentFactoryRegistrarForToDoApp.java | 33 +++
.../java/webapp/PageClassListForToDoApp.java | 61 ++++++
.../src/main/java/webapp/ToDoApplication.java | 143 +++++++++++++
.../webapp/services/DeveloperUtilities.java | 42 ++++
.../services/ToDoItemsFixturesService.java | 84 ++++++++
.../webapp/src/main/resources/app/welcome.html | 28 ---
.../src/main/resources/webapp/welcome.html | 28 +++
.../src/main/webapp/WEB-INF/isis.properties | 11 +-
.../webapp/src/main/webapp/WEB-INF/web.xml | 2 +-
26 files changed, 931 insertions(+), 464 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/string/MultiLineStringPanel.css
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/string/MultiLineStringPanel.css b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/string/MultiLineStringPanel.css
index ce7e097..ccc9262 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/string/MultiLineStringPanel.css
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/string/MultiLineStringPanel.css
@@ -19,4 +19,7 @@
.multiLineStringPanel textarea {
width: 97%;
resize: none;
+
+ font-size:14px;
+ font-family: Arial,'Sans-serif', 'Helvetica', 'Sans-serif', 'sans';
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/core/applib/src/main/java/org/apache/isis/applib/AbstractContainedObject.java
----------------------------------------------------------------------
diff --git a/core/applib/src/main/java/org/apache/isis/applib/AbstractContainedObject.java b/core/applib/src/main/java/org/apache/isis/applib/AbstractContainedObject.java
index c6dbea2..3882b80 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/AbstractContainedObject.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/AbstractContainedObject.java
@@ -347,6 +347,14 @@ public abstract class AbstractContainedObject {
return persistentDomainObject;
}
+ /**
+ * Delete the provided object from the persistent object store.
+ */
+ protected <T> T removeIfNotAlready(final T persistentDomainObject) {
+ getContainer().removeIfNotAlready(persistentDomainObject);
+ return persistentDomainObject;
+ }
+
// //////////////////////////////////////
/**
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemAnalysis.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemAnalysis.java b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemAnalysis.java
new file mode 100644
index 0000000..5e47b8d
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemAnalysis.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.util.Arrays;
+import java.util.List;
+
+import com.google.common.base.Function;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+import dom.todo.ToDoItem.Category;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.annotation.ActionSemantics;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+import org.apache.isis.applib.annotation.Bookmarkable;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.Programmatic;
+
+@Named("Analysis")
+public class ToDoItemAnalysis extends AbstractFactoryAndRepository {
+
+ // //////////////////////////////////////
+ // Identification in the UI
+ // //////////////////////////////////////
+
+ @Override
+ public String getId() {
+ return "analysis";
+ }
+
+ public String iconName() {
+ return "ToDoItem";
+ }
+
+ // //////////////////////////////////////
+ // ByCategory (action)
+ // //////////////////////////////////////
+
+ @Named("By Category")
+ @Bookmarkable
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public List<ToDoItemsByCategoryViewModel> toDoItemsByCategory() {
+ final List<Category> categories = Arrays.asList(Category.values());
+ return Lists.newArrayList(Iterables.transform(categories, byCategory()));
+ }
+
+ private Function<Category, ToDoItemsByCategoryViewModel> byCategory() {
+ return new Function<Category, ToDoItemsByCategoryViewModel>(){
+ @Override
+ public ToDoItemsByCategoryViewModel apply(final Category category) {
+ final ToDoItemsByCategoryViewModel byCategory =
+ getContainer().newViewModelInstance(ToDoItemsByCategoryViewModel.class, category.name());
+ byCategory.setCategory(category);
+ return byCategory;
+ }
+ };
+ }
+
+ // //////////////////////////////////////
+ // ForCategory (programmatic)
+ // //////////////////////////////////////
+
+ @Programmatic
+ public ToDoItemsByCategoryViewModel toDoItemsForCategory(Category category) {
+ return byCategory().apply(category);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemAnalysisContributions.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemAnalysisContributions.java b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemAnalysisContributions.java
new file mode 100644
index 0000000..158f113
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemAnalysisContributions.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package app;
+
+import dom.todo.ToDoItem;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.annotation.ActionSemantics;
+import org.apache.isis.applib.annotation.NotContributed;
+import org.apache.isis.applib.annotation.NotInServiceMenu;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+import org.apache.isis.applib.annotation.NotContributed.As;
+import org.apache.isis.applib.annotation.Hidden;
+
+@Hidden
+public class ToDoItemAnalysisContributions extends AbstractFactoryAndRepository {
+
+
+ // //////////////////////////////////////
+ // AnalyseCategory
+ // //////////////////////////////////////
+
+ @NotInServiceMenu
+ @NotContributed(As.ASSOCIATION)
+ @ActionSemantics(Of.SAFE)
+ public ToDoItemsByCategoryViewModel analyseCategory(final ToDoItem item) {
+ return toDoAppAnalysis.toDoItemsForCategory(item.getCategory());
+ }
+
+
+ // //////////////////////////////////////
+ // injected services
+ // //////////////////////////////////////
+
+ private ToDoItemAnalysis toDoAppAnalysis;
+ public void injectToDoAppAnalysis(ToDoItemAnalysis toDoAppAnalysis) {
+ this.toDoAppAnalysis = toDoAppAnalysis;
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemsByCategoryViewModel.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemsByCategoryViewModel.java b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemsByCategoryViewModel.java
new file mode 100644
index 0000000..ee40a30
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemsByCategoryViewModel.java
@@ -0,0 +1,200 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.util.Arrays;
+import java.util.List;
+
+import com.google.common.base.Function;
+import com.google.common.base.Joiner;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+import dom.todo.ToDoItem;
+import dom.todo.ToDoItem.Category;
+import dom.todo.ToDoItem.Subcategory;
+import dom.todo.ToDoItems;
+
+import org.apache.isis.applib.AbstractViewModel;
+import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.annotation.Bookmarkable;
+import org.apache.isis.applib.annotation.Bounded;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.MultiLine;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.Render;
+import org.apache.isis.applib.annotation.Render.Type;
+import org.apache.isis.applib.annotation.Title;
+import org.apache.isis.applib.util.ObjectContracts;
+
+@Named("By Category")
+@Bounded
+@Bookmarkable
+public class ToDoItemsByCategoryViewModel
+ extends AbstractViewModel
+ implements Comparable<ToDoItemsByCategoryViewModel> {
+
+
+ // //////////////////////////////////////
+ // ViewModel implementation
+ // //////////////////////////////////////
+
+ @Override
+ public String viewModelMemento() {
+ return getCategory().name();
+ }
+
+ @Override
+ public void viewModelInit(String memento) {
+ setCategory(Category.valueOf(memento));
+ }
+
+ // //////////////////////////////////////
+ // Category
+ // //////////////////////////////////////
+
+ private Category category;
+
+ /**
+ * Used as {@link #viewModelMemento() memento}
+ */
+ @Title
+ public Category getCategory() {
+ return category;
+ }
+
+ public void setCategory(final Category category) {
+ this.category = category;
+ }
+
+
+ // //////////////////////////////////////
+ // NotYetComplete, Complete
+ // //////////////////////////////////////
+
+ @MultiLine(numberOfLines=5)
+ public String getNotYetComplete() {
+ final List<ToDoItem> notYetComplete = getItemsNotYetComplete();
+ return Joiner.on(", ").join(
+ Iterables.transform(subcategories(), summarizeBySubcategory(notYetComplete)));
+ }
+
+ // //////////////////////////////////////
+
+ @MultiLine(numberOfLines=5)
+ public String getComplete() {
+ final List<ToDoItem> completeInCategory = getItemsComplete();
+ return Joiner.on(", ").join(
+ Iterables.transform(subcategories(), summarizeBySubcategory(completeInCategory)));
+ }
+
+ // //////////////////////////////////////
+
+ private Iterable<Subcategory> subcategories() {
+ return Iterables.filter(Arrays.asList(Subcategory.values()), Subcategory.thoseFor(getCategory()));
+ }
+
+ private Function<Subcategory, String> summarizeBySubcategory(final Iterable<ToDoItem> itemsInCategory) {
+ return new Function<Subcategory, String>() {
+ @Override
+ public String apply(final Subcategory subcategory) {
+ return subcategory + ": " + countIn(itemsInCategory, subcategory);
+ }
+ };
+ }
+
+ private static int countIn(final Iterable<ToDoItem> items, final Subcategory subcategory) {
+ return Iterables.size(Iterables.filter(items,
+ ToDoItem.Predicates.thoseSubcategorised(subcategory)));
+ }
+
+
+ // //////////////////////////////////////
+ // getItemsNotYetComplete, getItemsComplete
+ // //////////////////////////////////////
+
+ /**
+ * All those items {@link ToDoItems#notYetComplete() not yet complete}, for this {@link #getCategory() category}.
+ */
+ @Render(Type.EAGERLY)
+ public List<ToDoItem> getItemsNotYetComplete() {
+ final List<ToDoItem> notYetComplete = toDoItems.notYetComplete();
+ return Lists.newArrayList(Iterables.filter(notYetComplete, ToDoItem.Predicates.thoseCategorised(getCategory())));
+ }
+
+ // //////////////////////////////////////
+
+ /**
+ * All those items {@link ToDoItems#complete() complete}, for this {@link #getCategory() category}.
+ */
+ @Render(Type.EAGERLY)
+ public List<ToDoItem> getItemsComplete() {
+ final List<ToDoItem> complete = toDoItems.complete();
+ return Lists.newArrayList(Iterables.filter(complete, ToDoItem.Predicates.thoseCategorised(getCategory())));
+ }
+
+
+ // //////////////////////////////////////
+ // DeleteCompleted (action)
+ // //////////////////////////////////////
+
+ @Named("Delete")
+ public ToDoItemsByCategoryViewModel deleteCompleted() {
+ for (ToDoItem item : getItemsComplete()) {
+ removeIfNotAlready(item);
+ }
+ // force reload of page
+ return this;
+ }
+
+
+
+ // //////////////////////////////////////
+ // misc business rules
+ // //////////////////////////////////////
+
+ /**
+ * Equivalent to annotating every property and collection with {@link Disabled}.
+ */
+ public String disabled(Identifier.Type type) {
+ return type == Identifier.Type.PROPERTY_OR_COLLECTION? "Read-only": null;
+ }
+
+ // //////////////////////////////////////
+ // compareTo
+ // //////////////////////////////////////
+
+ @Override
+ public int compareTo(ToDoItemsByCategoryViewModel other) {
+ return ObjectContracts.compare(this, other, "category");
+ }
+
+
+ // //////////////////////////////////////
+ // injected services
+ // //////////////////////////////////////
+
+ private ToDoItems toDoItems;
+
+ public void injectedToDoItems(final ToDoItems toDoItems) {
+ this.toDoItems = toDoItems;
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemsByCategoryViewModel.layout.json
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemsByCategoryViewModel.layout.json b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemsByCategoryViewModel.layout.json
new file mode 100644
index 0000000..c87b554
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/app/ToDoItemsByCategoryViewModel.layout.json
@@ -0,0 +1,43 @@
+{
+ "columns": [
+ {
+ "span": 4,
+ "memberGroups": {
+ "General": {
+ "members": {
+ "category": {}
+ }
+ },
+ "Analysis": {
+ "members": {
+ "notYetComplete": {},
+ "complete": {}
+ }
+ }
+ }
+ },
+ {
+ "span": 0,
+ "memberGroups": {}
+ },
+ {
+ "span": 0,
+ "memberGroups": {}
+ },
+ {
+ "span": 8,
+ "collections": {
+ "itemsNotYetComplete": {},
+ "itemsComplete": {
+ "actions": {
+ "deleteCompleted": {}
+ }
+ }
+ }
+ }
+ ],
+ "actions": {
+ "downloadLayout": {},
+ "refreshLayout": {}
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.java b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.java
index c7eff06..c41f324 100644
--- a/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.java
+++ b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.java
@@ -37,6 +37,9 @@ import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.Ordering;
+import dom.todo.ToDoItem.Category;
+import dom.todo.ToDoItem.Subcategory;
+
import org.joda.time.LocalDate;
import org.apache.isis.applib.DomainObjectContainer;
@@ -68,21 +71,30 @@ import org.apache.isis.applib.value.Blob;
@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
@javax.jdo.annotations.Queries( {
- @javax.jdo.annotations.Query(
- name="todo_all", language="JDOQL",
- value="SELECT FROM dom.todo.ToDoItem WHERE ownedBy == :ownedBy"),
- @javax.jdo.annotations.Query(
- name="todo_notYetComplete", language="JDOQL",
- value="SELECT FROM dom.todo.ToDoItem WHERE ownedBy == :ownedBy && complete == false"),
- @javax.jdo.annotations.Query(
- name="todo_complete", language="JDOQL",
- value="SELECT FROM dom.todo.ToDoItem WHERE ownedBy == :ownedBy && complete == true"),
- @javax.jdo.annotations.Query(
- name="todo_similarTo", language="JDOQL",
- value="SELECT FROM dom.todo.ToDoItem WHERE ownedBy == :ownedBy && category == :category"),
- @javax.jdo.annotations.Query(
- name="todo_autoComplete", language="JDOQL",
- value="SELECT FROM dom.todo.ToDoItem WHERE ownedBy == :ownedBy && description.indexOf(:description) >= 0")
+ @javax.jdo.annotations.Query(
+ name = "todo_all", language = "JDOQL",
+ value = "SELECT FROM dom.todo.ToDoItem "
+ + "WHERE ownedBy == :ownedBy"),
+ @javax.jdo.annotations.Query(
+ name = "todo_notYetComplete", language = "JDOQL",
+ value = "SELECT FROM dom.todo.ToDoItem "
+ + "WHERE ownedBy == :ownedBy "
+ + " && complete == false"),
+ @javax.jdo.annotations.Query(
+ name = "todo_complete", language = "JDOQL",
+ value = "SELECT FROM dom.todo.ToDoItem "
+ + "WHERE ownedBy == :ownedBy "
+ + "&& complete == true"),
+ @javax.jdo.annotations.Query(
+ name = "todo_similarTo", language = "JDOQL",
+ value = "SELECT FROM dom.todo.ToDoItem "
+ + "WHERE ownedBy == :ownedBy "
+ + "&& category == :category"),
+ @javax.jdo.annotations.Query(
+ name = "todo_autoComplete", language = "JDOQL",
+ value = "SELECT FROM dom.todo.ToDoItem "
+ + "WHERE ownedBy == :ownedBy && "
+ + "description.indexOf(:description) >= 0")
})
@javax.jdo.annotations.Version(strategy=VersionStrategy.VERSION_NUMBER, column="VERSION")
@javax.jdo.annotations.Unique(name="ToDoItem_description_must_be_unique", members={"ownedBy","description"})
@@ -205,6 +217,16 @@ public class ToDoItem implements Comparable<ToDoItem> /*, Locatable*/ { // GMAP3
? "Invalid subcategory for category '" + category + "'"
: null;
}
+
+ public static Predicate<Subcategory> thoseFor(final Category category) {
+ return new Predicate<Subcategory>() {
+
+ @Override
+ public boolean apply(Subcategory subcategory) {
+ return category.subcategories().contains(subcategory);
+ }
+ };
+ }
}
// //////////////////////////////////////
@@ -543,49 +565,96 @@ public class ToDoItem implements Comparable<ToDoItem> /*, Locatable*/ { // GMAP3
}
// //////////////////////////////////////
- // Filters (static methods)
+ // Predicates
// //////////////////////////////////////
- public static Predicate<ToDoItem> thoseDue() {
- return Predicates.and(Predicates.not(thoseComplete()), new Predicate<ToDoItem>() {
- @Override
- public boolean apply(final ToDoItem t) {
- return t.isDue();
- }
- });
- }
+ public static class Predicates {
- public static Predicate<ToDoItem> thoseComplete() {
- return new Predicate<ToDoItem>() {
- @Override
- public boolean apply(final ToDoItem t) {
- return t.isComplete();
- }
- };
- }
+ public static Predicate<ToDoItem> thoseNotCompleteAndDue() {
+ return com.google.common.base.Predicates.and(
+ com.google.common.base.Predicates.not(thoseComplete()),
+ thoseDue());
+ }
- public static Predicate<ToDoItem> thoseOwnedBy(final String currentUser) {
- return new Predicate<ToDoItem>() {
- @Override
- public boolean apply(final ToDoItem toDoItem) {
- return Objects.equal(toDoItem.getOwnedBy(), currentUser);
- }
+ public static Predicate<ToDoItem> thoseDue() {
+ return new Predicate<ToDoItem>() {
+ @Override
+ public boolean apply(final ToDoItem t) {
+ return t.isDue();
+ }
+ };
+ }
+
+ public static Predicate<ToDoItem> thoseNotYetComplete() {
+ return com.google.common.base.Predicates.not(thoseComplete());
+ }
- };
- }
+ public static Predicate<ToDoItem> thoseComplete() {
+ return new Predicate<ToDoItem>() {
+ @Override
+ public boolean apply(final ToDoItem t) {
+ return t.isComplete();
+ }
+ };
+ }
- public static Predicate<ToDoItem> thoseSimilarTo(final ToDoItem toDoItem) {
- return new Predicate<ToDoItem>() {
- @Override
- public boolean apply(final ToDoItem eachToDoItem) {
- return Objects.equal(toDoItem.getCategory(), eachToDoItem.getCategory()) &&
- Objects.equal(toDoItem.getOwnedBy(), eachToDoItem.getOwnedBy()) &&
- eachToDoItem != toDoItem;
- }
+ public static Predicate<ToDoItem> thoseOwnedBy(final String currentUser) {
+ return new Predicate<ToDoItem>() {
+ @Override
+ public boolean apply(final ToDoItem toDoItem) {
+ return Objects.equal(toDoItem.getOwnedBy(), currentUser);
+ }
+ };
+ }
- };
- }
+ public static Predicate<ToDoItem> thoseWithSimilarDescription(final String description) {
+ return new Predicate<ToDoItem>() {
+ @Override
+ public boolean apply(final ToDoItem t) {
+ return t.getDescription().contains(description);
+ }
+
+ };
+ }
+
+ public static Predicate<ToDoItem> thoseSimilarTo(final ToDoItem toDoItem) {
+ return new Predicate<ToDoItem>() {
+ @Override
+ public boolean apply(final ToDoItem t) {
+ return Objects.equal(toDoItem.getCategory(), t.getCategory()) &&
+ Objects.equal(toDoItem.getOwnedBy(), t.getOwnedBy()) &&
+ t != toDoItem;
+ }
+ };
+ }
+
+ public static Predicate<ToDoItem> thoseCategorised(final Category category) {
+ return new Predicate<ToDoItem>() {
+ @Override
+ public boolean apply(final ToDoItem toDoItem) {
+ return Objects.equal(toDoItem.getCategory(), category);
+ }
+ };
+ }
+
+ public static Predicate<ToDoItem> thoseSubcategorised(
+ final Subcategory subcategory) {
+ return new Predicate<ToDoItem>() {
+ @Override
+ public boolean apply(final ToDoItem t) {
+ return Objects.equal(t.getSubcategory(), subcategory);
+ }
+ };
+ }
+ public static Predicate<ToDoItem> thoseCategorised(
+ final Category category, final Subcategory subcategory) {
+ return com.google.common.base.Predicates.and(
+ thoseCategorised(category),
+ thoseSubcategorised(subcategory));
+ }
+ }
+
// //////////////////////////////////////
// toString
// //////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.layout.json
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.layout.json b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.layout.json
index c96a868..fa63299 100644
--- a/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.layout.json
+++ b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.layout.json
@@ -22,10 +22,12 @@
General: {
members: {
description: {},
- category: {},
+ category: {
+ },
subcategory: {
actions: {
- updateCategory: {}
+ updateCategory: {},
+ analyseCategory: {}
}
},
complete: {
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItemContributions.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItemContributions.java b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItemContributions.java
index c0c96d0..ed7eced 100644
--- a/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItemContributions.java
+++ b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItemContributions.java
@@ -21,7 +21,6 @@ package dom.todo;
import java.util.List;
import com.google.common.base.Function;
-import com.google.common.base.Objects;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
@@ -139,12 +138,7 @@ public class ToDoItemContributions extends AbstractFactoryAndRepository {
public List<ToDoItem> similarTo(final ToDoItem toDoItem) {
if(false) {
// the naive implementation ...
- return allMatches(ToDoItem.class, new Predicate<ToDoItem>() {
- @Override
- public boolean apply(final ToDoItem t) {
- return t != toDoItem && Objects.equal(toDoItem.getCategory(), t.getCategory()) && Objects.equal(toDoItem.getOwnedBy(), t.getOwnedBy());
- }
- });
+ return allMatches(ToDoItem.class, ToDoItem.Predicates.thoseSimilarTo(toDoItem));
} else {
// the JDO implementation ...
final List<ToDoItem> similarToDoItems = allMatches(
@@ -156,6 +150,7 @@ public class ToDoItemContributions extends AbstractFactoryAndRepository {
}
}
+
private static Predicate<ToDoItem> excluding(final ToDoItem toDoItem) {
return new Predicate<ToDoItem>() {
@Override
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItems.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItems.java b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItems.java
index 0988eb2..cc3de0d 100644
--- a/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItems.java
+++ b/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItems.java
@@ -24,6 +24,7 @@ import java.util.List;
import com.google.common.base.Objects;
import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
import dom.todo.ToDoItem.Category;
import dom.todo.ToDoItem.Subcategory;
@@ -147,7 +148,7 @@ public class ToDoItems extends AbstractFactoryAndRepository {
@MemberOrder(sequence = "4")
public List<ToDoItem> allToDos() {
final String currentUser = currentUserName();
- final List<ToDoItem> items = allMatches(ToDoItem.class, ToDoItem.thoseOwnedBy(currentUser));
+ final List<ToDoItem> items = allMatches(ToDoItem.class, ToDoItem.Predicates.thoseOwnedBy(currentUser));
Collections.sort(items);
if(items.isEmpty()) {
getContainer().warnUser("No to-do items found.");
@@ -163,13 +164,10 @@ public class ToDoItems extends AbstractFactoryAndRepository {
public List<ToDoItem> autoComplete(final String description) {
if(false) {
// the naive implementation ...
- return allMatches(ToDoItem.class, new Predicate<ToDoItem>() {
- @Override
- public boolean apply(final ToDoItem t) {
- return ownedByCurrentUser(t) && t.getDescription().contains(description);
- }
-
- });
+ return allMatches(ToDoItem.class,
+ Predicates.and(
+ ToDoItem.Predicates.thoseOwnedBy(currentUserName()),
+ ToDoItem.Predicates.thoseWithSimilarDescription(description)));
} else {
// the JDO implementation ...
return allMatches(
@@ -180,6 +178,7 @@ public class ToDoItems extends AbstractFactoryAndRepository {
}
}
+
// //////////////////////////////////////
// Programmatic Helpers
// //////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/ToDoSystemInitializer.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/ToDoSystemInitializer.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/ToDoSystemInitializer.java
index b6d0399..8f2522a 100644
--- a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/ToDoSystemInitializer.java
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/ToDoSystemInitializer.java
@@ -16,6 +16,7 @@
*/
package integration;
+import app.ToDoItemAnalysis;
import dom.todo.ToDoItemContributions;
import dom.todo.ToDoItems;
@@ -55,6 +56,7 @@ public class ToDoSystemInitializer {
withServices(
new ToDoItems(),
+ new ToDoItemAnalysis(),
new ToDoItemContributions(),
new WrapperFactoryDefault(),
new RegisterEntities(),
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/ToDoIntegTest.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/ToDoIntegTest.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/ToDoIntegTest.java
index 5b95c3d..5770a29 100644
--- a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/ToDoIntegTest.java
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/ToDoIntegTest.java
@@ -20,8 +20,6 @@ package integration.tests;
import integration.ToDoSystemInitializer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.junit.BeforeClass;
import org.apache.isis.core.integtestsupport.IntegrationTestAbstract;
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/ComponentFactoryRegistrarForQuickStart.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/ComponentFactoryRegistrarForQuickStart.java b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/ComponentFactoryRegistrarForQuickStart.java
deleted file mode 100644
index 70370a8..0000000
--- a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/ComponentFactoryRegistrarForQuickStart.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package 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/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/PageClassListForQuickstart.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/PageClassListForQuickstart.java b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/PageClassListForQuickstart.java
deleted file mode 100644
index b84dc46..0000000
--- a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/PageClassListForQuickstart.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package app;
-
-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 PageClassListForQuickstart 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/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/QuickStartApplication.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/QuickStartApplication.java b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/QuickStartApplication.java
deleted file mode 100644
index 56aa2d1..0000000
--- a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/QuickStartApplication.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package app;
-
-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>app.QuickStartApplication</param-value>
- * </init-param>
- * </filter>
- * </pre>
- *
- */
-public class QuickStartApplication 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(ComponentFactoryRegistrarForQuickStart.class);
- bind(PageClassList.class).to(PageClassListForQuickstart.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("\n").join(readLines);
- return aboutText;
- } catch (IOException e) {
- return "This is Quick Start";
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/services/DeveloperUtilities.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/services/DeveloperUtilities.java b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/services/DeveloperUtilities.java
deleted file mode 100644
index 5ed196f..0000000
--- a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/services/DeveloperUtilities.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package app.services;
-
-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="Fixtures", sequence="90")
- @Override
- public Clob downloadMetaModel() {
- return super.downloadMetaModel();
- }
-
- @MemberOrder(name="Fixtures", sequence="92")
- @Override
- public Blob downloadLayouts() {
- return super.downloadLayouts();
- }
-}
-
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/services/ToDoItemsFixturesService.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/services/ToDoItemsFixturesService.java b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/services/ToDoItemsFixturesService.java
deleted file mode 100644
index 7c8b134..0000000
--- a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/app/services/ToDoItemsFixturesService.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package app.services;
-
-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("Fixtures")
-public class ToDoItemsFixturesService extends AbstractService {
-
- @Prototype
- public String install() {
- installFixturesFor(null); // ie current user
- return "Example fixtures installed";
- }
-
- // //////////////////////////////////////
-
- @Prototype
- public String installFor(@Named("User") String user) {
- installFixturesFor(user);
- return "Example fixtures installed for " + user;
- }
- public String default0InstallFor() {
- return "guest";
- }
- public List<String> choices0InstallFor() {
- return Lists.newArrayList("guest", "dick", "bob", "joe");
- }
-
- // //////////////////////////////////////
-
- @Prototype
- public ToDoItem installAndReturnFirst() {
- install();
- 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/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/ComponentFactoryRegistrarForToDoApp.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/ComponentFactoryRegistrarForToDoApp.java b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/ComponentFactoryRegistrarForToDoApp.java
new file mode 100644
index 0000000..7da8aee
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/ComponentFactoryRegistrarForToDoApp.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package 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/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/PageClassListForToDoApp.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/PageClassListForToDoApp.java b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/PageClassListForToDoApp.java
new file mode 100644
index 0000000..f4d7c04
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/PageClassListForToDoApp.java
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES 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/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/ToDoApplication.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/ToDoApplication.java b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/ToDoApplication.java
new file mode 100644
index 0000000..9c01579
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/ToDoApplication.java
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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("\n").join(readLines);
+ return aboutText;
+ } catch (IOException e) {
+ return "This is Quick Start";
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/services/DeveloperUtilities.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/services/DeveloperUtilities.java b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/services/DeveloperUtilities.java
new file mode 100644
index 0000000..49e94a0
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/services/DeveloperUtilities.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package webapp.services;
+
+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/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/services/ToDoItemsFixturesService.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/services/ToDoItemsFixturesService.java b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/services/ToDoItemsFixturesService.java
new file mode 100644
index 0000000..5ddec64
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/java/webapp/services/ToDoItemsFixturesService.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES 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.services;
+
+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/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/resources/app/welcome.html
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/resources/app/welcome.html b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/resources/app/welcome.html
deleted file mode 100644
index ca5f770..0000000
--- a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/resources/app/welcome.html
+++ /dev/null
@@ -1,28 +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.
--->
-<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>
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/resources/webapp/welcome.html
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/resources/webapp/welcome.html b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/resources/webapp/welcome.html
new file mode 100644
index 0000000..ca5f770
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/resources/webapp/welcome.html
@@ -0,0 +1,28 @@
+<?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>
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/isis.properties b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/isis.properties
index 84e7bb1..57fbf0e 100644
--- a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/isis.properties
+++ b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/isis.properties
@@ -185,10 +185,15 @@ isis.reflector.facet-decorators=org.apache.isis.core.progmodel.facetdecorators.i
# if using the DataNucleus object store
#isis.services.prefix =
-isis.services = dom.todo.ToDoItems,\
+isis.services = \
+ 10:dom.todo.ToDoItems,\
+ 20:app.ToDoItemAnalysis,\
dom.todo.ToDoItemContributions,\
- app.services.ToDoItemsFixturesService,\
- app.services.DeveloperUtilities,\
+ app.ToDoItemAnalysisContributions,\
+ \
+ 30:webapp.services.ToDoItemsFixturesService,\
+ 30:webapp.services.DeveloperUtilities,\
+ \
org.apache.isis.core.metamodel.services.bookmarks.BookmarkServiceDefault,\
org.apache.isis.objectstore.jdo.service.RegisterEntities,\
org.apache.isis.objectstore.jdo.datanucleus.service.support.IsisJdoSupportImpl,\
http://git-wip-us.apache.org/repos/asf/isis/blob/7897c9a0/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/web.xml b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/web.xml
index 24bde32..8015da3 100644
--- a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/web.xml
+++ b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/web.xml
@@ -153,7 +153,7 @@
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
- <param-value>app.QuickStartApplication</param-value>
+ <param-value>webapp.ToDoApplication</param-value>
</init-param>
</filter>
<filter-mapping>