Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

well it's a brave man who checks in this much at once.

this is more like a project merge, though.  don't be sad
  • Loading branch information...
commit a97f9b27997d3f399d48849bd43379870fc4b069 1 parent 8a3118e
@heinousjay authored
Showing with 16,724 additions and 8,252 deletions.
  1. +0 −52 JibbrJabbr-server/JibbrJabbr-api/pom.xml
  2. +0 −48 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/Blocking.java
  3. +0 −54 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/Dispose.java
  4. +0 −47 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/Event.java
  5. +0 −32 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/EventPublisher.java
  6. +0 −56 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/NonBlocking.java
  7. +0 −61 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/Shutdown.java
  8. +0 −65 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/Startup.java
  9. +0 −121 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/Version.java
  10. +0 −37 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/Attribute.java
  11. +0 −27 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/Attributes.java
  12. +0 −18 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/DataNode.java
  13. +0 −14 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/Document.java
  14. +0 −646 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/Element.java
  15. +0 −186 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/Node.java
  16. +0 −56 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/Select.java
  17. +0 −39 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/TextNode.java
  18. +0 −20 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/package-info.java
  19. +0 −11 JibbrJabbr-server/JibbrJabbr-api/src/main/resources/jj/api/VERSION
  20. +0 −27 JibbrJabbr-server/JibbrJabbr-api/src/test/java/jj/api/VersionTest.java
  21. +27 −12 JibbrJabbr-server/JibbrJabbr-bootstrapper/src/main/java/jj/JJ.java
  22. +25 −56 JibbrJabbr-server/JibbrJabbr-kernel/pom.xml
  23. +0 −58 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/APIClassLoader.java
  24. +0 −27 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/AsyncThreadPool.java
  25. +0 −119 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/AsynchronousThreadPoolExecutor.java
  26. +5 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/Configuration.java
  27. +0 −24 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/Constants.java
  28. +23 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/DateFormatHelper.java
  29. +0 −235 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/EventMediationService.java
  30. +3 −0  JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/HttpControlThread.java
  31. +0 −213 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/HttpRequestHandler.java
  32. +0 −207 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/HttpServer.java
  33. +72 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/IOExecutor.java
  34. +9 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/IOThread.java
  35. +0 −48 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/JJComponentMonitor.java
  36. +25 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/JJExecutors.java
  37. +69 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/JJExecutorsImpl.java
  38. +0 −79 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/JJLifecycleStrategy.java
  39. +30 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/JJRunnable.java
  40. +39 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/JJServerLifecycle.java
  41. +6 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/JJShutdown.java
  42. +6 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/JJStartup.java
  43. +90 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/JibbrJabbrComponentMonitor.java
  44. +0 −186 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/Kernel.java
  45. +0 −25 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/KernelControl.java
  46. +0 −36 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/KernelException.java
  47. +0 −75 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/KernelMessages.java
  48. +0 −141 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/KernelSettings.java
  49. +0 −56 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/KernelTask.java
  50. +0 −75 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/LocLoggerProvidingAdapter.java
  51. +0 −36 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/LogbackConfigurator.java
  52. +118 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/Main.java
  53. +0 −45 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/MessageConveyorProvidingAdapter.java
  54. +0 −129 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/NettyRequestBridge.java
  55. +55 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/SHA1Helper.java
  56. +49 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/SLF4JConfiguration.java
  57. +3 −0  JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/ScriptThread.java
  58. +10 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/SelectorFormatException.java
  59. +21 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/Sequence.java
  60. +0 −54 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/Settings.java
  61. +0 −28 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/SynchThreadPool.java
  62. +0 −143 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/SynchronousThreadPoolExecutor.java
  63. +22 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/document/DocumentFilter.java
  64. +13 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/document/DocumentInitializer.java
  65. +56 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/document/DocumentRequest.java
  66. +93 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/document/InlineMessagesFilter.java
  67. +83 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/document/ScriptHelperDocumentFilter.java
  68. +0 −26 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/generation/ClassTransformationService.java
  69. +0 −155 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/generation/EventMediationTransformer.java
  70. +141 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/ClientStorage.java
  71. +6 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/ContributesScript.java
  72. +21 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/CouldNotLoadScriptException.java
  73. +60 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/DoCallFunction.java
  74. +61 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/DoInvokeFunction.java
  75. +65 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/DoRetrieveFunction.java
  76. +65 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/DoStoreFunction.java
  77. +298 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/DocumentSelection.java
  78. +212 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/DollarFunction.java
  79. +86 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/EventRegistrationFunction.java
  80. +271 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/EventSelection.java
  81. +48 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/HostApiInitializer.java
  82. +14 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/HostEvent.java
  83. +21 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/HostObject.java
  84. +99 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/NextConnectionFunction.java
  85. +82 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/PrepareConnectionIteratorFunction.java
  86. +61 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/PrintFunction.java
  87. +72 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/PrintfFunction.java
  88. +153 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/RestCallOptions.java
  89. +162 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/RestCallProvider.java
  90. +124 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/RestServiceFunction.java
  91. +14 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/RhinoObjectCreator.java
  92. +84 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/RhinoObjectCreatorImpl.java
  93. +46 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/hostapi/ScriptJSON.java
  94. +135 −47 ...i/src/main/java/jj/api/html/Elements.java → JibbrJabbr-kernel/src/main/java/jj/hostapi/Selection.java}
  95. +0 −123 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/html/HTMLFragment.java
  96. +0 −122 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/html/HTMLFragmentCache.java
  97. +0 −41 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/html/HTMLFragmentFinder.java
  98. +0 −113 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/io/DirectoryTreeRetriever.java
  99. +0 −67 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/io/FileBytesRetriever.java
  100. +0 −163 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/io/FileSystemService.java
  101. +0 −233 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/io/FileWatchService.java
  102. +0 −101 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/io/FileWatchSubscription.java
  103. +0 −49 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/io/HttpRequestSubscription.java
  104. +0 −122 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/io/UriToPath.java
  105. +24 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/Append.java
  106. +35 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/Bind.java
  107. +16 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/Create.java
  108. +16 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/Element.java
  109. +14 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/Event.java
  110. +10 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/ExpectsResult.java
  111. +14 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/Get.java
  112. +15 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/Invoke.java
  113. +305 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/JQueryMessage.java
  114. +10 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/JQueryMessageException.java
  115. +14 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/Result.java
  116. +14 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/Retrieve.java
  117. +17 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/Set.java
  118. +18 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/Store.java
  119. +8 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/jqmessage/package-info.java
  120. +0 −103 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/module/Module.java
  121. +0 −36 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/module/ModuleClassLoader.java
  122. +0 −24 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/module/ModulePath.java
  123. +0 −80 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/module/Resource.java
  124. +0 −85 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/module/ResourceType.java
  125. +0 −84 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/module/Resources.java
  126. +24 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/request/DocumentRequestProcessor.java
  127. +174 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/request/DocumentRequestProcessorImpl.java
  128. +11 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/request/RequestProcessor.java
  129. +70 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/AbstractResource.java
  130. +57 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/AssetResource.java
  131. +77 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/AssetResourceCreator.java
  132. +76 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/AssetResourcePreloader.java
  133. +29 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/CssResource.java
  134. +66 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/HtmlResource.java
  135. +32 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/HtmlResourceCreator.java
  136. +0 −156 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/MessageBundle.java
  137. +0 −42 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/MessageConveyor.java
  138. +0 −132 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/MessageConveyorCache.java
  139. +0 −66 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/PreloadingMessageConveyor.java
  140. +63 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/PropertiesResource.java
  141. +35 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/PropertiesResourceCreator.java
  142. +0 −29 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/Reloadable.java
  143. +16 −20 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/Resource.java
  144. +21 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/ResourceCache.java
  145. +20 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/ResourceCreator.java
  146. +8 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/ResourceFinder.java
  147. +111 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/ResourceFinderImpl.java
  148. +32 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/ResourceInitializer.java
  149. +127 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/ResourceWatchService.java
  150. +60 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/ScriptResource.java
  151. +41 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/ScriptResourceCreator.java
  152. +21 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/ScriptResourceType.java
  153. +0 −90 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/resource/SynchronousOperationCallback.java
  154. +0 −34 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/response/HttpResponder.java
  155. +30 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/rest/RestRequest.java
  156. +139 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/ContinuationCoordinator.java
  157. +9 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/ContinuationProcessor.java
  158. +78 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/ContinuationState.java
  159. +6 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/ContinuationType.java
  160. +198 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/CurrentScriptContext.java
  161. +30 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/JQueryMessageContinuationProcessor.java
  162. +79 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/RestRequestContinuationProcessor.java
  163. +134 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/ScriptBundle.java
  164. +184 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/ScriptBundleCreator.java
  165. +64 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/ScriptBundleFinder.java
  166. +22 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/ScriptBundles.java
  167. +37 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/ScriptContext.java
  168. +73 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/ScriptExecutorFactory.java
  169. +19 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/ScriptInitializer.java
  170. +389 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/script/ScriptRunner.java
  171. +88 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/servable/AssetServable.java
  172. +99 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/servable/AssociatedScriptServable.java
  173. +47 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/servable/CssServable.java
  174. +108 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/servable/HtmlServable.java
  175. +83 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/servable/Servable.java
  176. +16 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/servable/ServableInitializer.java
  177. +70 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/servable/SocketServable.java
  178. +117 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/webbit/JJEngineHttpHandler.java
  179. +103 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/webbit/JJHttpRequest.java
  180. +101 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/webbit/JJLogSink.java
  181. +113 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/webbit/JJWebSocketConnection.java
  182. +46 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/webbit/NotFoundHttpHandler.java
  183. +66 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/webbit/WebSocketConnections.java
  184. +108 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/webbit/WebSocketHandler.java
  185. +93 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/webbit/WebbitBootstrapper.java
  186. +17 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/webbit/WebbitInitializer.java
  187. +0 −34 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/logging/Logger.java
  188. +9 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/resources/jj/assets/errors/404.html
  189. +2 −0  JibbrJabbr-server/JibbrJabbr-kernel/src/main/resources/jj/assets/jquery-1.8.3.min.js
  190. +184 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/resources/jj/assets/socket-connect.js
  191. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/main/resources/jj/builtin/assets/favicon.ico
  192. +0 −45 JibbrJabbr-server/JibbrJabbr-kernel/src/main/resources/jj/builtin/assets/index.html
  193. +0 −10 JibbrJabbr-server/JibbrJabbr-kernel/src/main/resources/jj/builtin/errors/404.html
  194. +0 −10 JibbrJabbr-server/JibbrJabbr-kernel/src/main/resources/jj/builtin/errors/405.html
  195. +0 −30 JibbrJabbr-server/JibbrJabbr-kernel/src/main/resources/jj/kernel-messages_en.properties
  196. +3,725 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/main/resources/jj/less-1.3.1.rhino.js
  197. +0 −70 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/fun/Example.java
  198. +0 −49 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/fun/ExampleAdapter.java
  199. +0 −103 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/fun/Pointless.java
  200. +0 −37 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/ClamwhoresJar.java
  201. +0 −41 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/CoreResourcesRule.java
  202. +0 −226 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/EventMediationServiceTest.java
  203. +0 −92 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/FileSystemServiceRule.java
  204. +0 −34 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/MockEventPublisher.java
  205. +0 −421 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/MockLogger.java
  206. +0 −64 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/MockThreadPool.java
  207. +31 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/Scratchpad.java
  208. +32 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/SequenceTest.java
  209. +78 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/document/InlineMessagesFilterTest.java
  210. +163 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/document/ScriptHelperDocumentFilterTest.java
  211. +0 −99 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/html/HTMLFragmentFinderTest.java
  212. +0 −35 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/html/HTMLFragmentTest.java
  213. +0 −363 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/io/FileSystemServiceTest.java
  214. +0 −170 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/io/FileWatchServiceTest.java
  215. +0 −47 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/module/ModuleTest.java
  216. +146 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/request/DocumentRequestProcessorImplTest.java
  217. +72 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/resource/ConcreteResourceFinderImplTest.java
  218. +59 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/resource/HtmlResourceCreatorTest.java
  219. +0 −83 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/resource/MessageBundleTest.java
  220. +131 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/script/ScriptExecutorFactoryImplTest.java
  221. +191 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/script/ScriptRunnerTest.java
  222. +45 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/java/jj/servable/CssServableResourceTest.java
  223. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/blank.gif
  224. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/fancybox_loading.gif
  225. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/fancybox_overlay.png
  226. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/fancybox_sprite.png
  227. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/helpers/fancybox_buttons.png
  228. +96 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/helpers/jquery.fancybox-buttons.css
  229. +121 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/helpers/jquery.fancybox-buttons.js
  230. +196 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/helpers/jquery.fancybox-media.js
  231. +54 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/helpers/jquery.fancybox-thumbs.css
  232. +162 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/helpers/jquery.fancybox-thumbs.js
  233. +24 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/hi.txt
  234. +45 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/index.html
  235. +201 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/index.js
  236. +4 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/index.properties
  237. +514 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/index.server.js
  238. +35 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/index.shared.js
  239. +18 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/internal/no-worky.html
  240. +7 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/internal/no-worky.properties
  241. +0 −8 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/jj/html/index.html
  242. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/jj/io/jj_io_test.jar
  243. +0 −1  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/jj/io/test/level2/another.file
  244. 0  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/jj/io/test/nothing.file
  245. +0 −1  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/jj/io/test/something.file
  246. +0 −3  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/jj/resource/test_en.properties
  247. +0 −3  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/jj/resource/test_fr.properties
  248. +0 −2  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/jj/resource/test_fr_ca.properties
  249. +0 −12 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/joj/example.html
  250. +2 −0  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/jquery.color.min.js
  251. +249 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/jquery.fancybox.css
  252. +1,985 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/jquery.fancybox.js
  253. +7 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/jquery.scrollTo-1.4.3.1-min.js
  254. +93 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/scratch.js
  255. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/69.gif
  256. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/ass2ass.gif
  257. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/cunnilingus.gif
  258. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/diddle.gif
  259. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/doggystyle.gif
  260. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/fellatio.gif
  261. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/fuck.gif
  262. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/fuckdog.gif
  263. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/goldenshower.gif
  264. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/hotkarl.gif
  265. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/shocker.gif
  266. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/teabag.gif
  267. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/tittyfuck.gif
  268. BIN  JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/smileys/whack.gif
  269. +115 −0 JibbrJabbr-server/JibbrJabbr-kernel/src/test/resources/style.css
  270. +0 −4 JibbrJabbr-server/JibbrJabbr/pom.xml
  271. +0 −2  JibbrJabbr-server/JibbrJabbr/src/main/assembly/package.xml
  272. +0 −7 JibbrJabbr-server/clamwhores.com/pom.xml
  273. +0 −30 JibbrJabbr-server/clamwhores.com/src/main/java/com/clamwhores/assets/Index.java
  274. +96 −49 JibbrJabbr-server/pom.xml
  275. +12 −0 pom.xml
