ISIS-928: mothballing the todoapp (example app and archetype)
Project: http://git-wip-us.apache.org/repos/asf/isis/repo Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/a4ec0b72 Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/a4ec0b72 Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/a4ec0b72 Branch: refs/heads/master Commit: a4ec0b72e5e2d101fc55c53de57e269bb3f23826 Parents: 51d1f20 Author: Dan Haywood <[email protected]> Authored: Sat Feb 14 09:06:52 2015 +0000 Committer: Dan Haywood <[email protected]> Committed: Sat Feb 14 09:06:52 2015 +0000 ---------------------------------------------------------------------- example/application/todoapp/.gitattributes | 51 - example/application/todoapp/.gitignore | 40 - .../application/todoapp/dom/log4j.properties | 41 - example/application/todoapp/dom/pom.xml | 172 --- .../dom/src/main/java/META-INF/persistence.xml | 26 - .../dom/src/main/java/app/ToDoAppDashboard.java | 69 -- .../main/java/app/ToDoAppDashboard.layout.json | 26 - .../dom/src/main/java/app/ToDoAppDashboard.png | Bin 834 -> 0 bytes .../main/java/app/ToDoAppDashboardService.java | 44 - .../dom/src/main/java/app/ToDoItemAnalysis.java | 126 --- .../java/app/ToDoItemAnalysisContributions.java | 50 - .../java/app/ToDoItemsByCategoryViewModel.java | 168 --- .../ToDoItemsByCategoryViewModel.layout.json | 43 - .../java/app/ToDoItemsByCategoryViewModel.png | Bin 684 -> 0 bytes .../java/app/ToDoItemsByDateRangeViewModel.java | 137 --- .../ToDoItemsByDateRangeViewModel.layout.json | 33 - .../java/app/ToDoItemsByDateRangeViewModel.png | Bin 613 -> 0 bytes .../dom/src/main/java/dom/todo/Categorized.java | 32 - .../src/main/java/dom/todo/ToDoItem-done.png | Bin 1363 -> 0 bytes .../src/main/java/dom/todo/ToDoItem-todo.png | Bin 971 -> 0 bytes .../dom/src/main/java/dom/todo/ToDoItem.java | 979 ---------------- .../src/main/java/dom/todo/ToDoItem.layout.json | 222 ---- .../dom/src/main/java/dom/todo/ToDoItem.png | Bin 971 -> 0 bytes .../dom/todo/ToDoItemChangedPayloadFactory.java | 48 - .../java/dom/todo/ToDoItemContributions.java | 276 ----- .../java/dom/todo/ToDoItemSubscriptions.java | 399 ------- .../dom/src/main/java/dom/todo/ToDoItems.java | 257 ----- .../src/test/java/dom/todo/ToDoItemTest.java | 133 --- example/application/todoapp/fixture/pom.xml | 40 - .../fixture/todo/ToDoItemsFixturesService.java | 97 -- .../integtests/ToDoItemsIntegTestFixture.java | 40 - .../complete/ToDoItemCompleteAbstract.java | 52 - .../complete/ToDoItemCompleteForBuyStamps.java | 30 - .../ToDoItemCompleteForWriteBlogPost.java | 31 - .../todo/items/create/ToDoItemAbstract.java | 69 -- .../todo/items/create/ToDoItemForBuyBread.java | 37 - .../todo/items/create/ToDoItemForBuyMilk.java | 37 - .../todo/items/create/ToDoItemForBuyStamps.java | 39 - .../todo/items/create/ToDoItemForMowLawn.java | 37 - .../create/ToDoItemForOrganizeBrownBag.java | 37 - .../items/create/ToDoItemForPickUpLaundry.java | 37 - .../items/create/ToDoItemForSharpenKnives.java | 37 - .../create/ToDoItemForStageIsisRelease.java | 37 - .../ToDoItemForSubmitConferenceSession.java | 37 - .../items/create/ToDoItemForVacuumHouse.java | 37 - .../items/create/ToDoItemForWriteBlogPost.java | 39 - .../items/create/ToDoItemForWriteToPenPal.java | 37 - .../todo/items/delete/ToDoItemsDelete.java | 38 - .../todo/scenarios/ToDoItemsRecreate.java | 81 -- .../ToDoItemsRecreateAndCompleteSeveral.java | 86 -- ...oItemsRecreateAndCompleteSeveralForDick.java | 28 - ...DoItemsRecreateAndCompleteSeveralForJoe.java | 28 - .../scenarios/ToDoItemsRecreateForSven.java | 29 - .../src/main/java/fixture/todo/util/Util.java | 32 - .../todoapp/integtests/logging.properties | 101 -- example/application/todoapp/integtests/pom.xml | 159 --- .../integration/ToDoAppSystemInitializer.java | 77 -- .../integration/glue/BootstrappingGlue.java | 53 - .../integration/glue/CatalogOfFixturesGlue.java | 47 - .../integration/glue/InMemoryDBForToDoApp.java | 40 - .../integration/glue/todoitem/ToDoItemGlue.java | 165 --- .../integration/specs/todoitem/RunSpecs.java | 38 - .../ToDoItemSpec_findAndComplete.feature | 39 - ...findCompletedAndMarkAsNotYetComplete.feature | 35 - .../tests/AbstractToDoIntegTest.java | 38 - .../tests/ToDoItemContributionsIntegTest.java | 158 --- .../integration/tests/ToDoItemIntegTest.java | 1057 ----------------- .../integration/tests/ToDoItemsIntegTest.java | 132 --- example/application/todoapp/pom.xml | 378 ------- .../launch/ToDoApp-PROTOTYPE-jrebel.launch | 24 - .../ToDoApp-PROTOTYPE-with-fixtures.launch | 20 - .../ide/eclipse/launch/ToDoApp-PROTOTYPE.launch | 23 - .../ide/eclipse/launch/ToDoApp-SERVER.launch | 23 - .../webapp/ide/intellij/launch/README.txt | 3 - .../ide/intellij/launch/TodoApp_PROTOTYPE.xml | 29 - .../intellij/launch/TodoApp__enhance_only_.xml | 23 - .../application/todoapp/webapp/lib/.gitignore | 5 - example/application/todoapp/webapp/pom.xml | 352 ------ .../main/java/webapp/CustomMementoService.java | 61 - .../webapp/CustomRepresentationService.java | 32 - .../src/main/java/webapp/ToDoApplication.java | 150 --- .../prototyping/ExternalLinksService.java | 71 -- .../prototyping/WicketDeveloperUtilities.java | 44 - .../userprof/CustomUserProfileService.java | 43 - .../src/main/jettyconsole/isis-banner.pdn | Bin 69658 -> 0 bytes .../src/main/jettyconsole/isis-banner.png | Bin 30776 -> 0 bytes .../webapp/ToDoApplication_en.properties | 52 - .../webapp/src/main/resources/webapp/realm1.ini | 105 -- .../src/main/resources/webapp/welcome.html | 36 - .../src/main/webapp/WEB-INF/isis.properties | 290 ----- .../src/main/webapp/WEB-INF/logging.properties | 220 ---- .../main/webapp/WEB-INF/persistor.properties | 129 --- .../WEB-INF/persistor_datanucleus.properties | 88 -- .../webapp/src/main/webapp/WEB-INF/shiro.ini | 103 -- .../WEB-INF/viewer_restfulobjects.properties | 66 -- .../webapp/WEB-INF/viewer_wicket.properties | 87 -- .../webapp/src/main/webapp/WEB-INF/web.xml | 308 ----- .../src/main/webapp/about/images/isis-logo.png | Bin 14160 -> 0 bytes .../webapp/src/main/webapp/about/index.html | 175 --- .../webapp/src/main/webapp/css/application.css | 35 - .../main/webapp/images/todoapp-logo-header.pdn | Bin 17124 -> 0 bytes .../main/webapp/images/todoapp-logo-header.png | Bin 5560 -> 0 bytes .../main/webapp/images/todoapp-logo-signin.pdn | Bin 35612 -> 0 bytes .../main/webapp/images/todoapp-logo-signin.png | Bin 15079 -> 0 bytes .../src/main/webapp/images/todoapp-logo.pdn | Bin 138427 -> 0 bytes .../src/main/webapp/scripts/application.js | 3 - example/archetype/todoapp/pom.xml | 50 - .../appended-resources/supplemental-models.xml | 26 - .../META-INF/maven/archetype-metadata.xml | 167 --- .../archetype-resources/.gitattributes | 51 - .../resources/archetype-resources/.gitignore | 40 - .../archetype-resources/dom/log4j.properties | 44 - .../resources/archetype-resources/dom/pom.xml | 162 --- .../dom/src/main/java/META-INF/persistence.xml | 29 - .../dom/src/main/java/app/ToDoAppDashboard.java | 86 -- .../main/java/app/ToDoAppDashboard.layout.json | 26 - .../dom/src/main/java/app/ToDoAppDashboard.png | Bin 834 -> 0 bytes .../main/java/app/ToDoAppDashboardService.java | 35 - .../dom/src/main/java/app/ToDoItemAnalysis.java | 129 --- .../java/app/ToDoItemAnalysisContributions.java | 53 - .../java/app/ToDoItemsByCategoryViewModel.java | 171 --- .../ToDoItemsByCategoryViewModel.layout.json | 43 - .../java/app/ToDoItemsByCategoryViewModel.png | Bin 684 -> 0 bytes .../java/app/ToDoItemsByDateRangeViewModel.java | 140 --- .../ToDoItemsByDateRangeViewModel.layout.json | 33 - .../java/app/ToDoItemsByDateRangeViewModel.png | Bin 613 -> 0 bytes .../dom/src/main/java/dom/todo/Categorized.java | 35 - .../src/main/java/dom/todo/ToDoItem-done.png | Bin 1363 -> 0 bytes .../src/main/java/dom/todo/ToDoItem-todo.png | Bin 971 -> 0 bytes .../dom/src/main/java/dom/todo/ToDoItem.java | 982 ---------------- .../src/main/java/dom/todo/ToDoItem.layout.json | 222 ---- .../dom/src/main/java/dom/todo/ToDoItem.png | Bin 971 -> 0 bytes .../dom/todo/ToDoItemChangedPayloadFactory.java | 51 - .../java/dom/todo/ToDoItemContributions.java | 274 ----- .../java/dom/todo/ToDoItemSubscriptions.java | 402 ------- .../dom/src/main/java/dom/todo/ToDoItems.java | 260 ----- .../src/test/java/dom/todo/ToDoItemTest.java | 136 --- .../archetype-resources/fixture/pom.xml | 38 - .../fixture/todo/ToDoItemsFixturesService.java | 100 -- .../integtests/ToDoItemsIntegTestFixture.java | 43 - .../complete/ToDoItemCompleteAbstract.java | 55 - .../complete/ToDoItemCompleteForBuyStamps.java | 33 - .../ToDoItemCompleteForWriteBlogPost.java | 34 - .../todo/items/create/ToDoItemAbstract.java | 72 -- .../todo/items/create/ToDoItemForBuyBread.java | 40 - .../todo/items/create/ToDoItemForBuyMilk.java | 40 - .../todo/items/create/ToDoItemForBuyStamps.java | 42 - .../todo/items/create/ToDoItemForMowLawn.java | 40 - .../create/ToDoItemForOrganizeBrownBag.java | 40 - .../items/create/ToDoItemForPickUpLaundry.java | 40 - .../items/create/ToDoItemForSharpenKnives.java | 40 - .../create/ToDoItemForStageIsisRelease.java | 40 - .../ToDoItemForSubmitConferenceSession.java | 40 - .../items/create/ToDoItemForVacuumHouse.java | 40 - .../items/create/ToDoItemForWriteBlogPost.java | 42 - .../items/create/ToDoItemForWriteToPenPal.java | 40 - .../todo/items/delete/ToDoItemsDelete.java | 41 - .../todo/scenarios/ToDoItemsRecreate.java | 84 -- .../ToDoItemsRecreateAndCompleteSeveral.java | 89 -- ...oItemsRecreateAndCompleteSeveralForDick.java | 31 - ...DoItemsRecreateAndCompleteSeveralForJoe.java | 31 - .../scenarios/ToDoItemsRecreateForSven.java | 32 - .../src/main/java/fixture/todo/util/Util.java | 35 - .../integtests/logging.properties | 104 -- .../archetype-resources/integtests/pom.xml | 122 -- .../integration/ToDoAppSystemInitializer.java | 80 -- .../integration/glue/BootstrappingGlue.java | 56 - .../integration/glue/CatalogOfFixturesGlue.java | 50 - .../integration/glue/InMemoryDBForToDoApp.java | 43 - .../integration/glue/todoitem/ToDoItemGlue.java | 168 --- .../integration/specs/todoitem/RunSpecs.java | 41 - .../ToDoItemSpec_findAndComplete.feature | 39 - ...findCompletedAndMarkAsNotYetComplete.feature | 35 - .../tests/AbstractToDoIntegTest.java | 41 - .../tests/ToDoItemContributionsIntegTest.java | 161 --- .../integration/tests/ToDoItemIntegTest.java | 1060 ------------------ .../integration/tests/ToDoItemsIntegTest.java | 135 --- .../main/resources/archetype-resources/pom.xml | 365 ------ .../launch/ToDoApp-PROTOTYPE-jrebel.launch | 26 - .../ToDoApp-PROTOTYPE-with-fixtures.launch | 22 - .../ide/eclipse/launch/ToDoApp-PROTOTYPE.launch | 25 - .../ide/eclipse/launch/ToDoApp-SERVER.launch | 25 - .../webapp/ide/intellij/launch/README.txt | 6 - .../ide/intellij/launch/TodoApp_PROTOTYPE.xml | 32 - .../intellij/launch/TodoApp__enhance_only_.xml | 26 - .../archetype-resources/webapp/lib/.gitignore | 5 - .../archetype-resources/webapp/pom.xml | 346 ------ .../main/java/webapp/CustomMementoService.java | 64 -- .../webapp/CustomRepresentationService.java | 35 - .../src/main/java/webapp/ToDoApplication.java | 153 --- .../prototyping/ExternalLinksService.java | 74 -- .../prototyping/WicketDeveloperUtilities.java | 47 - .../userprof/CustomUserProfileService.java | 46 - .../src/main/jettyconsole/isis-banner.pdn | Bin 69658 -> 0 bytes .../src/main/jettyconsole/isis-banner.png | Bin 30776 -> 0 bytes .../webapp/ToDoApplication_en.properties | 55 - .../webapp/src/main/resources/webapp/realm1.ini | 105 -- .../src/main/resources/webapp/welcome.html | 39 - .../src/main/webapp/WEB-INF/isis.properties | 280 ----- .../src/main/webapp/WEB-INF/logging.properties | 223 ---- .../main/webapp/WEB-INF/persistor.properties | 132 --- .../WEB-INF/persistor_datanucleus.properties | 91 -- .../webapp/src/main/webapp/WEB-INF/shiro.ini | 103 -- .../WEB-INF/viewer_restfulobjects.properties | 69 -- .../webapp/WEB-INF/viewer_wicket.properties | 90 -- .../webapp/src/main/webapp/WEB-INF/web.xml | 311 ----- .../src/main/webapp/about/images/isis-logo.png | Bin 14160 -> 0 bytes .../webapp/src/main/webapp/about/index.html | 178 --- .../webapp/src/main/webapp/css/application.css | 35 - .../main/webapp/images/todoapp-logo-header.pdn | Bin 17124 -> 0 bytes .../main/webapp/images/todoapp-logo-header.png | Bin 5560 -> 0 bytes .../main/webapp/images/todoapp-logo-signin.pdn | Bin 35612 -> 0 bytes .../main/webapp/images/todoapp-logo-signin.png | Bin 15079 -> 0 bytes .../src/main/webapp/images/todoapp-logo.pdn | Bin 138427 -> 0 bytes .../src/main/webapp/scripts/application.js | 3 - .../projects/basic/archetype.properties | 5 - .../src/test/resources/projects/basic/goal.txt | 0 .../example/application/todoapp/.gitattributes | 51 + .../example/application/todoapp/.gitignore | 40 + .../application/todoapp/dom/log4j.properties | 41 + .../example/application/todoapp/dom/pom.xml | 172 +++ .../dom/src/main/java/META-INF/persistence.xml | 26 + .../dom/src/main/java/app/ToDoAppDashboard.java | 69 ++ .../main/java/app/ToDoAppDashboard.layout.json | 26 + .../dom/src/main/java/app/ToDoAppDashboard.png | Bin 0 -> 834 bytes .../main/java/app/ToDoAppDashboardService.java | 44 + .../dom/src/main/java/app/ToDoItemAnalysis.java | 126 +++ .../java/app/ToDoItemAnalysisContributions.java | 50 + .../java/app/ToDoItemsByCategoryViewModel.java | 168 +++ .../ToDoItemsByCategoryViewModel.layout.json | 43 + .../java/app/ToDoItemsByCategoryViewModel.png | Bin 0 -> 684 bytes .../java/app/ToDoItemsByDateRangeViewModel.java | 137 +++ .../ToDoItemsByDateRangeViewModel.layout.json | 33 + .../java/app/ToDoItemsByDateRangeViewModel.png | Bin 0 -> 613 bytes .../dom/src/main/java/dom/todo/Categorized.java | 32 + .../src/main/java/dom/todo/ToDoItem-done.png | Bin 0 -> 1363 bytes .../src/main/java/dom/todo/ToDoItem-todo.png | Bin 0 -> 971 bytes .../dom/src/main/java/dom/todo/ToDoItem.java | 979 ++++++++++++++++ .../src/main/java/dom/todo/ToDoItem.layout.json | 222 ++++ .../dom/src/main/java/dom/todo/ToDoItem.png | Bin 0 -> 971 bytes .../dom/todo/ToDoItemChangedPayloadFactory.java | 48 + .../java/dom/todo/ToDoItemContributions.java | 276 +++++ .../java/dom/todo/ToDoItemSubscriptions.java | 399 +++++++ .../dom/src/main/java/dom/todo/ToDoItems.java | 257 +++++ .../src/test/java/dom/todo/ToDoItemTest.java | 133 +++ .../example/application/todoapp/fixture/pom.xml | 40 + .../fixture/todo/ToDoItemsFixturesService.java | 97 ++ .../integtests/ToDoItemsIntegTestFixture.java | 40 + .../complete/ToDoItemCompleteAbstract.java | 52 + .../complete/ToDoItemCompleteForBuyStamps.java | 30 + .../ToDoItemCompleteForWriteBlogPost.java | 31 + .../todo/items/create/ToDoItemAbstract.java | 69 ++ .../todo/items/create/ToDoItemForBuyBread.java | 37 + .../todo/items/create/ToDoItemForBuyMilk.java | 37 + .../todo/items/create/ToDoItemForBuyStamps.java | 39 + .../todo/items/create/ToDoItemForMowLawn.java | 37 + .../create/ToDoItemForOrganizeBrownBag.java | 37 + .../items/create/ToDoItemForPickUpLaundry.java | 37 + .../items/create/ToDoItemForSharpenKnives.java | 37 + .../create/ToDoItemForStageIsisRelease.java | 37 + .../ToDoItemForSubmitConferenceSession.java | 37 + .../items/create/ToDoItemForVacuumHouse.java | 37 + .../items/create/ToDoItemForWriteBlogPost.java | 39 + .../items/create/ToDoItemForWriteToPenPal.java | 37 + .../todo/items/delete/ToDoItemsDelete.java | 38 + .../todo/scenarios/ToDoItemsRecreate.java | 81 ++ .../ToDoItemsRecreateAndCompleteSeveral.java | 86 ++ ...oItemsRecreateAndCompleteSeveralForDick.java | 28 + ...DoItemsRecreateAndCompleteSeveralForJoe.java | 28 + .../scenarios/ToDoItemsRecreateForSven.java | 29 + .../src/main/java/fixture/todo/util/Util.java | 32 + .../todoapp/integtests/logging.properties | 101 ++ .../application/todoapp/integtests/pom.xml | 159 +++ .../integration/ToDoAppSystemInitializer.java | 77 ++ .../integration/glue/BootstrappingGlue.java | 53 + .../integration/glue/CatalogOfFixturesGlue.java | 47 + .../integration/glue/InMemoryDBForToDoApp.java | 40 + .../integration/glue/todoitem/ToDoItemGlue.java | 165 +++ .../integration/specs/todoitem/RunSpecs.java | 38 + .../ToDoItemSpec_findAndComplete.feature | 39 + ...findCompletedAndMarkAsNotYetComplete.feature | 35 + .../tests/AbstractToDoIntegTest.java | 38 + .../tests/ToDoItemContributionsIntegTest.java | 158 +++ .../integration/tests/ToDoItemIntegTest.java | 1057 +++++++++++++++++ .../integration/tests/ToDoItemsIntegTest.java | 132 +++ mothballed/example/application/todoapp/pom.xml | 378 +++++++ .../launch/ToDoApp-PROTOTYPE-jrebel.launch | 24 + .../ToDoApp-PROTOTYPE-with-fixtures.launch | 20 + .../ide/eclipse/launch/ToDoApp-PROTOTYPE.launch | 23 + .../ide/eclipse/launch/ToDoApp-SERVER.launch | 23 + .../webapp/ide/intellij/launch/README.txt | 3 + .../ide/intellij/launch/TodoApp_PROTOTYPE.xml | 29 + .../intellij/launch/TodoApp__enhance_only_.xml | 23 + .../application/todoapp/webapp/lib/.gitignore | 5 + .../example/application/todoapp/webapp/pom.xml | 352 ++++++ .../main/java/webapp/CustomMementoService.java | 61 + .../webapp/CustomRepresentationService.java | 32 + .../src/main/java/webapp/ToDoApplication.java | 150 +++ .../prototyping/ExternalLinksService.java | 71 ++ .../prototyping/WicketDeveloperUtilities.java | 44 + .../userprof/CustomUserProfileService.java | 43 + .../src/main/jettyconsole/isis-banner.pdn | Bin 0 -> 69658 bytes .../src/main/jettyconsole/isis-banner.png | Bin 0 -> 30776 bytes .../webapp/ToDoApplication_en.properties | 52 + .../webapp/src/main/resources/webapp/realm1.ini | 105 ++ .../src/main/resources/webapp/welcome.html | 36 + .../src/main/webapp/WEB-INF/isis.properties | 290 +++++ .../src/main/webapp/WEB-INF/logging.properties | 220 ++++ .../main/webapp/WEB-INF/persistor.properties | 129 +++ .../WEB-INF/persistor_datanucleus.properties | 88 ++ .../webapp/src/main/webapp/WEB-INF/shiro.ini | 103 ++ .../WEB-INF/viewer_restfulobjects.properties | 66 ++ .../webapp/WEB-INF/viewer_wicket.properties | 87 ++ .../webapp/src/main/webapp/WEB-INF/web.xml | 308 +++++ .../src/main/webapp/about/images/isis-logo.png | Bin 0 -> 14160 bytes .../webapp/src/main/webapp/about/index.html | 175 +++ .../webapp/src/main/webapp/css/application.css | 35 + .../main/webapp/images/todoapp-logo-header.pdn | Bin 0 -> 17124 bytes .../main/webapp/images/todoapp-logo-header.png | Bin 0 -> 5560 bytes .../main/webapp/images/todoapp-logo-signin.pdn | Bin 0 -> 35612 bytes .../main/webapp/images/todoapp-logo-signin.png | Bin 0 -> 15079 bytes .../src/main/webapp/images/todoapp-logo.pdn | Bin 0 -> 138427 bytes .../src/main/webapp/scripts/application.js | 3 + mothballed/example/archetype/todoapp/pom.xml | 50 + .../appended-resources/supplemental-models.xml | 26 + .../META-INF/maven/archetype-metadata.xml | 167 +++ .../archetype-resources/.gitattributes | 51 + .../resources/archetype-resources/.gitignore | 40 + .../archetype-resources/dom/log4j.properties | 44 + .../resources/archetype-resources/dom/pom.xml | 162 +++ .../dom/src/main/java/META-INF/persistence.xml | 29 + .../dom/src/main/java/app/ToDoAppDashboard.java | 86 ++ .../main/java/app/ToDoAppDashboard.layout.json | 26 + .../dom/src/main/java/app/ToDoAppDashboard.png | Bin 0 -> 834 bytes .../main/java/app/ToDoAppDashboardService.java | 35 + .../dom/src/main/java/app/ToDoItemAnalysis.java | 129 +++ .../java/app/ToDoItemAnalysisContributions.java | 53 + .../java/app/ToDoItemsByCategoryViewModel.java | 171 +++ .../ToDoItemsByCategoryViewModel.layout.json | 43 + .../java/app/ToDoItemsByCategoryViewModel.png | Bin 0 -> 684 bytes .../java/app/ToDoItemsByDateRangeViewModel.java | 140 +++ .../ToDoItemsByDateRangeViewModel.layout.json | 33 + .../java/app/ToDoItemsByDateRangeViewModel.png | Bin 0 -> 613 bytes .../dom/src/main/java/dom/todo/Categorized.java | 35 + .../src/main/java/dom/todo/ToDoItem-done.png | Bin 0 -> 1363 bytes .../src/main/java/dom/todo/ToDoItem-todo.png | Bin 0 -> 971 bytes .../dom/src/main/java/dom/todo/ToDoItem.java | 982 ++++++++++++++++ .../src/main/java/dom/todo/ToDoItem.layout.json | 222 ++++ .../dom/src/main/java/dom/todo/ToDoItem.png | Bin 0 -> 971 bytes .../dom/todo/ToDoItemChangedPayloadFactory.java | 51 + .../java/dom/todo/ToDoItemContributions.java | 274 +++++ .../java/dom/todo/ToDoItemSubscriptions.java | 402 +++++++ .../dom/src/main/java/dom/todo/ToDoItems.java | 260 +++++ .../src/test/java/dom/todo/ToDoItemTest.java | 136 +++ .../archetype-resources/fixture/pom.xml | 38 + .../fixture/todo/ToDoItemsFixturesService.java | 100 ++ .../integtests/ToDoItemsIntegTestFixture.java | 43 + .../complete/ToDoItemCompleteAbstract.java | 55 + .../complete/ToDoItemCompleteForBuyStamps.java | 33 + .../ToDoItemCompleteForWriteBlogPost.java | 34 + .../todo/items/create/ToDoItemAbstract.java | 72 ++ .../todo/items/create/ToDoItemForBuyBread.java | 40 + .../todo/items/create/ToDoItemForBuyMilk.java | 40 + .../todo/items/create/ToDoItemForBuyStamps.java | 42 + .../todo/items/create/ToDoItemForMowLawn.java | 40 + .../create/ToDoItemForOrganizeBrownBag.java | 40 + .../items/create/ToDoItemForPickUpLaundry.java | 40 + .../items/create/ToDoItemForSharpenKnives.java | 40 + .../create/ToDoItemForStageIsisRelease.java | 40 + .../ToDoItemForSubmitConferenceSession.java | 40 + .../items/create/ToDoItemForVacuumHouse.java | 40 + .../items/create/ToDoItemForWriteBlogPost.java | 42 + .../items/create/ToDoItemForWriteToPenPal.java | 40 + .../todo/items/delete/ToDoItemsDelete.java | 41 + .../todo/scenarios/ToDoItemsRecreate.java | 84 ++ .../ToDoItemsRecreateAndCompleteSeveral.java | 89 ++ ...oItemsRecreateAndCompleteSeveralForDick.java | 31 + ...DoItemsRecreateAndCompleteSeveralForJoe.java | 31 + .../scenarios/ToDoItemsRecreateForSven.java | 32 + .../src/main/java/fixture/todo/util/Util.java | 35 + .../integtests/logging.properties | 104 ++ .../archetype-resources/integtests/pom.xml | 122 ++ .../integration/ToDoAppSystemInitializer.java | 80 ++ .../integration/glue/BootstrappingGlue.java | 56 + .../integration/glue/CatalogOfFixturesGlue.java | 50 + .../integration/glue/InMemoryDBForToDoApp.java | 43 + .../integration/glue/todoitem/ToDoItemGlue.java | 168 +++ .../integration/specs/todoitem/RunSpecs.java | 41 + .../ToDoItemSpec_findAndComplete.feature | 39 + ...findCompletedAndMarkAsNotYetComplete.feature | 35 + .../tests/AbstractToDoIntegTest.java | 41 + .../tests/ToDoItemContributionsIntegTest.java | 161 +++ .../integration/tests/ToDoItemIntegTest.java | 1060 ++++++++++++++++++ .../integration/tests/ToDoItemsIntegTest.java | 135 +++ .../main/resources/archetype-resources/pom.xml | 365 ++++++ .../launch/ToDoApp-PROTOTYPE-jrebel.launch | 26 + .../ToDoApp-PROTOTYPE-with-fixtures.launch | 22 + .../ide/eclipse/launch/ToDoApp-PROTOTYPE.launch | 25 + .../ide/eclipse/launch/ToDoApp-SERVER.launch | 25 + .../webapp/ide/intellij/launch/README.txt | 6 + .../ide/intellij/launch/TodoApp_PROTOTYPE.xml | 32 + .../intellij/launch/TodoApp__enhance_only_.xml | 26 + .../archetype-resources/webapp/lib/.gitignore | 5 + .../archetype-resources/webapp/pom.xml | 346 ++++++ .../main/java/webapp/CustomMementoService.java | 64 ++ .../webapp/CustomRepresentationService.java | 35 + .../src/main/java/webapp/ToDoApplication.java | 153 +++ .../prototyping/ExternalLinksService.java | 74 ++ .../prototyping/WicketDeveloperUtilities.java | 47 + .../userprof/CustomUserProfileService.java | 46 + .../src/main/jettyconsole/isis-banner.pdn | Bin 0 -> 69658 bytes .../src/main/jettyconsole/isis-banner.png | Bin 0 -> 30776 bytes .../webapp/ToDoApplication_en.properties | 55 + .../webapp/src/main/resources/webapp/realm1.ini | 105 ++ .../src/main/resources/webapp/welcome.html | 39 + .../src/main/webapp/WEB-INF/isis.properties | 280 +++++ .../src/main/webapp/WEB-INF/logging.properties | 223 ++++ .../main/webapp/WEB-INF/persistor.properties | 132 +++ .../WEB-INF/persistor_datanucleus.properties | 91 ++ .../webapp/src/main/webapp/WEB-INF/shiro.ini | 103 ++ .../WEB-INF/viewer_restfulobjects.properties | 69 ++ .../webapp/WEB-INF/viewer_wicket.properties | 90 ++ .../webapp/src/main/webapp/WEB-INF/web.xml | 311 +++++ .../src/main/webapp/about/images/isis-logo.png | Bin 0 -> 14160 bytes .../webapp/src/main/webapp/about/index.html | 178 +++ .../webapp/src/main/webapp/css/application.css | 35 + .../main/webapp/images/todoapp-logo-header.pdn | Bin 0 -> 17124 bytes .../main/webapp/images/todoapp-logo-header.png | Bin 0 -> 5560 bytes .../main/webapp/images/todoapp-logo-signin.pdn | Bin 0 -> 35612 bytes .../main/webapp/images/todoapp-logo-signin.png | Bin 0 -> 15079 bytes .../src/main/webapp/images/todoapp-logo.pdn | Bin 0 -> 138427 bytes .../src/main/webapp/scripts/application.js | 3 + .../projects/basic/archetype.properties | 5 + .../src/test/resources/projects/basic/goal.txt | 0 pom.xml | 7 - 435 files changed, 19618 insertions(+), 19625 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/.gitattributes ---------------------------------------------------------------------- diff --git a/example/application/todoapp/.gitattributes b/example/application/todoapp/.gitattributes deleted file mode 100644 index b1eafb6..0000000 --- a/example/application/todoapp/.gitattributes +++ /dev/null @@ -1,51 +0,0 @@ -# -# -# text files are normalized (convert crlf => lf) -# binary files are not normalized (binary is a macro for -text -diff) -# -# - - -# Unless otherwise stated, assume text - -* text=auto - - -*.java text diff=java -*.html text diff=html -*.xhtml text diff=html -*.xml text -*.txt text - - -*.jar binary -*.so binary -*.dll binary - -# images -*.jpg binary -*.jpeg binary -*.png binary -*.pdn binary -*.pdn binary - - -*.cs text diff=csharp - -*.sln merge=union -*.csproj merge=union -*.vbproj merge=union -*.fsproj merge=union -*.dbproj merge=union - -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain - http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/.gitignore ---------------------------------------------------------------------- diff --git a/example/application/todoapp/.gitignore b/example/application/todoapp/.gitignore deleted file mode 100644 index ad3f5e2..0000000 --- a/example/application/todoapp/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -*~ -*.swp -*.class -bin/ -target/ -target-ide/ -logs/ -.settings/ -.project -.classpath -.idea -*.iml - -JArchitectOut/ -*.jdproj - -neo4j_DB/ - -# log files -datanucleus.log -isis.log -hs_err_pid*.log - -# Package Files # -*.jar -*.war -*.ear - -dependency-reduced-pom.xml -pom.xml.tag -pom.xml.next -pom.xml.releaseBackup -pom.xml.versionsBackup - -.clover/ -*.jdproj -JArchitectOut/ - - -rebel.xml http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/log4j.properties ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/log4j.properties b/example/application/todoapp/dom/log4j.properties deleted file mode 100644 index ca165ac..0000000 --- a/example/application/todoapp/dom/log4j.properties +++ /dev/null @@ -1,41 +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. - -# 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/a4ec0b72/example/application/todoapp/dom/pom.xml ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/pom.xml b/example/application/todoapp/dom/pom.xml deleted file mode 100644 index 09f46d9..0000000 --- a/example/application/todoapp/dom/pom.xml +++ /dev/null @@ -1,172 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.isis.example.application</groupId> - <artifactId>todoapp</artifactId> - <version>1.8.0-SNAPSHOT</version> - </parent> - - <artifactId>todoapp-dom</artifactId> - <name>ToDo App 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>${datanucleus-maven-plugin.version}</version> - <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.core</groupId> - <artifactId>isis-core-unittestsupport</artifactId> - <scope>test</scope> - </dependency> - - <!-- Bytecode libraries (for mocking) --> - <dependency> - <groupId>org.objenesis</groupId> - <artifactId>objenesis</artifactId> - <scope>test</scope> - </dependency> - </dependencies> - - <profiles> - <profile> - <id>isis-validate</id> - <activation> - <activeByDefault>false</activeByDefault> - </activation> - <build> - <plugins> - <plugin> - <groupId>org.apache.isis.tool</groupId> - <artifactId>isis-maven-plugin</artifactId> - <version>1.8.0-SNAPSHOT</version> - <configuration> - <isisConfigDir>../webapp/src/main/webapp/WEB-INF</isisConfigDir> - </configuration> - <dependencies> - <dependency> - <groupId>org.apache.isis.example.application</groupId> - <artifactId>todoapp-dom</artifactId> - <version>1.8.0-SNAPSHOT</version> - </dependency> - <!-- - ... workaround to avoid conflict with plexus-default - (not sure why exclusions in the isis-maven-plugin aren't sufficient, though ... - --> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>16.0.1</version> - </dependency> - </dependencies> - <executions> - <execution> - <phase>test</phase> - <goals> - <goal>validate</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> - -</project> http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/META-INF/persistence.xml ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/META-INF/persistence.xml b/example/application/todoapp/dom/src/main/java/META-INF/persistence.xml deleted file mode 100644 index 9b38012..0000000 --- a/example/application/todoapp/dom/src/main/java/META-INF/persistence.xml +++ /dev/null @@ -1,26 +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. ---> -<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="quickstart"> - </persistence-unit> -</persistence> http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboard.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboard.java b/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboard.java deleted file mode 100644 index e3a3723..0000000 --- a/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboard.java +++ /dev/null @@ -1,69 +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.util.List; -import org.apache.isis.applib.annotation.Collection; -import org.apache.isis.applib.annotation.CollectionLayout; -import org.apache.isis.applib.annotation.DomainObject; -import org.apache.isis.applib.annotation.Editing; -import org.apache.isis.applib.annotation.Nature; -import org.apache.isis.applib.annotation.RenderType; - -@DomainObject(nature = Nature.VIEW_MODEL) -public class ToDoAppDashboard { - - //region > identification in the UI - public String title() { - return "Dashboard"; - } - //endregion - - //region > getAnalysisByCategory (collection) - @CollectionLayout( - named="By Category", - render = RenderType.EAGERLY - ) - @Collection( - editing = Editing.DISABLED - ) - public List<ToDoItemsByCategoryViewModel> getAnalysisByCategory() { - return toDoItemAnalysis.toDoItemsByCategory(); - } - //endregion - - //region > getAnalysisByDateRange (collection) - @CollectionLayout( - named="By Date Range", - render = RenderType.EAGERLY - ) - @Collection( - editing = Editing.DISABLED - ) - public List<ToDoItemsByDateRangeViewModel> getAnalysisByDateRange() { - return toDoItemAnalysis.toDoItemsByDateRange(); - } - //endregion - - //region > injected services - @javax.inject.Inject - private ToDoItemAnalysis toDoItemAnalysis; - //endregion - -} http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboard.layout.json ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboard.layout.json b/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboard.layout.json deleted file mode 100644 index 3421543..0000000 --- a/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboard.layout.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "columns": [ - { - "span": 0, - "memberGroups": {} - }, - { - "span": 0, - "memberGroups": {} - }, - { - "span": 0, - "memberGroups": {} - }, - { - "span": 12, - "collections": { - "analysisByCategory": {} - } - } - ], - "actions": { - "downloadLayout": {}, - "refreshLayout": {} - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboard.png ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboard.png b/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboard.png deleted file mode 100644 index fe6e6a1..0000000 Binary files a/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboard.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboardService.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboardService.java b/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboardService.java deleted file mode 100644 index 3bc371c..0000000 --- a/example/application/todoapp/dom/src/main/java/app/ToDoAppDashboardService.java +++ /dev/null @@ -1,44 +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 javax.inject.Inject; -import org.apache.isis.applib.DomainObjectContainer; -import org.apache.isis.applib.annotation.Action; -import org.apache.isis.applib.annotation.DomainService; -import org.apache.isis.applib.annotation.HomePage; -import org.apache.isis.applib.annotation.NatureOfService; -import org.apache.isis.applib.annotation.SemanticsOf; - -@DomainService(nature = NatureOfService.DOMAIN) -public class ToDoAppDashboardService { - - @Action( - semantics = SemanticsOf.SAFE - //hidden = Where.EVERYWHERE - ) - @HomePage - public ToDoAppDashboard lookup() { - return container.injectServicesInto(new ToDoAppDashboard()); - } - - @Inject - private DomainObjectContainer container; - -} http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/app/ToDoItemAnalysis.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/app/ToDoItemAnalysis.java b/example/application/todoapp/dom/src/main/java/app/ToDoItemAnalysis.java deleted file mode 100644 index 4c7d157..0000000 --- a/example/application/todoapp/dom/src/main/java/app/ToDoItemAnalysis.java +++ /dev/null @@ -1,126 +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 dom.todo.ToDoItem.Category; - -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 org.apache.isis.applib.DomainObjectContainer; -import org.apache.isis.applib.annotation.Action; -import org.apache.isis.applib.annotation.ActionLayout; -import org.apache.isis.applib.annotation.BookmarkPolicy; -import org.apache.isis.applib.annotation.DomainService; -import org.apache.isis.applib.annotation.DomainServiceLayout; -import org.apache.isis.applib.annotation.MemberOrder; -import org.apache.isis.applib.annotation.Programmatic; -import org.apache.isis.applib.annotation.SemanticsOf; - -@DomainServiceLayout( - named="Analysis", - menuOrder = "20") -@DomainService -public class ToDoItemAnalysis { - - - //region > identification in the UI - public String getId() { - return "analysis"; - } - - public String iconName() { - return "ToDoItem"; - } - //endregion - - - //region > byCategory (action) - @ActionLayout( - cssClassFa="fa fa-pie-chart", - named="By Category", - bookmarking = BookmarkPolicy.AS_ROOT - ) - @Action(semantics = SemanticsOf.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) { - return new ToDoItemsByCategoryViewModel(category); - } - }; - } - //endregion - - //region > byDateRange (action) - - public enum DateRange { - OverDue, - Today, - Tomorrow, - ThisWeek, - Later, - Unknown, - } - - @ActionLayout( - cssClassFa="fa fa-calendar", - named="By Date Range", - bookmarking = BookmarkPolicy.AS_ROOT - ) - @Action(semantics = SemanticsOf.SAFE) - @MemberOrder(sequence = "1") - public List<ToDoItemsByDateRangeViewModel> toDoItemsByDateRange() { - final List<DateRange> dateRanges = Arrays.asList(DateRange.values()); - return Lists.newArrayList(Iterables.transform(dateRanges, byDateRange())); - } - - private static Function<DateRange, ToDoItemsByDateRangeViewModel> byDateRange() { - return new Function<DateRange, ToDoItemsByDateRangeViewModel>(){ - @Override - public ToDoItemsByDateRangeViewModel apply(final DateRange dateRange) { - return new ToDoItemsByDateRangeViewModel(dateRange); - } - }; - } - //endregion - - //region > forCategory (programmatic) - @Programmatic - public ToDoItemsByCategoryViewModel toDoItemsForCategory(final Category category) { - return byCategory().apply(category); - } - - //endregion - - //region > injected services - @javax.inject.Inject - private DomainObjectContainer container; - - //endregion - -} http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/app/ToDoItemAnalysisContributions.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/app/ToDoItemAnalysisContributions.java b/example/application/todoapp/dom/src/main/java/app/ToDoItemAnalysisContributions.java deleted file mode 100644 index baf4b00..0000000 --- a/example/application/todoapp/dom/src/main/java/app/ToDoItemAnalysisContributions.java +++ /dev/null @@ -1,50 +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 dom.todo.ToDoItem; - -import org.apache.isis.applib.annotation.Action; -import org.apache.isis.applib.annotation.ActionLayout; -import org.apache.isis.applib.annotation.Contributed; -import org.apache.isis.applib.annotation.DomainService; -import org.apache.isis.applib.annotation.NatureOfService; -import org.apache.isis.applib.annotation.SemanticsOf; - -@DomainService(nature = NatureOfService.VIEW_CONTRIBUTIONS_ONLY) -public class ToDoItemAnalysisContributions { - - - //region > analyseCategory (action) - @ActionLayout(contributed = Contributed.AS_ACTION) - @Action( - semantics = SemanticsOf.SAFE - ) - public ToDoItemsByCategoryViewModel analyseCategory(final ToDoItem item) { - return toDoAppAnalysis.toDoItemsForCategory(item.getCategory()); - } - //endregion - - //region > injected services - @javax.inject.Inject - private ToDoItemAnalysis toDoAppAnalysis; - - //endregion - -} http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/app/ToDoItemsByCategoryViewModel.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/app/ToDoItemsByCategoryViewModel.java b/example/application/todoapp/dom/src/main/java/app/ToDoItemsByCategoryViewModel.java deleted file mode 100644 index 8ebae61..0000000 --- a/example/application/todoapp/dom/src/main/java/app/ToDoItemsByCategoryViewModel.java +++ /dev/null @@ -1,168 +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 dom.todo.ToDoItem; -import dom.todo.ToDoItem.Category; -import dom.todo.ToDoItems; - -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 org.apache.isis.applib.DomainObjectContainer; -import org.apache.isis.applib.annotation.ActionLayout; -import org.apache.isis.applib.annotation.BookmarkPolicy; -import org.apache.isis.applib.annotation.CollectionLayout; -import org.apache.isis.applib.annotation.DomainObject; -import org.apache.isis.applib.annotation.DomainObjectLayout; -import org.apache.isis.applib.annotation.Nature; -import org.apache.isis.applib.annotation.PropertyLayout; -import org.apache.isis.applib.annotation.RenderType; -import org.apache.isis.applib.annotation.Title; -import org.apache.isis.applib.util.ObjectContracts; - -@DomainObjectLayout( - named="By Category", - bookmarking = BookmarkPolicy.AS_ROOT -) -@DomainObject( - nature = Nature.VIEW_MODEL -) -public class ToDoItemsByCategoryViewModel - implements Comparable<ToDoItemsByCategoryViewModel> { - - //region > constructors - public ToDoItemsByCategoryViewModel() { - } - public ToDoItemsByCategoryViewModel(final Category category) { - setCategory(category); - } - //endregion - - - //region > category (property) - private Category category; - - @Title - public Category getCategory() { - return category; - } - - public void setCategory(final Category category) { - this.category = category; - } - //endregion - - //region > notYetComplete (property), complete (property) - @PropertyLayout( - multiLine=5 - ) - public String getNotYetComplete() { - final List<ToDoItem> notYetComplete = getItemsNotYetComplete(); - return Joiner.on(", ").join( - Iterables.transform(subcategories(), summarizeBySubcategory(notYetComplete))); - } - - @PropertyLayout( - multiLine=5 - ) - public String getComplete() { - final List<ToDoItem> completeInCategory = getItemsComplete(); - return Joiner.on(", ").join( - Iterables.transform(subcategories(), summarizeBySubcategory(completeInCategory))); - } - - // ////////////////////////////////////// - - private Iterable<ToDoItem.Subcategory> subcategories() { - return Iterables.filter(Arrays.asList(ToDoItem.Subcategory.values()), ToDoItem.Subcategory.thoseFor(getCategory())); - } - - private Function<ToDoItem.Subcategory, String> summarizeBySubcategory(final Iterable<ToDoItem> itemsInCategory) { - return new Function<ToDoItem.Subcategory, String>() { - @Override - public String apply(final ToDoItem.Subcategory subcategory) { - return subcategory + ": " + countIn(itemsInCategory, subcategory); - } - }; - } - - private static int countIn(final Iterable<ToDoItem> items, final ToDoItem.Subcategory subcategory) { - return Iterables.size(Iterables.filter(items, - ToDoItem.Predicates.thoseSubcategorised(subcategory))); - } - //endregion - - //region > getItemsNotYetComplete (collection), getItemsComplete (collection) - /** - * All those items {@link ToDoItems#notYetComplete() not yet complete}, for this {@link #getCategory() category}. - */ - @CollectionLayout( - render = RenderType.EAGERLY - ) - public List<ToDoItem> getItemsNotYetComplete() { - final List<ToDoItem> notYetComplete = toDoItems.notYetCompleteNoUi(); - return Lists.newArrayList(Iterables.filter(notYetComplete, ToDoItem.Predicates.thoseCategorised(getCategory()))); - } - - /** - * All those items {@link ToDoItems#complete() complete}, for this {@link #getCategory() category}. - */ - @CollectionLayout( - render = RenderType.EAGERLY - ) - public List<ToDoItem> getItemsComplete() { - final List<ToDoItem> complete = toDoItems.completeNoUi(); - return Lists.newArrayList(Iterables.filter(complete, ToDoItem.Predicates.thoseCategorised(getCategory()))); - } - - //endregion - - //region > deleteCompleted (action) - @ActionLayout( - named="Delete" - ) - public ToDoItemsByCategoryViewModel deleteCompleted() { - for (final ToDoItem item : getItemsComplete()) { - container.removeIfNotAlready(item); - } - // force reload of page - return this; - } - - //endregion - - //region > compareTo - @Override - public int compareTo(final ToDoItemsByCategoryViewModel other) { - return ObjectContracts.compare(this, other, "category"); - } - //endregion - - //region > injected services - @javax.inject.Inject - private DomainObjectContainer container; - @javax.inject.Inject - private ToDoItems toDoItems; - //endregion - -} http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/app/ToDoItemsByCategoryViewModel.layout.json ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/app/ToDoItemsByCategoryViewModel.layout.json b/example/application/todoapp/dom/src/main/java/app/ToDoItemsByCategoryViewModel.layout.json deleted file mode 100644 index c87b554..0000000 --- a/example/application/todoapp/dom/src/main/java/app/ToDoItemsByCategoryViewModel.layout.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "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/a4ec0b72/example/application/todoapp/dom/src/main/java/app/ToDoItemsByCategoryViewModel.png ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/app/ToDoItemsByCategoryViewModel.png b/example/application/todoapp/dom/src/main/java/app/ToDoItemsByCategoryViewModel.png deleted file mode 100644 index c22ab2b..0000000 Binary files a/example/application/todoapp/dom/src/main/java/app/ToDoItemsByCategoryViewModel.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/app/ToDoItemsByDateRangeViewModel.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/app/ToDoItemsByDateRangeViewModel.java b/example/application/todoapp/dom/src/main/java/app/ToDoItemsByDateRangeViewModel.java deleted file mode 100644 index baf5bac..0000000 --- a/example/application/todoapp/dom/src/main/java/app/ToDoItemsByDateRangeViewModel.java +++ /dev/null @@ -1,137 +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 app.ToDoItemAnalysis.DateRange; -import dom.todo.ToDoItem; -import dom.todo.ToDoItems; - -import java.util.List; -import com.google.common.base.Objects; -import com.google.common.base.Predicate; -import com.google.common.collect.Iterables; -import com.google.common.collect.Lists; -import org.joda.time.DateTime; -import org.apache.isis.applib.annotation.BookmarkPolicy; -import org.apache.isis.applib.annotation.CollectionLayout; -import org.apache.isis.applib.annotation.DomainObject; -import org.apache.isis.applib.annotation.DomainObjectLayout; -import org.apache.isis.applib.annotation.Nature; -import org.apache.isis.applib.annotation.RenderType; -import org.apache.isis.applib.annotation.Title; -import org.apache.isis.applib.services.clock.ClockService; -import org.apache.isis.applib.util.ObjectContracts; - -@DomainObjectLayout( - named="By Date Range", - bookmarking = BookmarkPolicy.AS_ROOT -) -@DomainObject( - nature = Nature.VIEW_MODEL -) -public class ToDoItemsByDateRangeViewModel - implements Comparable<ToDoItemsByDateRangeViewModel> { - - //region > constructors - public ToDoItemsByDateRangeViewModel() { - } - public ToDoItemsByDateRangeViewModel(final DateRange dateRange) { - setDateRange(dateRange); - } - //endregion - - //region > dateRange (property) - private DateRange dateRange; - - @Title - public DateRange getDateRange() { - return dateRange; - } - - public void setDateRange(final DateRange dateRange) { - this.dateRange = dateRange; - } - //endregion - - //region > count (derived property) - public int getCount() { - return getItemsNotYetComplete().size(); - } - //endregion - - //region > getItemsNotYetComplete (collection) - /** - * All those items {@link ToDoItems#notYetComplete() not yet complete}, for this {@link #getDateRange() date range}. - */ - @CollectionLayout( - render = RenderType.EAGERLY - ) - public List<ToDoItem> getItemsNotYetComplete() { - final List<ToDoItem> notYetComplete = toDoItems.notYetCompleteNoUi(); - return Lists.newArrayList(Iterables.filter(notYetComplete, thoseInDateRange())); - } - - private Predicate<ToDoItem> thoseInDateRange() { - return new Predicate<ToDoItem>() { - @Override - public boolean apply(final ToDoItem t) { - return Objects.equal(dateRangeFor(t), getDateRange()); - } - }; - } - - private DateRange dateRangeFor(final ToDoItem t) { - if(t.getDueBy() == null) { - return DateRange.Unknown; - } - final DateTime dueBy = t.getDueBy().toDateTimeAtStartOfDay(); - final DateTime today = clockService.now().toDateTimeAtStartOfDay(); - - if(dueBy.isBefore(today)) { - return DateRange.OverDue; - } - if(dueBy.isBefore(today.plusDays(1))) { - return DateRange.Today; - } - if(dueBy.isBefore(today.plusDays(2))) { - return DateRange.Tomorrow; - } - if(dueBy.isBefore(today.plusDays(7))) { - return DateRange.ThisWeek; - } - return DateRange.Later; - } - //endregion - - //region > compareTo - @Override - public int compareTo(final ToDoItemsByDateRangeViewModel other) { - return ObjectContracts.compare(this, other, "dateRange"); - } - //endregion - - //region > injected services - @javax.inject.Inject - private ToDoItems toDoItems; - - @javax.inject.Inject - private ClockService clockService; - //endregion - -} http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/app/ToDoItemsByDateRangeViewModel.layout.json ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/app/ToDoItemsByDateRangeViewModel.layout.json b/example/application/todoapp/dom/src/main/java/app/ToDoItemsByDateRangeViewModel.layout.json deleted file mode 100644 index 648e146..0000000 --- a/example/application/todoapp/dom/src/main/java/app/ToDoItemsByDateRangeViewModel.layout.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "columns": [ - { - "span": 4, - "memberGroups": { - "General": { - "members": { - "dateRange": {}, - "count": {} - } - } - } - }, - { - "span": 0, - "memberGroups": {} - }, - { - "span": 0, - "memberGroups": {} - }, - { - "span": 8, - "collections": { - "itemsNotYetComplete": {} - } - } - ], - "actions": { - "downloadLayout": {}, - "refreshLayout": {} - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/app/ToDoItemsByDateRangeViewModel.png ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/app/ToDoItemsByDateRangeViewModel.png b/example/application/todoapp/dom/src/main/java/app/ToDoItemsByDateRangeViewModel.png deleted file mode 100644 index 034a1f9..0000000 Binary files a/example/application/todoapp/dom/src/main/java/app/ToDoItemsByDateRangeViewModel.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/dom/todo/Categorized.java ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/dom/todo/Categorized.java b/example/application/todoapp/dom/src/main/java/dom/todo/Categorized.java deleted file mode 100644 index fabbc9b..0000000 --- a/example/application/todoapp/dom/src/main/java/dom/todo/Categorized.java +++ /dev/null @@ -1,32 +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 dom.todo; - -/** - * Enables {@link dom.todo.ToDoItemContributions#updateCategory(dom.todo.Categorized, dom.todo.ToDoItem.Category, dom.todo.ToDoItem.Subcategory)} to be contributed to - * both the {@link dom.todo.ToDoItem} (entity) and also the {@link app.ToDoItemWizard} (wizard). - */ -public interface Categorized { - - ToDoItem.Category getCategory(); - void setCategory(ToDoItem.Category category); - - ToDoItem.Subcategory getSubcategory(); - void setSubcategory(ToDoItem.Subcategory subcategory); -} http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem-done.png ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem-done.png b/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem-done.png deleted file mode 100644 index b0fc6e8..0000000 Binary files a/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem-done.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/isis/blob/a4ec0b72/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem-todo.png ---------------------------------------------------------------------- diff --git a/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem-todo.png b/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem-todo.png deleted file mode 100644 index 99a9fed..0000000 Binary files a/example/application/todoapp/dom/src/main/java/dom/todo/ToDoItem-todo.png and /dev/null differ
