ribit 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (650) hide show
  1. data/INSTALL +52 -0
  2. data/LICENSE +343 -0
  3. data/README +42 -0
  4. data/bin/ribit +26 -0
  5. data/bin/ribit-setup +153 -0
  6. data/bin/ribitd +18 -0
  7. data/doc/TODO.txt +207 -0
  8. data/doc/devdiary.txt +258 -0
  9. data/doc/diagrams/content-classes.dia +0 -0
  10. data/doc/diagrams/main-classes.dia +0 -0
  11. data/doc/diagrams/page-rendering-classes.dia +0 -0
  12. data/doc/diagrams/ribitservlet-classes.dia +0 -0
  13. data/doc/examples/xhtml-example.html +64 -0
  14. data/doc/notes.txt +7 -0
  15. data/doc/rdoc/classes/ActionAdapter.html +137 -0
  16. data/doc/rdoc/classes/ActionAdapter.src/M000160.html +26 -0
  17. data/doc/rdoc/classes/ActionElement.html +179 -0
  18. data/doc/rdoc/classes/ActionElement.src/M000204.html +19 -0
  19. data/doc/rdoc/classes/ActionElement.src/M000205.html +18 -0
  20. data/doc/rdoc/classes/ActionManager.html +187 -0
  21. data/doc/rdoc/classes/ActionManager.src/M000237.html +19 -0
  22. data/doc/rdoc/classes/ActionManager.src/M000238.html +22 -0
  23. data/doc/rdoc/classes/ActionManager.src/M000239.html +22 -0
  24. data/doc/rdoc/classes/ActionManager.src/M000240.html +23 -0
  25. data/doc/rdoc/classes/Assert.html +229 -0
  26. data/doc/rdoc/classes/Assert.src/M000369.html +20 -0
  27. data/doc/rdoc/classes/Assert.src/M000370.html +18 -0
  28. data/doc/rdoc/classes/Assert.src/M000371.html +20 -0
  29. data/doc/rdoc/classes/Assert.src/M000372.html +18 -0
  30. data/doc/rdoc/classes/Assert.src/M000373.html +20 -0
  31. data/doc/rdoc/classes/Assert.src/M000374.html +18 -0
  32. data/doc/rdoc/classes/Assert.src/M000375.html +22 -0
  33. data/doc/rdoc/classes/Assert/AssertionFailedException.html +117 -0
  34. data/doc/rdoc/classes/BaseTag.html +166 -0
  35. data/doc/rdoc/classes/BaseTag.src/M000049.html +20 -0
  36. data/doc/rdoc/classes/BoldContainer.html +139 -0
  37. data/doc/rdoc/classes/BoldContainer.src/M000164.html +18 -0
  38. data/doc/rdoc/classes/BoldParser.html +156 -0
  39. data/doc/rdoc/classes/BoldParser.src/M000247.html +18 -0
  40. data/doc/rdoc/classes/BoldParser.src/M000248.html +18 -0
  41. data/doc/rdoc/classes/CachedPage.html +187 -0
  42. data/doc/rdoc/classes/CachedPage.src/M000244.html +20 -0
  43. data/doc/rdoc/classes/CachedPage.src/M000245.html +27 -0
  44. data/doc/rdoc/classes/CachedPage.src/M000246.html +18 -0
  45. data/doc/rdoc/classes/CancelAction.html +179 -0
  46. data/doc/rdoc/classes/CancelAction.src/M000165.html +22 -0
  47. data/doc/rdoc/classes/CancelAction.src/M000166.html +20 -0
  48. data/doc/rdoc/classes/CancelAction.src/M000167.html +21 -0
  49. data/doc/rdoc/classes/CancelCategoryAction.html +164 -0
  50. data/doc/rdoc/classes/CancelCategoryAction.src/M000115.html +22 -0
  51. data/doc/rdoc/classes/CancelCategoryAction.src/M000116.html +20 -0
  52. data/doc/rdoc/classes/CategoriesPage.html +212 -0
  53. data/doc/rdoc/classes/CategoriesPage.src/M000232.html +27 -0
  54. data/doc/rdoc/classes/CategoriesPage.src/M000233.html +18 -0
  55. data/doc/rdoc/classes/CategoriesPage.src/M000234.html +73 -0
  56. data/doc/rdoc/classes/CategoriesPage.src/M000235.html +29 -0
  57. data/doc/rdoc/classes/CategoriesPage.src/M000236.html +59 -0
  58. data/doc/rdoc/classes/CategoryBarActionElement.html +139 -0
  59. data/doc/rdoc/classes/CategoryBarActionElement.src/M000069.html +18 -0
  60. data/doc/rdoc/classes/CategoryBarNextLevelActionElement.html +139 -0
  61. data/doc/rdoc/classes/CategoryBarNextLevelActionElement.src/M000026.html +18 -0
  62. data/doc/rdoc/classes/CategoryFormAction.html +169 -0
  63. data/doc/rdoc/classes/CategoryFormAction.src/M000148.html +18 -0
  64. data/doc/rdoc/classes/CategoryFormAction.src/M000149.html +30 -0
  65. data/doc/rdoc/classes/CategoryFormActionAdapter.html +171 -0
  66. data/doc/rdoc/classes/CategoryFormActionAdapter.src/M000112.html +19 -0
  67. data/doc/rdoc/classes/CategoryFormActionAdapter.src/M000113.html +18 -0
  68. data/doc/rdoc/classes/CategoryFormActionAdapter.src/M000114.html +18 -0
  69. data/doc/rdoc/classes/CompositeAction.html +186 -0
  70. data/doc/rdoc/classes/CompositeAction.src/M000119.html +19 -0
  71. data/doc/rdoc/classes/CompositeAction.src/M000120.html +18 -0
  72. data/doc/rdoc/classes/CompositeAction.src/M000121.html +21 -0
  73. data/doc/rdoc/classes/CompositeAction.src/M000122.html +18 -0
  74. data/doc/rdoc/classes/CompositeLinkActionElement.html +156 -0
  75. data/doc/rdoc/classes/CompositeLinkActionElement.src/M000196.html +20 -0
  76. data/doc/rdoc/classes/CompositeLinkActionElement.src/M000197.html +41 -0
  77. data/doc/rdoc/classes/Constants.html +198 -0
  78. data/doc/rdoc/classes/Container.html +281 -0
  79. data/doc/rdoc/classes/Container.src/M000251.html +19 -0
  80. data/doc/rdoc/classes/Container.src/M000252.html +18 -0
  81. data/doc/rdoc/classes/Container.src/M000253.html +18 -0
  82. data/doc/rdoc/classes/Container.src/M000254.html +18 -0
  83. data/doc/rdoc/classes/Container.src/M000255.html +27 -0
  84. data/doc/rdoc/classes/Container.src/M000256.html +18 -0
  85. data/doc/rdoc/classes/Container.src/M000257.html +18 -0
  86. data/doc/rdoc/classes/Container.src/M000258.html +18 -0
  87. data/doc/rdoc/classes/Container.src/M000259.html +18 -0
  88. data/doc/rdoc/classes/Container.src/M000260.html +23 -0
  89. data/doc/rdoc/classes/ContentDoc.html +236 -0
  90. data/doc/rdoc/classes/ContentDoc.src/M000129.html +22 -0
  91. data/doc/rdoc/classes/ContentDoc.src/M000130.html +18 -0
  92. data/doc/rdoc/classes/ContentDoc.src/M000131.html +20 -0
  93. data/doc/rdoc/classes/ContentDoc.src/M000132.html +18 -0
  94. data/doc/rdoc/classes/ContentDoc.src/M000133.html +18 -0
  95. data/doc/rdoc/classes/ContentDoc.src/M000134.html +18 -0
  96. data/doc/rdoc/classes/ContentDoc.src/M000135.html +18 -0
  97. data/doc/rdoc/classes/ContentParser.html +176 -0
  98. data/doc/rdoc/classes/ContentParser.src/M000176.html +30 -0
  99. data/doc/rdoc/classes/ContentParser.src/M000177.html +28 -0
  100. data/doc/rdoc/classes/ContentParser.src/M000178.html +55 -0
  101. data/doc/rdoc/classes/CurrentList.html +209 -0
  102. data/doc/rdoc/classes/CurrentList.src/M000228.html +19 -0
  103. data/doc/rdoc/classes/CurrentList.src/M000229.html +18 -0
  104. data/doc/rdoc/classes/CurrentList.src/M000230.html +18 -0
  105. data/doc/rdoc/classes/CurrentList.src/M000231.html +18 -0
  106. data/doc/rdoc/classes/DataContainer.html +234 -0
  107. data/doc/rdoc/classes/DataContainer.src/M000101.html +26 -0
  108. data/doc/rdoc/classes/DataContainer.src/M000102.html +24 -0
  109. data/doc/rdoc/classes/DataContainer.src/M000103.html +23 -0
  110. data/doc/rdoc/classes/DataContainer.src/M000104.html +26 -0
  111. data/doc/rdoc/classes/DataContainer.src/M000105.html +22 -0
  112. data/doc/rdoc/classes/DataContainer.src/M000106.html +18 -0
  113. data/doc/rdoc/classes/DataStorage.html +199 -0
  114. data/doc/rdoc/classes/DataStorage.src/M000031.html +23 -0
  115. data/doc/rdoc/classes/DataStorage.src/M000032.html +36 -0
  116. data/doc/rdoc/classes/DataStorage.src/M000033.html +25 -0
  117. data/doc/rdoc/classes/DataStorage.src/M000034.html +30 -0
  118. data/doc/rdoc/classes/DataStorage.src/M000035.html +21 -0
  119. data/doc/rdoc/classes/DefaultAction.html +187 -0
  120. data/doc/rdoc/classes/DefaultAction.src/M000014.html +23 -0
  121. data/doc/rdoc/classes/DefaultAction.src/M000015.html +36 -0
  122. data/doc/rdoc/classes/DefaultAction.src/M000016.html +38 -0
  123. data/doc/rdoc/classes/DefaultLoggerFactory.html +140 -0
  124. data/doc/rdoc/classes/DefaultLoggerFactory.src/M000169.html +19 -0
  125. data/doc/rdoc/classes/DirectLinkContainer.html +156 -0
  126. data/doc/rdoc/classes/DirectLinkContainer.src/M000209.html +19 -0
  127. data/doc/rdoc/classes/DirectLinkContainer.src/M000210.html +18 -0
  128. data/doc/rdoc/classes/DirectLinkParser.html +137 -0
  129. data/doc/rdoc/classes/DirectLinkParser.src/M000168.html +39 -0
  130. data/doc/rdoc/classes/DivTag.html +150 -0
  131. data/doc/rdoc/classes/DivTag.src/M000030.html +19 -0
  132. data/doc/rdoc/classes/EditAction.html +177 -0
  133. data/doc/rdoc/classes/EditAction.src/M000056.html +24 -0
  134. data/doc/rdoc/classes/EditAction.src/M000057.html +64 -0
  135. data/doc/rdoc/classes/EditActionAdapter.html +139 -0
  136. data/doc/rdoc/classes/EditActionAdapter.src/M000002.html +20 -0
  137. data/doc/rdoc/classes/EditCategoryAction.html +176 -0
  138. data/doc/rdoc/classes/EditCategoryAction.src/M000126.html +24 -0
  139. data/doc/rdoc/classes/EditCategoryAction.src/M000127.html +39 -0
  140. data/doc/rdoc/classes/EditCategoryActionAdapter.html +139 -0
  141. data/doc/rdoc/classes/EditCategoryActionAdapter.src/M000021.html +20 -0
  142. data/doc/rdoc/classes/EditCategoryPage.html +242 -0
  143. data/doc/rdoc/classes/EditCategoryPage.src/M000036.html +29 -0
  144. data/doc/rdoc/classes/EditCategoryPage.src/M000037.html +18 -0
  145. data/doc/rdoc/classes/EditCategoryPage.src/M000038.html +18 -0
  146. data/doc/rdoc/classes/EditCategoryPage.src/M000039.html +18 -0
  147. data/doc/rdoc/classes/EditCategoryPage.src/M000040.html +109 -0
  148. data/doc/rdoc/classes/EditCategoryPage.src/M000041.html +60 -0
  149. data/doc/rdoc/classes/EditCategoryPage.src/M000042.html +29 -0
  150. data/doc/rdoc/classes/EditNewActionAdapter.html +156 -0
  151. data/doc/rdoc/classes/EditNewActionAdapter.src/M000220.html +20 -0
  152. data/doc/rdoc/classes/EditNewActionAdapter.src/M000221.html +23 -0
  153. data/doc/rdoc/classes/EditPage.html +212 -0
  154. data/doc/rdoc/classes/EditPage.src/M000064.html +33 -0
  155. data/doc/rdoc/classes/EditPage.src/M000065.html +18 -0
  156. data/doc/rdoc/classes/EditPage.src/M000066.html +18 -0
  157. data/doc/rdoc/classes/EditPage.src/M000067.html +18 -0
  158. data/doc/rdoc/classes/EditPage.src/M000068.html +112 -0
  159. data/doc/rdoc/classes/EmphasisContainer.html +156 -0
  160. data/doc/rdoc/classes/EmphasisContainer.src/M000003.html +20 -0
  161. data/doc/rdoc/classes/EmphasisContainer.src/M000004.html +19 -0
  162. data/doc/rdoc/classes/EmphasisParser.html +176 -0
  163. data/doc/rdoc/classes/EmphasisParser.src/M000076.html +19 -0
  164. data/doc/rdoc/classes/EmphasisParser.src/M000077.html +18 -0
  165. data/doc/rdoc/classes/EmphasisParser.src/M000078.html +45 -0
  166. data/doc/rdoc/classes/EscapeParser.html +137 -0
  167. data/doc/rdoc/classes/EscapeParser.src/M000150.html +26 -0
  168. data/doc/rdoc/classes/ExpireMetaTag.html +139 -0
  169. data/doc/rdoc/classes/ExpireMetaTag.src/M000241.html +18 -0
  170. data/doc/rdoc/classes/FilePersistentStorageHandler.html +207 -0
  171. data/doc/rdoc/classes/FilePersistentStorageHandler.src/M000215.html +27 -0
  172. data/doc/rdoc/classes/FilePersistentStorageHandler.src/M000216.html +21 -0
  173. data/doc/rdoc/classes/FilePersistentStorageHandler.src/M000217.html +19 -0
  174. data/doc/rdoc/classes/FilePersistentStorageHandler.src/M000218.html +19 -0
  175. data/doc/rdoc/classes/FilePersistentStorageHandler.src/M000219.html +20 -0
  176. data/doc/rdoc/classes/FormAction.html +169 -0
  177. data/doc/rdoc/classes/FormAction.src/M000081.html +18 -0
  178. data/doc/rdoc/classes/FormAction.src/M000082.html +30 -0
  179. data/doc/rdoc/classes/FormActionAdapter.html +171 -0
  180. data/doc/rdoc/classes/FormActionAdapter.src/M000086.html +19 -0
  181. data/doc/rdoc/classes/FormActionAdapter.src/M000087.html +18 -0
  182. data/doc/rdoc/classes/FormActionAdapter.src/M000088.html +18 -0
  183. data/doc/rdoc/classes/FormActionElement.html +169 -0
  184. data/doc/rdoc/classes/FormActionElement.src/M000044.html +18 -0
  185. data/doc/rdoc/classes/FormActionElement.src/M000045.html +18 -0
  186. data/doc/rdoc/classes/FormActionElement.src/M000046.html +23 -0
  187. data/doc/rdoc/classes/FormInputTag.html +165 -0
  188. data/doc/rdoc/classes/FormInputTag.src/M000161.html +21 -0
  189. data/doc/rdoc/classes/HiddenFormInputTag.html +139 -0
  190. data/doc/rdoc/classes/HiddenFormInputTag.src/M000027.html +18 -0
  191. data/doc/rdoc/classes/IDataStorage.html +170 -0
  192. data/doc/rdoc/classes/IDataStorage.src/M000382.html +18 -0
  193. data/doc/rdoc/classes/IDataStorage.src/M000383.html +18 -0
  194. data/doc/rdoc/classes/IDataStorage.src/M000384.html +18 -0
  195. data/doc/rdoc/classes/ItalicContainer.html +139 -0
  196. data/doc/rdoc/classes/ItalicContainer.src/M000128.html +18 -0
  197. data/doc/rdoc/classes/ItalicParser.html +156 -0
  198. data/doc/rdoc/classes/ItalicParser.src/M000207.html +18 -0
  199. data/doc/rdoc/classes/ItalicParser.src/M000208.html +18 -0
  200. data/doc/rdoc/classes/LinkActionElement.html +184 -0
  201. data/doc/rdoc/classes/LinkActionElement.src/M000005.html +18 -0
  202. data/doc/rdoc/classes/LinkActionElement.src/M000006.html +18 -0
  203. data/doc/rdoc/classes/LinkActionElement.src/M000007.html +18 -0
  204. data/doc/rdoc/classes/LinkActionElement.src/M000008.html +18 -0
  205. data/doc/rdoc/classes/LinkTag.html +187 -0
  206. data/doc/rdoc/classes/LinkTag.src/M000153.html +34 -0
  207. data/doc/rdoc/classes/LinkTag.src/M000154.html +18 -0
  208. data/doc/rdoc/classes/LinkTag.src/M000155.html +20 -0
  209. data/doc/rdoc/classes/ListContainer.html +156 -0
  210. data/doc/rdoc/classes/ListContainer.src/M000174.html +18 -0
  211. data/doc/rdoc/classes/ListContainer.src/M000175.html +19 -0
  212. data/doc/rdoc/classes/ListItemContainer.html +156 -0
  213. data/doc/rdoc/classes/ListItemContainer.src/M000028.html +19 -0
  214. data/doc/rdoc/classes/ListItemContainer.src/M000029.html +19 -0
  215. data/doc/rdoc/classes/ListParser.html +144 -0
  216. data/doc/rdoc/classes/ListParser.src/M000195.html +147 -0
  217. data/doc/rdoc/classes/ListParserUtils.html +141 -0
  218. data/doc/rdoc/classes/ListParserUtils.src/M000385.html +23 -0
  219. data/doc/rdoc/classes/Localization.html +209 -0
  220. data/doc/rdoc/classes/Localization.src/M000311.html +40 -0
  221. data/doc/rdoc/classes/Localization.src/M000312.html +23 -0
  222. data/doc/rdoc/classes/Log4r.html +111 -0
  223. data/doc/rdoc/classes/Log4r/ExtendedRollingFileOutputter.html +178 -0
  224. data/doc/rdoc/classes/Log4r/ExtendedRollingFileOutputter.src/M000380.html +25 -0
  225. data/doc/rdoc/classes/Log4r/ExtendedRollingFileOutputter.src/M000381.html +33 -0
  226. data/doc/rdoc/classes/LoggerFactory.html +152 -0
  227. data/doc/rdoc/classes/LoggerFactory.src/M000062.html +22 -0
  228. data/doc/rdoc/classes/LoggerFactory.src/M000063.html +18 -0
  229. data/doc/rdoc/classes/MetaTag.html +166 -0
  230. data/doc/rdoc/classes/MetaTag.src/M000118.html +20 -0
  231. data/doc/rdoc/classes/NoCacheMetaTag.html +139 -0
  232. data/doc/rdoc/classes/NoCacheMetaTag.src/M000043.html +18 -0
  233. data/doc/rdoc/classes/PageRequest.html +259 -0
  234. data/doc/rdoc/classes/PageRequest.src/M000179.html +20 -0
  235. data/doc/rdoc/classes/PageRequest.src/M000180.html +18 -0
  236. data/doc/rdoc/classes/PageRequest.src/M000181.html +18 -0
  237. data/doc/rdoc/classes/PageRequest.src/M000182.html +18 -0
  238. data/doc/rdoc/classes/PageRequest.src/M000183.html +19 -0
  239. data/doc/rdoc/classes/PageRequest.src/M000184.html +23 -0
  240. data/doc/rdoc/classes/PageRequest.src/M000185.html +23 -0
  241. data/doc/rdoc/classes/PageRequest.src/M000186.html +19 -0
  242. data/doc/rdoc/classes/PageRequest.src/M000187.html +18 -0
  243. data/doc/rdoc/classes/PageResponse.html +250 -0
  244. data/doc/rdoc/classes/PageResponse.src/M000092.html +18 -0
  245. data/doc/rdoc/classes/PageResponse.src/M000093.html +18 -0
  246. data/doc/rdoc/classes/PageResponse.src/M000094.html +18 -0
  247. data/doc/rdoc/classes/PageResponse.src/M000095.html +18 -0
  248. data/doc/rdoc/classes/PageResponse.src/M000096.html +18 -0
  249. data/doc/rdoc/classes/PageResponse.src/M000097.html +18 -0
  250. data/doc/rdoc/classes/PageResponse.src/M000098.html +18 -0
  251. data/doc/rdoc/classes/PageResponse.src/M000099.html +18 -0
  252. data/doc/rdoc/classes/ParagraphContainer.html +156 -0
  253. data/doc/rdoc/classes/ParagraphContainer.src/M000158.html +19 -0
  254. data/doc/rdoc/classes/ParagraphContainer.src/M000159.html +24 -0
  255. data/doc/rdoc/classes/ParagraphParser.html +137 -0
  256. data/doc/rdoc/classes/ParagraphParser.src/M000151.html +42 -0
  257. data/doc/rdoc/classes/PersistentStorageHandler.html +182 -0
  258. data/doc/rdoc/classes/PersistentStorageHandler.src/M000376.html +18 -0
  259. data/doc/rdoc/classes/PersistentStorageHandler.src/M000377.html +18 -0
  260. data/doc/rdoc/classes/PersistentStorageHandler.src/M000378.html +18 -0
  261. data/doc/rdoc/classes/PersistentStorageHandler.src/M000379.html +18 -0
  262. data/doc/rdoc/classes/Pid.html +182 -0
  263. data/doc/rdoc/classes/Pid.src/M000083.html +18 -0
  264. data/doc/rdoc/classes/Pid.src/M000084.html +24 -0
  265. data/doc/rdoc/classes/Pid.src/M000085.html +18 -0
  266. data/doc/rdoc/classes/Properties.html +184 -0
  267. data/doc/rdoc/classes/Properties.src/M000058.html +18 -0
  268. data/doc/rdoc/classes/Properties.src/M000059.html +18 -0
  269. data/doc/rdoc/classes/Properties.src/M000060.html +18 -0
  270. data/doc/rdoc/classes/Properties.src/M000061.html +27 -0
  271. data/doc/rdoc/classes/PropertyList.html +187 -0
  272. data/doc/rdoc/classes/PropertyList.src/M000017.html +19 -0
  273. data/doc/rdoc/classes/PropertyList.src/M000018.html +23 -0
  274. data/doc/rdoc/classes/PropertyList.src/M000019.html +23 -0
  275. data/doc/rdoc/classes/PropertyList.src/M000020.html +18 -0
  276. data/doc/rdoc/classes/RawAttribute.html +154 -0
  277. data/doc/rdoc/classes/RawAttribute.src/M000249.html +20 -0
  278. data/doc/rdoc/classes/RawAttribute.src/M000250.html +21 -0
  279. data/doc/rdoc/classes/RawPage.html +171 -0
  280. data/doc/rdoc/classes/RawPage.src/M000107.html +19 -0
  281. data/doc/rdoc/classes/RawPage.src/M000108.html +18 -0
  282. data/doc/rdoc/classes/RawPage.src/M000109.html +18 -0
  283. data/doc/rdoc/classes/ReferenceLinkContainer.html +156 -0
  284. data/doc/rdoc/classes/ReferenceLinkContainer.src/M000213.html +20 -0
  285. data/doc/rdoc/classes/ReferenceLinkContainer.src/M000214.html +19 -0
  286. data/doc/rdoc/classes/Ribit.html +124 -0
  287. data/doc/rdoc/classes/Ribit/ContentStore.html +236 -0
  288. data/doc/rdoc/classes/Ribit/ContentStore.src/M000304.html +23 -0
  289. data/doc/rdoc/classes/Ribit/ContentStore.src/M000305.html +29 -0
  290. data/doc/rdoc/classes/Ribit/ContentStore.src/M000306.html +25 -0
  291. data/doc/rdoc/classes/Ribit/ContentStore.src/M000307.html +49 -0
  292. data/doc/rdoc/classes/Ribit/ContentStore.src/M000308.html +18 -0
  293. data/doc/rdoc/classes/Ribit/ContentStore.src/M000309.html +73 -0
  294. data/doc/rdoc/classes/Ribit/ContentStore.src/M000310.html +51 -0
  295. data/doc/rdoc/classes/Ribit/FileWriter.html +162 -0
  296. data/doc/rdoc/classes/Ribit/FileWriter.src/M000289.html +19 -0
  297. data/doc/rdoc/classes/Ribit/FileWriter.src/M000290.html +32 -0
  298. data/doc/rdoc/classes/Ribit/Repository.html +174 -0
  299. data/doc/rdoc/classes/Ribit/Repository.src/M000276.html +18 -0
  300. data/doc/rdoc/classes/Ribit/Repository.src/M000277.html +18 -0
  301. data/doc/rdoc/classes/Ribit/Repository.src/M000278.html +18 -0
  302. data/doc/rdoc/classes/Ribit/RibitLogger.html +137 -0
  303. data/doc/rdoc/classes/Ribit/RibitLogger.src/M000301.html +18 -0
  304. data/doc/rdoc/classes/Ribit/RibitLoggerConfig.html +182 -0
  305. data/doc/rdoc/classes/Ribit/RibitLoggerConfig.src/M000279.html +18 -0
  306. data/doc/rdoc/classes/Ribit/RibitLoggerConfig.src/M000280.html +23 -0
  307. data/doc/rdoc/classes/Ribit/RibitLoggerConfig.src/M000281.html +21 -0
  308. data/doc/rdoc/classes/Ribit/RibitLoggerConfig.src/M000282.html +18 -0
  309. data/doc/rdoc/classes/Ribit/RibitLoggerFactory.html +154 -0
  310. data/doc/rdoc/classes/Ribit/RibitLoggerFactory.src/M000287.html +18 -0
  311. data/doc/rdoc/classes/Ribit/RibitLoggerFactory.src/M000288.html +25 -0
  312. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.html +229 -0
  313. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000294.html +26 -0
  314. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000295.html +18 -0
  315. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000296.html +18 -0
  316. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000297.html +18 -0
  317. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000298.html +18 -0
  318. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000299.html +18 -0
  319. data/doc/rdoc/classes/Ribit/RibitLoggerImpl.src/M000300.html +18 -0
  320. data/doc/rdoc/classes/Ribit/RibitLoggerWrapper.html +210 -0
  321. data/doc/rdoc/classes/Ribit/RibitLoggerWrapper.src/M000291.html +20 -0
  322. data/doc/rdoc/classes/Ribit/RibitLoggerWrapper.src/M000292.html +32 -0
  323. data/doc/rdoc/classes/Ribit/RibitLoggerWrapper.src/M000293.html +18 -0
  324. data/doc/rdoc/classes/Ribit/Writer.html +163 -0
  325. data/doc/rdoc/classes/Ribit/Writer.src/M000302.html +18 -0
  326. data/doc/rdoc/classes/Ribit/Writer.src/M000303.html +21 -0
  327. data/doc/rdoc/classes/RibitConfig.html +247 -0
  328. data/doc/rdoc/classes/RibitConfig.src/M000072.html +32 -0
  329. data/doc/rdoc/classes/RibitConfig.src/M000073.html +18 -0
  330. data/doc/rdoc/classes/RibitConfig.src/M000074.html +18 -0
  331. data/doc/rdoc/classes/RibitConfig.src/M000075.html +18 -0
  332. data/doc/rdoc/classes/RibitConfigParser.html +140 -0
  333. data/doc/rdoc/classes/RibitConfigParser.src/M000117.html +45 -0
  334. data/doc/rdoc/classes/RibitData.html +128 -0
  335. data/doc/rdoc/classes/RibitData/CategoriesWriter.html +169 -0
  336. data/doc/rdoc/classes/RibitData/CategoriesWriter.src/M000338.html +18 -0
  337. data/doc/rdoc/classes/RibitData/CategoriesWriter.src/M000339.html +27 -0
  338. data/doc/rdoc/classes/RibitData/CategoriesWriter.src/M000340.html +24 -0
  339. data/doc/rdoc/classes/RibitData/Category.html +485 -0
  340. data/doc/rdoc/classes/RibitData/Category.src/M000313.html +27 -0
  341. data/doc/rdoc/classes/RibitData/Category.src/M000314.html +36 -0
  342. data/doc/rdoc/classes/RibitData/Category.src/M000315.html +22 -0
  343. data/doc/rdoc/classes/RibitData/Category.src/M000316.html +18 -0
  344. data/doc/rdoc/classes/RibitData/Category.src/M000317.html +18 -0
  345. data/doc/rdoc/classes/RibitData/Category.src/M000318.html +18 -0
  346. data/doc/rdoc/classes/RibitData/Category.src/M000319.html +18 -0
  347. data/doc/rdoc/classes/RibitData/Category.src/M000320.html +18 -0
  348. data/doc/rdoc/classes/RibitData/Category.src/M000321.html +18 -0
  349. data/doc/rdoc/classes/RibitData/Category.src/M000322.html +18 -0
  350. data/doc/rdoc/classes/RibitData/Category.src/M000323.html +18 -0
  351. data/doc/rdoc/classes/RibitData/Category.src/M000324.html +18 -0
  352. data/doc/rdoc/classes/RibitData/Category.src/M000325.html +18 -0
  353. data/doc/rdoc/classes/RibitData/Category.src/M000326.html +18 -0
  354. data/doc/rdoc/classes/RibitData/Category.src/M000327.html +36 -0
  355. data/doc/rdoc/classes/RibitData/Category.src/M000328.html +18 -0
  356. data/doc/rdoc/classes/RibitData/Category.src/M000329.html +48 -0
  357. data/doc/rdoc/classes/RibitData/Category.src/M000330.html +45 -0
  358. data/doc/rdoc/classes/RibitData/Category.src/M000331.html +30 -0
  359. data/doc/rdoc/classes/RibitData/Category.src/M000332.html +25 -0
  360. data/doc/rdoc/classes/RibitData/Category.src/M000333.html +18 -0
  361. data/doc/rdoc/classes/RibitData/CategoryParser.html +217 -0
  362. data/doc/rdoc/classes/RibitData/CategoryParser.src/M000357.html +18 -0
  363. data/doc/rdoc/classes/RibitData/CategoryParser.src/M000358.html +29 -0
  364. data/doc/rdoc/classes/RibitData/CategoryParser.src/M000359.html +31 -0
  365. data/doc/rdoc/classes/RibitData/CategoryParser.src/M000360.html +27 -0
  366. data/doc/rdoc/classes/RibitData/CategoryParser.src/M000361.html +45 -0
  367. data/doc/rdoc/classes/RibitData/Page.html +313 -0
  368. data/doc/rdoc/classes/RibitData/Page.src/M000362.html +33 -0
  369. data/doc/rdoc/classes/RibitData/Page.src/M000363.html +22 -0
  370. data/doc/rdoc/classes/RibitData/Page.src/M000364.html +18 -0
  371. data/doc/rdoc/classes/RibitData/Page.src/M000365.html +18 -0
  372. data/doc/rdoc/classes/RibitData/Page.src/M000366.html +18 -0
  373. data/doc/rdoc/classes/RibitData/Page.src/M000367.html +46 -0
  374. data/doc/rdoc/classes/RibitData/Page.src/M000368.html +26 -0
  375. data/doc/rdoc/classes/RibitData/PageParser.html +190 -0
  376. data/doc/rdoc/classes/RibitData/PageParser.src/M000334.html +19 -0
  377. data/doc/rdoc/classes/RibitData/PageParser.src/M000335.html +32 -0
  378. data/doc/rdoc/classes/RibitData/PageParser.src/M000336.html +42 -0
  379. data/doc/rdoc/classes/RibitData/PageParser.src/M000337.html +21 -0
  380. data/doc/rdoc/classes/RibitData/RibitData.html +389 -0
  381. data/doc/rdoc/classes/RibitData/RibitData.src/M000341.html +26 -0
  382. data/doc/rdoc/classes/RibitData/RibitData.src/M000342.html +22 -0
  383. data/doc/rdoc/classes/RibitData/RibitData.src/M000343.html +18 -0
  384. data/doc/rdoc/classes/RibitData/RibitData.src/M000344.html +36 -0
  385. data/doc/rdoc/classes/RibitData/RibitData.src/M000345.html +18 -0
  386. data/doc/rdoc/classes/RibitData/RibitData.src/M000346.html +25 -0
  387. data/doc/rdoc/classes/RibitData/RibitData.src/M000347.html +18 -0
  388. data/doc/rdoc/classes/RibitData/RibitData.src/M000348.html +22 -0
  389. data/doc/rdoc/classes/RibitData/RibitData.src/M000349.html +18 -0
  390. data/doc/rdoc/classes/RibitData/RibitData.src/M000350.html +30 -0
  391. data/doc/rdoc/classes/RibitData/RibitData.src/M000351.html +18 -0
  392. data/doc/rdoc/classes/RibitData/RibitData.src/M000352.html +48 -0
  393. data/doc/rdoc/classes/RibitData/RibitData.src/M000353.html +30 -0
  394. data/doc/rdoc/classes/RibitData/RibitData.src/M000354.html +22 -0
  395. data/doc/rdoc/classes/RibitData/RibitData.src/M000355.html +22 -0
  396. data/doc/rdoc/classes/RibitData/RibitData.src/M000356.html +22 -0
  397. data/doc/rdoc/classes/RibitData/RibitDataException.html +113 -0
  398. data/doc/rdoc/classes/RibitException.html +117 -0
  399. data/doc/rdoc/classes/RibitLinkContainer.html +156 -0
  400. data/doc/rdoc/classes/RibitLinkContainer.src/M000211.html +85 -0
  401. data/doc/rdoc/classes/RibitLinkContainer.src/M000212.html +18 -0
  402. data/doc/rdoc/classes/RibitLinkParser.html +137 -0
  403. data/doc/rdoc/classes/RibitLinkParser.src/M000100.html +50 -0
  404. data/doc/rdoc/classes/RibitServlet.html +196 -0
  405. data/doc/rdoc/classes/RibitServlet.src/M000222.html +37 -0
  406. data/doc/rdoc/classes/RibitServlet.src/M000223.html +53 -0
  407. data/doc/rdoc/classes/RibitServlet.src/M000224.html +39 -0
  408. data/doc/rdoc/classes/RibitServlet.src/M000225.html +19 -0
  409. data/doc/rdoc/classes/RootContainer.html +139 -0
  410. data/doc/rdoc/classes/RootContainer.src/M000206.html +19 -0
  411. data/doc/rdoc/classes/SaveAction.html +164 -0
  412. data/doc/rdoc/classes/SaveAction.src/M000162.html +24 -0
  413. data/doc/rdoc/classes/SaveAction.src/M000163.html +116 -0
  414. data/doc/rdoc/classes/SaveCategoryAction.html +164 -0
  415. data/doc/rdoc/classes/SaveCategoryAction.src/M000047.html +24 -0
  416. data/doc/rdoc/classes/SaveCategoryAction.src/M000048.html +97 -0
  417. data/doc/rdoc/classes/SectionContainer.html +156 -0
  418. data/doc/rdoc/classes/SectionContainer.src/M000070.html +19 -0
  419. data/doc/rdoc/classes/SectionContainer.src/M000071.html +20 -0
  420. data/doc/rdoc/classes/SectionParser.html +137 -0
  421. data/doc/rdoc/classes/SectionParser.src/M000152.html +41 -0
  422. data/doc/rdoc/classes/SelectOptionTag.html +177 -0
  423. data/doc/rdoc/classes/SelectOptionTag.src/M000156.html +22 -0
  424. data/doc/rdoc/classes/SelectOptionTag.src/M000157.html +18 -0
  425. data/doc/rdoc/classes/StyleSheetAction.html +182 -0
  426. data/doc/rdoc/classes/StyleSheetAction.src/M000226.html +31 -0
  427. data/doc/rdoc/classes/StyleSheetAction.src/M000227.html +36 -0
  428. data/doc/rdoc/classes/TextContainer.html +214 -0
  429. data/doc/rdoc/classes/TextContainer.src/M000050.html +19 -0
  430. data/doc/rdoc/classes/TextContainer.src/M000051.html +18 -0
  431. data/doc/rdoc/classes/TextContainer.src/M000052.html +18 -0
  432. data/doc/rdoc/classes/TextContainer.src/M000053.html +18 -0
  433. data/doc/rdoc/classes/TextContainer.src/M000054.html +18 -0
  434. data/doc/rdoc/classes/TextContainer.src/M000055.html +18 -0
  435. data/doc/rdoc/classes/TextPage.html +226 -0
  436. data/doc/rdoc/classes/TextPage.src/M000198.html +29 -0
  437. data/doc/rdoc/classes/TextPage.src/M000199.html +18 -0
  438. data/doc/rdoc/classes/TextPage.src/M000200.html +54 -0
  439. data/doc/rdoc/classes/TextPage.src/M000201.html +36 -0
  440. data/doc/rdoc/classes/TextPage.src/M000202.html +46 -0
  441. data/doc/rdoc/classes/TextPage.src/M000203.html +25 -0
  442. data/doc/rdoc/classes/URL.html +182 -0
  443. data/doc/rdoc/classes/URL.src/M000123.html +24 -0
  444. data/doc/rdoc/classes/URL.src/M000124.html +19 -0
  445. data/doc/rdoc/classes/URL.src/M000125.html +35 -0
  446. data/doc/rdoc/classes/UnformattedContentContainer.html +156 -0
  447. data/doc/rdoc/classes/UnformattedContentContainer.src/M000079.html +20 -0
  448. data/doc/rdoc/classes/UnformattedContentContainer.src/M000080.html +20 -0
  449. data/doc/rdoc/classes/UnformattedContentParser.html +137 -0
  450. data/doc/rdoc/classes/UnformattedContentParser.src/M000194.html +49 -0
  451. data/doc/rdoc/classes/ViewAction.html +221 -0
  452. data/doc/rdoc/classes/ViewAction.src/M000009.html +25 -0
  453. data/doc/rdoc/classes/ViewAction.src/M000010.html +20 -0
  454. data/doc/rdoc/classes/ViewAction.src/M000011.html +77 -0
  455. data/doc/rdoc/classes/ViewAction.src/M000012.html +18 -0
  456. data/doc/rdoc/classes/ViewAction.src/M000013.html +22 -0
  457. data/doc/rdoc/classes/ViewActionAdapter.html +186 -0
  458. data/doc/rdoc/classes/ViewActionAdapter.src/M000022.html +20 -0
  459. data/doc/rdoc/classes/ViewActionAdapter.src/M000023.html +24 -0
  460. data/doc/rdoc/classes/ViewActionAdapter.src/M000024.html +20 -0
  461. data/doc/rdoc/classes/ViewActionAdapter.src/M000025.html +21 -0
  462. data/doc/rdoc/classes/ViewCategoriesAction.html +211 -0
  463. data/doc/rdoc/classes/ViewCategoriesAction.src/M000261.html +25 -0
  464. data/doc/rdoc/classes/ViewCategoriesAction.src/M000262.html +20 -0
  465. data/doc/rdoc/classes/ViewCategoriesAction.src/M000263.html +61 -0
  466. data/doc/rdoc/classes/ViewCategoriesAction.src/M000264.html +22 -0
  467. data/doc/rdoc/classes/ViewCategoriesActionAdapter.html +171 -0
  468. data/doc/rdoc/classes/ViewCategoriesActionAdapter.src/M000089.html +18 -0
  469. data/doc/rdoc/classes/ViewCategoriesActionAdapter.src/M000090.html +24 -0
  470. data/doc/rdoc/classes/ViewCategoriesActionAdapter.src/M000091.html +18 -0
  471. data/doc/rdoc/classes/W3CValidatorLinkActionAdapter.html +156 -0
  472. data/doc/rdoc/classes/W3CValidatorLinkActionAdapter.src/M000110.html +26 -0
  473. data/doc/rdoc/classes/W3CValidatorLinkActionAdapter.src/M000111.html +18 -0
  474. data/doc/rdoc/classes/WebAction.html +165 -0
  475. data/doc/rdoc/classes/WebAction.src/M000242.html +18 -0
  476. data/doc/rdoc/classes/WebAction.src/M000243.html +19 -0
  477. data/doc/rdoc/classes/WebPage.html +184 -0
  478. data/doc/rdoc/classes/WebPage.src/M000170.html +17 -0
  479. data/doc/rdoc/classes/WebPage.src/M000171.html +19 -0
  480. data/doc/rdoc/classes/WebPage.src/M000172.html +18 -0
  481. data/doc/rdoc/classes/WebPage.src/M000173.html +18 -0
  482. data/doc/rdoc/classes/XHTMLDocument.html +377 -0
  483. data/doc/rdoc/classes/XHTMLDocument.src/M000136.html +26 -0
  484. data/doc/rdoc/classes/XHTMLDocument.src/M000137.html +40 -0
  485. data/doc/rdoc/classes/XHTMLDocument.src/M000138.html +20 -0
  486. data/doc/rdoc/classes/XHTMLDocument.src/M000139.html +18 -0
  487. data/doc/rdoc/classes/XHTMLDocument.src/M000140.html +18 -0
  488. data/doc/rdoc/classes/XHTMLDocument.src/M000141.html +19 -0
  489. data/doc/rdoc/classes/XHTMLDocument.src/M000142.html +21 -0
  490. data/doc/rdoc/classes/XHTMLDocument.src/M000143.html +30 -0
  491. data/doc/rdoc/classes/XHTMLDocument.src/M000144.html +18 -0
  492. data/doc/rdoc/classes/XHTMLDocument.src/M000145.html +18 -0
  493. data/doc/rdoc/classes/XHTMLDocument.src/M000146.html +23 -0
  494. data/doc/rdoc/classes/XHTMLDocument.src/M000147.html +18 -0
  495. data/doc/rdoc/classes/XHTMLException.html +117 -0
  496. data/doc/rdoc/classes/XHTMLPage.html +225 -0
  497. data/doc/rdoc/classes/XHTMLPage.src/M000188.html +20 -0
  498. data/doc/rdoc/classes/XHTMLPage.src/M000189.html +18 -0
  499. data/doc/rdoc/classes/XHTMLPage.src/M000190.html +44 -0
  500. data/doc/rdoc/classes/XHTMLPage.src/M000191.html +18 -0
  501. data/doc/rdoc/classes/XHTMLPage.src/M000192.html +54 -0
  502. data/doc/rdoc/classes/XHTMLPage.src/M000193.html +22 -0
  503. data/doc/rdoc/created.rid +1 -0
  504. data/doc/rdoc/files/CHANGES.html +150 -0
  505. data/doc/rdoc/files/INSTALL.html +169 -0
  506. data/doc/rdoc/files/LICENSE.html +449 -0
  507. data/doc/rdoc/files/README.html +176 -0
  508. data/doc/rdoc/files/lib/common/assert_rb.html +101 -0
  509. data/doc/rdoc/files/lib/common/cvs_rb.html +116 -0
  510. data/doc/rdoc/files/lib/common/datastorage_rb.html +108 -0
  511. data/doc/rdoc/files/lib/common/loggerfactory_rb.html +108 -0
  512. data/doc/rdoc/files/lib/common/pid_rb.html +101 -0
  513. data/doc/rdoc/files/lib/common/properties_rb.html +101 -0
  514. data/doc/rdoc/files/lib/common/url_rb.html +108 -0
  515. data/doc/rdoc/files/lib/log4r/outputter/extendedrollingfileoutputter_rb.html +111 -0
  516. data/doc/rdoc/files/lib/ribit/action_rb.html +116 -0
  517. data/doc/rdoc/files/lib/ribit/actionelement_rb.html +108 -0
  518. data/doc/rdoc/files/lib/ribit/common_rb.html +130 -0
  519. data/doc/rdoc/files/lib/ribit/common_rb.src/M000001.html +25 -0
  520. data/doc/rdoc/files/lib/ribit/config_rb.html +116 -0
  521. data/doc/rdoc/files/lib/ribit/constants_rb.html +101 -0
  522. data/doc/rdoc/files/lib/ribit/contentparser_rb.html +112 -0
  523. data/doc/rdoc/files/lib/ribit/contentstore_rb.html +112 -0
  524. data/doc/rdoc/files/lib/ribit/localization_rb.html +108 -0
  525. data/doc/rdoc/files/lib/ribit/main_rb.html +120 -0
  526. data/doc/rdoc/files/lib/ribit/ribit_rb.html +123 -0
  527. data/doc/rdoc/files/lib/ribit/ribitdata_rb.html +112 -0
  528. data/doc/rdoc/files/lib/ribit/ribitlogger_rb.html +111 -0
  529. data/doc/rdoc/files/lib/ribit/webpage_rb.html +118 -0
  530. data/doc/rdoc/files/lib/ribit/xhtmldocument_rb.html +109 -0
  531. data/doc/rdoc/files/lib/ribit/xhtmltag_rb.html +109 -0
  532. data/doc/rdoc/fr_class_index.html +150 -0
  533. data/doc/rdoc/fr_file_index.html +53 -0
  534. data/doc/rdoc/fr_method_index.html +411 -0
  535. data/doc/rdoc/index.html +24 -0
  536. data/doc/rdoc/rdoc-style.css +208 -0
  537. data/doc/spec.txt +42 -0
  538. data/doc/test_run_25052005.txt +108 -0
  539. data/doc/testplan.txt +87 -0
  540. data/doc/www/index.html +5 -0
  541. data/lib/common/assert.rb +72 -0
  542. data/lib/common/cvs.rb +201 -0
  543. data/lib/common/datastorage.rb +265 -0
  544. data/lib/common/loggerfactory.rb +56 -0
  545. data/lib/common/pid.rb +44 -0
  546. data/lib/common/properties.rb +89 -0
  547. data/lib/common/url.rb +64 -0
  548. data/lib/log4r/outputter/extendedrollingfileoutputter.rb +73 -0
  549. data/lib/ribit/action.rb +1106 -0
  550. data/lib/ribit/actionelement.rb +152 -0
  551. data/lib/ribit/common.rb +34 -0
  552. data/lib/ribit/config.rb +123 -0
  553. data/lib/ribit/constants.rb +50 -0
  554. data/lib/ribit/contentparser.rb +1111 -0
  555. data/lib/ribit/contentstore.rb +406 -0
  556. data/lib/ribit/localization.rb +76 -0
  557. data/lib/ribit/main.rb +114 -0
  558. data/lib/ribit/ribit.rb +319 -0
  559. data/lib/ribit/ribitdata.rb +909 -0
  560. data/lib/ribit/ribitlogger.rb +192 -0
  561. data/lib/ribit/webpage.rb +802 -0
  562. data/lib/ribit/xhtmldocument.rb +148 -0
  563. data/lib/ribit/xhtmltag.rb +189 -0
  564. data/share/config/content/1/1.xml +6 -0
  565. data/share/config/content/1/2.xml +6 -0
  566. data/share/config/content/1/3.xml +6 -0
  567. data/share/config/content/1/4.xml +6 -0
  568. data/share/config/content/1/5.xml +6 -0
  569. data/share/config/content/1/category.xml +7 -0
  570. data/share/config/content/1/files/edit-category-template.html +59 -0
  571. data/share/config/content/1/files/edit-template.html +88 -0
  572. data/share/config/content/1/files/localization_en.properties +11 -0
  573. data/share/config/content/1/files/ribit.css +215 -0
  574. data/share/config/content/1/files/view-template.html +50 -0
  575. data/share/config/content/2/1.xml +19 -0
  576. data/share/config/content/2/2.xml +54 -0
  577. data/share/config/content/2/category.xml +5 -0
  578. data/share/config/content/3/1.xml +11 -0
  579. data/share/config/content/3/3.xml +17 -0
  580. data/share/config/content/3/4.xml +28 -0
  581. data/share/config/content/3/category.xml +5 -0
  582. data/share/config/content/categories.xml +12 -0
  583. data/share/config/ribitconfig.xml +48 -0
  584. data/share/config/ribitconfig_dev.xml +41 -0
  585. data/share/config/ribitconfig_local.xml +39 -0
  586. data/share/test/config/content/1/1.xml +6 -0
  587. data/share/test/config/content/1/2.xml +6 -0
  588. data/share/test/config/content/1/3.xml +6 -0
  589. data/share/test/config/content/1/4.xml +6 -0
  590. data/share/test/config/content/1/category.xml +4 -0
  591. data/share/test/config/content/1/files/edit-template.html +50 -0
  592. data/share/test/config/content/1/files/localization_en.properties +4 -0
  593. data/share/test/config/content/1/files/ribit.css +139 -0
  594. data/share/test/config/content/1/files/view-template.html +36 -0
  595. data/share/test/config/content/2/1.xml +16 -0
  596. data/share/test/config/content/2/2.xml +25 -0
  597. data/share/test/config/content/2/category.xml +4 -0
  598. data/share/test/config/content/categories.xml +11 -0
  599. data/share/test/config/content/ribitdata.xml +348 -0
  600. data/share/test/config/ribitconfig.xml +36 -0
  601. data/share/test/test1.xml +13 -0
  602. data/share/test/test2.xml +17 -0
  603. data/share/test/test3.xml +5 -0
  604. data/test/alltests.rb +35 -0
  605. data/test/common/allcommontests.rb +40 -0
  606. data/test/common/asserttest.rb +71 -0
  607. data/test/common/cvstest.rb +117 -0
  608. data/test/common/datastoragetest.rb +151 -0
  609. data/test/common/filepersistentstoragehandlertest.rb +105 -0
  610. data/test/common/propertiestest.rb +77 -0
  611. data/test/common/urltest.rb +70 -0
  612. data/test/log4r/outputter/alllog4routputtertests.rb +28 -0
  613. data/test/log4r/outputter/extendedrollingfileoutputtertest.rb +77 -0
  614. data/test/mock/mock.rb +147 -0
  615. data/test/ribit/actionadaptertest.rb +58 -0
  616. data/test/ribit/actionelementtest.rb +147 -0
  617. data/test/ribit/actionmanagertest.rb +55 -0
  618. data/test/ribit/allribittests.rb +62 -0
  619. data/test/ribit/categoryformactiontest.rb +153 -0
  620. data/test/ribit/configtest.rb +43 -0
  621. data/test/ribit/contentparsertest.rb +404 -0
  622. data/test/ribit/contentstorestub.rb +64 -0
  623. data/test/ribit/contentstoretest.rb +222 -0
  624. data/test/ribit/editcategorypagetest.rb +121 -0
  625. data/test/ribit/formactiontest.rb +367 -0
  626. data/test/ribit/localizationtest.rb +65 -0
  627. data/test/ribit/loggertest.rb +44 -0
  628. data/test/ribit/misc/allmisctests.rb +32 -0
  629. data/test/ribit/misc/amritatest.rb +24 -0
  630. data/test/ribit/misc/debugservlet.rb +63 -0
  631. data/test/ribit/misc/postsevlet.rb +36 -0
  632. data/test/ribit/misc/rexmlcdatatest.rb +17 -0
  633. data/test/ribit/misc/rexmldoctypetest.rb +20 -0
  634. data/test/ribit/misc/rexmlreadtest.rb +13 -0
  635. data/test/ribit/misc/rexmlwritetest.rb +28 -0
  636. data/test/ribit/misc/rubytest.rb +184 -0
  637. data/test/ribit/misc/suidtest.rb +21 -0
  638. data/test/ribit/misc/suite.rb +12 -0
  639. data/test/ribit/misc/wwwtest.rb +68 -0
  640. data/test/ribit/pagerequesttest.rb +74 -0
  641. data/test/ribit/ribitdatatest.rb +404 -0
  642. data/test/ribit/ribitservlettest.rb +94 -0
  643. data/test/ribit/testdata/ribittestdata.rb +49 -0
  644. data/test/ribit/testutil/ribitstub.rb +83 -0
  645. data/test/ribit/testutil/ribittestcase.rb +66 -0
  646. data/test/ribit/viewactiontest.rb +332 -0
  647. data/test/ribit/webpagetest.rb +531 -0
  648. data/test/ribit/xhtmldocumenttest.rb +263 -0
  649. data/test/ribit/xhtmltagtest.rb +84 -0
  650. metadata +837 -0
