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/08 08:47:02 UTC
[08/12] ISIS-555: new simple archetype;
mothballing non-maintained examples
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/claims/viewer-wicket/src/main/webapp/default.css
----------------------------------------------------------------------
diff --git a/example/application/claims/viewer-wicket/src/main/webapp/default.css b/example/application/claims/viewer-wicket/src/main/webapp/default.css
deleted file mode 100644
index ff8d827..0000000
--- a/example/application/claims/viewer-wicket/src/main/webapp/default.css
+++ /dev/null
@@ -1,938 +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.
- */
-/* Start Global styles */
-
-body {
- background: #101254;
- text-align: center;
-}
-#wrapper {
- width: 980px;
- min-height: 800px;
- border:3px solid #7F81C0;
- margin:8px auto;
- text-align: left;
- background: white;
-}
-
-.header-icon > img {
- max-width: 40px;
- height: 40px;
-}
-
-BODY {
- font-family: Arial, Sans-Serif;
- margin: 0 0 10px 0;
- color: black;
-
-/*
- background: url(default-images/poweredby-logo.png);
- background-repeat: no-repeat;
- background-position: 95% 95%;
-*/
-}
-
-IMG {
- border: 0;
-}
-
-A {
- text-decoration: none;
-}
-
-A:hover {
- text-decoration: underline;
-}
-
-/* End Global styles */ /* Start Heading */
-
-div#site-header:after {
- bottom: 0px;
- display: block;
- text-align: right;
- float:right;
- bottom: 0;
- font-size: 70%;
- color: gray;
-}
-
-div#site-header {
- background: url(images/banner-bg.png);
- background-repeat: repeat-x white-space : nowrap;
- list-style: none;
- margin: 0px;
- height: 100px;
-}
-
-div#site-logo {
- background: url(images/banner.png);
- background-repeat: no-repeat;
- background-position: left;
- position: absolute;
- width: 980px;
- height: 100px;
- margin: 0 auto;
-}
-
-div#page-header {
- display: none;
-}
-
-/* END Heading */
-DIV#body {
- display: block;
- padding-bottom: 10px;
-}
-
-div#navigation {
- margin: 0;
- padding: 0px;
-}
-
-/* Start options*/
-DIV.options {
- background-color: #eeeeee;
- margin: 0;
- padding: 4px 0px 4px 5px;
- min-height: 20px;
- align: right;
- float:right;
-}
-
-
-DIV.options H4 {
- display: none;
-}
-
-DIV.options DIV.item {
- display: inline;
- border-right: 1px solid #000000;
- font-family: arial, 'sans serif';
- font-weight: bold;
- color: #00000;
- font-size: 70%;
- margin: 0 6px 0 6px;
- padding 0 0 0 0;
- min-width: 200px;
-}
-
-DIV.options DIV.item IMG {
- display: none;
-}
-
-DIV.options DIV.item a:link {
- color: #000000;
- text-decoration: none;
- margin: 0 5px 0 0px;
- padding: 0 2px 0 0px;
-}
-
-DIV.options DIV.item a:hover {
- background-color: #dddddd;
- margin: 0 5px 0 0px;
- padding: 0 2px 0 0px;
-}
-
-DIV.options DIV.item a:visited {
- color: #000000;
- text-decoration: none;
- margin: 0 5px 0 0px;
- padding: 0 2px 0 0px;
-}
-
-/* End options */
-
-/* Start services */
-DIV.services {
- background-color: #7F81C0;
- margin: 0;
- padding: 4px 20px 4px 5px;
- min-height: 20px;
-
-}
-
-DIV.services H4 {
- display: none;
-}
-
-DIV.services DIV.item {
- display: inline;
- border-right: 1px solid #ffffff;
- font-family: arial, 'sans serif';
- font-weight: bold;
- color: #ffffff;
- font-size: 70%;
- margin: 3px;
-}
-
-DIV.services DIV.item IMG {
- display: none;
-}
-
-DIV.services DIV.item a:link {
- color: #ffffff;
- text-decoration: none;
- margin: 0 5px 0 5px;
- padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item a:hover {
- background-color: #2683E2;
- margin: 0 5px 0 5px;
- padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item a:visited {
- color: #ffffff;
- text-decoration: none;
- margin: 0 5px 0 5px;
- padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item-selected {
- background-color: #2683E2;
- display: inline;
- border-right: 1px solid #ffffff;
- font-family: arial, 'sans serif';
- font-weight: bold;
- color: #ffffff;
- font-size: 70%;
-}
-
-DIV.services DIV.item-selected a:link {
- color: #ffffff;
- text-decoration: none;
- margin: 0 5px 0 5px;
- padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item-selected a:hover {
- background-color: #556677;
- margin: 0 5px 0 5px;
- padding: 0 2px 0 0px;
-}
-
-DIV.services DIV.item-selected a:visited {
- color: #ffffff;
- text-decoration: none;
- margin: 0 5px 0 5px;
- padding: 0 2px 0 0px;
-}
-
-/* End services */ /* Start History */
-DIV.history {
- background-color: #D6D6D6;
- margin: 0;
- padding: 1px 30px 0 5px;
- min-height: 26px;
-}
-
-DIV.history H4 {
- display: none;
-}
-
-DIV.history DIV.item {
- display: inline;
- border-right: 1px solid #ffffff;
- font-family: arial, 'sans serif';
- font-weight: bold;
- color: #29357D;
- font-size: 70%;
-}
-
-DIV.history DIV.item IMG {
- position: relative;
- top: 4px;
- height: 16px;
- padding: 0 5px 0 0px;
-}
-
-DIV.history DIV.item a:link {
- color: #29357D;
- text-decoration: none;
- margin: 5px;
- padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item a:hover {
- background-color: #B7B6B6;
- padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item a:visited {
- color: #29357D;
- text-decoration: none;
- padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item-selected {
- background-color: #2683E2;
- display: inline;
- border-right: 1px solid #ffffff;
- font-family: arial, 'sans serif';
- font-weight: bold;
- color: #29357D;
- font-size: 70%;
- height: 30px;
-}
-
-DIV.history DIV.item-selected a:hover {
- background-color: #556677;
- padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item-selected a:link {
- color: #29357D;
- text-decoration: none;
- margin: 10px;
- padding: 1px 3px 1px 3px;
-}
-
-DIV.history DIV.item-selected a:visited {
- color: #29357D;
- text-decoration: none;
- padding: 1px 3px 1px 3px;
-}
-
-/* INVISIBLE character for empty item. FIREFOX ONLY*/
-DIV.history:after {
- content: "X";
- display: inline;
- text-align: right;
- font-size: 70%;
- color: #D6D6D6;
-}
-
-/* End History */ /* Start Context */
-div#context {
- background-color: #F0F0F0;
- margin: 0;
- padding: 1px 30px 0 7px;
- min-height: 26px;
-}
-
-div#context span.disabled {
- display: inline;
- font-family: arial, 'sans serif';
- font-weight: normal;
- color: #666666;
- font-size: 70%;
- padding: 0px 5px 0px 7px;
- white-space: nowrap;
-}
-
-div#context span.disabled IMG {
- display: none
-}
-
-div#context span.disabled a:link {
- color: #29357D;
- text-decoration: none;
- margin: 5px;
- padding: 1px 3px 1px 3px;
-}
-
-div#context span.disabled a:hover {
- background-color: #B7B6B6;
- padding: 1px 3px 1px 3px;
-}
-
-div#context span.disabled a:visited {
- color: #29357D;
- text-decoration: none;
- padding: 1px 3px 1px 3px;
-}
-
-div#context a.linked {
- display: inline;
- font-family: arial, 'sans serif';
- font-weight: normal;
- color: #29357D;
- font-size: 70%;
- padding: 0px 5px 0px 7px;
-}
-
-div#context a.linked IMG {
- display: none
-}
-
-div#context a.linked a:link {
- color: #29357D;
- text-decoration: none;
- margin: 5px;
- padding: 1px 3px 1px 3px;
-}
-
-div#context a.linked a:hover {
- background-color: #29357D;
- padding: 1px 3px 1px 3px;
- text-decoration: underline;
-}
-
-div#context a.linked a:visited {
- color: #29357D;
- text-decoration: none;
- padding: 1px 3px 1px 3px;
-}
-
-/* INVISIBLE character for empty breadcrumbs. FIREFOX ONLY*/
-span.disabled:after {
- content: "X";
- display: inline;
- text-align: right;
- font-size: 70%;
- color: #F0F0F0;
-}
-
-/* End Context */ /*
-div#help-bar {
- position: relative;
- right: 50px;
- top: 10px;
- text-align: right;
- font-family : arial, 'sans serif';
- font-weight : normal;
- color: #0000FF;
- font-size : 90%;
- line-height : 110%;
- text-decoration: underline;
- height: 22px;
-}
-*/
-DIV#body DIV#view {
- position: relative;
- top: 0px;
- left: 0px;
- margin: 0px;
-}
-
-/* Start of Message Header */
-DIV.message-header {
- position: relative;
- top: 40px;
- padding: 5px 25px 5px 25px;
- margin: 0 50px 0 255px;
- vertical-align: middle;
- COLOR: #003366;
- FONT-WEIGHT: bold;
- FONT-SIZE: 80%;
- LEFT: auto;
- FONT-STYLE: normal;
- FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
- width: 40%;
-}
-
-DIV.message-header DIV.warning {
- COLOR: #ff0033;
- padding: 5px 25px 5px 25px;
- background: url(default-images/sign-warning.png);
- background-repeat: no-repeat;
- background-color: #D6D6D6;
- background-position: 5px 5px;
-}
-
-DIV.message-header DIV.message {
- COLOR: #003366;
- padding: 5px 25px 5px 25px;
- background: url(default-images/sign-info.png);
- background-repeat: no-repeat;
- background-color: #D6D6D6;
- background-position: 5px 5px;
-}
-
-DIV.message-header DIV.message {
- FONT-WEIGHT: normal;
-}
-
-/* End of Message Header */ /* Start of Object Header */
-DIV.header {
- position: relative;
- top: 40px;
- display: block;
- background-color: #F0F0F0;
- min-height: 48px;
- margin: 0 50px 0 280px;
-
-}
-
-SPAN.header-icon IMG {
- float: left;
-}
-
-SPAN.header-text {
- float: left;
- position: relative;
- top: 10px;
- margin-left: 7px;
- FONT-WEIGHT: bold;
- FONT-SIZE: 16px;
- LEFT: auto;
- COLOR: #003366;
- FONT-STYLE: normal;
- FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
-}
-
-/* End of Object Header */ /* Start of Object Contents */
-DIV#content {
- position: relative;
- display: block;
- top: 40px;
- margin: 0 50px 10px 280px;
-}
-
-/* Start of Object Fields */
-DIV.field {
- margin: 0;
- padding: 5px 0px 5px 0px;
- border-top: 1px solid #666666;
- min-height: 20px;
-}
-
-DIV.field SPAN.value IMG,DIV.field DIV.value IMG {
- position: relative;
- top: 3px;
- margin: 0px 5px 0 0;
- height: 16px;
-}
-
-DIV.field SPAN.value A,DIV.field DIV.value A {
- position: relative;
- top: -2px;
- margin: 0px 5px 0 0;
- height: 16px;
-}
-
-DIV.field DIV.icon IMG {
- position: relative;
- top: 0px;
- margin: 0px 5px 0 0;
- height: 16px;
-}
-
-.label,.value {
- font-size: 80%;
- color: #333399;
-}
-
-DIV.field DIV.icon {
- display: inline;
- color: #333399;
- position: absolute;
- left: 200px;
-}
-
-DIV.field span.label,DIV.field DIV.label {
- width: 170px;
- display: block;
- /*content: ":";*/
- margin: 0 0 -18px 7px;
-}
-
-DIV.field span.separator {
- display: inline;
- position: relative;
- margin: 0 0 -15px 180px;
- vertical-align: top;
-}
-
-DIV.field span.value, DIV.field DIV.value, DIV.field INPUT.value, DIV.field SELECT.value
- {
- top: -2px;
- position: relative;
- margin: 0px 10px -5px 0px;
- display: inline;
-}
-
-DIV.field span.value PRE {
- color: #333399;
- margin: 0;
- font-family: inherit;
-}
-
-
-DIV.field textarea.value {
- font-family: inherit;
-}
-
-
-DIV.field span.optional {
- margin: -35px 0 0 0;
- font-size: 70%;
- color: grey;
-}
-
-DIV.field span.required {
- display: inline;
- position: relative;
- margin: 0;
- vertical-align: top;
- color: red;
-}
-
-DIV.field span.error {
- display: inline;
- position: relative;
- color: red;
- font-size: 70%;
-}
-
-/* INVISIBLE character for empty value FIREFOX ONLY*/
-DIV.field span.value:after {
- content: "X";
- display: inline;
- text-align: right;
- font-size: 70%;
- color: white;
-}
-
-/* INVISIBLE character for empty value FIREFOX ONLY*/
-DIV.field span.label:after {
- content: "X";
- display: inline;
- text-align: right;
- font-size: 70%;
- color: white;
-}
-
-/* End of Object Fields */ /* Start of Object Table */
-DIV#content TABLE {
- position: relative;
- float: left;
- width: 100%;
- border: 0;
- margin: 0 0 10px 0;
- border-collapse: collapse;
-}
-
-DIV#content TH {
- padding: 6px;
- border: 1px solid #ffffff;
- background-color: #D6D6D6;
- font-family: arial, 'sans serif';
- font-weight: bold;
- color: black;
- font-size: 70%;
-}
-
-DIV#content TD {
- background-color: #ffffff;
- border-right: 0;
- border-left: 0;
- border-bottom: 1px solid black;
- padding: 6px;
- font-family: arial, 'sans serif';
- font-weight: normal;
- font-size: 80%;
- color: #333399;
- margin: 0;
- text-align: left;
-}
-
-DIV#content TD.rowstart {
- background-color: #F0F0F0;
-}
-
-DIV#content TD A:visited {
- color: #0000FF;
-}
-
-DIV#content H4 {
- font-family: arial, 'sans serif';
- font-weight: normal;
- color: #000000;
- font-size: 70%;
- border-top: 1px solid black;
- margin: -2px 0 0 0px;
- padding: 5px;
-}
-
-TD DIV.icon {
- font-size: 100%;
- margin-top: 5px;
-}
-
-TD DIV.icon IMG {
- float: left;
- margin: -1px 5px 5px 0px;
- height: 16px;
-}
-
-TD DIV.action-button {
- background-color: #ffffff;
- font-size: 130%;
- text-decoration: none;
-}
-
-/* End of Object Table */
-INPUT.action-button,DIV.action-button {
- background-color: #F0F0F0;
- padding: 10px;
- display: block;
- margin: 0;
- min-height: 20px;
-}
-
-INPUT.action-button,DIV.action-button A {
- background: url(default-images/bg-button.gif);
- background-repeat: repeat-x;
- padding: 2px;
- margin: 5px;
- border: 1px solid #333399;
- font-family: arial, 'sans serif';
- font-weight: normal;
- color: #000000;
- font-size: 70%;
- font-weight: normal;
- text-align: center;
-}
-
-DIV.action-button a:link {
- color: #000000;
-}
-
-DIV.action-button a:visited {
- color: #000000;
-}
-
-DIV.action-button a:hover {
- color: #000000;
- text-decoration: none;
-}
-
-INPUT.action-button,DIV.action-button INPUT {
- float: left;
-}
-
-/* End of Object Contents */ /* Start of Object Actions Menu */
-DIV#body DIV#view DIV#menu {
- position: relative;
- top: 40px;
- left: 0;
- background-color: #ffffff;
- border-top: 1px solid #00336F;
- margin: 0px;
- width: 210px;
- display: block;
- float: left;
-}
-
-DIV#body DIV#menu H3 {
- display: none;
-}
-
-DIV#menu SPAN.name {
- display: block;
- font-size: 80%;
- background-color: #ffffff;
- color: #333399;
- line-height: 100%;
- margin: 0 0 0 10px;
-}
-
-DIV.menu-item a:link {
- color: #333399;
-}
-
-DIV.menu-item a:visited {
- color: #333399;
-}
-
-DIV.submenu-item {
- font-size: 80%;
- background-color: #ffffff;
- color: #1A59A7;
- margin: 0px;
- padding: 5px 0px 5px 10px;
- border-bottom: 1px solid #00336F;
- line-height: 100%;
-}
-
-DIV.submenu-item DIV.menu-item {
- background: url(default-images/submenu-bullet.gif);
- background-repeat: no-repeat;
- background-position: left;
- background-color: #ffffff;
- margin: 0px;
- line-height: 100%;
- border: 0;
- padding: 4px 5px 0px 10px;
- font-family: arial, 'sans serif';
- font-weight: normal;
- color: #1A59A7;
- font-size: 85%;
-}
-
-DIV.menu-item {
- background-color: #ffffff;
- margin: 0px;
- line-height: 110%;
- border-bottom: 1px solid #00336F;
- padding: 5px 5px 5px 10px;
- font-family: arial, 'sans serif';
- font-weight: normal;
- color: #1A59A7;
- font-size: 80%;
-}
-
-DIV.menu-item DIV.disabled {
- color: #a0a0a0;
-}
-
-DIV.menu-item a:link {
- color: #1A59A7;
-}
-
-DIV.menu-item a:visited {
- color: #1A59A7;
-}
-
-DIV.menu-item a:hover {
- color: #006666;
- text-decoration: underline;
-}
-
-DIV.submenu-item DIV.menu-item a:link {
- color: #1A59A7;
-}
-
-DIV.submenu-item DIV.menu-item a:visited {
- color: #1A59A7;
-}
-
-DIV.submenu-item DIV.menu-item a:hover {
- color: #006666;
- text-decoration: underline;
-}
-
-/* End of Object Menu */
-DIV.page-footer {
- position: absolute;
- right: 10px;
- bottom: 10px;
- font-size: 50%;
- color: #333399;
-}
-
-H1 {
- font-size: 140%;
- margin-top: -8px;
-}
-
-H2 {
- font-size: 90%;
- color: #333399;
- letter-spacing: 1pt;
- text-indent:-1pt;
- margin: 0;
-}
-
-H3 {
- font-size: 80%;
- color: #ffffff;
- letter-spacing: 1pt;
- text-indent:-1pt;
- margin: 15px 10px 5px 10px;
-}
-
-H4 {
- font-size: 80%;
- color: #333399;
- letter-spacing: 1pt;
- text-indent:-1pt;
- margin: 10px 10px 0px 10px;
-}
-
-DIV.text {
- font-size: 100%;
- color: #336699;
- letter-spacing: 1pt;
- text-indent:-1pt;
- margin: 10px 10px 0px 10px;
-}
-
-DIV.error {
- font-size: 120%;
- color: #cc0000;
- letter-spacing: 1pt;
- text-indent:-1pt;
- margin: 10px 10px 0px 10px;
-}
-
-PRE.error-trace {
- font-size: 80%;
- color: #cc0000;
- margin: 10px 10px 0px 10px;
-}
-
-DIV#debug { /* float: left;*/
- background-color: #F0F0F0;
- margin: 30px;
- padding: 1px 10px 0 7px;
- min-height: 22px;
- border: 1px;
-}
-
-DIV#debug H4 {
- display: inline;
- font-size: 80%;
- color: #999;
- margin: 0 5px 0 10px;
-}
-
-DIV#debug DIV.detail {
- display: inline;
- font-size: 80%;
- color: #999;
- margin: 0 5px 0 10px;
-}
-
-DIV#page-footer {
- display: none;
-}
-
-SPAN.message {
- position: relative;
- top: 30px;
- font-size: 100%;
- color: #336699;
- margin: 40px 0 0 0;
- padding: 10px;
-}
-/* Think this is now redundant
-DIV.items {
- position: relative;
-}
-*/
-
-
-SPAN.about {
- display: block;
- padding: 4px;
-}
-
-
-SPAN.user {
- display: block;
- padding: 4px;
-}
-.nav-link {
- display: block;
- padding: 10px;
- font-size: 75%;
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/claims/viewer-wicket/src/main/webapp/images/banner-bg.png
----------------------------------------------------------------------
diff --git a/example/application/claims/viewer-wicket/src/main/webapp/images/banner-bg.png b/example/application/claims/viewer-wicket/src/main/webapp/images/banner-bg.png
deleted file mode 100644
index c731c15..0000000
Binary files a/example/application/claims/viewer-wicket/src/main/webapp/images/banner-bg.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/claims/viewer-wicket/src/main/webapp/images/banner.png
----------------------------------------------------------------------
diff --git a/example/application/claims/viewer-wicket/src/main/webapp/images/banner.png b/example/application/claims/viewer-wicket/src/main/webapp/images/banner.png
deleted file mode 100644
index f81e331..0000000
Binary files a/example/application/claims/viewer-wicket/src/main/webapp/images/banner.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/quickstart_wicket_restful_jdo/dom/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/dom/pom.xml b/example/application/quickstart_wicket_restful_jdo/dom/pom.xml
index a223868..33592ed 100644
--- a/example/application/quickstart_wicket_restful_jdo/dom/pom.xml
+++ b/example/application/quickstart_wicket_restful_jdo/dom/pom.xml
@@ -137,6 +137,23 @@
<scope>test</scope>
</dependency>
+ <!-- Bytecode libraries (for mocking) -->
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.objenesis</groupId>
+ <artifactId>objenesis</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib-nodep</artifactId>
+ <scope>test</scope>
+ </dependency>
+
<!--
GMAP3: uncomment to use https://github.com/danhaywood/isis-wicket-gmap3
<dependency>
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/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 6f2127a..26819cc 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
@@ -34,12 +34,8 @@ import javax.jdo.spi.PersistenceCapable;
import com.google.common.base.Objects;
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;
@@ -69,35 +65,48 @@ import org.apache.isis.applib.util.TitleBuffer;
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.DatastoreIdentity(
+ strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
+ column="id")
+@javax.jdo.annotations.Version(
+ strategy=VersionStrategy.VERSION_NUMBER,
+ column="version")
+@javax.jdo.annotations.Uniques({
+ @javax.jdo.annotations.Unique(
+ name="ToDoItem_description_must_be_unique",
+ members={"ownedBy","description"})
+})
@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"})
@ObjectType("TODO")
@Audited
@PublishedObject(ToDoItemChangedPayloadFactory.class)
@@ -430,9 +439,9 @@ public class ToDoItem implements Comparable<ToDoItem> /*, Locatable*/ { // GMAP3
- @javax.jdo.annotations.Persistent(table="TODO_DEPENDENCIES")
- @javax.jdo.annotations.Join(column="DEPENDING_TODO_ID")
- @javax.jdo.annotations.Element(column="DEPENDENT_TODO_ID")
+ @javax.jdo.annotations.Persistent(table="ToDoItemDependencies")
+ @javax.jdo.annotations.Join(column="dependingId")
+ @javax.jdo.annotations.Element(column="dependentId")
private SortedSet<ToDoItem> dependencies = new TreeSet<ToDoItem>();
@SortedBy(DependenciesComparator.class)
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/quickstart_wicket_restful_jdo/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java b/example/application/quickstart_wicket_restful_jdo/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
index b52d951..0ca9e02 100644
--- a/example/application/quickstart_wicket_restful_jdo/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
+++ b/example/application/quickstart_wicket_restful_jdo/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java
@@ -49,7 +49,7 @@ public class ToDoItemsFixture extends AbstractFixture {
final String ownedBy = this.user != null? this.user : getContainer().getUser().getName();
- isisJdoSupport.executeUpdate("delete from TODOITEM where OWNEDBY = '" + ownedBy + "'");
+ isisJdoSupport.executeUpdate("delete from \"ToDoItem\" where \"ownedBy\" = '" + ownedBy + "'");
installFor(ownedBy);
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/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 8f2522a..4636de6 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
@@ -75,6 +75,8 @@ public class ToDoSystemInitializer {
testConfiguration.add("isis.persistor.datanucleus.impl.datanucleus.cache.level2.type","none");
+ testConfiguration.add("isis.persistor.datanucleus.impl.datanucleus.identifier.case", "PreserveCase");
+
return testConfiguration;
}
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/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
index ca5f770..b9e77fc 100644
--- 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
@@ -18,11 +18,19 @@
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>.
+ <a href="http://isis.apache.org">Apache Isis</a>™ is a framework to let you rapidly develop
+ domain-driven apps in Java.
+ <br/>
+ <br/>
+ This app has been generated using Isis'
+ <a href="http://isis.apache.org/getting-started/quickstart-archetype.html">quickstart</a> archetype,
+ which configures Isis' most commonly used components as part of a straightforward
+ "todo" app.
+ <br/>
+ <br/>
+ The core domain functionality class is provided by the <a href="https://github.com/apache/isis/blob/master/example/application/quickstart_wicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItem.java" target="_blank">ToDoItem</a> domain class.
+ Supporting services provide additional capabilities.
+ <br/>
+ <br/>
+ 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/3df42bf4/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 66fb4b0..df82823 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
@@ -40,34 +40,13 @@
#
#################################################################################
+
#
# configure the persistor (object store) to use
#
-# * in-memory requires no additional configuration, but stores object in-memory.
-# Only suitable for prototyping
-# * datanucleus uses JDO DataNucleus to persist objects to relational database.
-# for objectstore-specific properties, see persistor_datanucleus.properties
-# * fileserver uses a simple FileServer to persist objects as JSON documents. It requires the fileserver component to be running
-# for objectstore-specific properties, see persistor_fileserver.properties
-# * mongodb uses MongoDB to be persist objects as JSON documents. It requires MongoDB to be installed and running
-# for objectstore-specific properties, see persistor_fileserver.properties
-# * sql uses an RDBMS to persist objects as table rows.
-# for objectstore-specific properties, see persistor_sql.properties
-# * xml uses the XML ObjectStore to be persist objects to a set of XML files. Only suitable for prototyping.
-# for objectstore-specific properties, see persistor_xml.properties
-#
-# NOTE:
-# * if using non-naive implementations of services, edit isis.services (below) and
-# * if necessary, update the pom.xml to reference appropriate objstore-xxx module
-# * for sql and datanucleus objectstores, update the pom.xml to reference appropriate JDBC driver
-#
-#isis.persistor=in-memory
+# JDO/DataNucleus objectstore
isis.persistor=datanucleus
-#isis.persistor=fileserver
-#isis.persistor=mongodb
-#isis.persistor=sql
-#isis.persistor=xml
@@ -101,8 +80,8 @@ isis.authorization=shiro
#
# configure the user profile store to use.
#
-# the user profile store is supported by some viewers as a way to store
-# user-specific settings (eg colours, themes etc)
+# the user profile store is supported by some viewers (though not the Wicket or
+# Restful viewers) as a way to store user-specific settings (eg colours, themes etc)
#
isis.user-profile-store=in-memory
@@ -175,15 +154,8 @@ isis.reflector.facet-decorators=org.apache.isis.core.progmodel.facetdecorators.i
# From these domain service instances the rest of the metamodel is discovered, while the
# end-user gains access to other domain objects by invoking the actions of the domain services.
#
-# The implementations depend on the configured (see isis.persistor above)
-#
-
-# if using the in-memory, XML, SQL, fileserver or mongo object stores:
-#isis.services.prefix = dom
-#isis.services = todo.ToDoItems
-# if using the DataNucleus object store
#isis.services.prefix =
isis.services = \
10:dom.todo.ToDoItems,\
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/logging.properties
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/logging.properties b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/logging.properties
index e8be59c..8c87791 100644
--- a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/logging.properties
+++ b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/logging.properties
@@ -99,6 +99,27 @@ log4j.logger.DataNucleus.JPA=ERROR, Console
log4j.logger.DataNucleus.JCA=WARN, Console
log4j.logger.DataNucleus.IDE=ERROR, Console
+log4j.additivity.DataNucleus.Datastore.Native=false
+log4j.additivity.DataNucleus.Datastore.Schema=false
+log4j.additivity.DataNucleus.Datastore.Persistence=false
+log4j.additivity.DataNucleus.Datastore.Transaction=false
+log4j.additivity.DataNucleus.Datastore.Connection=false
+log4j.additivity.DataNucleus.Datastore.Query=false
+log4j.additivity.DataNucleus.Datastore.Cache=false
+log4j.additivity.DataNucleus.Datastore.MetaData=false
+log4j.additivity.DataNucleus.Datastore.Datastore=false
+log4j.additivity.DataNucleus.Datastore.Datastore.Persist=false
+log4j.additivity.DataNucleus.Datastore.Datastore.Retrieve=false
+log4j.additivity.DataNucleus.Datastore.General=false
+log4j.additivity.DataNucleus.Datastore.Lifecycle=false
+log4j.additivity.DataNucleus.Datastore.ValueGeneration=false
+log4j.additivity.DataNucleus.Datastore.Enhancer=false
+log4j.additivity.DataNucleus.Datastore.SchemaTool=false
+log4j.additivity.DataNucleus.Datastore.JDO=false
+log4j.additivity.DataNucleus.Datastore.JPA=false
+log4j.additivity.DataNucleus.Datastore.JCA=false
+log4j.additivity.DataNucleus.Datastore.IDE=false
+
# if using log4jdbc-remix as JDBC driver
#log4j.logger.jdbc.sqlonly=DEBUG, sql, Console
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/persistor.properties
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/persistor.properties b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/persistor.properties
new file mode 100644
index 0000000..c541e09
--- /dev/null
+++ b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/persistor.properties
@@ -0,0 +1,99 @@
+# 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.
+
+#
+# configuration file holding the JDO objectstore's JDBC configuration
+# (this is a bit of a hack... just exploiting fact that Isis also loads this file)
+#
+
+
+#
+# JDBC connection details
+# (also update the pom.xml to reference the appropriate JDBC driver)
+#
+
+
+
+#
+# HSQLDB in-memory
+#
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.hsqldb.jdbcDriver
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:hsqldb:mem:test
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
+
+#
+# HSQLDB in-memory (using log4jdbc-remix)
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:hsqldb:mem:test
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
+
+
+
+#
+# HSQLDB to file
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.hsqldb.jdbcDriver
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:hsqldb:file:/tmp/isis-todo-app/hsql-db;hsqldb.write_delay=false;shutdown=true
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
+
+#
+# HSQLDB to file (using log4jdbc-remix)
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:hsqldb:file:/tmp/isis-todo-app/hsql-db;hsqldb.write_delay=false;shutdown=true
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
+
+
+
+#
+# PostgreSQL Server
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.postgresql.Driver
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:postgresql://localhost:5432/isis
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=isis
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=isis
+
+#
+# PostgreSQL Server (using log4jdbc-remix)
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:postgresql://localhost:5432/isis
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=isis
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=isis
+
+
+
+#
+# MS SQL Server
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:sqlserver://127.0.0.1:1433;instance=.;databaseName=quickstart
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=p4ssword
+
+#
+# MS SQL Server (using log4jdbc-remix)
+#
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:sqlserver://127.0.0.1:1433;instance=SQLEXPRESS;databaseName=jdo
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=jdo
+#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=jdopass
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
index 9228a69..394c0aa 100644
--- a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
+++ b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties
@@ -24,15 +24,28 @@
isis.persistor.datanucleus.RegisterEntities.packagePrefix=dom
+
+#####################################################################
#
# DataNucleus' configuration
#
-#isis.persistor.datanucleus.impl.javax.jdo.PersistenceManagerFactoryClass=org.apache.isis.objectstore.jdo.datanucleus.JDOPersistenceManagerFactoryForIsis
+# The 'isis.persistor.datanucleus.impl' prefix is stripped off,
+# remainder is passed through to DataNucleus
+#
+#####################################################################
+
isis.persistor.datanucleus.impl.datanucleus.autoCreateSchema=true
isis.persistor.datanucleus.impl.datanucleus.validateTables=true
isis.persistor.datanucleus.impl.datanucleus.validateConstraints=true
+#
+# How column names are identified
+# (http://www.datanucleus.org/products/datanucleus/jdo/orm/datastore_identifiers.html)
+#
+isis.persistor.datanucleus.impl.datanucleus.identifier.case=PreserveCase
+
+
# L2 cache (on by default)
isis.persistor.datanucleus.impl.datanucleus.cache.level2.type=none
isis.persistor.datanucleus.impl.datanucleus.cache.level2.mode=ENABLE_SELECTIVE
@@ -41,89 +54,22 @@ isis.persistor.datanucleus.impl.datanucleus.cache.level2.mode=ENABLE_SELECTIVE
isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit=false
-
-
-
-#############################################################################
-# JDBC connection details
-# (also update the pom.xml to reference the appropriate JDBC driver)
-#############################################################################
-
-
+#
# uncomment to use JNDI rather than direct JDBC
+#
#isis.persistor.datanucleus.impl.datanucleus.ConnectionFactoryName=java:comp/env/jdbc/quickstart
+#
# uncomment to use JTA resource
+#
#isis.persistor.datanucleus.impl.datanucleus.ConnectionFactory2Name=java:comp/env/jdbc/quickstart-nontx
#isis.persistor.datanucleus.impl.javax.jdo.option.TransactionType=JTA
-#
-# HSQLDB in-memory
-#
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.hsqldb.jdbcDriver
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:hsqldb:mem:test
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
-
-#
-# HSQLDB in-memory (using log4jdbc-remix)
-#
-isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
-isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:hsqldb:mem:test
-isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
-isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
-
-
-
-#
-# HSQLDB to file
-#
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.hsqldb.jdbcDriver
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:hsqldb:file:/tmp/isis-todo-app/hsql-db;hsqldb.write_delay=false;shutdown=true
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
-
-#
-# HSQLDB to file (using log4jdbc-remix)
-#
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:hsqldb:file:/tmp/isis-todo-app/hsql-db;hsqldb.write_delay=false;shutdown=true
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=
-
-
#
-# PostgreSQL Server
#
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.postgresql.Driver
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:postgresql://localhost:5432/isis
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=isis
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=isis
-
-#
-# PostgreSQL Server (using log4jdbc-remix)
-#
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:postgresql://localhost:5432/isis
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=isis
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=isis
-
-
-
-#
-# MS SQL Server
-#
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=com.microsoft.sqlserver.jdbc.SQLServerDriver
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:sqlserver://127.0.0.1:1433;instance=.;databaseName=quickstart
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=p4ssword
-
+# JDBC connection details
+# ... are in persistor.properties
#
-# MS SQL Server (using log4jdbc-remix)
#
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:sqlserver://127.0.0.1:1433;instance=SQLEXPRESS;databaseName=jdo
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=jdo
-#isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=jdopass
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/about/index.html
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/about/index.html b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/about/index.html
index dffcb45..b3908db 100644
--- a/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/about/index.html
+++ b/example/application/quickstart_wicket_restful_jdo/webapp/src/main/webapp/about/index.html
@@ -20,7 +20,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Apache Isis™ QuickStart (Wicket/Restful/JDO/Shiro)</title>
+ <title>Apache Isis™ QuickStart (Wicket/Restful/JDO/Shiro) App</title>
<style type="text/css">
body {
@@ -56,13 +56,26 @@ th, td {
<div id="wrapper">
<img alt="Isis Logo" src="about/images/isis-logo.png" />
- <p>This app has been generated by the <a href="http://isis.apache.org/getting-started/quickstart-archetype.html">quickstart</a> (wicket/restful/jdo/shiro) archetype for
- <a href="http://isis.apache.org">Apache Isis</a>™, a framework to let you rapidly develop
- domain-driven apps in Java.</p>
+ <p>
+ <a href="http://isis.apache.org">Apache Isis</a>™ is a framework to let you rapidly develop
+ domain-driven apps in Java. This app has been generated using Isis'
+ <a href="http://isis.apache.org/getting-started/quickstart-archetype.html">quickstart</a> archetype,
+ which configures Isis' most commonly used components as part of a straightforward
+ "todo" app.
+
+ <p>
+ The app itself consists of a single domain class, <tt>ToDoItem</tt>, along with a number of supporting
+ services. You are free to strip it back and reuse for your own purposes.
+ </p>
+
+ <p>
+ Alternatively, if stripping back this app is too much work, you might want to start with the even simpler
+ <a href="http://isis.apache.org/getting-started/simple-archetype.html">simple</a> archetype, and use this
+ app by way of reference.
+ </p>
<p>
- The app consists of a bare minimum of classes, so that you can easily strip it back and
- reuse for your own purposes. It is configured with:
+ The Isis components that are configured in this app are:
</p>
<table>
@@ -99,7 +112,7 @@ th, td {
</table>
<h2>App contents</h2>
- <p>The key files in the application are:</p>
+ <p>The key files in this "todo" app are:</p>
<!-- the hrefs below are partially URL encoded to prevent them from being modified when the archetype is created -->
<ul>
<li>Domain classes (todo functionality) (in <tt>dom</tt> module)</a>
@@ -108,19 +121,21 @@ th, td {
</li>
<li><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItems.java"><tt>ToDoItems</tt></a> domain service (repository/factory)
</li>
- <li><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/dom/src/main/java/dom/todo/ToDoItemsJdo.java"><tt>ToDoItemsJdo</tt></a> domain service (repository methods overridden for JDO)
+ <li><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/dom/src/main/java/app/ToDoItemAnalysis.java"><tt>ToDoItemAnalysis</tt></a> application service analysing todo items
+ </li>
+ <li><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/dom/src/main/java/app/ToDoAppDashboard.java"><tt>ToDoAppDashboard</tt></a> dashboard application service
</li>
</ul>
</li>
- <li>Fixture classes (in <tt>fixture</tt> module)</a>
+ <li>Fixture classes (in <tt>fixture</tt> module and <tt>webapp</tt> module)</a>
<ul>
<li><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/fixture/src/main/java/fixture/todo/ToDoItemsFixture.java"><tt>ToDoItemsFixture</tt></a> example fixture data (since configured for in-memory HSQLDB)
</li>
- <li><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/fixture/src/main/java/fixture/todo/ToDoItemsFixturesService.java"><tt>ToDoItemsFixtureService</tt></a> domain service to install fixtures at run-time
+ <li><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/webapp/src/main/java/webapp/prototyping/ToDoItemsFixturesService.java"><tt>ToDoItemsFixtureService</tt></a> domain service to install fixtures at run-time
</li>
</ul>
</li>
- <li><tt><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/viewer-webapp/src/main/webapp/WEB-INF/web.xml">WEB-INF/web.xml</a></tt> (in <tt>viewer-webapp</tt> module)</a>
+ <li><tt><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/webapp/src/main/webapp/WEB-INF/web.xml">WEB-INF/web.xml</a></tt> (in <tt>webapp</tt> module)</a>
<ul>
<li><tt>AboutPageFilter</tt> - filter that redirects to this page
</li>
@@ -134,9 +149,9 @@ th, td {
</li>
</ul>
</li>
- <li><tt><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/viewer-webapp/src/main/webapp/WEB-INF/isis.properties">WEB-INF/isis.properties</a></tt> (in <tt>viewer-webapp</tt> module)</a>
+ <li><tt><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/webapp/src/main/webapp/WEB-INF/isis.properties">WEB-INF/isis.properties</a></tt> (in <tt>webapp</tt> module)</a>
<ul>
- <li><tt>isis.services</tt> - specifies the two domain services described above (<tt>ToDoItemsJdo</tt> and <tt>ToDoItemsFixtureService</tt>), appearing on the menu bar in the Wicket viewer,
+ <li><tt>isis.services</tt> - specifies the two domain services described above (<tt>ToDoItems</tt> and <tt>ToDoItemsFixtureService</tt>), appearing on the menu bar in the Wicket viewer,
along with a number of hidden framework-provided domain services demonstrating Isis' support for publishing, auditing and customizable error handling
</li>
<li><tt>isis.persistor</tt> - specifies to use the JDO object store
@@ -145,13 +160,19 @@ th, td {
</li>
</ul>
</li>
- <li><tt><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/viewer-webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties">WEB-INF/persistor_datanucleus.properties</a></tt> (in <tt>viewer-webapp</tt> module)</a>
+ <li><tt><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/webapp/src/main/webapp/WEB-INF/persistor_datanucleus.properties">WEB-INF/persistor_datanucleus.properties</a></tt> (in <tt>webapp</tt> module)</a>
<ul>
<li>configuration for JDO object store
</li>
</ul>
</li>
- <li><tt><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/viewer-webapp/src/main/webapp/WEB-INF/shiro.ini">WEB-INF/shiro.ini</a></tt> (in <tt>viewer-webapp</tt> module)</a>
+ <li><tt><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/webapp/src/main/webapp/WEB-INF/persistor.properties">WEB-INF/persistor.properties</a></tt> (in <tt>webapp</tt> module)</a>
+ <ul>
+ <li>JDBC URL for JDO object store
+ </li>
+ </ul>
+ </li>
+ <li><tt><a href="https://github.com/apache/isis/blob/master/example/application/quickstart%5Fwicket_restful_jdo/webapp/src/main/webapp/WEB-INF/shiro.ini">WEB-INF/shiro.ini</a></tt> (in <tt>webapp</tt> module)</a>
<ul>
<li>configuration for Shiro security
</li>
@@ -166,7 +187,9 @@ th, td {
</li>
<li>Refactor the <tt>ToDoItem</tt>, <tt>ToDoItems</tt> and <tt>ToDoItemsJdo</tt> towards your own application's functionality; obviously you are likely to introduce many more classes and services
</li>
- <li>Reconfigure <tt>persistor_datanucleus.properties</tt> to specify the JDBC URL to the database you wish to work with; if necessary also update the <tt>pom.xml</tt> in the <tt>viewer-webapp</tt> module to add the JDBC driver to the classpath
+ <li>Reconfigure <tt>persistor.properties</tt> to specify the JDBC URL to the database you wish to work with; if necessary also update the <tt>pom.xml</tt> in the <tt>webapp</tt> module to add the JDBC driver to the classpath
+ </li>
+ <li>Fine-tune other RDBMS settings in <tt>persistor_datanucleus.properties</tt>
</li>
<li>Assuming you are using a persistent data store, then remove the <tt>ToDoItemsFixtureService</tt> from the <tt>isis.properties</tt> file (<tt>isis.services</tt> key). Alternatively you could keep but refactor to provide a similar service for your own application's domain.
</li>
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/dom/log4j.properties
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/dom/log4j.properties b/example/application/simple_wicket_restful_jdo/dom/log4j.properties
new file mode 100644
index 0000000..ca165ac
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/dom/log4j.properties
@@ -0,0 +1,41 @@
+# 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.
+
+# LOG4J Configuration
+# ===================
+
+# Basic logging goes to "datanucleus.log"
+log4j.appender.A1=org.apache.log4j.FileAppender
+log4j.appender.A1.File=datanucleus.log
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n
+#log4j.appender.A1.Threshold=INFO
+
+# Categories
+# Each category can be set to a "level", and to direct to an appender
+
+# Default to DEBUG level for all DataNucleus categories
+log4j.logger.DataNucleus = DEBUG, A1
+
+log4j.category.com.mchange.v2.c3p0=INFO, A1
+log4j.category.com.mchange.v2.resourcepool=INFO, A1
+log4j.category.org.logicalcobwebs.proxool=INFO,A1
+
+
+# Hbase libs logging
+log4j.category.org.apache.hadoop=INFO,A1
+log4j.category.org.apache.zookeeper=INFO,A1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/dom/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/dom/pom.xml b/example/application/simple_wicket_restful_jdo/dom/pom.xml
new file mode 100644
index 0000000..e2d2757
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/dom/pom.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.example.application</groupId>
+ <artifactId>simple_wicket_restful_jdo</artifactId>
+ <version>1.0.4-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>simple_wicket_restful_jdo-dom</artifactId>
+ <name>Simple Wicket/Restful/JDO DOM</name>
+
+ <build>
+ <resources>
+ <resource>
+ <filtering>false</filtering>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <filtering>false</filtering>
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-maven-plugin</artifactId>
+ <version>3.2.0-release</version>
+ <dependencies>
+ <dependency>
+ <!-- Force the enhancer to use the same version
+ of core that's already on the classpath -->
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-core</artifactId>
+ <version>${datanucleus-core.version}</version>
+ </dependency>
+ <dependency>
+ <!-- Force the enhancer to use the "jdo-api" released "3.0.1" version instead
+ of the "3.0.1-SNAPSHOT" version -->
+ <groupId>javax.jdo</groupId>
+ <artifactId>jdo-api</artifactId>
+ <version>3.0.1</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <fork>false</fork>
+ <log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
+ <verbose>true</verbose>
+ <props>${basedir}/datanucleus.properties</props>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.datanucleus
+ </groupId>
+ <artifactId>
+ datanucleus-maven-plugin
+ </artifactId>
+ <versionRange>
+ [3.2.0-release,)
+ </versionRange>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-applib</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.objectstore</groupId>
+ <artifactId>isis-objectstore-jdo-applib</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-unittestsupport</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- Bytecode libraries (for mocking) -->
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.objenesis</groupId>
+ <artifactId>objenesis</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib-nodep</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/dom/src/main/java/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/dom/src/main/java/META-INF/persistence.xml b/example/application/simple_wicket_restful_jdo/dom/src/main/java/META-INF/persistence.xml
new file mode 100644
index 0000000..8824aa1
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/dom/src/main/java/META-INF/persistence.xml
@@ -0,0 +1,26 @@
+<?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.
+-->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
+
+ <persistence-unit name="simple">
+ </persistence-unit>
+</persistence>
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/dom/src/main/java/dom/simple/SimpleObject.java
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/dom/src/main/java/dom/simple/SimpleObject.java b/example/application/simple_wicket_restful_jdo/dom/src/main/java/dom/simple/SimpleObject.java
new file mode 100644
index 0000000..0597341
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/dom/src/main/java/dom/simple/SimpleObject.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package dom.simple;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.VersionStrategy;
+
+import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.applib.annotation.Bookmarkable;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Title;
+import org.apache.isis.applib.util.ObjectContracts;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.DatastoreIdentity(
+ strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY,
+ column="id")
+@javax.jdo.annotations.Version(
+ strategy=VersionStrategy.VERSION_NUMBER,
+ column="version")
+@ObjectType("SIMPLE")
+@Bookmarkable
+public class SimpleObject implements Comparable<SimpleObject> {
+
+ // //////////////////////////////////////
+ // Name (property)
+ // //////////////////////////////////////
+
+ private String name;
+
+ @javax.jdo.annotations.Column(allowsNull="false")
+ @Title
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+
+ // //////////////////////////////////////
+ // compareTo
+ // //////////////////////////////////////
+
+ @Override
+ public int compareTo(SimpleObject other) {
+ return ObjectContracts.compare(this, other, "name");
+ }
+
+
+ // //////////////////////////////////////
+ // Injected
+ // //////////////////////////////////////
+
+ @SuppressWarnings("unused")
+ private DomainObjectContainer container;
+ public void injectDomainObjectContainer(final DomainObjectContainer container) {
+ this.container = container;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/dom/src/main/java/dom/simple/SimpleObject.layout.json
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/dom/src/main/java/dom/simple/SimpleObject.layout.json b/example/application/simple_wicket_restful_jdo/dom/src/main/java/dom/simple/SimpleObject.layout.json
new file mode 100644
index 0000000..aeeb8a2
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/dom/src/main/java/dom/simple/SimpleObject.layout.json
@@ -0,0 +1,44 @@
+/**
+ * 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.
+ */
+{
+ columns: [
+ {
+ span: 6,
+ memberGroups: {
+ General: {
+ members: {
+ name: {}
+ }
+ }
+ }
+ },
+ {
+ span: 0,
+ memberGroups: {}
+ },
+ {
+ span: 0,
+ memberGroups: {}
+ },
+ {
+ span: 6,
+ collections: {}
+ }
+ ],
+ actions: {}
+}
+
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/dom/src/main/java/dom/simple/SimpleObjects.java
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/dom/src/main/java/dom/simple/SimpleObjects.java b/example/application/simple_wicket_restful_jdo/dom/src/main/java/dom/simple/SimpleObjects.java
new file mode 100644
index 0000000..8002f70
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/dom/src/main/java/dom/simple/SimpleObjects.java
@@ -0,0 +1,71 @@
+/*
+ * 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 dom.simple;
+
+import java.util.List;
+
+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;
+
+public class SimpleObjects extends AbstractFactoryAndRepository {
+
+ // //////////////////////////////////////
+ // Identification in the UI
+ // //////////////////////////////////////
+
+ @Override
+ public String getId() {
+ return "simple";
+ }
+
+ public String iconName() {
+ return "SimpleObject";
+ }
+
+ // //////////////////////////////////////
+ // List (action)
+ // //////////////////////////////////////
+
+ @Bookmarkable
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public List<SimpleObject> listAll() {
+ return allInstances(SimpleObject.class);
+ }
+
+
+ // //////////////////////////////////////
+ // Create (action)
+ // //////////////////////////////////////
+
+ @Bookmarkable
+ @MemberOrder(sequence = "2")
+ public SimpleObject create(
+ final @Named("Name") String name) {
+ final SimpleObject obj = newTransientInstance(SimpleObject.class);
+ obj.setName(name);
+ persistIfNotAlready(obj);
+ return obj;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/dom/src/main/java/services/ClockService.java
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/dom/src/main/java/services/ClockService.java b/example/application/simple_wicket_restful_jdo/dom/src/main/java/services/ClockService.java
new file mode 100644
index 0000000..b485822
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/dom/src/main/java/services/ClockService.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 services;
+
+import org.joda.time.LocalDate;
+
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.clock.Clock;
+
+@Hidden
+public class ClockService {
+
+ @Programmatic
+ public LocalDate now() {
+ return Clock.getTimeAsLocalDate();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/dom/src/main/resources/images/SimpleObject.gif
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/dom/src/main/resources/images/SimpleObject.gif b/example/application/simple_wicket_restful_jdo/dom/src/main/resources/images/SimpleObject.gif
new file mode 100644
index 0000000..a5fc6ff
Binary files /dev/null and b/example/application/simple_wicket_restful_jdo/dom/src/main/resources/images/SimpleObject.gif differ
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/dom/src/test/java/dom/simple/SimpleObjectTest_name.java
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/dom/src/test/java/dom/simple/SimpleObjectTest_name.java b/example/application/simple_wicket_restful_jdo/dom/src/test/java/dom/simple/SimpleObjectTest_name.java
new file mode 100644
index 0000000..05b9914
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/dom/src/test/java/dom/simple/SimpleObjectTest_name.java
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package dom.simple;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+import dom.simple.SimpleObject;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class SimpleObjectTest_name {
+
+ private SimpleObject simpleObject;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleObject = new SimpleObject();
+ }
+
+ @Test
+ public void happyCase() throws Exception {
+ // given
+ assertThat(simpleObject.getName(), is(nullValue()));
+
+ // when
+ simpleObject.setName("Foobar");
+
+ // then
+ assertThat(simpleObject.getName(), is("Foobar"));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/dom/src/test/java/dom/simple/SimpleObjectsTest_create.java
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/dom/src/test/java/dom/simple/SimpleObjectsTest_create.java b/example/application/simple_wicket_restful_jdo/dom/src/test/java/dom/simple/SimpleObjectsTest_create.java
new file mode 100644
index 0000000..d9b2031
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/dom/src/test/java/dom/simple/SimpleObjectsTest_create.java
@@ -0,0 +1,76 @@
+/**
+ * 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 dom.simple;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+import dom.simple.SimpleObject;
+
+import org.jmock.Expectations;
+import org.jmock.Sequence;
+import org.jmock.auto.Mock;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
+
+public class SimpleObjectsTest_create {
+
+ @Rule
+ public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+
+ @Mock
+ private DomainObjectContainer mockContainer;
+
+ private SimpleObjects simpleObjects;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleObjects = new SimpleObjects();
+ simpleObjects.setContainer(mockContainer);
+ }
+
+ @Test
+ public void happyCase() throws Exception {
+
+ // given
+ final SimpleObject simpleObject = new SimpleObject();
+
+ final Sequence seq = context.sequence("create");
+ context.checking(new Expectations() {
+ {
+ oneOf(mockContainer).newTransientInstance(SimpleObject.class);
+ inSequence(seq);
+ will(returnValue(simpleObject));
+
+ oneOf(mockContainer).persistIfNotAlready(simpleObject);
+ inSequence(seq);
+ }
+ });
+
+ // when
+ final SimpleObject obj = simpleObjects.create("Foobar");
+
+ // then
+ assertThat(obj, is(simpleObject));
+ assertThat(obj.getName(), is("Foobar"));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/dom/src/test/java/dom/simple/SimpleObjectsTest_listAll.java
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/dom/src/test/java/dom/simple/SimpleObjectsTest_listAll.java b/example/application/simple_wicket_restful_jdo/dom/src/test/java/dom/simple/SimpleObjectsTest_listAll.java
new file mode 100644
index 0000000..a32515b
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/dom/src/test/java/dom/simple/SimpleObjectsTest_listAll.java
@@ -0,0 +1,76 @@
+/**
+ * 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 dom.simple;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import com.google.common.collect.Lists;
+
+import dom.simple.SimpleObject;
+
+import org.jmock.Expectations;
+import org.jmock.Sequence;
+import org.jmock.auto.Mock;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
+
+public class SimpleObjectsTest_listAll {
+
+ @Rule
+ public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+
+ @Mock
+ private DomainObjectContainer mockContainer;
+
+ private SimpleObjects simpleObjects;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleObjects = new SimpleObjects();
+ simpleObjects.setContainer(mockContainer);
+ }
+
+ @Test
+ public void happyCase() throws Exception {
+
+
+ // given
+ final List all = Lists.newArrayList();
+
+ context.checking(new Expectations() {
+ {
+ oneOf(mockContainer).allInstances(SimpleObject.class);
+ will(returnValue(all));
+ }
+ });
+
+ // when
+ final List list = simpleObjects.listAll();
+
+ // then
+ assertThat(list, is(all));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/fixture/.gitignore
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/fixture/.gitignore b/example/application/simple_wicket_restful_jdo/fixture/.gitignore
new file mode 100644
index 0000000..a48e45b
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/fixture/.gitignore
@@ -0,0 +1 @@
+/target-ide
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/fixture/pom.xml
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/fixture/pom.xml b/example/application/simple_wicket_restful_jdo/fixture/pom.xml
new file mode 100644
index 0000000..c2a9852
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/fixture/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.example.application</groupId>
+ <artifactId>simple_wicket_restful_jdo</artifactId>
+ <version>1.0.4-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>simple_wicket_restful_jdo-fixture</artifactId>
+ <name>Simple Wicket/Restful/JDO Fixtures</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>simple_wicket_restful_jdo-dom</artifactId>
+ </dependency>
+ </dependencies>
+
+</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/3df42bf4/example/application/simple_wicket_restful_jdo/fixture/src/main/java/fixture/LogonAsSvenFixture.java
----------------------------------------------------------------------
diff --git a/example/application/simple_wicket_restful_jdo/fixture/src/main/java/fixture/LogonAsSvenFixture.java b/example/application/simple_wicket_restful_jdo/fixture/src/main/java/fixture/LogonAsSvenFixture.java
new file mode 100644
index 0000000..5bdc6fe
--- /dev/null
+++ b/example/application/simple_wicket_restful_jdo/fixture/src/main/java/fixture/LogonAsSvenFixture.java
@@ -0,0 +1,30 @@
+/*
+ * 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 fixture;
+
+import org.apache.isis.applib.fixtures.LogonFixture;
+
+public class LogonAsSvenFixture extends LogonFixture {
+
+ public LogonAsSvenFixture() {
+ super("sven");
+ }
+
+}