View
52 JibbrJabbr-server/JibbrJabbr-api/pom.xml
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>JibbrJabbr-server</artifactId>
- <groupId>com.jibbrjabbr</groupId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <artifactId>JibbrJabbr-api</artifactId>
- <name>JibbrJabbr API</name>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit-dep</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>pl.project13.maven</groupId>
- <artifactId>git-commit-id-plugin</artifactId>
- <version>2.1.0</version>
- <executions>
- <execution>
- <phase>initialize</phase>
- <goals>
- <goal>revision</goal>
- </goals>
- </execution>
- </executions>
-
- <configuration>
- <dotGitDirectory>${jj.project.basedir}/.git</dotGitDirectory>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
View
48 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/Blocking.java
@@ -1,48 +0,0 @@
-/*
- * Copyright 2012 Jason Miller
- *
- * Licensed 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 jj.api;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * Documents that a method can potentially block, and so should never be called using
- * the asynchronous executor. Methods decorated as Blocking can safely call all methods,
- * and cannot be called by methods marked NonBlocking. Classes that bear methods marked
- * Blocking in their public API should provide equivalent NonBlocking methods. Constructors
- * that are blocking simply should never be called in a nonblocking context.
- * </p>
- *
- * <p>
- * We'll retain this at runtime in case we can figure out a smart way to make
- * it meaningful, but for now it's documentation
- * </p>
- *
- * @author jason
- *
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
-@Documented
-@Inherited
-public @interface Blocking {
-
-}
View
54 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/Dispose.java
@@ -1,54 +0,0 @@
-/*
- * Copyright 2012 Jason Miller
- *
- * Licensed 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 jj.api;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * Annotates a method that is to be called before the object is taken out of
- * service. Once this method completes, the instance will be discarded.
- * </p>
- *
- * <p>
- * The lifecycle is
- * <ul>
- * <li>Initialization (construction)</li>
- * <li>{@link Startup}</li>
- * <li>{@link Shutdown}</li>
- * <li>({@link Startup})</li>
- * <li>({@link Shutdown})...</li>
- * <li>Dispose</li>
- * <li>{@link Object#finalize()} (which obviously, avoid)</li>
- * </ul>
- * <p>
- *
- * @author jason
- *
- */
-@Retention(RUNTIME)
-@Target(METHOD)
-@Documented
-@Inherited
-public @interface Dispose {
-
-}
View
47 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/Event.java
@@ -1,47 +0,0 @@
-/*
- * Copyright 2012 Jason Miller
- *
- * Licensed 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 jj.api;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Marks a type as being an event. Instances of that type can automatically participate in
- * event mediation. Any component with a public void method of any name that takes a single
- * parameter of an event type will be registered as a listener, and whenever an event is published,
- * that method will be invoked.
- *
- * use the {@link Blocking}/{@link NonBlocking} annotations to indicate if the event listener method might block. if
- * no annotation is supplied, it will be assumed that blocking is possible. at this point it is not
- * clear what impacts this will have but it is likely that nonblocking methods will execute more quickly
- *
- * static methods will be ignored.
- *
- * event objects should almost certainly be immutable. this may be enforced
- *
- * @author jason
- *
- */
-@Retention(RUNTIME)
-@Target(TYPE)
-@Documented
-@Inherited
-public @interface Event {}
View
32 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/EventPublisher.java
@@ -1,32 +0,0 @@
-/*
- * Copyright 2012 Jason Miller
- *
- * Licensed 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 jj.api;
-
-/**
- * Inject this interface if you need to publish events.
- *
- * The usage model should probably, what's the word... obvious.
- *
- * @see Event
- *
- * @author jason
- *
- */
-public interface EventPublisher {
-
- public void publish(Object event);
-
-}
View
56 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/NonBlocking.java
@@ -1,56 +0,0 @@
-/*
- * Copyright 2012 Jason Miller
- *
- * Licensed 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 jj.api;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-
-/**
- * <p>
- * Documents that a method will never block, and so is suitable for use in
- * the asynchronous executor. Methods decorated with this annotation must never
- * call methods decorated with {@link Blocking}. Note that all logging is currently
- * potentially blocking, so there can be no logging from a method decorated
- * with this annotation.
- * </p>
- *
- * <p>
- * Watch out for hidden sources of blocking, there are still a few in here for
- * instance. Things like querying the file system could block arbitrarily.
- * Transient locking around putting tasks on queues should be okay, which is
- * good, because that's basically unavoidable.
- * </p>
- *
- * <p>
- * We'll retain this at runtime in case we can figure out a smart way to make
- * it meaningful, but for now it's documentation
- * </p>
- *
- * @author jason
- *
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD, ElementType.CONSTRUCTOR})
-@Documented
-@Inherited
-public @interface NonBlocking {
-
-}
View
61 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/Shutdown.java
@@ -1,61 +0,0 @@
-/*
- * Copyright 2012 Jason Miller
- *
- * Licensed 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 jj.api;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * Annotates a method that should be called to signal shutdown,
- * which occurs some time after startup. This is an opportunity
- * to clean up all resources acquired. Once the method completes,
- * the object should be ready to be started again.
- * </p>
- *
- * <p>
- * The method may be called at additional points over the lifetime of an object,
- * after a method annotated with {@link Startup} (if it is defined) has been
- * called. (In general, if you define a Startup, you should define a Shutdown)
- * <p>
- *
- * <p>
- * The lifecycle is
- * <ul>
- * <li>Initialization (construction)</li>
- * <li>Startup</li>
- * <li>Shutdown</li>
- * <li>(Startup)</li>
- * <li>(Shutdown)...</li>
- * <li>{@link Dispose}</li>
- * <li>{@link Object#finalize()} (which obviously, avoid)</li>
- * </ul>
- * <p>
- * @author jason
- *
- */
-@Retention(RUNTIME)
-@Target(METHOD)
-@Documented
-@Inherited
-public @interface Shutdown {
-
-}
View
65 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/Startup.java
@@ -1,65 +0,0 @@
-/*
- * Copyright 2012 Jason Miller
- *
- * Licensed 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 jj.api;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * Annotates a method that should be called to signal startup,
- * which occurs after initialization. Once the method completes,
- * the object should be ready to service requests.
- * </p>
- *
- * <p>
- * The method may be called at additional points over the lifetime of an object,
- * after a method annotated with {@link Shutdown} (if it is defined) has been
- * called. (In general, if you define a Startup, you should define a Shutdown)
- * <p>
- *
- * <p>
- * This method is this first place to read in files or establish network
- * connections that are needed to perform the job this object is to perform.
- * </p>
- *
- * <p>
- * The lifecycle is
- * <ul>
- * <li>Initialization (construction)</li>
- * <li>Startup</li>
- * <li>Shutdown</li>
- * <li>(Startup)</li>
- * <li>(Shutdown)...</li>
- * <li>{@link Dispose}</li>
- * <li>{@link Object#finalize()} (which obviously, avoid)</li>
- * </ul>
- * <p>
- * @author jason
- *
- */
-@Retention(RUNTIME)
-@Target(METHOD)
-@Documented
-@Inherited
-public @interface Startup {
-
-}
View
121 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/Version.java
@@ -1,121 +0,0 @@
-/*
- * Copyright 2012 Jason Miller
- *
- * Licensed 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 jj.api;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.nio.charset.StandardCharsets;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-
-/**
- * Exposes system version information as constants.
- *
- * @author Jason Miller
- *
- */
-public final class Version {
-
- /** The name of the system */
- public static final String name;
-
- /** The full version of the system */
- public static final String version;
-
- /** The major version of the system */
- public static final int major;
-
- /** The minor version of the system */
- public static final int minor;
-
- /** Flag indicating if this is a snapshot */
- public static final boolean snapshot;
-
- /** name of the repository branch for this build version */
- public static final String branchName;
-
- /** user name of the person who created the commit for this build version */
- public static final String commitUserName;
-
- /** email address of the person who created the commit for this build version */
- public static final String commitUserEmail;
-
- /** id of the commit for this build version */
- public static final String commitId;
-
- /** description of the commit for this build version */
- public static final String commitDescription;
-
- /** date and time of the commit for this build version */
- public static final Date commitDate;
-
- /** user name of the person who built this version */
- public static final String buildUserName;
-
- /** email address of the person who built this version */
- public static final String buildUserEmail;
-
- /** date and time when this version was built */
- public static final Date buildDate;
-
- static {
- // we do things this way to avoid depending on any jj internal classes in
- // order to create these values. The jj.api package is intended to have
- // no visibility into system internals.
-
- try (BufferedReader r = new BufferedReader(
- new InputStreamReader(
- Version.class.getResourceAsStream("VERSION"), StandardCharsets.UTF_8
- )
- )
- ) {
-
- name = r.readLine();
- version = r.readLine();
-
- Pattern versionParser = Pattern.compile("(\\d*)\\.(\\d*)(-SNAPSHOT)?");
-
- Matcher matcher = versionParser.matcher(version);
- matcher.matches();
- major = Integer.parseInt(matcher.group(1));
- minor = Integer.parseInt(matcher.group(2));
- snapshot = matcher.group(3) != null;
-
- branchName = r.readLine();
-
- SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy '@' HH:mm:ss z");
-
- commitUserName = r.readLine();
- commitUserEmail = r.readLine();
- commitId = r.readLine();
- commitDescription = r.readLine();
- commitDate = sdf.parse(r.readLine());
-
- buildUserName = r.readLine();
- buildUserEmail = r.readLine();
- buildDate = sdf.parse(r.readLine());
-
-
- } catch (Exception e) {
- throw new IllegalStateException("MY JAR IS BROKEN", e);
- }
- }
-
- private Version() {}
-}
View
37 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/Attribute.java
@@ -1,37 +0,0 @@
-package jj.api.html;
-
-public interface Attribute extends Cloneable {
-
- /**
- Get the attribute key.
- @return the attribute key
- */
- String getKey();
-
- /**
- Set the attribute key. Gets normalised as per the constructor method.
- @param key the new key; must not be null
- */
- void setKey(String key);
-
- /**
- Get the attribute value.
- @return the attribute value
- */
- String getValue();
-
- /**
- Set the attribute value.
- @param value the new attribute value; must not be null
- */
- String setValue(String value);
-
- /**
- Get the HTML representation of this attribute; e.g. {@code href="index.html"}.
- @return HTML
- */
- String html();
-
- Attribute clone();
-
-}
View
27 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/Attributes.java
@@ -1,27 +0,0 @@
-package jj.api.html;
-
-import java.util.List;
-import java.util.Map;
-
-public interface Attributes extends Iterable<Attribute>, Cloneable {
-
- String get(String key);
-
- void put(String key, String value);
-
- void put(Attribute attribute);
-
- void remove(String key);
-
- boolean hasKey(String key);
-
- int size();
-
- void addAll(Attributes incoming);
-
- List<Attribute> asList();
-
- Map<String, String> dataset();
-
- Attributes clone();
-}
View
18 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/DataNode.java
@@ -1,18 +0,0 @@
-package jj.api.html;
-
-public interface DataNode extends Node {
-
- /**
- Get the data contents of this node. Will be unescaped and with original new lines, space etc.
- @return data
- */
- String getWholeData();
-
- /**
- * Set the data contents of this node.
- * @param data unencoded data
- * @return this node, for chaining
- */
- DataNode setWholeData(String data);
-
-}
View
14 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/Document.java
@@ -1,14 +0,0 @@
-package jj.api.html;
-
-public interface Document extends Element {
-
- String title();
-
- Document title(String title);
-
- Element head();
-
- Element body();
-
- Document clone();
-}
View
646 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/Element.java
@@ -1,646 +0,0 @@
-package jj.api.html;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-public interface Element extends Node {
-
- String nodeName();
-
- /**
- * Get the name of the tag for this element. E.g. {@code div}
- *
- * @return the tag name
- */
- String tagName();
-
- /**
- * Change the tag of this element. For example, convert a {@code <span>} to a {@code <div>} with
- * {@code el.tagName("div");}.
- *
- * @param tagName new tag name for this element
- * @return this element, for chaining
- */
- Element tagName(String tagName);
-
- /**
- * Test if this element is a block-level element. (E.g. {@code <div> == true} or an inline element
- * {@code <p> == false}).
- *
- * @return true if block, false if not (and thus inline)
- */
- boolean isBlock();
-
- /**
- * Get the {@code id} attribute of this element.
- *
- * @return The id attribute, if present, or an empty string if not.
- */
- String id();
-
- /**
- * Get an attribute's value by its key.
- * <p/>
- * To get an absolute URL from an attribute that may be a relative URL, prefix the key with <code><b>abs</b></code>,
- * which is a shortcut to the {@link #absUrl} method.
- * E.g.: <blockquote><code>String url = a.attr("abs:href");</code></blockquote>
- * @param attributeKey The attribute key.
- * @return The attribute, or empty string if not present (to avoid nulls).
- * @see #attributes()
- * @see #hasAttr(String)
- * @see #absUrl(String)
- */
- String attr(String attributeKey);
-
- /**
- * Get all of the element's attributes.
- * @return attributes (which implements iterable, in same order as presented in original HTML).
- */
- Attributes attributes();
-
- /**
- * Set an attribute value on this element. If this element already has an attribute with the
- * key, its value is updated; otherwise, a new attribute is added.
- *
- * @return this element
- */
- Element attr(String attributeKey, String attributeValue);
-
- /**
- * Test if this element has an attribute.
- * @param attributeKey The attribute key to check.
- * @return true if the attribute exists, false if not.
- */
- boolean hasAttr(String attributeKey);
-
- /**
- * Remove an attribute from this element.
- * @param attributeKey The attribute to remove.
- * @return this (for chaining)
- */
- Node removeAttr(String attributeKey);
-
- /**
- * Get this element's HTML5 custom data attributes. Each attribute in the element that has a key
- * starting with "data-" is included the dataset.
- * <p>
- * E.g., the element {@code <div data-package="jsoup" data-language="Java" class="group">...} has the dataset
- * {@code package=jsoup, language=java}.
- * <p>
- * This map is a filtered view of the element's attribute map. Changes to one map (add, remove, update) are reflected
- * in the other map.
- * <p>
- * You can find elements that have data attributes using the {@code [^data-]} attribute key prefix selector.
- * @return a map of {@code key=value} custom data attributes.
- */
- Map<String, String> dataset();
-
- Element parent();
-
- /**
- * Get this element's parent and ancestors, up to the document root.
- * @return this element's stack of parents, closest first.
- */
- Elements parents();
-
- /**
- * Get a child element of this element, by its 0-based index number.
- * <p/>
- * Note that an element can have both mixed Nodes and Elements as children. This method inspects
- * a filtered list of children that are elements, and the index is based on that filtered list.
- *
- * @param index the index number of the element to retrieve
- * @return the child element, if it exists, or {@code null} if absent.
- * @see #childNode(int)
- */
- Element child(int index);
-
- /**
- * Get this element's child elements.
- * <p/>
- * This is effectively a filter on {@link #childNodes()} to get Element nodes.
- * @return child elements. If this element has no children, returns an
- * empty list.
- * @see #childNodes()
- */
- Elements children();
-
- /**
- * Get this element's child text nodes. The list is unmodifiable but the text nodes may be manipulated.
- * <p/>
- * This is effectively a filter on {@link #childNodes()} to get Text nodes.
- * @return child text nodes. If this element has no text nodes, returns an
- * empty list.
- * <p/>
- * For example, with the input HTML: {@code <p>One <span>Two</span> Three <br> Four</p>} with the {@code p} element selected:
- * <ul>
- * <li>{@code p.text()} = {@code "One Two Three Four"}</li>
- * <li>{@code p.ownText()} = {@code "One Three Four"}</li>
- * <li>{@code p.children()} = {@code Elements[<span>, <br>]}</li>
- * <li>{@code p.childNodes()} = {@code List<Node>["One ", <span>, " Three ", <br>, " Four"]}</li>
- * <li>{@code p.textNodes()} = {@code List<TextNode>["One ", " Three ", " Four"]}</li>
- * </ul>
- */
- List<TextNode> textNodes();
-
- /**
- * Get this element's child data nodes. The list is unmodifiable but the data nodes may be manipulated.
- * <p/>
- * This is effectively a filter on {@link #childNodes()} to get Data nodes.
- * @return child data nodes. If this element has no data nodes, returns an
- * empty list.
- * @see #data()
- */
- List<DataNode> dataNodes();
-
- /**
- * Find elements that match the {@link Selector} CSS query, with this element as the starting context. Matched elements
- * may include this element, or any of its children.
- * <p/>
- * This method is generally more powerful to use than the DOM-type {@code getElementBy*} methods, because
- * multiple filters can be combined, e.g.:
- * <ul>
- * <li>{@code el.select("a[href]")} - finds links ({@code a} tags with {@code href} attributes)
- * <li>{@code el.select("a[href*=example.com]")} - finds links pointing to example.com (loosely)
- * </ul>
- * <p/>
- * See the query syntax documentation in {@link org.jsoup.select.Selector}.
- *
- * @param cssQuery a {@link Selector} CSS-like query
- * @return elements that match the query (empty if none match)
- * @see org.jsoup.select.Selector
- */
- Elements select(String cssQuery);
-
- /**
- * Add a node child node to this element.
- *
- * @param child node to add. Must not already have a parent.
- * @return this element, so that you can add more child nodes or elements.
- */
- Element appendChild(Node child);
-
- /**
- * Add a node to the start of this element's children.
- *
- * @param child node to add. Must not already have a parent.
- * @return this element, so that you can add more child nodes or elements.
- */
- Element prependChild(Node child);
-
- /**
- * Create a new element by tag name, and add it as the last child.
- *
- * @param tagName the name of the tag (e.g. {@code div}).
- * @return the new element, to allow you to add content to it, e.g.:
- * {@code parent.appendElement("h1").attr("id", "header").text("Welcome");}
- */
- Element appendElement(String tagName);
-
- /**
- * Create a new element by tag name, and add it as the first child.
- *
- * @param tagName the name of the tag (e.g. {@code div}).
- * @return the new element, to allow you to add content to it, e.g.:
- * {@code parent.prependElement("h1").attr("id", "header").text("Welcome");}
- */
- Element prependElement(String tagName);
-
- /**
- * Create and append a new TextNode to this element.
- *
- * @param text the unencoded text to add
- * @return this element
- */
- Element appendText(String text);
-
- /**
- * Create and prepend a new TextNode to this element.
- *
- * @param text the unencoded text to add
- * @return this element
- */
- Element prependText(String text);
-
- /**
- * Add inner HTML to this element. The supplied HTML will be parsed, and each node appended to the end of the children.
- * @param html HTML to add inside this element, after the existing HTML
- * @return this element
- * @see #html(String)
- */
- Element append(String html);
-
- /**
- * Add inner HTML into this element. The supplied HTML will be parsed, and each node prepended to the start of the element's children.
- * @param html HTML to add inside this element, before the existing HTML
- * @return this element
- * @see #html(String)
- */
- Element prepend(String html);
-
- /**
- * Insert the specified HTML into the DOM before this element (i.e. as a preceeding sibling).
- *
- * @param html HTML to add before this element
- * @return this element, for chaining
- * @see #after(String)
- */
- Element before(String html);
-
- /**
- * Insert the specified node into the DOM before this node (i.e. as a preceeding sibling).
- * @param node to add before this element
- * @return this Element, for chaining
- * @see #after(Node)
- */
- Element before(Node node);
-
- /**
- * Insert the specified HTML into the DOM after this element (i.e. as a following sibling).
- *
- * @param html HTML to add after this element
- * @return this element, for chaining
- * @see #before(String)
- */
- Element after(String html);
-
- /**
- * Insert the specified node into the DOM after this node (i.e. as a following sibling).
- * @param node to add after this element
- * @return this element, for chaining
- * @see #before(Node)
- */
- Element after(Node node);
-
- /**
- * Remove all of the element's child nodes. Any attributes are left as-is.
- * @return this element
- */
- Element empty();
-
- /**
- * Wrap the supplied HTML around this element.
- *
- * @param html HTML to wrap around this element, e.g. {@code <div class="head"></div>}. Can be arbitrarily deep.
- * @return this element, for chaining.
- */
- Element wrap(String html);
-
- /**
- * Get sibling elements.
- * @return sibling elements
- */
- Elements siblingElements();
-
- /**
- * Gets the next sibling element of this element. E.g., if a {@code div} contains two {@code p}s,
- * the {@code nextElementSibling} of the first {@code p} is the second {@code p}.
- * <p/>
- * This is similar to {@link #nextSibling()}, but specifically finds only Elements
- * @return the next element, or null if there is no next element
- * @see #previousElementSibling()
- */
- Element nextElementSibling();
-
- /**
- * Gets the previous element sibling of this element.
- * @return the previous element, or null if there is no previous element
- * @see #nextElementSibling()
- */
- Element previousElementSibling();
-
- /**
- * Gets the first element sibling of this element.
- * @return the first sibling that is an element (aka the parent's first element child)
- */
- Element firstElementSibling();
-
- /**
- * Get the list index of this element in its element sibling list. I.e. if this is the first element
- * sibling, returns 0.
- * @return position in element sibling list
- */
- Integer elementSiblingIndex();
-
- /**
- * Gets the last element sibling of this element
- * @return the last sibling that is an element (aka the parent's last element child)
- */
- Element lastElementSibling();
-
- /**
- * Finds elements, including and recursively under this element, with the specified tag name.
- * @param tagName The tag name to search for (case insensitively).
- * @return a matching unmodifiable list of elements. Will be empty if this element and none of its children match.
- */
- Elements getElementsByTag(String tagName);
-
- /**
- * Find an element by ID, including or under this element.
- * <p>
- * Note that this finds the first matching ID, starting with this element. If you search down from a different
- * starting point, it is possible to find a different element by ID. For unique element by ID within a Document,
- * use {@link Document#getElementById(String)}
- * @param id The ID to search for.
- * @return The first matching element by ID, starting with this element, or null if none found.
- */
- Element getElementById(String id);
-
- /**
- * Find elements that have this class, including or under this element. Case insensitive.
- * <p>
- * Elements can have multiple classes (e.g. {@code <div class="header round first">}. This method
- * checks each class, so you can find the above with {@code el.getElementsByClass("header");}.
- *
- * @param className the name of the class to search for.
- * @return elements with the supplied class name, empty if none
- * @see #hasClass(String)
- * @see #classNames()
- */
- Elements getElementsByClass(String className);
-
- /**
- * Find elements that have a named attribute set. Case insensitive.
- *
- * @param key name of the attribute, e.g. {@code href}
- * @return elements that have this attribute, empty if none
- */
- Elements getElementsByAttribute(String key);
-
- /**
- * Find elements that have an attribute name starting with the supplied prefix. Use {@code data-} to find elements
- * that have HTML5 datasets.
- * @param keyPrefix name prefix of the attribute e.g. {@code data-}
- * @return elements that have attribute names that start with with the prefix, empty if none.
- */
- Elements getElementsByAttributeStarting(String keyPrefix);
-
- /**
- * Find elements that have an attribute with the specific value. Case insensitive.
- *
- * @param key name of the attribute
- * @param value value of the attribute
- * @return elements that have this attribute with this value, empty if none
- */
- Elements getElementsByAttributeValue(String key, String value);
-
- /**
- * Find elements that either do not have this attribute, or have it with a different value. Case insensitive.
- *
- * @param key name of the attribute
- * @param value value of the attribute
- * @return elements that do not have a matching attribute
- */
- Elements getElementsByAttributeValueNot(String key, String value);
-
- /**
- * Find elements that have attributes that start with the value prefix. Case insensitive.
- *
- * @param key name of the attribute
- * @param valuePrefix start of attribute value
- * @return elements that have attributes that start with the value prefix
- */
- Elements getElementsByAttributeValueStarting(String key, String valuePrefix);
-
- /**
- * Find elements that have attributes that end with the value suffix. Case insensitive.
- *
- * @param key name of the attribute
- * @param valueSuffix end of the attribute value
- * @return elements that have attributes that end with the value suffix
- */
- Elements getElementsByAttributeValueEnding(String key, String valueSuffix);
-
- /**
- * Find elements that have attributes whose value contains the match string. Case insensitive.
- *
- * @param key name of the attribute
- * @param match substring of value to search for
- * @return elements that have attributes containing this text
- */
- Elements getElementsByAttributeValueContaining(String key, String match);
-
- /**
- * Find elements that have attributes whose values match the supplied regular expression.
- * @param key name of the attribute
- * @param pattern compiled regular expression to match against attribute values
- * @return elements that have attributes matching this regular expression
- */
- Elements getElementsByAttributeValueMatching(String key, Pattern pattern);
-
- /**
- * Find elements that have attributes whose values match the supplied regular expression.
- * @param key name of the attribute
- * @param regex regular expression to match agaisnt attribute values. You can use <a href="http://java.sun.com/docs/books/tutorial/essential/regex/pattern.html#embedded">embedded flags</a> (such as (?i) and (?m) to control regex options.
- * @return elements that have attributes matching this regular expression
- */
- Elements getElementsByAttributeValueMatching(String key, String regex);
-
- /**
- * Find elements whose sibling index is less than the supplied index.
- * @param index 0-based index
- * @return elements less than index
- */
- Elements getElementsByIndexLessThan(int index);
-
- /**
- * Find elements whose sibling index is greater than the supplied index.
- * @param index 0-based index
- * @return elements greater than index
- */
- Elements getElementsByIndexGreaterThan(int index);
-
- /**
- * Find elements whose sibling index is equal to the supplied index.
- * @param index 0-based index
- * @return elements equal to index
- */
- Elements getElementsByIndexEquals(int index);
-
- /**
- * Find elements that contain the specified string. The search is case insensitive. The text may appear directly
- * in the element, or in any of its descendants.
- * @param searchText to look for in the element's text
- * @return elements that contain the string, case insensitive.
- * @see Element#text()
- */
- Elements getElementsContainingText(String searchText);
-
- /**
- * Find elements that directly contain the specified string. The search is case insensitive. The text must appear directly
- * in the element, not in any of its descendants.
- * @param searchText to look for in the element's own text
- * @return elements that contain the string, case insensitive.
- * @see Element#ownText()
- */
- Elements getElementsContainingOwnText(String searchText);
-
- /**
- * Find elements whose text matches the supplied regular expression.
- * @param pattern regular expression to match text against
- * @return elements matching the supplied regular expression.
- * @see Element#text()
- */
- Elements getElementsMatchingText(Pattern pattern);
-
- /**
- * Find elements whose text matches the supplied regular expression.
- * @param regex regular expression to match text against. You can use <a href="http://java.sun.com/docs/books/tutorial/essential/regex/pattern.html#embedded">embedded flags</a> (such as (?i) and (?m) to control regex options.
- * @return elements matching the supplied regular expression.
- * @see Element#text()
- */
- Elements getElementsMatchingText(String regex);
-
- /**
- * Find elements whose own text matches the supplied regular expression.
- * @param pattern regular expression to match text against
- * @return elements matching the supplied regular expression.
- * @see Element#ownText()
- */
- Elements getElementsMatchingOwnText(Pattern pattern);
-
- /**
- * Find elements whose text matches the supplied regular expression.
- * @param regex regular expression to match text against. You can use <a href="http://java.sun.com/docs/books/tutorial/essential/regex/pattern.html#embedded">embedded flags</a> (such as (?i) and (?m) to control regex options.
- * @return elements matching the supplied regular expression.
- * @see Element#ownText()
- */
- Elements getElementsMatchingOwnText(String regex);
-
- /**
- * Find all elements under this element (including self, and children of children).
- *
- * @return all elements
- */
- Elements getAllElements();
-
- /**
- * Gets the combined text of this element and all its children.
- * <p>
- * For example, given HTML {@code <p>Hello <b>there</b> now!</p>}, {@code p.text()} returns {@code "Hello there now!"}
- *
- * @return unencoded text, or empty string if none.
- * @see #ownText()
- * @see #textNodes()
- */
- String text();
-
- /**
- * Gets the text owned by this element only; does not get the combined text of all children.
- * <p>
- * For example, given HTML {@code <p>Hello <b>there</b> now!</p>}, {@code p.ownText()} returns {@code "Hello now!"},
- * whereas {@code p.text()} returns {@code "Hello there now!"}.
- * Note that the text within the {@code b} element is not returned, as it is not a direct child of the {@code p} element.
- *
- * @return unencoded text, or empty string if none.
- * @see #text()
- * @see #textNodes()
- */
- String ownText();
-
- /**
- * Set the text of this element. Any existing contents (text or elements) will be cleared
- * @param text unencoded text
- * @return this element
- */
- Element text(String text);
-
- /**
- Test if this element has any text content (that is not just whitespace).
- @return true if element has non-blank text content.
- */
- boolean hasText();
-
- /**
- * Get the combined data of this element. Data is e.g. the inside of a {@code script} tag.
- * @return the data, or empty string if none
- *
- * @see #dataNodes()
- */
- String data();
-
- /**
- * Gets the literal value of this element's "class" attribute, which may include multiple class names, space
- * separated. (E.g. on <code>&lt;div class="header gray"></code> returns, "<code>header gray</code>")
- * @return The literal class attribute, or <b>empty string</b> if no class attribute set.
- */
- String className();
-
- /**
- * Get all of the element's class names. E.g. on element {@code <div class="header gray"}>},
- * returns a set of two elements {@code "header", "gray"}. Note that modifications to this set are not pushed to
- * the backing {@code class} attribute; use the {@link #classNames(java.util.Set)} method to persist them.
- * @return set of classnames, empty if no class attribute
- */
- Set<String> classNames();
-
- /**
- Set the element's {@code class} attribute to the supplied class names.
- @param classNames set of classes
- @return this element, for chaining
- */
- Element classNames(Set<String> classNames);
-
- /**
- * Tests if this element has a class. Case insensitive.
- * @param className name of class to check for
- * @return true if it does, false if not
- */
- boolean hasClass(String className);
-
- /**
- Add a class name to this element's {@code class} attribute.
- @param className class name to add
- @return this element
- */
- Element addClass(String className);
-
- /**
- Remove a class name from this element's {@code class} attribute.
- @param className class name to remove
- @return this element
- */
- Element removeClass(String className);
-
- /**
- Toggle a class name on this element's {@code class} attribute: if present, remove it; otherwise add it.
- @param className class name to toggle
- @return this element
- */
- Element toggleClass(String className);
-
- /**
- * Get the value of a form element (input, textarea, etc).
- * @return the value of the form element, or empty string if not set.
- */
- String val();
-
- /**
- * Set the value of a form element (input, textarea, etc).
- * @param value value to set
- * @return this element (for chaining)
- */
- Element val(String value);
-
- /**
- * Retrieves the element's inner HTML. E.g. on a {@code <div>} with one empty {@code <p>}, would return
- * {@code <p></p>}. (Whereas {@link #outerHtml()} would return {@code <div><p></p></div>}.)
- *
- * @return String of HTML.
- * @see #outerHtml()
- */
- String html();
-
- /**
- * Set this element's inner HTML. Clears the existing HTML first.
- * @param html HTML to parse and set into this element
- * @return this element
- * @see #append(String)
- */
- Element html(String html);
-
- Element clone();
-
-}
View
186 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/Node.java
@@ -1,186 +0,0 @@
-package jj.api.html;
-
-import java.util.List;
-
-public interface Node extends Cloneable {
-
- /**
- Get the node name of this node. Use for debugging purposes and not logic switching (for that, use instanceof).
- @return node name
- */
- String nodeName();
-
- /**
- Get the base URI of this node.
- @return base URI
- */
- String baseUri();
-
- /**
- Update the base URI of this node and all of its descendants.
- @param baseUri base URI to set
- */
- void setBaseUri(final String baseUri);
-
- /**
- * Get an absolute URL from a URL attribute that may be relative (i.e. an <code>&lt;a href></code> or
- * <code>&lt;img src></code>).
- * <p/>
- * E.g.: <code>String absUrl = linkEl.absUrl("href");</code>
- * <p/>
- * If the attribute value is already absolute (i.e. it starts with a protocol, like
- * <code>http://</code> or <code>https://</code> etc), and it successfully parses as a URL, the attribute is
- * returned directly. Otherwise, it is treated as a URL relative to the element's {@link #baseUri}, and made
- * absolute using that.
- * <p/>
- * As an alternate, you can use the {@link #attr} method with the <code>abs:</code> prefix, e.g.:
- * <code>String absUrl = linkEl.attr("abs:href");</code>
- *
- * @param attributeKey The attribute key
- * @return An absolute URL if one could be made, or an empty string (not null) if the attribute was missing or
- * could not be made successfully into a URL.
- * @see #attr
- * @see java.net.URL#URL(java.net.URL, String)
- */
- String absUrl(String attributeKey);
-
- /**
- Get a child node by index
- @param index index of child node
- @return the child node at this index.
- */
- Node childNode(int index);
-
- /**
- Get this node's children. Presented as an unmodifiable list: new children can not be added, but the child nodes
- themselves can be manipulated.
- @return list of children. If no children, returns an empty list.
- */
- List<Node> childNodes();
-
- /**
- Gets this node's parent node.
- @return parent node; or null if no parent.
- */
- Node parent();
-
- /**
- * Gets the Document associated with this Node.
- * @return the Document associated with this Node, or null if there is no such Document.
- */
- Document ownerDocument();
-
- /**
- * Remove (delete) this node from the DOM tree. If this node has children, they are also removed.
- */
- void remove();
-
- /**
- * Insert the specified HTML into the DOM before this node (i.e. as a preceeding sibling).
- * @param html HTML to add before this node
- * @return this node, for chaining
- * @see #after(String)
- */
- Node before(String html);
-
- /**
- * Insert the specified node into the DOM before this node (i.e. as a preceeding sibling).
- * @param node to add before this node
- * @return this node, for chaining
- * @see #after(Node)
- */
- Node before(Node node);
-
- /**
- * Insert the specified HTML into the DOM after this node (i.e. as a following sibling).
- * @param html HTML to add after this node
- * @return this node, for chaining
- * @see #before(String)
- */
- Node after(String html);
-
- /**
- * Insert the specified node into the DOM after this node (i.e. as a following sibling).
- * @param node to add after this node
- * @return this node, for chaining
- * @see #before(Node)
- */
- Node after(Node node);
-
- /**
- Wrap the supplied HTML around this node.
- @param html HTML to wrap around this element, e.g. {@code <div class="head"></div>}. Can be arbitrarily deep.
- @return this node, for chaining.
- */
- Node wrap(String html);
-
- /**
- * Removes this node from the DOM, and moves its children up into the node's parent. This has the effect of dropping
- * the node but keeping its children.
- * <p/>
- * For example, with the input html:<br/>
- * {@code <div>One <span>Two <b>Three</b></span></div>}<br/>
- * Calling {@code element.unwrap()} on the {@code span} element will result in the html:<br/>
- * {@code <div>One Two <b>Three</b></div>}<br/>
- * and the {@code "Two "} {@link TextNode} being returned.
- * @return the first child of this node, after the node has been unwrapped. Null if the node had no children.
- * @see #remove()
- * @see #wrap(String)
- */
- Node unwrap();
-
- /**
- * Replace this node in the DOM with the supplied node.
- * @param in the node that will will replace the existing node.
- */
- void replaceWith(Node in);
-
- /**
- Retrieves this node's sibling nodes. Effectively, {@link #childNodes() node.parent.childNodes()}.
- @return node siblings, including this node
- */
- List<Node> siblingNodes();
-
- /**
- Get this node's next sibling.
- @return next sibling, or null if this is the last sibling
- */
- Node nextSibling();
-
- /**
- Get this node's previous sibling.
- @return the previous sibling, or null if this is the first sibling
- */
- Node previousSibling();
-
- /**
- * Get the list index of this node in its node sibling list. I.e. if this is the first node
- * sibling, returns 0.
- * @return position in node sibling list
- * @see jj.api.html.jsoup.nodes.Element#elementSiblingIndex()
- */
- int siblingIndex();
-
- /**
- Get the outer HTML of this node.
- @return HTML
- */
- String outerHtml();
-
- String toString();
-
- boolean equals(Object o);
-
- int hashCode();
-
- /**
- * Create a stand-alone, deep copy of this node, and all of its children. The cloned node will have no siblings or
- * parent node. As a stand-alone object, any changes made to the clone or any of its children will not impact the
- * original node.
- * <p>
- * The cloned node may be adopted into another Document or node structure using {@link Element#appendChild(Node)}.
- * @return stand-alone cloned node
- */
- Node clone();
-
-}
View
56 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/Select.java
@@ -1,56 +0,0 @@
-/*
- * Copyright 2012 Jason Miller
- *
- * Licensed 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 jj.api.html;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * Annotates a method be called with a {@link Elements Elements}
- * collection that results from running the supplied selector against the active
- * document, or a
- * </p>
- *
- * <p>
- * Examples:
- * </p>
- * <pre>
- * public void doSomething(@Select("div") Elements divs, @Select("body") Element body) {
- * //do something interesting..
- * }
- *
- * @Select("*")
- * public void doSomethingElse(Elements all) {
- * //do something else interesting..
- * }
- * </pre>
- * @author jason
- *
- */
-@Retention(RUNTIME)
-@Target({METHOD, PARAMETER})
-@Documented
-@Inherited
-public @interface Select {
- String value();
-}
View
39 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/html/TextNode.java
@@ -1,39 +0,0 @@
-package jj.api.html;
-
-public interface TextNode extends Node {
-
- /**
- * Get the text content of this text node.
- * @return Unencoded, normalised text.
- * @see TextNode#getWholeText()
- */
- String text();
-
- /**
- * Set the text content of this text node.
- * @param text unencoded text
- * @return this, for chaining
- */
- TextNode text(String text);
-
- /**
- Get the (unencoded) text of this text node, including any newlines and spaces present in the original.
- @return text
- */
- String getWholeText();
-
- /**
- Test if this text node is blank -- that is, empty or only whitespace (including newlines).
- @return true if this document is empty or only whitespace, false if it contains any text content.
- */
- boolean isBlank();
-
- /**
- * Split this text node into two nodes at the specified string offset. After splitting, this node will contain the
- * original text up to the offset, and will have a new text node sibling containing the text after the offset.
- * @param offset string offset point to split node at.
- * @return the newly created text node containing the text after the offset.
- */
- TextNode splitText(int offset);
-
-}
View
20 JibbrJabbr-server/JibbrJabbr-api/src/main/java/jj/api/package-info.java
@@ -1,20 +0,0 @@
-/**
- * <p>
- * Defines the interface to running inside the JibbrJabbr container. There
- * are several considerations in the design of this API
- * <p>
- * <ol>
- * <li>Simple to use, easy to understand. Hopefully.</li>
- * <li>Nothing to extend or implement. The inheritance hierarchy of your
- * application is totally under your control. JibbrJabbr interacts with
- * your application through convention and the use of annotations.
- * </li>
- * <li>System internals are hidden. There is no way to use this
- * API to divine what is happening behind the scenes. Hopefully this
- * will help to ease migration across versions and avoid any
- * leakage of abstractions. This implies that once functionality appears
- * here, it never goes away. There should only be additions to the API.
- * </li>
- * </ol>
- */
-package jj.api;
View
11 JibbrJabbr-server/JibbrJabbr-api/src/main/resources/jj/api/VERSION
@@ -1,11 +0,0 @@
-${friendlyname}
-${version}
-${git.branch}
-${git.commit.user.name}
-${git.commit.user.email}
-${git.commit.id}
-${git.commit.id.describe}
-${git.commit.time}
-${git.build.user.name}
-${git.build.user.email}
-${git.build.time}
View
27 JibbrJabbr-server/JibbrJabbr-api/src/test/java/jj/api/VersionTest.java
@@ -1,27 +0,0 @@
-package jj.api;
-
-import static org.junit.Assert.*;
-import static org.hamcrest.CoreMatchers.*;
-
-import org.junit.Test;
-
-
-public class VersionTest {
-
- @Test
- public void testVersionClass() {
- // more or less if this doesn't throw exceptions
- // and these values aren't null, we're golden
- assertThat(Version.name, is(not(nullValue())));
- assertThat(Version.version, is(not(nullValue())));
- assertThat(Version.branchName, is(not(nullValue())));
- assertThat(Version.commitId, is(not(nullValue())));
- assertThat(Version.commitDescription, is(not(nullValue())));
- assertThat(Version.commitUserName, is(not(nullValue())));
- assertThat(Version.commitUserEmail, is(not(nullValue())));
- assertThat(Version.commitDate, is(not(nullValue())));
- assertThat(Version.buildUserName, is(not(nullValue())));
- assertThat(Version.buildUserEmail, is(not(nullValue())));
- assertThat(Version.buildDate, is(not(nullValue())));
- }
-}
View
39 JibbrJabbr-server/JibbrJabbr-bootstrapper/src/main/java/jj/JJ.java
@@ -39,7 +39,7 @@
*/
public final class JJ {
- private static final String JJ_KERNEL_CLASS = "jj.Kernel";
+ private static final String JJ_MAIN_CLASS = "jj.Main";
private static final String COMMONS_DAEMON_PROCESS_ID_KEY = "commons.daemon.process.id";
@@ -121,14 +121,27 @@ public static Path jarForClass(Class<?> clazz) {
public static void main(String[] args)
throws Exception {
try {
- new JJ(true).init(args);
+ final JJ jj = new JJ(true).init(args);
+
+ jj.start();
+
+ Runtime.getRuntime().addShutdownHook(new Thread() {
+ public void run() {
+ try {
+ jj.stop();
+ } catch (Exception e) {
+ // kablizzle
+ e.printStackTrace();
+ }
+ }
+ });
} catch (IllegalStateException ise) {
ise.printStackTrace();
}
}
- private Class<?> kernelClass;
- private Object kernelInstance;
+ private Class<?> mainClass;
+ private Object mainInstance;
private boolean daemonStart = System.getProperty(COMMONS_DAEMON_PROCESS_ID_KEY) != null;
public JJ() {
@@ -178,7 +191,7 @@ private boolean processBootstrapArgs(String[] args) {
private BootstrapInstaller installer;
- public void init(String[] args) throws Exception {
+ public JJ init(String[] args) throws Exception {
if (initialized) {
throw new IllegalStateException("Already run once.");
}
@@ -186,9 +199,9 @@ public void init(String[] args) throws Exception {
if (myJarPath != null) {
installer = new BootstrapInstaller(myJarPath);
- if (processBootstrapArgs(args) && !daemonStart) return;
+ if (processBootstrapArgs(args) && !daemonStart) return this;
- kernelClass = new BootstrapClassLoader(installer.libPath).loadClass(JJ_KERNEL_CLASS);
+ mainClass = new BootstrapClassLoader(installer.libPath).loadClass(JJ_MAIN_CLASS);
} else {
System.out.println("⟾⟾⟾⟾ ⟾⟾ ⟾⟾ ⟾⟾ ⟾⟾ ⟾⟾ ⟾⟾ ⟾⟾ ⟾⟾");
@@ -199,22 +212,24 @@ public void init(String[] args) throws Exception {
System.out.println("⟾⟾");
System.out.println("⟾⟾⟾⟾ ⟾⟾ ⟾⟾ ⟾⟾ ⟾⟾ ⟾⟾ ⟾⟾ ⟾⟾ ⟾⟾");
- return;
+ return this;
}
- kernelInstance = kernelClass.getConstructor(args.getClass(), Boolean.TYPE).newInstance(args, daemonStart);
+ mainInstance = mainClass.getConstructor(args.getClass(), Boolean.TYPE).newInstance(args, daemonStart);
+
+ return this;
}
public void start() throws Exception {
- kernelClass.getMethod("start").invoke(kernelInstance);
+ mainClass.getMethod("start").invoke(mainInstance);
}
public void stop() throws Exception {
- kernelClass.getMethod("stop").invoke(kernelInstance);
+ mainClass.getMethod("stop").invoke(mainInstance);
}
public void destroy() {
try {
- kernelClass.getMethod("dispose").invoke(kernelInstance);
+ mainClass.getMethod("dispose").invoke(mainInstance);
} catch (Exception e) {
System.err.println("Trouble shutting down");
e.printStackTrace();
View
81 JibbrJabbr-server/JibbrJabbr-kernel/pom.xml
@@ -10,87 +10,56 @@
<name>JibbrJabbr Kernel</name>
<dependencies>
<dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>JibbrJabbr-api</artifactId>
+ <artifactId>netty</artifactId>
+ <groupId>io.netty</groupId>
</dependency>
<dependency>
- <!-- not ideal. need to refactor the particulars into a utility
- or just bite the bullet and duplicate the code, the bootstrapper
- is special anyway -->
- <groupId>${project.groupId}</groupId>
- <artifactId>JibbrJabbr-bootstrapper</artifactId>
+ <groupId>org.webbitserver</groupId>
+ <artifactId>webbit</artifactId>
</dependency>
<dependency>
- <groupId>org.jsoup</groupId>
- <artifactId>jsoup</artifactId>
+ <groupId>org.mozilla</groupId>
+ <artifactId>rhino</artifactId>
</dependency>
<dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty</artifactId>
+ <groupId>org.jsoup</groupId>
+ <artifactId>jsoup</artifactId>
</dependency>
<dependency>
- <groupId>org.picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-ext</artifactId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>net.jcip</groupId>
- <artifactId>jcip-annotations</artifactId>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
</dependency>
<dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm</artifactId>
+ <groupId>org.picocontainer</groupId>
+ <artifactId>picocontainer</artifactId>
</dependency>
<dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm-util</artifactId>
+ <groupId>com.ning</groupId>
+ <artifactId>async-http-client-netty-provider</artifactId>
</dependency>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit-dep</artifactId>
- <scope>test</scope>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock-junit4</artifactId>
</dependency>
<dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <scope>test</scope>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
</dependency>
<dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <scope>test</scope>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
</dependency>
<dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>clamwhores.com</artifactId>
- <scope>test</scope>
+ <groupId>com.jibbrjabbr</groupId>
+ <artifactId>JibbrJabbr-bootstrapper</artifactId>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>ch.qos.cal10n.plugins</groupId>
- <artifactId>maven-cal10n-plugin</artifactId>
- <version>0.7.4</version>
- <executions>
- <execution>
- <id>verify-message-integrity</id>
- <phase>verify</phase>
- <goals>
- <goal>verify</goal>
- </goals>
- <configuration>
- <enumTypes>
- <!-- list every enum type you would like to see checked -->
- <enumType>jj.KernelMessages</enumType>
- </enumTypes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
</project>
View
58 JibbrJabbr-server/JibbrJabbr-kernel/src/main/java/jj/APIClassLoader.java
@@ -1,58 +0,0 @@
-/*
- * Copyright 2012 Jason Miller
- *
- * Licensed 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.
</