@@ -0,0 +1,192 @@
1
+ #--
2
+ # Copyright (C) 2004-2005 Tero Vuorela
3
+ #
4
+ # This program is free software; you can redistribute it and/or modify it
5
+ # under the terms of the GNU General Public License as published by the Free
6
+ # Software Foundation; either version 2 of the License, or (at your option)
7
+ # any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful, but WITHOUT
10
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
+ # more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License along with
15
+ # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16
+ # Place - Suite 330, Boston, MA 02111-1307, USA.
17
+ #++
18
+
19
+ require 'rubygems'
20
+ require_gem 'log4r'
21
+ require 'log4r/configurator'
22
+ require 'log4r/outputter/extendedrollingfileoutputter'
23
+ require 'common/loggerfactory'
24
+
25
+ #
26
+ module Ribit
27
+
28
+ ##
29
+ #
30
+ class RibitLogger
31
+ #
32
+ def RibitLogger.new( loggerName )
33
+ return LoggerFactory.get_logger( loggerName )
34
+ end
35
+ end
36
+
37
+ ##
38
+ #
39
+ class RibitLoggerConfig
40
+ @@configurationFileLoaded = false
41
+
42
+ #
43
+ def RibitLoggerConfig.init_with_stdout
44
+ LoggerFactory.set_instance( RibitLoggerFactory.new )
45
+ end
46
+
47
+ #
48
+ def RibitLoggerConfig.init_from_file( configFileName )
49
+ Log4r::Configurator.load_xml_file( configFileName )
50
+ LoggerFactory.set_instance( RibitLoggerFactory.new )
51
+
52
+ logger = LoggerFactory.get_logger( RibitLoggerConfig )
53
+ @@configurationFileLoaded = true
54
+ logger.info( 'Log4r system configured and started' )
55
+ end
56
+
57
+ #
58
+ def RibitLoggerConfig.configure( log4rLogger )
59
+ if ( not @@configurationFileLoaded )
60
+ Log4r::Outputter.stdout.formatter = Log4r::PatternFormatter.new( :pattern => "%l: [%C] %m" )
61
+ log4rLogger.outputters = Log4r::Outputter.stdout
62
+ end
63
+ end
64
+
65
+ #
66
+ def RibitLoggerConfig.reset
67
+ @@configurationFileLoaded = false
68
+ end
69
+
70
+ end
71
+
72
+ ##
73
+ #
74
+ class RibitLoggerImpl
75
+ #
76
+ def initialize( loggerName )
77
+ @name = loggerName.to_s
78
+
79
+ # we add Ribit:: if not yet there
80
+ if not /^Ribit::/.match( @name )
81
+ @name = 'Ribit::' + @name
82
+ end
83
+
84
+ @logger = Log4r::Logger.new( @name )
85
+ RibitLoggerConfig.configure( @logger )
86
+ end
87
+
88
+ #
89
+ def debug( msg )
90
+ @logger.debug( buildMsg( msg ) )
91
+ end
92
+
93
+ #
94
+ def info( msg )
95
+ @logger.info( buildMsg( msg ) )
96
+ end
97
+
98
+ #
99
+ def warn( msg )
100
+ @logger.warn( buildMsg( msg ) )
101
+ end
102
+
103
+ #
104
+ def error( msg )
105
+ @logger.error( buildMsg( msg ) )
106
+ end
107
+
108
+ #
109
+ def fatal( msg )
110
+ @logger.fatal( buildMsg( msg ) )
111
+ end
112
+
113
+ #
114
+ def debug?
115
+ @logger.debug?
116
+ end
117
+
118
+ private
119
+ #
120
+ def buildMsg( msg )
121
+ # currently use msg as it is
122
+ return msg
123
+ end
124
+ end
125
+
126
+ ##
127
+ #
128
+ class RibitLoggerFactory
129
+
130
+ #
131
+ def initialize
132
+ @loggersByName = {}
133
+ end
134
+
135
+ #
136
+ def get_logger( loggerName )
137
+ logger = @loggersByName[loggerName]
138
+
139
+ if ( logger == nil )
140
+ logger = RibitLoggerImpl.new( loggerName )
141
+ @loggersByName[loggerName] = logger
142
+ end
143
+
144
+ return logger
145
+ end
146
+
147
+ end
148
+
149
+ ##
150
+ #
151
+ class RibitLoggerWrapper
152
+ # log-level constants
153
+ FATAL = 1
154
+ ERROR = 2
155
+ WARN = 3
156
+ INFO = 4
157
+ DEBUG = 5
158
+
159
+ #
160
+ def initialize( ribitLogger, level, prefix='' )
161
+ @ribitLogger = ribitLogger
162
+ @level = level
163
+ @prefix = prefix
164
+ end
165
+
166
+ # Directs logging to proper level
167
+ def <<( data )
168
+ case @level
169
+ when FATAL
170
+ @ribitLogger.fatal( @prefix + data.strip )
171
+ when ERROR
172
+ @ribitLogger.error( @prefix + data.strip )
173
+ when WARN
174
+ @ribitLogger.warn( @prefix + data.strip )
175
+ when INFO
176
+ @ribitLogger.info( @prefix + data.strip )
177
+ when DEBUG
178
+ @ribitLogger.debug( @prefix + data.strip )
179
+ else
180
+ @ribitLogger.error( @prefix + 'Unknown logging level for RibitLoggerWrapper' + @level.to_s )
181
+ @ribitLogger.info( @prefix + data.strip )
182
+ end
183
+ end
184
+
185
+ #
186
+ def debug?
187
+ @ribitLogger.debug?
188
+ end
189
+
190
+ end
191
+
192
+ end # end of module
@@ -0,0 +1,802 @@
1
+ #--
2
+ # Copyright (C) 2004-2005 Tero Vuorela
3
+ #
4
+ # This program is free software; you can redistribute it and/or modify it
5
+ # under the terms of the GNU General Public License as published by the Free
6
+ # Software Foundation; either version 2 of the License, or (at your option)
7
+ # any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful, but WITHOUT
10
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
+ # more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License along with
15
+ # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16
+ # Place - Suite 330, Boston, MA 02111-1307, USA.
17
+ #++
18
+
19
+ require 'ribit/xhtmldocument'
20
+ require 'ribit/contentparser'
21
+ require 'ribit/xhtmltag'
22
+ require 'ribit/actionelement'
23
+ require 'ribit/common'
24
+ require 'ribit/action'
25
+ require 'ribit/constants'
26
+ require 'ribit/localization'
27
+ require 'common/assert'
28
+ require 'common/properties'
29
+ require 'set'
30
+
31
+ ##
32
+ #
33
+ class WebPage
34
+
35
+ #
36
+ def initialize
37
+ end
38
+
39
+ #
40
+ def output_page( pageResponse )
41
+ pageResponse.set_body( get_data() )
42
+ pageResponse.set_content_type( get_content_type() )
43
+ end
44
+
45
+ #
46
+ def get_data
47
+ raise 'WebPage.get_data() should be overriden in subclasses'
48
+ end
49
+
50
+ #
51
+ def get_content_type
52
+ raise 'WebPage.get_content_type() should be overriden in subclasses'
53
+ end
54
+
55
+ end
56
+
57
+ #
58
+ class RawPage < WebPage
59
+
60
+ #
61
+ def initialize( data, content_type='text/plain' )
62
+ @data = data
63
+ @contentType = content_type
64
+ end
65
+
66
+ #
67
+ def get_data
68
+ return @data
69
+ end
70
+
71
+ #
72
+ def get_content_type
73
+ return @contentType
74
+ end
75
+
76
+ end
77
+
78
+ ##
79
+ #
80
+ class XHTMLPage < WebPage
81
+
82
+ # Throws error if not valid XHTML document
83
+ def initialize( xhtmlData )
84
+ @doc = XHTMLDocument.new( xhtmlData )
85
+ @logger = RibitLogger.new( XHTMLPage )
86
+ @messageText = nil
87
+ end
88
+
89
+ #
90
+ def set_message( text )
91
+ @messageText = text
92
+ end
93
+
94
+ # Fills the template document and returns document in String format
95
+ def get_data
96
+
97
+ # TODO: can following be optional or should they be removed
98
+ # decl = REXML::XMLDecl.new
99
+ # decl.encoding= REXML::XMLDecl::DEFAULT_ENCODING
100
+ # @doc << decl
101
+ #
102
+ # # write DOCTYPE
103
+ # info = [
104
+ # 'html',
105
+ # 'PUBLIC',
106
+ # '"-//W3C//DTD XHTML Basic 1.0//EN"',
107
+ # '"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"']
108
+ #
109
+ # @doc << REXML::DocType.new( info )
110
+
111
+ @doc.process_marked_elements do |id, ele|
112
+ @logger.debug( "Handling action for ID=#{id}, ele.name=#{ele.name}" )
113
+ begin
114
+ handle_element( id, ele )
115
+ rescue RibitException => e
116
+ @logger.warn( "Couldn't handle action in HTML, element will be removed: #{e.message}" )
117
+ @logger.warn( format_exception( e ) )
118
+ ele.remove
119
+ end
120
+ end
121
+
122
+ return @doc.to_s
123
+ end
124
+
125
+ #
126
+ def add_head_element( element )
127
+ @doc.add_metadata( element )
128
+ end
129
+
130
+ #
131
+ def handle_element( id, element )
132
+ case id
133
+ when 'link:main'
134
+ if ( element.name != 'a' )
135
+ raise RibitException, "link:main is not suitable for element #{element.name}", caller
136
+ end
137
+
138
+ actionEle = LinkActionElement.new( id, element )
139
+
140
+ # no URL => refers to base URL that points to
141
+ # the default page (=main page)
142
+ actionEle.url = ''
143
+
144
+ when 'link:categories'
145
+ if ( element.name != 'a' )
146
+ raise RibitException, "link:categories is not suitable for element #{element.name}", caller
147
+ end
148
+
149
+ actionEle = LinkActionElement.new( id, element )
150
+ actionEle.url = ViewCategoriesActionAdapter.new().get_url
151
+ @logger.debug( "URL to ViewCategories is " + actionEle.url )
152
+
153
+ when 'text:message'
154
+ # replaces all 'text:message' entries
155
+ if ( @messageText != nil )
156
+ insert_html_text( element, @messageText )
157
+ else
158
+ element.remove
159
+ end
160
+
161
+ else
162
+ # rest of text and link elements are removed
163
+ if ( /^text:/.match( id ) or /^link:/.match( id ) )
164
+ element.remove
165
+ else
166
+ raise RibitException, "Unknown actionID=#{id}, don't know how to handle", caller
167
+ end
168
+ end
169
+ end
170
+
171
+ # insert text that can contain html tags => they are not escaped
172
+ def insert_html_text( element, text )
173
+ element.text = nil
174
+ # NOTE: some reason setting raw in constructor didn't work
175
+ text = REXML::Text.new( text, true, nil, false )
176
+ text.raw = true
177
+ element.add_text( text )
178
+ end
179
+
180
+ end
181
+
182
+ ##
183
+ #
184
+ class TextPage < XHTMLPage
185
+ include Assert
186
+
187
+ def initialize( ribitData, page, ribitConfig )
188
+ assert_not_nil( ribitData )
189
+ assert_not_nil( ribitConfig )
190
+ template = ribitData.get_page_by_full_name( "core::pagetemplate" )
191
+
192
+ super( template.data )
193
+
194
+ @ribitData = ribitData
195
+ @ribitConfig = ribitConfig
196
+
197
+ @page = page
198
+ @logger = RibitLogger.new( TextPage )
199
+
200
+ end
201
+
202
+ # Always text/html
203
+ def get_content_type
204
+ return 'text/html'
205
+ end
206
+
207
+ #
208
+ def handle_element( id, element )
209
+ case id
210
+ when 'text:title'
211
+ insert_html_text( element, @page.title )
212
+ when "text:body"
213
+ insert_html_text( element, get_page_data )
214
+
215
+ when 'link:edit'
216
+ if ( element.name != 'a' )
217
+ raise RibitException, "link:edit is not suitable for element #{element.name}", caller
218
+ end
219
+
220
+ actionEle = LinkActionElement.new( id, element )
221
+ actionEle.url = EditActionAdapter.new( @page.full_id ).get_url()
222
+
223
+ when 'link:validator'
224
+ if ( element.name != 'a' )
225
+ raise RibitException, "link:validator is not suitable for element #{element.name}", caller
226
+ end
227
+
228
+ viewUrl = ViewActionAdapter.new( @page.full_id ).get_url
229
+ baseUrlStr = @ribitConfig.get_base_url
230
+
231
+ validator = W3CValidatorLinkActionAdapter.new( baseUrlStr + '/' + viewUrl.to_s )
232
+
233
+ actionEle = LinkActionElement.new( id, element )
234
+ actionEle.url = validator.get_url
235
+
236
+ when 'link:category-bar'
237
+ handle_category_bar( id, element )
238
+
239
+ when 'link:category-bar-next-level'
240
+ handle_category_bar_next_level( id, element )
241
+
242
+ else
243
+ super( id, element )
244
+ end
245
+
246
+ end
247
+
248
+ #
249
+ def handle_category_bar( id, element )
250
+ @logger.debug( "Category-bar selected: pageID=#{@page.full_id}" )
251
+ adapters = []
252
+
253
+ # the current page whose parent categories are searched
254
+ category = @page.category
255
+
256
+ while ( category != nil )
257
+ mainPageID = category.get_main_page_full_id
258
+ if ( mainPageID != nil )
259
+ adapters.push( ViewActionAdapter.new( mainPageID, category.name ) )
260
+ else
261
+ mainPageID = category.id.to_s + "::empty"
262
+ adapters.push( ViewActionAdapter.new( mainPageID, category.name ) )
263
+ end
264
+ category = category.get_parent_category
265
+ end
266
+
267
+ actionEle = CategoryBarActionElement.new( id, element )
268
+ actionEle.replace_link_elements( adapters.reverse )
269
+ end
270
+
271
+ #
272
+ def handle_category_bar_next_level( id, element )
273
+ @logger.debug( "Category-bar-next-level selected: pageID=#{@page.full_id}" )
274
+ adapters = []
275
+
276
+ # the current page whose parent categories are searched
277
+ category = @page.category
278
+ @logger.debug( "childs.size(): " + category.get_child_categories.size().to_s )
279
+
280
+ # before iterating sort categories
281
+ children = category.get_child_categories
282
+
283
+ if ( children != nil and children.size() > 0 )
284
+ children = children.sort do |a,b|
285
+ @logger.debug( "compare: a =" + a.name + ", b =" + b.name )
286
+ a.name<=>b.name
287
+ end
288
+
289
+ children.each do |childCategory|
290
+ mainPageID = childCategory.get_main_page_full_id
291
+ if ( mainPageID != nil )
292
+ adapters.push( ViewActionAdapter.new( mainPageID, childCategory.name ) )
293
+ else
294
+ mainPageID = childCategory.id + "::empty"
295
+ adapters.push( ViewActionAdapter.new( mainPageID, childCategory.name ) )
296
+ end
297
+ end
298
+ end
299
+
300
+ actionEle = CategoryBarNextLevelActionElement.new( id, element )
301
+ actionEle.replace_link_elements( adapters )
302
+ end
303
+
304
+ #
305
+ def get_page_data
306
+ @logger.debug( "Converting data for page ID=#{@page.full_id}, fullName=#{@page.full_name}" )
307
+
308
+ @logger.debug( "Going to convert following data:\n" + @page.data )
309
+ parser = ContentParser.new( @ribitData )
310
+ data = parser.parse( @page )
311
+
312
+ @logger.debug( "Result is:\n" + data )
313
+ return data
314
+ end
315
+
316
+ end
317
+
318
+ ##
319
+ #
320
+ class CategoriesPage < XHTMLPage
321
+ include Assert
322
+ include Localization
323
+
324
+ def initialize( ribitData, ribitConfig )
325
+ assert_not_nil( ribitData )
326
+ assert_not_nil( ribitConfig )
327
+ template = ribitData.get_page_by_full_name( "core::pagetemplate" )
328
+
329
+ super( template.data )
330
+
331
+ @ribitData = ribitData
332
+ @ribitConfig = ribitConfig
333
+
334
+ @logger = RibitLogger.new( CategoriesPage )
335
+ end
336
+
337
+ # Always text/html
338
+ def get_content_type
339
+ return 'text/html'
340
+ end
341
+
342
+ #
343
+ def handle_element( id, element )
344
+ @logger.debug( "Handling action ID=#{id}" )
345
+ case id
346
+
347
+ when 'link:category-bar-next-level'
348
+ @logger.debug( "Category-bar-next-level selected for Categories page" )
349
+ adapters = []
350
+
351
+ # before iterating sort categories
352
+ categories = @ribitData.get_all_categories
353
+
354
+ if ( categories != nil and categories.size > 0 )
355
+ categories = categories.sort do |a,b|
356
+ #@logger.debug( "compare: a =" + a.name + ", b =" + b.name )
357
+ a.name<=>b.name
358
+ end
359
+
360
+ categories.each do |category|
361
+ #@logger.debug( "cat " + category.name + " vis = " + category.visible?.to_s )
362
+ if ( category.toplevel_category? and category.visible? )
363
+ mainPageID = category.get_main_page_full_id
364
+ if ( mainPageID != nil )
365
+ adapters.push( ViewActionAdapter.new( mainPageID, category.name ) )
366
+ else
367
+ mainPageID = category.id + "::empty"
368
+ adapters.push( ViewActionAdapter.new( mainPageID, category.name ) )
369
+ end
370
+ end
371
+ end
372
+ end
373
+
374
+ actionEle = CategoryBarNextLevelActionElement.new( id, element )
375
+ actionEle.replace_link_elements( adapters )
376
+
377
+ when 'text:title'
378
+ insert_html_text( element, get_localized( TITLE_CATEGORIES_PAGE ) )
379
+ when 'text:body'
380
+ insert_html_text( element, get_page_data )
381
+
382
+ when 'link:validator'
383
+ if ( element.name != 'a' )
384
+ raise RibitException, "link:validator is not suitable for element #{element.name}", caller
385
+ end
386
+
387
+ viewUrl = ViewCategoriesActionAdapter.new().get_url
388
+ baseUrlStr = @ribitConfig.get_base_url
389
+
390
+ validator = W3CValidatorLinkActionAdapter.new( baseUrlStr + '/' + viewUrl.to_s )
391
+
392
+ actionEle = LinkActionElement.new( id, element )
393
+ actionEle.url = validator.get_url
394
+
395
+ else
396
+ @logger.debug( "Action not found, calling super" )
397
+ super( id, element )
398
+ end
399
+
400
+ end
401
+
402
+ #
403
+ def get_page_data
404
+ data = "<ul>"
405
+
406
+ categories = @ribitData.get_visible_root_categories
407
+ categories.sort! { |a,b| a.full_name<=>b.full_name }
408
+ @logger.debug( "Processing categories: " + categories.to_s )
409
+
410
+ categories.each do |category|
411
+ data << format_category( category, "" )
412
+ end
413
+ data << "</ul>"
414
+ @logger.debug( "Result is:\n" + data )
415
+ return data
416
+ end
417
+
418
+ #
419
+ def format_category( category, parentPath )
420
+ fullName = category.full_name
421
+
422
+ data = "<li>"
423
+ data << "<strong>#{fullName}</strong> "
424
+
425
+ editCategoryAction = EditCategoryActionAdapter.new( category.id )
426
+ linkTag = LinkTag.new( editCategoryAction.get_url, '[edit]', false )
427
+ linkTag.set_class( 'edit-category-link' )
428
+ data << linkTag.to_s
429
+
430
+ data << "<ul>"
431
+
432
+ categoryMainPageFullID = category.get_main_page_full_id()
433
+
434
+ pages = category.get_pages
435
+ pages.sort! { |a,b| a.name<=>b.name }
436
+
437
+ pages.each do |page|
438
+ data << "<li>"
439
+ action = ViewActionAdapter.new( page.full_id )
440
+ data << LinkTag.new( action.get_url, page.name, false ).to_s
441
+
442
+ if ( page.full_id == categoryMainPageFullID )
443
+ data << ' (m)'
444
+ end
445
+
446
+ data << "</li>"
447
+ end
448
+ data << "</ul>"
449
+
450
+ data << "</li>"
451
+ childs = category.get_child_categories
452
+
453
+ if ( childs != nil and childs.size > 0 )
454
+ childs.sort! { |a,b| a.full_name<=>b.full_name }
455
+
456
+ childs.each do |child|
457
+ data << format_category( child, fullName )
458
+ end
459
+ end
460
+
461
+ return data
462
+ end
463
+
464
+ end
465
+
466
+ ##
467
+ #
468
+ class EditPage < XHTMLPage
469
+ include Assert
470
+ include Localization
471
+
472
+ def initialize( ribitData, pageID, previousPageID, ribitConfig )
473
+ assert_not_nil( ribitData )
474
+ assert_not_nil( ribitConfig )
475
+ assert_not_nil( previousPageID )
476
+
477
+ @ribitData = ribitData
478
+ @ribitConfig = ribitConfig
479
+ @pageID = pageID
480
+ @logger = RibitLogger.new( EditPage )
481
+ @hiddenFormFields = Array.new
482
+ @formActionParams = PropertyList.new
483
+
484
+ @previousPageID = previousPageID
485
+ add_hidden_form_field( HiddenFormInputTag.new( Constants::PREV_FORM_PARAM_NAME, previousPageID ) )
486
+
487
+ template = ribitData.get_page_by_full_name( 'core::edittemplate' )
488
+ super( template.data )
489
+ end
490
+
491
+ # Always text/html
492
+ def get_content_type
493
+ return 'text/html'
494
+ end
495
+
496
+ #
497
+ def add_hidden_form_field( hiddenFieldTag )
498
+ @hiddenFormFields.push( hiddenFieldTag )
499
+ end
500
+
501
+ #
502
+ def add_form_action_params( key, value )
503
+ @formActionParams.put( key, value )
504
+ end
505
+
506
+ #
507
+ def handle_element( id, element )
508
+ case id
509
+ when 'text:title'
510
+ if ( @pageID == Constants::NEW_PAGE_ID )
511
+ insert_html_text( element, get_localized( TITLE_NEW_PAGE ) )
512
+ else
513
+ insert_html_text( element, @ribitData.get_page_by_id( @pageID ).title )
514
+ end
515
+
516
+ when 'text:body'
517
+ if ( @pageID == Constants::NEW_PAGE_ID )
518
+ element.text = ''
519
+ else
520
+ #puts "### get_replacement_data: " + @ribitData[@pageID].data
521
+
522
+ # allow entity encoding happen
523
+ element.text = @ribitData.get_page_by_id( @pageID ).data
524
+ end
525
+
526
+ when "replace:category"
527
+ if ( @pageID == Constants::NEW_PAGE_ID )
528
+ categoryFullName = @formActionParams.get( Constants::CATEGORY_REQUEST_PARAM_NAME )
529
+
530
+ if ( /^::/.match( categoryFullName ) == nil )
531
+ categoryFullName = '::' + categoryFullName
532
+ end
533
+ else
534
+ categoryFullName = @ribitData.get_page_by_id( @pageID ).category.full_name
535
+ end
536
+
537
+ element.text = element.text.gsub( /#\{category\}/, categoryFullName )
538
+
539
+ when "set:page-name"
540
+ if ( @pageID == Constants::NEW_PAGE_ID )
541
+ element.attributes['value'] = @formActionParams.get( Constants::PAGE_NAME_REQUEST_PARAM_NAME )
542
+ else
543
+ element.attributes['value'] = @ribitData.get_page_by_id( @pageID ).name
544
+ end
545
+
546
+ element.text = nil
547
+
548
+ when 'link:validator'
549
+ if ( element.name != 'a' )
550
+ raise RibitException, "link:validator is not suitable for element #{element.name}", caller
551
+ end
552
+
553
+ # NOTE: this could be nicer but should work (we know too many details)
554
+ if ( @pageID == Constants::NEW_PAGE_ID )
555
+ viewUrl = EditNewActionAdapter.new(
556
+ @formActionParams.get( Constants::PAGE_NAME_REQUEST_PARAM_NAME ),
557
+ @formActionParams.get( Constants::CATEGORY_REQUEST_PARAM_NAME ),
558
+ @previousPageID ).get_url
559
+
560
+ else
561
+ viewUrl = EditActionAdapter.new( @pageID ).get_url
562
+ end
563
+ baseUrlStr = @ribitConfig.get_base_url
564
+
565
+ validator = W3CValidatorLinkActionAdapter.new( baseUrlStr + '/' + viewUrl.to_s )
566
+ #@logger.debug( "validator url: " + validator.get_url )
567
+
568
+ actionEle = LinkActionElement.new( id, element )
569
+ actionEle.url = validator.get_url
570
+
571
+ when 'action:form'
572
+ if ( element.name != 'form' )
573
+ raise RibitException, "action:form is not suitable for element #{element.name}", caller
574
+ end
575
+
576
+ adapter = FormActionAdapter.new( @pageID )
577
+
578
+ # add action parameters
579
+ @formActionParams.keys.each do |key|
580
+ adapter.add_param( key, @formActionParams.get( key ) )
581
+ end
582
+
583
+ actionEle = FormActionElement.new( id, element )
584
+ # NOTE: prevent double encoding (could be nicer)
585
+ actionEle.url = adapter.get_url( false )
586
+
587
+ if ( not @hiddenFormFields.empty? )
588
+ # input fields can't be directly under 'form'
589
+ p = DivTag.new()
590
+
591
+ # NOTE: here we rely on that 'action' is FormActionElement
592
+ actionEle.insert_to_top( p )
593
+
594
+ @hiddenFormFields.each do |fieldTag|
595
+ p.add_element( fieldTag )
596
+ end
597
+
598
+ end
599
+ else
600
+ super( id, element )
601
+ end
602
+
603
+ end
604
+
605
+ end
606
+
607
+ ##
608
+ #
609
+ class EditCategoryPage < XHTMLPage
610
+ include Assert
611
+ include Localization
612
+
613
+ def initialize( ribitData, categoryID, ribitConfig )
614
+ assert_not_nil( ribitData )
615
+ assert_not_nil( ribitConfig )
616
+
617
+ @ribitData = ribitData
618
+ @ribitConfig = ribitConfig
619
+ @categoryID = categoryID
620
+ @logger = RibitLogger.new( EditPage )
621
+ @hiddenFormFields = Array.new
622
+ @formActionParams = PropertyList.new
623
+
624
+ template = ribitData.get_page_by_full_name( 'core::edit-category-template' )
625
+ super( template.data )
626
+ end
627
+
628
+ # Always text/html
629
+ def get_content_type
630
+ return 'text/html'
631
+ end
632
+
633
+ #
634
+ def add_hidden_form_field( hiddenFieldTag )
635
+ @hiddenFormFields.push( hiddenFieldTag )
636
+ end
637
+
638
+ #
639
+ def add_form_action_params( key, value )
640
+ @formActionParams.put( key, value )
641
+ end
642
+
643
+ #
644
+ def handle_element( id, element )
645
+
646
+ case id
647
+ when 'text:title'
648
+ if ( @categoryID == Constants::NEW_PAGE_ID )
649
+ insert_html_text( element, get_localized( TITLE_NEW_CATEGORY ) )
650
+ else
651
+ insert_html_text( element, @ribitData.get_category_by_id( @categoryID ).name )
652
+ end
653
+
654
+ when 'set:category-name'
655
+ if ( @categoryID == Constants::NEW_PAGE_ID )
656
+ element.attributes['value'] = @formActionParams.get( Constants::CATEGORY_NAME_REQUEST_PARAM_NAME )
657
+ else
658
+ element.attributes['value'] = @ribitData.get_category_by_id( @categoryID ).name
659
+ end
660
+ element.text = nil
661
+
662
+ when 'set:category-main-page'
663
+ # TODO: new category not implemented yet
664
+
665
+ # we know main-page is selected by combobox
666
+ category = @ribitData.get_category_by_id( @categoryID )
667
+
668
+ pages = category.get_pages
669
+ mainPageFullID = category.get_main_page_full_id
670
+
671
+ pages.sort! { |a,b| a.name<=>b.name }
672
+
673
+ # in template there might be example opton tags => remove those
674
+ element.children.each do |child|
675
+ element.delete( child )
676
+ end
677
+
678
+ # next create new option tags
679
+ pages.each do |page|
680
+ optionTag = SelectOptionTag.new( page.id, page.name )
681
+
682
+ if ( page.full_id == mainPageFullID )
683
+ optionTag.set_selected
684
+ end
685
+
686
+ element.add( optionTag )
687
+ end
688
+
689
+ element.text = nil
690
+
691
+ when "set:category-parent"
692
+ set_category_parent( element )
693
+
694
+ when 'link:validator'
695
+ if ( element.name != 'a' )
696
+ raise RibitException, "link:validator is not suitable for element #{element.name}", caller
697
+ end
698
+
699
+ # NOTE: this could be nicer but should work (we know too many details)
700
+ if ( @categoryID == Constants::NEW_CATEGORY_ID )
701
+
702
+ viewUrl = EditNewCategoryActionAdapter.new(
703
+ @formActionParams.get( Constants::PAGE_NAME_REQUEST_PARAM_NAME ),
704
+ @formActionParams.get( Constants::CATEGORY_REQUEST_PARAM_NAME ) ).get_url
705
+
706
+ else
707
+ viewUrl = EditCategoryActionAdapter.new( @categoryID ).get_url
708
+ end
709
+ baseUrlStr = @ribitConfig.get_base_url
710
+
711
+ validator = W3CValidatorLinkActionAdapter.new( baseUrlStr + '/' + viewUrl.to_s )
712
+
713
+ actionEle = LinkActionElement.new( id, element )
714
+ actionEle.url = validator.get_url
715
+
716
+ when 'action:form'
717
+ adapter = CategoryFormActionAdapter.new( @categoryID )
718
+
719
+ # add action parameters
720
+ @formActionParams.keys.each do |key|
721
+ adapter.add_param( key, @formActionParams.get( key ) )
722
+ end
723
+
724
+ actionEle = FormActionElement.new( id, element )
725
+ # NOTE: prevent double encoding (could be nicer)
726
+ actionEle.url = adapter.get_url( false )
727
+
728
+ # NOTE: here we rely on that 'action' is FormActionElement
729
+ @hiddenFormFields.each do |fieldTag|
730
+ actionEle.insert_to_top( fieldTag )
731
+ end
732
+
733
+ else
734
+ super( id, element )
735
+ end
736
+
737
+ end
738
+
739
+ #
740
+ def set_category_parent( element )
741
+ # TODO: new category not implemented yet
742
+
743
+ currentCategory = @ribitData.get_category_by_id( @categoryID )
744
+ parentCategory = currentCategory.get_parent_category
745
+ childCategoryIDs = get_child_category_ids( currentCategory )
746
+
747
+ # in template there might be example opton tags => remove those
748
+ element.children.each do |child|
749
+ element.delete( child )
750
+ end
751
+
752
+ allCategories = @ribitData.get_all_categories
753
+
754
+ # - 'no parent' option included
755
+ # - can't select itself
756
+ # - can't select any if its childs
757
+ # - can't select unvisible categories
758
+
759
+ # add 'no parent tag'
760
+ noParentOptionTag = SelectOptionTag.new(
761
+ Constants::CATEGORY_NO_PARENT_FORM_VALUE,
762
+ get_localized( NO_PARENT_OPTION ) )
763
+
764
+ element.add( noParentOptionTag )
765
+ selectionSet = false
766
+
767
+ allCategories.each do |category|
768
+ if ( category.id != currentCategory.id and category.visible? and not childCategoryIDs.include?( category.id ) )
769
+ optionTag = SelectOptionTag.new( category.id, category.name )
770
+
771
+ if ( parentCategory != nil and parentCategory.id == category.id )
772
+ optionTag.set_selected
773
+ selectionSet == true
774
+ end
775
+
776
+ element.add( optionTag )
777
+ end
778
+
779
+ end
780
+
781
+ noParentOptionTag.set_selected if not selectionSet
782
+
783
+ element.text = nil
784
+ end
785
+
786
+ #
787
+ def get_child_category_ids( category )
788
+
789
+ if ( category == nil )
790
+ return Set.new
791
+ end
792
+
793
+ ids = Set.new
794
+ category.get_child_categories().each do |childCategory|
795
+ ids.add( childCategory.id )
796
+ ids.merge( get_child_category_ids( childCategory ) )
797
+ end
798
+
799
+ return ids
800
+ end
801
+
802
+ end