This is an automated email from the git hooks/post-receive script. New commit to branch bow-v2 in repository bow. See https://gitlab.nuiton.org/chorem/bow.git commit 82dfa54310a438f912d7137a37f6c653fc5a2180 Author: Benjamin <poussin@codelutin.com> Date: Tue Jul 23 16:30:07 2019 +0200 reecriture total en jooby/spgeed/rocker --- LICENSE.txt | 661 --------------------- README.md | 7 - TODO.md | 9 + TODO.txt | 35 -- .../src/main/java/org/chorem/bow/BowContext.java | 29 - .../main/java/org/chorem/bow/model/Bookmark.java | 31 - .../java/org/chorem/bow/model/BowPreference.java | 26 - .../java/org/chorem/bow/model/BowSearchPrefix.java | 18 - .../chorem/bow/persistence/BookmarkRepository.java | 14 - .../org/chorem/bow/persistence/BowRepository.java | 24 - .../org/chorem/bow/rest/BookmarkResources.java | 25 - bow-extension-chromium/LICENSE.txt | 661 --------------------- bow-extension-chromium/README.md | 2 - bow-extension-chromium/cert.pem | 6 - bow-extension-chromium/key.pem | 16 - bow-extension-chromium/pom.xml | 71 --- .../src/main/webapp/_locales/en/messages.json | 116 ---- .../src/main/webapp/_locales/fr/messages.json | 111 ---- .../src/main/webapp/background.js | 46 -- .../src/main/webapp/css/extension.css | 73 --- .../src/main/webapp/css/options.css | 158 ----- .../src/main/webapp/img/favicon.png | Bin 4267 -> 0 bytes .../src/main/webapp/img/fdboutonV.jpg | Bin 592 -> 0 bytes .../src/main/webapp/img/fondconnexion.jpg | Bin 8136 -> 0 bytes .../src/main/webapp/img/fondhead.jpg | Bin 544 -> 0 bytes .../src/main/webapp/img/livre-128.png | Bin 21722 -> 0 bytes .../src/main/webapp/img/livre-16.png | Bin 1312 -> 0 bytes .../src/main/webapp/img/livre-48.png | Bin 4762 -> 0 bytes .../src/main/webapp/img/logobow.jpg | Bin 11847 -> 0 bytes .../src/main/webapp/manifest.json | 47 -- .../src/main/webapp/options.html | 85 --- bow-extension-chromium/src/main/webapp/options.js | 92 --- bow-extension-chromium/src/main/webapp/popup.html | 54 -- bow-extension-chromium/src/main/webapp/popup.js | 116 ---- .../src/main/webapp/properties.js | 30 - bow-extension-chromium/src/site/site.xml | 41 -- bow-ui/LICENSE.txt | 661 --------------------- bow-ui/README.md | 7 - bow-ui/pom.xml | 456 -------------- bow-ui/src/license/THIRD-PARTY.properties | 46 -- bow-ui/src/main/i18n/jsp.rules | 9 - .../main/java/org/chorem/bow/BookmarkUtils.java | 354 ----------- bow-ui/src/main/java/org/chorem/bow/BowConfig.java | 450 -------------- .../main/java/org/chorem/bow/BowConfigOption.java | 199 ------- bow-ui/src/main/java/org/chorem/bow/BowMail.java | 49 -- .../org/chorem/bow/BowMigrationPreference.java | 213 ------- bow-ui/src/main/java/org/chorem/bow/BowProxy.java | 97 --- .../main/java/org/chorem/bow/BowSearchResult.java | 186 ------ .../src/main/java/org/chorem/bow/BowSession.java | 375 ------------ bow-ui/src/main/java/org/chorem/bow/BowUtils.java | 379 ------------ .../java/org/chorem/bow/action/AliasAction.java | 198 ------ .../java/org/chorem/bow/action/AtomAction.java | 125 ---- .../java/org/chorem/bow/action/BowBaseAction.java | 166 ------ .../java/org/chorem/bow/action/LocaleAction.java | 30 - .../bow/action/admin/ReIndexationAction.java | 61 -- .../bow/action/bookmark/AddOrUpdateAction.java | 379 ------------ .../action/bookmark/AuthenticationEditAction.java | 123 ---- .../action/bookmark/DeleteSearchResultsAction.java | 92 --- .../org/chorem/bow/action/bookmark/EditAction.java | 88 --- .../org/chorem/bow/action/bookmark/HomeAction.java | 130 ---- .../chorem/bow/action/bookmark/RemoveAction.java | 91 --- .../bow/action/bookmark/ScreenshotAction.java | 100 ---- .../chorem/bow/action/group/GroupEditAction.java | 245 -------- .../chorem/bow/action/group/GroupViewAction.java | 85 --- .../bow/action/login/ForgotPasswordAction.java | 122 ---- .../org/chorem/bow/action/login/LoginAction.java | 131 ---- .../org/chorem/bow/action/login/LogoutAction.java | 39 -- .../chorem/bow/action/login/RegisterAction.java | 187 ------ .../action/opensearch/OpenSearchBaseAction.java | 112 ---- .../action/opensearch/OpenSearchResultAction.java | 83 --- .../opensearch/OpenSearchSuggestionAction.java | 140 ----- .../bow/action/opensearch/SuggestionAction.java | 232 -------- .../bow/action/preference/AdminTagAction.java | 94 --- .../bow/action/preference/DeleteImportAction.java | 92 --- .../action/preference/ExportBookmarksAction.java | 131 ---- .../bow/action/preference/GenerateTokenAction.java | 66 -- .../action/preference/ImportBookmarksAction.java | 257 -------- .../action/preference/PreferenceBaseAction.java | 432 -------------- .../preference/UpdateAuthenticationAction.java | 66 -- .../bow/action/preference/UpdateSiteAction.java | 145 ----- .../bow/action/preference/UpdateUserAction.java | 124 ---- .../action/sharedUser/SharedUserEditAction.java | 146 ----- .../action/sharedUser/SharedUserViewAction.java | 85 --- .../bow/interceptor/LaxLoginInterceptor.java | 68 --- .../chorem/bow/interceptor/LoginInterceptor.java | 81 --- .../chorem/bow/interceptor/LogoutInterceptor.java | 41 -- bow-ui/src/main/resources/META-INF/aop.xml | 42 -- bow-ui/src/main/resources/bow.properties | 58 -- bow-ui/src/main/resources/bowpwd.sh | 58 -- bow-ui/src/main/resources/freemarker.properties | 21 - .../main/resources/i18n/bow-ui_en_GB.properties | 223 ------- .../main/resources/i18n/bow-ui_fr_FR.properties | 223 ------- bow-ui/src/main/resources/log4j.properties | 36 -- .../bow/action/ForgotPasswordAction-validation.xml | 35 -- .../chorem/bow/action/LoginAction-validation.xml | 40 -- .../bow/action/RegisterAction-validation.xml | 50 -- .../preference/UpdateUserAction-validation.xml | 50 -- bow-ui/src/main/resources/struts.properties | 66 -- bow-ui/src/main/resources/struts.xml | 337 ----------- bow-ui/src/main/webapp/WEB-INF/bowutils.tld | 46 -- bow-ui/src/main/webapp/WEB-INF/decorators.xml | 42 -- bow-ui/src/main/webapp/WEB-INF/decorators/main.jsp | 76 --- .../src/main/webapp/WEB-INF/jsp/CallStatistic.jsp | 29 - bow-ui/src/main/webapp/WEB-INF/jsp/admin.jsp | 50 -- bow-ui/src/main/webapp/WEB-INF/jsp/atom.jsp | 133 ----- .../main/webapp/WEB-INF/jsp/authenticationEdit.jsp | 79 --- .../src/main/webapp/WEB-INF/jsp/editBookmark.jsp | 57 -- bow-ui/src/main/webapp/WEB-INF/jsp/error.jsp | 42 -- .../src/main/webapp/WEB-INF/jsp/forgotPassword.jsp | 47 -- bow-ui/src/main/webapp/WEB-INF/jsp/groupEdit.jsp | 115 ---- bow-ui/src/main/webapp/WEB-INF/jsp/groupView.jsp | 77 --- bow-ui/src/main/webapp/WEB-INF/jsp/home.jsp | 88 --- .../src/main/webapp/WEB-INF/jsp/inc/bookmark.jsp | 160 ----- bow-ui/src/main/webapp/WEB-INF/jsp/inc/footer.jsp | 44 -- bow-ui/src/main/webapp/WEB-INF/jsp/inc/header.jsp | 74 --- .../src/main/webapp/WEB-INF/jsp/inc/rightMenu.jsp | 75 --- .../src/main/webapp/WEB-INF/jsp/inc/tagsCloud.jsp | 41 -- bow-ui/src/main/webapp/WEB-INF/jsp/login.jsp | 48 -- .../src/main/webapp/WEB-INF/jsp/permanentXml.jsp | 40 -- bow-ui/src/main/webapp/WEB-INF/jsp/preferences.jsp | 265 --------- bow-ui/src/main/webapp/WEB-INF/jsp/register.jsp | 51 -- .../src/main/webapp/WEB-INF/jsp/sharedUserEdit.jsp | 58 -- .../src/main/webapp/WEB-INF/jsp/sharedUserView.jsp | 81 --- bow-ui/src/main/webapp/WEB-INF/jsp/suggestions.jsp | 41 -- .../src/main/webapp/WEB-INF/jsp/temporaryXml.jsp | 39 -- bow-ui/src/main/webapp/WEB-INF/sitemesh.xml | 71 --- bow-ui/src/main/webapp/WEB-INF/web.xml | 73 --- bow-ui/src/main/webapp/css/bookmark.css | 569 ------------------ bow-ui/src/main/webapp/css/connexion.css | 148 ----- bow-ui/src/main/webapp/css/global.css | 225 ------- .../css/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 180 -> 0 bytes .../css/images/ui-bg_flat_75_dbdbdb_40x100.png | Bin 211 -> 0 bytes .../css/images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 120 -> 0 bytes .../css/images/ui-bg_glass_65_ffffff_1x400.png | Bin 105 -> 0 bytes .../css/images/ui-bg_glass_75_dadada_1x400.png | Bin 111 -> 0 bytes .../css/images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 110 -> 0 bytes .../ui-bg_highlight-soft_75_bf8a9c_1x100.png | Bin 129 -> 0 bytes .../images/ui-bg_inset-soft_95_fef1ec_1x100.png | Bin 123 -> 0 bytes .../webapp/css/images/ui-icons_222222_256x240.png | Bin 4369 -> 0 bytes .../webapp/css/images/ui-icons_2e83ff_256x240.png | Bin 4369 -> 0 bytes .../webapp/css/images/ui-icons_454545_256x240.png | Bin 4369 -> 0 bytes .../webapp/css/images/ui-icons_888888_256x240.png | Bin 4369 -> 0 bytes .../webapp/css/images/ui-icons_cd0a0a_256x240.png | Bin 4369 -> 0 bytes .../webapp/css/jquery-ui-1.8.11.custom.bow.css | 594 ------------------ bow-ui/src/main/webapp/img/add.png | Bin 494 -> 0 bytes bow-ui/src/main/webapp/img/aide.jpg | Bin 1557 -> 0 bytes bow-ui/src/main/webapp/img/asc.png | Bin 652 -> 0 bytes bow-ui/src/main/webapp/img/bow.gif | Bin 154 -> 0 bytes bow-ui/src/main/webapp/img/cadena.png | Bin 647 -> 0 bytes bow-ui/src/main/webapp/img/camera.png | Bin 341 -> 0 bytes bow-ui/src/main/webapp/img/chromium.png | Bin 1861 -> 0 bytes bow-ui/src/main/webapp/img/click.jpg | Bin 1159 -> 0 bytes bow-ui/src/main/webapp/img/croix.jpg | Bin 1246 -> 0 bytes bow-ui/src/main/webapp/img/croixtr.png | Bin 1376 -> 0 bytes bow-ui/src/main/webapp/img/delete.png | Bin 820 -> 0 bytes bow-ui/src/main/webapp/img/desc.png | Bin 683 -> 0 bytes bow-ui/src/main/webapp/img/edit.jpg | Bin 1077 -> 0 bytes bow-ui/src/main/webapp/img/edit.png | Bin 1088 -> 0 bytes bow-ui/src/main/webapp/img/favicon.png | Bin 4267 -> 0 bytes bow-ui/src/main/webapp/img/fdboutonV.jpg | Bin 592 -> 0 bytes bow-ui/src/main/webapp/img/fondbouton.jpg | Bin 533 -> 0 bytes bow-ui/src/main/webapp/img/fondconnexion.jpg | Bin 19246 -> 0 bytes bow-ui/src/main/webapp/img/fondhead.jpg | Bin 544 -> 0 bytes bow-ui/src/main/webapp/img/livreG.jpg | Bin 2219 -> 0 bytes bow-ui/src/main/webapp/img/logobow.jpg | Bin 11847 -> 0 bytes bow-ui/src/main/webapp/img/moyen-livre.jpg | Bin 3683 -> 0 bytes bow-ui/src/main/webapp/img/piedmenu.jpg | Bin 4571 -> 0 bytes bow-ui/src/main/webapp/img/pointemenu.jpg | Bin 999 -> 0 bytes bow-ui/src/main/webapp/img/ptit-livre.jpg | Bin 1412 -> 0 bytes bow-ui/src/main/webapp/img/remove.png | Bin 1149 -> 0 bytes bow-ui/src/main/webapp/img/scriptlet.png | Bin 998 -> 0 bytes bow-ui/src/main/webapp/img/tag.jpg | Bin 1090 -> 0 bytes bow-ui/src/main/webapp/img/terminal.png | Bin 946 -> 0 bytes bow-ui/src/main/webapp/index.jsp | 28 - bow-ui/src/main/webapp/js/README | 36 -- bow-ui/src/main/webapp/js/bookmark.js | 48 -- bow-ui/src/main/webapp/js/bowadd.js | 36 -- bow-ui/src/main/webapp/js/bowpwd.js | 67 --- bow-ui/src/main/webapp/js/sha256.js | 363 ----------- bow-ui/src/main/webapp/styles/forms.css | 120 ---- bow-ui/src/main/webapp/styles/layout-1col.css | 47 -- .../src/main/webapp/styles/layout-navleft-1col.css | 51 -- .../src/main/webapp/styles/layout-navleft-2col.css | 59 -- .../src/main/webapp/styles/layout-navtop-1col.css | 52 -- .../src/main/webapp/styles/layout-navtop-3col.css | 63 -- .../main/webapp/styles/layout-navtop-localleft.css | 56 -- .../main/webapp/styles/layout-navtop-subright.css | 56 -- bow-ui/src/main/webapp/styles/layout.css | 145 ----- bow-ui/src/main/webapp/styles/main.css | 41 -- bow-ui/src/main/webapp/styles/nav-horizontal.css | 100 ---- bow-ui/src/main/webapp/styles/nav-vertical.css | 99 --- bow-ui/src/main/webapp/styles/tools.css | 88 --- bow-ui/src/main/webapp/styles/typo.css | 197 ------ bow-ui/src/main/webapp/template/simple/a-close.ftl | 68 --- .../main/webapp/template/simple/form-common.ftl | 84 --- .../webapp/template/xhtml/controlheader-core.ftl | 86 --- bow-ui/src/main/webapp/template/xhtml/file.ftl | 44 -- .../src/main/webapp/template/xhtml/form-close.ftl | 54 -- bow-ui/src/main/webapp/template/xhtml/form.ftl | 52 -- bow-ui/src/main/webapp/template/xhtml/password.ftl | 44 -- .../main/webapp/template/xhtml/submit-close.ftl | 21 - bow-ui/src/main/webapp/template/xhtml/submit.ftl | 43 -- bow-ui/src/main/webapp/template/xhtml/text.ftl | 44 -- bow-ui/src/main/xmi/README | 28 - bow-ui/src/main/xmi/bow-model.properties | 20 - bow-ui/src/main/xmi/bow-model.zargo | Bin 11741 -> 0 bytes bow-ui/src/site/site.xml | 41 -- conf/application.conf | 10 + conf/logback.xml | 42 ++ log/access.log | 0 log/bookmarks.log | 0 pom.xml | 576 ++++-------------- src/etc/stork.yml | 41 ++ src/main/java/com/chorem/bow/BowApp.java | 43 ++ src/main/java/com/chorem/bow/model/Action.java | 7 + .../com/chorem/bow/model/AuthenticationInfo.java | 18 + src/main/java/com/chorem/bow/model/Bookmark.java | 47 ++ src/main/java/com/chorem/bow/model/BowUser.java | 27 + .../bow/repositories/BookmarkRepository.java | 48 ++ .../chorem/bow/repositories/BowUserRepository.java | 62 ++ .../com/chorem/bow/rest/BookmarkResources.java | 33 + .../java/com/chorem/bow/rest/BowUserResources.java | 62 ++ src/main/java/com/chorem/spgeed/SpgeedModule.java | 60 ++ .../java/com/chorem/spgeed/SqlSessionProvider.java | 19 + .../resources/db/migration/V1__init_schema.sql | 127 ++++ src/main/templates/views/index.rocker.html | 3 + src/site/resources/images/camera.png | Bin 341 -> 0 bytes src/site/resources/images/croix.jpg | Bin 1246 -> 0 bytes src/site/resources/images/edit.jpg | Bin 1077 -> 0 bytes src/site/rst/developper/bow-model.rst | 59 -- src/site/rst/developper/installation.rst | 31 - src/site/rst/developper/presentation.rst | 29 - src/site/rst/index.rst | 71 --- src/site/rst/todo.rst | 44 -- src/site/rst/user/addBookmark.rst | 70 --- src/site/rst/user/alias.rst | 40 -- src/site/rst/user/getStarted.rst | 178 ------ src/site/rst/user/importExport.rst | 45 -- src/site/rst/user/openSearch.rst | 114 ---- src/site/rst/user/preferences.rst | 36 -- src/site/rst/user/search.rst | 42 -- src/site/rst/user/user.rst | 37 -- src/site/site.xml | 79 --- src/test/java/com/chorem/bow/BowAppTest.java | 20 + .../com/chorem/bow/rest/BowUserResourcesTest.java | 70 +++ src/test/java/com/chorem/bow/rest/RestHelper.java | 26 + 246 files changed, 879 insertions(+), 19407 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index dba13ed..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -<http://www.gnu.org/licenses/>. diff --git a/README.md b/README.md deleted file mode 100644 index 647501b..0000000 --- a/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Bow : Bookmark on the web -http://www.chorem.org/projects/show/bow - -Installation -============ -- compile with maven -- copy war in jetty or tomcat installation diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..cad8255 --- /dev/null +++ b/TODO.md @@ -0,0 +1,9 @@ +mettre dans le token JWT le user, pour ne plus a avoir a accéder à la base pour +chaque demande qu'il fait pour la récupération du user. + + +Database +======== + +- il faut que bowUser.emails soit unique sur tous les utilisateurs +- il faut que bookmark.publicAlias soit unique sur tous les utilisateurs diff --git a/TODO.txt b/TODO.txt deleted file mode 100644 index 620add4..0000000 --- a/TODO.txt +++ /dev/null @@ -1,35 +0,0 @@ -le 11 mai 2010 -A faire pour le vendredi 28 mai: - --> edition, suppression bookmark + tag (14 mai) OK --> triage multiple(nbre de clics, date d'ajout, Alpha) (14 mai) OK --> token temporaire (14 mai) OK --> completion ==> openSearch(xml) OK - ==> meta(ex:<link rel="search" type="application/opensearchdescription+xml" href="/w/opensearch_desc.php" title="Wikip�dia (fr)" />) OK --> le && pour le nuage de tag (11 mai) OK --> gestion des sessions (14 mai) OK --> javascript ==> (11 mai) OK --> Mise en forme (28 mai) - - -===> corriger ajout de tag quand vide - -===> ajout des tags par repertoire - -===> seeks.fr + champs pour recherche - -===> champ recherche fulltext - -===> class bookmarkFile = Id proprietaire, list<userID> writer, list<userId> reader; - -===> class bookmark = idBookmarkFile a la place de UserID; - -===> dans class user = String SearchEngine; - -===> openSearch ==> proposer des url - -===> facetisations - -===> getElementsByName(); - -===> formulaire diff --git a/bow-api/src/main/java/org/chorem/bow/BowContext.java b/bow-api/src/main/java/org/chorem/bow/BowContext.java deleted file mode 100644 index 78f7545..0000000 --- a/bow-api/src/main/java/org/chorem/bow/BowContext.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.chorem.bow; - -import org.nuiton.spgeed.SqlSession; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import javax.sql.DataSource; -import java.sql.SQLException; -import java.util.function.Function; - -@Component -public class BowContext { - @Autowired - private DataSource dataSource; - - @Autowired - private BowRepository repo; - - public <T, R> R doWith(Class<T> c, Function<T, R> f) { - try (SqlSession session = repo.getSqlSession(dataSource)) { - T dao = session.getDao(c); - R result = f.apply(dao); - return result; - } catch (SQLException eee) { - throw new RepositoryException("Can't close session", eee); - } - } - -} diff --git a/bow-api/src/main/java/org/chorem/bow/model/Bookmark.java b/bow-api/src/main/java/org/chorem/bow/model/Bookmark.java deleted file mode 100644 index c4c0208..0000000 --- a/bow-api/src/main/java/org/chorem/bow/model/Bookmark.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.chorem.bow.model; - -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import lombok.experimental.Accessors; -import org.springframework.hateoas.Identifiable; - -import java.net.URI; -import java.util.Date; -import java.util.UUID; - -@Getter -@Setter -@ToString -@Accessors(chain = true) -@EqualsAndHashCode(of = "id") -public class Bookmark implements Identifiable<UUID> { - private UUID id = UUID.randomUUID(); - private URI uri; - private String description; - private String[] labels; - private Date creationDate; - private Date importDate; - private String privateAlias; - private String publicAlias; - private String authenticationInfo; - private byte[] favicon; - private byte[] screenshot; -} diff --git a/bow-api/src/main/java/org/chorem/bow/model/BowPreference.java b/bow-api/src/main/java/org/chorem/bow/model/BowPreference.java deleted file mode 100644 index 9527229..0000000 --- a/bow-api/src/main/java/org/chorem/bow/model/BowPreference.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.chorem.bow.model; - -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import lombok.experimental.Accessors; -import org.springframework.hateoas.Identifiable; - -import java.util.List; -import java.util.UUID; - -@Getter -@Setter -@ToString -@Accessors(chain = true) -@EqualsAndHashCode(of = "id") -public class BowPreference implements Identifiable<UUID> { - private UUID id = UUID.randomUUID(); - private int tags; - private int bookmarks; - private String colors; - private boolean screeshot; - private boolean favicon; - private List<BowSearchPrefix> prefixes; -} diff --git a/bow-api/src/main/java/org/chorem/bow/model/BowSearchPrefix.java b/bow-api/src/main/java/org/chorem/bow/model/BowSearchPrefix.java deleted file mode 100644 index ee97f6f..0000000 --- a/bow-api/src/main/java/org/chorem/bow/model/BowSearchPrefix.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.chorem.bow.model; - -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import lombok.experimental.Accessors; - -import java.net.URL; - -@Accessors(chain = true) -@Getter -@Setter -@ToString -public class BowSearchPrefix { - private String prefix; - private URL search; - private URL suggestion; -} diff --git a/bow-api/src/main/java/org/chorem/bow/persistence/BookmarkRepository.java b/bow-api/src/main/java/org/chorem/bow/persistence/BookmarkRepository.java deleted file mode 100644 index 9874f49..0000000 --- a/bow-api/src/main/java/org/chorem/bow/persistence/BookmarkRepository.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.chorem.bow.persistence; - -import org.chorem.bow.model.Bookmark; -import org.nuiton.spgeed.Chunk; -import org.nuiton.spgeed.annotations.Select; - -import java.util.List; - -public interface BookmarkRepository { - - @Select(sql = "SELECT * FROM EnmaUser where (uri @@ to_tsquery(${fulltext}) or description @@ to_tsquery(${fulltext})) and tags=${tags}") - Chunk<Bookmark> findAll(Chunk<Bookmark> last, String fulltext, List<String> tags); - -} diff --git a/bow-api/src/main/java/org/chorem/bow/persistence/BowRepository.java b/bow-api/src/main/java/org/chorem/bow/persistence/BowRepository.java deleted file mode 100644 index 2715bc4..0000000 --- a/bow-api/src/main/java/org/chorem/bow/persistence/BowRepository.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.chorem.bow.persistence; - -import org.nuiton.spgeed.Query; -import org.nuiton.spgeed.SqlSession; - -import javax.sql.DataSource; -import java.util.Map; -import java.util.stream.Collectors; - -public class BowRepository { - - public SqlSession getSqlSession(DataSource dataSource) { - SqlSession result = new SqlSession(dataSource); - result.addFunction("keyValue", (Query query, Object in, Object... args) -> { - Map<String, Object> map = Map.class.cast(in); - String s = map.entrySet().stream() - .map(e -> e.getKey() + "=" + query.addSqlParameter(e.getValue())) - .collect(Collectors.joining(", ")); - return s; - }); - return result; - } - -} diff --git a/bow-api/src/main/java/org/chorem/bow/rest/BookmarkResources.java b/bow-api/src/main/java/org/chorem/bow/rest/BookmarkResources.java deleted file mode 100644 index 23a19e2..0000000 --- a/bow-api/src/main/java/org/chorem/bow/rest/BookmarkResources.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.chorem.bow.rest; - -import org.chorem.bow.BowContext; -import org.chorem.bow.model.Bookmark; -import org.nuiton.spgeed.Chunk; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping(path = "/bookmarks", produces = "application/json; charset=UTF-8") -public class BookmarkResources { - - @Autowired - private BowContext ctx; - - @GetMapping() - public BowChunk<Bookmark> list(@RequestParam(name = "page", defaultValue = "1") int page, @RequestParam(name = "page_size", defaultValue = "50") int pageSize) { - BowChunk<Bookmark> result = ctx.doWith(EnmaUserRepository.class, repo -> repo.findAll(Chunk.restart(pageSize, (page - 1) * pageSize))); - return result; - } - -} diff --git a/bow-extension-chromium/LICENSE.txt b/bow-extension-chromium/LICENSE.txt deleted file mode 100644 index dba13ed..0000000 --- a/bow-extension-chromium/LICENSE.txt +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -<http://www.gnu.org/licenses/>. diff --git a/bow-extension-chromium/README.md b/bow-extension-chromium/README.md deleted file mode 100644 index b23c8d4..0000000 --- a/bow-extension-chromium/README.md +++ /dev/null @@ -1,2 +0,0 @@ -Bow : Bookmark on the web -http://www.chorem.org/projects/show/bow diff --git a/bow-extension-chromium/cert.pem b/bow-extension-chromium/cert.pem deleted file mode 100644 index 7f374ed..0000000 --- a/bow-extension-chromium/cert.pem +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PUBLIC KEY----- -MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3upb6K/xHuNfkNjzY4arR4djT -L8XwtiIU7kvE4b1+QUUtuQJ6cLZf0g7rRrbF2+EILnvdXTYnt3sbGxpgL9xQI7bT -i1zRS+m/cqjSV0L7ZJEk+lodYyF6vH0T8gsCypcXrA+bIds6Hxc9CGZyjitaCbV0 -V9lggUxXVXZLwGTcgQIDAQAB ------END PUBLIC KEY----- diff --git a/bow-extension-chromium/key.pem b/bow-extension-chromium/key.pem deleted file mode 100644 index 13cc138..0000000 --- a/bow-extension-chromium/key.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALe6lvor/Ee41+Q2 -PNjhqtHh2NMvxfC2IhTuS8ThvX5BRS25Anpwtl/SDutGtsXb4Qgue91dNie3exsb -GmAv3FAjttOLXNFL6b9yqNJXQvtkkST6Wh1jIXq8fRPyCwLKlxesD5sh2zofFz0I -ZnKOK1oJtXRX2WCBTFdVdkvAZNyBAgMBAAECgYEAsJr3DTrCod6YB5HrIz6oiF7j -oPzG8/7e++ejhXjIQVhUOwMf0roNVEYCeT3b6ozU3pxwC/TRXZQNDZ0b2WGoDu6h -qB2nq70RXDLUwaPzY4w1zIZJtZL8uDI1t1H/D3bNvn2NJV5u3Fjh62b/K0wpcGPF -qt2XayZcOv+nN2C08AECQQDoCI4TRyZl+xbRfZD5CYNcnGgJPuFe0nIHmiymARj/ -MV0MI3wKqFMbxaaigzm19CwCtAKtfVzhN+wwAFo/aithAkEAyrTDH37pvKwv1n9r -/F198xRA5kmoxrWOv+psYLzoSp7PsayeF7fTEbH2VM8z7Ass3kt1ZBBDSfaZ8eg4 -T5hlIQJAeJCBakjtDc5i8+Vf39bul795W1x99Cw7LfIRQwyM9YSryXPirxL5ZBPW -Wtj+sqm1+I2aWpUqHqhVJDf6rLq44QJAGfc7w24TbNq1qglagNJNDvU6NwWafBHH -vme+CEpKizx6qGzPN4SRogOk5UpBgWwRDEyoNfArXm8bWzR++hswYQJAIdU9ZGku -ggnOvTmRtEv5M+dr4yjf2t3pflvbNIf6biHxf8ZNlwKeuD+32HGgvsRMuUwPqEK2 -NGsnreHsq4WuBg== ------END PRIVATE KEY----- diff --git a/bow-extension-chromium/pom.xml b/bow-extension-chromium/pom.xml deleted file mode 100644 index 0f8d6d2..0000000 --- a/bow-extension-chromium/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - BOW :: Chromium extension - %% - Copyright (C) 2011 - 2017 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses />. - #L% - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.chorem</groupId> - <artifactId>bow</artifactId> - <version>1.7-SNAPSHOT</version> - </parent> - - <artifactId>bow-extension-chromium</artifactId> - <packaging>crx</packaging> - - <name>BOW :: Chromium extension</name> - <description>Chromium extension for BOW</description> - <inceptionYear>2011</inceptionYear> - - <properties> - <crx.pemKey>${basedir}/key.pem</crx.pemKey> - <crx.pemCert>${basedir}/cert.pem</crx.pemCert> - </properties> - - <build> - <plugins> - <!-- use the war plugin to stage the crx files --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-war-plugin</artifactId> - <executions> - <execution> - <id>stage-crx</id> - <phase>prepare-package</phase> - <goals> - <goal>exploded</goal> - </goals> - </execution> - </executions> - </plugin> - - <!-- the crx is created in maven's package phase --> - <plugin> - <groupId>com.google.code</groupId> - <artifactId>crx-maven-plugin</artifactId> - <extensions>true</extensions> - </plugin> - - </plugins> - </build> - -</project> diff --git a/bow-extension-chromium/src/main/webapp/_locales/en/messages.json b/bow-extension-chromium/src/main/webapp/_locales/en/messages.json deleted file mode 100644 index 5c03605..0000000 --- a/bow-extension-chromium/src/main/webapp/_locales/en/messages.json +++ /dev/null @@ -1,116 +0,0 @@ -/* - * #%L - * BOW :: Chromium extension - * %% - * Copyright (C) 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -{ - "extensionName": { - "message": "BOW extension", - "description": "extension name" - }, - - "extensionDescription": { - "message": "BOW extension", - "description": "extension description" - }, - - "actionTitle": { - "message": "Bookmark this page in BOW", - "description": "action title" - }, - - "nameInputLabel": { - "message": "Name:", - "description": "label for name input" - }, - - "aliasInputLabel": { - "message": "Alias:", - "description": "label for alias input" - }, - - "tagsInputLabel": { - "message": "Tags:", - "description": "label for tags input" - }, - - "permanentTokenButton": { - "message": "Permanent token", - "description": "button to bookmark the page using the permanent token" - }, - - "emptyPermanentTokenMessage": { - "message": "You did not add your permanent token in the options. Please add it to be able to add bookmarks or use a session token.", - "description": "message when the user tries to ad bokkmark using his permanent token, but did not add it in the option" - }, - - "sessionTokenButton": { - "message": "Session token", - "description": "button to bookmark the page using the session token" - }, - - "noTokenMessage": { - "message": "You need to add either your permanent token or a session to token to be able to add a page in your BOW bookmarks.", - "description": "message displayed instead of the buttons when the user did not add his token ids" - }, - - "optionTitle": { - "message": "Options:", - "description": "option title" - }, - - "sessionTokenIdInputLabel": { - "message": "Session token ID:", - "description": "label for session token ID input" - }, - - "permanentTokenIdInputLabel": { - "message": "Permanent token ID:", - "description": "label for permanent token ID input" - }, - - "bowUrlInputLabel" : { - "message" : "Bow url :", - "description" : "Url of Bow" - }, - - "saveOptionButton": { - "message": "Save", - "description": "button to save options" - }, - - "licenseLink": { - "message": "AGPL license", - "description": "link to the license" - }, - - "bugReport": { - "message": "Bug report", - "description": "link to the bug report" - }, - - "userSupport": { - "message": "User support", - "description": "link to the user support" - }, - - "optionSavedMessage": { - "message": "Your options have been saved.", - "description": "message displayed when the user saves his options" - } -} diff --git a/bow-extension-chromium/src/main/webapp/_locales/fr/messages.json b/bow-extension-chromium/src/main/webapp/_locales/fr/messages.json deleted file mode 100644 index e448eb2..0000000 --- a/bow-extension-chromium/src/main/webapp/_locales/fr/messages.json +++ /dev/null @@ -1,111 +0,0 @@ -/* - * #%L - * BOW :: Chromium extension - * %% - * Copyright (C) 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -{ - "extensionName" : { - "message" : "Extension pour BOW", - "description" : "nom de l'extension" - }, - - "extensionDescription" : { - "message" : "Extension pour BOW", - "description" : "description de l'extension" - }, - - "actionTitle" : { - "message" : "Bookmarker cette page dans BOW", - "description" : "titre de l'action" - }, - - "nameInputLabel" : { - "message" : "Nom :", - "description" : "label pour l'input du nom" - }, - - "aliasInputLabel" : { - "message" : "Alias :", - "description" : "label pour l'input de l'alias" - }, - - "tagsInputLabel" : { - "message" : "Tags :", - "description" : "label pour l'input des tags" - }, - - "permanentTokenButton": { - "message": "Token permanent", - "description": "bouton pour bookmarker la page avec le token permanent" - }, - - "sessionTokenButton": { - "message": "Token de session", - "description": "bouton pour bookmarker la page avec le token de session" - }, - - "noTokenMessage": { - "message": "Vous devez renseigner votre identifiant de token permanent ou de token de session pour pouvoir bookmarker cette page dans BOW.", - "description": "message affiché à la place des boutons quand l'utilisateur n'a pas entré ses token ids" - }, - - "optionTitle" : { - "message" : "Options :", - "description" : "titre des options" - }, - - "sessionTokenIdInputLabel" : { - "message" : "Id du token de session :", - "description" : "label pour l'input de l'id du token de session" - }, - - "permanentTokenIdInputLabel" : { - "message" : "Id du token permanent :", - "description" : "label pour l'input de l'id du token permanent" - }, - - "bowUrlInputLabel" : { - "message" : "Url de Bow :", - "description" : "Url de l'instance de Bow" - }, - - "saveOptionButton" : { - "message" : "Enregistrer", - "description" : "bouton d'enregistrement des options" - }, - - "licenseLink" : { - "message" : "Licence AGPL", - "description" : "lien vers la licence" - }, - - "bugReport" : { - "message" : "Rapport de bug", - "description" : "lien vers le rapport de bug" - }, - - "userSupport" : { - "message" : "Support utilisateur", - "description" : "lien vers le support utilisateur" - }, - - "optionSavedMessage": { - "message": "Vos options ont été enregistrées.", - "description": "message affiché quand l'utilisateur a enregistré ses options" - } -} diff --git a/bow-extension-chromium/src/main/webapp/background.js b/bow-extension-chromium/src/main/webapp/background.js deleted file mode 100644 index 7fd3374..0000000 --- a/bow-extension-chromium/src/main/webapp/background.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * #%L - * BOW :: Chromium extension - * %% - * Copyright (C) 2011 - 2013 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -var tabInfos = new Array(); -var currentTabId; - -function getTabInfos() { - return tabInfos[currentTabId]; -}; - -// Called when the url of a tab changes. -function showAction(tabId, changeInfo, tab) { - // ... show the page action. - chrome.pageAction.show(tabId); - tabInfos[tabId] = { - "title" : tab.title, - "url" : tab.url - }; -}; - -// Listen for any changes to the URL of any tab. -chrome.tabs.onUpdated.addListener(showAction); - -function updateCurrentTabId(tabId, selectInfo) { - currentTabId = tabId; -}; - -// Listen for any tab selection changes. -chrome.tabs.onSelectionChanged.addListener(updateCurrentTabId); diff --git a/bow-extension-chromium/src/main/webapp/css/extension.css b/bow-extension-chromium/src/main/webapp/css/extension.css deleted file mode 100644 index 4d204af..0000000 --- a/bow-extension-chromium/src/main/webapp/css/extension.css +++ /dev/null @@ -1,73 +0,0 @@ -/* - * #%L - * BOW :: Chromium extension - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -body { - width: 330px; - height: 288px; - font-size: 12px; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-weight: bold; - background: #9EDCF8 url('/img/fondconnexion.jpg') no-repeat; - color: #804561; - padding: 5px 10px 5px 10px; -} - -h1 { - font-size: 18px; - width: 100%; - text-align: center; - margin-bottom: 20px; -} - -input[type="button"] { - float: right; - background: url('/img/fdboutonV.jpg') repeat-x; - color: #FFFFFF; - font-weight: bold; - border: none; - width: auto; - padding: 5px; - cursor: pointer; -} - -.labels { - margin-top: 10px; -} - -.inputs { - width: 100%; -} - -input[type="text"] { - width: 100%; -} - -#buttons { - width: 100%; - margin-top: 30px; - height: 30px; - text-align: center; - text-color: red; -} - -textarea { - width: 100%; - height: 100px; -} diff --git a/bow-extension-chromium/src/main/webapp/css/options.css b/bow-extension-chromium/src/main/webapp/css/options.css deleted file mode 100644 index da48a3c..0000000 --- a/bow-extension-chromium/src/main/webapp/css/options.css +++ /dev/null @@ -1,158 +0,0 @@ -/* - * #%L - * BOW :: Chromium extension - * %% - * Copyright (C) 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -@charset "utf-8"; -/* CSS Document */ -* { - padding: 0; - margin: 0; -} - -body { - font-size: 10px; - font-family: Verdana, Arial, Helvetica, sans-serif; -} - -#wrap { - clear: both; - float: left; - overflow-x: hidden; - overflow-y: visible; - position: relative; - width: 100%; - background-color: #9EDCF8; -} - -#footer { - background-color: #804561; - padding-top: 30px; -} - -#footer a { - color: #bf8a9c; -} - -#footer p { - font-size: 14px; - text-align: center; - line-height: 50px; -} - -#header { - background: #FFFFFF url('/img/fondhead.jpg') repeat-x; - width: 100%; - float: left; - height: 100px; - clear: both; - margin: 0 auto; - position: relative; -} - -#header a.logo { - background: url('/img/logobow.jpg'); - width: 290px; - height: 100px; - text-indent: -99999px; - display: block; -} - -#main { - width: 1004px; - margin: 0 auto; - position: relative; - clear: both; -} - -#page { - width: 100%; - margin: 0 auto; - clear: both; -} - -#content { - width: 1004px; - position: relative; - margin: 0 auto; - padding-top: 20px; -} - -#formFrame { - width: 225px; - height: 315px; - background: url('/img/fondconnexion.jpg') no-repeat; - position: relative; - margin: 100px auto; - padding: 10px 70px; -} - -#formFrame h1 { - color: #804561; - width: 225px; - position: relative; - margin: 15px auto; -} - -#formFrame div div { - color: #804561; - font-size: 16px; - font-weight: bold; - width: 225px; -} - -.label { - margin-top: 30px; -} - -.buttons { - position: absolute; - top: 250px; - text-align: center; -} - -#formFrame input[type="text"] { - width: 225px; -} - -#formFrame a { - position: absolute; - color: #804561; - left: 75px; - font-weight: bold; - font-size: 12px; -} - -#formFrame .message { - width: 100%; - color: green; - font-size: 12px; - text-align: center; - margin-top: 30px; -} - -#formFrame input[type="button"] { - background: url('/img/fdboutonV.jpg') repeat-x; - height: 31px; - color: #FFFFFF; - font-weight: bold; - border: none; - width: auto; - padding: 5px; - cursor: pointer; -} diff --git a/bow-extension-chromium/src/main/webapp/img/favicon.png b/bow-extension-chromium/src/main/webapp/img/favicon.png deleted file mode 100644 index 49de5d9..0000000 Binary files a/bow-extension-chromium/src/main/webapp/img/favicon.png and /dev/null differ diff --git a/bow-extension-chromium/src/main/webapp/img/fdboutonV.jpg b/bow-extension-chromium/src/main/webapp/img/fdboutonV.jpg deleted file mode 100644 index 7b95ac5..0000000 Binary files a/bow-extension-chromium/src/main/webapp/img/fdboutonV.jpg and /dev/null differ diff --git a/bow-extension-chromium/src/main/webapp/img/fondconnexion.jpg b/bow-extension-chromium/src/main/webapp/img/fondconnexion.jpg deleted file mode 100644 index ba06bb5..0000000 Binary files a/bow-extension-chromium/src/main/webapp/img/fondconnexion.jpg and /dev/null differ diff --git a/bow-extension-chromium/src/main/webapp/img/fondhead.jpg b/bow-extension-chromium/src/main/webapp/img/fondhead.jpg deleted file mode 100644 index 989921e..0000000 Binary files a/bow-extension-chromium/src/main/webapp/img/fondhead.jpg and /dev/null differ diff --git a/bow-extension-chromium/src/main/webapp/img/livre-128.png b/bow-extension-chromium/src/main/webapp/img/livre-128.png deleted file mode 100644 index 4d8bb4e..0000000 Binary files a/bow-extension-chromium/src/main/webapp/img/livre-128.png and /dev/null differ diff --git a/bow-extension-chromium/src/main/webapp/img/livre-16.png b/bow-extension-chromium/src/main/webapp/img/livre-16.png deleted file mode 100644 index 68b1362..0000000 Binary files a/bow-extension-chromium/src/main/webapp/img/livre-16.png and /dev/null differ diff --git a/bow-extension-chromium/src/main/webapp/img/livre-48.png b/bow-extension-chromium/src/main/webapp/img/livre-48.png deleted file mode 100644 index e2dc2a0..0000000 Binary files a/bow-extension-chromium/src/main/webapp/img/livre-48.png and /dev/null differ diff --git a/bow-extension-chromium/src/main/webapp/img/logobow.jpg b/bow-extension-chromium/src/main/webapp/img/logobow.jpg deleted file mode 100644 index c9ebcf8..0000000 Binary files a/bow-extension-chromium/src/main/webapp/img/logobow.jpg and /dev/null differ diff --git a/bow-extension-chromium/src/main/webapp/manifest.json b/bow-extension-chromium/src/main/webapp/manifest.json deleted file mode 100644 index 559178e..0000000 --- a/bow-extension-chromium/src/main/webapp/manifest.json +++ /dev/null @@ -1,47 +0,0 @@ -/* - * #%L - * BOW :: Chromium extension - * %% - * Copyright (C) 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -{ - "name": "__MSG_extensionName__", - "description": "__MSG_extensionDescription__", - "manifest_version": 2, - "version": "1.2", - "default_locale": "en", - - "icons": { - "16": "img/livre-16.png", - "48": "img/livre-48.png", - "128": "img/livre-128.png" - }, - - "page_action": { - "default_title": "__MSG_actionTitle__", - "default_icon": "img/favicon.png", - "default_popup": "popup.html" - }, - - "background": { - "scripts": ["background.js"] - }, - "options_page": "options.html", - "permissions": [ - "tabs", "http://*/*", "https://*/*" - ] -} diff --git a/bow-extension-chromium/src/main/webapp/options.html b/bow-extension-chromium/src/main/webapp/options.html deleted file mode 100644 index 05d1769..0000000 --- a/bow-extension-chromium/src/main/webapp/options.html +++ /dev/null @@ -1,85 +0,0 @@ -<!-- - #%L - BOW :: Chromium extension - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta name="description" content="Bookmarks On the Web" /> - - <title>BOW Extension Options</title> - - <link rel="icon" type="image/png" href="img/favicon.png" /> - <link rel="stylesheet" type="text/css" href="css/options.css" /> - - <script type="text/javascript" src="properties.js"></script> - <script type="text/javascript" src="options.js"></script> -</head> -<body> - <div id="wrap"> - <div id="page"> - <div id="header"> - <a class="logo" id="bow_logo" href="#">bow</a> - </div> - <div id="main"> - <div id="content"> - <div id="formFrame"> - <h1 id="title"></h1> - <div> - <div class="label"> - <label for="sessionTokenIdInput" id="sessionTokenIdInputLabel"></label> - </div> - <div class="inputs"> - <input type="text" name="sessionTokenIdInput" id="sessionTokenIdInput" /> - </div> - <div class="label"> - <label for="permanentTokenIdInput" id="permanentTokenIdInputLabel"></label> - </div> - <div class="inputs"> - <input type="text" name="permanentTokenIdInput" id="permanentTokenIdInput" /> - </div> - <div class="label"> - <label for="bowUrlInput" id="bowUrlInputLabel"></label> - </div> - <div class="inputs"> - <input type="text" name="bowUrlInput" id="bowUrlInput" /> - </div> - <div class="buttons"> - <input type="button" id="saveOptionButton"/> - </div> - <div class="message" id="formMessage"></div> - </div> - </div> - </div> - </div> - </div> - <div id="footer"> - <p> - <a shape="rect" id="bow_website" href="http://www.chorem.org/projects/show/bow" target="_blank">bow</a> - <a shape="rect" href="http://www.gnu.org/licenses/agpl.html" id="licenseLink"></a> - - <span title="Copyright">©2010 - 2011</span> - <a shape="rect" href="http://www.codelutin.com">Code Lutin</a> - - <a shape="rect" href="http://www.chorem.org/projects/bow/issues" id="bugReport"></a> - - <a shape="rect" href="http://list.chorem.org/cgi-bin/mailman/listinfo/bow-users" id="userSupport"></a> - </p> - </div> - </div> -</body> -</html> diff --git a/bow-extension-chromium/src/main/webapp/options.js b/bow-extension-chromium/src/main/webapp/options.js deleted file mode 100644 index 333dfbb..0000000 --- a/bow-extension-chromium/src/main/webapp/options.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - * #%L - * BOW :: Chromium extension - * %% - * Copyright (C) 2011 - 2013 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -// Saves options to localStorage. -function save_options() { - var permanentTokenIdInput = document.getElementById("permanentTokenIdInput"); - localStorage["permanentTokenId"] = permanentTokenIdInput.value; - - var sessionTokenIdInput = document.getElementById("sessionTokenIdInput"); - localStorage["sessionTokenId"] = sessionTokenIdInput.value; - - var bowUrlInput = document.getElementById("bowUrlInput"); - localStorage["bowUrl"] = bowUrlInput.value; - - var formMessage = document.getElementById("formMessage"); - formMessage.innerHTML = chrome.i18n.getMessage("optionSavedMessage"); -} - -// Restores values from localStorage. -function restore_options() { - var permanentTokenId = localStorage["permanentTokenId"]; - var sessionTokenId = localStorage["sessionTokenId"]; - - if (permanentTokenId) { - var permanentTokenIdInput = document.getElementById("permanentTokenIdInput"); - permanentTokenIdInput.value = permanentTokenId; - } - - if (sessionTokenId) { - var sessionTokenIdInput = document.getElementById("sessionTokenIdInput"); - sessionTokenIdInput.value = sessionTokenId; - } - - var bowUrlInput = document.getElementById("bowUrlInput"); - bowUrlInput.value = getBowURl(); -} - -function init() { - var bow_website_link = document.links["bow_website"]; - bow_website_link.href = DEFAULT_BOW_URL; - - var bow_logo_link = document.links["bow_logo"]; - bow_logo_link.href = DEFAULT_BOW_URL; - - // translate - var permanentTokenIdInputLabel = document.getElementById("permanentTokenIdInputLabel"); - permanentTokenIdInputLabel.innerHTML = chrome.i18n.getMessage("permanentTokenIdInputLabel"); - - var sessionTokenIdInputLabel = document.getElementById("sessionTokenIdInputLabel"); - sessionTokenIdInputLabel.innerHTML = chrome.i18n.getMessage("sessionTokenIdInputLabel"); - - var bowUrlInputLabel = document.getElementById("bowUrlInputLabel"); - bowUrlInputLabel.innerHTML = chrome.i18n.getMessage("bowUrlInputLabel"); - - var title = document.getElementById("title"); - title.innerHTML = chrome.i18n.getMessage("optionTitle"); - - var saveOptionButton = document.getElementById("saveOptionButton"); - saveOptionButton.value = chrome.i18n.getMessage("saveOptionButton"); - - var licenseLink = document.getElementById("licenseLink"); - licenseLink.innerHTML = chrome.i18n.getMessage("licenseLink"); - - var bugReport = document.getElementById("bugReport"); - bugReport.innerHTML = chrome.i18n.getMessage("bugReport"); - - var userSupport = document.getElementById("userSupport"); - userSupport.innerHTML = chrome.i18n.getMessage("userSupport"); -} - -document.addEventListener('DOMContentLoaded', function () { - init(); - restore_options(); - document.getElementById("saveOptionButton").addEventListener('click', save_options); -}); diff --git a/bow-extension-chromium/src/main/webapp/popup.html b/bow-extension-chromium/src/main/webapp/popup.html deleted file mode 100644 index e34ad27..0000000 --- a/bow-extension-chromium/src/main/webapp/popup.html +++ /dev/null @@ -1,54 +0,0 @@ -<!-- - #%L - BOW :: Chromium extension - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> -<html> - <head> - <script type="text/javascript" src="properties.js"></script> - <script type="text/javascript" src="popup.js"></script> - - <link rel="stylesheet" type="text/css" href="css/extension.css" /> - - </head> - <body> - <h1 id="title"></h1> - <div class="labels"> - <label for="nameInput" id="nameInputLabel"></label> - </div> - <div class="inputs"> - <textarea id="nameInput" name="nameInput"></textarea> - </div> - <div class="labels"> - <label for="aliasInput" id="aliasInputLabel"></label> - </div> - <div class="inputs"> - <input id="aliasInput" name="aliasInput" type="text" /> - </div> - <div class="labels"> - <label for="tagsInput" id="tagsInputLabel"></label> - </div> - <div class="inputs"> - <input id="tagsInput" name="tagsInput" type="text" /> - </div> - <div id="buttons"> - <input id="permanentTokenButton" type="button" /> - <input id="sessionTokenButton" type="button" /> - </div> - </body> -</html> diff --git a/bow-extension-chromium/src/main/webapp/popup.js b/bow-extension-chromium/src/main/webapp/popup.js deleted file mode 100644 index 4df98be..0000000 --- a/bow-extension-chromium/src/main/webapp/popup.js +++ /dev/null @@ -1,116 +0,0 @@ -/* - * #%L - * BOW :: Chromium extension - * %% - * Copyright (C) 2011 - 2013 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ - -function bookmarkPermanent() { - var tokenId = localStorage["permanentTokenId"]; - if (tokenId != null) { - bookmark(tokenId); - } -} - -function bookmarkSession() { - var tokenId = localStorage["sessionTokenId"]; - if (tokenId != null) { - bookmark(tokenId); - } -} - -function bookmark(tokenId) { - var tabInfos = chrome.extension.getBackgroundPage().getTabInfos(); - var url = tabInfos["url"]; - - var nameInput = document.getElementById("nameInput"); - var nameValue = nameInput.value; - - var aliasInput = document.getElementById("aliasInput"); - var aliasValue = aliasInput.value; - - var tagsInput = document.getElementById("tagsInput"); - var tagsValue = tagsInput.value; - - var link = getBowURl() + "/addUrl.action?token=" + tokenId - + "&link=" + encodeURIComponent(url) - + "&name=" + encodeURIComponent(nameValue) - + "&privateAlias=" + encodeURIComponent(aliasValue) - + "&tags=" + encodeURIComponent(tagsValue); - - var xhr = new XMLHttpRequest(); - xhr.open("GET", link, true); - xhr.onreadystatechange = function() { - if (xhr.readyState == 4) { - close(); - self.close(); - } - }; - xhr.send(); - -} - -function init() { - var tabInfos = chrome.extension.getBackgroundPage().getTabInfos(); - - var title = document.getElementById("title"); - title.innerHTML = chrome.i18n.getMessage("actionTitle"); - - var nameInputLabel = document.getElementById("nameInputLabel"); - nameInputLabel.innerHTML = chrome.i18n.getMessage("nameInputLabel"); - - var nameInput = document.getElementById("nameInput"); - nameInput.value = tabInfos["title"]; - - var aliasInputLabel = document.getElementById("aliasInputLabel"); - aliasInputLabel.innerHTML = chrome.i18n.getMessage("aliasInputLabel"); - - var tagsInputLabel = document.getElementById("tagsInputLabel"); - tagsInputLabel.innerHTML = chrome.i18n.getMessage("tagsInputLabel"); - - var sessionTokenId = localStorage["sessionTokenId"]; - var sessionTokenButton = document.getElementById("sessionTokenButton"); - if (!isEmpty(sessionTokenId)) { - sessionTokenButton.value = chrome.i18n.getMessage("sessionTokenButton"); - } else { - sessionTokenButton.style.visibility = "hidden"; - } - - var permanentTokenId = localStorage["permanentTokenId"]; - var permanentTokenButton = document.getElementById("permanentTokenButton"); - if (!isEmpty(permanentTokenId)) { - permanentTokenButton.value = chrome.i18n.getMessage("permanentTokenButton"); - } else { - permanentTokenButton.style.visibility = "hidden"; - } - - if (isEmpty(permanentTokenId) && isEmpty(sessionTokenId)) { - var buttons = document.getElementById("buttons"); - buttons.innerHTML = chrome.i18n.getMessage("noTokenMessage"); - } - -} - -function isEmpty(string) { - return (string == null || string == ""); -} - -document.addEventListener('DOMContentLoaded', function () { - init(); - document.getElementById('permanentTokenButton').addEventListener('click', bookmarkPermanent); - document.getElementById('sessionTokenButton').addEventListener('click', bookmarkSession); -}); diff --git a/bow-extension-chromium/src/main/webapp/properties.js b/bow-extension-chromium/src/main/webapp/properties.js deleted file mode 100644 index c266772..0000000 --- a/bow-extension-chromium/src/main/webapp/properties.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * #%L - * BOW :: Chromium extension - * %% - * Copyright (C) 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -var DEFAULT_BOW_URL = "http://bow.chorem.org/bow"; - -function getBowURl() { - var bowUrl = localStorage["bowUrl"]; - if (!bowUrl) { - bowUrl = DEFAULT_BOW_URL; - } - return bowUrl -} - diff --git a/bow-extension-chromium/src/site/site.xml b/bow-extension-chromium/src/site/site.xml deleted file mode 100644 index 03277b6..0000000 --- a/bow-extension-chromium/src/site/site.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - BOW :: Chromium extension - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> - -<project name="${project.name}" - xmlns="http://maven.apache.org/DECORATION/1.4.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0 http://maven.apache.org/xsd/decoration-1.4.0.xsd"> - - <bannerLeft> - <name>${project.name}</name> - <href>index.html</href> - </bannerLeft> - - <body> - - <breadcrumbs> - <item name="${project.name}" href="index.html"/> - </breadcrumbs> - - <menu ref="parent"/> - <menu ref="reports"/> - - </body> -</project> diff --git a/bow-ui/LICENSE.txt b/bow-ui/LICENSE.txt deleted file mode 100644 index dba13ed..0000000 --- a/bow-ui/LICENSE.txt +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -<http://www.gnu.org/licenses/>. diff --git a/bow-ui/README.md b/bow-ui/README.md deleted file mode 100644 index 647501b..0000000 --- a/bow-ui/README.md +++ /dev/null @@ -1,7 +0,0 @@ -Bow : Bookmark on the web -http://www.chorem.org/projects/show/bow - -Installation -============ -- compile with maven -- copy war in jetty or tomcat installation diff --git a/bow-ui/pom.xml b/bow-ui/pom.xml deleted file mode 100644 index f82f9d6..0000000 --- a/bow-ui/pom.xml +++ /dev/null @@ -1,456 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2017 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses />. - #L% - --> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.chorem</groupId> - <artifactId>bow</artifactId> - <version>1.7-SNAPSHOT</version> - </parent> - - <artifactId>bow-ui</artifactId> - <packaging>war</packaging> - - <name>BOW UI</name> - <description>bookmarks on web UI</description> - <inceptionYear>2010</inceptionYear> - - <properties> - <i18n.bundles>fr_FR,en_GB</i18n.bundles> - <i18n.silent>true</i18n.silent> - <i18n.bundleOutputName>bow-i18n</i18n.bundleOutputName> - <i18n.bundleOutputDir> - ${basedir}/target/generated-sources/resources - </i18n.bundleOutputDir> - <i18n.addBundleOuputDirParent>false</i18n.addBundleOuputDirParent> - - <redmine.releaseFiles>target/${project.artifactId}-${project.version}.war</redmine.releaseFiles> - - <!-- Post Release configuration --> - <skipPostRelease>false</skipPostRelease> - <redmine.releaseFiles>target/${project.artifactId}-${project.version}.war</redmine.releaseFiles> - </properties> - - <dependencies> - - <!-- compile dependencies --> - - <dependency> - <groupId>org.nuiton</groupId> - <artifactId>nuiton-utils</artifactId> - </dependency> - - <dependency> - <groupId>org.nuiton</groupId> - <artifactId>nuiton-config</artifactId> - </dependency> - - <dependency> - <groupId>org.nuiton.web</groupId> - <artifactId>nuiton-struts2</artifactId> - </dependency> - - <dependency> - <groupId>org.nuiton.i18n</groupId> - <artifactId>nuiton-i18n</artifactId> - </dependency> - - <dependency> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-api</artifactId> - <exclusions> - <exclusion> - <groupId>org.jacorb</groupId> - <artifactId>jacorb</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.jacorb</groupId> - <artifactId>jacorb</artifactId> - <version>2.3.1</version> - <exclusions> - <exclusion> - <groupId>picocontainer</groupId> - <artifactId>picocontainer</artifactId> - </exclusion> - <exclusion> - <groupId>picocontainer</groupId> - <artifactId>picocontainer-gems</artifactId> - </exclusion> - <exclusion> - <groupId>picocontainer</groupId> - <artifactId>picocontainer-tck</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.apache.struts</groupId> - <artifactId>struts2-core</artifactId> - </dependency> - - <dependency> - <groupId>org.apache.struts.xwork</groupId> - <artifactId>xwork-core</artifactId> - </dependency> - - <dependency> - <groupId>com.jgeppert.struts2.jquery</groupId> - <artifactId>struts2-jquery-plugin</artifactId> - </dependency> - - <dependency> - <groupId>javassist</groupId> - <artifactId>javassist</artifactId> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - </dependency> - - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </dependency> - - <dependency> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - </dependency> - - <dependency> - <groupId>commons-codec</groupId> - <artifactId>commons-codec</artifactId> - </dependency> - - <dependency> - <groupId>org.htmlparser</groupId> - <artifactId>htmlparser</artifactId> - </dependency> - - <dependency> - <groupId>javax.mail</groupId> - <artifactId>mail</artifactId> - </dependency> - - <!-- provided dependencies --> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jsp-api</artifactId> - <scope>provided</scope> - </dependency> - - <!-- runtime dependencies --> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jstl</artifactId> - </dependency> - - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-jdbc</artifactId> - <scope>runtime</scope> - <exclusions> - <exclusion> - <groupId>org.jacorb</groupId> - <artifactId>jacorb</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-solr</artifactId> - <scope>runtime</scope> - <exclusions> - <exclusion> - <groupId>org.jacorb</groupId> - <artifactId>jacorb</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.struts</groupId> - <artifactId>struts2-config-browser-plugin</artifactId> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.apache.struts</groupId> - <artifactId>struts2-sitemesh-plugin</artifactId> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <scope>compile</scope> - </dependency> - - <dependency> - <groupId>org.postgresql</groupId> - <artifactId>postgresql</artifactId> - </dependency> - - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpcore</artifactId> - </dependency> - - <!-- used to call screenshot service and to get suggestion from search engine --> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - </dependency> - - <!-- used to parse html and extract favicon url --> - <dependency> - <groupId>org.jsoup</groupId> - <artifactId>jsoup</artifactId> - </dependency> - - <dependency> - <groupId>com.github.rjeschke</groupId> - <artifactId>txtmark</artifactId> - </dependency> - - </dependencies> - - <build> - <resources> - <resource> - <directory>src/main/resources</directory> - <includes> - <include>**/*</include> - </includes> - <filtering>true</filtering> - </resource> - </resources> - <plugins> - <plugin> - <groupId>org.nuiton.eugene</groupId> - <artifactId>eugene-maven-plugin</artifactId> - <executions> - <execution> - <id>api generator</id> - <phase>generate-sources</phase> - <configuration> - <inputs> - <input>zargo</input> - <input>classpath:model:/:wikitty.objectmodel</input> - </inputs> - <!-- <resolver>org.nuiton.util.FasterCachedResourceResolver</resolver> --> - <templates>org.nuiton.wikitty.generator.WikittyMetaGenerator - </templates> - <fullPackagePath>org.chorem.bow</fullPackagePath> - <defaultPackage>org.chorem.bow</defaultPackage> - <extractedPackages> - org.chorem.bow,org.nuiton.wikitty - </extractedPackages> - <generatedPackages>org.chorem.bow</generatedPackages> - </configuration> - <goals> - <goal>smart-generate</goal> - </goals> - </execution> - </executions> - - <dependencies> - <dependency> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-generators</artifactId> - <version>${wikittyVersion}</version> - </dependency> - </dependencies> - </plugin> - - <plugin> - <groupId>org.nuiton.i18n</groupId> - <artifactId>i18n-maven-plugin</artifactId> - <executions> - <execution> - <id>scan-java-sources</id> - <goals> - <goal>parserJava</goal> - </goals> - </execution> - <execution> - <id>scan-jsp-sources</id> - <goals> - <goal>parserStruts2</goal> - </goals> - <configuration> - <acceptKeyFormat>^bow\..*$</acceptKeyFormat> - </configuration> - </execution> - <execution> - <id>gen-and-make-bundle</id> - <goals> - <goal>gen</goal> - <goal>bundle</goal> - </goals> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy</id> - <phase>generate-sources</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.chorem</groupId> - <artifactId>bow-extension-chromium</artifactId> - <version>${project.version}</version> - <type>crx</type> - <overWrite>true</overWrite> - <outputDirectory> - ${project.build.directory}/${project.build.finalName}/extensions/ - </outputDirectory> - <destFileName>bow4chromium.crx</destFileName> - </artifactItem> - </artifactItems> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>com.samaxes.maven</groupId> - <artifactId>minify-maven-plugin</artifactId> - <version>1.7.4</version> - <executions> - <execution> - <id>default-minify</id> - <!--<phase>package</phase> When omitted defaults to 'process-resources' --> - <configuration> - <charset>UTF-8</charset> - <cssSourceDir>css</cssSourceDir> - <cssSourceFiles> - <cssSourceFile>bookmark.css</cssSourceFile> - <cssSourceFile>jquery-ui-1.8.11.custom.bow.css</cssSourceFile> - <cssSourceFile>global.css</cssSourceFile> - </cssSourceFiles> - <cssFinalFile>bow.css</cssFinalFile> - <jsSourceDir>js</jsSourceDir> - <jsSourceFiles> - <jsSourceFile>bookmark.js</jsSourceFile> - </jsSourceFiles> - <jsFinalFile>bow.js</jsFinalFile> - <jsEngine>CLOSURE</jsEngine> - </configuration> - <goals> - <goal>minify</goal> - </goals> - </execution> - <execution> - <id>scriptlet-bowadd-minify</id> - <!--<phase>package</phase> When omitted defaults to 'process-resources' --> - <configuration> - <charset>UTF-8</charset> - <jsSourceDir>js</jsSourceDir> - <webappTargetDir>${project.build.directory}</webappTargetDir> - <jsTargetDir>classes</jsTargetDir> - <jsSourceFiles> - <jsSourceFile>bowadd.js</jsSourceFile> - </jsSourceFiles> - <jsFinalFile>bowadd.js</jsFinalFile> - <jsEngine>CLOSURE</jsEngine> - </configuration> - <goals> - <goal>minify</goal> - </goals> - </execution> - <execution> - <id>scriptlet-bowpwd-minify</id> - <!--<phase>package</phase> When omitted defaults to 'process-resources' --> - <configuration> - <charset>UTF-8</charset> - <jsSourceDir>js</jsSourceDir> - <webappTargetDir>${project.build.directory}</webappTargetDir> - <jsTargetDir>classes</jsTargetDir> - <jsSourceFiles> - <jsSourceFile>sha256.js</jsSourceFile> - <jsSourceFile>bowpwd.js</jsSourceFile> - </jsSourceFiles> - <jsFinalFile>bowpwd-sha256.js</jsFinalFile> - <jsEngine>CLOSURE</jsEngine> - </configuration> - <goals> - <goal>minify</goal> - </goals> - </execution> - </executions> - </plugin> - - </plugins> - </build> - -</project> diff --git a/bow-ui/src/license/THIRD-PARTY.properties b/bow-ui/src/license/THIRD-PARTY.properties deleted file mode 100644 index 03beb06..0000000 --- a/bow-ui/src/license/THIRD-PARTY.properties +++ /dev/null @@ -1,46 +0,0 @@ -# Generated by org.codehaus.mojo.license.AddThirdPartyMojo -#------------------------------------------------------------------------------- -# Already used licenses in project : -# - Apache 2 -# - Apache License -# - Apache License 2.0 -# - Apache Software License, version 1.1 -# - BSD License -# - BSD style -# - BSD-style license -# - CDDL -# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 -# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) v1.0 -# - Common Development and Distribution License (CDDL) v1.0 -# - Common Public License -# - GNU Lesser General Public License, version 2.1 -# - GPLv2+CE -# - Indiana University Extreme! Lab Software License, vesion 1.1.1 -# - Lesser General Public License (LGPL) v 3.0 -# - Lesser General Public License (LPGL) -# - Lesser General Public License (LPGL) v 2.1 -# - MIT License -# - MPL 1.1 -# - Public Domain -# - Public domain -# - TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC. -# - The Apache Software License, Version 1.1 -# - The Apache Software License, Version 2.0 -# - The MIT License -#------------------------------------------------------------------------------- -# Please fill the missing licenses for dependencies : -# -# -#Mon Jul 20 19:30:15 CEST 2015 -com.h2database--h2--1.4.187=MPL 2.0 -commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 -concurrent--concurrent--1.0=TECHNOLOGY LICENSE FROM SUN MICROSYSTEMS, INC. -gnu.cajo--cajo--1.168=Lesser General Public License (LPGL) -javax.servlet--jsp-api--2.0=Common Development and Distribution License (CDDL) v1.0 -javax.servlet--jstl--1.2=Common Development and Distribution License (CDDL) v1.0 -javax.servlet--servlet-api--2.5=Common Development and Distribution License (CDDL) v1.0 -javax.transaction--jta--1.1=COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) v1.0 -org.apache.zookeeper--zookeeper--3.4.5=The Apache Software License, Version 2.0 -org.jacorb--jacorb--2.3.1.jbossorg-1=Lesser General Public License (LPGL) -oro--oro--2.0.8=The Apache Software License, Version 2.0 -xpp3--xpp3_min--1.1.3.4.O=Indiana University Extreme\! Lab Software License, vesion 1.1.1 diff --git a/bow-ui/src/main/i18n/jsp.rules b/bow-ui/src/main/i18n/jsp.rules deleted file mode 100644 index 543e5e9..0000000 --- a/bow-ui/src/main/i18n/jsp.rules +++ /dev/null @@ -1,9 +0,0 @@ -# Règles i18n pour les jsp - -//s:text/@name -//s:submit/@key -//s:textfield/@key -//s:password/@key -//s:file/@key - -//sx:datetimepicker/@key diff --git a/bow-ui/src/main/java/org/chorem/bow/BookmarkUtils.java b/bow-ui/src/main/java/org/chorem/bow/BookmarkUtils.java deleted file mode 100644 index 53d4286..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/BookmarkUtils.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow; - -import java.net.URI; -import java.net.URL; -import java.net.URLEncoder; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.util.StringUtil; - -import java.util.Date; -import java.util.Set; -import java.util.HashSet; -import java.util.List; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.io.IOUtils; -import org.apache.http.HttpEntity; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.util.EntityUtils; -import org.jsoup.Jsoup; -import org.jsoup.nodes.Document; -import org.nuiton.wikitty.entities.Element; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; -import org.nuiton.wikitty.query.WikittyQueryParser; -import org.nuiton.wikitty.services.WikittyServiceAuthorisation; - -public class BookmarkUtils { - - /** Logger. */ - public static Log log = LogFactory.getLog(BookmarkUtils.class); - - protected final static WikittyQueryParser queryParser = new WikittyQueryParser(); - static { - queryParser.addAlias("tag:([^ $]+)", BowBookmark.FQ_FIELD_WIKITTYLABEL_LABELS + "~\"$1\"" ); - queryParser.addAlias("tag=([^ $]+)", BowBookmark.FQ_FIELD_WIKITTYLABEL_LABELS + "=\"$1\"" ); - queryParser.addAlias("date:([^ $]+)", - BowBookmark.FQ_FIELD_BOWBOOKMARK_CREATIONDATE + "=[date($1/DAY) TO date($1/DAY+1DAY)]"); - queryParser.addAlias("before:([^ $]+)", BowBookmark.FQ_FIELD_BOWBOOKMARK_CREATIONDATE + "<date($1)"); - queryParser.addAlias("after:([^ $]+)", BowBookmark.FQ_FIELD_BOWBOOKMARK_CREATIONDATE + ">date($1)"); - } - - /** - * Title is first sentence of description, or link if no description - * @param b - * @param max maximum length of title, 0 == no limit - * @return - */ - public static String getTitle(BowBookmark b, int max) { - String result = StringUtils.substringBefore(b.getDescription(), "."); - if (StringUtils.isBlank(result)) { - result = b.getLink(); - } - if (max > 0) { - result = StringUtils.substring(result, 0, max); - result = StringUtils.substringBeforeLast(result, " ") + "..."; - } - return result; - } - - /** - * Ajoute a la recherche tout ce qui est necessaire pour connaitre - * toutes les informations que l'utilisateur peut voir, meme s'il n'est - * pas le createur de ce bookmark - * - * @param search - * @param userId - * @return - */ - public static WikittyQueryMaker addEqUser(WikittyQueryMaker search, String userId) { - search.or(); - search.eq(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_OWNER, userId); - search.eq(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_READER, userId); - search.eq(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_WRITER, userId); - search.eq(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_ADMIN, userId); - - search.containsOne(BowBookmark.ELEMENT_FIELD_WIKITTYAUTHORISATION_PARENT) - .select(Element.ID).where() - .or() - // si on est membre d'un group on peut voir les bookmarks de ce groupe - .eq(BowGroup.ELEMENT_FIELD_WIKITTYGROUP_MEMBERS, userId) - // on peut aussi voir tous les bookmarks public - .eq(BowGroup.ELEMENT_FIELD_WIKITTYAUTHORISATION_READER, WikittyServiceAuthorisation.PUBLIC) - .close() - .close(); - search.close(); - - return search; - } - - public static WikittyQuery getBookmarkListCriteriaByUser(BowUser user, - List<String> listId, String tagLine, String fullTextLine, - boolean notmine, String order, int first) { - - WikittyQueryMaker search = new WikittyQueryMaker().and(); - search.exteq(BowBookmark.EXT_BOWBOOKMARK); - addEqUser(search, user.getWikittyId()); - - if (notmine) { - search.ne(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_OWNER, user.getWikittyId()); - } - - if (CollectionUtils.isNotEmpty(listId)) { - search.containsOne(Element.ID, listId); - } - - if (StringUtils.isNotBlank(fullTextLine)) { - WikittyQuery query = queryParser.parseQuery(fullTextLine); - search.condition(query.getCondition()); - } - - if (StringUtils.isNotBlank(tagLine)) { - Set<String> tags = BowUtils.getWords(tagLine); - // on separe les tags commencant par '-' des autres - Set<String> tagsInclude = new HashSet<String>(); - Set<String> tagsExclude = new HashSet<String>(); - for (String tag : tags) { - if (StringUtils.startsWith(tag, "-")) { - tagsExclude.add(StringUtils.removeStart(tag, "-")); - } else { - // \ peut-etre utilise pour echappe le caractere - et - // ainsi permettre les tags commencant par - - tagsInclude.add(StringUtils.removeStart(tag, "\\")); - } - } - if (!tagsInclude.isEmpty()) { - search.containsAll(BowBookmark.FQ_FIELD_WIKITTYLABEL_LABELS, tagsInclude); - } - if (!tagsExclude.isEmpty()) { - search.not().containsAll(BowBookmark.FQ_FIELD_WIKITTYLABEL_LABELS, tagsExclude).close(); - } - } - - WikittyQuery criteria = search.end(); - criteria.addFacetField(BowBookmark.ELEMENT_FIELD_WIKITTYLABEL_LABELS); - // on fixe le nombre de tag max souhaite par l'utilisateur - criteria.setFacetLimit(user.getTags()); - - criteria.setOffset(first); - - // on fixe le nombre max d'element a ce qu'a defini l'utilisateur - criteria.setLimit(user.getBookmarks()); - - boolean sortOrderAscending = StringUtils.startsWith(order, "asc"); - Element sortOrderField = null; - if (StringUtils.equals(order, "ascName")) { - sortOrderField = BowBookmark.ELEMENT_FIELD_BOWBOOKMARK_DESCRIPTION; - } else if (StringUtils.equals(order, "ascDate")) { - sortOrderField = BowBookmark.ELEMENT_FIELD_BOWBOOKMARK_CREATIONDATE; - } else if (StringUtils.equals(order, "ascClick")) { - sortOrderField = BowBookmark.ELEMENT_FIELD_BOWBOOKMARK_CLICK; - } else if (StringUtils.equals(order, "descName")) { - sortOrderField = BowBookmark.ELEMENT_FIELD_BOWBOOKMARK_DESCRIPTION; - } else if (StringUtils.equals(order, "descDate")) { - sortOrderField = BowBookmark.ELEMENT_FIELD_BOWBOOKMARK_CREATIONDATE; - } else if (StringUtils.equals(order, "descClick")) { - sortOrderField = BowBookmark.ELEMENT_FIELD_BOWBOOKMARK_CLICK; - } - if (sortOrderField == null) { - // default sort order - // TODO poussin 20110815 rendre configurable par l'utilisateur l'ordre par defaut qu'il prefere - sortOrderField = BowBookmark.ELEMENT_FIELD_BOWBOOKMARK_CLICK; - sortOrderAscending = false; - } - - if (sortOrderAscending) { - criteria.setSortAscending(sortOrderField); - } else { - criteria.setSortDescending(sortOrderField); - } - - return criteria; - } - - /** - * @param url String which contains the bookmark url - * @param nameAndTags String which contains the name and the tags of the - * bookmark separated by '|' ==> name|tag1 tag2... - * @param user bookmark user - * @return Bookmark the website bookmark, null if all fields are not correctly filled - */ - public static BowBookmark createBookmark(String url, String nameAndTags, BowUser user) { - - // on recherche les tags qui doivent etre apres le dernier | - // ce qu'il y a devant est la description qui peut elle aussi contenir - // des | - - // on s'assure que la chaine est non null, et en enleve les blanc en trop - String name = BowUtils.normalizeString(nameAndTags); - String tags = ""; // par defaut on a pas de tag - - int nameIndex = name.lastIndexOf('|'); - if (nameIndex > 0) { - // il faut faire tags avant name, car on change name ensuite - tags = name.substring(nameIndex + 1); - name = name.substring(0, nameIndex); // get the website description - } - BowBookmark bookmark = createBookmark(url, name, tags, user, "", "", null); - - return bookmark; - } - - /** - * Create new Bookmark - * - * @param url of bookmark - * @param name of bookmark - * @param tags of bookmark - * @param user creating bookmark - * @param privateAlias of bookmark - * @param publicAlias - * @param date of creation - * @return bookMarl created - */ - public static BowBookmark createBookmark(String url, String name, String tags, - BowUser user, String privateAlias, String publicAlias, Date date) { - - BowBookmark bookmark = new BowBookmarkImpl(); - - bookmark.setDescription(BowUtils.normalizeString(name)); - - bookmark.addAllLabels(BowUtils.getWords(tags)); - bookmark.setLink(BowUtils.normalizeUrl(url)); - - bookmark.setClick(0); - - bookmark.setOwner(user.getWikittyId()); - bookmark.addReader(user.getWikittyId()); // only owner can read it - bookmark.setCreationDate(BowUtils.normalizeDate(date)); - - bookmark.setPrivateAlias(BowUtils.normalizeString(privateAlias)); - bookmark.setPublicAlias(BowUtils.normalizeString(publicAlias)); - - return bookmark; - } - - public static void updateBookmark(BowBookmark bookmark, String name, - String link, String tags, String privateAlias, String publicAlias) { - bookmark.setDescription(BowUtils.normalizeString(name)); - - bookmark.setLink(BowUtils.normalizeUrl(link)); - bookmark.setLabels(BowUtils.getWords(tags)); - - bookmark.setPrivateAlias(BowUtils.normalizeString(privateAlias)); - bookmark.setPublicAlias(BowUtils.normalizeString(publicAlias)); - } - - public static String getBookmarkTagsString(BowBookmark bookmark) { - if (bookmark != null) { - Set<String> tags = bookmark.getLabels(); - if (tags != null) { - return StringUtil.join(tags, " ", true); - } - } - return ""; - } - - /** - * retourne l'image du site passer en parametre - * @param url - * @return - */ - public static byte[] getScreenshot(String url) { - byte[] result = null; - try { - String ssu = BowConfig.getScreenshotURL(); - if (StringUtils.isNotBlank(ssu)) { - url = URLEncoder.encode(url, "UTF-8"); - String imageUrl = String.format(ssu, url); - result = getImage(imageUrl); - } - } catch (Exception eee) { - log.info("Can't encode URL: " + url, eee); - } - return result; - } - - /** - * retourne le favicon du site passe en parametre - * @param urlString - * @return - */ - public static byte[] getFavicon(String urlString) { - byte[] result = null; - try { - String favicon = null; - - // on commence par rechercher le favicon specifie dans le head - Document doc = Jsoup.connect(urlString).get(); - org.jsoup.nodes.Element link = doc.head().select("link[rel~=(shortcut icon|icon)]").first(); - if (link != null) { - favicon = link.attr("abs:href"); - } - - // si rien n'est specifie dans le head, on recherche un /favicon.ico - if (favicon == null) { - URL url = new URI(urlString).toURL(); - URL favURL = new URL(url.getProtocol(), url.getHost(), url.getPort(), "/favicon.ico"); - favicon = favURL.toExternalForm(); - } - result = getImage(favicon); - return result; - } catch (Exception eee) { - log.info("Can't parse URL: " + urlString, eee); - } - return result; - } - - protected static byte[] getImage(String url) { - byte[] result = null; - try { - log.debug("try to connect get image : " + url); - - CloseableHttpClient httpclient = HttpClients.createDefault(); - HttpGet httpGet = new HttpGet(url); - CloseableHttpResponse response = httpclient.execute(httpGet); - - try { - HttpEntity entity = response.getEntity(); - result = IOUtils.toByteArray(entity.getContent()); - // ensure it is fully consumed - EntityUtils.consume(entity); - } finally { - response.close(); - } - } catch (Exception eee) { - log.info("Can't get result for url: " + url, eee); - } - return result; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/BowConfig.java b/bow-ui/src/main/java/org/chorem/bow/BowConfig.java deleted file mode 100644 index 81a6d66..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/BowConfig.java +++ /dev/null @@ -1,450 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.config.ApplicationConfig; -import org.nuiton.util.StringUtil; -import org.nuiton.wikitty.WikittyConfigOption; - -/** - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class BowConfig { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(BowConfig.class); - - public static final String GROUP_MARK = "@"; - public static final String USER_MARK = "#"; - - /** Singleton instance. */ - protected static ApplicationConfig config; - - /** - * constructeur public seulement pour pouvoir mettre une variable de ce - * type dans BowBaseAction et acceder facilement au donnees dans les jsp - * en ognl - */ - public BowConfig() { - } - - public static ApplicationConfig getConfig(String... args) { - if (config == null) { - synchronized (BowConfig.class) { - if (config == null) { - try { - config = new ApplicationConfig(BowConfigOption.CONFIG_FILE.getDefaultValue()); - - // Load wikitty options - config.loadDefaultOptions(WikittyConfigOption.class); - - // Load bow options - config.loadDefaultOptions(BowConfigOption.class); - - // Parse args - config.parse(args); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - } - } - return config; - } - - /** - * Get version as string. - * Default bow applicationConfig will be used - * - * @return version - */ - public static String getVersion() { - return getVersion(getConfig()); - } - - /** - * Get version as string. - * - * @param config bow configuration - * @return version - */ - public static String getVersion(ApplicationConfig config) { - return config.getOption(BowConfigOption.APPLICATION_VERSION.key); - } - - /** - * Get bow url as string. - * Default bow applicationConfig will be used - * - * @return url - */ - public static String getBowUrl() { - return getBowUrl(getConfig()); - } - - /** - * Get bow url as string. - * - * @param config bow configuration - * @return url - */ - public static String getBowUrl(ApplicationConfig config) { - String result = config.getOption(BowConfigOption.BOW_URL.key); - if (result != null && result.charAt(result.length() - 1) != '/') { - result += '/'; - } - return result; - } - - /** - * Get alias url as string. - * Default bow applicationConfig will be used - * - * @return url - */ - public static String getAliasUrl() { - return getAliasUrl(getConfig()); - } - - /** - * Get alias url as string. - * - * @param config bow configuration - * @return url - */ - public static String getAliasUrl(ApplicationConfig config) { - String result = config.getOption(BowConfigOption.ALIAS_URL.key); - if (result != null && result.charAt(result.length() - 1) != '/') { - result += '/'; - } - return result; - } - - /** - * return true if public group is allowed - * Default bow applicationConfig will be used - * - * @return true if public group is allowed - * @since 1.5 - */ - public static boolean isAllowPublicGroup() { - return isAllowPublicGroup(getConfig()); - } - - /** - * return true if public group is allowed - * - * @param config bow configuration - * @return true if public group is allowed - * @since 1.5 - */ - public static boolean isAllowPublicGroup(ApplicationConfig config) { - return config.getOptionAsBoolean(BowConfigOption.BOW_ALLOW_PUBLIC_GROUP.key); - } - - /** - * Get bow screenshot url server as string. - * Default bow applicationConfig will be used - * - * @return screenshot url - * @since 1.3 - */ - public static String getScreenshotURL() { - return getScreenshotURL(getConfig()); - } - - /** - * Get bow screenshot url server as string. - * - * @param config bow configuration - * @return screenshot url - * @since 1.3 - */ - public static String getScreenshotURL(ApplicationConfig config) { - return config.getOption(BowConfigOption.BOW_SCREENSHOT_URL.key); - } - - /** - * Get bow smtp server as string. - * Default bow applicationConfig will be used - * - * @return smtpServer - */ - public static String getSmtpServer() { - return getSmtpServer(getConfig()); - } - - /** - * Get bow smtp server as string. - * - * @param config bow configuration - * @return smtpServer - */ - public static String getSmtpServer(ApplicationConfig config) { - return config.getOption(BowConfigOption.BOW_SMTPSERVER.key); - } - - /** - * Get default search engine - * Default bow applicationConfig will be used - * - * @return search engine url - */ - public static String getSearchEngine() { - return getSearchEngine(getConfig()); - } - - /** - * Get default search engine - * - * @param config bow configuration - * @return search engine url - */ - public static String getSearchEngine(ApplicationConfig config) { - return config.getOption(BowConfigOption.SEARCH_ENGINE.key); - } - - /** - * Get bow address from as string. - * Default bow applicationConfig will be used - * - * @return addressFrom - */ - public static String getAddressFrom() { - return getAddressFrom(getConfig()); - } - - /** - * Get bow address from as string. - * - * @param config bow configuration - * @return addressFrom - */ - public static String getAddressFrom(ApplicationConfig config) { - return config.getOption(BowConfigOption.BOW_ADDRESSFROM.key); - } - - /** - * Get admins accounts - * Default bow applicationConfig will be used - * - * @return admins - */ - public static String[] getAdmins() { - return getAdmins(getConfig()); - } - - /** - * Get admins accounts - * - * @param config bow configuration - * @return admins - */ - public static String[] getAdmins(ApplicationConfig config) { - String str = config.getOption(BowConfigOption.BOW_ADMINS.key); - return StringUtil.split(str, ","); - } - - /** - * Return password for specified admin email - * Default bow applicationConfig will be used - * - * @param admin emails account - * @return null or password if available - */ - public static String getAdminPassword(String admin) { - return getAdminPassword(getConfig(), admin); - } - - /** - * Return password for specified admin email - * - * @param config bow configuration - * @param admin emails account - * @return null or password if available - */ - public static String getAdminPassword(ApplicationConfig config, String admin) { - return config.getOption(BowConfigOption.BOW_ADMINS.key + ".password." + admin); - } - - /** - * Retourne le separateur choisi par l'utilisateur entre les prefix d'action - * et la chaine. - * - * @return - */ - public static String getPrefixSeparator() { - return getPrefixSeparator(getConfig()); - } - - /** - * Retourne le separateur choisi par l'utilisateur entre les prefix d'action - * et la chaine. - * - * @return - */ - public static String getPrefixSeparator(ApplicationConfig config) { - return config.getOption(BowConfigOption.OPEN_SEARCH_PREFIX_SEPARATOR.key); - } - - /** - * Retourne le prefix par defaut a utiliser si l'utilisateur a mis le - * separateur de prefix mais sans prefix - * - * @return - */ - public static String getDefaultPrefix() { - return getDefaultPrefix(getConfig()); - } - - /** - * Retourne le prefix par defaut a utiliser si l'utilisateur a mis le - * separateur de prefix mais sans prefix - * - * @return - */ - public static String getDefaultPrefix(ApplicationConfig config) { - return config.getOption(BowConfigOption.OPEN_SEARCH_DEFAULT_PREFIX.key); - } - - /** - * Indique l'action par defaut a faire, si l'utilisateur n'indique ni - * prefix ni separateur de prefix - * - * @return - */ - public static String getDefaultAction() { - return getDefaultAction(getConfig()); - } - - /** - * Indique l'action par defaut a faire, si l'utilisateur n'indique ni - * prefix ni separateur de prefix - * - * @return - */ - public static String getDefaultAction(ApplicationConfig config) { - return config.getOption(BowConfigOption.OPEN_SEARCH_DEFAULT_ACTION.key); - } - - /** - * le prefix pour indiquer que l'on souhaite une recherche sur les tags - * - * @return - */ - public static String getTagSearchPrefix() { - return getTagSearchPrefix(getConfig()); - } - - /** - * le prefix pour indiquer que l'on souhaite une recherche sur les tags - * - * @return - */ - public static String getTagSearchPrefix(ApplicationConfig config) { - return config.getOption(BowConfigOption.OPEN_SEARCH_TAG_SEARCH_PREFIX.key); - } - - /** - * le prefix pour indiquer que l'on souhaite une recherche sur fulltext - * dans bow - * - * @return - */ - public static String getFullTextSearchPrefix() { - return getFullTextSearchPrefix(getConfig()); - } - - /** - * le prefix pour indiquer que l'on souhaite une recherche sur fulltext - * dans bow - * - * @return - */ - public static String getFullTextSearchPrefix(ApplicationConfig config) { - return config.getOption(BowConfigOption.OPEN_SEARCH_FULLTEXT_SEARCH_PREFIX.key); - } - - /** - * le prefix pour indiquer que l'on souhaite une recherche sur les alias - * prive et une rediection automatique vers cette page - * - * @return - */ - public static String getAliasPrefix() { - return getAliasPrefix(getConfig()); - } - - /** - * le prefix pour indiquer que l'on souhaite faire un add d'une url - * - * @return - */ - public static String getAddPrefix() { - return getAddPrefix(getConfig()); - } - - /** - * le prefix pour indiquer que l'on souhaite une recherche sur les alias - * prive et une rediection automatique vers cette page - * - * @return - */ - public static String getAliasPrefix(ApplicationConfig config) { - return config.getOption(BowConfigOption.OPEN_SEARCH_ALIAS_PREFIX.key); - } - - /** - * le prefix pour indiquer que l'on souhaite faire un add d'une url - * - * @return - */ - public static String getAddPrefix(ApplicationConfig config) { - return config.getOption(BowConfigOption.OPEN_SEARCH_ADD_PREFIX.key); - } - - /** - * le prefix pour indiquer que l'on souhaite une recherche sur le web - * via le moteur de recherche configurer - * - * @return - */ - public static String getWebSearchPrefix() { - return getWebSearchPrefix(getConfig()); - } - - /** - * le prefix pour indiquer que l'on souhaite une recherche sur le web - * via le moteur de recherche configurer - * - * @return - */ - public static String getWebSearchPrefix(ApplicationConfig config) { - return config.getOption(BowConfigOption.OPEN_SEARCH_WEB_SEARCH_PREFIX.key); - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/BowConfigOption.java b/bow-ui/src/main/java/org/chorem/bow/BowConfigOption.java deleted file mode 100644 index de94261..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/BowConfigOption.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow; - -import org.nuiton.config.ApplicationConfig; -import org.nuiton.config.ConfigOptionDef; - -import static org.nuiton.i18n.I18n.t; - -/** Bow option definition. */ -public enum BowConfigOption implements ConfigOptionDef { - - CONFIG_FILE( - ApplicationConfig.CONFIG_FILE_NAME, - t("bow.config.configFileName.description"), - "bow.properties", String.class, false, false), - APPLICATION_VERSION( - "application.version", - t("bow.config.application.version.description"), - null, String.class, true, true), - BOW_URL( - "bow.url", - t("bow.config.bow.url.description"), - null, String.class, false, false), - // For apache url rewriting - ALIAS_URL( - "alias.url", - t("bow.config.alias.url.description"), - "alias/", String.class, false, false), - BOW_ALLOW_PUBLIC_GROUP( - "bow.allow.public.group", - t("bow.config.bow.allow.public.group.description"), - "false", Boolean.class, false, false), - BOW_SCREENSHOT_URL( - "bow.screenshot.url", - t("bow.config.bow.screenshot.url.description"), - "http://screenshotweb.codelutin.com/screenshotweb.cgi?URL=%s&FILENAME=screenshot.png&VIEWPORT=1024*1182&CLIPRECT=0*0*1024*1182&SCALE=65x75", String.class, false, false), - BOW_SMTPSERVER( - "bow.smtpServer", - t("bow.config.bow.smtpServer.description"), - null, String.class, false, false), - BOW_ADDRESSFROM( - "bow.addressFrom", - t("bow.config.bow.addressFrom.description"), - null, String.class, false, false), - BOW_ADMINS( - "bow.admins", - t("bow.config.bow.admins.description"), - null, String.class, false, false), - SEARCH_ENGINE( - "search.engine", - t("bow.config.search.engine.description"), - null, String.class, false, false), - TAG_SEARCH_URL( - "bow.prefix.search.tag", - t("bow.config.sprefix.search.tag.description"), - "home.action?tagLine={searchTerms}", String.class, false, false), - FULLTEXT_SEARCH_URL( - "bow.prefix.search.fulltext", - t("bow.config.bow.prefix.search.fulltext.description"), - "home.action?fullTextLine={searchTerms}", String.class, false, false), - ALIAS_SEARCH_URL( - "bow.prefix.search.alias", - t("bow.config.bow.prefix.search.alias.description"), - "alias.action?alias={searchTerms}", String.class, false, false), - SAVE_SEARCH_URL( - "bow.prefix.search.add", - t("bow.config.bow.prefix.search.add.description"), - "addUrl.action?nameAndTags={searchTerms}", String.class, false, false), - TAG_SUGGESTION_URL( - "bow.prefix.suggestion.tag", - t("bow.config.sprefix.suggestion.tag.description"), - "suggestion-tag.action?q={searchTerms}", String.class, false, false), - FULLTEXT_SUGGESTION_URL( - "bow.prefix.suggestion.fulltext", - t("bow.config.bow.prefix.suggestion.fulltext.description"), - "suggestion-fulltext.action?q={searchTerms}", String.class, false, false), - ALIAS_SUGGESTION_URL( - "bow.prefix.suggestion.alias", - t("bow.config.bow.prefix.suggestion.alias.description"), - "suggestion-alias.action?q={searchTerms}", String.class, false, false), - OPEN_SEARCH_DEFAULT_ACTION( - "opensearch.default.action", - t("bow.config.opensearch.default.action.description"), - "w", String.class, false, false), - OPEN_SEARCH_PREFIX_SEPARATOR( - "opensearch.prefix.separator", - t("bow.config.opensearch.prefix.separator.description"), - ":", String.class, false, false), - OPEN_SEARCH_DEFAULT_PREFIX( - "opensearch.default.prefix", - t("bow.config.opensearch.default.prefix.description"), - "t", String.class, false, false), - OPEN_SEARCH_TAG_SEARCH_PREFIX( - "opensearch.tag.search.prefix", - t("bow.config.opensearch.tag.search.prefix.description"), - "t", String.class, false, false), - OPEN_SEARCH_FULLTEXT_SEARCH_PREFIX( - "opensearch.fulltext.search.prefix", - t("bow.config.opensearch.fulltext.search.prefix.description"), - "f", String.class, false, false), - OPEN_SEARCH_WEB_SEARCH_PREFIX( - "opensearch.web.search.prefix", - t("bow.config.opensearch.web.search.prefix.description"), - "w", String.class, false, false), - OPEN_SEARCH_ALIAS_PREFIX( - "opensearch.alias.prefix", - t("bow.config.opensearch.alias.prefix.description"), - "a", String.class, false, false), - OPEN_SEARCH_ADD_PREFIX( - "opensearch.add.prefix", - t("bow.config.opensearch.add.prefix.description"), - "s", String.class, false, false); - - public String key; - - public String description; - - public String defaultValue; - - public Class<?> type; - - public boolean isTransient; - - public boolean isFinal; - - BowConfigOption(String key, String description, String defaultValue, - Class<?> type, boolean isTransient, boolean isFinal) { - this.key = key; - this.description = description; - this.defaultValue = defaultValue; - this.type = type; - this.isFinal = isFinal; - this.isTransient = isTransient; - } - - @Override - public boolean isFinal() { - return isFinal; - } - - @Override - public boolean isTransient() { - return isTransient; - } - - @Override - public String getDefaultValue() { - return defaultValue; - } - - @Override - public String getDescription() { - return description; - } - - @Override - public String getKey() { - return key; - } - - @Override - public Class<?> getType() { - return type; - } - - @Override - public void setDefaultValue(String defaultValue) { - this.defaultValue = defaultValue; - } - - @Override - public void setTransient(boolean isTransient) { - this.isTransient = isTransient; - } - - @Override - public void setFinal(boolean isFinal) { - this.isFinal = isFinal; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/BowMail.java b/bow-ui/src/main/java/org/chorem/bow/BowMail.java deleted file mode 100644 index dbc096b..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/BowMail.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow; - -import javax.mail.Message; -import javax.mail.MessagingException; -import javax.mail.Session; -import javax.mail.Transport; -import javax.mail.internet.InternetAddress; -import javax.mail.internet.MimeMessage; -import java.util.Properties; - -public class BowMail { - - public static void sendMail(String sendToEmail, String mailSubject, String mailContent) throws MessagingException { - String smtpServer = BowConfig.getSmtpServer(); - Properties properties = new Properties(); - properties.put("mail.smtp.host", smtpServer); - - Session session = Session.getDefaultInstance(properties, null); - session.setDebug(true); - - Message msg = new MimeMessage(session); - - msg.addRecipient(Message.RecipientType.TO, new InternetAddress(sendToEmail)); - msg.setFrom(new InternetAddress(BowConfig.getAddressFrom())); - msg.setSubject(mailSubject); - msg.setContent(mailContent, "text/plain"); - Transport.send(msg); - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/BowMigrationPreference.java b/bow-ui/src/main/java/org/chorem/bow/BowMigrationPreference.java deleted file mode 100644 index 768ba85..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/BowMigrationPreference.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow; - - -import java.util.ArrayList; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.wikitty.WikittyService; -import org.nuiton.wikitty.WikittyUtil; -import org.nuiton.wikitty.entities.Wikitty; -import org.nuiton.wikitty.entities.WikittyExtension; -import org.nuiton.wikitty.services.WikittyExtensionMigrationRename; - -import org.apache.commons.lang3.StringUtils; -import org.nuiton.util.VersionUtil; -import org.nuiton.wikitty.services.WikittyServiceEnhanced; - -/** - * Migre les données depuis la version 0.6 vers la version 1.1. - * On suppose que les données sont convenablement indexee. - * <p/> - * <li> ajout du champs BowBookmark.authentificationInfo (rien a faire pour la migration) - * <li> suppression de BowBookmark.bowUser - * <li> BowBookmark depend de WikittyAuthorisation - * <p/> - * la valeur de BowBookmark.bowUser est maintenant stockee dans - * WikittyAuthorisation.owner et WikittyAuthorisation.reader - * pour que par defaut seul le owner est les droits de lecture sur l'item - * - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class BowMigrationPreference extends WikittyExtensionMigrationRename { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(BowMigrationPreference.class); - - /** - * Remplacement des prefix predefini dans BowPreference par une extension - * BowPrefix qui permet d'en creer autant qu'on en souhaite - * - * @param service - * @param oldWikitty - * @param newWikitty - */ - protected void migrateBowPrefix(WikittyService service, Wikitty oldWikitty, Wikitty newWikitty) { - // On met juste a jour les données avec le champs supprimer bowUser - String userId = oldWikitty.getWikittyId(); - - if (userId != null) { - String prefixSeparator = (String) oldWikitty.getFqField( - BowPreference.EXT_BOWPREFERENCE + WikittyUtil.FQ_FIELD_NAME_SEPARATOR - + "prefixSeparator"); - - String defaultAction = (String) oldWikitty.getFqField( - BowPreference.EXT_BOWPREFERENCE + WikittyUtil.FQ_FIELD_NAME_SEPARATOR - + "defaultAction"); - String defaultPrefix = (String) oldWikitty.getFqField( - BowPreference.EXT_BOWPREFERENCE + WikittyUtil.FQ_FIELD_NAME_SEPARATOR - + "defaultPrefix"); - - String tagSearchPrefix = (String) oldWikitty.getFqField( - BowPreference.EXT_BOWPREFERENCE + WikittyUtil.FQ_FIELD_NAME_SEPARATOR - + "tagSearchPrefix"); - String fullTextSearchPrefix = (String) oldWikitty.getFqField( - BowPreference.EXT_BOWPREFERENCE + WikittyUtil.FQ_FIELD_NAME_SEPARATOR - + "fullTextSearchPrefix"); - String webSearchPrefix = (String) oldWikitty.getFqField( - BowPreference.EXT_BOWPREFERENCE + WikittyUtil.FQ_FIELD_NAME_SEPARATOR - + "webSearchPrefix"); - String aliasPrefix = (String) oldWikitty.getFqField( - BowPreference.EXT_BOWPREFERENCE + WikittyUtil.FQ_FIELD_NAME_SEPARATOR - + "aliasPrefix"); - - String searchEngineUrlResults = (String) oldWikitty.getFqField( - BowPreference.EXT_BOWPREFERENCE + WikittyUtil.FQ_FIELD_NAME_SEPARATOR - + "searchEngineUrlResults"); - String searchEngineUrlSuggestions = (String) oldWikitty.getFqField( - BowPreference.EXT_BOWPREFERENCE + WikittyUtil.FQ_FIELD_NAME_SEPARATOR - + "searchEngineUrlSuggestions"); - - BowSearchPrefixImpl pWeb = new BowSearchPrefixImpl(); - pWeb.setBowUser(userId); - pWeb.setPrefix(webSearchPrefix + prefixSeparator); - pWeb.setSearch(searchEngineUrlResults); - pWeb.setSuggestion(searchEngineUrlSuggestions); - - BowSearchPrefixImpl pTag = new BowSearchPrefixImpl(); - pTag.setBowUser(userId); - pTag.setPrefix(tagSearchPrefix + prefixSeparator); - pTag.setSearch("search.tag"); - pTag.setSuggestion("suggestion.tag"); - - BowSearchPrefixImpl pFullText = new BowSearchPrefixImpl(); - pFullText.setBowUser(userId); - pFullText.setPrefix(fullTextSearchPrefix + prefixSeparator); - pFullText.setSearch("search.fulltext"); - pFullText.setSuggestion("suggestion.fulltext"); - - BowSearchPrefixImpl pAlias = new BowSearchPrefixImpl(); - pAlias.setBowUser(userId); - pAlias.setPrefix(aliasPrefix + prefixSeparator); - pAlias.setSearch("search.alias"); - pAlias.setSuggestion("suggestion.alias"); - - BowSearchPrefixImpl pDefault = new BowSearchPrefixImpl(); - if (StringUtils.equals(defaultAction, webSearchPrefix)) { - pDefault.getWikitty().replaceWith(pWeb.getWikitty(), true); - } else if (StringUtils.equals(defaultAction, tagSearchPrefix)) { - pDefault.getWikitty().replaceWith(pTag.getWikitty(), true); - } else if (StringUtils.equals(defaultAction, fullTextSearchPrefix)) { - pDefault.getWikitty().replaceWith(pFullText.getWikitty(), true); - } else if (StringUtils.equals(defaultAction, aliasPrefix)) { - pDefault.getWikitty().replaceWith(pAlias.getWikitty(), true); - } - pDefault.setPrefix(""); - - BowSearchPrefixImpl pDefaultPrefix = new BowSearchPrefixImpl(); - if (StringUtils.equals(defaultPrefix, webSearchPrefix)) { - pDefaultPrefix.getWikitty().replaceWith(pWeb.getWikitty(), true); - } else if (StringUtils.equals(defaultPrefix, tagSearchPrefix)) { - pDefaultPrefix.getWikitty().replaceWith(pTag.getWikitty(), true); - } else if (StringUtils.equals(defaultPrefix, fullTextSearchPrefix)) { - pDefaultPrefix.getWikitty().replaceWith(pFullText.getWikitty(), true); - } else if (StringUtils.equals(defaultPrefix, aliasPrefix)) { - pDefaultPrefix.getWikitty().replaceWith(pAlias.getWikitty(), true); - } - pDefaultPrefix.setPrefix(prefixSeparator); - - ArrayList<Wikitty> toStore = new ArrayList<Wikitty>(); - toStore.add(pWeb.getWikitty()); - toStore.add(pTag.getWikitty()); - toStore.add(pFullText.getWikitty()); - toStore.add(pAlias.getWikitty()); - toStore.add(pDefault.getWikitty()); - toStore.add(pDefaultPrefix.getWikitty()); - - WikittyServiceEnhanced wse = new WikittyServiceEnhanced(service); - service.store(null, toStore, false); - -// WikittyProxy proxy = new WikittyProxy(service); -// proxy.store(pWeb, pTag, pFullText, pAlias, pDefault, pDefaultPrefix); - } - } - - @Override - public Wikitty migrate(WikittyService service, Wikitty oldWikitty, Wikitty newWikitty, - WikittyExtension oldExt, WikittyExtension newExt) { - - // on laisse l'implantation par defaut migrer tout ce qu'il faut - Wikitty result = super.migrate(service, oldWikitty, newWikitty, oldExt, newExt); - - if (BowPreference.EXT_BOWPREFERENCE.equals(newExt.getName())) { - String oldVersion = oldExt.getVersion(); - if (VersionUtil.smallerThan(oldVersion, "5.0")) { - migrateBowPrefix(service, oldWikitty, result); - } - } - - return result; - } -////147e923b-3921-4b17-a88c-43495b477a8a -// public static void migrate(WikittyProxy proxy) { -// log.info("Migration"); -// -// int MAX = 1000; -// -// Criteria criteria = Search.query().rTrue().criteria(); -// -// int i = 0; -// int count = 0; -// PagedResult<Wikitty> wikitties; -// do { -// criteria.setFirstIndex(i); -// criteria.setEndIndex(i += MAX); -// wikitties = proxy.findAllByCriteria(criteria); -// List<Wikitty> ws = wikitties.getAll(); -// proxy.storeWikitty(ws); -// count += ws.size(); -// } while (wikitties.size() >= MAX); -// log.info(String.format("Migration of %s Wikitties done", count)); -// } -// -// // only here to simplify test and debug of migration, this permit to migrate -// // datas in developpement environnement directly without launch bow web app -// public static void main(String... args) { -// BowProxy proxy = BowProxy.getInstance(null); -// proxy.syncSearchEngine(); -// migrate(proxy); -// } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/BowProxy.java b/bow-ui/src/main/java/org/chorem/bow/BowProxy.java deleted file mode 100644 index 0493f97..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/BowProxy.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow; - -import org.nuiton.config.ApplicationConfig; -import org.nuiton.wikitty.WikittyService; -import org.nuiton.wikitty.WikittyServiceFactory; -import org.nuiton.wikitty.entities.WikittyExtension; - -import java.util.ArrayList; -import java.util.List; -import org.nuiton.wikitty.WikittyClient; -import org.nuiton.wikitty.services.WikittyExtensionMigrationRegistry; - -/** - * Proxy pour utiliser les wikitty convenablement initialise. - * - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class BowProxy extends WikittyClient { - - static protected WikittyService ws; - - protected BowProxy(ApplicationConfig config, WikittyService ws) { - super(config, ws); - } - - /** - * Return instance of BowProxy with specified security token - * - * @param token - * @return - */ - public static BowProxy getInstance(String token) { - ApplicationConfig config = BowConfig.getConfig(); - WikittyService ws = getWikittyService(config); - BowProxy result = new BowProxy(config, ws); - result.setSecurityToken(token); - - return result; - } - - /** - * Return WikittyService to use. This WikittyService is singleton. - * - * @param config - * @return - */ - static protected WikittyService getWikittyService(ApplicationConfig config) { - if (ws == null) { - synchronized (BowProxy.class) { - if (ws == null) { - // on enregistre les classes qui feront la migration des données - // on enregistre la classe qui fera la migration des données - WikittyExtensionMigrationRegistry registry = - config.getObject(WikittyExtensionMigrationRegistry.class); - registry.put(BowPreference.EXT_BOWPREFERENCE, new BowMigrationPreference()); - - // enregistrement des extensions - List<WikittyExtension> extensions = new ArrayList<WikittyExtension>(); - extensions.addAll(BowSharedUserImpl.extensions); // inherit BowUser, BowPreference, WikittyUser - extensions.addAll(BowImportImpl.extensions); // inherit BowBookmark, WikittyLabel, WikittyAuthorisation - extensions.addAll(BowSearchPrefixImpl.extensions); // inherit BowBookmark, WikittyLabel - extensions.addAll(BowGroupImpl.extensions); - extensions.addAll(BowAuthenticationImpl.extensions); - - ws = WikittyServiceFactory.buildWikittyService(config); - ws.storeExtension(null, extensions); - } - } - } - return ws; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/BowSearchResult.java b/bow-ui/src/main/java/org/chorem/bow/BowSearchResult.java deleted file mode 100644 index cc77710..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/BowSearchResult.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow; - -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.nuiton.wikitty.query.FacetTopic; -import org.nuiton.wikitty.query.WikittyQueryResult; - -/** - * Cette classe permet de stocker le resutlat d'une recherche - * - la liste des tags qui ont servi pour la recherche - * - la chaine fulltext de recherche - * - la liste des bookmarks - * - la liste des tags - * - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class BowSearchResult { - - private static final Log log = LogFactory.getLog(BowSearchResult.class); - - /** nombre total de bookmark trouve */ - protected int bookmarkCount; - - protected List<BowBookmark> bookmarks; - - protected Map<String, List<BowAuthentication>> authMap; - - protected List<FacetTopic> tagsCloud; - - protected int tmax = -1; - - protected int tmin = -1; - - /** - * Construit l'objet en passant en parametre tout ce qu'il faut pour faire - * la recherche - * - * @param result - * @param tagLine (optionel) le liste des tags a rechercher - */ - public BowSearchResult(WikittyQueryResult<BowBookmark> result, - WikittyQueryResult<BowAuthentication> auths, String tagLine) { - - bookmarkCount = result.getTotalResult(); - if (log.isDebugEnabled()) { - log.debug(String.format("Find %s items, used %s", - bookmarkCount, result.size())); - } - - setBookmarks(result.getAll()); - - authMap = new HashMap<String, List<BowAuthentication>>(); - for (BowAuthentication auth : auths) { - if (auth != null) { - String targetId = auth.getTarget(); - List<BowAuthentication> authList = authMap.get(targetId); - if (authList == null) { - authMap.put(targetId, authList = new ArrayList<BowAuthentication>()); - } - authList.add(auth); - } - } - - List<FacetTopic> topics = result.getTopic(BowBookmark.FQ_FIELD_WIKITTYLABEL_LABELS); - if (log.isDebugEnabled()) { - log.debug(String.format("There are %s tag in cloud", - CollectionUtils.isEmpty(topics) ? 0 : topics.size())); - } - setTagCloud(topics, tagLine); - } - - protected void setTagCloud(List<FacetTopic> cpy, String excludeTag) { - tagsCloud = new ArrayList<FacetTopic>(); - if (cpy != null) { - tagsCloud.addAll(cpy); - - // on ne met pas dans le cloud les tags qui ont servi pour la recherche - List<FacetTopic> save = new ArrayList<FacetTopic>(tagsCloud); - // on recupere les tags dans un set pour optimiser la recherche - Set<String> tagsSearch = BowUtils.getWords(excludeTag); - - for (Iterator<FacetTopic> i = tagsCloud.iterator(); i.hasNext(); ) { - FacetTopic topic = i.next(); - String name = topic.getTopicName(); - if (tagsSearch.contains(name)) { - i.remove(); - } - } - - // on calcul la frequence pour le calcul de la taille dans le cloud - tmax = -1; // correspond to the most tag frequency in the tag cloud - tmin = -1; // correspond to the less tag frequency in the tag cloud - for (FacetTopic tag : tagsCloud) { - int value = tag.getCount(); - if (tmax < value) { // search the most tag frequancy - tmax = value; - } - if (tmin == -1) { - tmin = value; - } else if (tmin > value) { // search less tag frequency - tmin = value; - } - } - - } - } - - public int getFont(int ti) { - int font = 1; - if (tmax > tmin) { - font = 30 * (ti - tmin) / (tmax - tmin); // get the font size for a tag frequency - } - if (font < 10) { - font = 10; - } - return font; - } - - public List<FacetTopic> getTagsCloud() { - return tagsCloud; - } - - public List<BowBookmark> getBookmarks() { - return bookmarks; - } - - public List<BowAuthentication> getAuthentication(String id) { - return authMap.get(id); - } - - public List<BowAuthentication> getAuthentication(BowBookmark bookmark) { - return getAuthentication(bookmark.getWikittyId()); - } - - protected void setBookmarks(List<BowBookmark> bookmarks) { - this.bookmarks = new ArrayList<BowBookmark>(); - if (bookmarks != null) { - this.bookmarks.addAll(bookmarks); - } - } - - public int getTmin() { - return tmin; - } - - public int getTmax() { - return tmax; - } - - public int getBookmarkCount() { - return bookmarkCount; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/BowSession.java b/bow-ui/src/main/java/org/chorem/bow/BowSession.java deleted file mode 100644 index e497456..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/BowSession.java +++ /dev/null @@ -1,375 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow; - -import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.ObjectUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.nuiton.wikitty.entities.WikittyGroup; -import org.nuiton.wikitty.entities.WikittyLabel; -import org.nuiton.wikitty.entities.WikittyUser; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; -import org.nuiton.wikitty.query.WikittyQueryResult; -import org.nuiton.wikitty.services.WikittySecurityUtil; - -/** - * Classe utilisee pour stocker les objets utils en session utilisateur - * - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class BowSession implements Serializable { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(BowSession.class); - - static final private String BOW_SESSION_KEY = BowSession.class.getSimpleName(); - - private static final long serialVersionUID = 1L; - - protected BowProxy proxy; - - // user herite de preference, on ne stocke que user - protected BowUser user; - - protected String temporaryToken; - - protected boolean admin; - - public BowSession() { - proxy = BowProxy.getInstance(null); - } - - public static void invalidate(Map<String, Object> session) { - session.remove(BOW_SESSION_KEY); - // it's not necessary to logout user on proxy. Wikitty reuse old token - // if necessary, no database leak with many token - // not necessary, because when user use scriptlet add, auto-login is done - // with no logout - } - - public static BowSession getBowSession(HttpServletRequest request) { - HttpSession session = request.getSession(); - BowSession result = getBowSession(session); - return result; - } - - public static BowSession getBowSession(HttpSession httpSession) { - BowSession result = (BowSession) httpSession.getAttribute(BOW_SESSION_KEY); - if (result == null) { - result = new BowSession(); - httpSession.setAttribute(BOW_SESSION_KEY, result); - } - return result; - } - - public static BowSession getBowSession(Map<String, Object> session) { - BowSession result = (BowSession) session.get(BOW_SESSION_KEY); - if (result == null) { - result = new BowSession(); - session.put(BOW_SESSION_KEY, result); - } - return result; - } - - public BowProxy getProxy() { - return proxy; - } - - public BowUser getUser() { - return user; - } - - /** - * Recherche les bookmarks de l'utilisateur courant (owner) contenant au - * moins un des tags a supprimer (toRemove) et les supprimes et ajoute ceux - * qui sont dans la liste toAdd. - * - * Si toAdd est vide ou null, alors cette methode revient un une simple - * suppression. - * - * @param toRemove les des tags servant pour la recherche et qui seront supprimes - * @param toAdd les tags qui seront ajoute - */ - public void removeAndAddTag(List<String> toRemove, List<String> toAdd) { - WikittyQuery c = new WikittyQueryMaker().and() - .exteq(BowBookmark.EXT_BOWBOOKMARK) - .containsOne(BowBookmark.FQ_FIELD_WIKITTYLABEL_LABELS, toRemove) - .eq(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_OWNER, user) - .end(); - WikittyQueryResult<WikittyLabel> searchResult = - proxy.findAllByQuery(WikittyLabel.class, c); - - List<WikittyLabel> toStore = new ArrayList<WikittyLabel>(); - for (WikittyLabel label : searchResult) { - toStore.add(label); - Set<String> l = label.getLabels(); - if (l != null) { - // on fait une copie, car l retourne est non modifiable - l = new HashSet<String>(l); - l.removeAll(toRemove); - if (CollectionUtils.isNotEmpty(toAdd)) { - l.addAll(toAdd); - } - label.setLabels(l); - } - } - proxy.store(toStore); - } - - /** - * Get default user authentication - * @return - */ - public BowAuthentication getAuthentication() { - BowUser user = getUser(); - BowAuthentication result = getAuthentication(user.getWikittyId()); - return result; - } - - /** - * get authentication for specified target (User or bookmark) - * @param wikittyId - * @return - */ - public BowAuthentication getAuthentication(String wikittyId) { - WikittyQuery criteria = new WikittyQueryMaker().and() - .exteq(BowAuthentication.EXT_BOWAUTHENTICATION) - .eq(BowAuthentication.ELEMENT_FIELD_BOWAUTHENTICATION_TARGET, wikittyId) - .end(); - BowAuthentication result = getProxy().findByQuery(BowAuthentication.class, criteria); - if (result == null) { - BowUser user = getUser(); - - result = new BowAuthenticationImpl(); - result.setMaxLength(15); // default length of password - result.setDescription(""); - result.setDomain(""); - result.setLogin(""); - result.setPrefix(""); - result.setInclude(""); - result.setExclude(""); - result.setSuffix(""); - result.setTarget(wikittyId); - result.setOwner(user); - result.setReader(Collections.singleton(user.getWikittyId())); - } - return result; - } - - public List<BowSearchPrefix> getSearchPrefix() { - BowUser user = getUser(); - - WikittyQuery criteria = new WikittyQueryMaker().and() - .exteq(BowSearchPrefix.EXT_BOWSEARCHPREFIX) - .eq(BowSearchPrefix.FQ_FIELD_BOWSEARCHPREFIX_BOWUSER, user.getWikittyId()).end() - .setSortAscending(BowSearchPrefix.ELEMENT_FIELD_BOWSEARCHPREFIX_PREFIX); - WikittyQueryResult<BowSearchPrefix> result = getProxy().findAllByQuery(BowSearchPrefix.class, criteria); - List<BowSearchPrefix> prefix = new ArrayList<BowSearchPrefix>(result.getAll()); - log.debug("####################### prefix number ################### " + prefix.size()); - if (prefix.isEmpty()) { - // no prefix found, create default prefix for this request - String userId = user.getWikittyId(); - String prefixSeparator = BowConfig.getPrefixSeparator(); - - BowSearchPrefixImpl pWeb = new BowSearchPrefixImpl(); - pWeb.setBowUser(userId); - pWeb.setPrefix(BowConfig.getWebSearchPrefix() + prefixSeparator); - pWeb.setSearch(BowConfig.getSearchEngine()); - // TODO poussin 20130916 add default value in config for suggestion - - BowSearchPrefixImpl pTag = new BowSearchPrefixImpl(); - pTag.setBowUser(userId); - pTag.setPrefix(BowConfig.getTagSearchPrefix() + prefixSeparator); - pTag.setSearch("search.tag"); - pTag.setSuggestion("suggestion.tag"); - - BowSearchPrefixImpl pFullText = new BowSearchPrefixImpl(); - pFullText.setBowUser(userId); - pFullText.setPrefix(BowConfig.getFullTextSearchPrefix() + prefixSeparator); - pFullText.setSearch("search.fulltext"); - pFullText.setSuggestion("suggestion.fulltext"); - - BowSearchPrefixImpl pAlias = new BowSearchPrefixImpl(); - pAlias.setBowUser(userId); - pAlias.setPrefix(BowConfig.getAliasPrefix() + prefixSeparator); - pAlias.setSearch("search.alias"); - pAlias.setSuggestion("suggestion.alias"); - - BowSearchPrefixImpl pAdd = new BowSearchPrefixImpl(); - pAdd.setBowUser(userId); - pAdd.setPrefix(BowConfig.getAddPrefix() + prefixSeparator); - pAdd.setSearch("search.add"); - pAdd.setSuggestion("suggestion.add"); - - BowSearchPrefixImpl pDefault = new BowSearchPrefixImpl(); - pDefault.getWikitty().replaceWith(pWeb.getWikitty(), true); - pDefault.setPrefix(""); - - BowSearchPrefixImpl pDefaultPrefix = new BowSearchPrefixImpl(); - pDefaultPrefix.getWikitty().replaceWith(pTag.getWikitty(), true); - pDefaultPrefix.setPrefix(prefixSeparator); - - proxy.store(pWeb, pTag, pFullText, pAlias, pAdd, pDefault, pDefaultPrefix); - - prefix.add(pWeb); - prefix.add(pTag); - prefix.add(pFullText); - prefix.add(pAlias); - prefix.add(pDefault); - prefix.add(pDefaultPrefix); - - } - return prefix; - } - - public void setUser(BowUser user) { - // check if this user is admin - String login = user.getLogin(); - String[] admins = BowConfig.getAdmins(); - boolean isAdmin = ArrayUtils.contains(admins, login); - setAdmin(isAdmin); - - checkPreference(user); - - // si c'est le meme user, on ne regenere pas le temporaryToken - if (!ObjectUtils.equals(this.user, user)) { - // generate temporary token - String temporaryToken = BowUtils.generateToken(); - setTemporaryToken(temporaryToken); - - String wikittyToken = proxy.getSecurityToken(user.getWikittyId()); - proxy.setSecurityToken(wikittyToken); - - if (isAdmin) { - checkAppAdminGroup(user, admins); - } - } - this.user = user; - } - - /** - * Verifie que le group AppAdminGroup exist et est a jour - * @param user - * @param adminsLogin other admin identified by login - */ - protected void checkAppAdminGroup(BowUser user, String ... adminsLogin) { - boolean mustSave = false; - WikittyGroup adminGroup = WikittySecurityUtil.getAppAdminGroup(proxy); - if (adminGroup == null) { - adminGroup = WikittySecurityUtil.createAppAdminGroup(user); - mustSave = true; - } - if (ArrayUtils.isNotEmpty(adminsLogin)) { - List<String> admins = Arrays.asList(adminsLogin); - WikittyQuery criteria = new WikittyQueryMaker() - .containsOne(WikittyUser.ELEMENT_FIELD_WIKITTYUSER_LOGIN, admins).end(); - List<String> adminsId = proxy.findAllByQuery(criteria).getAll(); - if (adminGroup.getMembers().size() != adminsId.size() || !adminGroup.getMembers().containsAll(adminsId)) { - adminGroup.setMembers(new HashSet<String>(adminsId)); - mustSave = true; - } - } - - if (mustSave) { - proxy.store(adminGroup); - } - } - - - protected void checkPreference(BowPreference preference) { - if (preference.getBookmarks() <= 0) { - preference.setBookmarks(100); // set default to 100 - } - if (preference.getTags() <= 0) { - preference.setTags(100); // set default to 100 - } - if (preference.getColors() == null) { - preference.setColors(""); - } -// if (preference.getSearchEngineUrlResults() == null) { -// preference.setSearchEngineUrlResults(BowConfig.getSearchEngine()); -// } -// if (preference.getSearchEngineUrlSuggestions() == null) { -// preference.setSearchEngineUrlSuggestions(""); // TODO add default value in config -// } -// if (StringUtils.isBlank(preference.getPrefixSeparator())) { -// preference.setPrefixSeparator(BowConfig.getPrefixSeparator()); -// } -// if (StringUtils.isBlank(preference.getTagSearchPrefix())) { -// preference.setTagSearchPrefix(BowConfig.getTagSearchPrefix()); -// } -// if (StringUtils.isBlank(preference.getFullTextSearchPrefix())) { -// preference.setFullTextSearchPrefix(BowConfig.getFullTextSearchPrefix()); -// } -// if (StringUtils.isBlank(preference.getWebSearchPrefix())) { -// preference.setWebSearchPrefix(BowConfig.getWebSearchPrefix()); -// } -// if (StringUtils.isBlank(preference.getAliasPrefix())) { -// preference.setAliasPrefix(BowConfig.getAliasPrefix()); -// } -// if (StringUtils.isBlank(preference.getDefaultPrefix())) { -// preference.setDefaultPrefix(BowConfig.getDefaultPrefix()); -// } -// if (StringUtils.isBlank(preference.getDefaultAction())) { -// preference.setDefaultAction(BowConfig.getDefaultAction()); -// } - } - - public String getPermanentToken() { - return getUser().getPermanentToken(); - } - - public String getTemporaryToken() { - return temporaryToken; - } - - public void setTemporaryToken(String temporaryToken) { - this.temporaryToken = temporaryToken; - } - - public boolean isAdmin() { - return admin; - } - - public void setAdmin(boolean admin) { - this.admin = admin; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/BowUtils.java b/bow-ui/src/main/java/org/chorem/bow/BowUtils.java deleted file mode 100644 index 835e8eb..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/BowUtils.java +++ /dev/null @@ -1,379 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow; - -import com.github.rjeschke.txtmark.Configuration; -import com.github.rjeschke.txtmark.Processor; -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.time.DateFormatUtils; -import org.nuiton.util.StringUtil; - -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.io.IOUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; -import org.nuiton.wikitty.services.WikittyServiceAuthorisation; - -public class BowUtils { - - private static final Log log = LogFactory.getLog(BowUtils.class); - - public static final String BOW_DATE_SHORT_PATTERN = "yyyy/MM/dd"; - - /** - * public to use easily in jsp - */ - public BowUtils() { - } - - private static final Configuration markdownConf = - Configuration.builder().forceExtentedProfile().enableSafeMode().build(); - - public static String toHtml(String markdown) { - String result = ""; - if (StringUtils.isNotBlank(markdown)) { - result = Processor.process(markdown, markdownConf); - } - return result; - } - - public static Map<String, String> resourceContent = new HashMap<String, String>(); - /** - * Get content of resource in classpath. First time read content from URL - * but next call with same resourceName use cache to speed performance - * - * @param resourceName - * @return - * @throws IOException - */ - public static String getResourceContent(String resourceName) throws IOException { - String result = resourceContent.get(resourceName); - if (result == null) { - URL resource = BowUtils.class.getResource("/" + resourceName); - result = IOUtils.toString(resource); - resourceContent.put(resourceName, result); - } - return result; - } - - public static String scriptletPassword(BowAuthentication auth) { - String result = ""; - try { - String js = getResourceContent("bowpwd-sha256.min.js") + - String.format(";window.bow.bowpwd('','%s','%s','%s','%s','%s');", - auth.getMaxLength(), auth.getPrefix(), auth.getInclude(), - auth.getExclude(), auth.getSuffix()); - - result = toScriptlet(js); - } catch (Exception eee) { - log.info("Can't create scriptlet password", eee); - } - return result; - } - - public static String scriptletAdd(String bowUrl, String token) { - String result = ""; - try { - String js = getResourceContent("bowadd.min.js") + - String.format(";window.bow.bowadd('%s','%s',true,true);", - bowUrl, token); - - result = toScriptlet(js); - } catch (Exception eee) { - log.info("Can't create scriptlet add", eee); - } - return result; - } - - public static String scriptPassword(BowAuthentication auth) { - String result = ""; - try { - String script = getResourceContent("bowpwd.sh") + - String.format("compute '%s' '%s' '%s' '%s' '%s' \"$DOMAIN\" \"$PASSWD\"", - auth.getMaxLength(), auth.getPrefix(), auth.getInclude(), - auth.getExclude(), auth.getSuffix()); - String b64 = Base64.encodeBase64URLSafeString(script.getBytes()); - result = "data:application/x-shellscript;base64," + b64; - } catch (Exception eee) { - log.info("Can't create scriptlet password", eee); - } - return result; - } - - /** - * Generate valide URL javascript:... - * @param js javascript code - * @return valide bookmarklet URL "javascript:..." - * @throws java.net.URISyntaxException - */ - public static String toScriptlet(String js) throws URISyntaxException { - URI uri = new URI("javascript", js, null); - String result = uri.toASCIIString(); - return result; - } - - public static String toBase64(byte[] b) { - return Base64.encodeBase64String(b); - } - - /** - * Retourne toujours une date valide. Si date est null, on prend la date - * du jour - * - * @param date null or valide date - * @return date if date not null, or today date - */ - public static Date normalizeDate(Date date) { - Date result = date; - if (result == null) { - result = new Date(); - } - return result; - } - - /** - * Supprime les blancs de debut et de fin, et retourne une chaine vide si s - * est null - * - * @param s null or string - * @return empty string or string without blank at begin and end - */ - public static String normalizeString(String s) { - String result = StringUtils.trimToEmpty(s); - return result; - } - - /** - * Normalise l'url, si elle est null ou vide retourne une chaine vide. - * Si elle ne commence pas par un protocol (ex: ftp://) alors on ajoute - * automatiquement http:// - * - * @param url l'url a normaliser - * @return l'url normalisee - */ - public static String normalizeUrl(String url) { - String result = ""; - if (StringUtils.isNotBlank(url)) { - result = url.trim(); - if (!result.matches("[a-z]+://.+")) { - result = "http://" + result; - } - } - return result; - } - - /** - * Donne la liste des mots de la chaine passee en parametre. - * Si tags est null ou vide, le 'set' retourne sera vide. - * <p/> - * La liste retournee ne doit jamais contenir de chaine null ou vide. - * - * @param tags - * @return - */ - public static Set<String> getWords(String tags) { - String[] words = StringUtils.split(tags); - words = ArrayUtils.nullToEmpty(words); - - Set<String> result = new HashSet<String>(Arrays.asList(words)); - - // on s'assure que la liste ne retourne jamais de chaine null ou vide. - result.remove(""); - result.remove(null); - - return result; - } - - /** - * Recupere la liste des noms des groupes parmi les tags. Un groupe dans - * les tags commence par "@" mais son nom ne contient pas ce '@'. Il est - * donc retire avant d'etre retourne. - * @param tags - * @return - */ - public static Set<String> getUsers(Set<String> tags) { - Set<String> result = new HashSet<String>(); - if (CollectionUtils.isNotEmpty(tags)) { - for (String t : tags) { - if (StringUtils.startsWith(t, BowConfig.USER_MARK)) { - result.add(StringUtils.substringAfter(t, BowConfig.USER_MARK)); - } - } - } - return result; - } - - /** - * Recupere la liste des noms des groupes parmi les tags. Un groupe dans - * les tags commence par "@" mais son nom ne contient pas ce '@'. Il est - * donc retire avant d'etre retourne. - * @param tags - * @return - */ - public static Set<String> getGroups(Set<String> tags) { - Set<String> result = new HashSet<String>(); - if (CollectionUtils.isNotEmpty(tags)) { - for (String t : tags) { - if (StringUtils.startsWith(t, BowConfig.GROUP_MARK)) { - result.add(StringUtils.substringAfter(t, BowConfig.GROUP_MARK)); - } - } - } - return result; - } - - public static boolean isPublicGroup(BowGroup g) { - Set<String> reader = g.getReader(); - boolean result = org.apache.commons.collections.CollectionUtils.isNotEmpty(reader) - && reader.contains(WikittyServiceAuthorisation.PUBLIC); - return result; - } - - public static String formatDate(Date date) { - String result = DateFormatUtils.format(date, BOW_DATE_SHORT_PATTERN); - return result; - } - - /** - * Generates a random token - * - * @return the generated token - */ - public static String generateToken() { - UUID uuid = UUID.randomUUID(); - String tokenGenerated = uuid.toString(); - tokenGenerated = StringUtil.encodeMD5(tokenGenerated); // encode the token in MD5 - return tokenGenerated; // return the generated token - } - - /** - * Redirects the user either on the home page or on the search page - * - * @param tagLine search line - * @param fullTextLine full text search - * @return the page where the user will be redirected - */ - public static String redirectTo(String tagLine, String fullTextLine) { - String result = redirectTo(null, tagLine, fullTextLine); - return result; - } - - /** - * Redirects the user either on the home page or on the search page - * - * @param listId list of bookmark id - * @param tagLine search line - * @param fullTextLine full text search - * @return the page where the user will be redirected - */ - public static String redirectTo(List<String> listId, String tagLine, String fullTextLine) { - String result = "home.action"; - - boolean listIdNotEmpty = CollectionUtils.isNotEmpty(listId); - boolean tagLineNotBlank = StringUtils.isNotBlank(tagLine); - boolean fullTextLineNotBlank = StringUtils.isNotBlank(fullTextLine); - - if (listIdNotEmpty || tagLineNotBlank || fullTextLineNotBlank) { - result += "?"; - String sep = ""; - if (listIdNotEmpty) { - for (String id : listId) { - result += sep + "listId=" + id; - sep = "&"; - } - } - if (tagLineNotBlank) { - result += sep + "tagLine=" + tagLine; - sep = "&"; - } - if (fullTextLineNotBlank) { - result += sep + "fullTextLine=" + fullTextLine; - } - } - return result; - } - - /** - * Retrieves the user by the temporary or the permanent token - * - * @param session the session - * @param token either the temporary or the permanent token - * @return the user if the token is valid, null if the token doesn't exist - */ - public static BowUser checkToken(BowSession session, String token) { - BowUser result = null; - if (checkTemporaryToken(session, token) || checkPermanentToken(session, token)) { - result = session.getUser(); - } - return result; - } - - /** - * check if token exist, if true, put User associated with it, in BowSession - * - * @param session bow session - * @param token which contains the MD5 encoding token - * @return User the token owner, null if the token doesn't exist - */ - protected static boolean checkPermanentToken(BowSession session, String token) { - BowProxy proxy = session.getProxy(); - boolean result = false; - if (token != null) { - WikittyQuery criteria = new WikittyQueryMaker().eq( - BowUser.FQ_FIELD_BOWUSER_PERMANENTTOKEN, token).end(); - BowUser user = proxy.findByQuery(BowUser.class, criteria); - if (user != null) { - session.setUser(user); - result = true; - } - } - return result; - } - - /** - * Check token with temporary token - * - * @param session bow session - * @param token which contains the MD5 encoding token - * @return user the token owner, null if the token doesn't exist - */ - protected static boolean checkTemporaryToken(BowSession session, String token) { - String temporaryToken = session.getTemporaryToken(); - boolean result = temporaryToken != null && temporaryToken.equals(token); - return result; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/AliasAction.java b/bow-ui/src/main/java/org/chorem/bow/action/AliasAction.java deleted file mode 100644 index 5272cff..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/AliasAction.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BookmarkUtils; -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowUser; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; - -/** - * Handles only public aliases. Private aliases are handled by open search. - * - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class AliasAction extends BowBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(AliasAction.class); - - private static final long serialVersionUID = 1L; - - protected String redirectTo = "/"; - - protected String alias; - - protected String bookmarkId; - - public String getRedirectTo() { - return redirectTo; - } - - public void setAlias(String alias) { - this.alias = alias; - } - - public void setBookmarkId(String bookmarkId) { - this.bookmarkId = bookmarkId; - } - - @Override - public String execute() throws Exception { - if (log.isDebugEnabled()) { - log.debug("Redirect alias " + alias); - } - String result = SUCCESS; - try { - if (StringUtils.isNotEmpty(alias)) { - BowProxy proxy = getBowProxy(); - - // HACK: poussin 20150720, security access is check for read/write - // with wikitty security. No logged user can't restore not readable by him - // without security exception. We use wikitty security problem - // with select query that permit to access all field (but not object) - // to support public alias. But we must find better way. - // with this hack, we can't count bookmark access via public alias - WikittyQuery criteria = new WikittyQueryMaker() - .select(BowBookmark.ELEMENT_FIELD_BOWBOOKMARK_LINK).where().or() - .eq(BowBookmark.FQ_FIELD_BOWBOOKMARK_PUBLICALIAS, alias) - .end(); - - String link = proxy.findByQuery(criteria); - if (link == null) { - // not public alias, looking for id or private if user is logged - BowUser user = getBowSession().getUser(); - if (user != null) { - criteria = new WikittyQueryMaker().and() - .exteq(BowBookmark.EXT_BOWBOOKMARK) - .eq(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_OWNER, user.getWikittyId()) - .or() - .ideq(alias) - .eq(BowBookmark.FQ_FIELD_BOWBOOKMARK_PRIVATEALIAS, alias) - .end(); - BowBookmark bookmark = proxy.findByQuery(BowBookmark.class, criteria); - - if (bookmark == null) { - // not found in private alias of user, search into shared group - WikittyQueryMaker query = new WikittyQueryMaker().and(); - BookmarkUtils.addEqUser(query, user.getWikittyId()); - criteria = query.exteq(BowBookmark.EXT_BOWBOOKMARK) - .or() - .ideq(alias) - .eq(BowBookmark.FQ_FIELD_BOWBOOKMARK_PRIVATEALIAS, alias) - .end(); - bookmark = proxy.findByQuery(BowBookmark.class, criteria); - } - - if (bookmark != null) { - link = bookmark.getLink(); - int clicks = bookmark.getClick() + 1; - bookmark.setClick(clicks); - proxy.store(bookmark); - } - } - } - if (link != null) { - redirectTo = link; - } else { - log.error(String.format("No bookmark with alias or id '%s'", alias)); - addActionError(t("bow.alias.bookmarkId.unknown", alias)); - result = ERROR; - } - } - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - return result; - } - - public String create() throws Exception { - String result = SUCCESS; - try { - if (!StringUtils.isEmpty(alias)) { - BowProxy proxy = getBowProxy(); - - WikittyQuery criteria = new WikittyQueryMaker().eq( - BowBookmark.FQ_FIELD_BOWBOOKMARK_PUBLICALIAS, alias).end(); - - BowBookmark bookmark = proxy.findByQuery(BowBookmark.class, criteria); - if (bookmark != null) { - addActionError(t("bow.alias.already.exists", alias)); - log.error("A bookmark already exists with alias " + alias); - result = ERROR; - - } else { - bookmark = proxy.restore(BowBookmark.class, bookmarkId); - if (bookmark != null) { - bookmark.setPublicAlias(alias); - proxy.store(bookmark); - } else { - addActionError(t("bow.alias.bookmarkId.unknown", bookmarkId)); - log.debug("No bookmark with id " + bookmarkId); - result = ERROR; - } - } - } - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - - return result; - } - - public String delete() throws Exception { - log.debug("delete alias for id " + bookmarkId); - String result = SUCCESS; - try { - BowProxy proxy = getBowProxy(); - - BowBookmark bookmark = proxy.restore(BowBookmark.class, bookmarkId); - if (bookmark != null) { - bookmark.setPublicAlias(null); - proxy.store(bookmark); - } else { - addActionError(t("bow.alias.bookmarkId.unknown", bookmarkId)); - log.error("No bookmark with id " + bookmarkId); - result = ERROR; - } - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - - return result; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/AtomAction.java b/bow-ui/src/main/java/org/chorem/bow/action/AtomAction.java deleted file mode 100644 index f9408ce..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/AtomAction.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2015 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action; - -import java.util.Date; -import java.util.List; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BookmarkUtils; -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSession; -import org.chorem.bow.BowUser; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryResult; - -/** - * Handles RSS flux demande - * - tagLine - * - fullTextLine - * - count: number of bookmark to retrieve - * - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class AtomAction extends BowBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(AtomAction.class); - - private static final long serialVersionUID = 1L; - - protected int count = 15; - - /** if true bookmark of logged user is not send */ - protected boolean notmine; - - protected List<BowBookmark> bookmarks; - - protected Date date; - - protected String redirectTo = "/"; - - public String getRedirectTo() { - return redirectTo; - } - - public int getCount() { - return count; - } - - public void setCount(int count) { - this.count = count; - } - - public boolean isNotmine() { - return notmine; - } - - public void setNotmine(boolean notmine) { - this.notmine = notmine; - } - - public List<BowBookmark> getBookmarks() { - return bookmarks; - } - - public Date getDate() { - return date; - } - - @Override - public String execute() throws Exception { - if (log.isDebugEnabled()) { - log.debug(String.format("Rss for tags='%' fulltext='%s' count='%s'", tagLine, fullTextLine, count)); - } - String result = SUCCESS; - try { - - BowSession session = getBowSession(); - - BowUser user = session.getUser(); - BowProxy proxy = session.getProxy(); - - WikittyQuery criteria = BookmarkUtils.getBookmarkListCriteriaByUser( - user, listId, tagLine, fullTextLine, notmine, "descDate", 0); - criteria.setLimit(count); - WikittyQueryResult<String> bookmarksId = proxy.findAllByQuery(criteria); - bookmarks = proxy.restore(BowBookmark.class, bookmarksId.getAll(), "WikittyAuthorisation.owner"); - date = new Date(); - - if (log.isDebugEnabled()) { - log.debug(String.format("Rss found='%s'", bookmarks.size())); - } - - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - return result; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/BowBaseAction.java b/bow-ui/src/main/java/org/chorem/bow/action/BowBaseAction.java deleted file mode 100644 index 283c0e1..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/BowBaseAction.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.struts2.interceptor.SessionAware; -import org.chorem.bow.BowConfig; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSession; -import org.nuiton.web.struts2.BaseAction; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import org.chorem.bow.BookmarkUtils; -import org.chorem.bow.BowUser; - -/** - * Base class which must be extended by every action - * Overrides the Struts2 methods to render text in order to explicitly show - * the missing i18n translations - * Allows access to the session and the proxy - */ -public class BowBaseAction extends BaseAction implements SessionAware { - - private static final long serialVersionUID = 1L; - - private static final Log log = LogFactory.getLog(BowBaseAction.class); - - final static protected String CONTEXT_ACTION_KEY = "action"; - - public static final String UNTRANSLATED_MARKER = "???"; - - /** Liste des valeurs de tri possible */ - // perhaps use enumeration ? - final static protected List<String> possibleOrder = Arrays.asList( - "ascName", "descName", "ascClick", "descClick", "ascDate", "descDate"); - - public static List<String> getPossibleOrder() { - return possibleOrder; - } - - protected transient Map<String, Object> session; - - /** Configuration, default null for lazy loading */ - protected transient BowConfig config; - - protected transient BookmarkUtils bookmarkUtils; - - /** des identifiants de bookmark a recherche explicitemnet */ - protected List<String> listId; - - /** Les tags a recherche separer par un espace */ - protected String tagLine; - - /** La ligne de recherche fulltext */ - protected String fullTextLine; - - /** l'ordre d'affichage des resultats */ - protected String order; - - /** - * indice du 1er element a recuperer, on en recupere le nombre defini - * dans les preferences utilisateur. Par defaut on prend a partir du 1er - * donc l'indice 0. - */ - protected int first; - - public BowConfig getConfig() { - if (config == null) { - config = new BowConfig(); - } - return config; - } - - public BowSession getBowSession() { - BowSession result = BowSession.getBowSession(session); - return result; - } - - public BowProxy getBowProxy() { - BowProxy result = getBowSession().getProxy(); - return result; - } - - public BowUser getBowUser() { - BowUser result = getBowSession().getUser(); - return result; - } - - public BookmarkUtils getBookmarkUtils() { - if (bookmarkUtils == null) { - bookmarkUtils = new BookmarkUtils(); - } - return bookmarkUtils; - } - - @Override - public void setSession(Map<String, Object> session) { - this.session = session; - } - - public List<String> getListId() { - return listId; - } - - public void setListId(List<String> listId) { - this.listId = listId; - } - - /** @return the tagLine */ - public String getTagLine() { - return tagLine; - } - - /** @param tagLine the tagLine to set */ - public void setTagLine(String tagLine) { - this.tagLine = tagLine; - } - - /** @return the fullTextLine */ - public String getFullTextLine() { - return fullTextLine; - } - - /** @param fullTextLine the fullTextLine to set */ - public void setFullTextLine(String fullTextLine) { - this.fullTextLine = fullTextLine; - } - - public String getOrder() { - return order; - } - - public void setOrder(String order) { - this.order = order; - } - - public int getFirst() { - return first; - } - - public void setFirst(int first) { - this.first = first; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/LocaleAction.java b/bow-ui/src/main/java/org/chorem/bow/action/LocaleAction.java deleted file mode 100644 index 0144f48..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/LocaleAction.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action; - -public class LocaleAction extends BowBaseAction { - private static final long serialVersionUID = 9124549040894568467L; - - @Override - public String execute() { - return SUCCESS; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/admin/ReIndexationAction.java b/bow-ui/src/main/java/org/chorem/bow/action/admin/ReIndexationAction.java deleted file mode 100644 index d09c94a..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/admin/ReIndexationAction.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.admin; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSession; -import org.chorem.bow.action.BowBaseAction; - -/** - * Lance la reindexation solr - * - * @author poussin - */ -public class ReIndexationAction extends BowBaseAction { - - private static final long serialVersionUID = 6226574522402739559L; - - private static Log log = LogFactory.getLog(ReIndexationAction.class); - - @Override - public String execute() { - try { - BowSession session = getBowSession(); - if (session.isAdmin()) { //If is admin - BowProxy proxy = getBowProxy(); - - proxy.syncSearchEngine(); - addActionMessage(t("bow.admin.reIndexationDone")); - } - } catch (Exception eee) { - addActionError(("bow.error.internal")); - log.error(eee.getMessage(), eee); - } - return SUCCESS; - } - - static public void main(String ... args) { - BowProxy proxy = BowProxy.getInstance(null); - proxy.getWikittyService().syncSearchEngine(null); - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/AddOrUpdateAction.java b/bow-ui/src/main/java/org/chorem/bow/action/bookmark/AddOrUpdateAction.java deleted file mode 100644 index f04aca9..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/AddOrUpdateAction.java +++ /dev/null @@ -1,379 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.bookmark; - -import java.util.Collections; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BookmarkUtils; -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowBookmarkImpl; -import org.chorem.bow.BowConfig; -import org.chorem.bow.BowGroup; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSharedUser; -import org.chorem.bow.BowUser; -import org.chorem.bow.BowUtils; -import org.chorem.bow.action.BowBaseAction; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; -import org.nuiton.wikitty.query.WikittyQueryResult; - -/** - * Ajoute ou modifie un bookmark, soit par le formulaire, - * soit par un appel javascript - * - * @author poussin - */ -public class AddOrUpdateAction extends BowBaseAction { - - private static final long serialVersionUID = 3389170166034184139L; - - private static Log log = LogFactory.getLog(AddOrUpdateAction.class); - - protected String bookmarkId; - - protected String link; - - protected String name; - - protected String privateAlias; - - protected String publicAlias; - - protected String tags; - - protected String nameAndTags; - - protected String redirectTo; - - /** if true, force to go edit after add */ - protected boolean forceEdit; - - /** if true force to go to link after save, or forward redirectLink to edit page */ - protected boolean redirectLink; - - public String getBookmarkId() { - return bookmarkId; - } - - public void setBookmarkId(String bookmarkId) { - this.bookmarkId = bookmarkId; - } - - /** @return the link */ - public String getLink() { - return link; - } - - /** @param link the link to set */ - public void setLink(String link) { - this.link = link; - } - - /** @return the description */ - public String getName() { - return name; - } - - /** @param name the description to set */ - public void setName(String name) { - this.name = name; - } - - /** @return the privateAlias */ - public String getPrivateAlias() { - return privateAlias; - } - - /** @param privateAlias the privateAlias to set */ - public void setPrivateAlias(String privateAlias) { - this.privateAlias = privateAlias; - } - - public String getPublicAlias() { - return publicAlias; - } - - public void setPublicAlias(String publicAlias) { - this.publicAlias = publicAlias; - } - - /** @return the tags */ - public String getTags() { - return tags; - } - - /** @param tags the tags to set */ - public void setTags(String tags) { - this.tags = tags; - } - - /** @return the nameAndTags */ - public String getNameAndTags() { - return nameAndTags; - } - - /** @param nameAndTags the nameAndTags to set */ - public void setNameAndTags(String nameAndTags) { - this.nameAndTags = nameAndTags; - } - - /** @return the redirectTo */ - public String getRedirectTo() { - return redirectTo; - } - - public boolean isForceEdit() { - return forceEdit; - } - - public void setForceEdit(boolean forceEdit) { - this.forceEdit = forceEdit; - } - - public boolean isRedirectLink() { - return redirectLink; - } - - public void setRedirectLink(boolean redirectLink) { - this.redirectLink = redirectLink; - } - - @Override - public String execute() { - String result = SUCCESS; - try { - boolean isScriptlet = false; - BowProxy proxy = getBowProxy(); - BowBookmark bookmark = null; - - // if we don't have link, link is last entry in nameAndTags - if (StringUtils.isBlank(link)) { - if (StringUtils.contains(nameAndTags, "|")) { - link = StringUtils.substringAfterLast(nameAndTags, "|"); - nameAndTags = StringUtils.substringBeforeLast(nameAndTags, "|"); - } else { - link = nameAndTags; - nameAndTags = ""; - } - } - - // gere le cas d'une mise a jour ou d'un ajout via le formulaire - if (name == null) { - // on est dans le cas ou l'ajout a ete fait par le scriptlet qui - // utilise une seul chaine pour name et tags, on decoupe - // et on continue normalement - isScriptlet = true; - nameAndTags = StringUtils.trimToEmpty(nameAndTags); - name = StringUtils.substringBeforeLast(nameAndTags, "|"); - tags = StringUtils.substringAfterLast(nameAndTags, "|"); - } - - - // on met toutes les valeurs dans le bon format - name = BowUtils.normalizeString(name); - link = BowUtils.normalizeUrl(link); - tags = BowUtils.normalizeString(tags); - privateAlias = BowUtils.normalizeString(privateAlias); - publicAlias = BowUtils.normalizeString(publicAlias); - - - BowUser user = getBowSession().getUser(); - String userId = user.getWikittyId(); - if (StringUtils.isNotBlank(bookmarkId)) { - // on modifie un bookmark existant et on a deja son id - bookmark = proxy.restore(BowBookmark.class, bookmarkId); - if (log.isDebugEnabled()) { - log.debug("Change old wikitty: " + bookmark); - } - } else { - WikittyQuery criteria = new WikittyQueryMaker().and() - .eq(BowBookmark.FQ_FIELD_BOWBOOKMARK_LINK, link) - .eq(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_OWNER, userId) - .end(); - bookmark = - proxy.findByQuery(BowBookmark.class, criteria); - if (bookmark != null) { - // on modifie le bookmark qui a la meme url que celle a ajouter - // on fusionne les descriptions - String description = bookmark.getDescription(); - name = description +"\n" - + BowUtils.formatDate(new Date()) + ": " + name; - // on fusionne les tags - tags += " " + BookmarkUtils.getBookmarkTagsString(bookmark); - } - } - - // on a pas retrouve de bookmark a modifier, on en cree un nouveau - if (bookmark == null) { - bookmark = new BowBookmarkImpl(); - bookmark.setClick(0); - bookmark.setOwner(user); - bookmark.addReader(user.getWikittyId()); // only owner can read it - bookmark.setCreationDate(new Date()); - - if (user.getScreenshot()) { - // on essaie de prendre l'image du site que l'on ajoute - byte[] screenshot = BookmarkUtils.getScreenshot(link); - bookmark.setScreenshot(screenshot); - } - - if (user.getFavicon()) { - // on essaie de recuperer le favicone - byte[] favicone = BookmarkUtils.getFavicon(link); - bookmark.setFavicon(favicone); - } - } else { - if (log.isDebugEnabled()) { - log.debug("Change old bookmark: " + bookmark); - } - } - - // on met a jour les infos - bookmark.setDescription(name); - bookmark.setLink(link); - Set<String> tagsWord = BowUtils.getWords(tags); - bookmark.setLabels(tagsWord); - - HashSet<String> authParent = new HashSet<String>(); - // add in WikittyAuthorisation.parent all groups (tag start with @) - // where current user is member - Set<String> groupsName = BowUtils.getGroups(tagsWord); - if (CollectionUtils.isNotEmpty(groupsName)) { - WikittyQuery groupsQuery = new WikittyQueryMaker().and() - .containsOne(BowGroup.ELEMENT_FIELD_WIKITTYGROUP_NAME, groupsName) - .eq(BowGroup.ELEMENT_FIELD_WIKITTYGROUP_MEMBERS, userId) - .end(); - WikittyQueryResult<String> groupsId = proxy.findAllByQuery(groupsQuery); - authParent.addAll(groupsId.getAll()); - - if (groupsName.size() != groupsId.size()) { - List<BowGroup> groups = proxy.restore(BowGroup.class, groupsId.getAll()); - for (BowGroup g : groups) { - groupsName.remove(g.getName()); - } - for (String groupName : groupsName) { - bookmark.removeLabels(BowConfig.GROUP_MARK + groupName); - } - addActionMessage(t("bow.group.not.members", StringUtils.join(groupsName, ", "))); - } - } - // add new permission parent (group) - bookmark.setParent(authParent); - - - HashSet<String> authReader = new HashSet<String>(); - // add in WikittyAuthorisation.parent all sharedUsers (tag start with #) - Set<String> usersLogin = BowUtils.getUsers(tagsWord); - if (CollectionUtils.isNotEmpty(usersLogin)) { - WikittyQuery sharedUsersQuery = new WikittyQueryMaker().and() - .containsOne(BowUser.ELEMENT_FIELD_WIKITTYUSER_LOGIN, usersLogin) - .end(); - WikittyQueryResult<String> sharedUsersId = proxy.findAllByQuery(sharedUsersQuery); - authReader.addAll(sharedUsersId.getAll()); - - if (usersLogin.size() != sharedUsersId.size()) { - List<BowSharedUser> sharedUsers = proxy.restore(BowSharedUser.class, sharedUsersId.getAll()); - for (BowSharedUser g : sharedUsers) { - usersLogin.remove(g.getLogin()); - } - for (String sharedUserName : usersLogin) { - bookmark.removeLabels(BowConfig.USER_MARK + sharedUserName); - } - addActionMessage(t("bow.user.not.found", StringUtils.join(usersLogin, ", "))); - } - } - // add new permission reader (user) - bookmark.setReader(authReader); - - // Si l'alias prive souhaite est deja utilise on ne l'accept pas - // Si l'alias public souhaite est deja utilise on ne l'accept pas - if (StringUtils.isBlank(privateAlias)) { - bookmark.setPrivateAlias(""); - } else { - WikittyQuery privateAliasCriteria = new WikittyQueryMaker().and() - .eq(BowBookmark.FQ_FIELD_BOWBOOKMARK_PRIVATEALIAS, privateAlias) - .eq(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_OWNER, userId) - .end().setLimit(1); - WikittyQueryResult<String> aliasResult = proxy.findAllByQuery( - privateAliasCriteria); - if (aliasResult.getTotalResult() == 0 || - bookmark.getWikittyId().equals(aliasResult.get(0))) { - bookmark.setPrivateAlias(privateAlias); - } else { - addActionMessage(t("bow.alias.already.exists", privateAlias)); - } - } - - if (StringUtils.isBlank(publicAlias)) { - bookmark.setPublicAlias(""); - } else { - WikittyQuery publicAliasCriteria = new WikittyQueryMaker() - .eq(BowBookmark.FQ_FIELD_BOWBOOKMARK_PUBLICALIAS, publicAlias) - .end().setLimit(1); - WikittyQueryResult<String> aliasResult = proxy.findAllByQuery( - publicAliasCriteria); - if (aliasResult.getTotalResult() == 0 || - bookmark.getWikittyId().equals(aliasResult.get(0))) { - bookmark.setPublicAlias(publicAlias); - } else { - addActionMessage(t("bow.alias.already.exists", publicAlias)); - } - } - - proxy.store(bookmark); //Stores the bookmark if everything is ok - addActionMessage(t("bow.bookmark.add.successful")); - if (log.isDebugEnabled()) { - log.debug("Adding URL"); - } - - if (forceEdit || (isScriptlet && (StringUtils.isBlank(bookmark.getDescription()) - || CollectionUtils.isEmpty(bookmark.getLabels())))) { - // le bookmark est trop peu renseigne, on renvoie vers l'edition - redirectTo = String.format("editBookmark.action?redirectLink=%s&id=%s", redirectLink, bookmark.getWikittyId()); - } else if (redirectLink) { - redirectTo = bookmark.getLink(); - } else { - // on essai d'afficher l'entree ajoutee/modifiee - if (StringUtils.isEmpty(tagLine) && StringUtils.isEmpty(fullTextLine)) { - // il n'y avait pas de filtre on filtre sur l'element qui vient d'etre modifie - listId = Collections.singletonList(bookmark.getWikittyId()); - redirectTo = BowUtils.redirectTo(listId, tagLine, fullTextLine); - } else { - redirectTo = BowUtils.redirectTo(tagLine, fullTextLine); - } - } - } catch (Exception eee) { - result = ERROR; - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - } - return result; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/AuthenticationEditAction.java b/bow-ui/src/main/java/org/chorem/bow/action/bookmark/AuthenticationEditAction.java deleted file mode 100644 index 76f6369..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/AuthenticationEditAction.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2015 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.bookmark; - -import java.util.Collections; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowAuthentication; -import org.chorem.bow.BowProxy; -import org.chorem.bow.action.BowBaseAction; - -/** - * Handles RSS flux demande - * - tagLine - * - fullTextLine - * - count: number of bookmark to retrieve - * - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class AuthenticationEditAction extends BowBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(AuthenticationEditAction.class); - - private static final long serialVersionUID = 1L; - - protected String bookmarkId; - protected BowAuthentication authentication; - - public String getBookmarkId() { - return bookmarkId; - } - - public void setBookmarkId(String bookmarkId) { - this.bookmarkId = bookmarkId; - } - - public boolean isShareSecurity() { - BowAuthentication auth = getAuthentication(); - boolean result = !CollectionUtils.isEmpty(auth.getParent()); - return result; - } - - public void setShareSecurity(boolean shareSecurity) { - if (shareSecurity) { - getAuthentication().setParent(Collections.singleton(bookmarkId)); - } else { - getAuthentication().clearParent(); - } - } - - public BowAuthentication getAuthentication() { - if (authentication == null) { - authentication = getBowSession().getAuthentication(bookmarkId); - if (log.isDebugEnabled()) { - log.debug("authentication loaded " + authentication); - } - } - return authentication; - } - - public String load() throws Exception { - return SUCCESS; - } - - public String save() throws Exception { - if (log.isDebugEnabled()) { - log.debug("authentication save " + authentication); - } - String result = SUCCESS; - try { - BowProxy proxy = getBowProxy(); - - proxy.store(authentication); - - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - return result; - } - - public String delete() throws Exception { - if (log.isDebugEnabled()) { - log.debug("authentication delete " + authentication); - } - String result = SUCCESS; - try { - BowProxy proxy = getBowProxy(); - proxy.delete(authentication); - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - return result; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/DeleteSearchResultsAction.java b/bow-ui/src/main/java/org/chorem/bow/action/bookmark/DeleteSearchResultsAction.java deleted file mode 100644 index a5ebd87..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/DeleteSearchResultsAction.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.bookmark; - -import java.util.ArrayList; -import org.apache.commons.lang3.StringUtils; -import org.chorem.bow.BookmarkUtils; -import org.chorem.bow.BowUser; -import org.chorem.bow.action.BowBaseAction; - -import java.util.List; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowAuthentication; -import org.chorem.bow.BowProxy; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; - -/** - * Supprime des bookmarks qui satisfont le critere de recherche. - * - * @author poussin - */ -public class DeleteSearchResultsAction extends BowBaseAction { - - private static final long serialVersionUID = -3903724044644625507L; - - private static final Log log = LogFactory.getLog(DeleteSearchResultsAction.class); - - /** - * Deletes the search results - * @return SUCCES or ERROR - */ - @Override - public String execute() { - try { - if (StringUtils.isNotBlank(tagLine) - || StringUtils.isNotBlank(fullTextLine)) { - BowUser user = getBowSession().getUser(); - // FIXME poussin 20110817 ATTENTION, la recherche remonte - // potentiellement des bookmarks qui ne nous appartiennent pas, - // dans ce cas, ne faudrait-il pas seulement ce supprimer des - // reader/write/admin ? - WikittyQuery criteria = BookmarkUtils.getBookmarkListCriteriaByUser( - user, listId, tagLine, fullTextLine, false, null, 0); - criteria.setLimit(Integer.MAX_VALUE); - - BowProxy proxy = getBowProxy(); - List<String> ids = proxy.findAllByQuery(criteria).getAll(); - - criteria = new WikittyQueryMaker().and() - .exteq(BowAuthentication.EXT_BOWAUTHENTICATION) - .containsOne(BowAuthentication.ELEMENT_FIELD_BOWAUTHENTICATION_TARGET, ids) - .end(); - List<String> authIds = proxy.findAllByQuery(criteria).getAll(); - - if (log.isDebugEnabled()) { - log.debug(String.format("Will delete %s bookmarks and %s authentications", ids.size(), authIds.size())); - } - - List<String> all = new ArrayList<String>(ids.size() + authIds.size()); - all.addAll(ids); - all.addAll(authIds); - - proxy.delete(all); - addActionMessage(t("bow.search.results.deleted", ids.size())); - } - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - } - return SUCCESS; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/EditAction.java b/bow-ui/src/main/java/org/chorem/bow/action/bookmark/EditAction.java deleted file mode 100644 index c68e1df..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/EditAction.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.bookmark; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowBookmarkImpl; -import org.chorem.bow.BowProxy; -import org.chorem.bow.action.BowBaseAction; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; - -/** - * Load a bookmark to display it on modification page - * - * @author sletellier - */ -public class EditAction extends BowBaseAction { - - private static final long serialVersionUID = 1L; - private static Log log = LogFactory.getLog(EditAction.class); - - protected String id; - - protected BowBookmark bookmark; - - /** if true force to go to link after save, or forward redirectLink to edit page */ - protected boolean redirectLink; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public BowBookmark getBookmark() { - if (bookmark == null) { - bookmark = new BowBookmarkImpl(); - } - return bookmark; - } - - public boolean isRedirectLink() { - return redirectLink; - } - - public void setRedirectLink(boolean redirectLink) { - this.redirectLink = redirectLink; - } - - @Override - public String execute() throws Exception { - if (id == null) { - return SUCCESS; - } - try { - BowProxy proxy = getBowProxy(); - WikittyQuery criteria = new WikittyQueryMaker() - .ideq(id).end(); - bookmark = proxy.findByQuery(BowBookmark.class, criteria); - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - } - return SUCCESS; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/HomeAction.java b/bow-ui/src/main/java/org/chorem/bow/action/bookmark/HomeAction.java deleted file mode 100644 index 7402d60..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/HomeAction.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.bookmark; - -import com.opensymphony.xwork2.ActionContext; -import java.util.List; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BookmarkUtils; -import org.chorem.bow.BowAuthentication; -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSearchResult; -import org.chorem.bow.BowSession; -import org.chorem.bow.BowUser; -import org.chorem.bow.action.BowBaseAction; -import org.nuiton.util.TimeLog; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; -import org.nuiton.wikitty.query.WikittyQueryResult; - -/** - * Prepare l'affichage de la page d'accueil - * - * @author poussin - */ -public class HomeAction extends BowBaseAction { - - private static final Log log = LogFactory.getLog(HomeAction.class); - - private static final TimeLog timeLog = new TimeLog(HomeAction.class); - - private static final long serialVersionUID = -3735250067223062719L; - - public static HomeAction getAction() { - Object action = ActionContext.getContext().get(CONTEXT_ACTION_KEY); - return (HomeAction) action; - } - - protected String addTag; - - protected BowSearchResult searchResult; - - public String getAddTag() { - return addTag; - } - - public void setAddTag(String addTag) { - this.addTag = addTag; - } - - public BowSearchResult getSearchResult() { - return searchResult; - } - - public void setSearchResult(BowSearchResult searchResult) { - this.searchResult = searchResult; - } - - /** Load all data necessary form Home page */ - protected void load() { - // on ajoute les tags qui doivent faire parti de ne nouvelle recherche - // on restocke dans tagLine pour que la bonne info reapparaisse - // a l'utilisateur - tagLine = StringUtils.join(new String[]{tagLine, addTag}, " ").trim(); - - // si l'ordre souhaite n'existe pas, on utilise l'ordre par defaut - if (!getPossibleOrder().contains(order)) { - // default sort order - // TODO poussin 20110815 rendre configurable par l'utilisateur l'ordre par defaut qu'il prefere - order = "descClick"; - } - - BowSession session = getBowSession(); - - BowUser user = session.getUser(); - BowProxy proxy = session.getProxy(); - - WikittyQuery criteria = BookmarkUtils.getBookmarkListCriteriaByUser( - user, listId, tagLine, fullTextLine, false, order, first); - WikittyQueryResult<BowBookmark> result = - proxy.findAllByQuery(BowBookmark.class, criteria); - - criteria = new WikittyQueryMaker().and() - .exteq(BowAuthentication.EXT_BOWAUTHENTICATION) - .containsOne(BowAuthentication.ELEMENT_FIELD_BOWAUTHENTICATION_TARGET, result.getAll()) - .end(); - - WikittyQueryResult<BowAuthentication> auths = - proxy.findAllByQuery(BowAuthentication.class, criteria); - - log.debug("******** query was: " + result.getQueryString()); - log.debug("******** auths query was: " + auths.getQueryString()); - - searchResult = new BowSearchResult(result, auths, tagLine); - } - - /** Initializes everything before displaying the home page */ - @Override - public String execute() { - long start = TimeLog.getTime(); - try { - load(); - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - } - timeLog.log(start, "execute"); - return SUCCESS; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/RemoveAction.java b/bow-ui/src/main/java/org/chorem/bow/action/bookmark/RemoveAction.java deleted file mode 100644 index a68efeb..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/RemoveAction.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.bookmark; - -import java.util.Arrays; -import java.util.List; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowAuthentication; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowUtils; -import org.chorem.bow.action.BowBaseAction; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; - -/** - * Supprime un bookmark - * - * @author poussin - */ -public class RemoveAction extends BowBaseAction { - - private static final long serialVersionUID = 820566716695285561L; - private static final Log log = LogFactory.getLog(RemoveAction.class); - - protected String bookmarkId; - - protected String redirectTo; - - /** @return the bookmarkId */ - public String getBookmarkId() { - return bookmarkId; - } - - /** @param bookmarkId the bookmarkId to set */ - public void setBookmarkId(String bookmarkId) { - this.bookmarkId = bookmarkId; - } - - /** @return the redirectTo */ - public String getRedirectTo() { - return redirectTo; - } - - /** - * Removes a bookmark - * @return SUCCESS or ERROR - */ - @Override - public String execute() { - if (StringUtils.isNotEmpty(bookmarkId)) { - try { - BowProxy proxy = getBowProxy(); - - WikittyQuery criteria = new WikittyQueryMaker().and() - .exteq(BowAuthentication.EXT_BOWAUTHENTICATION) - .eq(BowAuthentication.ELEMENT_FIELD_BOWAUTHENTICATION_TARGET, bookmarkId) - .end(); - String authId = proxy.findByQuery(criteria); - List<String> ids = Arrays.asList(bookmarkId, authId); - - proxy.delete(ids); - addActionMessage(t("bow.bookmark.remove.successful")); - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error("Can't do action", eee); - } - } - redirectTo = BowUtils.redirectTo(tagLine, fullTextLine); - return SUCCESS; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/ScreenshotAction.java b/bow-ui/src/main/java/org/chorem/bow/action/bookmark/ScreenshotAction.java deleted file mode 100644 index 12f8fa6..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/bookmark/ScreenshotAction.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.bookmark; - -import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BookmarkUtils; -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowUtils; -import org.chorem.bow.action.BowBaseAction; - -/** - * Met a jour le screenshot d'un bookmark - * - * @author poussin - */ -public class ScreenshotAction extends BowBaseAction { - - private static final long serialVersionUID = 820566716695285561L; - private static final Log log = LogFactory.getLog(ScreenshotAction.class); - - protected String id; - - protected String redirectTo; - - /** @return the id */ - public String getId() { - return id; - } - - /** @param id the bookmarkId to set */ - public void setId(String id) { - this.id = id; - } - - /** @return the redirectTo */ - public String getRedirectTo() { - return redirectTo; - } - - /** Removes a bookmark */ - @Override - public String execute() { - if (StringUtils.isNotEmpty(id)) { - try { - BowProxy proxy = getBowProxy(); - BowBookmark bookmark = proxy.restore(BowBookmark.class, id); - if (bookmark != null) { - boolean changed = false; - String link = bookmark.getLink(); - - // on essaie de prendre l'image - byte[] screenshot = BookmarkUtils.getScreenshot(link); - if (ArrayUtils.isNotEmpty(screenshot) ) { - bookmark.setScreenshot(screenshot); - changed = true; - addActionMessage(t("bow.bookmark.screenshot.updated.successful")); - } - // on essaie de recuperer le favicone - byte[] favicone = BookmarkUtils.getFavicon(link); - if (ArrayUtils.isNotEmpty(favicone)) { - bookmark.setFavicon(favicone); - changed = true; - addActionMessage(t("bow.bookmark.favicon.updated.successful")); - } - - if (changed) { - proxy.store(bookmark); - } - } - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error("Can't do action", eee); - } - } - redirectTo = BowUtils.redirectTo(tagLine, fullTextLine); - return SUCCESS; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/group/GroupEditAction.java b/bow-ui/src/main/java/org/chorem/bow/action/group/GroupEditAction.java deleted file mode 100644 index f348ba6..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/group/GroupEditAction.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2015 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.group; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowConfig; -import org.chorem.bow.BowGroup; -import org.chorem.bow.BowGroupImpl; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSession; -import org.chorem.bow.BowUser; -import org.chorem.bow.BowUtils; -import org.chorem.bow.action.BowBaseAction; -import org.nuiton.wikitty.entities.Wikitty; -import org.nuiton.wikitty.entities.WikittyUserHelper; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; -import org.nuiton.wikitty.query.WikittyQueryResult; -import org.nuiton.wikitty.services.WikittyServiceAuthorisation; - -/** - * Handles RSS flux demande - * - tagLine - * - fullTextLine - * - count: number of bookmark to retrieve - * - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class GroupEditAction extends BowBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(GroupEditAction.class); - - private static final long serialVersionUID = 1L; - - protected String groupId; - protected BowGroup group; - - public String getGroupId() { - return groupId; - } - - public void setGroupId(String groupId) { - this.groupId = groupId; - } - - public BowGroup getGroup() { - if (group == null) { - loadGroup(); - } - return group; - } - - public boolean isPublic() { - return BowUtils.isPublicGroup(getGroup()); - } - - public void setPublic(boolean pub) { - String reader; - if (pub && getConfig().isAllowPublicGroup()) { - reader = WikittyServiceAuthorisation.PUBLIC; - } else { - reader = getGroup().getWikittyId(); - } - getGroup().setReader(Collections.singleton(reader)); - } - - public void loadGroup() { - if (log.isDebugEnabled()) { - log.debug("group load " + group); - } - BowProxy proxy = getBowProxy(); - if (StringUtils.isBlank(groupId)) { - BowSession session = getBowSession(); - BowUser user = session.getUser(); - - group = new BowGroupImpl(); - // add Wikitty to force add in preload too - group.addMembers(proxy.castTo(Wikitty.class, user)); - setPublic(false); - } else { - group = proxy.restore(BowGroup.class, groupId, "WikittyGroup.members"); - } - if (log.isDebugEnabled()) { - log.debug("group loaded " + group); - } - } - - public String load() throws Exception { - return SUCCESS; - } - - public String removeMe() throws Exception { - String result = SUCCESS; - try { - - String groupName = getGroup().getName(); - - BowUser user = getBowUser(); - BowProxy proxy = getBowProxy(); - - // group is loaded by prepare method - getGroup().removeMembers(user.getWikittyId()); - if (CollectionUtils.isEmpty(getGroup().getMembers())) { - addActionMessage(t("bow.group.delete.no.member")); - proxy.delete(group); - } else { - proxy.store(group); - } - - getBowSession().removeAndAddTag( - Collections.singletonList(BowConfig.GROUP_MARK + groupName), - Collections.singletonList(groupName) - ); - - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - return result; - } - - public String save() throws Exception { - if (log.isDebugEnabled()) { - log.debug("group save " + group); - } - String result = SUCCESS; - try { - BowSession session = getBowSession(); - BowProxy proxy = session.getProxy(); - - String groupName = group.getName(); - - if (StringUtils.isNotBlank(groupName)) { - Map<String, String> logins = new HashMap<String, String>(); - // convert user login to id - for (String login : getGroup().getMembers()) { - if (StringUtils.startsWith(login, "add ")) { - logins.put(StringUtils.substringAfter(login, "add "), login); - } - } - if (!logins.isEmpty()) { - WikittyQuery criteria = new WikittyQueryMaker().containsOne( - BowUser.ELEMENT_FIELD_WIKITTYUSER_LOGIN, logins.keySet()).end(); - WikittyQueryResult<Wikitty> users = proxy.findAllByQuery(Wikitty.class, criteria); - getGroup().removeMembers(logins.values().toArray(new String[logins.size()])); - getGroup().addMembers(users.getAll().toArray(new Wikitty[users.size()])); - - if (users.size() != logins.size()) { - for (Wikitty w : users) { - logins.remove(WikittyUserHelper.getLogin(w)); - } - addActionError(t("bow.group.some.user.not.found", - StringUtils.join(logins.keySet(), ", "))); - result = ERROR; - } - - } - if (result == SUCCESS && CollectionUtils.isEmpty(getGroup().getMembers())) { - addActionMessage(t("bow.group.delete.no.member")); - proxy.delete(group); - // FIXME poussin 20150806 rename only for current user, but - // all bookmarks where current user is reader and with this - // group must be modified - getBowSession().removeAndAddTag( - Collections.singletonList(BowConfig.GROUP_MARK + groupName), - Collections.singletonList(groupName) - ); - } else { - // force admin to group all time - getGroup().setAdmin(Collections.singleton(getGroup().getWikittyId())); - - proxy.store(group); - } - } else { - addActionError(t("bow.group.name.blank")); - result = ERROR; - } - - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - return result; - } - - public String delete() throws Exception { - if (log.isDebugEnabled()) { - log.debug("group delete " + group); - } - String result = SUCCESS; - try { - - String groupName = getGroup().getName(); - - BowProxy proxy = getBowProxy(); - - proxy.delete(group); - // FIXME poussin 20150806 rename only for current user, but - // all bookmarks where current user is reader and with this - // group must be modified - getBowSession().removeAndAddTag( - Collections.singletonList(BowConfig.GROUP_MARK + groupName), - Collections.singletonList(groupName) - ); - - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - return result; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/group/GroupViewAction.java b/bow-ui/src/main/java/org/chorem/bow/action/group/GroupViewAction.java deleted file mode 100644 index 9833bc1..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/group/GroupViewAction.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2015 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.group; - -import java.util.List; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowGroup; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSession; -import org.chorem.bow.BowUser; -import org.chorem.bow.action.BowBaseAction; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; -import org.nuiton.wikitty.query.WikittyQueryResult; - -/** - * Used view groups - * - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class GroupViewAction extends BowBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(GroupViewAction.class); - - private static final long serialVersionUID = 1L; - - protected List<BowGroup> groups; - - public List<BowGroup> getGroups() { - return groups; - } - - @Override - public String execute() throws Exception { - String result = SUCCESS; - try { - - BowSession session = getBowSession(); - - BowUser user = session.getUser(); - BowProxy proxy = session.getProxy(); - - WikittyQuery criteria = new WikittyQueryMaker().and() - .exteq(BowGroup.EXT_BOWGROUP) - .eq(BowGroup.ELEMENT_FIELD_WIKITTYGROUP_MEMBERS, user).end(); - WikittyQueryResult<String> groupsId = proxy.findAllByQuery(criteria); - groups = proxy.restore(BowGroup.class, groupsId.getAll(), "WikittyGroup.members"); - - if (log.isDebugEnabled()) { - log.debug(String.format("Group found='%s'", groups.size())); - } - - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - return result; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/login/ForgotPasswordAction.java b/bow-ui/src/main/java/org/chorem/bow/action/login/ForgotPasswordAction.java deleted file mode 100644 index ba9bebe..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/login/ForgotPasswordAction.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.login; - -import org.apache.commons.lang3.RandomStringUtils; -import org.apache.commons.lang3.StringUtils; -import org.chorem.bow.BowMail; -import org.chorem.bow.BowUser; -import org.chorem.bow.action.BowBaseAction; -import org.nuiton.util.StringUtil; - -import javax.mail.MessagingException; -import javax.mail.internet.AddressException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSharedUser; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; - -/** - * Genere un nouveau mot de passe pour l'utilisateur et lui envoie par mail - * TODO poussin 20110211 il faudrait ajouter une securite pour eviter que - * quelqu'un s'amuse a demander la modification de password de quelqu'un d'autre - * toutes les 2s - * - soit en ne permettant l'envoi qu'une fois par jour - * - soit ???? - * - * @author poussin - */ -public class ForgotPasswordAction extends BowBaseAction { - - private static final long serialVersionUID = -8207951465957204954L; - private static final Log log = LogFactory.getLog(ForgotPasswordAction.class); - - protected String email; - - /** @return the email */ - public String getEmail() { - return email; - } - - /** @param email the email to set */ - public void setEmail(String email) { - this.email = email; - } - - /** Generates a new password and sends it to the user */ - @Override - public String execute() { - String result = INPUT; - - try { - if (StringUtils.isNotBlank(email)) { - email = email.trim(); - BowProxy proxy = getBowProxy(); - WikittyQuery criteria = new WikittyQueryMaker().and() - .extne(BowSharedUser.EXT_BOWSHAREDUSER) - .eq(BowUser.FQ_FIELD_WIKITTYUSER_LOGIN, email).end(); - BowUser user = proxy.findByQuery(BowUser.class, criteria); - - if (user != null) { //If the email address exists - String password; - String md5; - - password = RandomStringUtils.randomAlphanumeric(20); - md5 = StringUtil.encodeMD5(password); - try { - String mailContent; - - mailContent = t("bow.register.mailHi") + - ",\n\n" + t("bow.register.mailPwd") + ": " + - password + "\n\n" + t("bow.register.mailEmail") + - ": " + email + "\n\n"; - BowMail.sendMail(email, - t("bow.register.mailSubject"), - mailContent); - - //The password is changed only if the mail has been sent - user.setPassword(md5); - proxy.store(user); - } catch (AddressException eee) { - //If the email address is invalid - addActionError(t("bow.mail.badFormat")); - log.error(String.format("Can't send message email to '%s'", - email), eee); - } catch (MessagingException eee) { - addActionError("bow.mail.sendError"); - log.error(String.format("Can't send message email to '%s'", - email), eee); - } - result = SUCCESS; - } else { //If the email is not associated with an account - addFieldError("email", - t("bow.forgotPassword.emailDoesntExist")); - } - } - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - } - return result; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/login/LoginAction.java b/bow-ui/src/main/java/org/chorem/bow/action/login/LoginAction.java deleted file mode 100644 index c540ce9..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/login/LoginAction.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ - -package org.chorem.bow.action.login; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowConfig; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSharedUser; -import org.chorem.bow.BowUser; -import org.chorem.bow.BowUserImpl; -import org.chorem.bow.action.BowBaseAction; -import org.nuiton.util.StringUtil; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; - -/** - * authentifie l'utilisateur et place son objet User dans la bow session - * - * @author poussin - */ -public class LoginAction extends BowBaseAction { - - private static final long serialVersionUID = 6891064800288772246L; - private static Log log = LogFactory.getLog(LoginAction.class); - - protected String email; - - protected String password; - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - /** - * Check password in solr index, if fail try to check password admin in config file - * - * @param email non null et non vide email - * @param password non null et non vide email - * @return - */ - protected BowUser checkLogin(String email, String password) { - BowUser result; - - BowProxy proxy = getBowProxy(); - WikittyQuery criteria = new WikittyQueryMaker().and() - .extne(BowSharedUser.EXT_BOWSHAREDUSER) - .eq(BowUser.FQ_FIELD_WIKITTYUSER_LOGIN, email) - .eq(BowUser.FQ_FIELD_WIKITTYUSER_PASSWORD, password).end(); - result = proxy.findByQuery(BowUser.class, criteria); - - if (result == null) { - // failback: try to authenticate admin with config info - String configPassword = BowConfig.getAdminPassword(email); - log.info(String.format("failback password: '%s' configPassword: '%s'", - password, configPassword)); - if (password.equals(configPassword)) { - // admin authenticate with config, this is possible when - // solr index is corrupted or missed. Admin must go to admin - // page en recreate index - result = new BowUserImpl(); - result.setLogin(email); - result.setPassword(configPassword); - addActionMessage(t("bow.login.admin.failback")); - log.warn(t("bow.login.admin.failback")); - } else { - addActionError(t("bow.login.authenticationFailure")); - } - } - return result; - } - - /** Authenticates the user if his email and password are valid */ - @Override - public String execute() { - String result = INPUT; - - try { - if (StringUtils.isNotBlank(email)) { - email = email.trim(); - - if (StringUtils.isNotEmpty(password)) { - String md5 = StringUtil.encodeMD5(password); - BowUser user; - - user = checkLogin(email, md5); - if (user != null) { - getBowSession().setUser(user); - result = SUCCESS; - } - } - } - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - } - return result; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/login/LogoutAction.java b/bow-ui/src/main/java/org/chorem/bow/action/login/LogoutAction.java deleted file mode 100644 index 5882cea..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/login/LogoutAction.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.login; - -import org.chorem.bow.BowSession; -import org.chorem.bow.action.BowBaseAction; - -/** - * Invalide la session courante et donc de-authentifie l'utilisateur - * - * @author poussin - */ -public class LogoutAction extends BowBaseAction { - private static final long serialVersionUID = 4806944250461551896L; - - @Override - public String execute() { - BowSession.invalidate(session); - return SUCCESS; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/login/RegisterAction.java b/bow-ui/src/main/java/org/chorem/bow/action/login/RegisterAction.java deleted file mode 100644 index c58e1be..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/login/RegisterAction.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2018 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.login; - -import org.apache.commons.lang3.StringUtils; -import org.chorem.bow.BowMail; -import org.chorem.bow.BowUser; -import org.chorem.bow.BowUserImpl; -import org.chorem.bow.BowUtils; -import org.chorem.bow.action.BowBaseAction; -import org.nuiton.util.StringUtil; - -import javax.mail.MessagingException; -import javax.mail.internet.AddressException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSharedUser; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; - -/** - * Enregistre un nouvel utilisateur - * - * @author poussin - */ -public class RegisterAction extends BowBaseAction { - - private static final long serialVersionUID = 2204772861770399542L; - - private static Log log = LogFactory.getLog(RegisterAction.class); - - protected String email; - - // honey pot field - protected String name; - - protected String password; - - protected String repeatPassword; - - /** @return the email */ - public String getEmail() { - return email; - } - - /** @param email the email to set */ - public void setEmail(String email) { - this.email = email; - } - - public void setName(String name) { - this.name = name; - } - - public String getName() { - return name; - } - - /** @return the password */ - public String getPassword() { - return password; - } - - /** @param password the password to set */ - public void setPassword(String password) { - this.password = password; - } - - /** @return the repeatPassword */ - public String getRepeatPassword() { - return repeatPassword; - } - - /** @param repeatPassword the repeatPassword to set */ - public void setRepeatPassword(String repeatPassword) { - this.repeatPassword = repeatPassword; - } - - /** - * @param email non null and non blank email - * @return false if the email address isn't already registered, true - * otherwise - */ - protected boolean alreadyRegistered(String email) { - boolean result; - - BowProxy proxy = getBowProxy(); - //Retrieves user by user name (email) - WikittyQuery criteria = new WikittyQueryMaker().and() - .extne(BowSharedUser.EXT_BOWSHAREDUSER) - .eq(BowUser.FQ_FIELD_WIKITTYUSER_LOGIN, email).end(); - - result = proxy.findByQuery(BowUser.class, criteria) != null; - //If the user doesn't already exist - if (result) { - //The email address is already used by someone - addFieldError("email", t("bow.register.emailAldyUsed")); - } - return result; - } - - /** Registers the new user and sends an email to confirm registration */ - @Override - public String execute() { - String result = INPUT; - - // honey pot - if (StringUtils.isNotEmpty(name)) { - addActionError(t("bow.error.internal")); - return INPUT; - } - - try { - - if (StringUtils.isNotBlank(email)) { - email = email.trim(); - if (StringUtils.isNotBlank(password)) { - if (!password.equals(repeatPassword)) { - addActionError(t("bow.register.pwdDontMatch")); - } else { - String md5 = StringUtil.encodeMD5(password); - - //If the email address isn't already used - if (!alreadyRegistered(email)) { - BowProxy proxy = getBowProxy(); - BowUserImpl newUser = new BowUserImpl(); - newUser.setPassword(md5); - newUser.setLogin(email); - String permanentToken = BowUtils.generateToken(); - newUser.setPermanentToken(permanentToken); - BowUser login = proxy.store(newUser); //Stores the new user - - //If there was an error when storing the user - if (login == null) { - addFieldError("email", t("bow.register.invalidLogin")); - } else { - getBowSession().setUser(login); - try { - String mailContent; - - mailContent = - t("bow.register.mailHi") + ",\n\n" + - t("bow.register.mailPwd") + ": " + password + "\n\n" + - t("bow.register.mailEmail") + ": " + email + "\n\n"; - BowMail.sendMail(email, t("bow.register.mailSubject"), mailContent); - } catch (AddressException eee) { - //If the email address is invalid - addActionError(t("bow.mail.badFormat")); - log.error(String.format("Can't send message email to '%s'", - email), eee); - } catch (MessagingException eee) { - addActionError("bow.mail.sendError"); - log.error(String.format("Can't send message email to '%s'", - email), eee); - } - result = SUCCESS; - } - } - } - } - } - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - } - return result; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchBaseAction.java b/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchBaseAction.java deleted file mode 100644 index 83a8b2f..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchBaseAction.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.opensearch; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.struts2.ServletActionContext; -import org.chorem.bow.BowSearchPrefix; -import org.chorem.bow.action.BowBaseAction; -import java.util.List; -import java.util.ListIterator; - -/** - * Traite toutes les demandes faite via l'opensearch - * a:, :, t:, ... - * <p/> - * Cette classe recherche le prefix et redirige vers la bonne methode execute. - * Les classes filles n'ont plus qu'a implanter les methodes - * - * @author poussin - */ -abstract public class OpenSearchBaseAction extends BowBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(OpenSearchBaseAction.class); - - private static final long serialVersionUID = 1L; - - /** [in] le token d'identification */ - protected String token; - - /** [in] la ligne de recherche soumise par l'utilisateur */ - protected String q; - - public String getQ() { - return q; - } - - public void setQ(String q) { - this.q = q; - } - - /** @return the token */ - public String getToken() { - return token; - } - - /** @param token the token to set */ - public void setToken(String token) { - this.token = token; - } - - abstract protected String executePrefixAction(BowSearchPrefix foundPrefix, String query); - - @Override - public String execute() { - log.debug("######################### OpenSearchBaseAction enter #################" + q); - log.debug("param:" + ServletActionContext.getRequest().getParameterMap()); - - BowSearchPrefix defaultPrefix = null; - BowSearchPrefix foundPrefix = null; - String query; - - // prefixes is ordered in lexical order, iterate in reverse order to match per example !gi before !g - List<BowSearchPrefix> prefixes = getBowSession().getSearchPrefix(); - for (ListIterator<BowSearchPrefix> i=prefixes.listIterator(prefixes.size()); i.hasPrevious();) { - BowSearchPrefix prefix = i.previous(); - String p = prefix.getPrefix(); - if (StringUtils.isBlank(p)) { - defaultPrefix = prefix; - } else if (StringUtils.startsWith(q, p)) { - foundPrefix = prefix; - break; - } - } - - if (foundPrefix == null) { - foundPrefix = defaultPrefix; - } - - if (foundPrefix == null) { - query = q; - } else { - query = StringUtils.substringAfter(q, foundPrefix.getPrefix()); - } - - System.out.println("######################### OpenSearchBaseAction #################" + query + " - " + foundPrefix); - - String result = executePrefixAction(foundPrefix, query); - return result; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchResultAction.java b/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchResultAction.java deleted file mode 100644 index e12a80a..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchResultAction.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.opensearch; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.struts2.interceptor.ServletResponseAware; -import org.chorem.bow.BowConfig; - -import javax.servlet.http.HttpServletResponse; -import org.chorem.bow.BowSearchPrefix; -import org.nuiton.config.ApplicationConfig; - -/** - * Traite toutes les demandes faite via l'opensearch - * a:, :, t:, ... - * - * @author poussin - */ -public class OpenSearchResultAction extends OpenSearchBaseAction implements ServletResponseAware { - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = - LogFactory.getLog(OpenSearchResultAction.class); - - private static final long serialVersionUID = 1L; - - protected String redirectTo; - - protected transient HttpServletResponse response; - - /** @return the redirectTo */ - public String getRedirectTo() { - return redirectTo; - } - - @Override - public void setServletResponse(HttpServletResponse response) { - this.response = response; - } - - @Override - protected String executePrefixAction(BowSearchPrefix foundPrefix, String query) { - String action; - - ApplicationConfig config = BowConfig.getConfig(); - - if (foundPrefix == null) { - action = BowConfig.getSearchEngine(); - } else { - action = foundPrefix.getSearch(); - } - - // des alias peuvent exister dans la configuration - String optionkey = "bow.prefix." + action; - if (config.hasOption(optionkey)) { - action = config.getOption(optionkey); - } - - action = action.replace("{searchTerms}", query); - action = response.encodeRedirectURL(action); - redirectTo = action; - - return SUCCESS; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchSuggestionAction.java b/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchSuggestionAction.java deleted file mode 100644 index 4a0140f..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchSuggestionAction.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.opensearch; - -import com.opensymphony.xwork2.ActionContext; -import org.apache.commons.io.input.ReaderInputStream; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowConfig; - -import java.io.InputStream; -import java.io.StringReader; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.http.HttpEntity; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.util.EntityUtils; -import org.apache.struts2.ServletActionContext; -import org.chorem.bow.BowSearchPrefix; -import org.nuiton.config.ApplicationConfig; - -/** - * Retourne les suggestions pour l'opensearch en fonction de ce qui a ete deja - * saisi - * - * @author poussin - */ -public class OpenSearchSuggestionAction extends OpenSearchBaseAction { - - /** Logger. */ - private static final Log log = - LogFactory.getLog(OpenSearchSuggestionAction.class); - - private static final long serialVersionUID = 1L; - - public static OpenSearchSuggestionAction getAction() { - Object action = ActionContext.getContext().get(CONTEXT_ACTION_KEY); - return (OpenSearchSuggestionAction) action; - } - - protected transient InputStream inputStream; - - public InputStream getInputStream() { - return inputStream; - } - - @Override - protected String executePrefixAction(BowSearchPrefix foundPrefix, String query) { - String result = String.format("['%s', []]", query); - try { - log.trace("######################### executePrefixAction #################" + query + " - " + foundPrefix); - String action; - - ApplicationConfig config = BowConfig.getConfig(); - - if (foundPrefix == null) { - action = BowConfig.getSearchEngine(); - } else { - action = foundPrefix.getSuggestion(); - } - - // des alias peuvent exister dans la configuration - String optionkey = "bow.prefix." + action; - if (config.hasOption(optionkey)) { - action = config.getOption(optionkey); - } - - action = action.replace("{searchTerms}", URLEncoder.encode(query, "UTF-8")); - - if (!StringUtils.startsWith(action, "http")) { - String serveur = - ServletActionContext.getRequest().getScheme() + "://" + - ServletActionContext.getRequest().getServerName() + ":" + - ServletActionContext.getRequest().getServerPort() + - ServletActionContext.getRequest().getContextPath(); - if (!StringUtils.startsWith(action, "/")) { - action = "/" + action; - } - action = serveur + action + "&token=" + getBowSession().getPermanentToken(); - } - -// action = ServletActionContext.getResponse().encodeURL(action); - try { - log.debug("try to connect to : " + action); - // ne fonctionne pas (rien ne se passe, pas de requete envoyee :() -// result = Request.Get(action) -// .connectTimeout(1000) -// .socketTimeout(1000) -// .execute().returnContent().asString(); - - - CloseableHttpClient httpclient = HttpClients.createDefault(); - HttpGet httpGet = new HttpGet(action); - CloseableHttpResponse response = httpclient.execute(httpGet); - - try { - HttpEntity entity = response.getEntity(); - result = IOUtils.toString(entity.getContent()); - // ensure it is fully consumed - EntityUtils.consume(entity); - } finally { - response.close(); - } - } catch (Exception eee) { - log.info("Can't get result for url: " + action, eee); - } finally { - log.debug("suggestion: " + result); - } - } catch (UnsupportedEncodingException eee) { - log.info("Can't make suggestion for: " + query, eee); - } - inputStream = new ReaderInputStream(new StringReader(result)); - - return SUCCESS; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/opensearch/SuggestionAction.java b/bow-ui/src/main/java/org/chorem/bow/action/opensearch/SuggestionAction.java deleted file mode 100644 index dc87cc5..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/opensearch/SuggestionAction.java +++ /dev/null @@ -1,232 +0,0 @@ -package org.chorem.bow.action.opensearch; - -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2013 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ - - -import java.io.InputStream; -import java.io.StringReader; -import java.util.ArrayList; -import java.util.List; -import java.util.Set; -import org.apache.commons.io.input.ReaderInputStream; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BookmarkUtils; -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowUser; -import org.chorem.bow.BowUtils; -import org.chorem.bow.action.BowBaseAction; -import org.nuiton.wikitty.entities.Wikitty; -import org.nuiton.wikitty.query.FacetTopic; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; -import org.nuiton.wikitty.query.WikittyQueryResult; - -/** - * - * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : $Author$ - */ -public class SuggestionAction extends BowBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(SuggestionAction.class); - private static final long serialVersionUID = 1L; - - /** [in] le token d'identification */ - protected String token; - /** [in] la requete pour lequel il faut trouver des suggesions */ - protected String q; - /** [out] le resultat de la suggestion **/ - protected transient InputStream inputStream; - - public void setToken(String token) { - this.token = token; - } - - public InputStream getInputStream() { - return inputStream; - } - - public String getQ() { - return q; - } - - public void setQ(String q) { - this.q = q; - } - - public String tag() { - if (log.isDebugEnabled()) { - log.debug(String.format("Start opensearch tag suggest for '%s'", q)); - } - - // preparation de la reponse. Un toString sur une liste retourne - // la bonne syntaxe pour une reponse json :) si on triche un peu - // en ajoutant des '' pour les chaines - List<Object> json = new ArrayList<Object>(); - List<String> completions = new ArrayList<String>(); -// List<String> descriptions = new ArrayList<String>(); -// List<String> queryUrls = new ArrayList<String>(); - - json.add("'" + q + "'"); - json.add(completions); -// json.add(descriptions); -// json.add(queryUrls); - - if (q != null) { - BowUser user = getBowSession().getUser(); - BowProxy proxy = getBowProxy(); - - // on ajoute * a la fin du dernier tag, car il n'est peut-etre pas fini - String searchLineStar = q + "*"; - - // on recupere le dernier tag en train d'etre ecrit - String firstTag; - String lastTag; - if (q.contains(" ")) { - firstTag = StringUtils.substringBeforeLast(q, " ") + " "; - lastTag = StringUtils.substringAfterLast(q, " "); - } else { - firstTag = ""; - lastTag = q; - } - - Set<String> searchLineList = BowUtils.getWords(searchLineStar); - - WikittyQueryMaker search = BookmarkUtils.addEqUser(new WikittyQueryMaker().and(), user.getWikittyId()); - search.exteq(BowBookmark.EXT_WIKITTYLABEL); - search.containsAll(BowBookmark.FQ_FIELD_WIKITTYLABEL_LABELS, searchLineList); - - WikittyQuery criteria = search.end() - .setLimit(0) // on ne veut aucun resultat, c'est la facet dont on a besoin - .setFacetMinCount(1) // on demande meme les labels avec 1 seul item - .setFacetLimit(Integer.MAX_VALUE) // ne ne met pas -1 pour qu'il soit trie par ordre de count - .addFacetField(BowBookmark.ELEMENT_FIELD_WIKITTYLABEL_LABELS); - - WikittyQueryResult<Wikitty> result = proxy.findAllByQuery(Wikitty.class, criteria); - // lorsqu'on demande tout (facetLimit(-1)), les topics sont trie - // alphabetiquement pas besoin de les retrier - List<FacetTopic> topics = result.getTopic(BowBookmark.ELEMENT_FIELD_WIKITTYLABEL_LABELS); - if (log.isTraceEnabled()) { - log.trace("all topics: %s" + topics); - } - - // on en retourne un suggestion que le meme nombre de tag qu'il souhaite - // voir affiche - int count = user.getTags(); - for (FacetTopic t : topics) { - // on ne met que les topics qui qui commence par lastTag - String completion = t.getTopicName(); - if (log.isTraceEnabled()) { - log.trace(String.format("'%s' startsWith '%s' ? ", completion, lastTag)); - } - if (completion.startsWith(lastTag)) { -// String description = t("bow.opensearch.result", t.getCount()); -// String tags = q + StringUtils.removeStart(completion, lastTag); -// String queryUrl = BowConfig.getBowUrl() + BowUtils.redirectTo(tags, null); - - completions.add("'" + firstTag + completion + "'"); -// descriptions.add("'" + description + "'"); -// queryUrls.add("'" + queryUrl + "'"); - - // on s'arrete si l'on en a assez - count--; - if (count <= 0) { - break; - } - } - } - } - if (log.isDebugEnabled()) { - log.debug(String.format("opensearch suggest result: %s", json)); - } - inputStream = new ReaderInputStream(new StringReader(json.toString())); - return SUCCESS; - - } - - public String fulltext() { - String result = String.format("['%s', []]", q); - inputStream = new ReaderInputStream(new StringReader(result)); - return SUCCESS; - } - - public String alias() { - if (log.isDebugEnabled()) { - log.debug(String.format("Start opensearch alias suggest for '%s'", q)); - } - - // preparation de la reponse. Un toString sur une liste retourne - // la bonne syntaxe pour une reponse json :) si on triche un peu - // en ajoutant des '' pour les chaines - List<Object> json = new ArrayList<Object>(); - List<String> completions = new ArrayList<String>(); -// List<String> descriptions = new ArrayList<String>(); -// List<String> queryUrls = new ArrayList<String>(); - - json.add("'" + q + "'"); - json.add(completions); -// json.add(descriptions); -// json.add(queryUrls); - - if (q != null) { - BowUser user = getBowSession().getUser(); - BowProxy proxy = getBowProxy(); - - // on ajoute * a la fin, car il n'est peut-etre pas fini - String privateAliasStar = q + "*"; - - WikittyQueryMaker search = BookmarkUtils.addEqUser(new WikittyQueryMaker().and(), user.getWikittyId()); - search.or(). - eq(BowBookmark.FQ_FIELD_BOWBOOKMARK_PRIVATEALIAS, privateAliasStar). - eq(BowBookmark.FQ_FIELD_BOWBOOKMARK_PUBLICALIAS, privateAliasStar); - - WikittyQuery criteria = search.end() - .setLimit(15); // on recupere que les 15 premiers resultats - - WikittyQueryResult<BowBookmark> result = proxy.findAllByQuery(BowBookmark.class, criteria); - - for (BowBookmark b : result) { - String completion = b.getPrivateAlias(); -// String description = b.getDescription(); -// String queryUrl = String.format("%s%s?token=%s", -// BowConfig.getAliasUrl(), completion, token); - completions.add("'" + completion + "'"); -// descriptions.add("'" + description + "'"); -// queryUrls.add("'" + queryUrl + "'"); - } - - } - if (log.isDebugEnabled()) { - log.debug(String.format("opensearch alias suggest result: %s", json)); - } - inputStream = new ReaderInputStream(new StringReader(json.toString())); - return SUCCESS; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/preference/AdminTagAction.java b/bow-ui/src/main/java/org/chorem/bow/action/preference/AdminTagAction.java deleted file mode 100644 index acaf4c2..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/preference/AdminTagAction.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.preference; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowUser; -import org.nuiton.wikitty.entities.WikittyLabel; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; -import org.nuiton.wikitty.query.WikittyQueryResult; - -/** - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class AdminTagAction extends PreferenceBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(AdminTagAction.class); - - private static final long serialVersionUID = 1L; - - /** - * ACTION STRUTS - * <p/> - * Fait les modification demandé par l'utilisateur dans l'interface de - * preference: renome ou supprime des labels. Si l'utilisateur demande le - * remplacement de label on indiquant pas de nouveau label, alors la chaine - * vide est utilisee. - * - * @return - */ - @Override - public String execute() { - String result = SUCCESS; - try { - if (log.isDebugEnabled()) { - log.debug("Selected labels: " + Arrays.toString(selectedLabels)); - log.debug("action delete: " + delete + " rename: " + rename); - } - - List<String> toRemove = Arrays.asList(selectedLabels); - List<String> toAdd = null; - - if (StringUtils.isNotEmpty(rename)) { - toAdd = Collections.singletonList(newLabel); - } - - getBowSession().removeAndAddTag(toRemove, toAdd); - - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - } finally { - // on recharge les data apres l'action pour l'affichage - load(); - } - return result; - - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/preference/DeleteImportAction.java b/bow-ui/src/main/java/org/chorem/bow/action/preference/DeleteImportAction.java deleted file mode 100644 index 2b7cc01..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/preference/DeleteImportAction.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.preference; - -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowImport; -import org.chorem.bow.BowUser; - -import java.util.List; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowProxy; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; - - -/** - * Supprime un import de bookmark - * - * @author poussin - */ -public class DeleteImportAction extends PreferenceBaseAction { - private static final long serialVersionUID = 8714394293884265516L; - - static private Log log = LogFactory.getLog(DeleteImportAction.class); - - protected String date; - - /** @return the date */ - public String getDate() { - return date; - } - - /** @param date the date to set */ - public void setDate(String date) { - this.date = date; - } - - /** Deletes a bookmark import */ - public String execute() { - String result = SUCCESS; - try { - if (date != null && - // XXX poussin 20110818 y'a-t-il vraiment une utilite a checker - // que la date verifie le pattern ? - // car on pire on ne retrouve rien et donc on ne supprime rien - date.matches("[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{1,3}Z")) { - BowProxy proxy = getBowProxy(); - BowUser user = getBowSession().getUser(); - WikittyQuery criteria = new WikittyQueryMaker().and() - .eq(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_OWNER, user.getWikittyId()) - .eq(BowImport.FQ_FIELD_BOWIMPORT_IMPORTDATE, date).end(); - List<BowImport> bookmarks = proxy.findAllByQuery(BowImport.class, criteria).getAll(); - - if (log.isDebugEnabled()) { - log.debug("Will delete " + bookmarks.size() + " bookmarks"); - } - - proxy.delete(bookmarks); - - addActionMessage(t("bow.bookmark.import.delete.successful")); - } - } catch (Exception e) { - result = ERROR; - addActionError(t("bow.error.internal")); - log.error(e.getMessage(), e); - } finally { - // on recharge les data apres l'action pour l'affichage - load(); - } - return result; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/preference/ExportBookmarksAction.java b/bow-ui/src/main/java/org/chorem/bow/action/preference/ExportBookmarksAction.java deleted file mode 100644 index e2c3607..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/preference/ExportBookmarksAction.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.preference; - -import org.apache.commons.io.IOUtils; -import org.chorem.bow.BookmarkUtils; -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowUser; -import org.chorem.bow.action.BowBaseAction; - -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.Writer; -import java.util.Date; -import java.util.List; -import java.util.Set; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowProxy; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; - -/** - * Export son bookmark au format HTML - * - * @author poussin - */ -public class ExportBookmarksAction extends BowBaseAction { - private static final long serialVersionUID = 45880214686011946L; - - static private Log log = LogFactory.getLog(ExportBookmarksAction.class); - - protected transient InputStream inputStream; - - public InputStream getInputStream() { - return inputStream; - } - - /** - * Export tous les bookmarks au format HTML tel que le fait les navigateurs - * - * @param bookmarks List<Bookmarks> bookmarks - * @param out le flux dans lequel il faut ecrire l'export - * @return String the html file - * @throws IOException - */ - protected void generateExportHtmlBookmark(List<BowBookmark> bookmarks, Writer out) throws IOException { - out.write("<!DOCTYPE NETSCAPE-Bookmark-file-1>\n" - + "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\">\n" - + "<DL><p>\n"); - if (bookmarks != null) { - for (BowBookmark bookmark : bookmarks) { - if (bookmark != null) { - out.write("<DT><A HREF=\""); - out.write(bookmark.getLink() + "\" "); - Date date = bookmark.getCreationDate(); - if (date != null) { - long milli = date.getTime(); - String time = String.valueOf(milli / 1000); - out.write("ADD_DATE=\"" + time + "\" LAST_MODIFIED=\"" + time + "\" "); - } - out.write("LAST_CHARSET=\"UTF-8\" "); - Set<String> tags = bookmark.getLabels(); - if (tags != null && !tags.isEmpty()) { - out.write("SHORTCUTURL=\"" - + BookmarkUtils.getBookmarkTagsString(bookmark) + "\""); - } - out.write(">" + bookmark.getDescription() + "</A>\n"); - } - } - } - out.write("</DL><p>"); - } - - /** Exports the bookmarks in HTML format */ - @Override - public String execute() { - BowProxy proxy = getBowProxy(); - - // get current user - BowUser user = getBowSession().getUser(); - - // Get all bookmark for user - WikittyQuery criteria = new WikittyQueryMaker() - .eq(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_OWNER, user.getWikittyId()).end(); - List<BowBookmark> bookmarks = proxy.findAllByQuery(BowBookmark.class, criteria).getAll(); - - // Export all - BufferedWriter out = null; - - try { - - // Write result in temp file - File tmp = File.createTempFile("bookmarks", ".tmp.html"); - - tmp.deleteOnExit(); - out = new BufferedWriter(new FileWriter(tmp)); - generateExportHtmlBookmark(bookmarks, out); - out.close(); - - inputStream = new FileInputStream(tmp); - } catch (IOException eee) { - log.error("Error when exporting bookmarks to HTML : ", eee); - } finally { - IOUtils.closeQuietly(out); - } - return SUCCESS; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/preference/GenerateTokenAction.java b/bow-ui/src/main/java/org/chorem/bow/action/preference/GenerateTokenAction.java deleted file mode 100644 index 0376dee..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/preference/GenerateTokenAction.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.preference; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowUser; -import org.chorem.bow.BowUtils; - -/** - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class GenerateTokenAction extends PreferenceBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(GenerateTokenAction.class); - - private static final long serialVersionUID = 1L; - - @Override - public String execute() { - try { - BowUser user = getBowSession().getUser(); - BowProxy proxy = getBowProxy(); - - String permanentToken = BowUtils.generateToken(); - user.setPermanentToken(permanentToken); - proxy.store(user); - - String temporaryToken = BowUtils.generateToken(); - getBowSession().setTemporaryToken(temporaryToken); - addActionMessage(t("bow.token.generate.successful")); - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error("Can't regenerate token", eee); - } finally { - // on recharge les data apres l'action pour l'affichage - load(); - } - return SUCCESS; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/preference/ImportBookmarksAction.java b/bow-ui/src/main/java/org/chorem/bow/action/preference/ImportBookmarksAction.java deleted file mode 100644 index 88a982e..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/preference/ImportBookmarksAction.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.preference; - -import org.apache.commons.lang3.StringUtils; -import org.chorem.bow.BookmarkUtils; -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowImportHelper; -import org.chorem.bow.BowUser; -import org.htmlparser.Node; -import org.htmlparser.Parser; -import org.htmlparser.util.NodeList; -import org.htmlparser.util.ParserException; -import org.htmlparser.util.SimpleNodeIterator; -import org.nuiton.wikitty.entities.Wikitty; - -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowProxy; - -/** - * Import un bookmark HTML - * - * @author poussin - */ -public class ImportBookmarksAction extends PreferenceBaseAction { - - private static final long serialVersionUID = -5962680416570797028L; - - private static Log log = LogFactory.getLog(ImportBookmarksAction.class); - - protected File upfile; - - protected String upfileContentType; - - protected String upfileFileName; - - /** @return the upfile */ - public File getUpfile() { - return upfile; - } - - /** @param upfile the upfile to set */ - public void setUpfile(File upfile) { - this.upfile = upfile; - } - - /** @return the upfileContentType */ - public String getUpfileContentType() { - return upfileContentType; - } - - /** @param upfileContentType the upfileContentType to set */ - public void setUpfileContentType(String upfileContentType) { - this.upfileContentType = upfileContentType; - } - - /** @return the upfileFileName */ - public String getUpfileFileName() { - return upfileFileName; - } - - /** @param upfileFileName the upfileFileName to set */ - public void setUpfileFileName(String upfileFileName) { - this.upfileFileName = upfileFileName; - } - - /** - * @param html String html - * @param name String name - * @param user User user - * @return Bookmark the bookmark filled - */ - protected BowBookmark createBookmarkFromHtml(String html, String name, BowUser user) { - String link = getUrlFromHtml(html); - String tags = getTagsFromHtml(html); - Date date = getDateFromHtml(html); - BowBookmark bookmark = BookmarkUtils.createBookmark(link, - name, - tags, - user, - null, - null, - date); - return bookmark; - } - - /** - * @param html String html - * @return Date from the html - */ - protected Date getDateFromHtml(String html) { - Date date = null; - if (html != null) { - Pattern p = Pattern.compile("ADD_DATE=\"([^\"]*)\""); - Matcher m = p.matcher(html); - if (m.find()) { - String str = m.group(1); - if (str != null && !str.isEmpty()) { - long time = Long.valueOf(str) * 1000; // the date in ms - date = new Date(time); - } - } - } - return date; - } - - /** - * @param html String html - * @return url - */ - protected String getUrlFromHtml(String html) { - String url = ""; - if (html != null) { - Pattern p = Pattern.compile("A HREF=\"([^\"]*)\""); - Matcher m = p.matcher(html); - if (m.find()) { - url = m.group(1); - } - } - return url; - } - - protected String getTagsFromHtml(String html) { - String tags = ""; - if (html != null) { - Pattern p = Pattern.compile("SHORTCUTURL=\"([^\"]*)\""); - Matcher m = p.matcher(html); - if (m.find()) { - tags = m.group(1); - } - } - return tags; - } - - protected void parseHtmlToBookmarks(NodeList list, - BowUser user, - Date date, - List<BowBookmark> bookmarks, - Set<String> tagList) - throws ParserException { - - SimpleNodeIterator it = list.elements(); - - while (it.hasMoreNodes()) { - Node node = it.nextNode(); - String plainText = node.toPlainTextString(); // The text between - // two heads ==> - // <toto>plainText</toto> - String text = node.getText(); // The text in the head ==> - // <text></toto> - - if (StringUtils.startsWithIgnoreCase(text, "h3")) { // H3 = folder - if (StringUtils.isNotBlank(plainText)) { - tagList.add(plainText); // Adds the folder name to the - // tagList - } - } else if (StringUtils.startsWithIgnoreCase(text, "a href")) { // HREF - // = new - // bookmarks - BowBookmark bookmark = createBookmarkFromHtml(text, plainText, user); - Wikitty w = getBowProxy().castTo(Wikitty.class, bookmark); - BowImportHelper.addExtension(w); - BowImportHelper.setImportDate(w, date); - - bookmark.addAllLabels(tagList); - - bookmarks.add(bookmark); - } - NodeList children = node.getChildren(); - - if (children != null) { - parseHtmlToBookmarks(children, user, date, bookmarks, - // On utilise une nouvelle liste pour les enfants - // pour eviter que les tags de tous les enfants se - // retrouve ensemble - new HashSet<String>(tagList)); // If there is an under node = recursion - } - } - } - - @Override - public String execute() { - String result = SUCCESS; - log.info("Importing boormarks : " + upfile); - try { - BowUser user = getBowSession().getUser(); - - // Struts limite to html files, is null if not one - if (upfile != null) { - BowProxy proxy = getBowProxy(); - - try { - URL url = upfile.toURI().toURL(); - Parser parser = new Parser(url.openConnection()); - NodeList list = parser.parse(null); - - List<BowBookmark> bookmarks = new ArrayList<BowBookmark>(); - parseHtmlToBookmarks(list, user, new Date(), bookmarks, - new HashSet<String>()); - proxy.store(bookmarks); - - addActionMessage(t("bow.bookmark.import.successful")); - } catch (ParserException eee) { - result = ERROR; - log.error(String.format("Can't parse imported file '%s'", - getUpfileFileName()), eee); - addActionError(t("bow.bookmark.badFileFormat")); - } catch (IOException eee) { - result = ERROR; - log.error(String.format("Can't read imported file '%s'", - getUpfileFileName()), eee); - addActionError(t("bow.error.internal")); - } - } else { - addActionError(t("bow.bookmark.badFileFormat")); - result = ERROR; - } - } catch (Exception eee) { - result = ERROR; - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - } finally { - // on recharge les data apres l'action pour l'affichage - load(); - } - return result; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/preference/PreferenceBaseAction.java b/bow-ui/src/main/java/org/chorem/bow/action/preference/PreferenceBaseAction.java deleted file mode 100644 index 0150c96..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/preference/PreferenceBaseAction.java +++ /dev/null @@ -1,432 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.preference; - -import com.opensymphony.xwork2.ActionContext; -import org.chorem.bow.BowBookmark; -import org.chorem.bow.BowImport; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSession; -import org.chorem.bow.BowUser; -import org.chorem.bow.action.BowBaseAction; -import org.nuiton.wikitty.WikittyUtil; -import org.nuiton.wikitty.entities.Wikitty; - -import java.text.ParseException; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowAuthentication; -import org.chorem.bow.BowSearchPrefix; -import org.nuiton.wikitty.query.FacetTopic; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; -import org.nuiton.wikitty.query.WikittyQueryResult; - -/** - * Change les preferences de l'utilisateur (couleur, password, email, ...) - * - * @author poussin - */ -public class PreferenceBaseAction extends BowBaseAction { - - private static final long serialVersionUID = -58341106356599721L; - private static final Log log = LogFactory.getLog(PreferenceBaseAction.class); - - public static PreferenceBaseAction getAction() { - Object action = ActionContext.getContext().get(CONTEXT_ACTION_KEY); - return (PreferenceBaseAction) action; - } - - public enum DefaultPrefix {TAG, FULLTEXT, WEB, ALIAS} - - /** la liste des differentes data que l'on peut charger */ - protected enum PreferenceType { - USER_PREF, AUTH_PREF, SITE_PREF, LABELS, IMPORTS - } - - protected BowAuthentication bowAuth; - - protected String email; - - protected String newPassword; - - protected String currentPassword; - - protected String confirmNewPassword; - - protected String colors; - - protected boolean screenshot; - - protected boolean favicon; - - protected String tagsNb; - - protected String bookmarksHomePage; - - protected List<BowSearchPrefix> searchPrefix; - - protected List<FacetTopic> labels; - - protected String[] selectedLabels; - - protected String rename; - - protected String delete; - - protected String newLabel; - - protected String update; - - protected Map<String, Integer> bookmarksImportDate; - - public BowAuthentication getBowAuth() { - if (bowAuth == null) { - BowSession session = getBowSession(); - BowUser user = session.getUser(); - bowAuth = session.getAuthentication(user.getWikittyId()); - } - return bowAuth; - } - - public void setBowAuth(BowAuthentication bowAuth) { - this.bowAuth = bowAuth; - } - - public String getNewLabel() { - return newLabel; - } - - public void setNewLabel(String newLabel) { - this.newLabel = newLabel; - } - - public void setRename(String rename) { - this.rename = rename; - } - - public String getRename() { - return rename; - } - - public void setDelete(String delete) { - this.delete = delete; - } - - public String getDelete() { - return delete; - } - - /** @return the colors */ - public String getColors() { - return colors; - } - - /** @param colors the colors to set */ - public void setColors(String colors) { - this.colors = colors; - } - - public boolean isScreenshot() { - return screenshot; - } - - public void setScreenshot(boolean screenshot) { - this.screenshot = screenshot; - } - - public boolean isFavicon() { - return favicon; - } - - public void setFavicon(boolean favicon) { - this.favicon = favicon; - } - - /** @return the tagsNb */ - public String getTagsNb() { - return tagsNb; - } - - /** @param tagsNb the tagsNb to set */ - public void setTagsNb(String tagsNb) { - this.tagsNb = tagsNb; - } - - /** @return the bookmarksHomePage */ - public String getBookmarksHomePage() { - return bookmarksHomePage; - } - - /** @param bookmarksHomePage the bookmarksHomePage to set */ - public void setBookmarksHomePage(String bookmarksHomePage) { - this.bookmarksHomePage = bookmarksHomePage; - } - - public List<BowSearchPrefix> getSearchPrefix() { - if (searchPrefix == null) { - loadSearchPrefixPref(); - } - return searchPrefix; - } - - public void setSearchPrefix(List<BowSearchPrefix> searchPrefix) { - this.searchPrefix = searchPrefix; - } - - /** @return the email */ - public String getEmail() { - return email; - } - - /** @param email the email to set */ - public void setEmail(String email) { - this.email = email; - } - - /** @return the newPassword */ - public String getNewPassword() { - return newPassword; - } - - /** @param newPassword the newPassword to set */ - public void setNewPassword(String newPassword) { - this.newPassword = newPassword; - } - - /** @return the currentPassword */ - public String getCurrentPassword() { - return currentPassword; - } - - /** @param currentPassword the currentPassword to set */ - public void setCurrentPassword(String currentPassword) { - this.currentPassword = currentPassword; - } - - /** @return the confirmNewPassword */ - public String getConfirmNewPassword() { - return confirmNewPassword; - } - - /** @param confirmNewPassword the confirmNewPassword to set */ - public void setConfirmNewPassword(String confirmNewPassword) { - this.confirmNewPassword = confirmNewPassword; - } - - /** @return the update */ - public String getUpdate() { - return update; - } - - /** @param update the update to set */ - public void setUpdate(String update) { - this.update = update; - } - - /** @return the bookmarksImportDate */ - public Map<String, Integer> getBookmarksImportDate() { - return bookmarksImportDate; - } - - /** @param bookmarksImportDate the bookmarksImportDate to set */ - public void setBookmarksImportDate(Map<String, Integer> bookmarksImportDate) { - this.bookmarksImportDate = bookmarksImportDate; - } - - public List<FacetTopic> getLabels() { - return labels; - } - - public String[] getSelectedLabels() { - return selectedLabels; - } - - public void setSelectedLabels(String[] selectedLabels) { - this.selectedLabels = selectedLabels; - } - - /** - * Date est une date mais au format String qui vient de Solr - * Elle est de la forme '2011-08-18T00:25:16.028Z' - * qui n'est pas presentable a l'utilisateur - * On la remet sous une vrai forme date - * <p/> - * Cette methode est utilise dans la JSP de rendu - * - * @param date - * @return - */ - public Date stringToDate(String date) { - try { - Date result = WikittyUtil.parseDate(date); - return result; - } catch (ParseException eee) { - return new Date(0); - } - } - - /** - * Load les données sauf celle que l'on demande d'exclure du load - * - * @param exclude - */ - protected void load(PreferenceType... exclude) { - PreferenceType[] list = PreferenceType.values(); - for (PreferenceType type : exclude) { - list[type.ordinal()] = null; - } - - for (PreferenceType type : list) { - if (type != null) { - switch (type) { - case USER_PREF: - loadUserPref(); - break; - case AUTH_PREF: - loadAuthPref(); - break; - case SITE_PREF: - loadSitePref(); - loadSearchPrefixPref(); - break; - case LABELS: - loadLabels(); - break; - case IMPORTS: - loadImport(); - break; - default: - // do nothing - break; - } - } - } - } - - /** charge les info de l'utilisateur qu'il peut modifier */ - protected void loadUserPref() { - BowSession session = getBowSession(); - BowUser user = session.getUser(); - - setEmail(user.getLogin()); - } - - protected void loadAuthPref() { - } - - /** Charge les preferences utilisateur pour le site */ - protected void loadSitePref() { - BowSession session = getBowSession(); - BowUser user = session.getUser(); - - if (log.isDebugEnabled()) { - log.debug("Load site pref for " + user); - } - - setColors(user.getColors()); - setScreenshot(user.getScreenshot()); - setFavicon(user.getFavicon()); - setTagsNb(String.valueOf(user.getTags())); - setBookmarksHomePage(String.valueOf(user.getBookmarks())); - } - - protected void loadSearchPrefixPref() { - BowSession session = getBowSession(); - this.searchPrefix = session.getSearchPrefix(); - } - - /** Charge la liste des imports que l'utilisateur a fait */ - protected void loadImport() { - BowSession session = getBowSession(); - BowProxy proxy = session.getProxy(); - BowUser user = session.getUser(); - - WikittyQuery criteria = new WikittyQueryMaker().and() - .exteq(BowImport.EXT_BOWIMPORT) - .eq(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_OWNER, user.getWikittyId()).end() - .addFacetField(BowImport.ELEMENT_FIELD_BOWIMPORT_IMPORTDATE) - .setOffset(0).setLimit(0); - - List<FacetTopic> bookmarksImportDate = - proxy.findAllByQuery(BowImport.class, criteria) - .getTopic(BowImport.ELEMENT_FIELD_BOWIMPORT_IMPORTDATE); - - // Extract imports - Map<String, Integer> result = new HashMap<String, Integer>(); - for (FacetTopic facet : bookmarksImportDate) { - String dateAsString = facet.getTopicName(); - int count = facet.getCount(); - result.put(dateAsString, count); - } - - if (log.isDebugEnabled()) { - log.debug("bookmarksByImportDate found : " - + result.size()); - } - setBookmarksImportDate(result.isEmpty() ? null : result); - } - - /** Charge dans la variable labels tous les labels de l'utilisateur. */ - protected void loadLabels() { - BowSession session = getBowSession(); - BowProxy proxy = session.getProxy(); - BowUser user = session.getUser(); - String userId = user.getWikittyId(); - - WikittyQuery c = new WikittyQueryMaker().and() - .exteq(BowBookmark.EXT_WIKITTYLABEL) - .eq(BowBookmark.FQ_FIELD_WIKITTYAUTHORISATION_OWNER, userId) - .end().setLimit(0) // on ne veut aucun resultat, c'est la facet dont on a besoin - .setFacetMinCount(1) // on demande meme les labels avec 1 seul item - .setFacetLimit(WikittyQuery.MAX) // on demande tous les labels - .addFacetField(BowBookmark.ELEMENT_FIELD_WIKITTYLABEL_LABELS); - WikittyQueryResult<Wikitty> result = proxy.findAllByQuery(Wikitty.class, c); - // lorsqu'on demande tout (facetLimit(-1)), les topics sont trie - // alphabetiquement pas besoin de les retrier - labels = result.getTopic(BowBookmark.FQ_FIELD_WIKITTYLABEL_LABELS); - } - - /** - * ACTION STRUTS - * <p/> - * Action executer lorsque l'utilisateur demande la page. Prepare toutes - * les données pour la page JSP - */ - @Override - public String input() { - String result = SUCCESS; - - try { - // load all data - load(); - } catch (Exception eee) { - result = ERROR; - addActionError(t("bow.error.internal")); - log.error("Can't load data preference", eee); - } - return result; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/preference/UpdateAuthenticationAction.java b/bow-ui/src/main/java/org/chorem/bow/action/preference/UpdateAuthenticationAction.java deleted file mode 100644 index 0f4c9d2..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/preference/UpdateAuthenticationAction.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.preference; - -import java.util.Collections; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSession; -import org.chorem.bow.BowUser; - -/** - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class UpdateAuthenticationAction extends PreferenceBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(UpdateAuthenticationAction.class); - - private static final long serialVersionUID = 1L; - - @Override - public String execute() { - String result = SUCCESS; - - try { - BowProxy proxy = getBowProxy(); - proxy.store(bowAuth); - - addActionMessage(t("bow.preferences.update.successful")); - } catch (Exception eee) { - result = ERROR; - addActionError(t("bow.error.internal")); - log.error("Can't change authentication preference", eee); - } finally { - // on recharge les data apres l'action pour l'affichage - // sauf celle du user qui sont deja les bonnes - load(PreferenceType.AUTH_PREF); - } - - return result; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/preference/UpdateSiteAction.java b/bow-ui/src/main/java/org/chorem/bow/action/preference/UpdateSiteAction.java deleted file mode 100644 index 43f8fea..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/preference/UpdateSiteAction.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.preference; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSearchPrefix; -import org.chorem.bow.BowSearchPrefixImpl; -import org.chorem.bow.BowSession; -import org.chorem.bow.BowUser; - -/** - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class UpdateSiteAction extends PreferenceBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(UpdateSiteAction.class); - - private static final long serialVersionUID = 1L; - - protected int removedPrefix = -1; - - public void setRemovedPrefix(int removedPrefix) { - this.removedPrefix = removedPrefix; - } - - public int getRemovedPrefix() { - return removedPrefix; - } - - /** - * ACTION STRUTS - * <p/> - * Action executer lorsque l'utilisateur demande la page - */ - @Override - public String execute() { - String result = SUCCESS; - - try { - BowSession session = getBowSession(); - BowProxy proxy = session.getProxy(); - BowUser preference = session.getUser(); - - preference.setScreenshot(screenshot); - preference.setFavicon(favicon); - - preference.setColors(colors); - if (StringUtils.isNotBlank(tagsNb)) { - preference.setTags(Integer.valueOf(tagsNb)); - } - if (StringUtils.isNotBlank(bookmarksHomePage)) { - preference.setBookmarks(Integer.valueOf(bookmarksHomePage)); - } - - searchPrefix = proxy.store(searchPrefix); - - preference = proxy.store(preference); - getBowSession().setUser(preference); - } catch (Exception eee) { - result = ERROR; - addActionError(t("bow.error.internal")); - log.error("Can't change site preference", eee); - } finally { - // on recharge les data apres l'action pour l'affichage - // sauf celle du site qui sont deja les bonnes - load(PreferenceType.SITE_PREF); - } - return result; - } - - - public String addPrefix() { - String result = SUCCESS; - try { - BowSession session = getBowSession(); - BowProxy proxy = session.getProxy(); - - BowSearchPrefix prefix = new BowSearchPrefixImpl(); - prefix.setBowUser(session.getUser().getWikittyId()); - - searchPrefix.add(prefix); - proxy.store(searchPrefix); - // force reload to have right order by - searchPrefix = null; - } catch (Exception eee) { - result = ERROR; - addActionError(t("bow.error.internal")); - log.error("Can't change site preference", eee); - } finally { - // on recharge les data apres l'action pour l'affichage - // sauf celle du site qui sont deja les bonnes - load(PreferenceType.SITE_PREF); - } - return result; - } - - public String removePrefix() { - String result = SUCCESS; - try { - log.debug("########################## removedPrefix ############## " + removedPrefix); - if (removedPrefix >= 0) { - BowSession session = getBowSession(); - BowProxy proxy = session.getProxy(); - - BowSearchPrefix p = searchPrefix.remove(removedPrefix); - proxy.delete(p); - } - } catch (Exception eee) { - result = ERROR; - addActionError(t("bow.error.internal")); - log.error("Can't change site preference", eee); - } finally { - // on recharge les data apres l'action pour l'affichage - // sauf celle du site qui sont deja les bonnes - load(PreferenceType.SITE_PREF); - } - return result; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/preference/UpdateUserAction.java b/bow-ui/src/main/java/org/chorem/bow/action/preference/UpdateUserAction.java deleted file mode 100644 index e63d18f..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/preference/UpdateUserAction.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.preference; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSession; -import org.chorem.bow.BowUser; -import org.nuiton.util.StringUtil; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; - -/** - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class UpdateUserAction extends PreferenceBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(UpdateUserAction.class); - - private static final long serialVersionUID = 1L; - - /** - * ACTION STRUTS - * <p/> - * Modifie l'email et le password si necessaire. Si la modif est impossible - * email deja utilise, ou mauvais password, alors la methode return ERROR - * Si tout ce passe bien, la methode retourne SUCCES - * - * @return - */ - @Override - public String execute() { - String result = SUCCESS; - - try { - BowSession session = getBowSession(); - BowProxy proxy = session.getProxy(); - BowUser user = session.getUser(); - - if (StringUtils.isNotBlank(email)) { - WikittyQuery criteria = new WikittyQueryMaker() - .eq(BowUser.FQ_FIELD_WIKITTYUSER_LOGIN, email).end(); - if (log.isDebugEnabled()) { - log.debug(String.format("Try to find user with email: '%s'", email)); - } - BowUser find = getBowProxy().findByQuery(BowUser.class, criteria); - - //If this email address isn't already used (or if it hasn't changed) - if (find == null || find.getLogin().equals(user.getLogin())) { - email = email.trim(); - user.setLogin(email); - } else { - // this email address is already used by someone else - setEmail(user.getLogin()); - - // TODO poussin 20110818 addFieldError don't work (no message on web page :( - // add addActionError to prevent addFieldError that don't work - addFieldError("email", t("bow.preferences.emailAldyExists")); - addActionError(t("bow.preferences.emailAldyExists")); - result = ERROR; - } - } - - if (SUCCESS.equals(result) - && StringUtils.isNotBlank(newPassword) - && StringUtils.isNotBlank(confirmNewPassword) - && StringUtils.isNotBlank(currentPassword)) { - if (newPassword.equals(confirmNewPassword)) { - currentPassword = StringUtil.encodeMD5(currentPassword); - if (currentPassword.equals(user.getPassword())) { - user.setPassword(StringUtil.encodeMD5(newPassword)); - } else { - // TODO poussin 20110818 addFieldError don't work (no message on web page :( - // add addActionError to prevent addFieldError that don't work - addFieldError("currentPassword", t("bow.preferences.badCurrentPassword")); - addActionError(t("bow.preferences.badCurrentPassword")); - result = ERROR; - } - } - } - if (SUCCESS.equals(result)) { - user = proxy.store(user); - getBowSession().setUser(user); - addActionMessage(t("bow.preferences.update.successful")); - } - } catch (Exception eee) { - result = ERROR; - addActionError(t("bow.error.internal")); - log.error("Can't change site preference", eee); - } finally { - // on recharge les data apres l'action pour l'affichage - // sauf celle du user qui sont deja les bonnes - load(PreferenceType.USER_PREF); - } - - return result; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/sharedUser/SharedUserEditAction.java b/bow-ui/src/main/java/org/chorem/bow/action/sharedUser/SharedUserEditAction.java deleted file mode 100644 index fc2c89d..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/sharedUser/SharedUserEditAction.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2015 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.sharedUser; - -import java.util.Collections; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowConfig; -import org.chorem.bow.BowSharedUser; -import org.chorem.bow.BowSharedUserImpl; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowUser; -import org.chorem.bow.BowUtils; -import org.chorem.bow.action.BowBaseAction; - -/** - * Handles RSS flux demande - * - tagLine - * - fullTextLine - * - count: number of bookmark to retrieve - * - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class SharedUserEditAction extends BowBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(SharedUserEditAction.class); - - private static final long serialVersionUID = 1L; - - protected String sharedUserId; - protected BowSharedUser sharedUser; - - public String getSharedUserId() { - return sharedUserId; - } - - public void setSharedUserId(String sharedUserId) { - this.sharedUserId = sharedUserId; - } - - public BowSharedUser getSharedUser() { - if (sharedUser == null) { - loadSharedUser(); - } - return sharedUser; - } - - public void loadSharedUser() { - if (log.isDebugEnabled()) { - log.debug("sharedUser load " + sharedUser); - } - BowProxy proxy = getBowProxy(); - if (StringUtils.isBlank(sharedUserId)) { - sharedUser = new BowSharedUserImpl(); - - BowUser user = getBowUser(); - sharedUser.setOwner(user); - - String permanentToken = BowUtils.generateToken(); - sharedUser.setPermanentToken(permanentToken); - } else { - sharedUser = proxy.restore(BowSharedUser.class, sharedUserId); - } - if (log.isDebugEnabled()) { - log.debug("sharedUser loaded " + sharedUser); - } - } - - public String load() throws Exception { - return SUCCESS; - } - - public String save() throws Exception { - if (log.isDebugEnabled()) { - log.debug("sharedUser save " + sharedUser); - } - String result = SUCCESS; - try { - BowProxy proxy = getBowProxy(); - - if (StringUtils.isNotBlank(sharedUser.getLogin())) { - proxy.store(sharedUser); - } else { - addActionError(t("bow.sharedUser.name.blank")); - result = ERROR; - } - - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - return result; - } - - public String delete() throws Exception { - if (log.isDebugEnabled()) { - log.debug("sharedUser delete " + sharedUser); - } - String result = SUCCESS; - try { - - String userLogin = getSharedUser().getLogin(); - - BowProxy proxy = getBowProxy(); - - proxy.delete(sharedUserId); - - getBowSession().removeAndAddTag( - Collections.singletonList(BowConfig.USER_MARK + userLogin), - Collections.singletonList(userLogin) - ); - - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - return result; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/action/sharedUser/SharedUserViewAction.java b/bow-ui/src/main/java/org/chorem/bow/action/sharedUser/SharedUserViewAction.java deleted file mode 100644 index d491699..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/action/sharedUser/SharedUserViewAction.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2015 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.action.sharedUser; - -import java.util.List; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.bow.BowProxy; -import org.chorem.bow.BowSession; -import org.chorem.bow.BowSharedUser; -import org.chorem.bow.BowUser; -import org.chorem.bow.action.BowBaseAction; -import org.nuiton.wikitty.query.WikittyQuery; -import org.nuiton.wikitty.query.WikittyQueryMaker; -import org.nuiton.wikitty.query.WikittyQueryResult; - -/** - * Used view ss - * - * @author poussin - * @version $Revision$ - * <p/> - * Last update: $Date$ - * by : $Author$ - */ -public class SharedUserViewAction extends BowBaseAction { - - /** to use log facility, just put in your code: log.info(\"...\"); */ - private static final Log log = LogFactory.getLog(SharedUserViewAction.class); - - private static final long serialVersionUID = 1L; - - protected List<BowSharedUser> sharedUsers; - - public List<BowSharedUser> getSharedUsers() { - return sharedUsers; - } - - @Override - public String execute() throws Exception { - String result = SUCCESS; - try { - - BowSession session = getBowSession(); - - BowUser user = session.getUser(); - BowProxy proxy = session.getProxy(); - - WikittyQuery criteria = new WikittyQueryMaker().and() - .exteq(BowSharedUser.EXT_BOWSHAREDUSER) - .eq(BowSharedUser.ELEMENT_FIELD_BOWSHAREDUSER_OWNER, user).end(); - WikittyQueryResult<String> sharedUsersId = proxy.findAllByQuery(criteria); - sharedUsers = proxy.restore(BowSharedUser.class, sharedUsersId.getAll()); - - if (log.isDebugEnabled()) { - log.debug(String.format("SharedUser found='%s'", sharedUsers.size())); - } - - } catch (Exception eee) { - addActionError(t("bow.error.internal")); - log.error(eee.getMessage(), eee); - result = ERROR; - } - return result; - } - -} diff --git a/bow-ui/src/main/java/org/chorem/bow/interceptor/LaxLoginInterceptor.java b/bow-ui/src/main/java/org/chorem/bow/interceptor/LaxLoginInterceptor.java deleted file mode 100644 index e897850..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/interceptor/LaxLoginInterceptor.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.interceptor; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import org.chorem.bow.BowSession; -import org.chorem.bow.BowUser; -import org.chorem.bow.BowUtils; - -import java.util.Map; - -/** - * Interceptor used to login user is inforamtion existe, otherwize do nothing - */ -public class LaxLoginInterceptor extends AbstractInterceptor { - private static final long serialVersionUID = -7520186185205372272L; - - @Override - public String intercept(ActionInvocation invocation) throws Exception { - Map<String, Object> session = ActionContext.getContext().getSession(); - - BowSession bowSession = BowSession.getBowSession(session); - BowUser user = bowSession.getUser(); - String result = null; - - //If the user isn't logged in - if (user == null) { - Map<String, Object> params = ActionContext.getContext().getParameters(); - //Retrieves the token value in URL - String[] token = (String[]) params.get("token"); - - if (token != null && !token[0].isEmpty()) { - //Retrieves the user by token - user = BowUtils.checkToken(bowSession, token[0]); - - //If the token is valid - if (user != null) { - //Authenticates the user - bowSession.setUser(user); - } - } - } - - result = invocation.invoke(); - - return result; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/interceptor/LoginInterceptor.java b/bow-ui/src/main/java/org/chorem/bow/interceptor/LoginInterceptor.java deleted file mode 100644 index 529c161..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/interceptor/LoginInterceptor.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.interceptor; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import org.apache.struts2.ServletActionContext; -import org.chorem.bow.BowSession; -import org.chorem.bow.BowUser; -import org.chorem.bow.BowUtils; - -import java.util.Map; - -/** - * Interceptor used to redirect a non-logged user if he tries to access a page - * where logging is mandatory - */ -public class LoginInterceptor extends AbstractInterceptor { - private static final long serialVersionUID = -7520186185205372272L; - - protected String redirect; - - /** @param redirect the redirect to set */ - public void setRedirect(String redirect) { - this.redirect = redirect; - } - - @Override - public String intercept(ActionInvocation invocation) throws Exception { - Map<String, Object> session = ActionContext.getContext().getSession(); - - BowSession bowSession = BowSession.getBowSession(session); - BowUser user = bowSession.getUser(); - String result = null; - - //If the user isn't logged in - if (user == null) { - Map<String, Object> params = ActionContext.getContext().getParameters(); - //Retrieves the token value in URL - String[] token = (String[]) params.get("token"); - - if (token != null && !token[0].isEmpty()) { - //Retrieves the user by token - user = BowUtils.checkToken(bowSession, token[0]); - - //If the token is valid - if (user != null) { - //Authenticates the user - bowSession.setUser(user); - } - } - } - - if (user == null) { - ServletActionContext.getResponse().sendRedirect(redirect); - } else { - result = invocation.invoke(); - } - - return result; - } -} diff --git a/bow-ui/src/main/java/org/chorem/bow/interceptor/LogoutInterceptor.java b/bow-ui/src/main/java/org/chorem/bow/interceptor/LogoutInterceptor.java deleted file mode 100644 index d06bdd0..0000000 --- a/bow-ui/src/main/java/org/chorem/bow/interceptor/LogoutInterceptor.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package org.chorem.bow.interceptor; - -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ActionInvocation; -import com.opensymphony.xwork2.interceptor.AbstractInterceptor; -import org.chorem.bow.BowSession; - -import java.util.Map; - -/** Interceptor used to remove all trace of user in session. Used for login page */ -public class LogoutInterceptor extends AbstractInterceptor { - private static final long serialVersionUID = -7520186185205372272L; - - @Override - public String intercept(ActionInvocation invocation) throws Exception { - Map<String, Object> session = ActionContext.getContext().getSession(); - BowSession.invalidate(session); - String result = invocation.invoke(); - return result; - } -} diff --git a/bow-ui/src/main/resources/META-INF/aop.xml b/bow-ui/src/main/resources/META-INF/aop.xml deleted file mode 100644 index 488286e..0000000 --- a/bow-ui/src/main/resources/META-INF/aop.xml +++ /dev/null @@ -1,42 +0,0 @@ -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> -<!DOCTYPE aspectj PUBLIC - "-//AspectJ//DTD//EN" - "http://www.eclipse.org/aspectj/dtd/aspectj.dtd"> - -<aspectj> - <aspects> - <concrete-aspect name="org.chorem.bow.ProfilingAspect" - extends="org.nuiton.profiling.NuitonTrace"> - <pointcut name="executeMethod" - expression=" - execution(* org.nuiton..*(..)) - || execution(* org.chorem..*(..)) - || execution(* org.apache.struts2..*(..)) - || execution(* com.opensymphony..*(..)) - || execution(* org.apache.velocity..*(..)) - || execution(* freemarker..*(..)) - || execution(* ognl..*(..))"/> - </concrete-aspect> - </aspects> - <weaver options="-verbose"> - </weaver> -</aspectj> diff --git a/bow-ui/src/main/resources/bow.properties b/bow-ui/src/main/resources/bow.properties deleted file mode 100644 index 20e8f95..0000000 --- a/bow-ui/src/main/resources/bow.properties +++ /dev/null @@ -1,58 +0,0 @@ -### -# #%L -# BOW UI -# %% -# Copyright (C) 2010 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# #L% -### -application.version=${project.version} -bow.url=http://localhost:8080/bow-ui -alias.url=http://localhost:8080/bow-ui/alias -bow.smtpServer=smtp -bow.addressFrom=bow@chorem.org -bow.admins=poussin@codelutin.com -search.engine=http://seeks.fr/search?expansion=1&action=expand&q={searchTerms} - -wikitty.data.directory=/var/local/bow -wikitty.storage.jdbc.queryfile=wikitty-jdbc-query.properties -wikitty.storage.jdbc.driver=org.h2.Driver -wikitty.storage.jdbc.host=jdbc:h2:file:${wikitty.data.directory}/data/db -wikitty.storage.jdbc.login=sa -wikitty.storage.jdbc.password= -wikitty.storage.jdbc.xadatasource=org.h2.jdbcx.JdbcDataSource -wikitty.storage.jdbc.xadatasource.org.h2.jdbcx.JdbcDataSource.URL=${wikitty.storage.jdbc.host} -wikitty.storage.jdbc.xadatasource.org.h2.jdbcx.JdbcDataSource.user=${wikitty.storage.jdbc.login} -wikitty.storage.jdbc.xadatasource.org.h2.jdbcx.JdbcDataSource.password=${wikitty.storage.jdbc.password} -wikitty.searchengine.solr.directory.data=${wikitty.data.directory}/data/solr -wikitty.searchengine.solr.directory.factory=solr.StandardDirectoryFactory -wikitty.WikittyService.components=org.nuiton.wikitty.services.WikittyServiceStorage,\ -org.nuiton.wikitty.services.WikittyServiceNotifier,\ -org.nuiton.wikitty.services.WikittyServiceCached,\ -org.nuiton.wikitty.services.WikittyServiceAuthentication,\ -org.nuiton.wikitty.services.WikittyServiceAuthorisationReadNullify -wikitty.WikittyServiceStorage.components=org.nuiton.wikitty.jdbc.WikittyExtensionStorageJDBC,\ -org.nuiton.wikitty.jdbc.WikittyStorageJDBC,\ -org.nuiton.wikitty.storage.solr.WikittySearchEngineSolr -wikitty.WikittyServiceCached.components=org.nuiton.wikitty.services.WikittyCacheJCS -wikitty.service.cache.listenevents=false -wikitty.service.cache.allwaysRestoreCopies=false -wikitty.service.event.propagate=false -wikitty.service.event.listen=false -wikitty.addon.export.threadnumber=1 -wikitty.addon.export.directory=${wikitty.data.directory}/export -wikitty.addon.export.publicurl=file://${wikitty.data.directory}/export/ -jcs.default= -jcs.default.cacheattributes.MaxObjects=1000 diff --git a/bow-ui/src/main/resources/bowpwd.sh b/bow-ui/src/main/resources/bowpwd.sh deleted file mode 100755 index 0d38060..0000000 --- a/bow-ui/src/main/resources/bowpwd.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh - -# usage "bowpwd.sh [domain [password]]" -# you can install xclip to directly have you password in clipboard (just paste) - -CLIPBOARD=$(which xclip) - -compute() { - -LENGTH=$1 -PREFIX=$2 -INCLUDE=$3 -EXCLUDE=$4 -SUFFIX=$5 -DOMAIN=$6 -PASSWD=$7 - -result=$(echo -n "$DOMAIN" |hmac256 --binary "$PREFIX$PASSWD" |base64) - -if [ -n "$INCLUDE" ]; then - result=$(echo -n "$result" |sed -re "s/[^$INCLUDE]//g") -fi - -if [ -n "$EXCLUDE" ]; then - result=$(echo -n "$result" | sed -re "s/[$EXCLUDE]//g") -fi - -if [ -n "$LENGTH" ]; then - result=$(echo -n "$result" | cut -c-$LENGTH) -fi - -if [ -n "$SUFFIX" ]; then - result=$(echo -n "$result" |sed -re "s/(.*)/\1$SUFFIX/g") -fi - -if [ -n "$CLIPBOARD" ]; then - echo -n "$result" | xclip -selection clipboard - echo "your password is in your clipboard" -else - echo "$result" -fi - -} - -#compute $* - -DOMAIN=$1 -if [ -z "$DOMAIN" ]; then - read -p "Domain: " DOMAIN -fi -shift - -PASSWD=$1 -if [ -z "$PASSWD" ]; then - read -s -p "Password: " PASSWD -fi -shift - diff --git a/bow-ui/src/main/resources/freemarker.properties b/bow-ui/src/main/resources/freemarker.properties deleted file mode 100644 index 7479c46..0000000 --- a/bow-ui/src/main/resources/freemarker.properties +++ /dev/null @@ -1,21 +0,0 @@ -### -# #%L -# BOW UI -# %% -# Copyright (C) 2010 - 2011 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# #L% -### -template_update_delay=600000 diff --git a/bow-ui/src/main/resources/i18n/bow-ui_en_GB.properties b/bow-ui/src/main/resources/i18n/bow-ui_en_GB.properties deleted file mode 100644 index b14f615..0000000 --- a/bow-ui/src/main/resources/i18n/bow-ui_en_GB.properties +++ /dev/null @@ -1,223 +0,0 @@ -bow.action.locale.english=English -bow.action.locale.french=Français -bow.admin.dataMigration.success=Data migration successful -bow.admin.dataMigration04to05=Migrate all data from 0.4 to 0.5 -bow.admin.dataMigration05to06=Migrate all data from 0.5 to 0.6 -bow.admin.dataMigration11to12=Migrate all data from 1.1 to 1.2 -bow.admin.dataReindexation=All data reindexation (and migration if needed) -bow.admin.forbidden=You don't have admin rights \! -bow.admin.forceMigration=Force migration -bow.admin.home=Return to the home page -bow.admin.panel=Admin panel -bow.admin.reIndexationDone=Data reindexed successfully -bow.alias.already.exists=The alias %s already exists -bow.alias.bookmarkId.unknown=There is no bookmark with id %s -bow.authenticationEdit.delete=Delete -bow.authenticationEdit.description=Description -bow.authenticationEdit.domain=Domain -bow.authenticationEdit.exclude=Excluding chars -bow.authenticationEdit.form=Authentication form -bow.authenticationEdit.include=Inluding chars -bow.authenticationEdit.login=Login -bow.authenticationEdit.maxLength=Maximum length -bow.authenticationEdit.prefix=String to add before password computation -bow.authenticationEdit.save=Save -bow.authenticationEdit.shareSecurity=Sharing\: same as bookmark -bow.authenticationEdit.suffix=String to add after password computation -bow.authenticationEdit.title=Authentication parameter -bow.bookmark.add.successful=Bookmark successfully added -bow.bookmark.authentication=Authentication -bow.bookmark.badFileFormat=Bad bookmarks file format \: unsuccessful import (expected Netscape-like bookmarks file) -bow.bookmark.description=Description -bow.bookmark.favicon.updated.successful=Update favicon successful -bow.bookmark.import.delete.successful=The imported bookmarks were deleted successfully -bow.bookmark.import.successful=The bookmarks were imported successfully -bow.bookmark.remove.successful=The bookmark was removed successfully -bow.bookmark.screenshot.updated.successful=Update screenshot successful -bow.bookmark.tag.deleted=The tag was removed successfully -bow.bookmark.tags=Tags -bow.bookmark.update.successful=The bookmark was updated successfully -bow.bookmarks.noBookmarks=No bookmarks -bow.config.alias.url.description=Web server alias URL -bow.config.application.version.description=application version -bow.config.bow.addressFrom.description=mail from address -bow.config.bow.admins.description=admins email address list -bow.config.bow.allow.public.group.description= -bow.config.bow.prefix.search.add.description= -bow.config.bow.prefix.search.alias.description= -bow.config.bow.prefix.search.fulltext.description= -bow.config.bow.prefix.suggestion.alias.description= -bow.config.bow.prefix.suggestion.fulltext.description= -bow.config.bow.screenshot.url.description= -bow.config.bow.smtpServer.description=smtp server address -bow.config.bow.url.description=Web server bow URL -bow.config.configFileName.description=bow configuration file -bow.config.data.dir.description=bow data directory -bow.config.opensearch.add.prefix.description= -bow.config.opensearch.alias.prefix.description=prefix for alias redirection -bow.config.opensearch.default.action.description=default action prefix -bow.config.opensearch.default.prefix.description=default action to do, if no prefix given -bow.config.opensearch.fulltext.search.prefix.description=prefix for fulltext search -bow.config.opensearch.prefix.separator.description=prefix separator -bow.config.opensearch.tag.search.prefix.description=prefix for tag search -bow.config.opensearch.web.search.prefix.description=prefix for web search -bow.config.search.engine.description=URL of web search engine to use -bow.config.sprefix.search.tag.description= -bow.config.sprefix.suggestion.tag.description= -bow.error.internal=An internal error occurred, please contact an administrator if the problem persists -bow.footer.bugreport=Bug report -bow.footer.license=AGPL License -bow.footer.userSupport=User support -bow.forgotPassword.emailDoesntExist=This email address doesn't exist -bow.forgotpwd.submit=Send -bow.forgotpwd.title=Forgot your password? -bow.group.delete.no.member=No more members, delete group -bow.group.members=Members -bow.group.name.blank=Group's name empty -bow.group.new=Create new group -bow.group.not.members=You are not groups members\: %s -bow.group.some.user.not.found=Some users not found\: %s -bow.groupEdit.delete=delete -bow.groupEdit.description=Description -bow.groupEdit.members=Members -bow.groupEdit.name=Name -bow.groupEdit.public=Public groupe (all people can see it) -bow.groupEdit.save=Save -bow.groupEdit.title=Edit group -bow.groupView.title=Groups -bow.home.latestBookmarks=The latest added bookmarks -bow.home.mostUsedBookmarks=The most used bookmarks -bow.home.title=Home -bow.login.admin.failback=Authentication problem, you must recreate index in admin page -bow.login.authenticationFailure=Either your email address doesn't exist or your password is incorrect -bow.login.email=Email -bow.login.email.required=Email is required -bow.login.email.wrongformat=Your email address isn't valid -bow.login.password=Password -bow.login.password.required=Password is required -bow.login.repeatPassword=Repeat your password -bow.login.repeatPassword.required=Please repeat your password -bow.login.submit=Login -bow.login.title=Login -bow.mail.badFormat=Your email format is incorrect and therefore the email hasn't been sent -bow.mail.sendError=An error occurred while sending email -bow.opensearch.result=%s results -bow.permanent.link.search=Permanent search URL -bow.permanent.link.searchDescription=Permalink to use Bow as search engine in your browser -bow.permanent.link.suggestion=Permanent suggest URL -bow.permanent.link.suggestionDescription=Permalink to use Bow as suggest engine in your browser -bow.preference.opensearch.prefix.separator=OpenSeach prefix separator -bow.preferences.authentication= -bow.preferences.badCurrentPassword=Your current password is incorrect -bow.preferences.bookmarksHomePage=Number of bookmarks displayed on the home page -bow.preferences.colors=Site color -bow.preferences.confirmNewPassword=Confirm new password -bow.preferences.currentPassword=Current password -bow.preferences.emailAldyExists=This email address is already linked with another account -bow.preferences.export.bookmarks=Export bookmarks -bow.preferences.favicon=Automatically retrieve the favicon for new bookmarks -bow.preferences.import.bookmarks=Import bookmarks -bow.preferences.import.submit=Import -bow.preferences.importExport=Import / Export -bow.preferences.importedBookmarks=Imported bookmarks -bow.preferences.labels=Labels administration -bow.preferences.labels.delete.submit=Delete -bow.preferences.labels.name.field=new name -bow.preferences.labels.rename.submit=Rename -bow.preferences.newPassword=New password -bow.preferences.noImportedBookmarks=No imported bookmarks -bow.preferences.opensearch.alias.prefix=Alias -bow.preferences.opensearch.default.action=Default action -bow.preferences.opensearch.default.prefix=Default prefix -bow.preferences.opensearch.fulltext.search.prefix=Search fulltext -bow.preferences.opensearch.prefix=Prefix -bow.preferences.opensearch.prefix.separator=Prefix seperator -bow.preferences.opensearch.tag.search.prefix=Search by tag -bow.preferences.opensearch.value=Value -bow.preferences.opensearch.web.search.prefix=Search on the Web -bow.preferences.regenPermToken=Regenerate permanent token -bow.preferences.screenshot=Automatically retrieve screenshot for new bookmarks -bow.preferences.searchEngineUrlResults=Search Engine URL Results ('{'searchTerms'}' will be replaced by your text) -bow.preferences.searchEngineUrlSuggestions=Search Engine URL Suggestions -bow.preferences.siteLook=Site look -bow.preferences.submit=Change -bow.preferences.tagsManagement=Tags edition -bow.preferences.tagsNb=Number of tags displayed in the tag cloud -bow.preferences.title=Preferences -bow.preferences.update.successful=The preferences have been updated successfully -bow.preferences.userInfo=User information -bow.register.emailAldyUsed=This email address is already used -bow.register.invalidLogin=Something went wrong during your registration, please try again -bow.register.mailEmail=Your email -bow.register.mailHi=Hi -bow.register.mailPwd=Your password -bow.register.mailSubject=[bow] Your account information -bow.register.pwdDontMatch=Passwords don't match -bow.register.submit=Register -bow.register.title=Register -bow.requiredstring=${getText(fieldKey)} is required -bow.rightMenu.addUrl.link=Add entry -bow.rightMenu.admin=Admin -bow.rightMenu.bookmark.addModify=Add / Modify -bow.rightMenu.bookmark.alias=ALIAS -bow.rightMenu.bookmark.link=URL -bow.rightMenu.bookmark.name=DESC -bow.rightMenu.bookmark.permanentLink=Bookmark add link (permanent) -bow.rightMenu.bookmark.permanentLinkDescription=Add this link to your favourites to bookmark others in the future. This link is always available\! -bow.rightMenu.bookmark.submit=Save -bow.rightMenu.bookmark.tags=TAGS -bow.rightMenu.bookmark.temporaryLink=Bookmark add link (session) -bow.rightMenu.bookmark.temporaryLinkDescription=Add this link to your favourites to bookmark others in the future. This link is only available while you are connected on the site\! -bow.rightMenu.chromiumExtension=Chromium extension -bow.rightMenu.extensions=Extensions -bow.rightMenu.externSearchEngine=Web -bow.rightMenu.find.submit=Find -bow.rightMenu.fullTextSearch=Full text -bow.rightMenu.help=Help -bow.rightMenu.import.submit=Import -bow.rightMenu.importBookmarks=Import bookmarks -bow.rightMenu.logout=Logout -bow.rightMenu.search=Search -bow.rightMenu.search.tags=by tags -bow.rightMenu.token.permanent=Permanent token id -bow.rightMenu.token.temporary=Session token id -bow.search.ascclick=Asc. clicks nb -bow.search.ascdate=Asc. date -bow.search.ascname=Asc. name -bow.search.descclick=Desc. clicks nb -bow.search.descdate=Desc. date -bow.search.descname=Desc. name -bow.search.found=Total\: -bow.search.order.ascClick=Your search results have been sorted by ascendant clicks number -bow.search.order.ascDate=Your search results have been sorted by ascendant date -bow.search.order.ascName=Your search results have been sorted by ascendant name -bow.search.order.descClick=Your search results have been sorted by descendant clicks number -bow.search.order.descDate=Your search results have been sorted by descendant date -bow.search.order.descName=Your search results have been sorted by descendant name -bow.search.orderby=Order by -bow.search.results.deleted=Search results deleted successfully -bow.search.submit=Search -bow.search.title=Search -bow.sharedUser.new=New shared user -bow.sharedUserEdit.delete=Delete -bow.sharedUserEdit.description=Description -bow.sharedUserEdit.name=Name -bow.sharedUserEdit.save=Save -bow.sharedUserEdit.title=Shared user edition -bow.sharedUserView.documentation=Add tag '\#<user name>' for this user to access the bookmark with this tag -bow.sharedUserView.title=Your shared user -bow.temporary.link.search=Temporary search URL -bow.temporary.link.searchDescription=Temporary link (session) to use Bow as search engine in your browser -bow.temporary.link.suggestion=Temporary suggest URL -bow.temporary.link.suggestionDescription=Temporary link (session) to use Bow as suggest engine in your browser -bow.token.generate.successful=The token has been regenerated successfully -bow.users=Users -popup.addurl.alias.private=Private alias -popup.addurl.alias.public=Public alias -popup.addurl.link=Url -popup.addurl.name=Description -popup.addurl.tags=Tags -popup.addurl.title=Add or modify URL -popup.commons.cancel=Cancel -popup.commons.submit=Validate -popup.setPublicAliasPopup.title=Enter the public alias diff --git a/bow-ui/src/main/resources/i18n/bow-ui_fr_FR.properties b/bow-ui/src/main/resources/i18n/bow-ui_fr_FR.properties deleted file mode 100644 index ef73f4b..0000000 --- a/bow-ui/src/main/resources/i18n/bow-ui_fr_FR.properties +++ /dev/null @@ -1,223 +0,0 @@ -bow.action.locale.english=English -bow.action.locale.french=Français -bow.admin.dataMigration.success=Les données ont été migrées avec succès -bow.admin.dataMigration04to05=Migrer toutes les données de la version 0.4 à 0.5 -bow.admin.dataMigration05to06=Migrer toutes les données de la version 0.5 à 0.6 -bow.admin.dataMigration11to12=Migrer toutes les données de la version 1.1 à 1.2 -bow.admin.dataReindexation=Réindexation des données -bow.admin.forbidden=Vous n'êtes pas administrateur \! -bow.admin.forceMigration=Forcer la migration -bow.admin.home=Retour sur la page d'accueil -bow.admin.panel=Panneau d'administration -bow.admin.reIndexationDone=Les données ont bien été réindexées (et migration si nécessaire) -bow.alias.already.exists=L'alias %s existe déjà -bow.alias.bookmarkId.unknown=Il n'y a pas de marque-page correspondant à l'identifiant %s -bow.authenticationEdit.delete=Supprimer -bow.authenticationEdit.description=Description -bow.authenticationEdit.domain=Domaine -bow.authenticationEdit.exclude=Caractères refusé (ex\: /\=+) -bow.authenticationEdit.form=Formulaire d'authentification -bow.authenticationEdit.include=Caractères acceptés (ex\: A-Z0-9) -bow.authenticationEdit.login=Login -bow.authenticationEdit.maxLength=Longueur maximum du mot de passe (hors suffixe) -bow.authenticationEdit.prefix=Préfix ajouté au super mot de passe avant le calcul -bow.authenticationEdit.save=Sauver -bow.authenticationEdit.shareSecurity=Partage\: identique au bookmark -bow.authenticationEdit.suffix=Suffix à ajouter au mot de passe final -bow.authenticationEdit.title=Paramètrage d'authentification -bow.bookmark.add.successful=Marque-page ajouté avec succès -bow.bookmark.authentication=Authentification -bow.bookmark.badFileFormat=Mauvais format de fichier de favoris \: import impossible (le format de type Netscape n'est pas supporté) -bow.bookmark.description=Description -bow.bookmark.favicon.updated.successful=Mise à jour du favicon réussi -bow.bookmark.import.delete.successful=Les marque-pages importés ont été supprimés avec succès -bow.bookmark.import.successful=Les marque-pages ont été importés avec succès -bow.bookmark.remove.successful=Le marque-page a été supprimé avec succès -bow.bookmark.screenshot.updated.successful=Mise à jour de la capture d'écran réussi -bow.bookmark.tag.deleted=Le tag a été supprimé avec succès -bow.bookmark.tags=Tags -bow.bookmark.update.successful=Le marque-page a été mis à jour avec succès -bow.bookmarks.noBookmarks=Pas de marque-page -bow.config.alias.url.description=Url public du serveur d'alias -bow.config.application.version.description=Version de l'application -bow.config.bow.addressFrom.description=Adresse expediteur des emails -bow.config.bow.admins.description=Liste des emails des admins de l'application -bow.config.bow.allow.public.group.description= -bow.config.bow.prefix.search.add.description= -bow.config.bow.prefix.search.alias.description= -bow.config.bow.prefix.search.fulltext.description= -bow.config.bow.prefix.suggestion.alias.description= -bow.config.bow.prefix.suggestion.fulltext.description= -bow.config.bow.screenshot.url.description= -bow.config.bow.smtpServer.description=Adresse du serveur de mail -bow.config.bow.url.description=Url public du serveur bow -bow.config.configFileName.description=Fichier de configuration de bow -bow.config.data.dir.description=Répertoire de stockage des données -bow.config.opensearch.add.prefix.description= -bow.config.opensearch.alias.prefix.description=Prefix de redirection via l'alias -bow.config.opensearch.default.action.description=action par défaut -bow.config.opensearch.default.prefix.description=Prefix par défaut -bow.config.opensearch.fulltext.search.prefix.description=Fulltext -bow.config.opensearch.prefix.separator.description=Séparateur de préfix -bow.config.opensearch.tag.search.prefix.description=Préfix de recherche par tag -bow.config.opensearch.web.search.prefix.description=prefix de recherche sur le web -bow.config.search.engine.description=Url du moteur de recherche Web à utiliser -bow.config.sprefix.search.tag.description= -bow.config.sprefix.suggestion.tag.description= -bow.error.internal=Une erreur interne est survenue, merci de contacter un administrateur si cette erreur persiste -bow.footer.bugreport=Rapport de bug -bow.footer.license=Licence AGPL -bow.footer.userSupport=Support utilisateur -bow.forgotPassword.emailDoesntExist=Cette adresse email n'existe pas -bow.forgotpwd.submit=Envoyer -bow.forgotpwd.title=Vous avez oublié votre mot de passe ? -bow.group.delete.no.member=Plus de membre, suppression du groupe -bow.group.members=Membres -bow.group.name.blank=Nom du groupe vide -bow.group.new=Créer un nouveau groupe -bow.group.not.members=Vous n'êtes pas membres des groupes\: %s -bow.group.some.user.not.found=Certain utilisateurs n'ont pas été trouvé\: %s -bow.groupEdit.delete=Supprimer -bow.groupEdit.description=Description -bow.groupEdit.members=Membres -bow.groupEdit.name=Nom -bow.groupEdit.public=Groupe public (visible de tout le monde) -bow.groupEdit.save=Sauver -bow.groupEdit.title=Modification d'un Groupe -bow.groupView.title=Les groupes -bow.home.latestBookmarks=Les derniers marque-pages ajoutés -bow.home.mostUsedBookmarks=Les marque-pages les plus utilisés -bow.home.title=Accueil -bow.login.admin.failback=Problème d'authentification, vous devriez reconstruire l'index via la page d'admin -bow.login.authenticationFailure=Soit votre adresse email n'existe pas, soit votre mot de passe est eronné -bow.login.email=Email -bow.login.email.required=Veuillez entrer votre adresse email -bow.login.email.wrongformat=Votre adresse email est invalide -bow.login.password=Mot de passe -bow.login.password.required=Veuillez entrer votre mot de passe -bow.login.repeatPassword=Confirmation -bow.login.repeatPassword.required=Veuillez retaper votre mot de passe -bow.login.submit=Connexion -bow.login.title=Connexion -bow.mail.badFormat=Votre adresse email est mal formée \: aucun mail n'a pu être envoyé -bow.mail.sendError=Une erreur s'est produite lors de l'envoi du mail -bow.opensearch.result=%s résultats -bow.permanent.link.search=URL de recherche permanente -bow.permanent.link.searchDescription=Lien permanent pour utiliser Bow comme moteur de recherche dans votre navigateur -bow.permanent.link.suggestion=URL de suggesion permanente -bow.permanent.link.suggestionDescription=Lien permanent pour utiliser Bow comme moteur de suggestion dans votre navigateur -bow.preference.opensearch.prefix.separator=Separateur de préfix -bow.preferences.authentication= -bow.preferences.badCurrentPassword=Votre mot de passe actuel est incorrect -bow.preferences.bookmarksHomePage=Nombre de marque-pages affichés -bow.preferences.colors=Couleur du site -bow.preferences.confirmNewPassword=Confirmez votre mot de passe -bow.preferences.currentPassword=Mot de passe actuel -bow.preferences.emailAldyExists=Cette addresse email est déjà utilisée par un autre compte -bow.preferences.export.bookmarks=Exporter les marque-pages -bow.preferences.favicon=Récupérer automatiquement le favicon pour les nouveaux bookmarks -bow.preferences.import.bookmarks=Importer des marques-pages -bow.preferences.import.submit=Importer -bow.preferences.importExport=Import / Export -bow.preferences.importedBookmarks=Marque-pages importés -bow.preferences.labels=Gestion des labels -bow.preferences.labels.delete.submit=Supprimer -bow.preferences.labels.name.field=Nouveau nom -bow.preferences.labels.rename.submit=Renomer -bow.preferences.newPassword=Nouveau mot de passe -bow.preferences.noImportedBookmarks=Aucun marque-page importé -bow.preferences.opensearch.alias.prefix=Alias -bow.preferences.opensearch.default.action=action par défaut -bow.preferences.opensearch.default.prefix=Prefix par défaut -bow.preferences.opensearch.fulltext.search.prefix=Recherche Fulltext -bow.preferences.opensearch.prefix=Préfix -bow.preferences.opensearch.prefix.separator=Séparateur de préfix -bow.preferences.opensearch.tag.search.prefix=Recherche par tag -bow.preferences.opensearch.value=Valeur -bow.preferences.opensearch.web.search.prefix=Recherche Web -bow.preferences.regenPermToken=Regénérer le token permanent -bow.preferences.screenshot=Récupérer automatiquement une copie d'écran des nouveaux bookmarks -bow.preferences.searchEngineUrlResults=Search Engine URL Results ('{'searchTerms'}' sera remplacé par votre recherche) -bow.preferences.searchEngineUrlSuggestions=Search Engine URL Suggestions -bow.preferences.siteLook=Préférences du site -bow.preferences.submit=Changer -bow.preferences.tagsManagement=Edition des tags -bow.preferences.tagsNb=Nombre de tags affichés sur le nuage de tags -bow.preferences.title=Préférences -bow.preferences.update.successful=Vos préférences ont été mises à jour avec succès -bow.preferences.userInfo=Informations utilisateur -bow.register.emailAldyUsed=Cette adresse email est déjà utilisée -bow.register.invalidLogin=Une erreur s'est produite pendant l'enregistrement de vos informations, merci d'essayer à nouveau -bow.register.mailEmail=Votre email -bow.register.mailHi=Bonjour -bow.register.mailPwd=Votre mot de passe -bow.register.mailSubject=[bow] Vos informations utilisateur -bow.register.pwdDontMatch=Les mots de passe sont différents -bow.register.submit=S'enregistrer -bow.register.title=S'enregistrer -bow.requiredstring=${getText(fieldKey)} est obligatoire -bow.rightMenu.addUrl.link=Ajouter une entrée -bow.rightMenu.admin=Admin -bow.rightMenu.bookmark.addModify=Ajouter / Modifier -bow.rightMenu.bookmark.alias=ALIAS -bow.rightMenu.bookmark.link=URL -bow.rightMenu.bookmark.name=DESC -bow.rightMenu.bookmark.permanentLink=Ajouter un bookmark (permanent) -bow.rightMenu.bookmark.permanentLinkDescription=Ajoutez ce lien à vos favoris pour pouvoir bookmarker vos liens dans le futur. Ce lien est toujours disponible \! -bow.rightMenu.bookmark.submit=Sauvegarder -bow.rightMenu.bookmark.tags=TAGS -bow.rightMenu.bookmark.temporaryLink=Ajouter un bookmark (session) -bow.rightMenu.bookmark.temporaryLinkDescription=Ajoutez ce lien à vos favoris pour pouvoir bookmarker vos liens dans le futur. Ce lien est seulement disponible tant que vous êtes connecté sur le site \! -bow.rightMenu.chromiumExtension=Extension pour chromium -bow.rightMenu.extensions=Extensions -bow.rightMenu.externSearchEngine=Web -bow.rightMenu.find.submit=Rechercher -bow.rightMenu.fullTextSearch=full text -bow.rightMenu.help=Aide -bow.rightMenu.import.submit=Importer -bow.rightMenu.importBookmarks=Importer des marque-pages -bow.rightMenu.logout=Déconnexion -bow.rightMenu.search=Recherche -bow.rightMenu.search.tags=par tags -bow.rightMenu.token.permanent=Token permanent -bow.rightMenu.token.temporary=Token session -bow.search.ascclick=Nb clics asc. -bow.search.ascdate=Date asc. -bow.search.ascname=Nom asc. -bow.search.descclick=Nb clics desc. -bow.search.descdate=Date desc. -bow.search.descname=Nom desc. -bow.search.found=Total\: -bow.search.order.ascClick=Les résultats de votre recherche ont été triés par nombre de clics ascendants -bow.search.order.ascDate=Les résultats de votre recherche ont été triés par date ascendante -bow.search.order.ascName=Les résultats de votre recherche ont été triés par nom ascendant -bow.search.order.descClick=Les résultats de votre recherche ont été triés par nombre de clics descendants -bow.search.order.descDate=Les résultats de votre recherche ont été triés par date descendante -bow.search.order.descName=Les résultats de votre recherche ont été triés par nom descendant -bow.search.orderby=Trier par -bow.search.results.deleted=Les résultats de la recherche ont été supprimés avec succès -bow.search.submit=Rechercher -bow.search.title=Recherche -bow.sharedUser.new=Créer un nouvel utilisateur de partage -bow.sharedUserEdit.delete=Supprimer -bow.sharedUserEdit.description=Description -bow.sharedUserEdit.name=Nom -bow.sharedUserEdit.save=Save -bow.sharedUserEdit.title=Edition d'un utilisateur de partage -bow.sharedUserView.documentation=Ajouter le tag '\#<nom de l'utilisateur>' pour que cet utilisateur puisse accéder au bookmark ayant ce tag -bow.sharedUserView.title=Tous vos utilisateurs de partage -bow.temporary.link.search=URL de recherche temporaire -bow.temporary.link.searchDescription=Lien temporaire (le temps de la session) pour utiliser Bow comme moteur de recherche dans votre navigateur -bow.temporary.link.suggestion=URL de suggesion temporaire -bow.temporary.link.suggestionDescription=Lien temporaire (le temps de la session) pour utiliser Bow comme moteur de suggestion dans votre navigateur -bow.token.generate.successful=Le token a été regénéré avec succès -bow.users=Utilisateurs -popup.addurl.alias.private=Alias privé -popup.addurl.alias.public=Alias public -popup.addurl.link=Url -popup.addurl.name=Description -popup.addurl.tags=Tags -popup.addurl.title=Ajouter ou modifier une URL -popup.commons.cancel=Annuler -popup.commons.submit=Valider -popup.setPublicAliasPopup.title=Entrer un alias public diff --git a/bow-ui/src/main/resources/log4j.properties b/bow-ui/src/main/resources/log4j.properties deleted file mode 100644 index 1bce32b..0000000 --- a/bow-ui/src/main/resources/log4j.properties +++ /dev/null @@ -1,36 +0,0 @@ -### -# #%L -# BOW UI -# %% -# Copyright (C) 2010 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# #L% -### -# Global logging configuration -log4j.rootLogger=INFO, stdout - -# Console output... -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d %5p [%t] (%30.30c) %m%n - -# package level -##log4j.logger.org.chorem.bow=DEBUG -##log4j.logger.org.chorem.bow.web.time=DEBUG -##log4j.logger.org.nuiton.wikitty.WikittyProxy.TimeLog=DEBUG -##log4j.logger.org.nuiton.wikitty.services.WikittyServiceSecurity.TimeLog=DEBUG -##log4j.logger.org.apache.struts2.dispatcher.mapper=DEBUG -log4j.logger.org.apache.solr=WARN -log4j.logger.org.apache.jcs=WARN diff --git a/bow-ui/src/main/resources/org/chorem/bow/action/ForgotPasswordAction-validation.xml b/bow-ui/src/main/resources/org/chorem/bow/action/ForgotPasswordAction-validation.xml deleted file mode 100644 index b566e09..0000000 --- a/bow-ui/src/main/resources/org/chorem/bow/action/ForgotPasswordAction-validation.xml +++ /dev/null @@ -1,35 +0,0 @@ -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//OpenSymphony Group//XWork Validator 1.0.2//EN" - "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> - -<validators> - <field name="email"> - <field-validator type="requiredstring"> - <message key="bow.login.email.required" /> - </field-validator> - <field-validator type="regex"> - <param name="expression">^[a-z0-9!#$%&'*+/=?^_`{|}~-]+((\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)?)+@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?$</param> - <message key="bow.login.email.wrongformat" /> - </field-validator> - </field> -</validators> diff --git a/bow-ui/src/main/resources/org/chorem/bow/action/LoginAction-validation.xml b/bow-ui/src/main/resources/org/chorem/bow/action/LoginAction-validation.xml deleted file mode 100644 index 86a6c90..0000000 --- a/bow-ui/src/main/resources/org/chorem/bow/action/LoginAction-validation.xml +++ /dev/null @@ -1,40 +0,0 @@ -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//OpenSymphony Group//XWork Validator 1.0.2//EN" - "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> - -<validators> - <field name="email"> - <field-validator type="requiredstring"> - <message key="bow.login.email.required" /> - </field-validator> - <field-validator type="regex"> - <param name="expression">^[a-z0-9!#$%&'*+/=?^_`{|}~-]+((\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)?)+@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?$</param> - <message key="bow.login.email.wrongformat" /> - </field-validator> - </field> - <field name="password"> - <field-validator type="requiredstring"> - <message key="bow.login.password.required" /> - </field-validator> - </field> -</validators> diff --git a/bow-ui/src/main/resources/org/chorem/bow/action/RegisterAction-validation.xml b/bow-ui/src/main/resources/org/chorem/bow/action/RegisterAction-validation.xml deleted file mode 100644 index 536d4aa..0000000 --- a/bow-ui/src/main/resources/org/chorem/bow/action/RegisterAction-validation.xml +++ /dev/null @@ -1,50 +0,0 @@ -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//OpenSymphony Group//XWork Validator 1.0.2//EN" - "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> - -<validators> - <field name="email"> - <field-validator type="requiredstring"> - <message key="bow.login.email.required" /> - </field-validator> - <field-validator type="regex"> - <param name="expression">^[a-z0-9!#$%&'*+/=?^_`{|}~-]+((\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)?)+@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?$</param> - <message key="bow.login.email.wrongformat" /> - </field-validator> - </field> - <field name="password"> - <field-validator type="requiredstring"> - <message key="bow.login.password.required" /> - </field-validator> - </field> - <field name="repeatPassword"> - <field-validator type="requiredstring"> - <message key="bow.login.repeatPassword.required" /> - </field-validator> - </field> - - <validator type="expression"> - <param name="expression">password.equals(repeatPassword)</param> - <message key="bow.register.pwdDontMatch" /> - </validator> -</validators> diff --git a/bow-ui/src/main/resources/org/chorem/bow/action/preference/UpdateUserAction-validation.xml b/bow-ui/src/main/resources/org/chorem/bow/action/preference/UpdateUserAction-validation.xml deleted file mode 100644 index 536d4aa..0000000 --- a/bow-ui/src/main/resources/org/chorem/bow/action/preference/UpdateUserAction-validation.xml +++ /dev/null @@ -1,50 +0,0 @@ -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//OpenSymphony Group//XWork Validator 1.0.2//EN" - "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> - -<validators> - <field name="email"> - <field-validator type="requiredstring"> - <message key="bow.login.email.required" /> - </field-validator> - <field-validator type="regex"> - <param name="expression">^[a-z0-9!#$%&'*+/=?^_`{|}~-]+((\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)?)+@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?$</param> - <message key="bow.login.email.wrongformat" /> - </field-validator> - </field> - <field name="password"> - <field-validator type="requiredstring"> - <message key="bow.login.password.required" /> - </field-validator> - </field> - <field name="repeatPassword"> - <field-validator type="requiredstring"> - <message key="bow.login.repeatPassword.required" /> - </field-validator> - </field> - - <validator type="expression"> - <param name="expression">password.equals(repeatPassword)</param> - <message key="bow.register.pwdDontMatch" /> - </validator> -</validators> diff --git a/bow-ui/src/main/resources/struts.properties b/bow-ui/src/main/resources/struts.properties deleted file mode 100644 index dcab240..0000000 --- a/bow-ui/src/main/resources/struts.properties +++ /dev/null @@ -1,66 +0,0 @@ -### -# #%L -# BOW UI -# %% -# Copyright (C) 2010 - 2011 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# #L% -### -struts.locale=fr_FR -struts.i18n.encoding=UTF-8 - -# struts.multipart.parser=cos -# struts.multipart.parser=pell -struts.multipart.parser=jakarta -# uses javax.servlet.context.tempdir by default -struts.multipart.saveDir= -struts.multipart.maxSize=2097152 - -# struts.custom.properties=application,com/webwork/extension/custom - -#struts.mapper.class=org.apache.struts2.dispatcher.mapper.DefaultActionMapper - -struts.action.extension=action - -struts.serve.static=true - -struts.serve.static.browserCache=true - -struts.tag.altSyntax=true - -struts.devMode=false - -struts.i18n.reload=true - -struts.ui.theme=xhtml -struts.ui.templateDir=template -#sets the default template type. Either ftl, vm, or jsp -struts.ui.templateSuffix=ftl - -struts.configuration.xml.reload=false - -struts.url.http.port = 80 -struts.url.https.port = 443 - -struts.custom.i18n.resources=bow-i18n - -struts.dispatcher.parametersWorkaround = false - -#struts.freemarker.manager.classname=org.apache.struts2.views.freemarker.FreemarkerManager - -struts.freemarker.wrapper.altMap=true -struts.freemarker.templatesCache=true - -struts.xslt.nocache=false diff --git a/bow-ui/src/main/resources/struts.xml b/bow-ui/src/main/resources/struts.xml deleted file mode 100644 index 6c452c8..0000000 --- a/bow-ui/src/main/resources/struts.xml +++ /dev/null @@ -1,337 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> - -<!DOCTYPE struts PUBLIC - "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" - "http://struts.apache.org/dtds/struts-2.0.dtd"> -<struts> - - <bean class="org.nuiton.web.struts2.I18nTextProvider" name="i18nTextProvider" - type="com.opensymphony.xwork2.TextProvider" /> - <constant name="struts.xworkTextProvider" value="i18nTextProvider" /> - - <!-- pour permettre d'avoir plusieurs bouton submit avec des actions - differente dans les forms --> - <constant name="struts.mapper.action.prefix.enabled" value="true" /> - - <!-- pour ne pas remettre tous les parametres deja existant sur - les url construite avec s:url --> - <constant name="struts.url.includeParams" value="none" /> - <constant name="struts.devMode" value="true"/> - <constant name="struts.ognl.allowStaticMethodAccess" value="true"/> - <constant name="struts.enable.SlashesInActionNames" value="true"/> - - <!-- - | Definition d'un package pour l'espace public - | - surcharge de parametre de certain intercepteur - +--> - <package name="publicArea" extends="struts-default"> - <interceptors> - <interceptor name="laxLogin" class="org.chorem.bow.interceptor.LaxLoginInterceptor"/> - <interceptor-stack name="publicAreaStack"> - <interceptor-ref name="timer"> - <param name="logLevel">debug</param> - <param name="logCategory">org.chorem.bow.web.time.render</param> - </interceptor-ref> - <interceptor-ref name="laxLogin"/> - <interceptor-ref name="defaultStack"> - <param name="store.operationMode">AUTOMATIC</param> - <param name="fileUpload.allowedExtensions">.html</param> - <param name="params.ordered">true</param> - - <param name="exception.logEnabled">true</param> - <param name="exception.logLevel">ERROR</param> - - </interceptor-ref> - </interceptor-stack> - </interceptors> - <default-interceptor-ref name="publicAreaStack"/> - </package> - - <!-- - | Definition d'un package pour l'espace des page de login - | - ajout de l'intercepteur qui verifie que la personne est bien identifiee - +--> - <package name="loginArea" extends="publicArea"> - <interceptors> - <interceptor name="logout" class="org.chorem.bow.interceptor.LogoutInterceptor"/> - <interceptor-stack name="loginAreaStack"> - <interceptor-ref name="logout"/> - <interceptor-ref name="publicAreaStack"/> - </interceptor-stack> - </interceptors> - <default-interceptor-ref name="loginAreaStack"/> - </package> - - <!-- - | Definition d'un package pour l'espace prive - | - ajout de l'intercepteur qui verifie que la personne est bien identifiee - +--> - <package name="restrictedArea" extends="publicArea"> - <interceptors> - <interceptor name="login" class="org.chorem.bow.interceptor.LoginInterceptor"> - <param name="redirect">login_input.action</param> - </interceptor> - <interceptor-stack name="restrictedAreaStack"> - <interceptor-ref name="login"/> - <interceptor-ref name="publicAreaStack"/> - </interceptor-stack> - </interceptors> - <default-interceptor-ref name="restrictedAreaStack"/> - </package> - - <package name="alias" extends="publicArea"> - <action name="alias/*" class="org.chorem.bow.action.AliasAction"> - <param name="alias">{1}</param> - <result name="success" type="redirect">${redirectTo}</result> - <result name="error">/WEB-INF/jsp/error.jsp</result> - </action> - <action name="alias" class="org.chorem.bow.action.AliasAction"> - <result name="success" type="redirect">${redirectTo}</result> - <result name="error">/WEB-INF/jsp/error.jsp</result> - </action> - <action name="*Xml"> - <result>/WEB-INF/jsp/{1}Xml.jsp</result> - </action> - </package> - - <package name="atom" extends="publicArea"> - <action name="atom" class="org.chorem.bow.action.AtomAction"> - <result>/WEB-INF/jsp/atom.jsp</result> - </action> - </package> - - <package name="login" extends="loginArea"> - <action name="register_*" method="{1}" class="org.chorem.bow.action.login.RegisterAction"> - <result name="input">/WEB-INF/jsp/register.jsp</result> - <result type="redirectAction">home</result> - </action> - <action name="forgotPassword_*" method="{1}" class="org.chorem.bow.action.login.ForgotPasswordAction"> - <result name="input">/WEB-INF/jsp/forgotPassword.jsp</result> - <result type="redirectAction">login_input</result> - </action> - <action name="login_*" method="{1}" class="org.chorem.bow.action.login.LoginAction"> - <result name="input">/WEB-INF/jsp/login.jsp</result> - <result name="login" type="redirectAction">home</result> - <result type="redirectAction">home</result> - </action> - <action name="logout" class="org.chorem.bow.action.login.LogoutAction"> - <result type="redirectAction">login_input</result> - </action> - </package> - - <package name="bookmark" extends="restrictedArea"> - <action name="home" class="org.chorem.bow.action.bookmark.HomeAction"> - <result name="error">/WEB-INF/jsp/home.jsp</result> - <result>/WEB-INF/jsp/home.jsp</result> - </action> - <action name="screenshotBookmark" class="org.chorem.bow.action.bookmark.ScreenshotAction"> - <result name="error" type="redirect">${redirectTo}</result> - <result type="redirect">${redirectTo}</result> - </action> - <action name="removeBookmark" class="org.chorem.bow.action.bookmark.RemoveAction"> - <result name="error" type="redirect">${redirectTo}</result> - <result type="redirect">${redirectTo}</result> - </action> - <action name="editBookmark" class="org.chorem.bow.action.bookmark.EditAction"> - <result name="error">/WEB-INF/jsp/editBookmark.jsp</result> - <result>/WEB-INF/jsp/editBookmark.jsp</result> - </action> - <action name="addUrl" class="org.chorem.bow.action.bookmark.AddOrUpdateAction"> - <result name="error">/WEB-INF/jsp/editBookmark.jsp</result> - <result type="redirect">${redirectTo}</result> - </action> - <action name="deleteSearchResults" class="org.chorem.bow.action.bookmark.DeleteSearchResultsAction"> - <result name="error" type="redirectAction">home</result> - <result type="redirectAction">home</result> - </action> - </package> - - <package name="authentication" extends="restrictedArea"> - <action name="authenticationEdit" class="org.chorem.bow.action.bookmark.AuthenticationEditAction" method="load"> - <result name="error">/WEB-INF/jsp/authenticationEdit.jsp</result> - <result>/WEB-INF/jsp/authenticationEdit.jsp</result> - </action> - <action name="authenticationSave" class="org.chorem.bow.action.bookmark.AuthenticationEditAction" method="save"> - <result name="input">/WEB-INF/jsp/home.jsp</result> - <result name="error">/WEB-INF/jsp/authenticationEdit.jsp</result> - <result type="redirectAction">home</result> - </action> - <action name="authenticationDelete" class="org.chorem.bow.action.bookmark.AuthenticationEditAction" method="delete"> - <result name="error">/WEB-INF/jsp/authenticationEdit.jsp</result> - <result type="redirectAction">home</result> - </action> - </package> - - <package name="group" extends="restrictedArea"> - <action name="groupView" class="org.chorem.bow.action.group.GroupViewAction"> - <result name="error">/WEB-INF/jsp/groupView.jsp</result> - <result>/WEB-INF/jsp/groupView.jsp</result> - </action> - <action name="groupRemoveMe" class="org.chorem.bow.action.group.GroupEditAction" method="removeMe"> - <result name="error" type="redirectAction">groupView</result> - <result type="redirectAction">groupView</result> - </action> - <action name="groupEdit" class="org.chorem.bow.action.group.GroupEditAction" method="load"> - <result name="error">/WEB-INF/jsp/groupEdit.jsp</result> - <result>/WEB-INF/jsp/groupEdit.jsp</result> - </action> - <action name="groupSave" class="org.chorem.bow.action.group.GroupEditAction" method="save"> - <result name="error">/WEB-INF/jsp/groupEdit.jsp</result> - <result type="redirectAction">groupView</result> - </action> - <action name="groupDelete" class="org.chorem.bow.action.group.GroupEditAction" method="delete"> - <result name="error">/WEB-INF/jsp/groupEdit.jsp</result> - <result type="redirectAction">groupView</result> - </action> - </package> - - <package name="sharedUser" extends="restrictedArea"> - <action name="sharedUserView" class="org.chorem.bow.action.sharedUser.SharedUserViewAction"> - <result name="error">/WEB-INF/jsp/sharedUserView.jsp</result> - <result>/WEB-INF/jsp/sharedUserView.jsp</result> - </action> - <action name="sharedUserEdit" class="org.chorem.bow.action.sharedUser.SharedUserEditAction" method="load"> - <result name="error">/WEB-INF/jsp/sharedUserEdit.jsp</result> - <result>/WEB-INF/jsp/sharedUserEdit.jsp</result> - </action> - <action name="sharedUserSave" class="org.chorem.bow.action.sharedUser.SharedUserEditAction" method="save"> - <result name="input">/WEB-INF/jsp/home.jsp</result> - <result name="error">/WEB-INF/jsp/sharedUserEdit.jsp</result> - <result type="redirectAction">sharedUserView</result> - </action> - <action name="sharedUserDelete" class="org.chorem.bow.action.sharedUser.SharedUserEditAction" method="delete"> - <result name="error">/WEB-INF/jsp/sharedUserEdit.jsp</result> - <result type="redirectAction">sharedUserView</result> - </action> - </package> - - <!-- Fragment: en prevision de faire un peu d'ajax si l'utilisateur le souhaite --> - <package name="fragment" namespace="/fragment" extends="restrictedArea"> - <action name="editBookmark" class="org.chorem.bow.action.bookmark.EditAction"> - <result name="error">/WEB-INF/jsp/editBookmark.jsp</result> - <result>/WEB-INF/jsp/editBookmark.jsp</result> - </action> - <action name="callStatistic"> - <result>/WEB-INF/jsp/CallStatistic.jsp</result> - </action> - </package> - - <package name="search" extends="restrictedArea"> - <action name="openSearchResult" class="org.chorem.bow.action.opensearch.OpenSearchResultAction"> - <result type="redirect">${redirectTo}</result> - </action> - <action name="suggestion-*" class="org.chorem.bow.action.opensearch.SuggestionAction" method="{1}"> - <result type="stream"> - <param name="contentType">application/x-suggestions+json</param> - <param name="inputName">inputStream</param> - <param name="contentDisposition">inline</param> - <param name="allowCaching">false</param> - </result> - </action> - <action name="openSearchSuggestion" class="org.chorem.bow.action.opensearch.OpenSearchSuggestionAction"> -<!-- <result>/WEB-INF/jsp/suggestions.jsp</result> --> - <result type="stream"> - <param name="contentType">application/x-suggestions+json</param> - <param name="inputName">inputStream</param> - <param name="contentDisposition">inline</param> - <param name="allowCaching">false</param> - </result> - </action> - </package> - - <package name="preference" extends="restrictedArea"> - <action name="locale" class="org.chorem.bow.action.LocaleAction"> - <result type="redirect">/WEB-INF/jsp/login.jsp</result> - </action> - - <action name="preferences" class="org.chorem.bow.action.preference.PreferenceBaseAction" method="input"> - <result name="error">/WEB-INF/jsp/preferences.jsp</result> - <result>/WEB-INF/jsp/preferences.jsp</result> - </action> - - <action name="generateToken" class="org.chorem.bow.action.preference.GenerateTokenAction"> - <result name="error">/WEB-INF/jsp/preferences.jsp</result> - <result>/WEB-INF/jsp/preferences.jsp</result> - </action> - - <action name="updateUserPref" class="org.chorem.bow.action.preference.UpdateUserAction"> - <result name="error">/WEB-INF/jsp/preferences.jsp</result> - <result>/WEB-INF/jsp/preferences.jsp</result> - </action> - - <action name="updateAuthenticationPref" class="org.chorem.bow.action.preference.UpdateAuthenticationAction"> - <result name="error">/WEB-INF/jsp/preferences.jsp</result> - <result>/WEB-INF/jsp/preferences.jsp</result> - </action> - - <action name="updateSitePref" class="org.chorem.bow.action.preference.UpdateSiteAction"> - <result name="error">/WEB-INF/jsp/preferences.jsp</result> - <result>/WEB-INF/jsp/preferences.jsp</result> - </action> - - <action name="addPrefix" class="org.chorem.bow.action.preference.UpdateSiteAction" method="addPrefix"> - <result name="error">/WEB-INF/jsp/preferences.jsp</result> - <result>/WEB-INF/jsp/preferences.jsp</result> - </action> - - <action name="removePrefix" class="org.chorem.bow.action.preference.UpdateSiteAction" method="removePrefix"> - <result name="error">/WEB-INF/jsp/preferences.jsp</result> - <result>/WEB-INF/jsp/preferences.jsp</result> - </action> - - <action name="adminlabels" class="org.chorem.bow.action.preference.AdminTagAction"> - <result name="error">/WEB-INF/jsp/preferences.jsp</result> - <result>/WEB-INF/jsp/preferences.jsp</result> - </action> - - <action name="deleteImport" class="org.chorem.bow.action.preference.DeleteImportAction"> - <result name="error">/WEB-INF/jsp/preferences.jsp</result> - <result>/WEB-INF/jsp/preferences.jsp</result> - </action> - - <action name="importBookmarks" class="org.chorem.bow.action.preference.ImportBookmarksAction"> - <result name="error">/WEB-INF/jsp/preferences.jsp</result> - <result>/WEB-INF/jsp/preferences.jsp</result> - </action> - - <action name="exportBookmarks" class="org.chorem.bow.action.preference.ExportBookmarksAction"> - <result name="error">/WEB-INF/jsp/preferences.jsp</result> - <result type="stream"> - <param name="contentType">text/html</param> - <param name="inputName">inputStream</param> - <param name="contentDisposition">attachment;filename="bookmarks.html"</param> - </result> - </action> - </package> - - <package name="admin" extends="restrictedArea"> - <action name="admin"> - <result name="error">/WEB-INF/jsp/login.jsp</result> - <result>/WEB-INF/jsp/admin.jsp</result> - </action> - <action name="reIndexation" class="org.chorem.bow.action.admin.ReIndexationAction"> - <result name="error">/WEB-INF/jsp/admin.jsp</result> - <result>/WEB-INF/jsp/admin.jsp</result> - </action> - </package> -</struts> diff --git a/bow-ui/src/main/webapp/WEB-INF/bowutils.tld b/bow-ui/src/main/webapp/WEB-INF/bowutils.tld deleted file mode 100644 index 3546f86..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/bowutils.tld +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<taglib version="2.1" - xmlns="http://java.sun.com/xml/ns/javaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"> - - <tlib-version>1.0</tlib-version> - <short-name>bowutils</short-name> - <uri>/WEB-INF/bowutils</uri> - - <function> - <name>base64</name> - <function-class>org.chorem.bow.BowUtils</function-class> - <function-signature>String toBase64(byte[] b)</function-signature> - </function> - - <function> - <name>isPublicGroup</name> - <function-class>org.chorem.bow.BowUtils</function-class> - <function-signature>boolean isPublicGroup(org.chorem.bow.BowGroup)</function-signature> - </function> - - <function> - <name>toHtml</name> - <function-class>org.chorem.bow.BowUtils</function-class> - <function-signature>java.lang.String toHtml(java.lang.String)</function-signature> - </function> - - <function> - <name>scriptletAdd</name> - <function-class>org.chorem.bow.BowUtils</function-class> - <function-signature>java.lang.String scriptletAdd(java.lang.String, java.lang.String)</function-signature> - </function> - - <function> - <name>scriptletPassword</name> - <function-class>org.chorem.bow.BowUtils</function-class> - <function-signature>java.lang.String scriptletPassword(org.chorem.bow.BowAuthentication)</function-signature> - </function> - - <function> - <name>scriptPassword</name> - <function-class>org.chorem.bow.BowUtils</function-class> - <function-signature>java.lang.String scriptPassword(org.chorem.bow.BowAuthentication)</function-signature> - </function> -</taglib> diff --git a/bow-ui/src/main/webapp/WEB-INF/decorators.xml b/bow-ui/src/main/webapp/WEB-INF/decorators.xml deleted file mode 100644 index 9ad3cc4..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/decorators.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> - - -<decorators defaultdir="/WEB-INF/decorators"> - <!-- Any urls that are excluded will never be decorated by Sitemesh --> - <excludes> - <pattern>/fragment/*</pattern> - <pattern>/nodecorate/*</pattern> - <pattern>/styles/*</pattern> - <pattern>/scripts/*</pattern> - <pattern>/images/*</pattern> - <pattern>/dojo/*</pattern> - <pattern>/struts/*</pattern> - <pattern>/jsp/inc/*</pattern> - <pattern>index.jsp</pattern> - </excludes> - - <decorator name="main" page="main.jsp"> - <pattern>/*</pattern> - </decorator> - -</decorators> diff --git a/bow-ui/src/main/webapp/WEB-INF/decorators/main.jsp b/bow-ui/src/main/webapp/WEB-INF/decorators/main.jsp deleted file mode 100644 index c87825e..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/decorators/main.jsp +++ /dev/null @@ -1,76 +0,0 @@ -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> - -<!--DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"--> - -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@page import="org.chorem.bow.BowUtils" %> -<%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %> -<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %> -<%@taglib prefix="s" uri="/struts-tags" %> -<%@taglib prefix="sj" uri="/struts-jquery-tags" %> - -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page" - xmlns:decorator="http://www.opensymphony.com/sitemesh/decorator"> - <head> - <title>Bow : <decorator:title default="Bow" /></title> - <decorator:head /> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <meta name="description" content="Bookmarks on the web" /> - <s:url var="favicon" value="/img/favicon.png" /> - <link rel="icon" type="image/png" href="${favicon}" /> - <s:if test="%{#session.BowSession.user != null}"> - <s:url var="temporaryXml" action="temporaryXml" /> - <s:url var="permanentXml" action="permanentXml" /> - <link rel="search" type="application/opensearchdescription+xml" title="Bow (temporary)" href="${temporaryXml}" /> - <link rel="search" type="application/opensearchdescription+xml" title="Bow (permanent)" href="${permanentXml}" /> - </s:if> - - <s:head /> - <sj:head/> - - <s:url var="bookmarkCSS" value="/css/bookmark.css" /> - <s:url var="jqueryUiCSS" value="/css/jquery-ui-1.8.11.custom.bow.css" /> - <s:url var="globalCSS" value="/css/global.css" /> - <link href="${bookmarkCSS}" rel="stylesheet" type="text/css"/> - <link href="${jqueryUiCSS}" rel="stylesheet" type="text/css" media="all" /> - <link href="${globalCSS}" rel="stylesheet" type="text/css" media="all" /> - - <s:url var="bookmarkJS" value="/js/bookmark.js" /> - <script type="text/javascript" src="${bookmarkJS}"></script> - </head> - <body id="page-home"> - <div id="wrap"> - <div id="page"> - <%@include file="/WEB-INF/jsp/inc/header.jsp" %> - <div id="main"> - <decorator:body /> - </div> - <s:if test="%{#session.BowSession.user != null}"> - <jsp:include page="/WEB-INF/jsp/inc/rightMenu.jsp" /> - </s:if> - </div> - </div> - <%@include file="/WEB-INF/jsp/inc/footer.jsp" %> - </body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/CallStatistic.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/CallStatistic.jsp deleted file mode 100644 index 54b4590..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/CallStatistic.jsp +++ /dev/null @@ -1,29 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%-- - Document : CallStatistic - Created on : 22 août 2011, 19:37:15 - Author : poussin ---%> - -<%@page import="org.nuiton.profiling.NuitonTrace"%> -<%@page contentType="text/csv" pageEncoding="UTF-8"%> -<%=NuitonTrace.getStatisticsCSVAndClear()%> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/admin.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/admin.jsp deleted file mode 100644 index 77dbc32..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/admin.jsp +++ /dev/null @@ -1,50 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@taglib prefix="s" uri="/struts-tags"%> - -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <head> - </head> - <body> - <div id="content"> - <div class="menu clearfix"> - <h2><s:text name="bow.admin.panel" /></h2> - </div> - <div class="formFrame fond"> - <br /><br /> - - <s:if test="#session.BowSession.isAdmin()"> - <ul id="adminActions"> - <li><s:a action="reIndexation"><s:text name="bow.admin.dataReindexation" /></s:a></li> - <li><s:a action="home" id="homePage"><s:text name="bow.admin.home" /></s:a></li> - </ul> - </s:if> - <s:else> - <h2><s:text name="bow.admin.forbidden" /></h2> - </s:else> - </div> - </div> - </body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/atom.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/atom.jsp deleted file mode 100644 index 42d9509..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/atom.jsp +++ /dev/null @@ -1,133 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2015 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="application/atom+xml;charset=UTF-8" pageEncoding="UTF-8"%> -<%@taglib prefix="s" uri="/struts-tags" %> -<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> -<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> -<%@taglib uri="/WEB-INF/bowutils" prefix="u" %> -<feed xmlns="http://www.w3.org/2005/Atom"> - <s:set name="bowDomain" value="config.bowUrl"/> - - <title>Bow<s:if test="!tagLine.empty"> (${tagLine})</s:if><s:if test="!fullTextLine.empty"> (${fullTextLine})</s:if></title> - <subtitle>tag='${tagLine}' filter='${fullTextLine}'</subtitle> - - <s:url var="bowUrl" value="%{#bowDomain + 'home.action'}" escapeAmp="true"> - <s:param name="token" value="%{bowSession.permanentToken}" /> - <s:param name="tagLine" value="%{tagLine}" /> - <s:param name="fullTextLine" value="%{fullTextLine}" /> - </s:url> - <s:url var="atomUrl" value="%{#bowDomain + 'atom.action'}" escapeAmp="true"> - <s:param name="token" value="%{bowSession.permanentToken}" /> - <s:param name="tagLine" value="%{tagLine}" /> - <s:param name="fullTextLine" value="%{fullTextLine}" /> - <s:param name="count" value="%{count}" /> - </s:url> - <link rel="alternate" type="text/html" href="${bowUrl}"/> - <link rel="self" type="application/atom+xml" href="${atomUrl}"/> - - <updated><fmt:formatDate value="${date}" pattern="yyyy-MM-dd'T'HH:mm:ssXXX" /></updated> - <author> - <name><s:property value="%{bowSession.user.login}" /></name> - <s:if test="bowSession.user.login.matches('.*@.*\\\\..*')"> - <email><s:property value="%{bowSession.user.login}" /></email> - </s:if> - </author> - <id>${bowUrl}</id> - <s:url var="favicon" value="%{#bowDomain + 'img/favicon.png'}" /> - <icon>${favicon}</icon> - - <s:iterator value="bookmarks" var="bookmark"> - <s:set name="bookmark" value="bookmark"/> - <entry> - <s:set name="title" value="%{bookmarkUtils.getTitle(#bookmark, 100)}"/> - <title><s:property value="%{#title}" /></title> - <s:url var="bookmarkUrl" value="%{#bowDomain + 'home.action'}" escapeAmp="true"> - <s:param name="token" value="%{bowSession.permanentToken}" /> - <s:param name="listId" value="%{#bookmark.wikittyId}" /> - </s:url> - <link rel="alternate" type="text/html" href="${bookmarkUrl}"/> - <link rel="via" href="${bookmark.link}"/> - <id>${bowDomain}${bookmark.wikittyId}</id> - <updated><fmt:formatDate value="${bookmark.creationDate}" pattern="yyyy-MM-dd'T'HH:mm:ssXXX" /></updated> - <author> - <name><s:property value="%{#bookmark.getOwner(false).login}" /></name> - <s:if test="#bookmark.getOwner(false).login.matches('.*@.*\\\\..*')"> - <email><s:property value="%{#bookmark.getOwner(false).login}" /></email> - </s:if> - </author> - <content type="xhtml"> - <div xmlns="http://www.w3.org/1999/xhtml"> - <span> - <s:set var="favicon" value="#bookmark.favicon"/> - <c:if test="${fn:length(favicon) > 0}"> - <img src="data:image/png;base64,${u:base64(favicon)}"/> - </c:if> - - <span><fmt:formatDate value="${bookmark.creationDate}" pattern="yyyy-MM-dd" /></span> - - <c:if test="${not empty bookmark.privateAlias}"> - <span> - <s:a href="%{config.aliasUrl + #bookmark.wikittyId}.action" - title="%{#bookmark.link}" target="_blank"> - alias: <s:property value="%{#bookmark.privateAlias}" /> - </s:a> - </span> - </c:if> - <c:if test="${not empty bookmark.publicAlias}"> - <span> - <s:a href="%{config.aliasUrl + #bookmark.publicAlias}.action" - title="%{#bookmark.link}" target="_blank"> - alias public: <s:property value="%{#bookmark.publicAlias}" /> - </s:a> - </span> - </c:if> - </span> - - <div> - <p><s:a href="%{config.aliasUrl + #bookmark.wikittyId}.action"><s:property value="%{#bookmark.link}" /></s:a></p> - - <h3><s:text name="bow.bookmark.description" /> :</h3> - ${u:toHtml(bookmark.description)} - <p> - <strong><s:text name="bow.bookmark.tags" /> :</strong> - <s:iterator value="#bookmark.labels" var="tag"> - <s:url var="search" value="%{#bowDomain + 'home.action'}" escapeAmp="true"> - <s:param name="addTag" value="%{#tag}"/> - <s:param name="tagLine" value="%{tagLine}"/> - <s:param name="fullTextLine" value="%{fullTextLine}"/> - <s:param name="order" value="descDate"/> - <%-- on ne met pas 'first', il faut repartir de 0 --%> - </s:url> - <a href="${search}"><s:property value="%{#tag}"/></a> - </s:iterator> - </p> - </div> - </div> - </content> - <s:iterator value="#bookmark.labels" var="tag"> - <category term="${tag}" /> - </s:iterator> - </entry> - </s:iterator> - -</feed> \ No newline at end of file diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/authenticationEdit.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/authenticationEdit.jsp deleted file mode 100644 index 5200c5e..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/authenticationEdit.jsp +++ /dev/null @@ -1,79 +0,0 @@ -<%-- -#%L -bow - -$Id$ -$HeadURL$ -%% -Copyright (C) 2010-2015 CodeLutin -%% -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -#L% ---%> - -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@taglib prefix="s" uri="/struts-tags" %> - -<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> -<head> - <title><s:text name="bow.authenticationEdit.title"/></title> -</head> -<body> - <div id="content"> - <div class="menu clearfix"> - <h2><s:text name="bow.authenticationEdit.title" /></h2> - </div> - <div class="formFrame fond"> - <s:form id="authenticationEditForm" cssClass="pretty-form" action="authenticationSave" - method="post"> - <s:hidden name="tagLine" /> - <s:hidden name="fullTextLine" /> - <s:hidden name="bookmarkId"/> - <%-- struts2/ognl problem, try to use setter with wikitty argument - and not setter with String argument :( - fortunately we don't need it any more - <s:hidden name="authentication.target"/> - --%> - <s:checkbox key="bow.authenticationEdit.shareSecurity" labelposition="left" labelSeparator=" " - name="shareSecurity" /> - - <s:textarea key="bow.authenticationEdit.description" labelSeparator=" " - name="authentication.description" /> - - <s:textfield key="bow.authenticationEdit.domain" labelSeparator=" " - name="authentication.domain" /> - <s:textfield key="bow.authenticationEdit.login" labelSeparator=" " - name="authentication.login" /> - <s:textfield key="bow.authenticationEdit.maxLength" labelSeparator=" " - name="authentication.maxLength" /> - <s:textfield key="bow.authenticationEdit.include" labelSeparator=" " - name="authentication.include" /> - <s:textfield key="bow.authenticationEdit.exclude" labelSeparator=" " - name="authentication.exclude" /> - <s:textfield key="bow.authenticationEdit.prefix" labelSeparator=" " - name="authentication.prefix" /> - <s:textfield key="bow.authenticationEdit.suffix" labelSeparator=" " - name="authentication.suffix" /> - - <s:textarea key="bow.authenticationEdit.form" labelSeparator=" " - name="authentication.form" /> - - <s:submit cssClass="submit-button" key="bow.authenticationEdit.save" name="submit" /> - <s:submit cssClass="submit-button" key="bow.authenticationEdit.delete" name="delete" action="authenticationDelete"/> - </s:form> - </div> - </div> -</body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/editBookmark.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/editBookmark.jsp deleted file mode 100644 index 4bf32b9..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/editBookmark.jsp +++ /dev/null @@ -1,57 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@taglib prefix="s" uri="/struts-tags"%> - -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <head> - </head> - <body> - <div id="content"> - <div class="menu clearfix"> - <h2><s:text name="popup.addurl.title" /></h2> - </div> - <div class="formFrame fond"> - <s:form id="popupAddUrlForm" cssClass="pretty-form" action="addUrl" method="post"> - <s:hidden name="tagLine" value="%{tagLine}" /> - <s:hidden name="fullTextLine" value="%{fullTextLine}" /> - <s:hidden name="bookmarkId" value="%{bookmark.wikittyId}"/> - <s:hidden name="redirectLink" value="%{redirectLink}"/> - - <s:textfield name="link" labelSeparator=" " key="popup.addurl.link" - value="%{bookmark.link}" /> - <s:textarea name="name" labelSeparator=" " key="popup.addurl.name" - value="%{bookmark.description}" /> - <s:textfield name="tags" labelSeparator=" " key="popup.addurl.tags" - value="%{@org.chorem.bow.BookmarkUtils@getBookmarkTagsString(bookmark)}" /> - <s:textfield name="privateAlias" labelSeparator=" " key="popup.addurl.alias.private" - value="%{bookmark.privateAlias}" /> - <s:textfield name="publicAlias" labelSeparator=" " key="popup.addurl.alias.public" - value="%{bookmark.publicAlias}" /> - <s:submit cssClass="submit-button" key="popup.commons.submit" name="submit" /> - </s:form> - </div> - </div> - </body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/error.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/error.jsp deleted file mode 100644 index c8c024e..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/error.jsp +++ /dev/null @@ -1,42 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@taglib prefix="s" uri="/struts-tags"%> - -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <head> - </head> - <body> - <div id="main"> - <div id="msg"> - <div id="actionmessageHeader"> - <s:actionmessage /> - </div> - <div id="actionerrorHeader"> - <s:actionerror /> - </div> - </div> - </div> - </body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/forgotPassword.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/forgotPassword.jsp deleted file mode 100644 index f9361f5..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/forgotPassword.jsp +++ /dev/null @@ -1,47 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html" pageEncoding="UTF-8"%> -<%@taglib prefix="s" uri="/struts-tags" %> - -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <head> - <title><s:text name="bow.forgotpwd.title" /></title> - <s:url var="css" value="/css/connexion.css" /> - <link href="${css}" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="content"> - <div id="formFrame fond"> - <h1><s:text name="bow.forgotpwd.title" /></h1> - <s:form action="forgotPassword"> - <p> - <s:textfield key="bow.login.email" name="email" labelposition="top" labelSeparator=" :" /> - <s:submit key="bow.forgotpwd.submit" name="submit" /> - </p> - </s:form> - <s:a action="login_input" id="loginLink"><s:text name="bow.login.title" /></s:a> - </div> - </div> - </body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/groupEdit.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/groupEdit.jsp deleted file mode 100644 index fa4b762..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/groupEdit.jsp +++ /dev/null @@ -1,115 +0,0 @@ -<%-- -#%L -bow - -$Id$ -$HeadURL$ -%% -Copyright (C) 2010 CodeLutin -%% -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -#L% ---%> - -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@taglib prefix="s" uri="/struts-tags" %> - -<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> -<head> - <title><s:text name="bow.groupEdit.title"/></title> - <script> - function addUserEnter(e) { - if (e.keyCode === 13) { - addUser(); - return false; - } - } - function addUser() { - var members = document.getElementById("members"); - var userLogin = document.getElementById("userLogin"); - - if (userLogin.value) { - var o = document.createElement("option"); - o.value="add " + userLogin.value; - o.innerHTML = userLogin.value; - members.appendChild(o); - userLogin.value = ""; - } - } - - function removeUser() { - var members = document.getElementById("members"); - for (var i = 0; i < members.options.length; i++) { - var o = members.options[i]; - if (o.selected) { - members.removeChild(o); - } - } - } - - function prepareSendMembers() { - var members = document.getElementById("members"); - for (var i = 0; i < members.options.length; i++) { - members.options[i].selected = true; - } - } - - function showAddedMembers() { - var members = document.getElementById("members"); - for (var i = 0; i < members.options.length; i++) { - var o = members.options[i]; - if (o.value.indexOf("add ") === 0) { // start with 'add ' - o.innerHTML = o.value.substring(4); - } - } - } - </script> -</head> -<body onload="showAddedMembers()"> - <div id="content"> - <div class="menu clearfix"> - <h2><s:text name="bow.groupEdit.title" /></h2> - </div> - <div class="formFrame fond"> - <s:form id="groupEditForm" cssClass="pretty-form" action="groupSave" - method="post" onsubmit="prepareSendMembers()"> - <s:hidden name="tagLine" value="%{tagLine}" /> - <s:hidden name="fullTextLine" value="%{fullTextLine}" /> - <s:hidden name="groupId" value="%{groupId}"/> - - <s:if test="config.allowPublicGroup"> - <s:checkbox labelposition="left" name="public" labelSeparator=" " key="bow.groupEdit.public" - value="%{public}" /> - </s:if> - <s:textfield disabled="%{groupId != null}" name="group.name" labelSeparator=" " key="bow.groupEdit.name" - value="%{group.name}" /> - - <s:textfield name="group.description" labelSeparator=" " key="bow.groupEdit.description" - value="%{group.description}" /> - - <s:select id="members" - list="%{group.getMembers(false)}" listKey="wikittyId" listValue="getFqField('WikittyUser.login')" - multiple="true" size="10" - name="group.members" labelSeparator=" " key="bow.groupEdit.members" /> - <button type='button' name="-" onclick="removeUser()">-</button> - <div><s:textfield id="userLogin" onkeypress="return addUserEnter(event)"/> <button type='button' name="+" onclick="addUser()">+</button></div> - - <s:submit cssClass="submit-button" key="bow.groupEdit.save" name="submit" /> - <s:submit cssClass="submit-button" key="bow.groupEdit.delete" name="delete" action="groupDelete"/> - </s:form> - </div> - </div> -</body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/groupView.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/groupView.jsp deleted file mode 100644 index 4a55b9d..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/groupView.jsp +++ /dev/null @@ -1,77 +0,0 @@ -<%-- -#%L -bow - -$Id$ -$HeadURL$ -%% -Copyright (C) 2010 CodeLutin -%% -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -#L% ---%> - -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@taglib prefix="s" uri="/struts-tags" %> -<%@taglib uri="/WEB-INF/bowutils" prefix="u" %> - -<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> -<head> - <title><s:text name="bow.groupView.title"/></title> -</head> -<body> -<div id="content"> - <div class="menu clearfix"> - <h2><s:text name="bow.groupView.title"/></h2> - </div> - <s:actionerror/> - - <div class="formFrame fond"> - <s:a action="groupEdit"><s:text name="bow.group.new" /></s:a> - <ul> - <s:iterator value="groups" var="group"> - <s:set name="group" value="group"/> - <li class="public-${u:isPublicGroup(group)}" title="${group.description}"> - <span class="group-name">${group.name}</span> - <span class="group-members">${group.members.size()} <s:text name="bow.group.members"/></span> - - <span class="group-actions"> - <s:url var="groupEdit" action="groupEdit" escapeAmp="true"> - <s:param name="groupId" value="%{#group.wikittyId}" /> - </s:url> - <a class="edit" href="${groupEdit}">edit</a> - - <s:url var="groupRemoveMe" action="groupRemoveMe" escapeAmp="true"> - <s:param name="groupId" value="%{#group.wikittyId}" /> - <s:param name="user" value="%{bowSession.user.wikittyId}" /> - </s:url> - <a class="removeMe" href="${groupRemoveMe}">removeMe</a> - - <s:url var="atom" action="atom" escapeAmp="true"> - <s:param name="token" value="%{bowSession.permanentToken}" /> - <s:param name="tagLine" value="%{'@' + #group.name}" /> - <s:param name="notmine" value="true" /> - </s:url> - <a class="atom" href="${atom}">atom</a> - </span> - </li> - </s:iterator> - </ul> - - </div> - -</div> -</body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/home.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/home.jsp deleted file mode 100644 index db4b961..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/home.jsp +++ /dev/null @@ -1,88 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@taglib prefix="s" uri="/struts-tags" %> - -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> - - <head> - <title><s:text name="bow.search.title" /></title> - </head> - <body> - <div class="menu clearfix"> - <h2> - <s:if test="first - bowSession.user.bookmarks >= 0"> - <s:url var="prev" action="home"> - <s:param name="tagLine" value="%{tagLine}" /> - <s:param name="fullTextLine" value="%{fullTextLine}" /> - <s:param name="order" value="%{order}"/> - <s:param name="first" value="%{first - bowSession.user.bookmarks}"/> - </s:url> - <s:a href="%{prev}"><<</s:a> - </s:if> - - <s:property value="%{first+1}"/>-<s:property value="%{first + bowSession.user.bookmarks}"/>/<s:property value="%{searchResult.bookmarkCount}"/> - - <s:if test="first + bowSession.user.bookmarks < searchResult.bookmarkCount"> - <s:url var="next" action="home"> - <s:param name="tagLine" value="%{tagLine}" /> - <s:param name="fullTextLine" value="%{fullTextLine}" /> - <s:param name="order" value="%{order}"/> - <s:param name="first" value="%{first + bowSession.user.bookmarks}"/> - </s:url> - <s:a href="%{next}">>></s:a> - </s:if> - </h2> - - <s:set name="bookmarksToDelete" value="%{searchResult.bookmarkCount}" /> - <s:if test="%{#bookmarksToDelete > 0}"> - <s:url var="deleteSearchResults" action="deleteSearchResults" escapeAmp="false"> - <s:param name="tagLine" value="%{tagLine}" /> - <s:param name="fullTextLine" value="%{fullTextLine}" /> - <s:param name="order" value="%{order}"/> - </s:url> - <s:a id="deleteSearchResultsButton" title="delete all" href="" onclick="deleteConfirmation('%{deleteSearchResults}', %{#bookmarksToDelete}); return(false);"></s:a> - </s:if> - <s:form action="home" method="get" theme="simple"> - <label for="order"><s:text name="bow.search.orderby" /></label> - <s:select id="order" name="order" list="possibleOrder"/> - <s:submit key="bow.search.submit" name="submit" /> - <s:hidden name="tagLine" value="%{tagLine}" /> - <s:hidden name="fullTextLine" value="%{fullTextLine}" /> - <s:hidden name="first" value="%{first}" /> - </s:form> - </div> - <div class="content"> - <s:if test="searchResult.bookmarks.empty"> - <p class="nobookmarks"><s:text name="bow.bookmarks.noBookmarks" /></p> - </s:if> - <s:else> - <s:iterator value="searchResult.bookmarks" var="bookmark"> - <s:set name="bookmark" value="bookmark"/> - <s:set name="auths" value="searchResult.getAuthentication(#bookmark)"/> - <jsp:include page="inc/bookmark.jsp" flush="true"/> - </s:iterator> - </s:else> - </div> - </body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/inc/bookmark.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/inc/bookmark.jsp deleted file mode 100644 index 248cc28..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/inc/bookmark.jsp +++ /dev/null @@ -1,160 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@taglib prefix="s" uri="/struts-tags" %> -<%@taglib prefix="sj" uri="/struts-jquery-tags" %> -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> -<%@taglib uri="/WEB-INF/bowutils" prefix="u" %> - -<div class="bookmark"bow - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> - - <div class="bookmarkhead"> - <span class="left"> - <s:set var="favicon" value="#bookmark.favicon"/> - <c:if test="${fn:length(favicon) > 0}"> - <img class="favicon" src="data:image/png;base64,${u:base64(favicon)}"/> - </c:if> - <c:if test="${fn:length(favicon) <= 0}"> - <img src="img/ptit-livre.jpg"/> - </c:if> - </span> - <span class="left date"><s:property value="#bookmark.creationDate"/></span> - <span class="left"> - <s:if test="%{!#bookmark.privateAlias.empty}"> - <s:a cssClass="alias" href="%{config.aliasUrl + #bookmark.wikittyId}.action" - title="%{#bookmark.link}" target="_blank"> - a:<s:property value="%{#bookmark.privateAlias}" /> - </s:a> - </s:if> - </span> - <span class="left"> - <s:if test="%{!#bookmark.publicAlias.empty}"> - <s:a cssClass="alias" href="%{config.aliasUrl + #bookmark.publicAlias}.action" - title="%{#bookmark.link}" target="_blank"> - a:<s:property value="%{#bookmark.publicAlias}" /> - </s:a> - </s:if> - </span> - <span class="spacemax"></span> - <span class="right"> - <s:url var="screenshotBookmark" action="screenshotBookmark" escapeAmp="true"> - <s:param name="id" value="%{#bookmark.wikittyId}" /> - <s:param name="tagLine" value="%{tagLine}" /> - <s:param name="fullTextLine" value="%{fullTextLine}" /> - <s:param name="order" value="%{order}"/> - <s:param name="first" value="%{first}"/> - </s:url> - <s:a cssClass="screenshotLink" href="%{screenshotBookmark}"/> - </span> - <span class="right"> - <s:url var="authenticationEdit" action="authenticationEdit" escapeAmp="true"> - <s:param name="bookmarkId" value="%{#bookmark.wikittyId}" /> - <s:param name="tagLine" value="%{tagLine}" /> - <s:param name="fullTextLine" value="%{fullTextLine}" /> - <s:param name="order" value="%{order}"/> - <s:param name="first" value="%{first}"/> - </s:url> - <s:a cssClass="edit-authentication" href="%{authenticationEdit}"/> - </span> - <span class="right"> - <s:url var="editBookmark" action="editBookmark" escapeAmp="true"> - <s:param name="id" value="%{#bookmark.wikittyId}" /> - <s:param name="tagLine" value="%{tagLine}" /> - <s:param name="fullTextLine" value="%{fullTextLine}" /> - <s:param name="order" value="%{order}"/> - <s:param name="first" value="%{first}"/> - </s:url> - <s:a cssClass="edit" href="%{editBookmark}"/> - </span> - <span class="right"> - <s:url var="removeBookmark" action="removeBookmark" escapeAmp="true"> - <s:param name="bookmarkId" value="%{#bookmark.wikittyId}" /> - <s:param name="tagLine" value="%{tagLine}" /> - <s:param name="fullTextLine" value="%{fullTextLine}" /> - <s:param name="order" value="%{order}"/> - <s:param name="first" value="%{first}"/> - </s:url> - <s:a cssClass="supprim" href="%{removeBookmark}" - onclick="return deleteConfirmation('%{#removeBookmark}','%{#bookmark.link}');"></s:a> - </span> - </div> - - <div class="bookmarkcontenu"> - <s:a title="%{#bookmark.link}" href="alias/%{#bookmark.wikittyId}.action" target="_blank"> - <div class="screenshot"> - <s:set var="screenshot" value="#bookmark.screenshot"/> - <c:if test="${fn:length(screenshot) > 0}"> - <img src="data:image/png;base64,${u:base64(screenshot)}"/> - </c:if> - <c:if test="${fn:length(screenshot) <= 0}"> - <img src="img/livreG.jpg"/> - </c:if> - </div> - </s:a> - <div class="click"><s:property value="%{#bookmark.click}" /></div> - <div class="description"> - <p> - <s:a href="alias/%{#bookmark.wikittyId}.action"><s:property value="%{#bookmark.link}"/></s:a> - </p> - <h3><s:text name="bow.bookmark.description" /> :</h3> - <div class="markdown"> - ${u:toHtml(bookmark.description)} - </div> - <s:iterator value="#auths" var="auth"> - <s:set name="auth" value="auth"/> - <s:if test="#auth != null"> - <h3> - <s:text name="bow.bookmark.authentication" /> : - <a class="scriptlet" href="${u:scriptletPassword(auth)}">BowPwd${bookmark.privateAlias}</a> - <a class="script" href="${u:scriptPassword(auth)}" download="BowPwd${bookmark.privateAlias}.sh">BowPwd${bookmark.privateAlias}.sh</a> - </h3> - <s:if test="!#auth.description.empty"> - <div class="markdown"> - ${u:toHtml(auth.description)} - </div> - </s:if> - <s:if test="!#auth.form.empty"> - <div class="markdown"> - ${u:toHtml(auth.form)} - </div> - </s:if> - </s:if> - </s:iterator> - <p class="tags"> - <strong><s:text name="bow.bookmark.tags" /> :</strong> - <s:iterator value="#bookmark.labels" var="tag"> - <s:url var="search" action="home"> - <s:param name="addTag" value="%{#tag}"/> - <s:param name="tagLine" value="%{tagLine}"/> - <s:param name="fullTextLine" value="%{fullTextLine}"/> - <s:param name="order" value="%{order}"/> - <%-- on ne met pas 'first', il faut repartir de 0 --%> - </s:url> - <s:a href="%{search}" cssClass="tag"><s:property value="%{#tag}"/></s:a> - </s:iterator> - </p> - </div> - </div> - -</div> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/inc/footer.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/inc/footer.jsp deleted file mode 100644 index 9a8104b..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/inc/footer.jsp +++ /dev/null @@ -1,44 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@taglib prefix="s" uri="/struts-tags" %> - -<div id="footer" - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> - <p> - <a shape="rect" href="http://www.chorem.org/projects/bow">bow</a> - <a shape="rect" href="http://www.chorem.org/projects/bow/files"></a> - - <a shape="rect" href="http://www.gnu.org/licenses/agpl.html"><s:text name="bow.footer.license" /></a> - - <span title="Copyright">©2010-2018</span> - <a shape="rect" href="http://www.codelutin.com">Code Lutin</a> - - <a shape="rect" href="http://www.chorem.org/projects/bow/issues"><s:text name="bow.footer.bugreport" /></a> - - <a shape="rect" href="http://list.chorem.org/cgi-bin/mailman/listinfo/bow-users"><s:text name="bow.footer.userSupport" /></a> - - <s:url var="localeEN"> - <s:param name="request_locale">en_GB</s:param> - </s:url> - <s:url var="localeFR"> - <s:param name="request_locale">fr_FR</s:param> - </s:url> - <s:a href="%{localeEN}"><s:text name="bow.action.locale.english" /></s:a> - - <s:a href="%{localeFR}"><s:text name="bow.action.locale.french" /></s:a> - </p> -</div> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/inc/header.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/inc/header.jsp deleted file mode 100644 index be54286..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/inc/header.jsp +++ /dev/null @@ -1,74 +0,0 @@ -<%-- -#%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% ---%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@taglib prefix="s" uri="/struts-tags" %> - -<div id="header" - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> - <div> - <s:if test="%{#session.BowSession.user != null}"> - <s:url var="homeToken" action="home"> - <s:param name="token" value="%{#session.BowSession.getPermanentToken()}" /> - </s:url> - <s:a cssClass="logo" href="%{homeToken}">bow</s:a> - </s:if> - <s:else> - <s:a cssClass="logo" action="home">bow</s:a> - </s:else> - </div> - <s:if test="%{#session.BowSession.user != null}"> - <div class="recherche right"> - <h3><s:text name="bow.rightMenu.search" /></h3> - <div class="input"> - <s:form action="home" theme="simple"> - <s:textfield name="tagLine" labelSeparator="" /> - <s:hidden name="order" value="%{order}"/> - <s:hidden name="token" value="%{#session.BowSession.getPermanentToken()}"/> - <s:submit key="bow.rightMenu.search.tags" name="submit" /> - </s:form> - </div> - <div class="input"> - <s:form action="home" theme="simple"> - <s:textfield name="fullTextLine" labelSeparator="" /> - <s:hidden name="order" value="%{order}"/> - <s:hidden name="token" value="%{#session.BowSession.getPermanentToken()}"/> - <s:submit key="bow.rightMenu.fullTextSearch" name="submit" /> - </s:form> - </div> - <div class="input"> - <s:form action="openSearchResult" theme="simple"> - <s:hidden name="token" value="%{#session.BowSession.getPermanentToken()}"/> - <s:textfield name="q" labelSeparator="" /> - <s:submit key="bow.rightMenu.externSearchEngine" name="submit" /> - </s:form> - </div> - </div> - </s:if> - <div id="msg"> - <span id="actionmessageHeader"> - <s:actionmessage /> - </span> - <span id="actionerrorHeader"> - <s:actionerror /> - </span> - </div> -</div> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/inc/rightMenu.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/inc/rightMenu.jsp deleted file mode 100644 index 255c79d..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/inc/rightMenu.jsp +++ /dev/null @@ -1,75 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@taglib prefix="s" uri="/struts-tags" %> -<%@taglib prefix="sj" uri="/struts-jquery-tags" %> - -<sj:dialog id="editBookmark" - title="Ajout/Modification d'un bookmark" - modal="true" - autoOpen="false" /> - -<div id="logoutDiv" xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> - <s:if test="!bowSession.user.extensionNames.contains('BowSharedUser')"> - ${bowSession.user.login} - <s:form action="logout" theme="simple"> - <div class="input"> - <s:submit key="bow.rightMenu.logout" name="submit" /> - </div> - </s:form> - </s:if> - <a href="http://maven-site.chorem.org/bow/" class="help" target="_blank"> - <s:text name="bow.rightMenu.help" /> - </a> -</div> - -<div id="side" xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> - <div id="colonneD"> - <ul class="droite"> - <s:if test="!bowSession.user.extensionNames.contains('BowSharedUser')"> - <s:if test="bowSession.admin"> - <li><s:a action="fragment/callStatistic">CallStatistic</s:a></li> - <li><s:a action="admin"><s:text name="bow.rightMenu.admin" /></s:a></li> - </s:if> - <li><s:a action="preferences"><s:text name="bow.preferences.title" /></s:a></li> - <li> - <s:url var="editBookmark" action="editBookmark" escapeAmp="true"> - <s:param name="tagLine"><s:property value="%{tagLine}" /></s:param> - <s:param name="fullTextLine"><s:property value="%{fullTextLine}" /></s:param> - <s:param name="order" value="%{order}"/> - <s:param name="first" value="%{first}"/> - </s:url> - <s:a href="%{editBookmark}"> - <s:text name="bow.rightMenu.addUrl.link" /> - </s:a> - </li> - <li><s:a action="groupView"><s:text name="bow.groupView.title" /></s:a></li> - <li><s:a action="sharedUserView"><s:text name="bow.sharedUserView.title" /></s:a></li> - </s:if> - </ul> - <!--div id="nuage"--> - <jsp:include page="tagsCloud.jsp" flush="true"/> - <!--/div--> - <div class="colonnebas"> - <img src="img/piedmenu.jpg" width="401" height="77" alt="Pied de menu" /> - </div> - </div> -</div> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/inc/tagsCloud.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/inc/tagsCloud.jsp deleted file mode 100644 index 45b24b9..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/inc/tagsCloud.jsp +++ /dev/null @@ -1,41 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@taglib prefix="s" uri="/struts-tags" %> - -<div id="nuage" - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> - <s:iterator value="%{searchResult.tagsCloud}" status="tagStatus" var="tag"> - <s:url var="search" action="home" escapeAmp="true"> - <s:param name="addTag" value="%{#tag.topicName}"/> - <s:param name="tagLine" value="%{tagLine}"/> - <s:param name="fullTextLine" value="%{fullTextLine}"/> - <s:param name="order" value="%{order}"/> - <%-- on ne met pas 'first', il faut repartir de 0 --%> - </s:url> - <!-- --> - <s:a href="%{search}" title="%{#tag.count} results" cssClass="tag" - cssStyle="font-size: %{searchResult.getFont(#tag.count)}px"> - <s:property value="%{#tag.topicName}" /> - </s:a> - </s:iterator> -</div> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/login.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/login.jsp deleted file mode 100644 index 46df375..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/login.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@taglib prefix="s" uri="/struts-tags"%> - -<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> - <head> - <title><s:text name="bow.login.title" /></title> - <s:url var="css" value="/css/connexion.css" /> - <link href="${css}" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="content"> - <div id="formFrame" class="fond"> - <h1><s:text name="bow.login.title" /></h1> - <br/> - <br/> - <s:actionerror /> - <s:form action="login"> - <s:textfield key="bow.login.email" name="email" labelposition="top" labelSeparator=" :" /> - <s:password key="bow.login.password" name="password" labelposition="top" labelSeparator=" :" /> - <s:submit key="bow.login.submit" name="submit" /> - </s:form> - <s:a action="register_input" id="registerLink"><s:text name="bow.register.title" /></s:a><br /> - <s:a action="forgotPassword_input" id="forgotPwd"><s:text name="bow.forgotpwd.title" /></s:a> - </div> - </div> - </body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/permanentXml.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/permanentXml.jsp deleted file mode 100644 index 07779b3..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/permanentXml.jsp +++ /dev/null @@ -1,40 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/xml" pageEncoding="UTF-8"%> -<%@taglib prefix="s" uri="/struts-tags" %> -<%@page import="org.chorem.bow.BowConfig" %> - -<% -String url = BowConfig.getBowUrl(); -%><?xml version="1.0" encoding="UTF-8"?> -<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" - xmlns:moz="http://www.mozilla.org/2006/browser/search/" - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> - <ShortName>Bow (permanent)</ShortName> - <Description>bookmarkSearch</Description> - <InputEncoding>UTF-8</InputEncoding> - <Image width="16" height="16" type="image/ico"><%=url%>img/bow.gif</Image> - <s:set var="token" value="#session.BowSession.getPermanentToken()" /> - <Url type="text/html" method="get" template="<%=url%>openSearchResult.action?token=${token}&q={searchTerms}" /> - <Url type="application/x-suggestions+json" method="get" template="<%=url%>openSearchSuggestion.action?token=${token}&q={searchTerms}" /> - <moz:SearchForm><%=url%></moz:SearchForm> -</OpenSearchDescription> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/preferences.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/preferences.jsp deleted file mode 100644 index a227e2b..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/preferences.jsp +++ /dev/null @@ -1,265 +0,0 @@ -<%-- -#%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% ---%> -<%@page import="org.chorem.bow.action.preference.PreferenceBaseAction"%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@taglib prefix="s" uri="/struts-tags" %> -<%@taglib prefix="u" uri="/WEB-INF/bowutils" %> - -<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> -<head> - <title><s:text name="bow.preferences.title"/></title> -</head> -<body> -<div id="content"> - <div class="menu clearfix"> - <h2><s:text name="bow.preferences.title"/></h2> - </div> - <s:actionerror/> - - <div class="formFrame fond"> - <s:set var="bowUrl" value="config.bowUrl" /> - <s:set var="permanentToken" value="bowSession.getPermanentToken()" /> - <s:set var="temporaryToken" value="bowSession.getTemporaryToken()" /> - <ul> - <li> - <s:a title="%{getText('bow.temporary.link.searchDescription')}" - href="openSearchResult.action?token=%{temporaryToken}&q={searchTerms}"> - <s:text name="bow.temporary.link.search" /> - </s:a> - </li> - <li> - <s:a title="%{getText('bow.permanent.link.searchDescription')}" - href="openSearchResult.action?token=%{permanentToken}&q={searchTerms}"> - <s:text name="bow.permanent.link.search" /> - </s:a> - </li> - <li> - <s:a title="%{getText('bow.temporary.link.suggestionDescription')}" - href="openSearchSuggestion.action?token=%{temporaryToken}&q={searchTerms}"> - <s:text name="bow.temporary.link.suggestion" /> - </s:a> - </li> - <li> - <s:a title="%{getText('bow.permanent.link.suggestionDescription')}" - href="openSearchSuggestion.action?token=%{permanentToken}&q={searchTerms}"> - <s:text name="bow.permanent.link.suggestion" /> - </s:a> - </li> - <li> - <s:text name="bow.rightMenu.bookmark.temporaryLink" /> - <a href="${u:scriptletAdd(bowUrl, temporaryToken)}">BowAddTemp</a> - </li> - <li> - <s:text name="bow.rightMenu.bookmark.permanentLink" /> - <a href="${u:scriptletAdd(bowUrl, permanentToken)}">BowAdd</a> - </li> - <li> - <a href="extensions/bow4chromium.crx"> - <img src="img/chromium.png" alt="Chromium" class="extensionIcon" /> - <s:text name="bow.rightMenu.chromiumExtension" /> - </a> - </li> - <li> - <strong><s:text name="bow.rightMenu.token.permanent"/> :</strong> - <s:property value="%{#permanentToken}"/> - </li> - <li> - <strong><s:text name="bow.rightMenu.token.temporary"/> :</strong> - <s:property value="%{#temporaryToken}"/> - </li> - </ul> - - <s:url var="regenPermToken" action="generateToken"/> - <s:a href="%{regenPermToken}" id="regenPermToken"> - <s:text name="bow.preferences.regenPermToken"/> - </s:a> - </div> - - <div class="formFrame fond"> - <h3><s:text name="bow.preferences.userInfo"/></h3> - <br/> - <s:form action="updateUserPref" theme="simple"> - <s:text name="bow.login.email"/><br/> - <s:textfield name="email" - labelposition="top"/><br/> - - <s:text name="bow.preferences.currentPassword"/><br/> - <s:password name="currentPassword" - labelposition="top"/><br/> - - <s:text name="bow.preferences.newPassword"/><br/> - <s:password name="newPassword" - labelposition="top"/><br/> - - <s:text name="bow.preferences.confirmNewPassword"/><br/> - <s:password name="confirmNewPassword" - labelposition="top"/><br/> - <s:hidden name="update" value="user"/> - <s:submit key="bow.preferences.submit" name="submit"/> - </s:form> - </div> - - <div class="formFrame fond"> - <h3> - <s:text name="bow.preferences.authentication"/> - <a class="scriptlet" href="${u:scriptletPassword(bowAuth)}">BowPwd</a> - <a class="script" href="${u:scriptPassword(bowAuth)}" download="BowPwd.sh">BowPwd.sh</a> - </h3> - <br/> - <s:form action="updateAuthenticationPref" cssClass="pretty-form" method="post"> - <s:textarea name="bowAuth.description" key="bow.authenticationEdit.description" - labelposition="top" tooltip="bow.authenticationEdit.description.tooltip"/> - - <s:textfield name="bowAuth.login" key="bow.authenticationEdit.login" - labelposition="top" tooltip="bow.authenticationEdit.login.tooltip"/> - - <s:textfield name="bowAuth.maxLength" key="bow.authenticationEdit.maxLength" - labelposition="top" tooltip="bow.authenticationEdit.maxLength.tooltip"/> - - <s:textfield name="bowAuth.include" key="bow.authenticationEdit.include" - labelposition="top" tooltip="bow.authenticationEdit.include.tooltip"/> - - <s:textfield name="bowAuth.exclude" key="bow.authenticationEdit.exclude" - labelposition="top" tooltip="bow.authenticationEdit.exclude.tooltip"/> - - <s:textfield name="bowAuth.prefix" key="bow.authenticationEdit.prefix" - labelposition="top" tooltip="bow.authenticationEdit.prefix.tooltip"/> - - <s:textfield name="bowAuth.suffix" key="bow.authenticationEdit.suffix" - labelposition="top" tooltip="bow.authenticationEdit.suffix.tooltip"/> - - <s:hidden name="update" value="authentication"/> - <s:submit key="bow.preferences.submit" name="submit"/> - </s:form> - </div> - - - <div class="formFrame fond"> - <h3><s:text name="bow.preferences.siteLook"/></h3> - <br/> - - <script type="text/javascript"> - function setRemoveIndex(removeIndex) { - $('input[name="removedPrefix"]').val(removeIndex); - document.updateSitePref.submit(); - return false; - } - </script> - - <s:form name="updateSitePref" action="updateSitePref" theme="simple"> - <s:hidden name="removedPrefix" value="-1"/> - - <s:text name="bow.preferences.screenshot"/><br/> - <s:checkbox name="screenshot" labelposition="left"/><br/> - - <s:text name="bow.preferences.favicon"/><br/> - <s:checkbox name="favicon" labelposition="left"/><br/> - - <s:text name="bow.preferences.tagsNb"/><br/> - <s:textfield name="tagsNb" labelposition="top"/><br/> - - <s:text name="bow.preferences.bookmarksHomePage"/><br/> - <s:textfield name="bookmarksHomePage" labelposition="top"/><br/> - - <table> - <tr> - <th><s:text name="bow.preferences.opensearch.prefix"/></th> - <th><s:text name="bow.preferences.opensearch.value"/></th> - <th><s:text name="bow.preferences.searchEngineUrlSuggestions"/></th> - </tr> - - <s:iterator value="searchPrefix" status="stat"> - <tr> - <td><s:textfield name="searchPrefix[%{#stat.index}].prefix" value="%{prefix}"/></td> - <td><s:textfield name="searchPrefix[%{#stat.index}].search" value="%{search}"/></td> - <td><s:textfield name="searchPrefix[%{#stat.index}].suggestion" value="%{suggestion}"/></td> - <td><s:submit action="removePrefix" value="X" onclick="return setRemoveIndex(%{#stat.index})"></s:submit></td> - </tr> - </s:iterator> - </table> - <s:submit action="addPrefix" value="add prefix"></s:submit> - - <s:hidden name="update" value="site"/> - <s:submit key="bow.preferences.submit" name="submit"/> - </s:form> - </div> - - <div class="menu clearfix"> - <h2><s:text name="bow.preferences.tagsManagement"/></h2> - </div> - - <div class="formFrame fond"> - <h3><s:text name="bow.preferences.labels"/>(<s:property value="labels.size()"/>)</h3> - <br/> - <s:form id="labelsForm" action="adminlabels" method="post" theme="simple"> - <div class="list"> - <s:checkboxlist name="selectedLabels" list="labels" - listKey="topicName" listValue="%{topicName+'('+count+')'}"/> - </div> - <div class="action"> - <s:text name="bow.preferences.labels.name.field"/><s:textfield name="newLabel" /> - <s:submit name="rename" key="bow.preferences.labels.rename.submit" /> - <s:submit name="delete" key="bow.preferences.labels.delete.submit" /> - </div> - </s:form> - </div> - - <div class="menu clearfix"> - <h2><s:text name="bow.preferences.importExport"/></h2> - </div> - - <div class="formFrame fond"> - <s:a action="exportBookmarks"><s:text name="bow.preferences.export.bookmarks"/></s:a> - <br/> - - <h3><s:text name="bow.preferences.import.bookmarks"/></h3> - <br/> - <s:form action="importBookmarks" method="post" enctype="multipart/form-data" theme="simple"> - <s:file name="upfile" labelSeparator=""/> - <s:hidden name="tagLine" value="%{tagLine}"/> - <s:hidden name="fullTextLine" value="%{fullTextLine}"/> - <s:submit key="bow.preferences.import.submit" name="submit"/> - </s:form> - <br/><br/> - - <s:if test="bookmarksImportDate != null"> - <s:iterator value="bookmarksImportDate"> - <s:set name="date" value="%{key}"/> - <s:set name="nb" value="%{value}"/> - <s:date name="%{stringToDate(#date)}" var="dateString"/> - <div class="deleteImport"> - <span><s:property value="dateString"/> (<s:property value="#nb"/> bookmarks)</span> - <s:url var="deleteImport" action="deleteImport"> - <s:param name="date" value="#date"/> - </s:url> - <s:a cssClass="deleteImportButton" href="%{deleteImport}" - onclick="return deleteConfirmation('%{deleteImport}','%{nb}','%{dateString}');"> - </s:a> - </div> - </s:iterator> - </s:if> - <s:else> - <span><s:text name="bow.preferences.noImportedBookmarks"/></span> - </s:else> - </div> - -</div> -</body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/register.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/register.jsp deleted file mode 100644 index 65f479b..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/register.jsp +++ /dev/null @@ -1,51 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2018 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@taglib prefix="s" uri="/struts-tags" %> - -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <head> - <title><s:text name="bow.register.title" /></title> - <s:url var="css" value="/css/connexion.css" /> - <link href="${css}" rel="stylesheet" type="text/css" /> - </head> - <body> - <div id="content"> - <div id="formFrame" class="fond"> - <h1><s:text name="bow.register.title" /></h1> - <s:form action="register"> - <s:actionerror /> - <p> - <s:textfield key="bow.login.email" name="email" labelposition="top" labelSeparator=" :" /> - <s:textfield name="name" labelposition="top" labelSeparator=" :" cssClass="registerSpecialField" /> - <s:password key="bow.login.password" name="password" labelposition="top" labelSeparator=" :" /> - <s:password key="bow.login.repeatPassword" name="repeatPassword" labelposition="top" labelSeparator=" :" /> - <s:submit key="bow.register.submit" name="submit" /> - </p> - </s:form> - <s:a action="login_input" id="loginLink"><s:text name="bow.login.title" /></s:a> - </div> - </div> - </body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/sharedUserEdit.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/sharedUserEdit.jsp deleted file mode 100644 index 28a13d9..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/sharedUserEdit.jsp +++ /dev/null @@ -1,58 +0,0 @@ -<%-- -#%L -bow - -$Id$ -$HeadURL$ -%% -Copyright (C) 2010 -2015 CodeLutin -%% -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -#L% ---%> - -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@taglib prefix="s" uri="/struts-tags" %> - -<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> -<head> - <title><s:text name="bow.sharedUserEdit.title"/></title> -</head> -<body> - <div id="content"> - <div class="menu clearfix"> - <h2><s:text name="bow.sharedUserEdit.title" /></h2> - </div> - <div class="formFrame fond"> - <s:form id="sharedUserEditForm" cssClass="pretty-form" action="sharedUserSave" - method="post"> - <s:hidden name="tagLine" /> - <s:hidden name="fullTextLine" /> - <s:hidden name="sharedUserId"/> - - <s:textfield disabled="%{sharedUserId != null}" - name="sharedUser.login" - labelSeparator=" " key="bow.sharedUserEdit.name" /> - - <s:textfield name="sharedUser.description" - labelSeparator=" " key="bow.sharedUserEdit.description" /> - - <s:submit cssClass="submit-button" key="bow.sharedUserEdit.save" name="submit" /> - <s:submit disabled="%{sharedUserId == null}" cssClass="submit-button" key="bow.sharedUserEdit.delete" name="delete" action="sharedUserDelete"/> - </s:form> - </div> - </div> -</body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/sharedUserView.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/sharedUserView.jsp deleted file mode 100644 index bc4eec3..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/sharedUserView.jsp +++ /dev/null @@ -1,81 +0,0 @@ -<%-- -#%L -bow - -$Id$ -$HeadURL$ -%% -Copyright (C) 2010 CodeLutin -%% -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -#L% ---%> - -<%@page import="java.util.Collections"%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> -<%@taglib prefix="s" uri="/struts-tags" %> -<%@taglib uri="/WEB-INF/bowutils" prefix="u" %> - -<html xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> -<head> - <title><s:text name="bow.sharedUserView.title"/></title> -</head> -<body> -<div id="content"> - <div class="menu clearfix"> - <h2><s:text name="bow.sharedUserView.title"/></h2> - </div> - <s:actionerror/> - <div class="formFrame fond"> - <div class="documentation"><s:text name="bow.sharedUserView.documentation"/></div> - <s:a action="sharedUserEdit"><s:text name="bow.sharedUser.new" /></s:a> - <ul> - <s:iterator value="sharedUsers" var="sharedUser"> - <s:set name="sharedUser" value="sharedUser"/> - <li title="${sharedUser.description}"> - <span class="sharedUser-name">${sharedUser.login}</span> - - <span class="sharedUser-actions"> - <s:url var="sharedUserEdit" action="sharedUserEdit" escapeAmp="true"> - <s:param name="sharedUserId" value="%{#sharedUser.wikittyId}" /> - </s:url> - <a class="edit" href="${sharedUserEdit}">edit</a> - - <s:url var="sharedUserDelete" action="sharedUserDelete" escapeAmp="true"> - <s:param name="sharedUserId" value="%{#sharedUser.wikittyId}" /> - </s:url> - <a class="delete" href="${sharedUserDelete}">delete</a> - - <s:url var="atom" action="atom" escapeAmp="true"> - <s:param name="token" value="%{#sharedUser.permanentToken}" /> - <s:param name="tagLine" value="%{'#' + #sharedUser.login}" /> - </s:url> - <a class="atom" href="${atom}">atom</a> - - <s:url var="web" action="home" escapeAmp="true"> - <s:param name="token" value="%{#sharedUser.permanentToken}" /> - <s:param name="tagLine" value="%{'#' + #sharedUser.login}" /> - </s:url> - <a class="web" href="${web}">web</a> - </span> - </li> - </s:iterator> - </ul> - - </div> - -</div> -</body> -</html> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/suggestions.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/suggestions.jsp deleted file mode 100644 index bc39e3b..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/suggestions.jsp +++ /dev/null @@ -1,41 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html" pageEncoding="UTF-8"%> -<%@page import="org.chorem.bow.OpenSearchActions" %> -<%@page import="org.nuiton.wikitty.search.FacetTopic" %> -<%@page import="org.chorem.bow.action.OpenSearchSuggestionAction"%> -<%@page import="java.util.List" %> - -<% -OpenSearchSuggestionAction action = OpenSearchSuggestionAction.getAction(); -OpenSearchActions osa = action.getOpenSearchActions(); -if (osa != null) { - String[] word = osa.getSearch(); - if (word != null) { - List<FacetTopic> suggestions = osa.getSuggestionList(); - if (suggestions != null) { -%> -<%=osa.getJsonResult()%> -<% - } - } -} -%> diff --git a/bow-ui/src/main/webapp/WEB-INF/jsp/temporaryXml.jsp b/bow-ui/src/main/webapp/WEB-INF/jsp/temporaryXml.jsp deleted file mode 100644 index b8034c4..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/jsp/temporaryXml.jsp +++ /dev/null @@ -1,39 +0,0 @@ -<%-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/xml" pageEncoding="UTF-8"%> -<%@taglib prefix="s" uri="/struts-tags" %> -<%@page import="org.chorem.bow.BowConfig" %> -<% -String url = BowConfig.getBowUrl(); -%><?xml version="1.0" encoding="UTF-8"?> -<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" - xmlns:moz="http://www.mozilla.org/2006/browser/search/" - xmlns:s="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - xmlns:jsp="http://java.sun.com/JSP/Page"> - <ShortName>Bow (temporary)</ShortName> - <Description>bookmarkSearch</Description> - <InputEncoding>UTF-8</InputEncoding> - <Image width="16" height="16" type="image/ico"><%=url%>img/bow.gif</Image> - <s:set var="token" value="%{#session.BowSession.getTemporaryToken()}" /> - <Url type="text/html" method="get" template="<%=url%>openSearchResult.action?token=${token}&q={searchTerms}" /> - <Url type="application/x-suggestions+json" method="get" template="<%=url%>openSearchSuggestion.action?token=${token}&q={searchTerms}" /> - <moz:SearchForm><%=url%></moz:SearchForm> -</OpenSearchDescription> diff --git a/bow-ui/src/main/webapp/WEB-INF/sitemesh.xml b/bow-ui/src/main/webapp/WEB-INF/sitemesh.xml deleted file mode 100644 index dff967c..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/sitemesh.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> - - -<sitemesh> - <property name="decorators-file" value="/WEB-INF/decorators.xml"/> - <excludes file="${decorators-file}"/> - - <page-parsers> - <parser content-type="text/html" class="com.opensymphony.module.sitemesh.parser.FastPageParser"/> - </page-parsers> - - <decorator-mappers> - - <mapper class="com.opensymphony.module.sitemesh.mapper.PageDecoratorMapper"> - <param name="property.1" value="meta.decorator"/> - <param name="property.2" value="decorator"/> - </mapper> - - <mapper class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper"> - </mapper> - - <mapper class="com.opensymphony.module.sitemesh.mapper.AgentDecoratorMapper"> - <param name="match.MSIE" value="ie"/> - <param name="match.Mozilla [" value="ns"/> - <param name="match.Opera" value="opera"/> - <param name="match.Lynx" value="lynx"/> - </mapper> - - <mapper class="com.opensymphony.module.sitemesh.mapper.PrintableDecoratorMapper"> - <param name="decorator" value="printable"/> - <param name="parameter.name" value="printable"/> - <param name="parameter.value" value="true"/> - </mapper> - - <mapper class="com.opensymphony.module.sitemesh.mapper.RobotDecoratorMapper"> - <param name="decorator" value="robot"/> - </mapper> - - <mapper class="com.opensymphony.module.sitemesh.mapper.ParameterDecoratorMapper"> - <param name="decorator.parameter" value="decorator"/> - <param name="parameter.name" value="confirm"/> - <param name="parameter.value" value="true"/> - </mapper> - - <mapper class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper"> - <param name="config" value="${decorators-file}"/> - </mapper> - - </decorator-mappers> - -</sitemesh> diff --git a/bow-ui/src/main/webapp/WEB-INF/web.xml b/bow-ui/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 023f8b4..0000000 --- a/bow-ui/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> - -<web-app version="2.5" - xmlns="http://java.sun.com/xml/ns/javaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> - - <display-name>Bow</display-name> - - - <!-- Filters --> - <filter> - <filter-name>struts-prepare</filter-name> - <filter-class> - org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter - </filter-class> - </filter> - <filter> - <filter-name>sitemesh</filter-name> - <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class> - </filter> - <filter> - <filter-name>struts-execute</filter-name> - <filter-class> - org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter - </filter-class> - </filter> - - <filter-mapping> - <filter-name>struts-prepare</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - <filter-mapping> - <filter-name>sitemesh</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - <filter-mapping> - <filter-name>struts-execute</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - - <!-- Welcome file lists --> - <welcome-file-list> - <welcome-file>index.jsp</welcome-file> - </welcome-file-list> - - <jsp-config> - <jsp-property-group> - <url-pattern>*.jsp</url-pattern> - <trim-directive-whitespaces>true</trim-directive-whitespaces> - </jsp-property-group> - </jsp-config> -</web-app> diff --git a/bow-ui/src/main/webapp/css/bookmark.css b/bow-ui/src/main/webapp/css/bookmark.css deleted file mode 100644 index cd3ebc8..0000000 --- a/bow-ui/src/main/webapp/css/bookmark.css +++ /dev/null @@ -1,569 +0,0 @@ -@charset "utf-8"; -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% -*/ - -#page{ - background-color:#9EDCF8; - float:left; - left:77%; - position:relative; - width:100%; - margin-bottom:50px; -} - -#header{ - background:#fff url('../img/fondhead.jpg') repeat-x 0 0; - float:left; - position:absolute; - right:85%; - top:0; - height:100px; - width:100%; -} - -#header a.logo{ - background:transparent url('../img/logobow.jpg') repeat scroll 0 0; - display:block; - height:100px; - text-indent:-99999px; - width:290px; - float:left; - left:8%; - position:relative; -} - -#main{ - margin-top:120px; - float:left; - position:relative; - right:69%; - width:59%; - clear:both; -} - -.content{ - width:100%; - float:left; - background-color:#fff; - margin-bottom: 25px; -} - -#side { - clear:right; - float:right; - position:relative; - right:73%; - width:27%; -} - -.bookmark{ - width:100%; - height:auto; - word-wrap:break-word; -} - -.spacemax { - width: 100%; -} - -.bookmark .favicon { - width: 32px; - height: 32px; - float:left; -} - -.bookmark .bookmarkhead{ - width:100%; - height:32px; - background-color:#bf8a9c; - border-bottom: 0 solid #9EDCF8; - position:relative; - clear:both; -} - -.bookmark .bookmarkcontenu{ - clear:both; - padding-top:5px; - padding-right: 152px; -} - -.bookmark .bookmarkhead .date{ - color:#fff; - font-size:10px; - float:left; - margin-top:10px; -} - -.bookmark .bookmarkhead .screenshotLink{ - position:absolute; - margin-top: 10px; - top:0; - right:96px; - width:31px; - height:32px; - background:url('../img/camera.png') no-repeat; -} - -.bookmark .bookmarkhead .edit-authentication{ - background:url('../img/cadena.png') center no-repeat; - width:31px; - height:32px; - position:absolute; - top:0; - right:64px; -} - -.bookmark .bookmarkhead .edit{ - background:url('../img/edit.jpg') no-repeat; - width:31px; - height:32px; - position:absolute; - top:0; - right:32px; -} - -.bookmark .bookmarkhead .supprim{ - background:url('../img/croix.jpg') no-repeat; - width:31px; - height:32px; - position:absolute; - top:0; - right:0; -} - -.bookmark .bookmarkhead a{ - color:#FFF; - font-weight:bold; - font-size:14px; - line-height:32px; - /*padding-left:40px;*/ - /*background:url('../img/ptit-livre.jpg') no-repeat;*/ - height:32px; - display:block; - text-decoration:none; - float:left; - margin-right:3%; - margin-left:3%; -} - -.bookmark .bookmarkhead .alias{ - float:left; - margin-right:15px; - display:block; - /* background:url('../img/ptit-livre.jpg') no-repeat; */ -} - -.bookmark .screenshot{ - float:left; - margin:5px 10px; - width:100px; - height:75px; - /*background:url('../img/livreG.jpg') no-repeat;*/ -} - -.bookmark .description{ - float:left; - margin:5px 5px; - color:#999999; - font-size:12px; - position: relative; - width: 100%; - top:-80px; - left: 100px; -} - -.bookmark .description h3 { - color:#88516c; -} -.markdown p { - margin: inherit; -} - -.markdown p, .markdown ul, .markdown ol { - margin-bottom: 5px; -} - -.markdown ul { - margin-left: 20px; -} - -.bookmark .description .tags{ - color:#88516c; - background:url('../img/tag.jpg') no-repeat left center; - font-size:12px; - padding-left:30px; - height:auto; - width:100%; - line-height:28px; - padding-top:10px; - margin-bottom:-70px; -} - -.bookmark .description .tags .tag{ - margin-right:5px; - text-decoration:none; -} - -.bookmark .click{ - background:transparent url('../img/click.jpg') no-repeat scroll 0 0; - float:right; - height:27px; - margin:10px -25px 5px 5px; - padding-top:31px; - position:relative; - right:-120px; - width:31px; - text-align:center; -} - -.nobookmarks{ - font-size: large; - padding-left: 5px; -} - -#logoutDiv{ - float:right; - position:relative; - right:67%; - width:33%; - background:#BF8A9C url('../img/moyen-livre.jpg') no-repeat scroll 7% 44%; - height:100px; -} - -#logoutDiv a.help{ - background:transparent url('../img/aide.jpg') no-repeat scroll 0 0; - display:block; - height:34px; - text-indent:-99999px; - width:34px; - margin-left:15%; - margin-top:12%; - float:left; -} - -#logoutDiv form input{ - background:transparent url('../img/fondbouton.jpg') repeat-x scroll 0 0; - border:medium none; - color:#9C7186; - font-size:12px; - font-weight:bold; - height:27px; - line-height:27px; - display:block; - text-decoration:none; - text-align:center; - width:100px; - float:left; - margin-left:25%; - margin-top:6%; -} - -#side #colonneD{ - font-size:14px; - color:#9edcf8; -} - -#colonneD{ - overflow-x:auto; - background-color:#804561; - margin-top: -2px; -} - -#colonneD a{ - font-size:12px; - color:#9edcf8; -} - -#colonneD ul.droite{ - padding:5% 10%; - border-bottom: 0 solid #9edcf8; -} - -#colonneD ul.droite li{ - list-style:none; - height:auto; - font-size:100%; -} - -#colonneD ul.droite li a{ - font-size:14px; - font-weight:normal; - text-decoration:none; - color:#9edcf8; -} - -#colonneD ul.droite li a:hover{ - text-decoration:underline; -} - -#colonneD #extensions h2 { - margin: 4% 0 0 10%; -} - -#colonneD #extensions li { - padding-bottom: 10px; -} - -#colonneD #extensions .extensionIcon { - float:left; - border:0 none; - margin-right:10px; -} - -#colonneD #extensions .extensionName { - padding: 4px 0 0 30px; -} - -#colonneD #nuage, -#colonneD #import, -#colonneD #add{ - padding:4% 10%; - border-bottom: 0 solid #9edcf8; -} - -#colonneD h2{ - color:#9edcf8; - font-size:140%; - font-weight:normal; -} - -#colonneD #add{ - height:auto; -} - -#colonneD #add form{ - clear:both; -} - -#colonneD form .input{ - padding:10px 0; -} - -#colonneD form input{ - width:50%; - border:none; - height:28px; - padding-left:4px; -} - -#colonneD #add form label{ - display:inline-block; - padding-right:9%; - text-align:right; - width:45px; -} - -#colonneD form input[type="submit"]{ - background:transparent url('../img/fondbouton.jpg') repeat-x scroll 0 0; - border:medium none; - color:#9C7186; - display:block; - float:right; - font-size:12px; - font-weight:bold; - height:28px; - line-height:28px; - position:relative; - right:20%; - text-align:center; - text-decoration:none; - width:25%; -} - -#colonneD #nuage{ - padding-right:80px; - min-height:100px; - text-align:justify; -} - -.colonnebas img{ - width:86%; - height:auto; - display:block; - position:relative; -} - -#import .input input{ - width:90%; - margin-bottom:10px; -} - - - -.formFrame{ - float: left; /* pour que le contenu en float ne deborde pas du cadre */ - width: 90%; - min-width:400px; -/* min-height: 315px; */ - position:relative; - margin-top:20px; - margin-bottom:20px; - margin-right:100px; - margin-left:40px; - padding-top:10px; - padding-bottom:10px; - padding-left:40px; - padding-right:70px; -} - -.formFrame ul{ - padding-left:10px; -} - -.formFrame h1{ - color:#804561; - width:225px; - position:relative; - margin:20px auto; -} - -.formFrame p{ - color:#804561; - font-size:11px; - font-weight:bold; - padding:15px 0; -} - -.formFrame p input[type="text"], td input[type="text"], -.formFrame p input[type="password"], td input[type="password"]{ - width:225px; -} - -.formFrame input[type="submit"]{ - margin-top:20px; - background:url('../img/fdboutonV.jpg') repeat-x; - height:31px; - line-height:31px; - color:#FFFFFF; - font-weight:bold; - border:none; - width:auto; - padding:2px; -} - -.formFrame p a{ - position:absolute; - color:#804561; - left:75px; - font-weight:bold; - font-size:12px; - margin-top:2px; -} - -.formFrame #homePage, -.formFrame #regenPermToken{ - bottom:50px; - left:185px; - font-size:10px; -} - -.formFrame p input, td input{ - margin-bottom:2px; -} - -.deleteImport{ - width:100%; - height:32px; - border:1px solid black; - margin-bottom:4px; - padding-top:10px; - padding-left:15px; -} - -.deleteImportPink{ - background-color:#BF8A9C; -} - -.deleteImportWhite{ - background-color:white; - margin-left:30px; -} - -.deleteImport span{ - color:blue; - font-size:large; -} - -.deleteImport .deleteImportButton{ - background:url('../img/croixtr.png') no-repeat; - width:31px; - height:32px; - float:right; - margin-right:15px; - position:relative; - top:-5px; -} - -#deleteSearchResultsButton{ - background:url('../img/croixtr.png') no-repeat; - width:31px; - height:32px; - float:right; - margin-left:25px; - margin-right:11px; -} - -.input label{ - color:#804561; -/* - font-size:20px; - font-weight:normal; - font-style:normal; - float:left; - margin-bottom:20px; - width:100%; -*/ -} - -#bookmarkForm label{ - margin-top:12px; - font-style:normal; -} - -#add h2{ - margin-bottom:20px; -} - -#adminActions li{ - list-style-type:none; - padding-bottom:15px; -} - -#adminActions li a{ - text-decoration:none; - color:#804561; - font-size:11px; - font-weight:bold; -} - -#labelsForm .list input{ - float: left; - clear:left; -} - -#labelsForm .list label { - float: left; -} - -#labelsForm .action { - float: left; - clear:left; -} diff --git a/bow-ui/src/main/webapp/css/connexion.css b/bow-ui/src/main/webapp/css/connexion.css deleted file mode 100644 index 8bb294a..0000000 --- a/bow-ui/src/main/webapp/css/connexion.css +++ /dev/null @@ -1,148 +0,0 @@ -@charset "utf-8"; -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2018 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ - -#header{ - background:#FFFFFF url('../img/fondhead.jpg') repeat-x; - width:100%; - float:left; - height:100px; - clear:both; - margin:0 auto; - position:absolute; -} - -#header a.logo{ - background:transparent url('../img/logobow.jpg') repeat scroll 0 0; - display:block; - height:100px; - text-indent:-99999px; - width:290px; - float:left; - position:relative; -} - -#main{ - width:1004px; - margin:0 auto; - position:relative; - clear:both; -} - -#main .menu{ - margin-top: 25px; -} - -#page{ - width:100%; - margin:0 auto; - clear:both; -} - -#content{ - width:1004px; - position:relative; - margin:0 auto; - padding-top:120px; -} - -#formFrame{ - width:225px; - height:315px; -/* background:url('../img/fondconnexion.jpg') no-repeat; */ - position:relative; - margin:100px auto; - padding:10px 70px; -} - -#formFrame h1{ - color:#804561; - width:225px; - position:relative; - margin:15px 15px 10px 0px; -} - -#formFrame form p{ - color:#804561; - font-size:14px; - font-weight:bold; - padding:10px 0; -} - -#formFrame form input[type="text"], -#formFrame form input[type="password"]{ - width:225px; -} - -#formFrame a{ - position: absolute; - color:#804561; - left:75px; - font-weight:bold; - font-size: 12px; -} - -#formFrame #registerLink, #formFrame #loginLink{ - bottom:50px; - font-size:14px; -} - -#formFrame #forgotPwd{ - bottom:100px; - font-size:9px; -} - -#formFrame #homePage{ - bottom: 50px; - left: 200px; - font-size: 10px; -} - -input[type="submit"]{ - float:right; - margin-top:20px; - background:url('../img/fdboutonV.jpg') repeat-x; - height:31px; - line-height:31px; - color:#FFFFFF; - font-weight:bold; - border:none; - width:auto; - padding:2px; -} - -#formFrame input[type="submit"]{ - position:absolute; - bottom:40px; - right:30px; -} - -#forgotPassword{ - margin-top:30px; -} - -#register{ - margin-top:20px; -} - -#register .registerSpecialField { - display:none; -} \ No newline at end of file diff --git a/bow-ui/src/main/webapp/css/global.css b/bow-ui/src/main/webapp/css/global.css deleted file mode 100644 index c855e25..0000000 --- a/bow-ui/src/main/webapp/css/global.css +++ /dev/null @@ -1,225 +0,0 @@ -@charset "utf-8"; -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% -*/ - -*{ - padding:0; - margin:0; -} - -body{ - font-size:10px; - font-family:Verdana, Arial, Helvetica, sans-serif; -} - -.clearfix{ - height:1%; -} - -.clearfix:after{ - content:"."; - height:0; - line-height:0; - display:block; - visibility:hidden; - clear:both; -} - -.left{ - float:left; -} - -.right{ - float:right; -} - -.recherche{ - padding-top:20px; - padding-right:15%; -} -/* -#header .input{ - width:250px; -} -*/ -.button{ - margin-top:20px; - background:url('../img/fdboutonV.jpg') repeat-x; - height:31px; - line-height:31px; - color:#FFFFFF; - font-weight:bold; - border:none; - width:auto; - padding:2px; -} - -textarea{ - height:100px; - width:200px; -} - -#wrap{ - clear:both; - float:left; - overflow-x:hidden; - overflow-y:visible; - position:relative; - width:100%; - background-color:#9EDCF8; -} - -#main .menu{ - width:90%; - height:35px; - background:#804561 url('../img/pointemenu.jpg') no-repeat right; - margin-bottom:15px; - padding:0 40px; - line-height:35px; - clear:both; -} - -#main div[class="menu clearfix"] h2{ - color:#9edcf8; - font-size:18px; - font-weight:normal; - float:left; -} - -#main .menu form{ - float:right; - color:#9edcf8; - font-size:12px; -} - -#import .input input{ - width:90%; - margin-bottom:10px; -} - -.error{ - float:left; - color:red; - font-size:medium; - background-color:white; - overflow:auto; - margin-bottom:25px; - padding:4px; -} - -#footer{ - background-color:#804561; - padding-top:30px; -} - -#footer a{ - color:#bf8a9c; -} - -#footer p{ - font-size:14px; - text-align:center; - line-height:50px; -} - -.errorMessage{ - font-weight:normal; - font-size:12px; - color:red; -} - -#actionmessageHeader{ - color:blue; - position:fixed; - left:25%; - top:12px; -} - -#actionerrorHeader{ - color:red; - position:relative; - left:25%; - top:12px; -} - -#actionmessageHeader ul, #actionerrorHeader ul{ - list-style-type:none; -} - -.fond { - -ms-filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dbdbdb'); - background-image: -moz-linear-gradient(top, #fff, #dbdbdb); - background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#dbdbdb)); - - -webkit-border-radius: 0.5em; - -moz-border-radius: 0.5em; - - padding:10px; -} - -form, .wwFormTable{ - color:#804561; - font-size:11px; - font-weight:bold; -} - - -form.pretty-form>input, form.pretty-form>textarea, form.pretty-form>select { - display: block; - width: 100%; - font-family: Helvetica, sans-serif; - font-size: 1.4em; - margin: 0px 0px 10px 0px; -} - -form.pretty-form>label { - display: block; - text-align: left; - margin-right: 15px; - width: 100%; -} - -form.pretty-form textarea:focus, form.pretty-form input:focus, form.pretty-form select:focus { - border:1px solid #666; - background:#e3f1f1; -} - -form.pretty-form input.submit-button { - width: 100px; - float: right; - margin: 10px; -} - -.public-true .group-name { - background-color: darkgray; -} - -a.scriptlet { - background:url('../img/scriptlet.png') center left no-repeat; - padding-left: 24px; - padding-right: 3px; -} - -a.script { - background:url('../img/terminal.png') center left no-repeat; - padding-left: 24px; - padding-right: 3px; -} \ No newline at end of file diff --git a/bow-ui/src/main/webapp/css/images/ui-bg_flat_0_aaaaaa_40x100.png b/bow-ui/src/main/webapp/css/images/ui-bg_flat_0_aaaaaa_40x100.png deleted file mode 100644 index 5b5dab2..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-bg_flat_0_aaaaaa_40x100.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/images/ui-bg_flat_75_dbdbdb_40x100.png b/bow-ui/src/main/webapp/css/images/ui-bg_flat_75_dbdbdb_40x100.png deleted file mode 100644 index 3bbc749..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-bg_flat_75_dbdbdb_40x100.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/images/ui-bg_glass_55_fbf9ee_1x400.png b/bow-ui/src/main/webapp/css/images/ui-bg_glass_55_fbf9ee_1x400.png deleted file mode 100644 index ad3d634..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-bg_glass_55_fbf9ee_1x400.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/images/ui-bg_glass_65_ffffff_1x400.png b/bow-ui/src/main/webapp/css/images/ui-bg_glass_65_ffffff_1x400.png deleted file mode 100644 index 42ccba2..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/images/ui-bg_glass_75_dadada_1x400.png b/bow-ui/src/main/webapp/css/images/ui-bg_glass_75_dadada_1x400.png deleted file mode 100644 index 5a46b47..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-bg_glass_75_dadada_1x400.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/images/ui-bg_glass_75_e6e6e6_1x400.png b/bow-ui/src/main/webapp/css/images/ui-bg_glass_75_e6e6e6_1x400.png deleted file mode 100644 index 86c2baa..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-bg_glass_75_e6e6e6_1x400.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/images/ui-bg_highlight-soft_75_bf8a9c_1x100.png b/bow-ui/src/main/webapp/css/images/ui-bg_highlight-soft_75_bf8a9c_1x100.png deleted file mode 100644 index d338186..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-bg_highlight-soft_75_bf8a9c_1x100.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/images/ui-bg_inset-soft_95_fef1ec_1x100.png b/bow-ui/src/main/webapp/css/images/ui-bg_inset-soft_95_fef1ec_1x100.png deleted file mode 100644 index 0e05810..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-bg_inset-soft_95_fef1ec_1x100.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/images/ui-icons_222222_256x240.png b/bow-ui/src/main/webapp/css/images/ui-icons_222222_256x240.png deleted file mode 100644 index b273ff1..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-icons_222222_256x240.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/images/ui-icons_2e83ff_256x240.png b/bow-ui/src/main/webapp/css/images/ui-icons_2e83ff_256x240.png deleted file mode 100644 index 09d1cdc..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-icons_2e83ff_256x240.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/images/ui-icons_454545_256x240.png b/bow-ui/src/main/webapp/css/images/ui-icons_454545_256x240.png deleted file mode 100644 index 59bd45b..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-icons_454545_256x240.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/images/ui-icons_888888_256x240.png b/bow-ui/src/main/webapp/css/images/ui-icons_888888_256x240.png deleted file mode 100644 index 6d02426..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-icons_888888_256x240.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/images/ui-icons_cd0a0a_256x240.png b/bow-ui/src/main/webapp/css/images/ui-icons_cd0a0a_256x240.png deleted file mode 100644 index 2ab019b..0000000 Binary files a/bow-ui/src/main/webapp/css/images/ui-icons_cd0a0a_256x240.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/css/jquery-ui-1.8.11.custom.bow.css b/bow-ui/src/main/webapp/css/jquery-ui-1.8.11.custom.bow.css deleted file mode 100644 index 5d4cb94..0000000 --- a/bow-ui/src/main/webapp/css/jquery-ui-1.8.11.custom.bow.css +++ /dev/null @@ -1,594 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* - * jQuery UI CSS Framework 1.8.11 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - - -/* - * jQuery UI CSS Framework 1.8.11 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - * - * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=bf8a9c&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=dbdbdb&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass. [...] - */ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #aaaaaa; background: #dbdbdb url(images/ui-bg_flat_75_dbdbdb_40x100.png) 50% 50% repeat-x; color: #222222; } -/*.ui-widget-content a { color: #222222; }*/ -.ui-widget-header { border: 1px solid #aaaaaa; background: #bf8a9c url(images/ui-bg_highlight-soft_75_bf8a9c_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } -.ui-widget-header a { color: #222222; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } -.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; } -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_inset-soft_95_fef1ec_1x100.png) 50% bottom repeat-x; color: #cd0a0a; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } -.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } - -/* Overlays */ -.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } -.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* - * jQuery UI Resizable 1.8.11 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Resizable#theming - */ -.ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} -.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } -.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } -.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } -.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } -.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } -.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } -.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } -.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } -.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* - * jQuery UI Selectable 1.8.11 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Selectable#theming - */ -.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } -/* - * jQuery UI Accordion 1.8.11 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Accordion#theming - */ -/* IE/Win - Fix animation bug - #4615 */ -.ui-accordion { width: 100%; } -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-li-fix { display: inline; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } -.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } -.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } -.ui-accordion .ui-accordion-content-active { display: block; } -/* - * jQuery UI Autocomplete 1.8.11 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete#theming - */ -.ui-autocomplete { position: absolute; cursor: default; } - -/* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ - -/* - * jQuery UI Menu 1.8.11 - * - * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Menu#theming - */ -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; -} -.ui-menu .ui-menu-item a { - text-decoration:none; - display:block; - padding:.2em .4em; - line-height:1.5; - zoom:1; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} -/* - * jQuery UI Button 1.8.11 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Button#theming - */ -.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ -.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ -button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ -.ui-button-icons-only { width: 3.4em; } -button.ui-button-icons-only { width: 3.7em; } - -/*button text element */ -.ui-button .ui-button-text { display: block; line-height: 1.4; } -.ui-button-text-only .ui-button-text { padding: .4em 1em; } -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } -.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } -.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } -.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } -/* no icon support for input elements, provide padding by default */ -input.ui-button { padding: .4em 1em; } - -/*button icon element(s) */ -.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } -.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } -.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } -.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } - -/*button sets*/ -.ui-buttonset { margin-right: 7px; } -.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } - -/* workarounds */ -button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ -/* - * jQuery UI Dialog 1.8.11 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Dialog#theming - */ -.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } -.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } -.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } -.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } -.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } -.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } -.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } -.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } -.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } -.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } -.ui-draggable .ui-dialog-titlebar { cursor: move; } -/* - * jQuery UI Slider 1.8.11 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Slider#theming - */ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; }/* - * jQuery UI Tabs 1.8.11 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Tabs#theming - */ -.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ -.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } -.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } -.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } -.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } -.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } -.ui-tabs .ui-tabs-hide { display: none !important; } -/* - * jQuery UI Datepicker 1.8.11 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Datepicker#theming - */ -.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } -.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } -.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } -.ui-datepicker .ui-datepicker-prev { left:2px; } -.ui-datepicker .ui-datepicker-next { right:2px; } -.ui-datepicker .ui-datepicker-prev-hover { left:1px; } -.ui-datepicker .ui-datepicker-next-hover { right:1px; } -.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } -.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } -.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } -.ui-datepicker select.ui-datepicker-month-year {width: 100%;} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { width: 49%;} -.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } -.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } -.ui-datepicker td { border: 0; padding: 1px; } -.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } -.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } -.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { width:auto; } -.ui-datepicker-multi .ui-datepicker-group { float:left; } -.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } -.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } -.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } -.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } -.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } -.ui-datepicker-row-break { clear:both; width:100%; } - -/* RTL support */ -.ui-datepicker-rtl { direction: rtl; } -.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } -.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } -.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } -.ui-datepicker-rtl .ui-datepicker-group { float:right; } -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } - -/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ -.ui-datepicker-cover { - display: none; /*sorry for IE5*/ - display/**/: block; /*sorry for IE5*/ - position: absolute; /*must have*/ - z-index: -1; /*must have*/ - filter: mask(); /*must have*/ - top: -4px; /*must have*/ - left: -4px; /*must have*/ - width: 200px; /*must have*/ - height: 200px; /*must have*/ -}/* - * jQuery UI Progressbar 1.8.11 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Progressbar#theming - */ -.ui-progressbar { height:2em; text-align: left; } -.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } - diff --git a/bow-ui/src/main/webapp/img/add.png b/bow-ui/src/main/webapp/img/add.png deleted file mode 100644 index 69ffcfc..0000000 Binary files a/bow-ui/src/main/webapp/img/add.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/aide.jpg b/bow-ui/src/main/webapp/img/aide.jpg deleted file mode 100755 index 4b89d8a..0000000 Binary files a/bow-ui/src/main/webapp/img/aide.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/asc.png b/bow-ui/src/main/webapp/img/asc.png deleted file mode 100644 index fa9a7d7..0000000 Binary files a/bow-ui/src/main/webapp/img/asc.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/bow.gif b/bow-ui/src/main/webapp/img/bow.gif deleted file mode 100644 index 293c415..0000000 Binary files a/bow-ui/src/main/webapp/img/bow.gif and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/cadena.png b/bow-ui/src/main/webapp/img/cadena.png deleted file mode 100644 index 0f2c9b7..0000000 Binary files a/bow-ui/src/main/webapp/img/cadena.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/camera.png b/bow-ui/src/main/webapp/img/camera.png deleted file mode 100644 index 89a450a..0000000 Binary files a/bow-ui/src/main/webapp/img/camera.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/chromium.png b/bow-ui/src/main/webapp/img/chromium.png deleted file mode 100644 index 4bd57f4..0000000 Binary files a/bow-ui/src/main/webapp/img/chromium.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/click.jpg b/bow-ui/src/main/webapp/img/click.jpg deleted file mode 100755 index df489b5..0000000 Binary files a/bow-ui/src/main/webapp/img/click.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/croix.jpg b/bow-ui/src/main/webapp/img/croix.jpg deleted file mode 100755 index 1435b3a..0000000 Binary files a/bow-ui/src/main/webapp/img/croix.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/croixtr.png b/bow-ui/src/main/webapp/img/croixtr.png deleted file mode 100644 index 38bb423..0000000 Binary files a/bow-ui/src/main/webapp/img/croixtr.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/delete.png b/bow-ui/src/main/webapp/img/delete.png deleted file mode 100644 index ab6808f..0000000 Binary files a/bow-ui/src/main/webapp/img/delete.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/desc.png b/bow-ui/src/main/webapp/img/desc.png deleted file mode 100644 index 3dd7fcc..0000000 Binary files a/bow-ui/src/main/webapp/img/desc.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/edit.jpg b/bow-ui/src/main/webapp/img/edit.jpg deleted file mode 100755 index 73ca469..0000000 Binary files a/bow-ui/src/main/webapp/img/edit.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/edit.png b/bow-ui/src/main/webapp/img/edit.png deleted file mode 100644 index de3a75f..0000000 Binary files a/bow-ui/src/main/webapp/img/edit.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/favicon.png b/bow-ui/src/main/webapp/img/favicon.png deleted file mode 100644 index 49de5d9..0000000 Binary files a/bow-ui/src/main/webapp/img/favicon.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/fdboutonV.jpg b/bow-ui/src/main/webapp/img/fdboutonV.jpg deleted file mode 100755 index 7b95ac5..0000000 Binary files a/bow-ui/src/main/webapp/img/fdboutonV.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/fondbouton.jpg b/bow-ui/src/main/webapp/img/fondbouton.jpg deleted file mode 100755 index a975a78..0000000 Binary files a/bow-ui/src/main/webapp/img/fondbouton.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/fondconnexion.jpg b/bow-ui/src/main/webapp/img/fondconnexion.jpg deleted file mode 100755 index 53bc13d..0000000 Binary files a/bow-ui/src/main/webapp/img/fondconnexion.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/fondhead.jpg b/bow-ui/src/main/webapp/img/fondhead.jpg deleted file mode 100755 index 989921e..0000000 Binary files a/bow-ui/src/main/webapp/img/fondhead.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/livreG.jpg b/bow-ui/src/main/webapp/img/livreG.jpg deleted file mode 100755 index b3b47e2..0000000 Binary files a/bow-ui/src/main/webapp/img/livreG.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/logobow.jpg b/bow-ui/src/main/webapp/img/logobow.jpg deleted file mode 100755 index c9ebcf8..0000000 Binary files a/bow-ui/src/main/webapp/img/logobow.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/moyen-livre.jpg b/bow-ui/src/main/webapp/img/moyen-livre.jpg deleted file mode 100755 index 76e68e8..0000000 Binary files a/bow-ui/src/main/webapp/img/moyen-livre.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/piedmenu.jpg b/bow-ui/src/main/webapp/img/piedmenu.jpg deleted file mode 100755 index c693911..0000000 Binary files a/bow-ui/src/main/webapp/img/piedmenu.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/pointemenu.jpg b/bow-ui/src/main/webapp/img/pointemenu.jpg deleted file mode 100755 index 2412a4d..0000000 Binary files a/bow-ui/src/main/webapp/img/pointemenu.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/ptit-livre.jpg b/bow-ui/src/main/webapp/img/ptit-livre.jpg deleted file mode 100755 index a4210c4..0000000 Binary files a/bow-ui/src/main/webapp/img/ptit-livre.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/remove.png b/bow-ui/src/main/webapp/img/remove.png deleted file mode 100644 index 05ff036..0000000 Binary files a/bow-ui/src/main/webapp/img/remove.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/scriptlet.png b/bow-ui/src/main/webapp/img/scriptlet.png deleted file mode 100644 index 7ae0cc9..0000000 Binary files a/bow-ui/src/main/webapp/img/scriptlet.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/tag.jpg b/bow-ui/src/main/webapp/img/tag.jpg deleted file mode 100755 index 1dc5d60..0000000 Binary files a/bow-ui/src/main/webapp/img/tag.jpg and /dev/null differ diff --git a/bow-ui/src/main/webapp/img/terminal.png b/bow-ui/src/main/webapp/img/terminal.png deleted file mode 100644 index fcc8aea..0000000 Binary files a/bow-ui/src/main/webapp/img/terminal.png and /dev/null differ diff --git a/bow-ui/src/main/webapp/index.jsp b/bow-ui/src/main/webapp/index.jsp deleted file mode 100644 index 11208c1..0000000 --- a/bow-ui/src/main/webapp/index.jsp +++ /dev/null @@ -1,28 +0,0 @@ -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2011 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> -<%@page import="org.chorem.bow.BowSession"%> -<% -if (BowSession.getBowSession(session).getUser() == null) { - response.sendRedirect("login_input.action"); -} else { - response.sendRedirect("home.action"); -} -%> diff --git a/bow-ui/src/main/webapp/js/README b/bow-ui/src/main/webapp/js/README deleted file mode 100644 index a5b703a..0000000 --- a/bow-ui/src/main/webapp/js/README +++ /dev/null @@ -1,36 +0,0 @@ -equivalent en bash du travail de bow -echo -n domain |hmac256 --binary mykey |base64 |sed -re 's/[^a-zA-Z]//g' | sed -re 's/[z]//g' |cut -c-8 |sed -re 's/(.*)/\1;;/g' - -domain: le domain du site -mykey: le mot de passe utilisateur -1 sed: include 'a-zA-Z' -2 sed: exclude 'z' -cut: prend seulement un certain nombre de caractere '8' -3 sed: ajout du suffix ';;' - - -Il faut remplacer: % par %25 dans les bookmarklets - - - - -yamd5-bowpwd.js contient yamd5 (simplifier pour ne supporter que l'ASCII) + script de generation du passwd -yamd5-bowpwd.min.js est la version minifier par http://refresh-sf.com/ -bowpwd-scriptlet.js contient un script d'injection de bowpwd en base64 via la commande: base64 -w0 < yamd5-bowpwd.min.js > yamd5-bowpwd.min.js.b64 - -Le but serait d'avoir: -- yamd5-ascii.js -- bowpwd.js -- scriptlet.js (avec un marqueur a remplacer -et durant la compilation on aggrege, on minimise et on base64 (yamd5-ascii.js + bowpwd.js) que l'on inject dans le template scriptlet.js -pour donner bowpwd-scriptlet.js. Au pire la derniere etape (generation scriplet pourrait etre faite a l'execution par bow) si les autres -etape peuvent etre faite par des plugins maven. - - -Apres test l'injection de script ne fonctionne pas sur tous les sites (ex: -github) ne permet pas l'injection de tag script ou l'origine ne serait pas -celui qu'il a defini. Donc il faut faire - -'javascript:' + yamd5-bowpwd.min.js - -Meme si du coup c'est un peu plus lent diff --git a/bow-ui/src/main/webapp/js/bookmark.js b/bow-ui/src/main/webapp/js/bookmark.js deleted file mode 100644 index 7cdb67a..0000000 --- a/bow-ui/src/main/webapp/js/bookmark.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -function deleteBookmarkConfirmation(goTo, bookmarkName) { - deleteConfirmation(goTo, bookmarkName, 0, undefined); -} - -function deleteImportConfirmation(goTo, bookmarksNb, importDate) { - deleteConfirmation(goTo, undefined, bookmarksNb, importDate); -} - -function deleteConfirmation(goTo, bookmarkName, bookmarksNb, importDate) { -// TODO sletellier 20110516 : use i18n to translate this ! - - var confMsg = "Do you really want to delete "; - - if (bookmarksNb > 1) { - confMsg += "these " + bookmarksNb + " bookmarks"; - } else { - confMsg += "bookmark:\n'" + bookmarkName + "'"; - } - - if (importDate !== undefined) - confMsg += " imported the " + importDate + " ?"; - else - confMsg += " ?"; - if (confirm(confMsg)) { - window.location = goTo; - } - return false; -} diff --git a/bow-ui/src/main/webapp/js/bowadd.js b/bow-ui/src/main/webapp/js/bowadd.js deleted file mode 100644 index 8f6ffc7..0000000 --- a/bow-ui/src/main/webapp/js/bowadd.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2015 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -window.bow = window.bow || {}; -window.bow.bowadd = window.bow.bowadd || function(bowUrl, token, forceEdit, redirectLink) { - var resume = document.title; - var description = ((window.getSelection && window.getSelection()) || (document.getSelection && document.getSelection()) || (document.selection && document.selection.createRange && document.selection.createRange().text)); - - if (description) { - resume = resume + "\n\n" + description; - } - location.href = bowUrl + '/addUrl.action?' - + 'token=' + token - + '&name=' + escape(resume) - + '&link=' + escape(location.href) - + '&forceEdit=' + !!forceEdit - + '&redirectLink=' + !!redirectLink; - ; -}; diff --git a/bow-ui/src/main/webapp/js/bowpwd.js b/bow-ui/src/main/webapp/js/bowpwd.js deleted file mode 100644 index 1bee00b..0000000 --- a/bow-ui/src/main/webapp/js/bowpwd.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2015 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -window.bow = window.bow || {}; -window.bow.bowpwd = window.bow.bowpwd || function(hostname, maximum, prefix, include, exclude, suffix) { - var e = document.activeElement; - var isInput = e.tagName === "INPUT"; - - var password = isInput && e.value || prompt("Your private password"); - var config = password.split('|'); - password = config.shift(); - var c; - while (c=config.shift()) { - if (c.match(/\s*[0-9]+\s*/)) { // only numbers => maximum - maximum = parseInt(c); - } else if (c.match(/\s*\:.+/)){ // begin with ':' => prefix - prefix = c; - } else if (c.match(/\s*=.+/)){ // begin with '=' => include - include = c.trim().substr(1); - } else if (c.match(/\s*-.+/)){ // begin with '-' => exclude - exclude = c.trim().substr(1); - } else if (c.match(/\s*\+.+/)){ // begin with '+' => suffix - suffix = c.trimLeft().substr(1); - } else { // all other is suffix (not obligation to begin with +) - suffix = c; - } - } - - password = (prefix || '') + password; - hostname = hostname || location.hostname; - maximum = maximum || e.maxLength || 99; - suffix = suffix || ''; - - var result = bow.hash(password, hostname); - if (include) { - result = result.replace(RegExp('[^' + include + ']', 'g'), ''); - } - if (exclude) { - result = result.replace(RegExp('[' + exclude + ']', 'g'), ''); - } - result = result.substr(0, maximum); - result = result + suffix; - - if (isInput) { - e.value= result; - } else { - prompt("Copy your password with Ctrl+C", result); - } -}; - diff --git a/bow-ui/src/main/webapp/js/sha256.js b/bow-ui/src/main/webapp/js/sha256.js deleted file mode 100644 index cb5d217..0000000 --- a/bow-ui/src/main/webapp/js/sha256.js +++ /dev/null @@ -1,363 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2015 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* - * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined - * in FIPS 180-2 - * Version 2.2 Copyright Angel Marin, Paul Johnston 2000 - 2009. - * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - * Distributed under the BSD License - * See http://pajhome.org.uk/crypt/md5 for details. - * Also http://anmar.eu.org/projects/jssha2/ - */ - -/* - * Configurable variables. You may need to tweak these to be compatible with - * the server-side, but the defaults work in most cases. - */ -window.bow = window.bow || {}; -window.bow.hash = window.bow.hash || (function() { -var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ -var b64pad = "="; /* base-64 pad character. "=" for strict RFC compliance */ - -/* - * These are the functions you'll usually want to call - * They take string arguments and return either hex or base-64 encoded strings - */ -function hex_sha256(s) { return rstr2hex(rstr_sha256(str2rstr_utf8(s))); } -function b64_sha256(s) { return rstr2b64(rstr_sha256(str2rstr_utf8(s))); } -function any_sha256(s, e) { return rstr2any(rstr_sha256(str2rstr_utf8(s)), e); } -function hex_hmac_sha256(k, d) - { return rstr2hex(rstr_hmac_sha256(str2rstr_utf8(k), str2rstr_utf8(d))); } -function b64_hmac_sha256(k, d) - { return rstr2b64(rstr_hmac_sha256(str2rstr_utf8(k), str2rstr_utf8(d))); } -function any_hmac_sha256(k, d, e) - { return rstr2any(rstr_hmac_sha256(str2rstr_utf8(k), str2rstr_utf8(d)), e); } - -/* - * Perform a simple self-test to see if the VM is working - */ -function sha256_vm_test() -{ - return hex_sha256("abc").toLowerCase() == - "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"; -} - -/* - * Calculate the sha256 of a raw string - */ -function rstr_sha256(s) -{ - return binb2rstr(binb_sha256(rstr2binb(s), s.length * 8)); -} - -/* - * Calculate the HMAC-sha256 of a key and some data (raw strings) - */ -function rstr_hmac_sha256(key, data) -{ - var bkey = rstr2binb(key); - if(bkey.length > 16) bkey = binb_sha256(bkey, key.length * 8); - - var ipad = Array(16), opad = Array(16); - for(var i = 0; i < 16; i++) - { - ipad[i] = bkey[i] ^ 0x36363636; - opad[i] = bkey[i] ^ 0x5C5C5C5C; - } - - var hash = binb_sha256(ipad.concat(rstr2binb(data)), 512 + data.length * 8); - return binb2rstr(binb_sha256(opad.concat(hash), 512 + 256)); -} - -/* - * Convert a raw string to a hex string - */ -function rstr2hex(input) -{ - try { hexcase } catch(e) { hexcase=0; } - var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; - var output = ""; - var x; - for(var i = 0; i < input.length; i++) - { - x = input.charCodeAt(i); - output += hex_tab.charAt((x >>> 4) & 0x0F) - + hex_tab.charAt( x & 0x0F); - } - return output; -} - -/* - * Convert a raw string to a base-64 string - */ -function rstr2b64(input) -{ - try { b64pad } catch(e) { b64pad=''; } - var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - var output = ""; - var len = input.length; - for(var i = 0; i < len; i += 3) - { - var triplet = (input.charCodeAt(i) << 16) - | (i + 1 < len ? input.charCodeAt(i+1) << 8 : 0) - | (i + 2 < len ? input.charCodeAt(i+2) : 0); - for(var j = 0; j < 4; j++) - { - if(i * 8 + j * 6 > input.length * 8) output += b64pad; - else output += tab.charAt((triplet >>> 6*(3-j)) & 0x3F); - } - } - return output; -} - -/* - * Convert a raw string to an arbitrary string encoding - */ -function rstr2any(input, encoding) -{ - var divisor = encoding.length; - var remainders = Array(); - var i, q, x, quotient; - - /* Convert to an array of 16-bit big-endian values, forming the dividend */ - var dividend = Array(Math.ceil(input.length / 2)); - for(i = 0; i < dividend.length; i++) - { - dividend[i] = (input.charCodeAt(i * 2) << 8) | input.charCodeAt(i * 2 + 1); - } - - /* - * Repeatedly perform a long division. The binary array forms the dividend, - * the length of the encoding is the divisor. Once computed, the quotient - * forms the dividend for the next step. We stop when the dividend is zero. - * All remainders are stored for later use. - */ - while(dividend.length > 0) - { - quotient = Array(); - x = 0; - for(i = 0; i < dividend.length; i++) - { - x = (x << 16) + dividend[i]; - q = Math.floor(x / divisor); - x -= q * divisor; - if(quotient.length > 0 || q > 0) - quotient[quotient.length] = q; - } - remainders[remainders.length] = x; - dividend = quotient; - } - - /* Convert the remainders to the output string */ - var output = ""; - for(i = remainders.length - 1; i >= 0; i--) - output += encoding.charAt(remainders[i]); - - /* Append leading zero equivalents */ - var full_length = Math.ceil(input.length * 8 / - (Math.log(encoding.length) / Math.log(2))) - for(i = output.length; i < full_length; i++) - output = encoding[0] + output; - - return output; -} - -/* - * Encode a string as utf-8. - * For efficiency, this assumes the input is valid utf-16. - */ -function str2rstr_utf8(input) -{ - var output = ""; - var i = -1; - var x, y; - - while(++i < input.length) - { - /* Decode utf-16 surrogate pairs */ - x = input.charCodeAt(i); - y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0; - if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) - { - x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF); - i++; - } - - /* Encode output as utf-8 */ - if(x <= 0x7F) - output += String.fromCharCode(x); - else if(x <= 0x7FF) - output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F), - 0x80 | ( x & 0x3F)); - else if(x <= 0xFFFF) - output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F), - 0x80 | ((x >>> 6 ) & 0x3F), - 0x80 | ( x & 0x3F)); - else if(x <= 0x1FFFFF) - output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07), - 0x80 | ((x >>> 12) & 0x3F), - 0x80 | ((x >>> 6 ) & 0x3F), - 0x80 | ( x & 0x3F)); - } - return output; -} - -/* - * Encode a string as utf-16 - */ -function str2rstr_utf16le(input) -{ - var output = ""; - for(var i = 0; i < input.length; i++) - output += String.fromCharCode( input.charCodeAt(i) & 0xFF, - (input.charCodeAt(i) >>> 8) & 0xFF); - return output; -} - -function str2rstr_utf16be(input) -{ - var output = ""; - for(var i = 0; i < input.length; i++) - output += String.fromCharCode((input.charCodeAt(i) >>> 8) & 0xFF, - input.charCodeAt(i) & 0xFF); - return output; -} - -/* - * Convert a raw string to an array of big-endian words - * Characters >255 have their high-byte silently ignored. - */ -function rstr2binb(input) -{ - var output = Array(input.length >> 2); - for(var i = 0; i < output.length; i++) - output[i] = 0; - for(var i = 0; i < input.length * 8; i += 8) - output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32); - return output; -} - -/* - * Convert an array of big-endian words to a string - */ -function binb2rstr(input) -{ - var output = ""; - for(var i = 0; i < input.length * 32; i += 8) - output += String.fromCharCode((input[i>>5] >>> (24 - i % 32)) & 0xFF); - return output; -} - -/* - * Main sha256 function, with its support functions - */ -function sha256_S (X, n) {return ( X >>> n ) | (X << (32 - n));} -function sha256_R (X, n) {return ( X >>> n );} -function sha256_Ch(x, y, z) {return ((x & y) ^ ((~x) & z));} -function sha256_Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));} -function sha256_Sigma0256(x) {return (sha256_S(x, 2) ^ sha256_S(x, 13) ^ sha256_S(x, 22));} -function sha256_Sigma1256(x) {return (sha256_S(x, 6) ^ sha256_S(x, 11) ^ sha256_S(x, 25));} -function sha256_Gamma0256(x) {return (sha256_S(x, 7) ^ sha256_S(x, 18) ^ sha256_R(x, 3));} -function sha256_Gamma1256(x) {return (sha256_S(x, 17) ^ sha256_S(x, 19) ^ sha256_R(x, 10));} -function sha256_Sigma0512(x) {return (sha256_S(x, 28) ^ sha256_S(x, 34) ^ sha256_S(x, 39));} -function sha256_Sigma1512(x) {return (sha256_S(x, 14) ^ sha256_S(x, 18) ^ sha256_S(x, 41));} -function sha256_Gamma0512(x) {return (sha256_S(x, 1) ^ sha256_S(x, 8) ^ sha256_R(x, 7));} -function sha256_Gamma1512(x) {return (sha256_S(x, 19) ^ sha256_S(x, 61) ^ sha256_R(x, 6));} - -var sha256_K = new Array -( - 1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, - -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, - 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, - 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, - -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, - 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, - 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, - -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, - 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, - 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, - -1866530822, -1538233109, -1090935817, -965641998 -); - -function binb_sha256(m, l) -{ - var HASH = new Array(1779033703, -1150833019, 1013904242, -1521486534, - 1359893119, -1694144372, 528734635, 1541459225); - var W = new Array(64); - var a, b, c, d, e, f, g, h; - var i, j, T1, T2; - - /* append padding */ - m[l >> 5] |= 0x80 << (24 - l % 32); - m[((l + 64 >> 9) << 4) + 15] = l; - - for(i = 0; i < m.length; i += 16) - { - a = HASH[0]; - b = HASH[1]; - c = HASH[2]; - d = HASH[3]; - e = HASH[4]; - f = HASH[5]; - g = HASH[6]; - h = HASH[7]; - - for(j = 0; j < 64; j++) - { - if (j < 16) W[j] = m[j + i]; - else W[j] = safe_add(safe_add(safe_add(sha256_Gamma1256(W[j - 2]), W[j - 7]), - sha256_Gamma0256(W[j - 15])), W[j - 16]); - - T1 = safe_add(safe_add(safe_add(safe_add(h, sha256_Sigma1256(e)), sha256_Ch(e, f, g)), - sha256_K[j]), W[j]); - T2 = safe_add(sha256_Sigma0256(a), sha256_Maj(a, b, c)); - h = g; - g = f; - f = e; - e = safe_add(d, T1); - d = c; - c = b; - b = a; - a = safe_add(T1, T2); - } - - HASH[0] = safe_add(a, HASH[0]); - HASH[1] = safe_add(b, HASH[1]); - HASH[2] = safe_add(c, HASH[2]); - HASH[3] = safe_add(d, HASH[3]); - HASH[4] = safe_add(e, HASH[4]); - HASH[5] = safe_add(f, HASH[5]); - HASH[6] = safe_add(g, HASH[6]); - HASH[7] = safe_add(h, HASH[7]); - } - return HASH; -} - -function safe_add (x, y) -{ - var lsw = (x & 0xFFFF) + (y & 0xFFFF); - var msw = (x >> 16) + (y >> 16) + (lsw >> 16); - return (msw << 16) | (lsw & 0xFFFF); -} - -console.log("bow hash registered"); -return b64_hmac_sha256 -})(); diff --git a/bow-ui/src/main/webapp/styles/forms.css b/bow-ui/src/main/webapp/styles/forms.css deleted file mode 100644 index 866d330..0000000 --- a/bow-ui/src/main/webapp/styles/forms.css +++ /dev/null @@ -1,120 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -/* FORM ELEMENTS */ - form { - margin:0; - padding:0; - } - form div, - form p { - font-size: 1em; - margin: 0 0 1em 0; - padding: 0; - } - label { - font-weight: bold; - } - fieldset { - border: 1px solid #eee; - padding: 5px 10px; - margin: 0 0 1.5em 0; - } - fieldset legend { - color: #666; - font-size: 1.1em; - font-weight: bold; - margin: 0 0 0 0px; - padding: 0; - background-color: white; - } - * html fieldset legend { - margin: 0 0 10px -10px; - } - fieldset ul { - list-style: none; - margin: 0 0 1.5em 0; - padding: 0; - } - fieldset ul li { - list-style: none; - margin: 0 0 0.5em 0; - padding: 0; - } - - - input, select, textarea { - font-size:1em; - font-family: arial, helvetica, verdana, sans-serif; - - margin: 0; - padding: 2px; - } - - input, select { - vertical-align:middle; - } - textarea { - width: 200px; - height: 8em; - } - - input.check { - border: none; - width: auto; - height: auto; - margin: 0; - } - input.radio { - border: none; - width: auto; - height: auto; - margin: 0; - } - input.file { - height: auto; - width: 250px; - } - input.readonly { - background-color: transparent; - border: none; - } - input.button { - width: 10em; - border:1px solid black; - background-color: #ddd; - } - input.image { - border: none; - width: auto; - height: auto; - } - - form div.submit { - margin: 1em 0; - } - form div.submit input { - height: 2em; - width: 15em; - } -/* END FORM ELEMENTS */ - diff --git a/bow-ui/src/main/webapp/styles/layout-1col.css b/bow-ui/src/main/webapp/styles/layout-1col.css deleted file mode 100644 index fee9902..0000000 --- a/bow-ui/src/main/webapp/styles/layout-1col.css +++ /dev/null @@ -1,47 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -@import url("nav-horizontal.css"); - -/* NAV BAR AT THE TOP AND ONE COLUMN OF CONTENT */ - div#content { - position: relative; - width: 701px; - - margin: 0 auto 20px auto; - padding: 0; - - text-align: left; - } - div#main { - width: 100%; - } - div#local { - display: none; - } - div#sub { - display: none; - } - div#nav { - display: none; - } -/* END CONTENT */ diff --git a/bow-ui/src/main/webapp/styles/layout-navleft-1col.css b/bow-ui/src/main/webapp/styles/layout-navleft-1col.css deleted file mode 100644 index 2f410e7..0000000 --- a/bow-ui/src/main/webapp/styles/layout-navleft-1col.css +++ /dev/null @@ -1,51 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -@import url("nav-vertical.css"); - -/* NAV BAR ON THE LEFT AND ONE COLUMN OF CONTENT */ - div#content { - position: relative; - width: 780px; - - margin: 0 auto 20px auto; - padding: 0; - - text-align: left; - } - div#main { - float: right; - width: 560px; - display: inline; - } - div#local { - display: none; - } - div#sub { - display: none; - } - div#nav { - float: left; - width: 200px; - display: inline; - } -/* END CONTENT */ diff --git a/bow-ui/src/main/webapp/styles/layout-navleft-2col.css b/bow-ui/src/main/webapp/styles/layout-navleft-2col.css deleted file mode 100644 index 5b0d4f5..0000000 --- a/bow-ui/src/main/webapp/styles/layout-navleft-2col.css +++ /dev/null @@ -1,59 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -@import url("nav-vertical.css"); - -/* NAV BAR ON THE LEFT AND TWO COLUMNS OF CONTENT */ - div#content { - position: relative; - width: 780px; - - margin: 0 auto 20px auto; - padding: 0; - - text-align: left; - } - div#main { - float: right; - width: 340px; - display: inline; - - margin-right: 220px; - margin-left: -220px; - } - div#local { - display: none; - } - div#sub { - float: right; - width: 200px; - display: inline; - - margin-right: -340px; - margin-left: 200px; - } - div#nav { - float: left; - width: 200px; - display: inline; - } -/* END CONTENT */ diff --git a/bow-ui/src/main/webapp/styles/layout-navtop-1col.css b/bow-ui/src/main/webapp/styles/layout-navtop-1col.css deleted file mode 100644 index 721ea96..0000000 --- a/bow-ui/src/main/webapp/styles/layout-navtop-1col.css +++ /dev/null @@ -1,52 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -@import url("nav-horizontal.css"); - -/* NAV BAR AT THE TOP AND ONE COLUMN OF CONTENT */ - div#content { - position: relative; - width: 701px; - - margin: 0 auto 20px auto; - padding: 0; - - text-align: left; - } - div#main { - width: 100%; - } - div#local { - width: 100%; - } - div#sub { - width: 100%; - } - div#nav { - position: absolute; - top: -15px; - left: 0; - width: 100%; - - text-align: left; - } -/* END CONTENT */ diff --git a/bow-ui/src/main/webapp/styles/layout-navtop-3col.css b/bow-ui/src/main/webapp/styles/layout-navtop-3col.css deleted file mode 100644 index f96e4a7..0000000 --- a/bow-ui/src/main/webapp/styles/layout-navtop-3col.css +++ /dev/null @@ -1,63 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -@import url("nav-horizontal.css"); - -/* NAV BAR AT THE TOP, LOCAL NAV ON THE LEFT AND TWO COLUMNS OF CONTENT */ - div#content { - position: relative; - width: 701px; - - margin: 0 auto 20px auto; - padding: 0; - - text-align: left; - } - div#main { - float: left; - width: 300px; - display: inline; - - margin-right: -200px; - margin-left: 200px; - } - div#sub { - float: right; - width: 180px; - display: inline; - } - div#local { - float: left; - width: 180px; - display: inline; - - margin-left: -300px; - } - div#nav { - position: absolute; - top: -15px; - left: 0; - width: 701px; - - text-align: left; - } -/* END CONTENT */ diff --git a/bow-ui/src/main/webapp/styles/layout-navtop-localleft.css b/bow-ui/src/main/webapp/styles/layout-navtop-localleft.css deleted file mode 100644 index 3c13018..0000000 --- a/bow-ui/src/main/webapp/styles/layout-navtop-localleft.css +++ /dev/null @@ -1,56 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -@import url("nav-horizontal.css"); - -/* NAV BAR AT THE TOP, LOCAL NAVIGATION ON THE LEFT AND ONE COLUMN OF CONTENT */ - div#content { - position: relative; - width: 701px; - - margin: 0 auto 20px auto; - padding: 0; - - text-align: left; - } - div#main { - float: right; - width: 500px; - display: inline; - } - div#local { - float: left; - width: 200px; - display: inline; - } - div#sub { - display: none; - } - div#nav { - position: absolute; - top: -15px; - left: 0; - width: 100%; - - text-align: left; - } -/* END CONTENT */ diff --git a/bow-ui/src/main/webapp/styles/layout-navtop-subright.css b/bow-ui/src/main/webapp/styles/layout-navtop-subright.css deleted file mode 100644 index 1cb440d..0000000 --- a/bow-ui/src/main/webapp/styles/layout-navtop-subright.css +++ /dev/null @@ -1,56 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -@import url("nav-horizontal.css"); - -/* NAV BAR AT THE TOP AND TWO COLUMNS OF CONTENT */ - div#content { - position: relative; - width: 701px; - - margin: 0 auto 20px auto; - padding: 0; - - text-align: left; - } - div#main { - float: left; - width: 480px; - display: inline; - } - div#sub { - float: right; - width: 200px; - display: inline; - } - div#local { - display: none; - } - div#nav { - position: absolute; - top: -15px; - left: 0; - width: 100%; - - text-align: left; - } -/* END CONTENT */ diff --git a/bow-ui/src/main/webapp/styles/layout.css b/bow-ui/src/main/webapp/styles/layout.css deleted file mode 100644 index d628148..0000000 --- a/bow-ui/src/main/webapp/styles/layout.css +++ /dev/null @@ -1,145 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -/* SITE SPECIFIC LAYOUT */ - body { - margin: 0; - padding: 0; - - background: white; - - text-align: center; - } - div#page { - width: 780px; - - margin: 0 auto; - padding: 0; - - background: white; - text-align: center; - } - - /* HEADER */ - div#header { - margin: 0 0 5em 0; - padding: 40px 20px; - - color: white; - background: black; - - text-align: left; - } - div#branding { - float: left; - width: 40%; - - margin: 0; - padding: 10px 0 10px 20px; - - text-align: left; - } - div#search { - float: right; - width: 49%; - - margin: 0; - padding: 16px 20px 0 0; - - text-align: right; - } - /* END HEADER */ - - - /* CONTENT */ - div#content { - - } - - /* MAIN */ - div#main { - - } - /* END MAIN */ - - /* SUB */ - div#sub { - - } - /* END SUB */ - - /* END CONTENT */ - - - /* FOOTER */ - div#footer { - color: white; - background-color: black; - } - div#footer p { - font-size: 0.8em; - - margin: 0; - padding: 15px; - } - /* END FOOTER */ -/* END LAYOUT */ - - - - -/* UL.SUBNAV */ - ul.subnav { - margin: 0; - padding: 0; - - font-size: 0.8em; - list-style: none; - } - ul.subnav li { - margin: 0 0 1em 0; - padding: 0; - list-style: none; - } - ul.subnav li a, - ul.subnav li a:link, - ul.subnav li a:visited, - ul.subnav li a:active { - text-decoration: none; - font-weight: bold; - color: black; - } - ul.subnav li a:hover { - text-decoration: underline; - } - ul.subnav li strong { - padding: 0 0 0 12px; - background: url("../i/subnav-highlight.gif") left top no-repeat transparent; - } - ul.subnav li strong a, - ul.subnav li strong a:link, - ul.subnav li strong a:visited, - ul.subnav li strong a:active { - color: white; - background-color: black; - } -/* END UL.SUBNAV */ diff --git a/bow-ui/src/main/webapp/styles/main.css b/bow-ui/src/main/webapp/styles/main.css deleted file mode 100644 index b29d423..0000000 --- a/bow-ui/src/main/webapp/styles/main.css +++ /dev/null @@ -1,41 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* - Css Framework - ============= - - see http://www.contentwithstyle.co.uk/Articles/17/a-css-framework - for more info. -*/ -@import url("tools.css"); -@import url("typo.css"); -@import url("forms.css"); -/* - Swap layout stylesheet: - layout-navtop-localleft.css - layout-navtop-subright.css - layout-navtop-3col.css - layout-navtop-1col.css - layout-navleft-1col.css - layout-navleft-2col.css -*/ -@import url("layout-navtop-localleft.css"); -@import url("layout.css"); - diff --git a/bow-ui/src/main/webapp/styles/nav-horizontal.css b/bow-ui/src/main/webapp/styles/nav-horizontal.css deleted file mode 100644 index c14262e..0000000 --- a/bow-ui/src/main/webapp/styles/nav-horizontal.css +++ /dev/null @@ -1,100 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -/* NAV */ - div#nav { - font-size: 0.8em; - } - * html div#nav { - /* hide ie/mac \*/ - height: 1%; - /* end hide */ - } - div#nav div.wrapper { - position: absolute; - left: 0; - bottom: 0; - width: 100%; - } - div#nav ul { - width: auto; - width: 100%; - - margin: 0; - padding: 0; - - line-height: 1em; - list-style: none; - } - div#nav li { - float: left; - display: inline; - - list-style: none; - - margin: 0; - padding: 0; - - line-height: 1em; - border-right: 1px solid #aaa; - } - div#nav li.last { - border-right: none; - } - div#nav a, - div#nav a:link, - div#nav a:active, - div#nav a:visited { - display: inline-block; - /* hide from ie/mac \*/ - display: block; - /* end hide */ - font-weight: bold; - text-decoration: none; - - margin: 0; - padding: 5px 38px 5px 38px; - - color: black; - background: #ddd; - } - div#nav a:hover { - text-decoration: underline; - } - div#nav strong { - display: inline-block; - /* hide from ie/mac \*/ - display: block; - /* end hide */ - - color: white; - background: black; - } - div#nav strong a, - div#nav strong a:link, - div#nav strong a:active, - div#nav strong a:visited, - div#nav strong a:hover { - color: white; - background-color: black; - } -/* END NAV */ diff --git a/bow-ui/src/main/webapp/styles/nav-vertical.css b/bow-ui/src/main/webapp/styles/nav-vertical.css deleted file mode 100644 index 41685f5..0000000 --- a/bow-ui/src/main/webapp/styles/nav-vertical.css +++ /dev/null @@ -1,99 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -/* NAV */ - div#nav { - font-size: 0.8em; - } - * html div#nav { - /* hide ie/mac \*/ - height: 1%; - /* end hide */ - } - div#nav div.wrapper { - width: 100%; - - background: #ddd; - } - div#nav ul { - width: auto; - width: 100%; - - margin: 0; - padding: 0; - - line-height: 1em; - list-style: none; - } - div#nav li { - display: block; - - list-style: none; - - margin: 0; - padding: 0; - - line-height: 1em; - } - * html div#nav li { - /* hide ie/mac \*/ - height: 1%; - /* end hide */ - } - div#nav li.last { - - } - div#nav a, - div#nav a:link, - div#nav a:active, - div#nav a:visited { - display: block; - - font-weight: bold; - text-decoration: none; - - margin: 0; - padding: 5px 10px 5px 10px; - - color: black; - background: white; - } - div#nav a:hover { - color: white; - background: black; - text-decoration: underline; - } - div#nav strong { - display: block; - - color: white; - background: black; - } - div#nav strong a, - div#nav strong a:link, - div#nav strong a:active, - div#nav strong a:visited, - div#nav strong a:hover { - color: white; - background-color: black; - } -/* END NAV */ diff --git a/bow-ui/src/main/webapp/styles/tools.css b/bow-ui/src/main/webapp/styles/tools.css deleted file mode 100644 index 1100ea0..0000000 --- a/bow-ui/src/main/webapp/styles/tools.css +++ /dev/null @@ -1,88 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -/* clearing */ - .stretch, - .clear { - clear:both; - height:1px; - margin:0; - padding:0; - font-size: 15px; - line-height: 1px; - } - .clearfix:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } - * html>body .clearfix { - display: inline-block; - width: 100%; - } - - * html .clearfix { - /* Hides from IE-mac \*/ - height: 1%; - /* End hide from IE-mac */ - } -/* end clearing */ - - -/* replace */ - .replace { - display:block; - - background-repeat: no-repeat; - background-position: left top; - background-color:transparent; - } - /* tidy these up */ - .replace * { - text-indent: -10000px; - display:block; - - background-repeat: no-repeat; - background-position: left top; - background-color:transparent; - } - .replace a { - text-indent:0; - } - .replace a span { - text-indent:-10000px; - } -/* end replace */ - - -/* accessibility */ - span.accesskey { - text-decoration:none; - } - .accessibility { - position: absolute; - top: -999em; - left: -999em; - } -/* end accessibility */ diff --git a/bow-ui/src/main/webapp/styles/typo.css b/bow-ui/src/main/webapp/styles/typo.css deleted file mode 100644 index bebe9c1..0000000 --- a/bow-ui/src/main/webapp/styles/typo.css +++ /dev/null @@ -1,197 +0,0 @@ -/* - * #%L - * BOW UI - * %% - * Copyright (C) 2010 - 2011 CodeLutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -/* A CSS Framework by Mike Stenhouse of Content with Style */ - -/* TYPOGRAPHY */ - body { - text-align: left; - font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; - font-size: 76%; - line-height: 1em; - color: #333; - } - div { - font-size: 1em; - } - img { - border: 0; - } - -/* LINKS */ - a, - a:link - a:active { - color: blue; - background-color: white; - text-decoration: underline; - } - a:visited { - color: purple; - background-color: transparent; - } - a:hover { - color: white; - background-color: black; - text-decoration: none; - } -/* END LINKS */ - -/* HEADINGS */ - h1 { - font-size: 2em; - line-height: 1.5em; - margin: 0 0 0.5em 0; - padding: 0; - color: black; - } - h2 { - font-size: 1.5em; - line-height: 1.5em; - margin: 0 0 0.5em 0; - padding: 0; - color: black; - } - h3 { - font-size: 1.3em; - line-height: 1.3em; - margin: 0 0 0.5em 0; - padding:0; - color: black; - } - h4 { - font-size: 1.2em; - line-height: 1.3em; - margin: 0 0 0.25em 0; - padding: 0; - color: black; - } - h5 { - font-size: 1.1em; - line-height: 1.3em; - margin: 0 0 0.25em 0; - padding: 0; - color: black; - } - h6 { - font-size: 1em; - line-height: 1.3em; - margin: 0 0 0.25em 0; - padding: 0; - color: black; - } -/* END HEADINGS */ - -/* TEXT */ - p { - font-size: 1em; - margin: 0 0 1.5em 0; - padding: 0; - line-height:1.4em; - } - blockquote { - border-left:10px solid #ddd; - margin-left:10px; - } - pre { - font-family: monospace; - font-size: 1.0em; - } - strong, b { - font-weight: bold; - } - em, i { - font-style:italic; - } - code { - font-family: "Courier New", Courier, monospace; - font-size: 1em; - white-space: pre; - } -/* END TEXT */ - -/* LISTS */ - ul { - line-height:1.4em; - margin: 0 0 1.5em 0; - padding: 0; - } - ul li { - margin: 0 0 0.25em 30px; - padding: 0; - } - ol { - font-size: 1.0em; - line-height: 1.4em; - margin: 0 0 1.5em 0; - padding: 0; - } - ol li { - font-size: 1.0em; - margin: 0 0 0.25em 30px; - padding: 0; - } - dl { - margin: 0 0 1.5em 0; - padding: 0; - line-height: 1.4em; - } - dl dt { - font-weight: bold; - margin: 0.25em 0 0.25em 0; - padding: 0; - } - dl dd { - margin: 0 0 0 30px; - padding: 0; - } -/* END LISTS */ - - -/* TABLE */ - table { - font-size: 1em; - margin: 0 0 1.5em 0; - padding: 0; - } - table caption { - font-weight: bold; - margin: 0 0 0 0; - padding: 0 0 1.5em 0; - } - th { - font-weight: bold; - text-align: left; - } - td { - font-size: 1em; - } -/* END TABLE */ - - hr { - display: none; - } - div.hr { - height: 1px; - margin: 1.5em 10px; - border-bottom: 1px dotted black; - } - -/* END TYPOGRAPHY */ diff --git a/bow-ui/src/main/webapp/template/simple/a-close.ftl b/bow-ui/src/main/webapp/template/simple/a-close.ftl deleted file mode 100644 index 4903528..0000000 --- a/bow-ui/src/main/webapp/template/simple/a-close.ftl +++ /dev/null @@ -1,68 +0,0 @@ -<#-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2013 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% ---> -<#-- -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ ---> -<a<#rt/> -<#if parameters.id?if_exists != ""> - id="${parameters.id?html}"<#rt/> -</#if> -<#if parameters.href?if_exists != ""> - href="${parameters.href}"<#rt/> -</#if> -<#if parameters.tabindex??> - tabindex="${parameters.tabindex?html}"<#rt/> -</#if> -<#if parameters.cssClass??> - class="${parameters.cssClass?html}"<#rt/> -</#if> -<#if parameters.cssStyle??> - style="${parameters.cssStyle?html}"<#rt/> -</#if> -<#if parameters.title??> - title="${parameters.title?html}"<#rt/> -</#if> -<#if parameters.name??> - name="${parameters.name?html}"<#rt/> -</#if> -<#include "/${parameters.templateDir}/simple/scripting-events.ftl" /> -<#include "/${parameters.templateDir}/simple/common-attributes.ftl" /> -<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" /> ->${parameters.body}</a> diff --git a/bow-ui/src/main/webapp/template/simple/form-common.ftl b/bow-ui/src/main/webapp/template/simple/form-common.ftl deleted file mode 100644 index b1737ec..0000000 --- a/bow-ui/src/main/webapp/template/simple/form-common.ftl +++ /dev/null @@ -1,84 +0,0 @@ -<#-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2013 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% ---> -<#-- -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ ---> -<#if (parameters.validate?default(false) == false)><#rt/> - <#if parameters.onsubmit??><#rt/> - ${tag.addParameter('onsubmit', "${parameters.onsubmit}") } - </#if> -</#if> -<form<#rt/> -<#if parameters.id??> - id="${parameters.id?html}"<#rt/> -</#if> -<#if parameters.onsubmit??> - onsubmit="${parameters.onsubmit?html}"<#rt/> -</#if> -<#if parameters.onreset??> - onreset="${parameters.onreset?html}"<#rt/> -</#if> -<#if parameters.action??> - action="${parameters.action?html}"<#rt/> -</#if> -<#if parameters.target??> - target="${parameters.target?html}"<#rt/> -</#if> -<#if parameters.method??> - method="${parameters.method?html}"<#rt/> -<#else> - method="post"<#rt/> -</#if> -<#if parameters.enctype??> - enctype="${parameters.enctype?html}"<#rt/> -</#if> -<#if parameters.cssClass??> - class="${parameters.cssClass?html}"<#rt/> -</#if> -<#if parameters.cssStyle??> - style="${parameters.cssStyle?html}"<#rt/> -</#if> -<#if parameters.title??> - title="${parameters.title?html}"<#rt/> -</#if> -<#if parameters.acceptcharset??> - accept-charset="${parameters.acceptcharset?html}"<#rt/> -</#if> -<#include "/${parameters.templateDir}/simple/dynamic-attributes.ftl" /> diff --git a/bow-ui/src/main/webapp/template/xhtml/controlheader-core.ftl b/bow-ui/src/main/webapp/template/xhtml/controlheader-core.ftl deleted file mode 100644 index e543c01..0000000 --- a/bow-ui/src/main/webapp/template/xhtml/controlheader-core.ftl +++ /dev/null @@ -1,86 +0,0 @@ -<#-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2013 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% ---> -<#-- -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ ---> -<#-- - Only show message if errors are available. - This will be done if ActionSupport is used. ---> -<#assign hasFieldErrors = parameters.name?? && fieldErrors?? && fieldErrors[parameters.name]??/> -<#if hasFieldErrors> -<#list fieldErrors[parameters.name] as error> - - <span class="errorMessage">${error?html}</span><#t/> - <#if parameters.labelposition?default("") == 'top'> - <br /> - </#if> - -</#list> -</#if> -<#-- - if the label position is top, - then give the label it's own row in the table ---> -<#if parameters.label??> - <label <#t/> -<#if parameters.id??> - for="${parameters.id?html}" <#t/> -</#if> -<#if hasFieldErrors> - class="errorLabel"<#t/> -<#else> - class="label"<#t/> -</#if> - ><#t/> -<#if parameters.required?default(false) && parameters.requiredposition?default("right") != 'right'> - <span class="required">*</span><#t/> -</#if> -${parameters.label?html}<#t/> -<#if parameters.required?default(false) && parameters.requiredposition?default("right") == 'right'> - <span class="required">*</span><#t/> -</#if> -${parameters.labelseparator?default(":")?html}<#t/> -<#include "/${parameters.templateDir}/xhtml/tooltip.ftl" /> -</label><#t/> -</#if> -<#if parameters.labelposition?default("") == 'top'> - <br /> -</#if> diff --git a/bow-ui/src/main/webapp/template/xhtml/file.ftl b/bow-ui/src/main/webapp/template/xhtml/file.ftl deleted file mode 100644 index 24e0e4d..0000000 --- a/bow-ui/src/main/webapp/template/xhtml/file.ftl +++ /dev/null @@ -1,44 +0,0 @@ -<#-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2013 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% ---> -<#-- -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ ---> -<#include "/${parameters.templateDir}/xhtml/controlheader-core.ftl" /> -<#include "/${parameters.templateDir}/simple/file.ftl" /> diff --git a/bow-ui/src/main/webapp/template/xhtml/form-close.ftl b/bow-ui/src/main/webapp/template/xhtml/form-close.ftl deleted file mode 100644 index 86ace2f..0000000 --- a/bow-ui/src/main/webapp/template/xhtml/form-close.ftl +++ /dev/null @@ -1,54 +0,0 @@ -<#-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2013 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% ---> -<#-- -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ ---> -<#include "/${parameters.templateDir}/simple/form-close.ftl" /> -<#include "/${parameters.templateDir}/xhtml/form-close-validate.ftl" /> -<#if parameters.focusElement?if_exists != ""> -<script type="text/javascript"> - StrutsUtils.addOnLoad(function() { - var element = document.getElementById("${parameters.focusElement?html}"); - if(element) { - element.focus(); - } - }); -</script> -</#if> diff --git a/bow-ui/src/main/webapp/template/xhtml/form.ftl b/bow-ui/src/main/webapp/template/xhtml/form.ftl deleted file mode 100644 index e6708df..0000000 --- a/bow-ui/src/main/webapp/template/xhtml/form.ftl +++ /dev/null @@ -1,52 +0,0 @@ -<#-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2013 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% ---> -<#-- -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ ---> -<#include "/${parameters.templateDir}/xhtml/form-validate.ftl" /> -<#include "/${parameters.templateDir}/simple/form-common.ftl" /> -<#if (parameters.validate?default(false))> - onreset="${parameters.onreset?default('clearErrorMessages(this);clearErrorLabels(this);')}" -<#else> - <#if parameters.onreset??> - onreset="${parameters.onreset?html}" - </#if> -</#if> -> diff --git a/bow-ui/src/main/webapp/template/xhtml/password.ftl b/bow-ui/src/main/webapp/template/xhtml/password.ftl deleted file mode 100644 index 3cdb8c3..0000000 --- a/bow-ui/src/main/webapp/template/xhtml/password.ftl +++ /dev/null @@ -1,44 +0,0 @@ -<#-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2013 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% ---> -<#-- -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ ---> -<#include "/${parameters.templateDir}/xhtml/controlheader-core.ftl" /> -<#include "/${parameters.templateDir}/simple/password.ftl" /> diff --git a/bow-ui/src/main/webapp/template/xhtml/submit-close.ftl b/bow-ui/src/main/webapp/template/xhtml/submit-close.ftl deleted file mode 100644 index 55524b9..0000000 --- a/bow-ui/src/main/webapp/template/xhtml/submit-close.ftl +++ /dev/null @@ -1,21 +0,0 @@ -<#-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2013 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% ---> -<#include "/${parameters.templateDir}/simple/submit-close.ftl" /> diff --git a/bow-ui/src/main/webapp/template/xhtml/submit.ftl b/bow-ui/src/main/webapp/template/xhtml/submit.ftl deleted file mode 100644 index de81fc6..0000000 --- a/bow-ui/src/main/webapp/template/xhtml/submit.ftl +++ /dev/null @@ -1,43 +0,0 @@ -<#-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2013 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% ---> -<#-- -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ ---> -<#include "/${parameters.templateDir}/simple/submit.ftl" /> diff --git a/bow-ui/src/main/webapp/template/xhtml/text.ftl b/bow-ui/src/main/webapp/template/xhtml/text.ftl deleted file mode 100644 index 4abf51f..0000000 --- a/bow-ui/src/main/webapp/template/xhtml/text.ftl +++ /dev/null @@ -1,44 +0,0 @@ -<#-- - #%L - BOW UI - %% - Copyright (C) 2010 - 2013 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% ---> -<#-- -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ ---> -<#include "/${parameters.templateDir}/xhtml/controlheader-core.ftl" /> -<#include "/${parameters.templateDir}/simple/text.ftl" /> diff --git a/bow-ui/src/main/xmi/README b/bow-ui/src/main/xmi/README deleted file mode 100644 index 9caefd4..0000000 --- a/bow-ui/src/main/xmi/README +++ /dev/null @@ -1,28 +0,0 @@ -BowUser, BowPreference: - BowUser is used for each user with login/passowd and has prefence configuration. - -BowPrefix - BowUser has BowPrefix use to prefix search text and change search behavior - (add, search in tag, search in bookmark, search in specific search engine, - ...) - -BowBookmark, BowImport - BowBookmark is one bookmark, it can be marked imported with extension BowImport - -BowSharedUser - Create by BowUser to share some BowBookmark, this user can't login in - application, and can't modify Bow (preference, bookmark, group, ...) - login is prefixed with wikittyId of creator (BowUser). - if tag is added with prefix '#' this tag reference BowSharedUser - and this BowSharedUser must be in reader of this BowBookmark. - -BowGroup - BowGroup is used to share Bookmark with other BowUser - if tag is added with prefix '@' this tag reference BowGroup - and this BowGroup must be in reader of this BowBookmark. - -BowAuthentication - BowAuthentication is used to define configuration to generate - password for specific BowBookmark. BowAuthentication and BowBookmark have - different WikittyAuthorisation to permit read access to BowBookmark but - not to BowAuthentication. diff --git a/bow-ui/src/main/xmi/bow-model.properties b/bow-ui/src/main/xmi/bow-model.properties deleted file mode 100644 index 65afad7..0000000 --- a/bow-ui/src/main/xmi/bow-model.properties +++ /dev/null @@ -1,20 +0,0 @@ -### -# #%L -# BOW UI -# %% -# Copyright (C) 2010 - 2015 CodeLutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# #L% -### diff --git a/bow-ui/src/main/xmi/bow-model.zargo b/bow-ui/src/main/xmi/bow-model.zargo deleted file mode 100644 index 51be7ec..0000000 Binary files a/bow-ui/src/main/xmi/bow-model.zargo and /dev/null differ diff --git a/bow-ui/src/site/site.xml b/bow-ui/src/site/site.xml deleted file mode 100644 index 915ed8d..0000000 --- a/bow-ui/src/site/site.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - BOW UI - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> - -<project name="${project.name}" - xmlns="http://maven.apache.org/DECORATION/1.4.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0 http://maven.apache.org/xsd/decoration-1.4.0.xsd"> - - <bannerLeft> - <name>${project.name}</name> - <href>index.html</href> - </bannerLeft> - - <body> - - <breadcrumbs> - <item name="${project.name}" href="index.html"/> - </breadcrumbs> - - <menu ref="parent"/> - <menu ref="reports"/> - - </body> -</project> diff --git a/conf/application.conf b/conf/application.conf new file mode 100644 index 0000000..abc1e82 --- /dev/null +++ b/conf/application.conf @@ -0,0 +1,10 @@ +# add or override properties +# See https://github.com/typesafehub/config/blob/master/HOCON.md for more details + +db.url = "jdbc:postgresql://localhost:5444/bow" +db.user = "dbuser" +db.password = xxxxxxxx + +# hikari +hikari.autoCommit = false +hikari.maximumPoolSize = 20 \ No newline at end of file diff --git a/conf/logback.xml b/conf/logback.xml new file mode 100644 index 0000000..934d01c --- /dev/null +++ b/conf/logback.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration scan="true" scanPeriod="15 seconds" debug="false"> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>[%d{ISO8601}]-[%thread] %-5level %logger - %msg%n</pattern> + </encoder> + </appender> + + <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>log/bow.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>log/bow.%d{yyyy-MM-dd}.log</fileNamePattern> + <totalSizeCap>1mb</totalSizeCap> + <maxHistory>7</maxHistory> + </rollingPolicy> + + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern> + </encoder> + </appender> + + <appender name="ACCESS" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>log/access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>log/access.%d{yyyy-MM-dd}.log</fileNamePattern> + <totalSizeCap>1mb</totalSizeCap> + <maxHistory>7</maxHistory> + </rollingPolicy> + + <encoder> + <pattern>%msg%n</pattern> + </encoder> + </appender> + + <logger name="org.jooby.RequestLogger" additivity="false"> + <appender-ref ref="ACCESS" /> + </logger> + + <root level="INFO"> + <appender-ref ref="STDOUT" /> + </root> +</configuration> diff --git a/log/access.log b/log/access.log new file mode 100644 index 0000000..e69de29 diff --git a/log/bookmarks.log b/log/bookmarks.log new file mode 100644 index 0000000..e69de29 diff --git a/pom.xml b/pom.xml index 5298d0c..db0e782 100644 --- a/pom.xml +++ b/pom.xml @@ -1,493 +1,127 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - bow - %% - Copyright (C) 2010 - 2017 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses />. - #L% - --> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <groupId>org.nuiton</groupId> - <artifactId>chorempom</artifactId> - <version>10.5</version> + <groupId>io.jooby</groupId> + <artifactId>jooby-project</artifactId> + <version>2.0.2</version> </parent> - <groupId>org.chorem</groupId> <artifactId>bow</artifactId> - <version>1.7-SNAPSHOT</version> - <packaging>pom</packaging> + <groupId>com.chorem</groupId> + <version>2.0-SNAPSHOT</version> <name>bow</name> - <description>bookmarks on web</description> - <url>http://bow.chorem.org</url> - <inceptionYear>2010</inceptionYear> - <licenses> - <license> - <name>GNU Affero General Public License version 3</name> - <url>http://www.gnu.org/licenses/agpl.html</url> - <distribution>repo</distribution> - </license> - </licenses> - - <developers> - <developer> - <id>kmorin</id> - <name>Kevin Morin</name> - <email>morin@codelutin.com</email> - <organization>CodeLutin</organization> - <organizationUrl>http://codelutin.com</organizationUrl> - <timezone>Europe/Paris</timezone> - <roles> - <role>Developer</role> - </roles> - </developer> - - <developer> - <id>bpoussin</id> - <name>Benjamin Poussin</name> - <email>poussin@codelutin.com</email> - <organization>CodeLutin</organization> - <organizationUrl>http://codelutin.com</organizationUrl> - <timezone>Europe/Paris</timezone> - <roles> - <role>Developer</role> - </roles> - </developer> - </developers> - - <contributors> - <contributor> - <name>Benoit Brossaud</name> - <timezone>Europe/Paris</timezone> - <roles> - <role>Developer</role> - </roles> - </contributor> - - <contributor> - <name>Valentin Brillant</name> - <timezone>Europe/Paris</timezone> - <roles> - <role>Developer</role> - </roles> - </contributor> - - <contributor> - <name>Sylvain Letellier</name> - <timezone>Europe/Paris</timezone> - <roles> - <role>Developer</role> - </roles> - </contributor> - - <contributor> - <name>Tony Chemit</name> - <timezone>Europe/Paris</timezone> - <roles> - <role>Developer</role> - </roles> - </contributor> - </contributors> - - <modules> - <module>bow-extension-chromium</module> - <module>bow-ui</module> - </modules> - - <scm> - <url>https://gitlab.nuiton.org/chorem/</url> - <connection>scm:git:git@gitlab.nuiton.org:chorem/.git</connection> - <developerConnection>scm:git:git@gitlab.nuiton.org:chorem/.git</developerConnection> - </scm> + <description>Bow - bookmarks On the Web</description> <properties> + <jooby.version>2.0.2</jooby.version> - <projectId>bow</projectId> - - <eugenePluginVersion>2.7.4</eugenePluginVersion> - <nuitonUtilsVersion>3.0-rc-8</nuitonUtilsVersion> - <nuitonConfigVersion>3.0-rc-2</nuitonConfigVersion> - <nuitonWebVersion>1.17</nuitonWebVersion> - <nuitonI18nVersion>3.3</nuitonI18nVersion> - <wikittyVersion>3.13</wikittyVersion> - <slf4jVersion>1.6.1</slf4jVersion> - <struts2Version>2.3.34</struts2Version> - <struts2jqueryVersion>3.7.1</struts2jqueryVersion> - <htmlParserVersion>1.6</htmlParserVersion> - <javaxMailVersion>1.4.3</javaxMailVersion> - <servletApiVersion>2.5</servletApiVersion> - <jspApiVersion>2.0</jspApiVersion> - <h2Version>1.4.187</h2Version> - <crxMavenPluginVersion>1.1.0</crxMavenPluginVersion> - <jstlVersion>1.2</jstlVersion> - <txtmarkVersion>0.13</txtmarkVersion> - <!-- license to use --> - <license.licenseName>agpl_v3</license.licenseName> - - <!-- documentation locale --> - <locales>fr</locales> - - <ciViewId>Bow</ciViewId> - <javaVersion>1.7</javaVersion> - <signatureArtifactId>java17</signatureArtifactId> - <signatureVersion>1.0</signatureVersion> + <!-- Startup class --> + <application.class>com.chorem.bow.BowApp</application.class> </properties> - <repositories> - - <repository> - <id>nuiton.release</id> - <name>NuitonReleaseRepository</name> - <url>http://nexus.nuiton.org/nexus/content/groups/bow/</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - <releases> - <enabled>true</enabled> - <checksumPolicy>warn</checksumPolicy> - </releases> - </repository> - - <repository> - <id>nuiton.snapshot</id> - <name>NuitonSnapshotRepository</name> - <url>http://nexus.nuiton.org/nexus/content/groups/bow</url> - <snapshots> - <enabled>true</enabled> - <checksumPolicy>fail</checksumPolicy> - </snapshots> - <releases> - <enabled>false</enabled> - </releases> - </repository> - - </repositories> - <pluginRepositories> - - <pluginRepository> - - <id>nuiton.release</id> - <name>NuitonReleaseRepository</name> - <url>http://nexus.nuiton.org/nexus/content/groups/bow</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - <releases> - <enabled>true</enabled> - <checksumPolicy>warn</checksumPolicy> - </releases> - </pluginRepository> - - <pluginRepository> - <id>nuiton.snapshot</id> - <name>NuitonSnapshotRepository</name> - <url>http://nexus.nuiton.org/nexus/content/groups/bow</url> - <snapshots> - <enabled>true</enabled> - <checksumPolicy>fail</checksumPolicy> - </snapshots> - <releases> - <enabled>false</enabled> - </releases> - </pluginRepository> - - </pluginRepositories> - - <dependencyManagement> - <dependencies> - - <!-- compile dependencies --> - - <dependency> - <groupId>org.nuiton</groupId> - <artifactId>nuiton-utils</artifactId> - <version>${nuitonUtilsVersion}</version> - </dependency> - - <dependency> - <groupId>org.nuiton</groupId> - <artifactId>nuiton-config</artifactId> - <version>${nuitonConfigVersion}</version> - </dependency> - - <dependency> - <groupId>org.nuiton.web</groupId> - <artifactId>nuiton-struts2</artifactId> - <version>${nuitonWebVersion}</version> - </dependency> - - <dependency> - <groupId>org.nuiton.i18n</groupId> - <artifactId>nuiton-i18n</artifactId> - <version>${nuitonI18nVersion}</version> - </dependency> - - <dependency> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-api</artifactId> - <version>${wikittyVersion}</version> - </dependency> - - <dependency> - <groupId>org.apache.struts</groupId> - <artifactId>struts2-core</artifactId> - <version>${struts2Version}</version> - </dependency> - - <dependency> - <groupId>org.apache.struts.xwork</groupId> - <artifactId>xwork-core</artifactId> - <version>${struts2Version}</version> - </dependency> - - <dependency> - <groupId>com.jgeppert.struts2.jquery</groupId> - <artifactId>struts2-jquery-plugin</artifactId> - <version>${struts2jqueryVersion}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>javassist</groupId> - <artifactId>javassist</artifactId> - <version>3.12.1.GA</version> - </dependency> - - <dependency> - <groupId>org.htmlparser</groupId> - <artifactId>htmlparser</artifactId> - <version>${htmlParserVersion}</version> - </dependency> - - <dependency> - <groupId>javax.mail</groupId> - <artifactId>mail</artifactId> - <version>${javaxMailVersion}</version> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>${servletApiVersion}</version> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jsp-api</artifactId> - <version>${jspApiVersion}</version> - </dependency> - - <dependency> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-jdbc</artifactId> - <version>${wikittyVersion}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>org.nuiton.wikitty</groupId> - <artifactId>wikitty-solr</artifactId> - <version>${wikittyVersion}</version> - </dependency> - - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>${slf4jVersion}</version> - </dependency> - - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>${slf4jVersion}</version> - </dependency> - - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - <version>${h2Version}</version> - </dependency> - - <dependency> - <groupId>org.apache.struts</groupId> - <artifactId>struts2-config-browser-plugin</artifactId> - <version>${struts2Version}</version> - </dependency> - - <dependency> - <groupId>org.apache.struts</groupId> - <artifactId>struts2-sitemesh-plugin</artifactId> - <version>${struts2Version}</version> - </dependency> - - <!-- base postgres --> - <dependency> - <groupId>org.postgresql</groupId> - <artifactId>postgresql</artifactId> - <version>9.2-1003-jdbc4</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jstl</artifactId> - <version>${jstlVersion}</version> - <scope>runtime</scope> - </dependency> - - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.17</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.11</version> - <scope>test</scope> - </dependency> - - - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>2.4</version> - </dependency> - - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - <version>3.3.2</version> - </dependency> - - <dependency> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - <version>1.2</version> - </dependency> - - <dependency> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - <version>3.2.1</version> - </dependency> - - <dependency> - <groupId>commons-codec</groupId> - <artifactId>commons-codec</artifactId> - <version>1.9</version> - </dependency> - - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpcore</artifactId> - <version>4.3</version> - </dependency> - - <!-- used to call screenshot service and to get suggestion from search engine --> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - <version>4.3</version> - </dependency> - - <!-- used to parse html and extract favicon url --> - <dependency> - <groupId>org.jsoup</groupId> - <artifactId>jsoup</artifactId> - <version>1.7.2</version> - </dependency> - - <dependency> - <groupId>com.github.rjeschke</groupId> - <artifactId>txtmark</artifactId> - <version>${txtmarkVersion}</version> - </dependency> - - </dependencies> - - </dependencyManagement> + <dependencies> + <!-- Server --> + <dependency> + <groupId>io.jooby</groupId> + <artifactId>jooby-netty</artifactId> + </dependency> + + <dependency> + <groupId>io.jooby</groupId> + <artifactId>jooby-jackson</artifactId> + </dependency> + + <dependency> + <groupId>io.jooby</groupId> + <artifactId>jooby-rocker</artifactId> + </dependency> + + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <version>1.18.8</version> + <scope>provided</scope> + </dependency> + + <!-- persistence --> + <dependency> + <groupId>io.jooby</groupId> + <artifactId>jooby-hikari</artifactId> + </dependency> + + <dependency> + <groupId>io.jooby</groupId> + <artifactId>jooby-flyway</artifactId> + </dependency> + + <dependency> + <groupId>org.nuiton</groupId> + <artifactId>spgeed</artifactId> + <version>1.0.10-SNAPSHOT</version> + </dependency> + + <!-- logging --> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </dependency> + + <!-- Tests --> + <dependency> + <groupId>io.jooby</groupId> + <artifactId>jooby-test</artifactId> + </dependency> + + <dependency> + <groupId>com.squareup.okhttp3</groupId> + <artifactId>okhttp</artifactId> + <version>4.0.1</version> + </dependency> + </dependencies> <build> - <resources> - <resource> - <directory>src/main/resources</directory> - <includes> - <include>**/*</include> - </includes> - <filtering>true</filtering> - </resource> - </resources> - <pluginManagement> - <plugins> - + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <compilerArgs> + <arg>-parameters</arg> + </compilerArgs> + </configuration> + </plugin> <plugin> - <artifactId>maven-site-plugin</artifactId> - <dependencies> - <dependency> - <groupId>org.nuiton.jrst</groupId> - <artifactId>doxia-module-jrst</artifactId> - <version>${jrstPluginVersion}</version> - </dependency> - </dependencies> + <groupId>com.fizzed</groupId> + <artifactId>rocker-maven-plugin</artifactId> + <version>1.2.1</version> + <configuration> + <templateDirectory>src/main/templates</templateDirectory> + </configuration> + <executions> + <execution> + <id>generate-rocker-templates</id> + <phase>generate-sources</phase> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> </plugin> - - <plugin> - <groupId>org.nuiton.eugene</groupId> - <artifactId>eugene-maven-plugin</artifactId> - <version>${eugenePluginVersion}</version> - </plugin> - - <plugin> - <groupId>org.nuiton.i18n</groupId> - <artifactId>i18n-maven-plugin</artifactId> - <version>${nuitonI18nVersion}</version> - </plugin> - - <plugin> - <groupId>com.google.code</groupId> - <artifactId>crx-maven-plugin</artifactId> - <version>${crxMavenPluginVersion}</version> - </plugin> - - </plugins> - </pluginManagement> + <!-- Build fat jar --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + </plugin> + <plugin> + <groupId>io.jooby</groupId> + <artifactId>jooby-maven-plugin</artifactId> + </plugin> + </plugins> </build> - <profiles> - - <profile> - <id>release-quality-profile</id> - <activation> - <property> - <name>performRelease</name> - <value>true</value> - </property> - </activation> - <properties> - <!-- We use some none central dependencies --> - <helper.skipCheckAutocontainer>true</helper.skipCheckAutocontainer> - </properties> - - </profile> - - </profiles> </project> diff --git a/src/etc/stork.yml b/src/etc/stork.yml new file mode 100644 index 0000000..f2f2790 --- /dev/null +++ b/src/etc/stork.yml @@ -0,0 +1,41 @@ +# Name of application (make sure it has no spaces) +name: "${project.artifactId}" + +# Display name of application (can have spaces) +display_name: "${project.name}" + +# Type of launcher (CONSOLE or DAEMON) +type: DAEMON + +# Java class to run +main_class: "${application.class}" + +domain: "${project.groupId}" + +short_description: "${project.artifactId}" + +# Platform launchers to generate (WINDOWS, LINUX, MAC_OSX) +# Linux launcher is suitable for Bourne shells (e.g. Linux/BSD) +platforms: [ LINUX ] + +# Working directory for app +# RETAIN will not change the working directory +# APP_HOME will change the working directory to the home of the app +# (where it was intalled) before running the main class +working_dir_mode: RETAIN + +# Minimum version of java required (system will be searched for acceptable jvm) +min_java_version: "1.8" + +# Min/max fixed memory (measured in MB) +min_java_memory: 512 +max_java_memory: 512 + +# Min/max memory by percentage of system +#min_java_memory_pct: 10 +#max_java_memory_pct: 20 + +# Try to create a symbolic link to java executable in <app_home>/run with +# the name of "<app_name>-java" so that commands like "ps" will make it +# easier to find your app +symlink_java: true diff --git a/src/main/java/com/chorem/bow/BowApp.java b/src/main/java/com/chorem/bow/BowApp.java new file mode 100644 index 0000000..6e7c2b3 --- /dev/null +++ b/src/main/java/com/chorem/bow/BowApp.java @@ -0,0 +1,43 @@ +package com.chorem.bow; + +import com.chorem.bow.rest.BookmarkResources; +import com.chorem.bow.rest.BowUserResources; +import com.chorem.spgeed.SpgeedModule; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.MapperFeature; +import io.jooby.Jooby; +import io.jooby.flyway.FlywayModule; +import io.jooby.hikari.HikariModule; +import io.jooby.json.JacksonModule; +import io.jooby.rocker.RockerModule; + +/** + * @author jooby generator + */ +public class BowApp extends Jooby { + + { + install(new JacksonModule(JacksonModule.create() + .enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES) + .setSerializationInclusion(JsonInclude.Include.NON_NULL) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY) + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES))); + + install(new HikariModule()); + install(new FlywayModule()); + install(new SpgeedModule()); + install(new RockerModule()); + + new BowUserResources().use("/users", this); + new BookmarkResources().use("/bookmarks", this); + + get("/", ctx -> views.index.template("Rocker")); + + } + + public static void main(final String[] args) { + runApp(args, BowApp::new); + } + +} diff --git a/src/main/java/com/chorem/bow/model/Action.java b/src/main/java/com/chorem/bow/model/Action.java new file mode 100644 index 0000000..fd1a445 --- /dev/null +++ b/src/main/java/com/chorem/bow/model/Action.java @@ -0,0 +1,7 @@ +package com.chorem.bow.model; + +public class Action { + String prefix; + String action; + String suggest; +} diff --git a/src/main/java/com/chorem/bow/model/AuthenticationInfo.java b/src/main/java/com/chorem/bow/model/AuthenticationInfo.java new file mode 100644 index 0000000..52dcbef --- /dev/null +++ b/src/main/java/com/chorem/bow/model/AuthenticationInfo.java @@ -0,0 +1,18 @@ +package com.chorem.bow.model; + +import lombok.Data; + +@Data +public class AuthenticationInfo { + String description; + String login; + /** le nombre de composant du domain a prendre (default 2, ex: codelutin.com) */ + byte domainComponent; + byte maxLength; + String allowedChar; + String disallowedChar; + /** chaine ajouter en prefix du master password avant le hash */ + String salt; + /** chaine ajouter en suffix du hash final genere (le password genere peut donc etre plus long que maxLength) */ + String suffix; +} diff --git a/src/main/java/com/chorem/bow/model/Bookmark.java b/src/main/java/com/chorem/bow/model/Bookmark.java new file mode 100644 index 0000000..8640550 --- /dev/null +++ b/src/main/java/com/chorem/bow/model/Bookmark.java @@ -0,0 +1,47 @@ +package com.chorem.bow.model; + +import lombok.Data; +import org.apache.commons.lang3.StringUtils; + +import java.util.Collections; +import java.util.Date; +import java.util.LinkedHashSet; +import java.util.UUID; + +@Data +public class Bookmark { + + UUID id = UUID.randomUUID(); + UUID owner; + String uri; + String description; + LinkedHashSet<String> tags; + Date creationDate; + Date updateDate; + Date importDate; + LinkedHashSet<String> privateAlias; + LinkedHashSet<String> publicAlias; + AuthenticationInfo authenticationInfo; + byte[] favicon; + byte[] screenshot; + int visit; + String lang = "english"; + + public void setTagsAsString(String tagString) { + String[] tagArray = StringUtils.split(tagString); + tags = new LinkedHashSet<>(); + Collections.addAll(tags, tagArray); + } + + public void setPrivateAliasAsString(String privateAliasString) { + String[] privateAliasArray = StringUtils.split(privateAliasString); + privateAlias = new LinkedHashSet<>(); + Collections.addAll(privateAlias, privateAliasArray); + } + + public void setPublicAliasAsString(String publicAliasString) { + String[] publicAliasArray = StringUtils.split(publicAliasString); + publicAlias = new LinkedHashSet<>(); + Collections.addAll(publicAlias, publicAliasArray); + } +} diff --git a/src/main/java/com/chorem/bow/model/BowUser.java b/src/main/java/com/chorem/bow/model/BowUser.java new file mode 100644 index 0000000..3ca969a --- /dev/null +++ b/src/main/java/com/chorem/bow/model/BowUser.java @@ -0,0 +1,27 @@ +package com.chorem.bow.model; + +import lombok.Data; + +import java.util.Date; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.UUID; + +@Data +public class BowUser { + UUID id = UUID.randomUUID(); + Date creationDate; + Date updateDate; + String login; + String password; + /** en cle le token, en valeur l'app qui l'utilise (pour quelle raison se token existe */ + Map<String, String> tokens; + LinkedHashSet<String> emails; + /* en cle l'email, en valeur une chaine random (uuid) qui permet la validation */ + Map<String, String> unconfirmedEmails; + AuthenticationInfo authenticationInfo; + boolean autoScreenshot; + boolean autoFavicon; + HashSet<Action> actions; +} diff --git a/src/main/java/com/chorem/bow/repositories/BookmarkRepository.java b/src/main/java/com/chorem/bow/repositories/BookmarkRepository.java new file mode 100644 index 0000000..f159218 --- /dev/null +++ b/src/main/java/com/chorem/bow/repositories/BookmarkRepository.java @@ -0,0 +1,48 @@ +package com.chorem.bow.repositories; + +import com.chorem.bow.model.AuthenticationInfo; +import com.chorem.bow.model.Bookmark; +import org.nuiton.spgeed.annotations.Select; +import org.nuiton.spgeed.annotations.Update; + +import java.util.List; +import java.util.UUID; + +public interface BookmarkRepository { + + @Update(sql = + "INSERT INTO bookmark AS t" + + " SELECT * FROM json_populate_record(NULL::bookmark, ${bookmark |json()}::json)" + + " RETURNING *") + Bookmark insert(Bookmark bookmark); + + @Update(sql = + "UPDATE INTO bookmark AS t" + + " SET (owner, uri, description, privateAlias, publicAlias, authenticationInfo, lang) = " + + " (SELECT * FROM json_populate_record(NULL::bookmark, ${bookmark |json()}::json))" + + " RETURNING *") + Bookmark update(Bookmark bookmark); + + @Update(sql = "UPDATE INTO bookmark AS t" + + " SET authenticationInfo = (SELECT * FROM json_populate_record(NULL::AuthenticationInfo, ${info |json()}::json))" + + " WHERE id=${id}" + + " RETURNING *") + Bookmark updateAuthenticationInfo(UUID id, AuthenticationInfo info); + + @Update(sql = "UPDATE INTO bookmark AS t" + + " SET visit = visit + 1" + + " WHERE id=${idOrAlias}::uuid OR privateAlias @> ARRAY[${idOrAlias}] OR publicAlias @> ARRAY[${idOrAlias}]" + + " RETURNING uri") + String visit(String idOrAlias); + + @Select(sql = "select * from bookmark") + List<Bookmark> findAll(); + + @Select(sql = "select * from bookmark where id=${uuid}::uuid") + Bookmark find(UUID uuid); + + @Select(sql = "select * from bookmark where tags && ${tags | array()}") + List<Bookmark> findAll(List<String> tags); + + +} diff --git a/src/main/java/com/chorem/bow/repositories/BowUserRepository.java b/src/main/java/com/chorem/bow/repositories/BowUserRepository.java new file mode 100644 index 0000000..4b63bc3 --- /dev/null +++ b/src/main/java/com/chorem/bow/repositories/BowUserRepository.java @@ -0,0 +1,62 @@ +package com.chorem.bow.repositories; + +import com.chorem.bow.model.AuthenticationInfo; +import com.chorem.bow.model.Bookmark; +import com.chorem.bow.model.BowUser; +import org.nuiton.spgeed.annotations.Select; +import org.nuiton.spgeed.annotations.Update; + +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +public interface BowUserRepository { + + @Update(sql = + "INSERT INTO bowUser AS t" + + " SELECT * FROM json_populate_record(NULL::bowUser, ${user |json()}::json)" + + " RETURNING *") + BowUser insert(BowUser user); + + @Update(sql = + "UPDATE INTO bowUser AS t" + + " SET (login, password, tokens, emails, unconfirmedEmails, authenticationInfo, autoScreenshot, autoFavicon, actions) = " + + " (SELECT * FROM json_populate_record(NULL::bowUser, ${user |json()}::json))" + + " RETURNING *") + BowUser update(BowUser user); + + @Update(sql = "UPDATE INTO bowUser AS t" + + " SET authenticationInfo = (SELECT * FROM json_populate_record(NULL::AuthenticationInfo, ${info |json()}::json))" + + " WHERE id=${id}" + + " RETURNING *") + BowUser updateAuthenticationInfo(UUID id, AuthenticationInfo info); + + @Update(sql = "UPDATE INTO bowUser AS t" + + " SET emails = ${info |array()}" + + " WHERE id=${id}" + + " RETURNING *") + BowUser updateEmails(UUID id, Collection emails); + + @Update(sql = "UPDATE INTO bowUser AS t" + + " SET privateAlias = ${alias |array()}" + + " WHERE id=${id}" + + " RETURNING *") + BowUser updatePrivateAlias(UUID id, Collection alias); + + @Update(sql = "UPDATE INTO bowUser AS t" + + " SET publicAlias = ${alias |array()}" + + " WHERE id=${id}" + + " RETURNING *") + BowUser updatePublicAlias(UUID id, Collection alias); + + @Select(sql = "select * from bowUser") + List<BowUser> findAll(); + + @Select(sql = "select * from bowUser where id=${uuid}::uuid") + BowUser find(UUID uuid); + + @Select(sql = "select * from bowUser where login=${loginOrEmail} or email ? ${loginOrEmail}") + BowUser find(String loginOrEmail); + +} diff --git a/src/main/java/com/chorem/bow/rest/BookmarkResources.java b/src/main/java/com/chorem/bow/rest/BookmarkResources.java new file mode 100644 index 0000000..24b023a --- /dev/null +++ b/src/main/java/com/chorem/bow/rest/BookmarkResources.java @@ -0,0 +1,33 @@ +package com.chorem.bow.rest; + +import com.chorem.bow.repositories.BookmarkRepository; +import io.jooby.Jooby; +import org.nuiton.spgeed.SqlSession; + +import java.util.UUID; + +public class BookmarkResources { //extends Jooby { + + { +// use("/", this); + } + + public void use(String path, Jooby app){ + app.path(path, () -> { + app.get("/", ctx -> { + try (SqlSession session = app.require(SqlSession.class)) { + BookmarkRepository repo = session.getDao(BookmarkRepository.class); + return repo.findAll(); + } + }); + + app.get("/{id}", ctx -> { + String uuid = ctx.path("id").value(); + try (SqlSession session = app.require(SqlSession.class)) { + BookmarkRepository repo = session.getDao(BookmarkRepository.class); + return repo.find(UUID.fromString(uuid)); + } + }); + }); + } +} diff --git a/src/main/java/com/chorem/bow/rest/BowUserResources.java b/src/main/java/com/chorem/bow/rest/BowUserResources.java new file mode 100644 index 0000000..c8ea1d7 --- /dev/null +++ b/src/main/java/com/chorem/bow/rest/BowUserResources.java @@ -0,0 +1,62 @@ +package com.chorem.bow.rest; + +import com.chorem.bow.model.BowUser; +import com.chorem.bow.repositories.BowUserRepository; +import io.jooby.Jooby; +import org.nuiton.spgeed.SqlSession; + +import java.util.Set; +import java.util.UUID; + +public class BowUserResources { //extends Jooby { + + { +// use("/", this); + } + + public void use(String path, Jooby app){ + app.path(path, () -> { + app.get("/", ctx -> { + try (SqlSession session = app.require(SqlSession.class)) { + BowUserRepository repo = session.getDao(BowUserRepository.class); + return repo.findAll(); + } + }); + + app.get("/{id}", ctx -> { + UUID id = ctx.path("id").to(UUID.class); + try (SqlSession session = app.require(SqlSession.class)) { + BowUserRepository repo = session.getDao(BowUserRepository.class); + return repo.find(id); + } + }); + + app.post("/", ctx -> { + BowUser user = ctx.body(BowUser.class); + app.getLog().info("insert user: " + user); + try (SqlSession session = app.require(SqlSession.class)) { + BowUserRepository repo = session.getDao(BowUserRepository.class); + return repo.insert(user); + } + }); + + app.put("/{id}", ctx -> { + BowUser user = ctx.body(BowUser.class); + try (SqlSession session = app.require(SqlSession.class)) { + BowUserRepository repo = session.getDao(BowUserRepository.class); + return repo.update(user); + } + }); + + app.put("/{id}/emails", ctx -> { + UUID id = ctx.path("id").to(UUID.class); + Set emails = ctx.body(Set.class); + try (SqlSession session = app.require(SqlSession.class)) { + BowUserRepository repo = session.getDao(BowUserRepository.class); + return repo.updateEmails(id, emails); + } + }); + + }); + } +} diff --git a/src/main/java/com/chorem/spgeed/SpgeedModule.java b/src/main/java/com/chorem/spgeed/SpgeedModule.java new file mode 100644 index 0000000..4e5eae9 --- /dev/null +++ b/src/main/java/com/chorem/spgeed/SpgeedModule.java @@ -0,0 +1,60 @@ +package com.chorem.spgeed; + +import io.jooby.Extension; +import io.jooby.Jooby; +import io.jooby.ServiceKey; +import io.jooby.ServiceRegistry; +import org.nuiton.spgeed.SqlSession; + +import javax.annotation.Nonnull; +import javax.inject.Provider; +import javax.sql.DataSource; + +public class SpgeedModule implements Extension { + + private String name; + + /** + * Creates a new SpgeedModule module using the <code>db</code> property key. This key must be + * present in the application configuration file, like: + * + * <pre>{@code + * db.url = "jdbc:url" + * db.user = dbuser + * db.password = dbpass + * }</pre> + */ + public SpgeedModule() { + this("db"); + } + + /** + * Creates a new SpgeedModule module. + * + * @param name The name/key of the data source to attach. + */ + public SpgeedModule(@Nonnull String name) { + this.name = name; + } + + @Override + public void install(@Nonnull Jooby application) throws Exception { + ServiceRegistry registry = application.getServices(); + + DataSource datasource = findDataSource(registry); + + Provider<SqlSession> provider = new SqlSessionProvider(datasource); + + registry.putIfAbsent(ServiceKey.key(SqlSession.class), provider); + registry.put(ServiceKey.key(SqlSession.class, name), provider); + } + + private DataSource findDataSource(@Nonnull ServiceRegistry registry) { + DataSource dataSource = registry.getOrNull(ServiceKey.key(DataSource.class, name)); + if (dataSource == null) { + // TODO: replace with usage exception + dataSource = registry.require(DataSource.class); + } + return dataSource; + } +} diff --git a/src/main/java/com/chorem/spgeed/SqlSessionProvider.java b/src/main/java/com/chorem/spgeed/SqlSessionProvider.java new file mode 100644 index 0000000..29430a7 --- /dev/null +++ b/src/main/java/com/chorem/spgeed/SqlSessionProvider.java @@ -0,0 +1,19 @@ +package com.chorem.spgeed; + +import org.nuiton.spgeed.SqlSession; + +import javax.inject.Provider; +import javax.sql.DataSource; + +public class SqlSessionProvider implements Provider<SqlSession> { +private DataSource datasource; + + public SqlSessionProvider(DataSource datasource) { + this.datasource = datasource; + } + + @Override public SqlSession get() { + SqlSession result = new SqlSession(datasource); + return result; + } +} diff --git a/src/main/resources/db/migration/V1__init_schema.sql b/src/main/resources/db/migration/V1__init_schema.sql new file mode 100644 index 0000000..ddf22f1 --- /dev/null +++ b/src/main/resources/db/migration/V1__init_schema.sql @@ -0,0 +1,127 @@ +-- ATTENTION: +-- * il faut que bowUser.emails soit unique sur tous les utilisateurs +-- * il faut que bookmark.publicAlias soit unique sur tous les utilisateurs + +CREATE EXTENSION IF NOT EXISTS "pgcrypto"; +CREATE EXTENSION IF NOT EXISTS "pg_trgm"; +CREATE EXTENSION IF NOT EXISTS "citext"; +-- CREATE EXTENSION IF NOT EXISTS "btree_gist"; + +-- fonction a utilise pour les recherches dans les tableaux de text (ex: where text(tags) ilike '%adm%') +CREATE OR REPLACE FUNCTION text(citext[]) + returns text language sql immutable as + $$ select $1::text $$; + +create type AuthenticationInfo as ( + description text, + login text, + domainComponent smallint, -- le nombre de composant du domain a prendre (default 2, ex: codelutin.com) + maxLength smallint, + allowedChar text, + disallowedChar text, + salt text, -- chaine ajouter en prefix du master password avant le hash + suffix text -- chaine ajouter en suffix du hash final genere (le password genere peut donc etre plus long que maxLength) +); + +create type Action as ( + prefix TEXT, + action Text, + suggest Text +); + +create table bowUser ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + creationDate timestamp DEFAULT current_timestamp, + updateDate timestamp DEFAULT current_timestamp, + login Text, + password Text, + tokens jsonb, -- en cle le token, en valeur l'app qui l'utilise + emails TEXT[], + unconfirmedEmails jsonb, -- en cle l'email, en valeur l'uuid qui permet la validation + authenticationInfo AuthenticationInfo, + autoScreenshot boolean, + autoFavicon boolean, + actions Action[] +-- ,EXCLUDE USING gist (emails WITH &&, unconfirmedEmails WITH &&) +); + +CREATE UNIQUE INDEX bowUser_login_idx ON BowUser (login); +CREATE INDEX bowUser_token_idx ON BowUser USING gin (tokens); +CREATE INDEX bowUser_emails_idx ON BowUser USING gin (emails); +CREATE INDEX bowUser_unconfirmedEmails_idx ON BowUser USING gin (unconfirmedEmails); + +create table bookmark ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + owner UUID REFERENCES bowUser(id) ON DELETE CASCADE ON UPDATE CASCADE, + uri TEXT, + description TEXT, + tags citext[], + creationDate TIMESTAMP, + updateDate timestamp DEFAULT current_timestamp, + importDate TIMESTAMP, + privateAlias TEXT[], + publicAlias TEXT[], + authenticationInfo AuthenticationInfo, + favicon BYTEA, + screenshot BYTEA, + visit INTEGER, + lang regconfig NOT NULL DEFAULT 'english'::regconfig +); + +CREATE INDEX bookmark_owner_idx ON bookmark(owner); +CREATE INDEX bookmark_tags_idx ON bookmark USING gin (tags); -- index pour la recherche exact +CREATE INDEX bookmark_tags_like_idx ON bookmark USING gin (text(tags) gin_trgm_ops); -- index pour la recherche via ilike "%toto%" +CREATE INDEX bookmark_description_idx ON bookmark USING GIN (to_tsvector(lang, description)); +CREATE INDEX bookmark_privateAlias_idx ON bookmark USING gin (privateAlias); +CREATE INDEX bookmark_publicAlias_idx ON bookmark USING gin (publicAlias); + +-- penser au nettoyage de cette table, si plus aucun bookmark ne reference cette uri +create table pageHistory ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + uri TEXT, + creationDate TIMESTAMP, + content TEXT, + lang regconfig NOT NULL DEFAULT 'english'::regconfig +); + +CREATE INDEX pageHistory_uri_creationDate_idx ON pageHistory(uri, creationDate); +CREATE INDEX pageHistory_content_idx ON pageHistory USING GIN (to_tsvector(lang, content)); + +create table actionHistory ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + owner UUID REFERENCES bowUser(id) ON DELETE CASCADE ON UPDATE CASCADE, + creationDate TIMESTAMP, + Action action, + request TEXT, + lang regconfig NOT NULL DEFAULT 'english'::regconfig +); + +CREATE INDEX actionHistory_owner_idx ON actionHistory(owner); +CREATE INDEX actionHistory_request_idx ON actionHistory USING GIN (to_tsvector(lang, request)); +CREATE INDEX actionHistory_action_idx ON actionHistory (((action).action)); + + +-- Mise a jour automatique de la date de derniere modification +CREATE OR REPLACE FUNCTION update_creationDate_column() +RETURNS TRIGGER AS $$ +BEGIN + NEW.creationDate = now(); + RETURN NEW; +END; +$$ language 'plpgsql'; + +CREATE OR REPLACE FUNCTION update_updateDate_column() +RETURNS TRIGGER AS $$ +BEGIN + NEW.updateDate = now(); + RETURN NEW; +END; +$$ language 'plpgsql'; + +CREATE TRIGGER update_BowUser_createDate BEFORE INSERT ON BowUser FOR EACH ROW EXECUTE PROCEDURE update_creationDate_column(); +CREATE TRIGGER update_Bookmark_createDate BEFORE INSERT ON Bookmark FOR EACH ROW EXECUTE PROCEDURE update_creationDate_column(); +CREATE TRIGGER update_PageHistory_createDate BEFORE INSERT ON pageHistory FOR EACH ROW EXECUTE PROCEDURE update_creationDate_column(); +CREATE TRIGGER update_ActionHistory_createDate BEFORE INSERT ON actionHistory FOR EACH ROW EXECUTE PROCEDURE update_creationDate_column(); + +CREATE TRIGGER update_BowUser_updateDate BEFORE INSERT OR UPDATE ON BowUser FOR EACH ROW EXECUTE PROCEDURE update_updateDate_column(); +CREATE TRIGGER update_Bookmark_updateDate BEFORE INSERT OR UPDATE ON Bookmark FOR EACH ROW EXECUTE PROCEDURE update_updateDate_column(); diff --git a/src/main/templates/views/index.rocker.html b/src/main/templates/views/index.rocker.html new file mode 100644 index 0000000..279db61 --- /dev/null +++ b/src/main/templates/views/index.rocker.html @@ -0,0 +1,3 @@ +@args (String message) + +<p>Hello @message!</p> diff --git a/src/site/resources/images/camera.png b/src/site/resources/images/camera.png deleted file mode 100644 index 89a450a..0000000 Binary files a/src/site/resources/images/camera.png and /dev/null differ diff --git a/src/site/resources/images/croix.jpg b/src/site/resources/images/croix.jpg deleted file mode 100755 index 1435b3a..0000000 Binary files a/src/site/resources/images/croix.jpg and /dev/null differ diff --git a/src/site/resources/images/edit.jpg b/src/site/resources/images/edit.jpg deleted file mode 100755 index 73ca469..0000000 Binary files a/src/site/resources/images/edit.jpg and /dev/null differ diff --git a/src/site/rst/developper/bow-model.rst b/src/site/rst/developper/bow-model.rst deleted file mode 100644 index 1465f19..0000000 --- a/src/site/rst/developper/bow-model.rst +++ /dev/null @@ -1,59 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 - 2011 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - - -================================ -Explication du modèle de données -================================ - -BowUser -======= - -BowUser depend de WikittyUser et ajoute le permanentToken de l'utilisateur. -Le permanentToken sert à authentifier l'utilisateur sans sont login/password. -Cela est utile pour la bookmarklet qui permet d'ajouter des entrées. - -BowPreference -============= -BowPreference depend BowUser et sert à conserver toutes les préférences -utilisateurs - -BowBookmark -=========== - -BowBookmark est une entrée à conserver, elle contient l'URL, la description, -la date d'ajout, le nombre de click, et les alias public et privé. -BowBookmark depend de WikittyLabel pour pouvoir ajouter des labels sur les -BowBookmark. - -BowImport -========= - -BowImport est une extension que l'on ajoute a un BowBookmark pour montrer que -ce bookmark à été importé, on peut retrouver tous les bookmarks importer en -meme temps en recherchant ceux qui ont la meme date. - -WikittyAuthorisation -==================== - -On utilise WikittyAuthorisation pour partager les BowBookmarks. S'il ont veut -partager avec quelqu'un un BowBookmark, on ajoute a ce bookmark l'extension -WikittyAuthorisation et on mes l'id du user dans reader ou writer si l'on veut -que l'utilisateur puisse seulement utiliser le lien ou aussi le modifier. diff --git a/src/site/rst/developper/installation.rst b/src/site/rst/developper/installation.rst deleted file mode 100644 index 13363e0..0000000 --- a/src/site/rst/developper/installation.rst +++ /dev/null @@ -1,31 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - - -============ -Installation -============ - -Si vous souhaitez installer bow il vous suffit : - -- de télécharger le war à cette adresse : http://maven.chorem.org/release/org/chorem/bow -- de déployer ce war dans un conteneur d'aplpication (par example Tomcat). - -Le dépot des sources est à cette adresse : http://svn.chorem.org/svn/bow/ diff --git a/src/site/rst/developper/presentation.rst b/src/site/rst/developper/presentation.rst deleted file mode 100644 index 88f1b16..0000000 --- a/src/site/rst/developper/presentation.rst +++ /dev/null @@ -1,29 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - - -============ -Presentation -============ - -Bow est une application J2EE. Le modèle de bow utilise wikitty. Wikitty est un -projet CodeLutin qui est un système de stockage et de recherche de type clé/valeur. - -Vous trouverez de plus amples informations à cette adresse : http://maven-site.nuiton.org/wikitty . diff --git a/src/site/rst/index.rst b/src/site/rst/index.rst deleted file mode 100644 index 785db56..0000000 --- a/src/site/rst/index.rst +++ /dev/null @@ -1,71 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - - -Bow -=== - -Quoi qu'est-ce ? ----------------- - -Bow (Bookmark On the Web) est une application web permettant la gestion de ses -marque-pages (bookmarks) développée en Java. - -Et ça fait quoi ? ------------------ - -Bow vous permettra de consulter vos marque-pages où que vous soyez -et de n'importe quel ordinateur pourvu d'une connexion Internet. Vous pourrez -en ajouter de nouveaux, les modifier ou les supprimer. - -Classification -~~~~~~~~~~~~~~ - -La classification n'est pas effectuée, comme sur la plupart -des logiciels assurant les mêmes fonctions, sur un principe de dossiers, mais -sur un principe de tags. Ces tags permettent d'assurer une navigation dans les -marques-pages quelque soit le point d'entrée. Alors que sur une classification -par dossiers, un seul point d'entrée est possible. - -Recherche -~~~~~~~~~ - -Le principe des tags permet une recherche en entonnoir, ou recherche par -facettes, souvent observée sur les sites marchands, pour affiner la recherche. - -Recherche OpenSearch -~~~~~~~~~~~~~~~~~~~~ - -De plus en plus, les écrans se miniaturisent (netbooks, tablettes, ...). Aussi, -l'équipe a décidé de ne pas proposer de "barre d'outils" à rajouter à son -navigateur (ça prend de la place)mais plutot d'utiliser le principe -d'OpenSearch, permettant ainsi -d'utiliser la zone de recherche rapide de son navigateur. Comme tout le Web ne -peux être marqué dans Bow, il y a toujours besoin d'utiliser un moteur de -recherche. Et pour éviter de changer toutes les 2 secondes de moteur de -recherche dans la barre de recherche, vous pouvez déclarer un moteur de -recherche comme Seeks ou Google vers qui les recherches peuvent être redirigées. - -Ajout rapide de marque-pages -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Comme on n'a pas forcément envie de s'identifier dans Bow pour rajouter un -marque-page, il est possible de marquer un lien dans son navigateur, ou pour ceux qui utilisent Chromium, d'installe une extension, qui ajoute -la page consultée dans Bow avec les tags définis. diff --git a/src/site/rst/todo.rst b/src/site/rst/todo.rst deleted file mode 100644 index b115253..0000000 --- a/src/site/rst/todo.rst +++ /dev/null @@ -1,44 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - - -Project BOW -=========== - -**Authentification page** - -actions: -==> Authentification -==> Registration - -**Search page** - -actions: -==> Search bar -==> Add URL bar -==> Get permanant token -==> Get temporary token -==> Tags cloud - -**Result page** - -actions: -==> The same as before -==> The result diff --git a/src/site/rst/user/addBookmark.rst b/src/site/rst/user/addBookmark.rst deleted file mode 100644 index 89208a2..0000000 --- a/src/site/rst/user/addBookmark.rst +++ /dev/null @@ -1,70 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - - -===================== -Ajout de marque-pages -===================== - -Il est possible d'ajouter des marque-pages de deux façons : - -Formulaire d'ajout/modification -------------------------------- - -Le formulaire d'ajout/modification de marque-page vous permet d'ajouter -simplement un marque-page. - -Marque-page dans votre navigateur ---------------------------------- - -Il est possible de marquer les deux liens d'ajout présent sous le lien -"Preferences". - -Le lien "Bookmark add link (session)" se limite à la session (tant que vous êtes -identifiés sur le site). C'est le plus adapté aux situations de mobilité -(ordinateur d'un ami, ordinateur public, cyber-café,...) - -Le lien "Bookmark add link (permanent) est tout le temps valide. C'est le plus -adapté pour votre ordianteur personnel. - -Pour les faire fonctionner, il suffit de les ajouter comme marque page du -navigateur. Lorsque vous souhaitez enregistrer une page dans Bow, cliquez sur -votre marque-page, une fenêtre apparaît. Cette fenêtre comprend un seul unique -champ qui va vous permettre d'enregistrer votre marque-page. Il faut rentrer -les informations de la manière suivante :: - - Nom du marque-page|tag1 tag2 tag3 - -Une fois que vous avez validé, le marque-page est enregistré. - -Extension Chromium ------------------- - -Pour les utilisateurs de Chromium, il est possible d'installer une extension dans votre navigateur. Cette extension est disponible dans le menu de droite. - -Il suffit ensuite de remplir dans les options, soit le token de session (qui n'est valide que tant que vous êtes identifiés sur le site) ou le token permanent. - -Pour ajouter une page dans vos marques-page Bow, cliquez sur l'icone de Bow dans la barre d'adresse de votre navigateur à droite. Remplissez les champs dans la popup : - -- le titre que vous voulez donner au marque-page -- l'alias que vous voulez associer au marque-page -- les tags que vous voulez associer au marque-page - -Pour enregistrer le marque-page, validez le formulaire en cliquant sur le bouton correspondant au token que vous souhaitez utiliser (permanent ou de session). diff --git a/src/site/rst/user/alias.rst b/src/site/rst/user/alias.rst deleted file mode 100644 index 95b1f07..0000000 --- a/src/site/rst/user/alias.rst +++ /dev/null @@ -1,40 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - - -============================================== -Utilisation des alias / Service d'URLS courtes -============================================== - -Il est possible d'associer un alias à un marque-page et d'utiliser l'adresse -de l'alias plutôt que celle d'origine. L'adresses de l'alias est de cette forme: - -nomDuServeur/**alias**/nomAlias - -Cela peut-être utile si vous avez une adresse très longue, l'alias permettra -d'avoir un lien plus court et donc plus lisible. - -- Exemple: - -Nom du serveur: http://demo.chorem.org/bow/ - -Alias: monAlias - -Resultat: http://demo.chorem.org/bow/alias/monAlias diff --git a/src/site/rst/user/getStarted.rst b/src/site/rst/user/getStarted.rst deleted file mode 100644 index e352f33..0000000 --- a/src/site/rst/user/getStarted.rst +++ /dev/null @@ -1,178 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 - 2015 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - -=== -Bow -=== - -Bow est un outil puissant de gestion de marque-pages visant à faciliter la navigation sur la toile et parmis vos ressources. - -Bow offre une gestion de marque-page par tags et par alias. Au quotidien, il en résulte un gain de temps et d'efficacité incomparable dans la recherche d'information : vos ressources deviennent requêtables et facilement accessibles par le biais d'alias et de raccourcis qui vous correspondent. - -Bow s'appuie sur des raccourcis configurables que vous pouvez utiliser directement dans la barre d'addresse de votre navigateur. Bow offre également une extension chrome, interface graphique simple d'accès et de prise en main, pour ceux qui le souhaite permettant la création de marque-page en un clic. - -Au cours des prochains paragraphes, nous allons mettre en évidence les différentes fonctionnalités de Bow puis vous montrer comment les configurer et les prendre en main. - -Creation d'un compte -==================== - -La première étape consiste à s'enregistrer sur une instance bow. - -Par exemple, ouvrir http://bow.chorem.org dans votre navigateur préféré. Une page de connexion s'affiche. Cliquer sur enregistrer et suivre les indications. - - -Première utilisation -==================== - -Se connecter à une instance bow avec votre identifiant/mot de passe (ex.: bow.chorem.org) ------------------------------------------------------------------------------------------ - -La page d'accueil de bow s'affiche. Elle laisse apparaitre trois sections : - - * une zone de recherche, - * une zone de liste, - * une zone d'actions et d'information transverses. - -A suivre, vous trouverez une description succinte des différentes zones. - -La zone de recherche -~~~~~~~~~~~~~~~~~~~~ - -Cette zone offre la possibilité d'effectuer des recherches parmis vos marques-pages. - -:: - - Dans bow, en plus d'être attachés à une url, les marque-pages peuvent être associés à une description, à un alias mais aussi à des tags personnalisés. - -Les différentes zones de recherche proposées ici offre la possibilité de retrouver vos marques-parges en vous appuyant sur ces caractéristiques. -Pour obtenir des informations détaillées sur la manière d'utiliser ces champs de recherche, consultez la page `Recherche de marque-pages`_. - -.. _`Recherche de marque-pages`: search.html - -En plus des champs de recherche de marque-pages, vous noterez qu'un champ de recherche "web" est disponible. Celui-ci vous offre la possibilité d'effectuer une recherche internet en passant par le moteur de recherche que vous aurez configuré dans les paramètres de configuration de votre compte. Nous aborderons ce thème un peu plus tard. - -La zone de liste de vos marque-pages -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Vous retrouvez ici l'ensemble de vos marque-pages. Chaque entrée de la liste rappelle : - - * le nom du marque page - * l'url à laquelle il est associé - * la description que vous avez saisie - * les tags que vous avez associé au marque-page - * le nombre de fois que vous avez consulté le marque-page - -La barre d'info en début de liste, vous indique : - - * le nombre de marque-pages affichés à l'écran / le nombre de marque-pages que vous possédez - * selon quelle modalité la liste de vos marque-pages est actuellement triée : par nom, par date, par nombre de consultations. - -:: - - Vous pouvez en effet choisir de trier vos marque-pages par la fréquence de leur utilisation ! - Pour changer, la modalité de tri, il vous suffit de sélectionner une autre option dans la liste déroulante puis de cliquer sur "Rechercher" - -Pour chacun des marque-pages, la barre de titre, vous indique : - - * le site lié au marque-page via le favicon si vous avez requis un screenshot du site (cf paragraphe suivant) - * la date de création du marque-page - * le ou les raccourcis associés au marque-page, permettant d'accéder rapidement à la page marquée en saisissant ce raccourci dans votre barre d'url. - -:: - - Pour chaque marque-page, bow vous offre la possibilité de définir un alias publique et un alias privé. - - Si vous saisissez un alias privé, vous serez le seul à pouvoir l'utiliser. Si vous saisissez un alias public, l'ensemble des utilisateurs de bow y auront accès ! - -La barre de titre vous vous permet également d'effectuer plusieurs actions sur le marque-page : - - * obtenir un screenshot de la page vers laquelle pointe le marque-page. Pour cela, il suffit de cliquer sur l'icone |camera| - * modifier les informations du marque-page en cliquant sur l'icône |editer| - * supprimer le marque-page en cliquant sur l'icône |supprimer| - -.. |camera| image:: ../images/camera.png -.. |editer| image:: ../images/edit.jpg -.. |supprimer| image:: ../images/croix.jpg - -La zone d'actions et d'information transverses -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Cette zone vous propose des informations statistiques relatives à vos marque-pages avec un nuage de tags configurable via vos préférences. Elle vous donne également accès à quelques liens : - - * gérer les préférences de votre compte - * ajouter manuellement un marque-page à votre liste. Consulter la page `Ajout de marque-pages`_ pour obtenir plus d'information concernant l'ajout de marque-page via le formulaire de saisi. Veuillez noter cependant qu'il existe des alternatives plus directes pour enregistrer un marque-page, notamment par l'utilisation de raccourcis ou par le biais de l'extension chrome. Nous y reviendrons plus tard. - -.. _`Ajout de marque-pages`: addBookmark.html - -Configurer ses raccourcis et son moteur de recherche ----------------------------------------------------- - -Sur la page d'acuueil, sélectionner le lien "Préférences" afin d'ouvrir la page des paramètres de votre compte. Cette page comporte trois sections. - -Préférences -~~~~~~~~~~~ - -Cette première section vous permet d'obtenir les informations particulières liées à votre compte et de les paramétrer. Elle comporte plusieurs blocs : - -**1. Les liens vous permettant d'intégrer bow de manière transparente à votre navigateur** - -Ces liens s'appuient sur les jetons permettant à bow de vous identifier. - -:: - - Bow met à disposition des liens valides le temps d'une session et d'autres liens valides de manière permanente (il vous est toutefois toujours possible d'invalider un lien permanent en regénérant votre jeton permanent). - -**A quoi servent vraiment ces liens temporaires et permanent ?** - -Ces différents liens vous offrent de la souplesse dans l'utilisation de Bow au quotidien. En situation de mobilité, sur une machine tiers, l'utilisation du jeton de session, vous permettra d'avoir acces à vos marques-pages et raccourcis le temps d'une session. -Lorsque la session a expiré, le jeton de session Bow n'est plus valide et un autre utilisateur qui viendrait à utiliser cette machine tiers n'aura pas acces à vos données Bow. - - -Vous l'aurez donc compris, vous avez tout intérêt à utiliser le jeton permanent sur votre machine personnelle sous peine de devoir revalider le jeton de session à chaque fois que la session expire. - -**bow.temporary.link.search et bow.permanent.link.search** - -Ce sont les liens dit réciproquement "de session" et "permanent" vous permettant d'ajouter bow comme moteur de recherche dans votre navigateur préféré. Ces liens sont construits sur les jetons du même nom présentés précédemment. - -Bow peut en effet jouer un role de "proxy" : lorsque vous l'utilisez comme moteur de recherche, celui-ci analyse les requêtes que vous lui soumettez, vous redirigeant le cas échéant automatiquement vers l'un de vos marque-page. Si la requête saisie ne le concerne pas, il l'a délivre au moteur par défaut que vous aurez configuré (cf paragraphe Configuration des raccourcis). - -:: - - Sous Chrome : - 1. Ouvrir la page de paramètres, - 2. Cliquer sur "Gérer les moteurs de recherche...". - 3. Tout en bas de la popup, remplir les champs pour ajouter un nouveau moteur de recherche : dans le champ url, copier-coller l'adresse de l'un des liens de recherche bow ci-dessus (temporaire si vous souhaitez que le moteur ne soit utilisable que le temps de la session, permanent sinon) - -**bow.temporary.link.suggestion et bow.permanent.link.suggestion** - -Ce sont des liens vous permettant d'intégrer Bow -comme moteur de suggestion dans votre navigateur. - -**Ajouter un bookmark (session) et Ajouter un bookmark (permanent)** - -Comme indiqué ici_, il est recommandé de créer un marque page pour chacun de ces liens. Ceux-ci vous offre un raccourci permettant d'ajouter rapidement un marque-page vers la page internet sur laquelle vous vous trouvez. -Là encore, le lien de temporaire n'est valide que le temps de la session. - -.. _ici: addBookmark.html - -**2. Affichage et raccourcis** - -Utiliser Bow ------------- diff --git a/src/site/rst/user/importExport.rst b/src/site/rst/user/importExport.rst deleted file mode 100644 index df95c47..0000000 --- a/src/site/rst/user/importExport.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - - -============= -Import/Export -============= - -Import -====== - -Vous pouvez importer les marque-pages présents sur votre navigateur favori. Pour -pouvoir les importer dans Bow, vous devez au préalable les exporter, depuis -votre navigateur, au format **HTML**. - -Pour importer votre fichier de marque-pages, sélectionnez votre fichier dans -la section "Import Bookmarks" avec le bouton "Parcourir..." puis validez avec -"Import". - -A noter que vos marques-pages auront pour tags les différents dossiers dans -lesquels ils ont été placés dans votre navigateur. - -Export -====== - -Pour exporter vos marque-pages, cliquez sur "Export bookmarks" sous la section -d'import. Votre fichier d'exporter sera au format HTML afin de pouvoir le -réimporter dans un navigateur. diff --git a/src/site/rst/user/openSearch.rst b/src/site/rst/user/openSearch.rst deleted file mode 100644 index e0a6c3f..0000000 --- a/src/site/rst/user/openSearch.rst +++ /dev/null @@ -1,114 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - - -==================================== -OpenSearch/Barre de recherche rapide -==================================== - -Moteur de recherche de Bow -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Il est possible d'utiliser le moteur de recherche de Bow dans la barre de -recherche rapide du navigateur. Pour pouvoir l'ajouter il faut se connecter à -Bow, puis choisir soit le moteur de recherche permanent ou temporaire. -Le temporaire ne dure que le temps d'expiration de la session. Une fois ajouté -vous pouvez l'utiliser à n'importe quel moment. - -Recherche dans les tags ------------------------ - -En préfixant votre recherche par ':' ou 't:', vous rechercherez dans vos tags. -Par exemple, si je veux rechercher les marque-pages taggués avec le mot gwt, -je recherche alors :: - - :gwt - -ou :: - - t:gwt - -Recherche dans les alias - Redirection --------------------------------------- - -En préfixant la recherche par 'a:', vous effectuerez une redirection vers la -page ayant cet alias. Par exemple, si vous avez une page avec l'alias 'toto'. Si -vous recherchez:: - - a:toto - -Vous ouvrirez la page dont l'alias est 'toto'. - -Recherche full-text -------------------- - -En préfixant la recherche par 'f:', vous effectuerez une recherche sur le -contenu complet des marque-pages. Par exemple, si vous recherchez:: - - f:gwt - -Vous trouverez tous les marque-pages taggués gwt ainsi que tous ceux qui -contiennent le mot gwt dans leur nom, description,... - -Moteur de recherche externe -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Vous pouvez aussi effectuer une recherche en utilisant un moteur de recherche -externe. Cela vous permet de ne pas changer toutes les 2s de moteur de recherche -dans votre barre de recherche rapide. - -Choisir son moteur de recherche externe ---------------------------------------- - -Vous pouvez choisir votre moteur de recherche externe dans les préférences de -l'application. - -Renseignez les champs **Search Engine URL Suggestions** et **Search Engine URL -Results**. - -Search Engine URL Suggestions correspond à l'URL retournant les propositions de -recherche. Vous savez, quand vous tappez wiki on vous propose Wikipedia,... - -Search Engine URL Results correspond à l'URL retournant les résultats. - -Pour que tout cela fonctionne bien, il faut dire ou placer les termes de la -recherche, pour cela utiliser **{searchTerms}**. Bow le remplacera par vos -termes de recherche. - -Effectuer une recherche avec le moteur externe ----------------------------------------------- - -Pour cela tappez juste votre recherche dans votre barre de recherche. Par -exemple, si je recherche:: - - bow - -Cela recherchera bow dans mon moteur de recherche préféré. - -Pour Chromium -------------- - -Il faut renseigner un moteur de recherche qui a pour URL:: - - http://{url de l'instance}/openSearchResult.action?token={token permanent}&q=%s - -Ex pour l'instance http://bow.chorem.org/bow:: - - http://bow.chorem.org/bow/openSearchResult.action?token={token permanent}&q=%s diff --git a/src/site/rst/user/preferences.rst b/src/site/rst/user/preferences.rst deleted file mode 100644 index 940764a..0000000 --- a/src/site/rst/user/preferences.rst +++ /dev/null @@ -1,36 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - - -=========== -Préférences -=========== - -Dans vos préférences, vous pouvez changer votre mot de passe ou votre adresse -mail. - -Vous pouvez égalment regénérer votre token permanent. Cela correspond à votre -identifiant de sécurité utilisé dans la barre de recherche rapide et le -marque-page d'ajout. Vous devrez alors les réinitialiser. - -C'est également sur cette page que vous pouvez déterminer le nombre de -marque-pages affichés sur la page d'accueil de bow, la couleur du site, -le nombre de tags affichés dans le nuage et les URLs de votre moteur de -recherche externe préféré. diff --git a/src/site/rst/user/search.rst b/src/site/rst/user/search.rst deleted file mode 100644 index d63322e..0000000 --- a/src/site/rst/user/search.rst +++ /dev/null @@ -1,42 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - - -========= -Recherche -========= - -Il est possible de rechercher des marque-pages de deux façons différentes -comme expliquées ci-dessous. - -- Recherche par tags: - - La recherche par tag va rechercher les marque-pages en fonction des tags qu'ils - possèdent. Il est possible de les taper manuellement ou de cliquer sur les tags - du nuage de tags permettant d'affiner la recherche. - -- Recherche intégrale: - - La recherche intégrale va retourner tous les marque-pages qui possèdent un des - mots clés tapés dans la barre de recherche, que ce soit dans les tags, dans le - nom ou l'URL. - -Ces deux types de recherche retournent, si la recherche est vide, les -marque-pages qui ne possèdent aucun tag. diff --git a/src/site/rst/user/user.rst b/src/site/rst/user/user.rst deleted file mode 100644 index 17af4ba..0000000 --- a/src/site/rst/user/user.rst +++ /dev/null @@ -1,37 +0,0 @@ -.. - -.. * #%L -.. * bow -.. * %% -.. * Copyright (C) 2010 CodeLutin -.. * %% -.. * This program is free software: you can redistribute it and/or modify -.. * it under the terms of the GNU Affero General Public License as published by -.. * the Free Software Foundation, either version 3 of the License, or -.. * (at your option) any later version. -.. * -.. * This program is distributed in the hope that it will be useful, -.. * but WITHOUT ANY WARRANTY; without even the implied warranty of -.. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.. * GNU General Public License for more details. -.. * -.. * You should have received a copy of the GNU Affero General Public License -.. * along with this program. If not, see <http://www.gnu.org/licenses/>. -.. * #L% -.. - - -Documentation utilisateur -========================= - -* `Importer ses marque-pages`_ -* `Rechercher dans ses marque-pages`_ -* `Ajouter des marque-pages`_ -* `Créer des URLs courtes de ses marque-pages`_ -* `Faire des recherches depuis sa barre de recherche rapide`_ -* `Gérer ses préférences`_ - -.. Importer ses marque-pages:: importExport.html -.. Rechercher dans ses marque-pages:: search.html -.. Ajouter des marque-pages:: addBookmark.html -.. Créer des URLs courtes de ses marque-pages:: alias.html -.. Faire des recherches depuis sa barre de recherche rapide:: openSearch.html -.. Gérer ses préférences:: preferences.html diff --git a/src/site/site.xml b/src/site/site.xml deleted file mode 100644 index 84b7d12..0000000 --- a/src/site/site.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - bow - %% - Copyright (C) 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> - -<project name="${project.name}" - xmlns="http://maven.apache.org/DECORATION/1.4.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0 http://maven.apache.org/xsd/decoration-1.4.0.xsd"> - - <bannerLeft> - <name>${project.name}</name> - <href>index.html</href> - </bannerLeft> - - <bannerRight> - <src>http://www.codelutin.com/images/lutinorange-codelutin.png</src> - <href>http://www.codelutin.com</href> - </bannerRight> - - <poweredBy> - <logo href="http://maven.apache.org" name="Maven" img="${siteCommonResourcesUrl}/images/logos/maven-feather.png"/> - <logo href="http://docutils.sourceforge.net/rst.html" - name="ReStructuredText" img="${siteCommonResourcesUrl}/images/logos/restructuredtext-logo.png"/> - <logo href="http://maven-site.nuiton.org/jrst" name="JRst" - img="${siteCommonResourcesUrl}/images/logos/jrst-logo.png"/> - </poweredBy> - - <body> - - <links> - <item name="nuiton.org" href="https://forge.nuiton.org"/> - <item name="chorem.org" href="https://forge.chorem.org"/> - <item name="CodeLutin" href="https://codelutin.com"/> - <item name="Libre-Entreprise" href="http://www.libre-entreprise.org/"/> - </links> - - <breadcrumbs> - <item name="${project.name}" href="${project.url}/s/index.html"/> - <item name="${project.version}" href="${project.url}/v/${siteDeployClassifier}/index.html"/> - </breadcrumbs> - - <menu name="Utilisateur"> - <item name="Get Started" href="user/getStarted.html"/> - <item name="Import/Export" href="user/importExport.html"/> - <item name="Recherche de marque-pages" href="user/search.html"/> - <item name="Ajout de marque-pages" href="user/addBookmark.html"/> - <item name="Alias/URL courtes" href="user/alias.html"/> - <item name="OpenSearch" href="user/openSearch.html"/> - <item name="Préférences" href="user/preferences.html"/> - </menu> - - <menu name="Développeur"> - <item name="Presentation" href="developper/presentation.html"/> - <item name="Installation" href="developper/installation.html"/> - </menu> - - <menu ref="modules"/> - <menu ref="reports"/> - - </body> -</project> diff --git a/src/test/java/com/chorem/bow/BowAppTest.java b/src/test/java/com/chorem/bow/BowAppTest.java new file mode 100644 index 0000000..c2954e6 --- /dev/null +++ b/src/test/java/com/chorem/bow/BowAppTest.java @@ -0,0 +1,20 @@ +package com.chorem.bow; + +import io.jooby.MockRouter; +import io.jooby.StatusCode; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class BowAppTest { + +// @Test +// public void unitTest() throws Throwable { +// MockRouter router = new MockRouter(new BowApp()); +// router.get("/", response -> { +// assertEquals(StatusCode.OK, response.getStatusCode()); +// assertEquals("Hello World!", response.value(String.class)); +// }); +// } + +} diff --git a/src/test/java/com/chorem/bow/rest/BowUserResourcesTest.java b/src/test/java/com/chorem/bow/rest/BowUserResourcesTest.java new file mode 100644 index 0000000..f3064ca --- /dev/null +++ b/src/test/java/com/chorem/bow/rest/BowUserResourcesTest.java @@ -0,0 +1,70 @@ +package com.chorem.bow.rest; + +import com.chorem.bow.BowApp; +import com.chorem.bow.model.BowUser; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import io.jooby.JoobyTest; +import io.jooby.MockContext; +import io.jooby.MockRouter; +import io.jooby.StatusCode; +import io.jooby.json.JacksonModule; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; +import org.junit.Test; + +import java.util.Arrays; +import java.util.LinkedHashSet; + +import static org.junit.Assert.assertEquals; + +@JoobyTest(BowApp.class) +public class BowUserResourcesTest { + + public String serverPath; + public int serverPort; + + OkHttpClient client = new OkHttpClient(); + ObjectMapper jsonMapper = JacksonModule.create() + .setSerializationInclusion(JsonInclude.Include.NON_NULL) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + + @Test + public void unitTest() throws Throwable { + BowUser user = new BowUser(); + user.setLogin("poussin"); + user.setPassword("xxxxxxxx"); + user.setEmails(new LinkedHashSet<>(Arrays.asList("bpoussin.free.fr", "poussin@codelutin.com"))); + +// String contentType = Content-Type", MediaType.json.toString()); + + System.out.println(serverPath); + System.out.println(serverPort); + + String userAsJson = jsonMapper.writeValueAsString(user); + System.out.println(userAsJson); + + RequestBody body = RequestBody.create(userAsJson, MediaType.get("application/json")); + Request request = new Request.Builder() + .url(serverPath) + .post(body) + .build(); + try (Response response = client.newCall(request).execute()) { + System.out.println(response.body().string()); + assertEquals(StatusCode.OK, response.code()); + } + + // router.post("/users", ctx, response -> { +// System.out.println(response.value()); +// assertEquals(StatusCode.OK, response.getStatusCode()); +// }); + + } + + +} diff --git a/src/test/java/com/chorem/bow/rest/RestHelper.java b/src/test/java/com/chorem/bow/rest/RestHelper.java new file mode 100644 index 0000000..36eab60 --- /dev/null +++ b/src/test/java/com/chorem/bow/rest/RestHelper.java @@ -0,0 +1,26 @@ +package com.chorem.bow.rest; + +import io.jooby.MockContext; +import lombok.experimental.UtilityClass; + +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +@UtilityClass +public class RestHelper { + void addHeader(MockContext ctx, String name, String value) { + Map<String, List<String>> current = ctx.headerMultimap(); + List<String> values = current.get(name); + if (values == null) { + values = Arrays.asList(value); + current.put(name, values); + } else { + values.add(value); + } + + Object result = current; + ctx.setHeaders((Map<String, Collection<String>>)result); + } +} -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.