Permalink
Browse files

Port to Oval and improved form-fields

Added a simple blog to illustrate how comet works.
Fixed correct locale in comet-requests
Updated README with new features
Added liftco user with different profile-icon
Use tomcat7 maven-plugin
Add warning about deleting *.SER file in tomcat to ensure correct weaving
  • Loading branch information...
1 parent 061a3c3 commit fae65f1f2f6c89098a271359801e3ac2fbc567c1 @andreak committed Mar 10, 2012
Showing with 36,541 additions and 2,384 deletions.
  1. +18 −12 README
  2. +6 −6 {pets → blog}/pom.xml
  3. +3 −0 blog/src/main/resources/no/officenet/example/rpm/blog/domain/model/entities/BlogEntry_en.properties
  4. +3 −0 blog/src/main/resources/no/officenet/example/rpm/blog/domain/model/entities/BlogEntry_no.properties
  5. +7 −0 blog/src/main/scala/no/officenet/example/rpm/blog/domain/event/BlogEntryUpdatedEvent.scala
  6. +6 −0 blog/src/main/scala/no/officenet/example/rpm/blog/domain/event/CommentUpdatedEvent.scala
  7. +29 −0 blog/src/main/scala/no/officenet/example/rpm/blog/domain/model/entities/Blog.scala
  8. +69 −0 blog/src/main/scala/no/officenet/example/rpm/blog/domain/model/entities/BlogEntry.scala
  9. +13 −0 blog/src/main/scala/no/officenet/example/rpm/blog/domain/model/entities/BlogEntrySummary.scala
  10. +57 −0 blog/src/main/scala/no/officenet/example/rpm/blog/domain/model/entities/Comment.scala
  11. +26 −0 blog/src/main/scala/no/officenet/example/rpm/blog/domain/model/entities/CommentVote.scala
  12. +37 −0 blog/src/main/scala/no/officenet/example/rpm/blog/domain/model/entities/CommentVoteOwner.scala
  13. +37 −0 blog/src/main/scala/no/officenet/example/rpm/blog/domain/service/BlogEntryService.scala
  14. +43 −0 blog/src/main/scala/no/officenet/example/rpm/blog/domain/service/BlogService.scala
  15. +69 −0 blog/src/main/scala/no/officenet/example/rpm/blog/domain/service/CommentService.scala
  16. +25 −0 .../src/main/scala/no/officenet/example/rpm/blog/domain/service/repository/BlogEntryRepository.scala
  17. +33 −0 blog/src/main/scala/no/officenet/example/rpm/blog/domain/service/repository/BlogRepository.scala
  18. +30 −0 ...rc/main/scala/no/officenet/example/rpm/blog/domain/service/repository/CommentRepositoryImpl.scala
  19. +13 −9 bootstrap/sampledata.sql
  20. +0 −8 pets/src/main/resources/META-INF/persistence-pets.xml
  21. +0 −8 pets/src/main/resources/spring/props/pets.properties
  22. +0 −37 pets/src/main/resources/spring/rpm-pets-context.xml
  23. +0 −24 pets/src/main/resources/spring/rpm-pets-datasource.xml
  24. +0 −50 pets/src/main/scala/no/officenet/example/rpm/pets/domain/model/entities/Pet.scala
  25. +0 −13 pets/src/main/scala/no/officenet/example/rpm/pets/domain/model/enums/PetTexts.scala
  26. +0 −11 pets/src/main/scala/no/officenet/example/rpm/pets/domain/service/repository/PetRepository.scala
  27. +36 −23 pom.xml
  28. +0 −4 projectmgmt/application/pom.xml
  29. +2 −7 .../application/src/main/scala/no/officenet/example/rpm/projectmgmt/application/dto/ProjectDto.scala
  30. +0 −23 ...n/src/main/scala/no/officenet/example/rpm/projectmgmt/application/service/ProjectAppService.scala
  31. +0 −8 projectmgmt/domain/src/main/resources/META-INF/persistence-rpm.xml
  32. +4 −0 ...c/main/resources/no/officenet/example/rpm/projectmgmt/domain/model/entities/Project_en.properties
  33. +4 −0 ...c/main/resources/no/officenet/example/rpm/projectmgmt/domain/model/entities/Project_no.properties
  34. +11 −8 ...t/domain/src/main/scala/no/officenet/example/rpm/projectmgmt/domain/model/entities/Activity.scala
  35. +20 −22 ...mt/domain/src/main/scala/no/officenet/example/rpm/projectmgmt/domain/model/entities/Project.scala
  36. +1 −1 ...domain/src/main/scala/no/officenet/example/rpm/projectmgmt/domain/model/enums/ActivityTexts.scala
  37. +3 −4 .../domain/src/main/scala/no/officenet/example/rpm/projectmgmt/domain/model/enums/ProjectTexts.scala
  38. +1 −2 ...ain/scala/no/officenet/example/rpm/projectmgmt/domain/service/repository/ActivityRepository.scala
  39. +1 −2 ...main/scala/no/officenet/example/rpm/projectmgmt/domain/service/repository/ProjectRepository.scala
  40. +0 −8 support/domain/src/main/resources/META-INF/persistence-rpm.xml
  41. +34 −0 ...c/main/scala/no/officenet/example/rpm/support/domain/model/entities/AbstractChangableEntity.scala
  42. +1 −22 .../src/main/scala/no/officenet/example/rpm/support/domain/model/entities/AbstractDomainObject.scala
  43. +1 −1 .../domain/src/main/scala/no/officenet/example/rpm/support/domain/model/entities/AbstractModel.scala
  44. +18 −13 support/domain/src/main/scala/no/officenet/example/rpm/support/domain/model/entities/User.scala
  45. +0 −23 .../src/main/scala/no/officenet/example/rpm/support/domain/service/repository/PersistenceUnits.scala
  46. +1 −1 ...in/src/main/scala/no/officenet/example/rpm/support/domain/service/repository/UserRepository.scala
  47. +10 −6 support/infrastructure/pom.xml
  48. +0 −131 ...cture/src/main/java/no/officenet/example/rpm/support/infrastructure/jpa/util/ReflectionUtils.java
  49. +0 −4 ...in/java/no/officenet/example/rpm/support/infrastructure/jpa/validation/MethodValidationGroup.java
  50. +0 −46 ...ure/src/main/java/no/officenet/example/rpm/support/infrastructure/jpa/validation/OptionalMax.java
  51. +0 −123 ...src/main/java/no/officenet/example/rpm/support/infrastructure/jpa/validation/OptionalPattern.java
  52. +0 −35 .../main/java/no/officenet/example/rpm/support/infrastructure/jpa/validation/ValidateWithMethod.java
  53. +0 −53 ...a/no/officenet/example/rpm/support/infrastructure/jpa/validation/ValidateWithMethodValidator.java
  54. +0 −153 ...ture/src/main/java/no/officenet/example/rpm/support/infrastructure/util/ResourceBundleHelper.java
  55. +0 −6 ...rc/main/java/no/officenet/example/rpm/support/infrastructure/util/ResourceBundleNameProvider.java
  56. +74 −0 ...ructure/src/main/java/no/officenet/example/rpm/support/infrastructure/validation/OptionalMax.java
  57. +401 −0 ...ain/java/no/officenet/example/rpm/support/infrastructure/validation/RpmAnnotationsConfigurer.java
  58. +108 −0 ...net/example/rpm/support/infrastructure/validation/RpmResourceBundleValidationContextRenderer.java
  59. +65 −0 ...ain/resources/no/officenet/example/rpm/support/infrastructure/validation/oval/Messages.properties
  60. +65 −0 .../resources/no/officenet/example/rpm/support/infrastructure/validation/oval/Messages_no.properties
  61. +1 −0 .../officenet/example/rpm/support/infrastructure/validation/oval/customValidationMessages.properties
  62. +1 −0 ...ficenet/example/rpm/support/infrastructure/validation/oval/customValidationMessages_no.properties
  63. +6 −3 support/infrastructure/src/main/resources/spring/props/infrastructure.properties
  64. +38 −28 support/infrastructure/src/main/resources/spring/rpm-infrastructure-context.xml
  65. +11 −38 support/infrastructure/src/main/resources/spring/rpm-infrastructure-datasource.xml
  66. +32 −0 support/infrastructure/src/main/resources/spring/rpm-validation-context.xml
  67. +0 −6 support/infrastructure/src/main/resources/transactions.properties
  68. +3 −0 ...ure/src/main/scala/no/officenet/example/rpm/support/infrastructure/errorhandling/FieldError.scala
  69. +16 −0 .../officenet/example/rpm/support/infrastructure/errorhandling/RpmConstraintsViolatedException.scala
  70. +12 −0 ...la/no/officenet/example/rpm/support/infrastructure/errorhandling/RpmOvalExceptionTranslator.scala
  71. +189 −0 ...ture/src/main/scala/no/officenet/example/rpm/support/infrastructure/errorhandling/Validator.scala
  72. +1 −4 ... infrastructure/src/main/scala/no/officenet/example/rpm/support/infrastructure}/i18n/Bundle.scala
  73. +92 −0 ...structure/src/main/scala/no/officenet/example/rpm/support/infrastructure/i18n/DateFormatter.scala
  74. +6 −2 ...astructure/src/main/scala/no/officenet/example/rpm/support/infrastructure}/i18n/GlobalTexts.scala
  75. +38 −30 ...frastructure/src/main/scala/no/officenet/example/rpm/support/infrastructure}/i18n/Localizer.scala
  76. +101 −0 ...ructure/src/main/scala/no/officenet/example/rpm/support/infrastructure/i18n/NumberFormatter.scala
  77. +3 −5 ...ure/src/main/scala/no/officenet/example/rpm/support/infrastructure}/i18n/ResourceBundleEnum.scala
  78. +149 −0 ...re/src/main/scala/no/officenet/example/rpm/support/infrastructure/i18n/ResourceBundleHelper.scala
  79. +5 −0 .../main/scala/no/officenet/example/rpm/support/infrastructure/i18n/ResourceBundleNameProvider.scala
  80. +9 −0 ...astructure/src/main/scala/no/officenet/example/rpm/support/infrastructure/jpa/CustomJpaType.scala
  81. +13 −12 ...ucture/src/main/scala/no/officenet/example/rpm/support/infrastructure/jpa/GenericRepository.scala
  82. +0 −71 .../main/scala/no/officenet/example/rpm/support/infrastructure/jpa/MergePersistenceUnitManager.scala
  83. +15 −0 ...ructure/src/main/scala/no/officenet/example/rpm/support/infrastructure/jpa/PersistenceUnits.scala
  84. +0 −25 ...fficenet/example/rpm/support/infrastructure/jpa/validation/constraints/OptionalMaxValidator.scala
  85. +0 −32 ...enet/example/rpm/support/infrastructure/jpa/validation/constraints/OptionalPatternValidator.scala
  86. +0 −14 .../main/scala/no/officenet/example/rpm/support/infrastructure/spring/TransactionManagerHelper.scala
  87. +0 −20 .../main/scala/no/officenet/example/rpm/support/infrastructure/spring/TransactionManagerLookup.scala
  88. +51 −0 ...n/scala/no/officenet/example/rpm/support/infrastructure/spring/aop/LazyInitActivationAspect.scala
  89. +127 −105 ...re/src/main/scala/no/officenet/example/rpm/support/infrastructure/spring/aop/LazyInitAspect.scala
  90. +5 −0 ...ure/src/main/scala/no/officenet/example/rpm/support/infrastructure/spring/aop/LazyInitState.scala
  91. +5 −0 ...e/src/main/scala/no/officenet/example/rpm/support/infrastructure/spring/aop/ThreadLocalInit.scala
  92. +44 −0 .../src/main/scala/no/officenet/example/rpm/support/infrastructure/validation/OptionalMaxCheck.scala
  93. +88 −0 ...ure/src/main/scala/no/officenet/example/rpm/support/infrastructure/validation/OvalValidator.scala
  94. +15 −14 web/pom.xml
  95. +0 −4 web/src/main/resources/ValidationMessages.properties
  96. +0 −29 web/src/main/resources/ValidationMessages_no.properties
  97. +0 −8 web/src/main/resources/log4j.xml
  98. +74 −0 web/src/main/resources/no/officenet/example/rpm/resources/globalResources_en.properties
  99. +79 −5 web/src/main/resources/no/officenet/example/rpm/resources/globalResources_no.properties
  100. +2 −1 web/src/main/resources/no/officenet/example/rpm/resources/menuResources_en.properties
  101. +2 −1 web/src/main/resources/no/officenet/example/rpm/resources/menuResources_no.properties
  102. +0 −1 web/src/main/resources/no/officenet/example/rpm/resources/petDomainResources_en.properties
  103. +0 −1 web/src/main/resources/no/officenet/example/rpm/resources/petDomainResources_no.properties
  104. +0 −1 web/src/main/resources/no/officenet/example/rpm/resources/projectDomainResources_en.properties
  105. +0 −1 web/src/main/resources/no/officenet/example/rpm/resources/projectDomainResources_no.properties
  106. +0 −1 web/src/main/resources/no/officenet/example/rpm/resources/projectViewResources_en.properties
  107. +4 −5 web/src/main/resources/no/officenet/example/rpm/resources/projectViewResources_no.properties
  108. +33 −5 web/src/main/scala/bootstrap/liftweb/Boot.scala
  109. +100 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/BlogCometActor.scala
  110. +292 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/BlogEntryDetailCometActor.scala
  111. +70 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/LoanWrapperHelper.scala
  112. +16 −15 web/src/main/scala/no/officenet/example/rpm/web/comet/ProjectDetailCometRenderer.scala
  113. +8 −5 web/src/main/scala/no/officenet/example/rpm/web/comet/ProjectInfoActor.scala
  114. +8 −4 web/src/main/scala/no/officenet/example/rpm/web/comet/ProjectJsfActor.scala
  115. +20 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/RpmActor.scala
  116. +75 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/RpmCometActor.scala
  117. +0 −91 web/src/main/scala/no/officenet/example/rpm/web/comet/RpmSuperActor.scala
  118. +14 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/dto/ActivityCometDto.scala
  119. +129 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/dto/BlogEntryCometDto.scala
  120. +46 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/dto/BlogEntrySummaryCometDto.scala
  121. +30 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/dto/CommentCometDto.scala
  122. +13 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/dto/CommentVoteCometDto.scala
  123. +36 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/dto/ProjectCometDto.scala
  124. +27 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/dto/UserCometDto.scala
  125. +186 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/server/BlogEntryMasterServer.scala
  126. +100 −0 web/src/main/scala/no/officenet/example/rpm/web/comet/server/BlogMasterServer.scala
  127. +9 −8 web/src/main/scala/no/officenet/example/rpm/web/comet/server/ProjectCometServer.scala
  128. +16 −0 web/src/main/scala/no/officenet/example/rpm/web/context/RpmRequestContextListener.scala
  129. +71 −35 web/src/main/scala/no/officenet/example/rpm/web/errorhandling/ExceptionHandlerDelegate.scala
  130. +32 −0 web/src/main/scala/no/officenet/example/rpm/web/events/BlogEntryUpdatedForGUIEventHandler.scala
  131. +34 −0 web/src/main/scala/no/officenet/example/rpm/web/events/CommentUpdatedForGUIEventHandler.scala
  132. +3 −1 web/src/main/scala/no/officenet/example/rpm/web/events/ProjectUpdatedForCometEventHandler.scala
  133. +2 −2 web/src/main/scala/no/officenet/example/rpm/web/filter/RegexpMappingFilter.scala
  134. +25 −0 web/src/main/scala/no/officenet/example/rpm/web/lib/AjaxButton.scala
  135. +8 −0 web/src/main/scala/no/officenet/example/rpm/web/lib/BlogHelper.scala
  136. +29 −4 web/src/main/scala/no/officenet/example/rpm/web/lib/ContextVars.scala
  137. +5 −0 web/src/main/scala/no/officenet/example/rpm/web/lib/ErrorsAware.scala
  138. +38 −0 web/src/main/scala/no/officenet/example/rpm/web/lib/InputMask.scala
  139. +60 −0 web/src/main/scala/no/officenet/example/rpm/web/lib/InputStringConverter.scala
  140. +18 −0 web/src/main/scala/no/officenet/example/rpm/web/lib/JQueryDialog.scala
  141. +117 −0 web/src/main/scala/no/officenet/example/rpm/web/lib/JpaFormFields.scala
  142. +82 −0 web/src/main/scala/no/officenet/example/rpm/web/lib/LiftUtils.scala
  143. +8 −0 web/src/main/scala/no/officenet/example/rpm/web/lib/NullElemAttr.scala
  144. +35 −12 web/src/main/scala/no/officenet/example/rpm/web/lib/RolfJsCmds.scala
  145. +13 −14 web/src/main/scala/no/officenet/example/rpm/web/lib/UrlLocalizer.scala
  146. +8 −0 web/src/main/scala/no/officenet/example/rpm/web/lib/Validatable.scala
  147. +528 −474 web/src/main/scala/no/officenet/example/rpm/web/lib/ValidatableScreen.scala
  148. +93 −6 web/src/main/scala/no/officenet/example/rpm/web/menu/RpmLoc.scala
  149. +3 −3 web/src/main/scala/no/officenet/example/rpm/web/menu/RpmMenu.scala
  150. +2 −3 web/src/main/scala/no/officenet/example/rpm/web/snippet/ConfigSnippet.scala
  151. +0 −17 web/src/main/scala/no/officenet/example/rpm/web/snippet/GetPetName.scala
  152. +2 −2 web/src/main/scala/no/officenet/example/rpm/web/snippet/I18n.scala
  153. +0 −153 web/src/main/scala/no/officenet/example/rpm/web/snippet/ProjectSnippet.scala
  154. +49 −0 web/src/main/scala/no/officenet/example/rpm/web/snippet/blog/BlogEntryViewSnippet.scala
  155. +86 −0 web/src/main/scala/no/officenet/example/rpm/web/snippet/blog/BlogViewSnippet.scala
  156. +53 −0 web/src/main/scala/no/officenet/example/rpm/web/snippet/blog/NewBlogPostDialogSnippet.scala
  157. +62 −0 web/src/main/scala/no/officenet/example/rpm/web/snippet/blog/NewCommentDialogSnippet.scala
  158. +27 −0 ...src/main/scala/no/officenet/example/rpm/web/snippet/project/ProjectEditDialogWrapperSnippet.scala
  159. +18 −20 web/src/main/scala/no/officenet/example/rpm/web/snippet/{ → project}/ProjectEditSnippet.scala
  160. +2 −2 web/src/main/scala/no/officenet/example/rpm/web/snippet/{ → project}/ProjectJSFHelperSnippet.scala
  161. +1 −2 web/src/main/scala/no/officenet/example/rpm/web/snippet/{ → project}/ProjectPageSnippet.scala
  162. +134 −0 web/src/main/scala/no/officenet/example/rpm/web/snippet/project/ProjectSnippet.scala
  163. +3 −4 web/src/main/scala/no/officenet/example/rpm/web/snippet/{ → user}/UserSnippet.scala
  164. +10 −17 web/src/main/webapp/WEB-INF/spring-security-context.xml
  165. +6 −5 web/src/main/webapp/WEB-INF/web.xml
  166. +2 −2 web/src/main/webapp/index.lift
  167. +13 −0 web/src/main/webapp/lift/blog/_newBlogPostDialog.lift
  168. +7 −0 web/src/main/webapp/lift/blog/_newCommentDialog.lift
  169. +48 −0 web/src/main/webapp/lift/blog/blogEntryView.lift
  170. +51 −0 web/src/main/webapp/lift/blog/blogView.lift
  171. +0 −4 web/src/main/webapp/lift/project/_projectDetailViewComponent.lift
  172. +20 −24 web/src/main/webapp/lift/project/_projectEdit.lift
  173. +4 −1 web/src/main/webapp/lift/project/projectEditDialogWrapperForJSF.lift
  174. +4 −10 web/src/main/webapp/lift/project/projectList.lift
  175. +3 −3 web/src/main/webapp/lift/project/projectView.lift
  176. +4 −3 web/src/main/webapp/lift/project/projectViewWrapperForJSF.lift
  177. +4 −4 web/src/main/webapp/lift/welcome.lift
  178. +2 −1 web/src/main/webapp/login.jsp
  179. +5 −2 web/src/main/webapp/projectList.xhtml
  180. +8 −9 web/src/main/webapp/projectView.xhtml
  181. +16 −1 web/src/main/webapp/resources/css/Rolf.css
  182. +226 −0 web/src/main/webapp/resources/css/external/syntaxhighlighter/shCore.css
  183. +117 −0 web/src/main/webapp/resources/css/external/syntaxhighlighter/shThemeDefault.css
  184. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/ajax-loader.gif
  185. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/asc.gif
  186. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/autocomplete.css
  187. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/back-h.png
  188. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/back-v.png
  189. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/bar-h.png
  190. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/bar-v.png
  191. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/bg-h.gif
  192. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/bg-v.gif
  193. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/blankimage.png
  194. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/button.css
  195. +8 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/calendar.css
  196. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/carousel.css
  197. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/check0.gif
  198. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/check1.gif
  199. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/check2.gif
  200. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/colorpicker.css
  201. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/container.css
  202. +8 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/datatable.css
  203. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/desc.gif
  204. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/dt-arrow-dn.png
  205. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/dt-arrow-up.png
  206. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/editor-knob.gif
  207. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/editor-sprite-active.gif
  208. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/editor-sprite.gif
  209. +10 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/editor.css
  210. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/header_background.png
  211. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/hue_bg.png
  212. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/imagecropper.css
  213. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/layout.css
  214. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/layout_sprite.png
  215. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/loading.gif
  216. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/logger.css
  217. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/menu-button-arrow-disabled.png
  218. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/menu-button-arrow.png
  219. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/menu.css
  220. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/menubaritem_submenuindicator.png
  221. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/menubaritem_submenuindicator_disabled.png
  222. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/menuitem_checkbox.png
  223. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/menuitem_checkbox_disabled.png
  224. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/menuitem_submenuindicator.png
  225. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/menuitem_submenuindicator_disabled.png
  226. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/paginator.css
  227. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/picker_mask.png
  228. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/profilerviewer.css
  229. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/progressbar.css
  230. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/resize.css
  231. +10 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/simpleeditor.css
  232. +35 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/skin.css
  233. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/slider.css
  234. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/split-button-arrow-active.png
  235. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/split-button-arrow-disabled.png
  236. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/split-button-arrow-focus.png
  237. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/split-button-arrow-hover.png
  238. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/split-button-arrow.png
  239. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/sprite.png
  240. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/sprite.psd
  241. +8 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/tabview.css
  242. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/treeview-loading.gif
  243. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/treeview-sprite.gif
  244. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/treeview.css
  245. BIN web/src/main/webapp/resources/css/external/yui/skins/sam/wait.gif
  246. +7 −0 web/src/main/webapp/resources/css/external/yui/skins/sam/yuitest.css
  247. BIN web/src/main/webapp/resources/img/calendar.png
  248. BIN web/src/main/webapp/resources/img/calendar_disabled.png
  249. +725 −2 web/src/main/webapp/resources/js/Rolf.js
  250. +978 −0 web/src/main/webapp/resources/js/external/autoNumeric-1.7.4.js
  251. +0 −18 web/src/main/webapp/resources/js/external/jquery-1.6.2.min.js
  252. +9,266 −0 web/src/main/webapp/resources/js/external/jquery-1.7.1.js
  253. +273 −0 web/src/main/webapp/resources/js/external/json2.js
  254. +651 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/XRegExp.js
  255. +17 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shAutoloader.js
  256. +59 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushAS3.js
  257. +75 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushAppleScript.js
  258. +59 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushBash.js
  259. +65 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushCSharp.js
  260. +100 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushColdFusion.js
  261. +97 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushCpp.js
  262. +91 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushCss.js
  263. +55 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushDelphi.js
  264. +41 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushDiff.js
  265. +52 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushErlang.js
  266. +67 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushGroovy.js
  267. +52 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushJScript.js
  268. +57 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushJava.js
  269. +58 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushJavaFX.js
  270. +72 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushPerl.js
  271. +88 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushPhp.js
  272. +33 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushPlain.js
  273. +74 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushPowerShell.js
  274. +64 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushPython.js
  275. +55 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushRuby.js
  276. +94 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushSass.js
  277. +51 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushScala.js
  278. +66 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushSql.js
  279. +56 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushVb.js
  280. +69 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shBrushXml.js
  281. +1,721 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shCore.js
  282. +17 −0 web/src/main/webapp/resources/js/external/syntaxhighlighter/shLegacy.js
  283. +7,423 −0 web/src/main/webapp/resources/js/external/yahoo/calendar-debug.js
  284. +18 −0 web/src/main/webapp/resources/js/external/yahoo/calendar-min.js
  285. +7,390 −0 web/src/main/webapp/resources/js/external/yahoo/calendar.js
  286. +14 −0 web/src/main/webapp/resources/js/external/yahoo/yahoo-dom-event.js
  287. +153 −7 web/src/main/webapp/templates-hidden/main.lift
  288. +1 −1 web/src/test/scala/no/officenet/example/rpm/web/test/GlobalTextsTest.scala
  289. +0 −12 web/src/test/scala/no/officenet/example/rpm/web/test/PetTextsTest.scala
  290. +2 −2 web/src/test/scala/no/officenet/example/rpm/web/test/TextsTest.scala
View
30 README
@@ -2,31 +2,32 @@ Welcome to RPM - Rolf's Project Management.
This project aims to demonstrate how to use The Lift-framework to implement
an application with uses Domain Driven Design and technologies like
-Spring, Spring Security (with remember-me), JPA (Hibernate), JSR-303 Validation,
-jQuery-UI, JTA+XA and the PostgreSQL RDBMS.
+Spring, Spring Security (with remember-me), JPA (Hibernate), Oval Validation,
+jQuery-UI and the PostgreSQL RDBMS.
+It also shows how one can use other frameworks with Lift, example is with JSF,
+and use Lift-backed AJAX-dialogs and comet on a JSF-page
Features:
- URI-based locale selection
+- Dynamic, type-safe, form-fields with in-place validation and optional AJAX-callbacks on "field-change"
- Type-safe i18n
- Modern (technical, not looks) and responsive GUI for editing entities in a jQuery-dialog
- AJAX-spinner which follows mouse on AJAX-requests
- Execute custom JavaScript when different radio-buttons (in same group) are checked
- In this demo it just toggles the value of a text below the radio-buttons
-- In-place field-validation based on the JSR-303 Bean Validation standard
+- Oval integration, http://oval.sf.net
- Modularize the code into functional domains by having a PersistenceUnit spread across multiple maven-modules
and have Spring wire it up correctly
- Uses scala-jpa
-- JPA-entities written in Scala with Scala-based Enumerations in JPA-entities with custom Hibernate-converters
+- JPA-entities written in Scala with Scala-based Enumerations and Option-types in JPA-entities with custom Hibernate-converters
- Spring Security with remember me and integration with Lift
-- 2 persistence-units using 2 separate data-sources (Spring-managed)
-- JTA+XA in Tomcat using Atomikos and Spring for transaction-management
+- Blog, with Wiki-markup using the OpenSource bliki-parser, nested comments and comment-votes
+ - The blog-view is always in sync (using Comet), no need to refresh to see new posts, comments or updated votes
Bugs:
- Doesn't handle multiple simultaneous open dialogs
What RPM doesn't want to address and therefore does not implement:
-- Exception-handling
-- Logging (except standard log4j-setup)
- Nice GUI
- Useful functionality
- Testing
@@ -38,7 +39,6 @@ Unresolved issues I'd like to get comments on:
Prerequisites:
- PostgreSQL 9.0 or later is required to run this application.
- - Make sure XA is enabled by setting max_prepared_transactions = 10 (or any other suitable value) in $PGDIR/data/postgresql.conf
- A Maven-3 installation. Note that for some reason the build-process tries to access the deprecated jboss-repository, to overcome this, add a $HOME/.m2/settings.xml like this:
{{{
<settings xmlns="http://maven.apache.org/POM/4.0.0"
@@ -69,18 +69,25 @@ infrastructure.datasource.RPM.password=xxx
Issue the following commands to bootstrap the application:
{{{
$ cd <checked out sources>
-$ createdb pets
$ createdb rpm
$ mvn install # have a cup of coffee while downloading the Internet if this is your 1st Maven-project.
$ cd web
-$ MAVEN_OPTS="-XX:MaxPermSize=256m -Xmx512m -javaagent:$HOME/.m2/repository/org/springframework/spring-instrument/3.0.5.RELEASE/spring-instrument-3.0.5.RELEASE.jar" mvn tomcat:run
+$ MAVEN_OPTS="-XX:MaxPermSize=256m -Xmx512m -javaagent:$HOME/.m2/repository/org/springframework/spring-instrument/3.1.1.RELEASE/spring-instrument-3.1.1.RELEASE.jar" mvn tomcat7:run
$ psql -f bootstrap/sampledata.sql rpm
}}}
Notes on bootstrapping the application:
It's crucial to run the sampledata.sql script *after* starting tomcat because Hibernate will generate the relevant tables upon boot.
The Spring-context needs a loadtime-weaver to be able to inject Spring-beans into non-Spring-managed classes (like snippets), so ensure
that spring-instrument gets added as a javaagent.
+Also note that when tomcat shuts down it will try to serialize all sessions and when starting it will try to load
+all classes in the previous sessions, including our classes which need load-time weaving. This will lead to the classes
+not being weaved correctly because it happens before the Spring-context is loaded, which prevents the classes to be weaved correctly.
+To ensure weaving is correctly performed, always delete the .SER file by issuing
+{{{
+rm -f `find . -name \*.SER`
+}}}
+before the tomcat7:run command
Open a web-browser on http://localhost:8080/rpm/en/projects or http://localhost:8080/rpm/no/projects (for Norwegian) and login with:
username: admin
@@ -89,4 +96,3 @@ Open a web-browser on http://localhost:8080/rpm/en/projects or http://localhost:
NB: Testing is completely non-existent, on purpose.
Disclaimer: RPM is by no means a complete ProjectManagement-system.
-This file was modified by IntelliJ IDEA (Xena) IU-107.509 for binding GitHub repository
@@ -4,13 +4,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>no.officenet.example.rpm</groupId>
- <artifactId>on-example-rpm-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>no.officenet.example.rpm</groupId>
+ <artifactId>on-example-rpm-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
- <artifactId>on-example-rpm-pets</artifactId>
+ <artifactId>on-example-rpm-blog</artifactId>
<dependencies>
<dependency>
@@ -0,0 +1,3 @@
+label.field.title=Title
+label.field.summary=Summary
+label.field.content=Content
@@ -0,0 +1,3 @@
+label.field.title=Tittel
+label.field.summary=Ingress
+label.field.content=Innhold
@@ -0,0 +1,7 @@
+package no.officenet.example.rpm.blog.domain.event
+
+import no.officenet.example.rpm.blog.domain.model.entities.BlogEntry
+import no.officenet.example.rpm.support.domain.events.{OperationType, DomainEvent}
+
+
+case class BlogEntryUpdatedEvent(operationType: OperationType.ExtendedValue, blogEntry: BlogEntry) extends DomainEvent
@@ -0,0 +1,6 @@
+package no.officenet.example.rpm.blog.domain.event
+
+import no.officenet.example.rpm.support.domain.events.{DomainEvent, OperationType}
+import no.officenet.example.rpm.blog.domain.model.entities.Comment
+
+case class CommentUpdatedEvent(operationType: OperationType.ExtendedValue, comment: Comment) extends DomainEvent
@@ -0,0 +1,29 @@
+package no.officenet.example.rpm.blog.domain.model.entities
+
+import org.joda.time.DateTime
+import org.apache.commons.lang.builder.ToStringBuilder
+import no.officenet.example.rpm.support.infrastructure.jpa.CustomJpaType
+import no.officenet.example.rpm.support.domain.model.entities.{AbstractChangableEntity, User}
+import javax.persistence.{SequenceGenerator, Column, Entity, Table}
+
+@Entity
+@Table(name = "blog")
+@SequenceGenerator(name = "SEQ_STORE", sequenceName = "blog_id_seq", allocationSize = 1)
+class Blog(_created: DateTime, _createdBy: User, _key: String, _description: Option[String])
+ extends AbstractChangableEntity(_created, _createdBy) {
+
+ def this() {
+ this(null, null, null, null)
+ }
+
+ @Column(name = "key", nullable = false)
+ @net.sf.oval.constraint.NotNull
+ @net.sf.oval.constraint.NotBlank
+ var key: String = _key
+
+ @Column(name = "description")
+ @org.hibernate.annotations.Type(`type` = CustomJpaType.StringOptionUserType)
+ var description: Option[String] = _description
+
+ override def toString = new ToStringBuilder(this).append("id", id).append("key", key).toString
+}
@@ -0,0 +1,69 @@
+package no.officenet.example.rpm.blog.domain.model.entities
+
+import javax.persistence._
+import org.apache.commons.lang.builder.ToStringBuilder
+import org.joda.time.DateTime
+import no.officenet.example.rpm.support.infrastructure.jpa.types.StringField
+import no.officenet.example.rpm.support.domain.model.entities.{AbstractChangableEntity, User}
+
+
+@Entity
+@Table(name = "blog_entry")
+@SequenceGenerator(name = "SEQ_STORE", sequenceName = "blog_entry_id_seq", allocationSize = 1)
+class BlogEntry(_blog: Blog, _created: DateTime,
+ _createdBy: User,
+ _title: String,
+ _summary: String,
+ _content: String)
+ extends AbstractChangableEntity(_created, _createdBy) {
+
+ def this() {
+ this(null, null, null, null, null, null)
+ }
+
+ def this(blog: Blog, created: DateTime, createdBy: User) {
+ this(blog, created, createdBy, null, null, null)
+ }
+
+ def this(blog: Blog, createdBy: User) {
+ this(blog, null, createdBy, null, null, null)
+ }
+
+ @ManyToOne(optional = false)
+ @net.sf.oval.constraint.NotNull
+ @JoinColumn(name = "blog_id")
+ var blog = _blog
+
+ @Column(name = "title_text", nullable = false)
+ @net.sf.oval.constraint.NotNull
+ @net.sf.oval.constraint.NotBlank
+ var title: String = _title
+
+ @Column(name = "summary_text")
+ @net.sf.oval.constraint.NotNull
+ @net.sf.oval.constraint.NotBlank
+ var summary: String = _summary
+
+ @Column(name = "content_text", nullable = false)
+ @net.sf.oval.constraint.NotNull
+ @net.sf.oval.constraint.NotBlank
+ var content: String = _content
+
+ @OneToMany(fetch = FetchType.LAZY)
+ @JoinColumn(name = "commented_id")
+ @OrderBy("created ASC")
+ var comments: java.util.List[Comment] = new java.util.ArrayList[Comment]()
+
+ override def toString = new ToStringBuilder(this).append("id", id).
+ append("title", title).toString
+}
+
+object BlogEntryJPAFields {
+
+ object title extends StringField[BlogEntry]
+
+ object summary extends StringField[BlogEntry]
+
+ object content extends StringField[BlogEntry]
+
+}
@@ -0,0 +1,13 @@
+package no.officenet.example.rpm.blog.domain.model.entities
+
+import org.joda.time.DateTime
+import no.officenet.example.rpm.support.domain.model.entities.User
+
+case class BlogEntrySummary(blogId: java.lang.Long,
+ id: java.lang.Long,
+ created: DateTime,
+ createdBy: User,
+ title: String,
+ summary: String,
+ content: String,
+ numComments: Int)
@@ -0,0 +1,57 @@
+package no.officenet.example.rpm.blog.domain.model.entities
+
+import javax.persistence._
+import org.apache.commons.lang.builder.ToStringBuilder
+import org.joda.time.DateTime
+import java.util.{ArrayList, List => juList}
+import no.officenet.example.rpm.support.infrastructure.jpa.types.StringField
+import no.officenet.example.rpm.support.domain.model.entities.{AbstractChangableEntity, User}
+
+@Entity
+@Table(name = "comment")
+@SequenceGenerator(name = "SEQ_STORE", sequenceName = "comment_id_seq", allocationSize = 1)
+class Comment(_created: DateTime,
+ _createdBy: User,
+ _commentText: String,
+ _commentedId: java.lang.Long)
+ extends AbstractChangableEntity(_created, _createdBy) {
+
+ def this() {
+ this(null, null, null, null)
+ }
+
+ def this(createdBy: User) {
+ this(null, createdBy, null, null)
+ }
+
+ @Column(name = "commented_id", nullable = false, updatable = false)
+ @net.sf.oval.constraint.NotNull
+ var commentedId = _commentedId
+
+ @ManyToOne(fetch = FetchType.LAZY)
+ @JoinColumn(name = "parent_id")
+ var parent: Comment = _
+
+ @OneToMany(fetch = FetchType.LAZY, mappedBy = "parent")
+ var children: juList[Comment] = new ArrayList[Comment]()
+
+ @Column(name = "comment_text", nullable = false)
+ @net.sf.oval.constraint.NotNull
+ @net.sf.oval.constraint.NotBlank
+ var commentText: String = _commentText
+
+ @OneToOne(fetch = FetchType.EAGER, optional = false)
+ @JoinColumn(name = "comment_vote_id")
+ var commentVote: CommentVote = null
+
+ override def toString = new ToStringBuilder(this).append("id", id).
+ append("commentText", commentText).
+ append("parentId", if (parent == null) "<none>" else parent.id.toString).
+ toString
+}
+
+object CommentJPAFields {
+
+ object commentText extends StringField[Comment]
+
+}
@@ -0,0 +1,26 @@
+package no.officenet.example.rpm.blog.domain.model.entities
+
+import javax.persistence._
+import org.apache.commons.lang.builder.ToStringBuilder
+import no.officenet.example.rpm.support.domain.model.entities.AbstractDomainObject
+
+@Entity
+@Table(name = "comment_vote")
+@SequenceGenerator(name = "SEQ_STORE", sequenceName = "comment_vote_id_seq", allocationSize = 1)
+class CommentVote extends AbstractDomainObject {
+
+ @Column(name = "vote_value", nullable = false)
+ var voteValue: Int = 0
+
+ override def toString = new ToStringBuilder(this).append("id", id).
+ append("voteValue", voteValue).toString
+
+ def addVote(vote: Boolean): Int = {
+ if (vote) {
+ voteValue += 1
+ } else {
+ voteValue -= 1
+ }
+ voteValue
+ }
+}
@@ -0,0 +1,37 @@
+package no.officenet.example.rpm.blog.domain.model.entities
+
+import javax.persistence._
+import org.apache.commons.lang.builder.ToStringBuilder
+import org.joda.time.DateTime
+import no.officenet.example.rpm.support.domain.model.entities.{User, AbstractDomainObject}
+import no.officenet.example.rpm.support.infrastructure.jpa.CustomJpaType
+
+@Entity
+@Table(name = "comment_vote_owner")
+@SequenceGenerator(name = "SEQ_STORE", sequenceName = "comment_vote_owner_id_seq", allocationSize = 1)
+class CommentVoteOwner(_created: DateTime, _comment: Comment, _voter: User, _voteValue: Boolean)
+ extends AbstractDomainObject {
+
+ def this() {
+ this(null, null, null, false)
+ }
+
+ @Column(name = "created", nullable = false, updatable = false)
+ @org.hibernate.annotations.Type(`type` = CustomJpaType.DateTime,
+ parameters = Array(new org.hibernate.annotations.Parameter(name = "databaseZone", value = "jvm")))
+ var created = _created
+
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
+ @JoinColumn(name = "comment_id")
+ var comment: Comment = _comment
+
+ @ManyToOne(fetch = FetchType.LAZY, optional = false)
+ @JoinColumn(name = "voter_id")
+ var voter: User = _voter
+
+ @Column(name = "vote_value", nullable = false)
+ var voteValue: Boolean = _voteValue
+
+ override def toString = new ToStringBuilder(this).append("id", id).append("comment", comment.id).
+ append("voter", voter.id).append("voteValue", voteValue).toString
+}
Oops, something went wrong.

0 comments on commit fae65f1

Please sign in to comment.