From 229d8fbf1df26f779607ba73e65f3a0cfbb6258d Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Tue, 21 Nov 2017 20:58:51 +0100 Subject: [PATCH] [fix] Fix unit test [enh] Add web site --- LICENSE | 674 ------------------ README.md | 6 +- duniter4j-client/LICENSE | 674 ------------------ duniter4j-client/pom.xml | 3 +- .../src/license/THIRD-PARTY.properties | 4 +- duniter4j-core-client/LICENSE | 674 ------------------ duniter4j-core-client/pom.xml | 1 + .../src/license/THIRD-PARTY.properties | 22 - .../duniter/core/client/example/Example1.java | 55 ++ .../client/model/elasticsearch/Record.java | 6 +- .../exception/InvalidFormatException.java | 22 + .../core/client/model/local/Peers.java | 22 + .../duniter4j-core-client_fr_FR.properties | 48 +- .../src/main/resources/log4j.properties | 2 +- .../core/client/model/BlockFileUtils.java | 22 + .../core/client/model/MovementsTest.java | 22 + .../duniter4j-core-client-test.properties | 4 +- .../src/test/resources/log4j.properties | 6 +- duniter4j-core-shared/LICENSE | 674 ------------------ duniter4j-core-shared/pom.xml | 1 + .../src/license/THIRD-PARTY.properties | 20 - .../java/org/duniter/core/util/DateUtils.java | 22 + .../org/duniter/core/util/LockManager.java | 22 + .../duniter/core/util/PrimitiveIterators.java | 22 + .../core/util/json/JsonAttributeParser.java | 10 +- duniter4j-es-assembly/LICENSE | 674 ------------------ duniter4j-es-assembly/pom.xml | 3 +- duniter4j-es-core/LICENSE | 674 ------------------ duniter4j-es-core/pom.xml | 1 + .../src/license/THIRD-PARTY.properties | 26 - .../plugin-descriptor.properties | 2 +- .../duniter/elasticsearch/dao/DocStatDao.java | 22 + .../elasticsearch/model/SynchroExecution.java | 22 + .../synchro/AbstractSynchroAction.java | 22 + .../elasticsearch/synchro/SynchroAction.java | 22 + .../synchro/SynchroActionResult.java | 22 + .../synchro/impl/NullSynchroActionResult.java | 22 + .../synchro/impl/SynchroActionResultImpl.java | 22 + .../util/bytes/BytesJsonNode.java | 22 + .../src/test/es-home/config/logging.yml | 16 +- .../model/SynchroExecutionTest.java | 22 + .../service/DocStatServiceTest.java | 3 + .../src/test/resources/log4j.properties | 4 +- duniter4j-es-subscription/LICENSE | 674 ------------------ duniter4j-es-subscription/pom.xml | 3 + .../src/license/THIRD-PARTY.properties | 15 +- .../plugin-descriptor.properties | 2 +- ...nchroSubscriptionExecutionIndexAction.java | 22 + .../SynchroSubscriptionRecordAction.java | 22 + .../src/test/es-home/config/elasticsearch.yml | 4 +- .../plugin-descriptor.properties | 2 +- .../service/SubscriptionServiceTest.java | 8 +- duniter4j-es-user/LICENSE | 674 ------------------ duniter4j-es-user/pom.xml | 7 + .../src/license/THIRD-PARTY.properties | 26 - .../plugin-descriptor.properties | 2 +- .../user/dao/profile/UserProfileDao.java | 22 + .../user/dao/profile/UserSettingsDao.java | 22 + .../group/SynchroGroupCommentAction.java | 22 + .../group/SynchroGroupRecordAction.java | 22 + .../history/SynchroHistoryIndexAction.java | 22 + ...hroInvitationCertificationIndexAction.java | 22 + .../SynchroMessageInboxIndexAction.java | 22 + .../SynchroMessageOutboxIndexAction.java | 22 + .../page/SynchroPageCommentAction.java | 22 + .../synchro/page/SynchroPageRecordAction.java | 22 + .../user/SynchroUserProfileAction.java | 22 + .../user/SynchroUserSettingsAction.java | 22 + .../plugin-descriptor.properties | 2 +- .../plugin-descriptor.properties | 80 +++ .../mapper-attachments/plugin-security.policy | 34 + .../elasticsearch/user/TestConfiguration.java | 22 + .../user/service/SynchroServiceTest.java | 52 +- .../src/test/resources/log4j.properties | 7 +- pom.xml | 347 ++++++--- {doc => src/site/markdown}/CLI.md | 16 +- src/site/markdown/ES.md | 202 ++++++ doc/API.md => src/site/markdown/ES_API.md | 70 +- src/site/markdown/Java_API.md | 68 ++ src/site/markdown/build.md | 54 ++ .../site/markdown}/development_tutorial.md | 81 +-- src/site/markdown/index.md | 21 + src/site/resources/css/site.css | 39 + .../resources/images/logos/logo_duniter.png | Bin 0 -> 5607 bytes .../resources/images/logos/maven-feather.png | Bin 0 -> 3330 bytes .../resources}/presentation-2016-11-18.odp | Bin src/site/site.xml | 110 +++ 87 files changed, 1827 insertions(+), 5742 deletions(-) delete mode 100644 LICENSE delete mode 100644 duniter4j-client/LICENSE delete mode 100644 duniter4j-core-client/LICENSE delete mode 100644 duniter4j-core-client/src/license/THIRD-PARTY.properties create mode 100644 duniter4j-core-client/src/main/java/org/duniter/core/client/example/Example1.java delete mode 100644 duniter4j-core-shared/LICENSE delete mode 100644 duniter4j-core-shared/src/license/THIRD-PARTY.properties delete mode 100644 duniter4j-es-assembly/LICENSE delete mode 100644 duniter4j-es-core/LICENSE delete mode 100644 duniter4j-es-core/src/license/THIRD-PARTY.properties delete mode 100644 duniter4j-es-subscription/LICENSE delete mode 100644 duniter4j-es-user/LICENSE delete mode 100644 duniter4j-es-user/src/license/THIRD-PARTY.properties create mode 100644 duniter4j-es-user/src/test/es-home/plugins/mapper-attachments/plugin-descriptor.properties create mode 100644 duniter4j-es-user/src/test/es-home/plugins/mapper-attachments/plugin-security.policy rename {doc => src/site/markdown}/CLI.md (86%) create mode 100644 src/site/markdown/ES.md rename doc/API.md => src/site/markdown/ES_API.md (70%) create mode 100644 src/site/markdown/Java_API.md create mode 100644 src/site/markdown/build.md rename {doc/fr => src/site/markdown}/development_tutorial.md (82%) create mode 100644 src/site/markdown/index.md create mode 100644 src/site/resources/css/site.css create mode 100644 src/site/resources/images/logos/logo_duniter.png create mode 100644 src/site/resources/images/logos/maven-feather.png rename {doc/fr => src/site/resources}/presentation-2016-11-18.odp (100%) create mode 100644 src/site/site.xml diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 6df63bc4..00000000 --- a/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 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 General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is 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. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - 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. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - 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 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. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to reference or combine any covered work with a work licensed -under version 3 of the GNU Affero 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 special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 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 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 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 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 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 the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - 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 GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/README.md b/README.md index 8619106f..e38440b4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -duniter4j -====== +Duniter4j +========= -duniter4j is a Java Client API for [Duniter](http://duniter.org). +Duniter4j is a Java Client API for [Duniter](http://duniter.org). ## Components diff --git a/duniter4j-client/LICENSE b/duniter4j-client/LICENSE deleted file mode 100644 index 6df63bc4..00000000 --- a/duniter4j-client/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 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 General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is 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. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - 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. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - 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 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. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to reference or combine any covered work with a work licensed -under version 3 of the GNU Affero 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 special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 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 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 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 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 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 the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - 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 GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/duniter4j-client/pom.xml b/duniter4j-client/pom.xml index 3bd867e9..e24ac82d 100644 --- a/duniter4j-client/pom.xml +++ b/duniter4j-client/pom.xml @@ -9,6 +9,7 @@ <artifactId>duniter4j-client</artifactId> <name>Duniter4j :: Client</name> + <description>A command line tools, to communicate with a Duniter network</description> <properties> <jTextUtilsVersion>0.3.3</jTextUtilsVersion> @@ -61,12 +62,10 @@ <dependency> <groupId>dnl.utils</groupId> <artifactId>j-text-utils</artifactId> - <version>${jTextUtilsVersion}</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> - <version>2.6</version> </dependency> <!-- for CSV network output --> diff --git a/duniter4j-client/src/license/THIRD-PARTY.properties b/duniter4j-client/src/license/THIRD-PARTY.properties index 73833ce8..290ad644 100644 --- a/duniter4j-client/src/license/THIRD-PARTY.properties +++ b/duniter4j-client/src/license/THIRD-PARTY.properties @@ -14,13 +14,13 @@ # - Lesser General Public License (LGPL) v 3.0 # - Lesser General Public License (LPGL) # - Lesser General Public License (LPGL) v 2.1 +# - Lesser General Public License (LPGL) version 3.0 # - MIT License # - The Apache Software License, Version 2.0 #------------------------------------------------------------------------------- # Please fill the missing licenses for dependencies : # # -#Tue Mar 28 09:33:08 CEST 2017 -commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 +#Tue Nov 21 18:04:39 CET 2017 dnl.utils--j-text-utils--0.3.3=GNU General Lesser Public License (LGPL) version 3.0 net.sf.opencsv--opencsv--2.3=GNU General Lesser Public License (LGPL) version 3.0 diff --git a/duniter4j-core-client/LICENSE b/duniter4j-core-client/LICENSE deleted file mode 100644 index 6df63bc4..00000000 --- a/duniter4j-core-client/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 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 General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is 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. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - 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. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - 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 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. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to reference or combine any covered work with a work licensed -under version 3 of the GNU Affero 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 special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 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 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 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 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 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 the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - 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 GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/duniter4j-core-client/pom.xml b/duniter4j-core-client/pom.xml index 2fbe9dea..6edb939f 100644 --- a/duniter4j-core-client/pom.xml +++ b/duniter4j-core-client/pom.xml @@ -10,6 +10,7 @@ <artifactId>duniter4j-core-client</artifactId> <packaging>jar</packaging> <name>Duniter4j :: Core Client API</name> + <description>A useful API to communicate with a Duniter network</description> <properties> <i18n.bundleOutputName>duniter4j-core-client-i18n</i18n.bundleOutputName> diff --git a/duniter4j-core-client/src/license/THIRD-PARTY.properties b/duniter4j-core-client/src/license/THIRD-PARTY.properties deleted file mode 100644 index 2258c131..00000000 --- a/duniter4j-core-client/src/license/THIRD-PARTY.properties +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by org.codehaus.mojo.license.AddThirdPartyMojo -#------------------------------------------------------------------------------- -# Already used licenses in project : -# - BSD License -# - CDDL+GPL -# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 -# - Dual license consisting of the CDDL v1.1 and GPL v2 -# - Eclipse Public License 1.0 -# - General Public License (GPL) v3 -# - 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 -# - New BSD License -# - The Apache Software License, Version 2.0 -#------------------------------------------------------------------------------- -# Please fill the missing licenses for dependencies : -# -# -#Wed Nov 16 11:35:31 CET 2016 -commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 diff --git a/duniter4j-core-client/src/main/java/org/duniter/core/client/example/Example1.java b/duniter4j-core-client/src/main/java/org/duniter/core/client/example/Example1.java new file mode 100644 index 00000000..7e86dd6b --- /dev/null +++ b/duniter4j-core-client/src/main/java/org/duniter/core/client/example/Example1.java @@ -0,0 +1,55 @@ +package org.duniter.core.client.example; + +/*- + * #%L + * Duniter4j :: Core Client API + * %% + * Copyright (C) 2014 - 2017 Duniter Team + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import org.duniter.core.client.config.Configuration; +import org.duniter.core.client.model.bma.BlockchainBlock; +import org.duniter.core.client.model.local.Peer; +import org.duniter.core.client.service.ServiceLocator; + +public class Example1 { + + public static void main(String[] args) { + + // Init configuration + String configFilename = "duniter4j-config.properties"; + Configuration config = new Configuration(configFilename, args); + Configuration.setInstance(config); + + // Set a wallet id (an identifier required for cache) + ServiceLocator.instance().getDataContext().setAccountId(0); + + // Initialize service locator + ServiceLocator.instance().init(); + + // Create a peer, from configuration + Peer aPeer = Peer.newBuilder() + .setHost(config.getNodeHost()) + .setPort(config.getNodePort()) + .build(); + + // Do something fun ! + BlockchainBlock currentBlock = ServiceLocator.instance().getBlockchainRemoteService().getCurrentBlock(aPeer); + System.out.println(String.format("Hello %s world !", currentBlock.getCurrency())); + } +} diff --git a/duniter4j-core-client/src/main/java/org/duniter/core/client/model/elasticsearch/Record.java b/duniter4j-core-client/src/main/java/org/duniter/core/client/model/elasticsearch/Record.java index f93951c1..832dd0bf 100644 --- a/duniter4j-core-client/src/main/java/org/duniter/core/client/model/elasticsearch/Record.java +++ b/duniter4j-core-client/src/main/java/org/duniter/core/client/model/elasticsearch/Record.java @@ -36,7 +36,7 @@ public class Record implements LocalEntity<String> { public static final String PROPERTY_SIGNATURE="signature"; public static final String PROPERTY_TIME="time"; - private String version; + private Integer version; private String id; private String issuer; private String hash; @@ -55,11 +55,11 @@ public class Record implements LocalEntity<String> { this.time = another.getTime(); } - public String getVersion() { + public Integer getVersion() { return version; } - public void setVersion(String version) { + public void setVersion(Integer version) { this.version = version; } diff --git a/duniter4j-core-client/src/main/java/org/duniter/core/client/model/exception/InvalidFormatException.java b/duniter4j-core-client/src/main/java/org/duniter/core/client/model/exception/InvalidFormatException.java index 36ed8a7d..1b90d9fd 100644 --- a/duniter4j-core-client/src/main/java/org/duniter/core/client/model/exception/InvalidFormatException.java +++ b/duniter4j-core-client/src/main/java/org/duniter/core/client/model/exception/InvalidFormatException.java @@ -1,5 +1,27 @@ package org.duniter.core.client.model.exception; +/*- + * #%L + * Duniter4j :: Core Client API + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.exception.TechnicalException; /** diff --git a/duniter4j-core-client/src/main/java/org/duniter/core/client/model/local/Peers.java b/duniter4j-core-client/src/main/java/org/duniter/core/client/model/local/Peers.java index 404ad6d6..5b0e03d7 100644 --- a/duniter4j-core-client/src/main/java/org/duniter/core/client/model/local/Peers.java +++ b/duniter4j-core-client/src/main/java/org/duniter/core/client/model/local/Peers.java @@ -1,5 +1,27 @@ package org.duniter.core.client.model.local; +/*- + * #%L + * Duniter4j :: Core Client API + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.client.model.bma.EndpointApi; /** diff --git a/duniter4j-core-client/src/main/resources/i18n/duniter4j-core-client_fr_FR.properties b/duniter4j-core-client/src/main/resources/i18n/duniter4j-core-client_fr_FR.properties index 390d4e90..caf081d2 100644 --- a/duniter4j-core-client/src/main/resources/i18n/duniter4j-core-client_fr_FR.properties +++ b/duniter4j-core-client/src/main/resources/i18n/duniter4j-core-client_fr_FR.properties @@ -6,29 +6,29 @@ duniter4j.client.core.invalidResponseContentType=[%s] Type de réponse invalide\ duniter4j.client.core.timeout=Délai d'attente de la requête dépassé duniter4j.client.notFound=Ressource non trouvée [%s] duniter4j.client.status=Echec de requete HTTP [%s] \: %s -duniter4j.config= -duniter4j.config.option.basedir.description= -duniter4j.config.option.cache.directory.description= -duniter4j.config.option.data.directory.description= -duniter4j.config.option.i18n.directory.description= -duniter4j.config.option.i18n.locale.description= -duniter4j.config.option.inceptionYear.description= -duniter4j.config.option.network.loadPeers.maxDuration.description= +duniter4j.config=Options de configuration Duniter4j \:\: client +duniter4j.config.option.basedir.description=Répertoire de travail de l'application +duniter4j.config.option.cache.directory.description=Répertoire pour le cache applicatif +duniter4j.config.option.data.directory.description=Répertoire de stockage des données +duniter4j.config.option.i18n.directory.description=Répertoire de stockage des traductions +duniter4j.config.option.i18n.locale.description=Locale (langue) à utiliser +duniter4j.config.option.inceptionYear.description=Anée de réalisation +duniter4j.config.option.network.loadPeers.maxDuration.description=Délai maximum de chargement des pairs duniter4j.config.option.network.maxConnections.description= duniter4j.config.option.network.maxConnectionsPerHost.description= -duniter4j.config.option.network.timeout.description= -duniter4j.config.option.node.currency.description= -duniter4j.config.option.node.elasticsearch.host.description= -duniter4j.config.option.node.elasticsearch.port.description= -duniter4j.config.option.node.elasticsearch.protocol.description= -duniter4j.config.option.node.elasticsearch.url.description= -duniter4j.config.option.node.host.description= -duniter4j.config.option.node.port.description= -duniter4j.config.option.node.protocol.description= -duniter4j.config.option.organizationName.description= -duniter4j.config.option.passwd.description= -duniter4j.config.option.salt.description= -duniter4j.config.option.site.url.description= -duniter4j.config.option.tmp.directory.description= -duniter4j.config.option.version.description= -duniter4j.config.parse.error= +duniter4j.config.option.network.timeout.description=Délai d'attente maximal pour joindre un pair +duniter4j.config.option.node.currency.description=Symbole de la monnaie +duniter4j.config.option.node.elasticsearch.host.description=Hôte du noeud ES +duniter4j.config.option.node.elasticsearch.port.description=Port du noeud ES +duniter4j.config.option.node.elasticsearch.protocol.description=Protocole du noeud ES +duniter4j.config.option.node.elasticsearch.url.description=URL du noeud ES +duniter4j.config.option.node.host.description=Hôte du noeud Duniter +duniter4j.config.option.node.port.description=Port du noeud Duniter +duniter4j.config.option.node.protocol.description=Protocole du noeud Duniter +duniter4j.config.option.organizationName.description=Organisme développant le projet +duniter4j.config.option.passwd.description=Mot de passe du trousseau +duniter4j.config.option.salt.description=Sel (salt) du trousseau +duniter4j.config.option.site.url.description=URL du site du projet +duniter4j.config.option.tmp.directory.description=Répertoire temporaire +duniter4j.config.option.version.description=version de l'application +duniter4j.config.parse.error=Erreur lors de la lecture du fichier de configuration diff --git a/duniter4j-core-client/src/main/resources/log4j.properties b/duniter4j-core-client/src/main/resources/log4j.properties index 554a25b8..851ce184 100644 --- a/duniter4j-core-client/src/main/resources/log4j.properties +++ b/duniter4j-core-client/src/main/resources/log4j.properties @@ -12,7 +12,7 @@ log4j.logger.org.duniter=DEBUG log4j.logger.org.duniter.core.client.service.bma.AbstractNetworkService=WARN log4j.appender.file=org.apache.log4j.RollingFileAppender -log4j.appender.file.file=ucoin-client.log +log4j.appender.file.file=duniter4j-core-client.log log4j.appender.file.MaxFileSize=10MB log4j.appender.file.MaxBackupIndex=4 diff --git a/duniter4j-core-client/src/test/java/org/duniter/core/client/model/BlockFileUtils.java b/duniter4j-core-client/src/test/java/org/duniter/core/client/model/BlockFileUtils.java index 6a5f252f..c22970dd 100644 --- a/duniter4j-core-client/src/test/java/org/duniter/core/client/model/BlockFileUtils.java +++ b/duniter4j-core-client/src/test/java/org/duniter/core/client/model/BlockFileUtils.java @@ -1,5 +1,27 @@ package org.duniter.core.client.model; +/*- + * #%L + * Duniter4j :: Core Client API + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.fasterxml.jackson.databind.ObjectMapper; import org.duniter.core.client.model.bma.BlockchainBlock; import org.duniter.core.client.model.bma.jackson.JacksonUtils; diff --git a/duniter4j-core-client/src/test/java/org/duniter/core/client/model/MovementsTest.java b/duniter4j-core-client/src/test/java/org/duniter/core/client/model/MovementsTest.java index 069ecce1..32459bb9 100644 --- a/duniter4j-core-client/src/test/java/org/duniter/core/client/model/MovementsTest.java +++ b/duniter4j-core-client/src/test/java/org/duniter/core/client/model/MovementsTest.java @@ -1,5 +1,27 @@ package org.duniter.core.client.model; +/*- + * #%L + * Duniter4j :: Core Client API + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.client.model.bma.BlockchainBlock; import org.duniter.core.client.model.exception.InvalidFormatException; import org.duniter.core.client.model.local.Movement; diff --git a/duniter4j-core-client/src/test/resources/duniter4j-core-client-test.properties b/duniter4j-core-client/src/test/resources/duniter4j-core-client-test.properties index 2b5c5ba5..de6f268f 100644 --- a/duniter4j-core-client/src/test/resources/duniter4j-core-client-test.properties +++ b/duniter4j-core-client/src/test/resources/duniter4j-core-client-test.properties @@ -1,5 +1,5 @@ -duniter4j.node.host=g1-test.cgeek.fr -duniter4j.node.port=80 +duniter4j.node.host=g1-test.duniter.org +duniter4j.node.port=10900 duniter4j.node.elasticsearch.host=localhost duniter4j.node.elasticsearch.port=9200 diff --git a/duniter4j-core-client/src/test/resources/log4j.properties b/duniter4j-core-client/src/test/resources/log4j.properties index e1c60841..32510e2a 100644 --- a/duniter4j-core-client/src/test/resources/log4j.properties +++ b/duniter4j-core-client/src/test/resources/log4j.properties @@ -9,7 +9,7 @@ log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %5p (%c:%L) - %m%n # File output log4j.appender.file=org.apache.log4j.RollingFileAppender -log4j.appender.file.file=ucoin-client.log +log4j.appender.file.file=duniter4j-core-client.log log4j.appender.file.MaxFileSize=10MB log4j.appender.file.MaxBackupIndex=4 @@ -18,8 +18,8 @@ log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %5p %c - %m%n # duniter4j levels log4j.logger.org.duniter=INFO -log4j.logger.org.duniter.core.client.service=DEBUG -log4j.logger.org.duniter.core.client.service.bma=DEBUG +#log4j.logger.org.duniter.core.client.service=DEBUG +#log4j.logger.org.duniter.core.client.service.bma=DEBUG log4j.logger.org.duniter.core.beans=WARN log4j.logger.org.duniter.core.client.service=TRACE diff --git a/duniter4j-core-shared/LICENSE b/duniter4j-core-shared/LICENSE deleted file mode 100644 index 6df63bc4..00000000 --- a/duniter4j-core-shared/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 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 General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is 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. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - 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. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - 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 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. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to reference or combine any covered work with a work licensed -under version 3 of the GNU Affero 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 special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 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 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 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 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 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 the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - 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 GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/duniter4j-core-shared/pom.xml b/duniter4j-core-shared/pom.xml index 96692a8c..79c9bbb6 100644 --- a/duniter4j-core-shared/pom.xml +++ b/duniter4j-core-shared/pom.xml @@ -10,6 +10,7 @@ <artifactId>duniter4j-core-shared</artifactId> <packaging>jar</packaging> <name>Duniter4j :: Core Shared</name> + <description>Common library used by all Duniter4j modules</description> <properties> <i18n.bundleOutputName>duniter4j-core-i18n</i18n.bundleOutputName> diff --git a/duniter4j-core-shared/src/license/THIRD-PARTY.properties b/duniter4j-core-shared/src/license/THIRD-PARTY.properties deleted file mode 100644 index 7a2eb6f8..00000000 --- a/duniter4j-core-shared/src/license/THIRD-PARTY.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by org.codehaus.mojo.license.AddThirdPartyMojo -#------------------------------------------------------------------------------- -# Already used licenses in project : -# - BSD License -# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 -# - Dual license consisting of the CDDL v1.1 and GPL v2 -# - Eclipse Public License 1.0 -# - 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 -# - New BSD License -# - The Apache Software License, Version 2.0 -#------------------------------------------------------------------------------- -# Please fill the missing licenses for dependencies : -# -# -#Wed Nov 16 11:35:28 CET 2016 -commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 diff --git a/duniter4j-core-shared/src/main/java/org/duniter/core/util/DateUtils.java b/duniter4j-core-shared/src/main/java/org/duniter/core/util/DateUtils.java index a8b2d19f..46daf366 100644 --- a/duniter4j-core-shared/src/main/java/org/duniter/core/util/DateUtils.java +++ b/duniter4j-core-shared/src/main/java/org/duniter/core/util/DateUtils.java @@ -1,5 +1,27 @@ package org.duniter.core.util; +/*- + * #%L + * Duniter4j :: Core Shared + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; diff --git a/duniter4j-core-shared/src/main/java/org/duniter/core/util/LockManager.java b/duniter4j-core-shared/src/main/java/org/duniter/core/util/LockManager.java index b35a9bbf..aadd05f0 100644 --- a/duniter4j-core-shared/src/main/java/org/duniter/core/util/LockManager.java +++ b/duniter4j-core-shared/src/main/java/org/duniter/core/util/LockManager.java @@ -1,5 +1,27 @@ package org.duniter.core.util; +/*- + * #%L + * Duniter4j :: Core Shared + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.google.common.collect.MapMaker; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/duniter4j-core-shared/src/main/java/org/duniter/core/util/PrimitiveIterators.java b/duniter4j-core-shared/src/main/java/org/duniter/core/util/PrimitiveIterators.java index 5229e47d..1bbfd72e 100644 --- a/duniter4j-core-shared/src/main/java/org/duniter/core/util/PrimitiveIterators.java +++ b/duniter4j-core-shared/src/main/java/org/duniter/core/util/PrimitiveIterators.java @@ -1,5 +1,27 @@ package org.duniter.core.util; +/*- + * #%L + * Duniter4j :: Core Shared + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import java.util.Iterator; import java.util.PrimitiveIterator; diff --git a/duniter4j-core-shared/src/main/java/org/duniter/core/util/json/JsonAttributeParser.java b/duniter4j-core-shared/src/main/java/org/duniter/core/util/json/JsonAttributeParser.java index 236682e5..8444ad9c 100644 --- a/duniter4j-core-shared/src/main/java/org/duniter/core/util/json/JsonAttributeParser.java +++ b/duniter4j-core-shared/src/main/java/org/duniter/core/util/json/JsonAttributeParser.java @@ -45,9 +45,9 @@ public class JsonAttributeParser<T extends Object> { STRING } - public static final String REGEX_ATTRIBUTE_STRING_VALUE = "\\\"%s\\\"\\s*:\\s*\"([^\"]+)\\\""; - public static final String REGEX_ATTRIBUTE_NUMERIC_VALUE = "\\\"%s\\\"\\s*:\\s*([\\d]+(?:[.][\\d]+)?)"; - public static final String REGEX_ATTRIBUTE_BOOLEAN_VALUE = "\\\"%s\\\"\\s*:\\s*(true|false)"; + public static final String REGEX_ATTRIBUTE_STRING_VALUE = "\\\"%s\\\"\\s*:\\s*(?:\"([^\"]+)\\\"|null)"; + public static final String REGEX_ATTRIBUTE_NUMERIC_VALUE = "\\\"%s\\\"\\s*:\\s*(?:([\\d]+(?:[.][\\d]+)?)|null)"; + public static final String REGEX_ATTRIBUTE_BOOLEAN_VALUE = "\\\"%s\\\"\\s*:\\s*(?:(true|false)|null)"; public static JsonAttributeParser<String> newStringParser(final String attributeName){ return new JsonAttributeParser<>(attributeName, String.class); @@ -141,11 +141,13 @@ public class JsonAttributeParser<T extends Object> { int end = matcher.end(); char before = jsonString.charAt(start-1); + boolean hasCommaBefore = before == ','; while (before == ',' || before == ' ' || before == '\t' || before == '\n') { before = jsonString.charAt(--start-1); + hasCommaBefore = hasCommaBefore || (before == ','); } char after = jsonString.charAt(end); - while (after == ',' || after == ' ' || after == '\t' || after == '\n') { + while ((!hasCommaBefore && after == ',') || after == ' ' || after == '\t' || after == '\n') { after = jsonString.charAt(++end); } diff --git a/duniter4j-es-assembly/LICENSE b/duniter4j-es-assembly/LICENSE deleted file mode 100644 index 6df63bc4..00000000 --- a/duniter4j-es-assembly/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 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 General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is 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. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - 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. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - 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 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. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to reference or combine any covered work with a work licensed -under version 3 of the GNU Affero 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 special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 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 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 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 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 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 the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - 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 GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/duniter4j-es-assembly/pom.xml b/duniter4j-es-assembly/pom.xml index d6423e4a..a6065640 100644 --- a/duniter4j-es-assembly/pom.xml +++ b/duniter4j-es-assembly/pom.xml @@ -8,8 +8,9 @@ </parent> <artifactId>duniter4j-es-assembly</artifactId> - <name>Duniter4j :: ElasticSearch Assembly</name> <packaging>pom</packaging> + <name>Duniter4j :: ElasticSearch Assembly</name> + <description>Build a ElasticSearch releases with all Duniter4j plugins</description> <properties> <!-- bundle configuration --> diff --git a/duniter4j-es-core/LICENSE b/duniter4j-es-core/LICENSE deleted file mode 100644 index 6df63bc4..00000000 --- a/duniter4j-es-core/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 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 General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is 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. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - 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. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - 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 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. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to reference or combine any covered work with a work licensed -under version 3 of the GNU Affero 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 special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 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 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 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 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 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 the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - 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 GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/duniter4j-es-core/pom.xml b/duniter4j-es-core/pom.xml index 7063b505..80086b97 100644 --- a/duniter4j-es-core/pom.xml +++ b/duniter4j-es-core/pom.xml @@ -10,6 +10,7 @@ <artifactId>duniter4j-es-core</artifactId> <packaging>jar</packaging> <name>Duniter4j :: ElasticSearch Core plugin</name> + <description>A ElasticSearch plugin that can index data from a Duniter currency</description> <properties> <!-- i18n configuration --> diff --git a/duniter4j-es-core/src/license/THIRD-PARTY.properties b/duniter4j-es-core/src/license/THIRD-PARTY.properties deleted file mode 100644 index 8610ec5b..00000000 --- a/duniter4j-es-core/src/license/THIRD-PARTY.properties +++ /dev/null @@ -1,26 +0,0 @@ -# Generated by org.codehaus.mojo.license.AddThirdPartyMojo -#------------------------------------------------------------------------------- -# Already used licenses in project : -# - ASL, version 2 -# - Apache License 2.0 -# - Apache License Version 2.0 -# - BSD License -# - CC0 1.0 Universal -# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 -# - Eclipse Public License 1.0 -# - General Public License (GPL) v3 -# - Indiana University Extreme! Lab Software License, vesion 1.1.1 -# - LGPL, version 2.1 -# - Lesser General Public License (LGPL) v 3.0 -# - Lesser General Public License (LPGL) -# - Lesser General Public License (LPGL) v 2.1 -# - MIT License -# - New BSD License -# - Public Domain, per Creative Commons CC0 -# - The Apache Software License, Version 2.0 -#------------------------------------------------------------------------------- -# Please fill the missing licenses for dependencies : -# -# -#Tue Jan 05 15:24:57 CET 2016 -commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 diff --git a/duniter4j-es-core/src/main/filtered-resources/plugin-descriptor.properties b/duniter4j-es-core/src/main/filtered-resources/plugin-descriptor.properties index 3a44810a..ed67f814 100644 --- a/duniter4j-es-core/src/main/filtered-resources/plugin-descriptor.properties +++ b/duniter4j-es-core/src/main/filtered-resources/plugin-descriptor.properties @@ -5,5 +5,5 @@ site=false jvm=true classname=org.duniter.elasticsearch.Plugin java.version=1.8 -elasticsearch.version=2.4.5 +elasticsearch.version=2.4.6 isolated=false diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/dao/DocStatDao.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/dao/DocStatDao.java index ec3083ee..12dc18d2 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/dao/DocStatDao.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/dao/DocStatDao.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.dao; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.elasticsearch.model.DocStat; import org.elasticsearch.action.index.IndexRequestBuilder; diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/model/SynchroExecution.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/model/SynchroExecution.java index e64d3410..29634a68 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/model/SynchroExecution.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/model/SynchroExecution.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.model; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.client.model.elasticsearch.Record; public class SynchroExecution extends Record { diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/AbstractSynchroAction.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/AbstractSynchroAction.java index 537f2f80..a94411bd 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/AbstractSynchroAction.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/AbstractSynchroAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.synchro; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Lists; diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/SynchroAction.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/SynchroAction.java index 67b571d3..7532c169 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/SynchroAction.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/SynchroAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.synchro; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.Lists; import org.duniter.core.client.model.bma.EndpointApi; diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/SynchroActionResult.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/SynchroActionResult.java index 36e0fc88..8a6e53cb 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/SynchroActionResult.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/SynchroActionResult.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.synchro; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + public interface SynchroActionResult { void addInsert(); diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/impl/NullSynchroActionResult.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/impl/NullSynchroActionResult.java index e4b9b1bf..1155602c 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/impl/NullSynchroActionResult.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/impl/NullSynchroActionResult.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.synchro.impl; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.elasticsearch.synchro.SynchroActionResult; public class NullSynchroActionResult implements SynchroActionResult { diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/impl/SynchroActionResultImpl.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/impl/SynchroActionResultImpl.java index 855d409e..1f7a4b55 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/impl/SynchroActionResultImpl.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/synchro/impl/SynchroActionResultImpl.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.synchro.impl; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.util.PrimitiveIterators; import org.duniter.elasticsearch.synchro.SynchroActionResult; diff --git a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/util/bytes/BytesJsonNode.java b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/util/bytes/BytesJsonNode.java index e59cbe7d..a8c8e9aa 100644 --- a/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/util/bytes/BytesJsonNode.java +++ b/duniter4j-es-core/src/main/java/org/duniter/elasticsearch/util/bytes/BytesJsonNode.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.util.bytes; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/duniter4j-es-core/src/test/es-home/config/logging.yml b/duniter4j-es-core/src/test/es-home/config/logging.yml index 82ce0a22..daa022f8 100644 --- a/duniter4j-es-core/src/test/es-home/config/logging.yml +++ b/duniter4j-es-core/src/test/es-home/config/logging.yml @@ -14,20 +14,22 @@ logger: com.amazonaws.jmx.SdkMBeanRegistrySupport: ERROR com.amazonaws.metrics.AwsSdkMetrics: ERROR - org.apache.http: INFO - + # Duniter4j levels org.duniter: INFO - - org.duniter.elasticsearch: DEBUG - - duniter : DEBUG + #org.duniter.elasticsearch: DEBUG + duniter : INFO #duniter.network.p2p: TRACE - security: DEBUG + security: INFO cluster.routing.allocation: ERROR org.nuiton.i18n: WARN org.nuiton.config: WARN + org.nuiton.converter: WARN + org.apache.http: WARN + org.apache.http.client: ERROR + org.glassfish.grizzly: WARN + org.glassfish.tyrus: WARN # gateway #gateway: DEBUG diff --git a/duniter4j-es-core/src/test/java/org/duniter/elasticsearch/model/SynchroExecutionTest.java b/duniter4j-es-core/src/test/java/org/duniter/elasticsearch/model/SynchroExecutionTest.java index 4afd4e11..3ef43e67 100644 --- a/duniter4j-es-core/src/test/java/org/duniter/elasticsearch/model/SynchroExecutionTest.java +++ b/duniter4j-es-core/src/test/java/org/duniter/elasticsearch/model/SynchroExecutionTest.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.model; +/*- + * #%L + * Duniter4j :: ElasticSearch Core plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.client.model.bma.jackson.JacksonUtils; import org.junit.Assert; import org.junit.Test; diff --git a/duniter4j-es-core/src/test/java/org/duniter/elasticsearch/service/DocStatServiceTest.java b/duniter4j-es-core/src/test/java/org/duniter/elasticsearch/service/DocStatServiceTest.java index af4a6743..7b70c507 100644 --- a/duniter4j-es-core/src/test/java/org/duniter/elasticsearch/service/DocStatServiceTest.java +++ b/duniter4j-es-core/src/test/java/org/duniter/elasticsearch/service/DocStatServiceTest.java @@ -28,10 +28,13 @@ import org.duniter.core.client.model.local.Peer; import org.duniter.elasticsearch.TestResource; import org.junit.Before; import org.junit.ClassRule; +import org.junit.Ignore; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +// Ignore (it's work but too long) +@Ignore public class DocStatServiceTest { private static final Logger log = LoggerFactory.getLogger(DocStatServiceTest.class); diff --git a/duniter4j-es-core/src/test/resources/log4j.properties b/duniter4j-es-core/src/test/resources/log4j.properties index 374f00b6..d6ce04a6 100644 --- a/duniter4j-es-core/src/test/resources/log4j.properties +++ b/duniter4j-es-core/src/test/resources/log4j.properties @@ -15,4 +15,6 @@ log4j.logger.org.duniter.core=WARN # Other frameworks levels log4j.logger.org.elasticsearch=INFO - +log4j.logger.org.apache.http=WARN +log4j.logger.org.glassfish.grizzly=WARN +log4j.logger.org.glassfish.tyrus=WARN diff --git a/duniter4j-es-subscription/LICENSE b/duniter4j-es-subscription/LICENSE deleted file mode 100644 index 6df63bc4..00000000 --- a/duniter4j-es-subscription/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 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 General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is 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. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - 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. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - 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 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. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to reference or combine any covered work with a work licensed -under version 3 of the GNU Affero 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 special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 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 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 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 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 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 the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - 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 GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/duniter4j-es-subscription/pom.xml b/duniter4j-es-subscription/pom.xml index 3afacbe8..8c4648df 100644 --- a/duniter4j-es-subscription/pom.xml +++ b/duniter4j-es-subscription/pom.xml @@ -10,6 +10,7 @@ <artifactId>duniter4j-es-subscription</artifactId> <packaging>jar</packaging> <name>Duniter4j :: ElasticSearch Subscription plugin</name> + <description>A ElasticSearch plugin that can send email notifications to end users</description> <properties> @@ -44,6 +45,8 @@ <dependency> <groupId>org.antlr</groupId> <artifactId>stringtemplate</artifactId> + <version>${stringtemplate.version}</version> + <scope>compile</scope> </dependency> <!-- Unit test --> diff --git a/duniter4j-es-subscription/src/license/THIRD-PARTY.properties b/duniter4j-es-subscription/src/license/THIRD-PARTY.properties index c76cb971..acee82b8 100644 --- a/duniter4j-es-subscription/src/license/THIRD-PARTY.properties +++ b/duniter4j-es-subscription/src/license/THIRD-PARTY.properties @@ -2,23 +2,27 @@ #------------------------------------------------------------------------------- # Already used licenses in project : # - ASL, version 2 -# - Apache 2 +# - Apache 2.0 # - Apache License 2.0 # - Apache License Version 2.0 -# - Apache License, Version 2.0 -# - BSD +# - BSD License # - BSD licence # - Bouncy Castle Licence # - CC0 1.0 Universal # - CDDL # - CDDL+GPL +# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 # - Common Development and Distribution License (CDDL) v1.0 # - Dual license consisting of the CDDL v1.1 and GPL v2 # - Eclipse Public License 1.0 # - GPLv2+CE # - General Public License (GPL) v3 +# - Indiana University Extreme! Lab Software License, vesion 1.1.1 # - LGPL, version 2.1 # - Lesser General Public License (LGPL) v 3.0 +# - Lesser General Public License (LPGL) +# - Lesser General Public License (LPGL) v 2.1 +# - Lesser General Public License (LPGL) version 3.0 # - MIT License # - Mozilla Public License 1.1 (MPL 1.1) # - New BSD License @@ -28,7 +32,6 @@ # Please fill the missing licenses for dependencies : # # -#Thu Apr 20 14:23:02 CEST 2017 +#Tue Nov 21 18:04:41 CET 2017 com.googlecode.juniversalchardet--juniversalchardet--1.0.3=Mozilla Public License 1.1 (MPL 1.1) -commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 -org.antlr--antlr-runtime--3.3=BSD licence +org.antlr--antlr-runtime--3.3=BSD License diff --git a/duniter4j-es-subscription/src/main/filtered-resources/plugin-descriptor.properties b/duniter4j-es-subscription/src/main/filtered-resources/plugin-descriptor.properties index 2f0b3765..93ed139a 100644 --- a/duniter4j-es-subscription/src/main/filtered-resources/plugin-descriptor.properties +++ b/duniter4j-es-subscription/src/main/filtered-resources/plugin-descriptor.properties @@ -5,5 +5,5 @@ site=false jvm=true classname=org.duniter.elasticsearch.subscription.Plugin java.version=1.8 -elasticsearch.version=2.4.5 +elasticsearch.version=2.4.6 isolated=false diff --git a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/synchro/SynchroSubscriptionExecutionIndexAction.java b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/synchro/SynchroSubscriptionExecutionIndexAction.java index 0213b943..389aca62 100644 --- a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/synchro/SynchroSubscriptionExecutionIndexAction.java +++ b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/synchro/SynchroSubscriptionExecutionIndexAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.subscription.synchro; +/*- + * #%L + * Duniter4j :: ElasticSearch Subscription plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.client.model.bma.EndpointApi; import org.duniter.core.service.CryptoService; import org.duniter.elasticsearch.client.Duniter4jClient; diff --git a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/synchro/SynchroSubscriptionRecordAction.java b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/synchro/SynchroSubscriptionRecordAction.java index e292cd2b..20ba40e8 100644 --- a/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/synchro/SynchroSubscriptionRecordAction.java +++ b/duniter4j-es-subscription/src/main/java/org/duniter/elasticsearch/subscription/synchro/SynchroSubscriptionRecordAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.subscription.synchro; +/*- + * #%L + * Duniter4j :: ElasticSearch Subscription plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.client.model.bma.EndpointApi; import org.duniter.core.service.CryptoService; import org.duniter.elasticsearch.client.Duniter4jClient; diff --git a/duniter4j-es-subscription/src/test/es-home/config/elasticsearch.yml b/duniter4j-es-subscription/src/test/es-home/config/elasticsearch.yml index 8bec1e82..41a32f79 100644 --- a/duniter4j-es-subscription/src/test/es-home/config/elasticsearch.yml +++ b/duniter4j-es-subscription/src/test/es-home/config/elasticsearch.yml @@ -125,8 +125,8 @@ duniter.blockchain.enable: false # # Duniter node to synchronize # -duniter.host: cgeek.fr -duniter.port: 9330 +duniter.host: g1-test.duniter.org +duniter.port: 10900 # # ---------------------------------- Duniter4j security ------------------------- # diff --git a/duniter4j-es-subscription/src/test/es-home/plugins/mapper-attachments/plugin-descriptor.properties b/duniter4j-es-subscription/src/test/es-home/plugins/mapper-attachments/plugin-descriptor.properties index 241c0434..49bd43a2 100644 --- a/duniter4j-es-subscription/src/test/es-home/plugins/mapper-attachments/plugin-descriptor.properties +++ b/duniter4j-es-subscription/src/test/es-home/plugins/mapper-attachments/plugin-descriptor.properties @@ -68,7 +68,7 @@ java.version=1.7 # elasticsearch release. This version is checked when the plugin # is loaded so Elasticsearch will refuse to start in the presence of # plugins with the incorrect elasticsearch.version. -elasticsearch.version=2.4.5 +elasticsearch.version=2.4.6 # ### deprecated elements for jvm plugins : # diff --git a/duniter4j-es-subscription/src/test/java/org/duniter/elasticsearch/subscription/service/SubscriptionServiceTest.java b/duniter4j-es-subscription/src/test/java/org/duniter/elasticsearch/subscription/service/SubscriptionServiceTest.java index 30147068..72aa10fd 100644 --- a/duniter4j-es-subscription/src/test/java/org/duniter/elasticsearch/subscription/service/SubscriptionServiceTest.java +++ b/duniter4j-es-subscription/src/test/java/org/duniter/elasticsearch/subscription/service/SubscriptionServiceTest.java @@ -147,9 +147,11 @@ public class SubscriptionServiceTest { ObjectMapper objectMapper = JacksonUtils.getThreadObjectMapper(); EmailSubscription subscription = new EmailSubscription(); + subscription.setVersion(2); subscription.setIssuer(wallet.getPubKeyHash()); subscription.setTime(System.currentTimeMillis()/1000); subscription.setRecipient(resource.getPluginSettings().getNodePubkey()); + subscription.setType(EmailSubscription.TYPE); // Encrypt email then fill String email = resource.getPluginSettings().getMailAdmin(); @@ -157,6 +159,7 @@ public class SubscriptionServiceTest { EmailSubscription.Content content = EmailSubscription.newContent(); content.setEmail(email); + //content.setFrequency(EmailSubscription.Frequency.daily); String jsonContent = objectMapper.writeValueAsString(content); String cypherContent = cryptoService.box(jsonContent, nonce, wallet.getSecKey(), wallet.getPubKey()); @@ -169,8 +172,9 @@ public class SubscriptionServiceTest { json = JsonAttributeParser.newStringParser(Record.PROPERTY_SIGNATURE).removeFromJson(json); json = JsonAttributeParser.newStringParser(Record.PROPERTY_HASH).removeFromJson(json); - subscription.setHash(cryptoService.hash(json)); - subscription.setSignature(cryptoService.sign(json, wallet.getSecKey())); + String hash = cryptoService.hash(json); + subscription.setHash(hash); + subscription.setSignature(cryptoService.sign(hash, wallet.getSecKey())); return subscription; } diff --git a/duniter4j-es-user/LICENSE b/duniter4j-es-user/LICENSE deleted file mode 100644 index 6df63bc4..00000000 --- a/duniter4j-es-user/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 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 General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is 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. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - 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. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - 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 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. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to reference or combine any covered work with a work licensed -under version 3 of the GNU Affero 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 special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 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 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 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 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 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 the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - 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 GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/duniter4j-es-user/pom.xml b/duniter4j-es-user/pom.xml index ec558370..f242d47e 100644 --- a/duniter4j-es-user/pom.xml +++ b/duniter4j-es-user/pom.xml @@ -10,6 +10,7 @@ <artifactId>duniter4j-es-user</artifactId> <packaging>jar</packaging> <name>Duniter4j :: ElasticSearch User plugin</name> + <description>A ElasticSearch plugin used to store user data, such as profiles, private messages and pages</description> <dependencies> <dependency> @@ -33,6 +34,12 @@ </dependency> <!-- Unit test --> + <dependency> + <groupId>org.elasticsearch.plugin</groupId> + <artifactId>mapper-attachments</artifactId> + <version>${elasticsearch.version}</version> + <scope>test</scope> + </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> diff --git a/duniter4j-es-user/src/license/THIRD-PARTY.properties b/duniter4j-es-user/src/license/THIRD-PARTY.properties deleted file mode 100644 index f89b2cbe..00000000 --- a/duniter4j-es-user/src/license/THIRD-PARTY.properties +++ /dev/null @@ -1,26 +0,0 @@ -# Generated by org.codehaus.mojo.license.AddThirdPartyMojo -#------------------------------------------------------------------------------- -# Already used licenses in project : -# - Apache License 2.0 -# - Apache License Version 2.0 -# - BSD License -# - CC0 1.0 Universal -# - CDDL -# - COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 -# - Common Development and Distribution License (CDDL) v1.0 -# - Dual license consisting of the CDDL v1.1 and GPL v2 -# - GPLv2+CE -# - General Public License (GPL) v3 -# - 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 -# - Public Domain, per Creative Commons CC0 -# - The Apache Software License, Version 2.0 -#------------------------------------------------------------------------------- -# Please fill the missing licenses for dependencies : -# -# -#Tue Mar 28 09:03:14 CEST 2017 -commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0 diff --git a/duniter4j-es-user/src/main/filtered-resources/plugin-descriptor.properties b/duniter4j-es-user/src/main/filtered-resources/plugin-descriptor.properties index 12990157..f09cec35 100644 --- a/duniter4j-es-user/src/main/filtered-resources/plugin-descriptor.properties +++ b/duniter4j-es-user/src/main/filtered-resources/plugin-descriptor.properties @@ -5,5 +5,5 @@ site=false jvm=true classname=org.duniter.elasticsearch.user.Plugin java.version=1.8 -elasticsearch.version=2.4.5 +elasticsearch.version=2.4.6 isolated=false diff --git a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/dao/profile/UserProfileDao.java b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/dao/profile/UserProfileDao.java index 92871492..261569df 100644 --- a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/dao/profile/UserProfileDao.java +++ b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/dao/profile/UserProfileDao.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user.dao.profile; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.elasticsearch.user.dao.RecordDao; public interface UserProfileDao<T extends UserProfileDao> extends RecordDao<T> { diff --git a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/dao/profile/UserSettingsDao.java b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/dao/profile/UserSettingsDao.java index 4f267f86..b1057437 100644 --- a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/dao/profile/UserSettingsDao.java +++ b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/dao/profile/UserSettingsDao.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user.dao.profile; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.elasticsearch.user.dao.RecordDao; public interface UserSettingsDao<T extends UserSettingsDao> extends RecordDao<T> { diff --git a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/group/SynchroGroupCommentAction.java b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/group/SynchroGroupCommentAction.java index 5f6bb899..ea618a1f 100644 --- a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/group/SynchroGroupCommentAction.java +++ b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/group/SynchroGroupCommentAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user.synchro.group; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.service.CryptoService; import org.duniter.elasticsearch.client.Duniter4jClient; import org.duniter.elasticsearch.synchro.AbstractSynchroAction; diff --git a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/group/SynchroGroupRecordAction.java b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/group/SynchroGroupRecordAction.java index 8a787bda..2bdd76e9 100644 --- a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/group/SynchroGroupRecordAction.java +++ b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/group/SynchroGroupRecordAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user.synchro.group; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.service.CryptoService; import org.duniter.elasticsearch.client.Duniter4jClient; import org.duniter.elasticsearch.synchro.SynchroService; diff --git a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/history/SynchroHistoryIndexAction.java b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/history/SynchroHistoryIndexAction.java index 7e4f6a72..0b09ccc9 100644 --- a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/history/SynchroHistoryIndexAction.java +++ b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/history/SynchroHistoryIndexAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user.synchro.history; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.fasterxml.jackson.databind.JsonNode; import org.duniter.core.service.CryptoService; import org.duniter.elasticsearch.client.Duniter4jClient; diff --git a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/invitation/SynchroInvitationCertificationIndexAction.java b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/invitation/SynchroInvitationCertificationIndexAction.java index afe743f2..4a99fd15 100644 --- a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/invitation/SynchroInvitationCertificationIndexAction.java +++ b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/invitation/SynchroInvitationCertificationIndexAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user.synchro.invitation; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.fasterxml.jackson.databind.JsonNode; import org.duniter.core.service.CryptoService; import org.duniter.elasticsearch.client.Duniter4jClient; diff --git a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/message/SynchroMessageInboxIndexAction.java b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/message/SynchroMessageInboxIndexAction.java index 595e1bb6..e5a2fadf 100644 --- a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/message/SynchroMessageInboxIndexAction.java +++ b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/message/SynchroMessageInboxIndexAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user.synchro.message; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.fasterxml.jackson.databind.JsonNode; import org.duniter.core.service.CryptoService; import org.duniter.elasticsearch.client.Duniter4jClient; diff --git a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/message/SynchroMessageOutboxIndexAction.java b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/message/SynchroMessageOutboxIndexAction.java index 17c20aba..70ad3d50 100644 --- a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/message/SynchroMessageOutboxIndexAction.java +++ b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/message/SynchroMessageOutboxIndexAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user.synchro.message; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.service.CryptoService; import org.duniter.elasticsearch.client.Duniter4jClient; import org.duniter.elasticsearch.synchro.SynchroService; diff --git a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/page/SynchroPageCommentAction.java b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/page/SynchroPageCommentAction.java index b7c9818d..be42592e 100644 --- a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/page/SynchroPageCommentAction.java +++ b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/page/SynchroPageCommentAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user.synchro.page; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.service.CryptoService; import org.duniter.elasticsearch.client.Duniter4jClient; import org.duniter.elasticsearch.synchro.SynchroService; diff --git a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/page/SynchroPageRecordAction.java b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/page/SynchroPageRecordAction.java index b8a283df..99bc81be 100644 --- a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/page/SynchroPageRecordAction.java +++ b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/page/SynchroPageRecordAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user.synchro.page; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.service.CryptoService; import org.duniter.elasticsearch.client.Duniter4jClient; import org.duniter.elasticsearch.synchro.SynchroService; diff --git a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/user/SynchroUserProfileAction.java b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/user/SynchroUserProfileAction.java index 9f5dedf8..f11a606b 100644 --- a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/user/SynchroUserProfileAction.java +++ b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/user/SynchroUserProfileAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user.synchro.user; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.fasterxml.jackson.databind.JsonNode; import org.duniter.core.service.CryptoService; import org.duniter.elasticsearch.client.Duniter4jClient; diff --git a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/user/SynchroUserSettingsAction.java b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/user/SynchroUserSettingsAction.java index 180b1bc7..2b238c0b 100644 --- a/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/user/SynchroUserSettingsAction.java +++ b/duniter4j-es-user/src/main/java/org/duniter/elasticsearch/user/synchro/user/SynchroUserSettingsAction.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user.synchro.user; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import com.fasterxml.jackson.databind.JsonNode; import org.duniter.core.service.CryptoService; import org.duniter.elasticsearch.client.Duniter4jClient; diff --git a/duniter4j-es-user/src/test/es-home/plugins/duniter4j-es-core/plugin-descriptor.properties b/duniter4j-es-user/src/test/es-home/plugins/duniter4j-es-core/plugin-descriptor.properties index 1d55cb59..4a58004f 100644 --- a/duniter4j-es-user/src/test/es-home/plugins/duniter4j-es-core/plugin-descriptor.properties +++ b/duniter4j-es-user/src/test/es-home/plugins/duniter4j-es-core/plugin-descriptor.properties @@ -5,5 +5,5 @@ site=false jvm=true classname=org.duniter.elasticsearch.Plugin java.version=1.8 -elasticsearch.version=2.4.5 +elasticsearch.version=2.4.6 isolated=false diff --git a/duniter4j-es-user/src/test/es-home/plugins/mapper-attachments/plugin-descriptor.properties b/duniter4j-es-user/src/test/es-home/plugins/mapper-attachments/plugin-descriptor.properties new file mode 100644 index 00000000..49bd43a2 --- /dev/null +++ b/duniter4j-es-user/src/test/es-home/plugins/mapper-attachments/plugin-descriptor.properties @@ -0,0 +1,80 @@ +# Elasticsearch plugin descriptor file +# This file must exist as 'plugin-descriptor.properties' at +# the root directory of all plugins. +# +# A plugin can be 'site', 'jvm', or both. +# +### example site plugin for "foo": +# +# foo.zip <-- zip file for the plugin, with this structure: +# _site/ <-- the contents that will be served +# plugin-descriptor.properties <-- example contents below: +# +# site=true +# description=My cool plugin +# version=1.0 +# +### example jvm plugin for "foo" +# +# foo.zip <-- zip file for the plugin, with this structure: +# <arbitrary name1>.jar <-- classes, resources, dependencies +# <arbitrary nameN>.jar <-- any number of jars +# plugin-descriptor.properties <-- example contents below: +# +# jvm=true +# classname=foo.bar.BazPlugin +# description=My cool plugin +# version=2.0.0-rc1 +# elasticsearch.version=2.0 +# java.version=1.7 +# +### mandatory elements for all plugins: +# +# 'description': simple summary of the plugin +description=The mapper attachments plugin adds the attachment type to Elasticsearch using Apache Tika. +# +# 'version': plugin's version +version=2.3.3 +# +# 'name': the plugin name +name=mapper-attachments + +### mandatory elements for site plugins: +# +# 'site': set to true to indicate contents of the _site/ +# directory in the root of the plugin should be served. +site=false +# +### mandatory elements for jvm plugins : +# +# 'jvm': true if the 'classname' class should be loaded +# from jar files in the root directory of the plugin. +# Note that only jar files in the root directory are +# added to the classpath for the plugin! If you need +# other resources, package them into a resources jar. +jvm=true +# +# 'classname': the name of the class to load, fully-qualified. +classname=org.elasticsearch.mapper.attachments.MapperAttachmentsPlugin +# +# 'java.version' version of java the code is built against +# use the system property java.specification.version +# version string must be a sequence of nonnegative decimal integers +# separated by "."'s and may have leading zeros +java.version=1.7 +# +# 'elasticsearch.version' version of elasticsearch compiled against +# You will have to release a new version of the plugin for each new +# elasticsearch release. This version is checked when the plugin +# is loaded so Elasticsearch will refuse to start in the presence of +# plugins with the incorrect elasticsearch.version. +elasticsearch.version=2.4.6 +# +### deprecated elements for jvm plugins : +# +# 'isolated': true if the plugin should have its own classloader. +# passing false is deprecated, and only intended to support plugins +# that have hard dependencies against each other. If this is +# not specified, then the plugin is isolated by default. +isolated=true +# diff --git a/duniter4j-es-user/src/test/es-home/plugins/mapper-attachments/plugin-security.policy b/duniter4j-es-user/src/test/es-home/plugins/mapper-attachments/plugin-security.policy new file mode 100644 index 00000000..32647666 --- /dev/null +++ b/duniter4j-es-user/src/test/es-home/plugins/mapper-attachments/plugin-security.policy @@ -0,0 +1,34 @@ +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch 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. + */ + +// NOTE: when modifying this file, look at restrictions in TikaImpl too +grant { + // needed to apply additional sandboxing to tika parsing + permission java.security.SecurityPermission "createAccessControlContext"; + + // TODO: fix PDFBox not to actually install bouncy castle like this + permission java.security.SecurityPermission "putProviderProperty.BC"; + permission java.security.SecurityPermission "insertProvider"; + // needed only on java 7 + permission java.security.SecurityPermission "insertProvider.BC"; + // TODO: fix POI XWPF to not do this: https://bz.apache.org/bugzilla/show_bug.cgi?id=58597 + permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; + // needed by xmlbeans, as part of POI for MS xml docs + permission java.lang.RuntimePermission "getClassLoader"; +}; diff --git a/duniter4j-es-user/src/test/java/org/duniter/elasticsearch/user/TestConfiguration.java b/duniter4j-es-user/src/test/java/org/duniter/elasticsearch/user/TestConfiguration.java index 29d8a0f4..d2acaa0c 100644 --- a/duniter4j-es-user/src/test/java/org/duniter/elasticsearch/user/TestConfiguration.java +++ b/duniter4j-es-user/src/test/java/org/duniter/elasticsearch/user/TestConfiguration.java @@ -1,5 +1,27 @@ package org.duniter.elasticsearch.user; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + import org.duniter.core.exception.TechnicalException; import org.nuiton.config.ApplicationConfig; import org.nuiton.config.ArgumentsParserException; diff --git a/duniter4j-es-user/src/test/java/org/duniter/elasticsearch/user/service/SynchroServiceTest.java b/duniter4j-es-user/src/test/java/org/duniter/elasticsearch/user/service/SynchroServiceTest.java index 9df5014b..c75b643f 100644 --- a/duniter4j-es-user/src/test/java/org/duniter/elasticsearch/user/service/SynchroServiceTest.java +++ b/duniter4j-es-user/src/test/java/org/duniter/elasticsearch/user/service/SynchroServiceTest.java @@ -1,7 +1,33 @@ package org.duniter.elasticsearch.user.service; +/*- + * #%L + * Duniter4j :: ElasticSearch User plugin + * %% + * Copyright (C) 2014 - 2017 EIS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import org.duniter.core.client.config.Configuration; +import org.duniter.core.client.model.bma.EndpointApi; import org.duniter.core.client.model.local.Peer; +import org.duniter.core.client.model.local.Peers; import org.duniter.elasticsearch.model.SynchroResult; +import org.duniter.elasticsearch.service.CurrencyService; import org.duniter.elasticsearch.service.ServiceLocator; import org.duniter.elasticsearch.synchro.SynchroService; import org.duniter.elasticsearch.user.TestResource; @@ -19,26 +45,50 @@ public class SynchroServiceTest { @ClassRule public static final TestResource resource = TestResource.create(); + private CurrencyService currencyService; private SynchroService service; private Peer peer; @Before public void setUp() throws Exception { + currencyService = ServiceLocator.instance().getBean(CurrencyService.class); service = ServiceLocator.instance().getBean(SynchroService.class); peer = new Peer.Builder() .setHost(resource.getConfiguration().getDataSyncHost()) - .setPort(resource.getConfiguration().getDataSyncPort()).build(); + .setPort(resource.getConfiguration().getDataSyncPort()) + .setCurrency(resource.getFixtures().getCurrency()) + .build(); while(!service.isReady()) { Thread.sleep(1000); } + // Init the currency index + Configuration config = Configuration.instance(); + currencyService.createIndexIfNotExists().indexCurrencyFromPeer(new Peer.Builder() + .setHost(config.getNodeHost()) + .setPort(config.getNodePort()).build()); + + // Init data indices + ServiceLocator.instance().getBean(UserService.class).createIndexIfNotExists(); + ServiceLocator.instance().getBean(HistoryService.class).createIndexIfNotExists(); + ServiceLocator.instance().getBean(PageService.class).createIndexIfNotExists(); + ServiceLocator.instance().getBean(GroupService.class).createIndexIfNotExists(); + Thread.sleep(5000); } @Test public void synchronizePeer() throws Exception { + // Set a id (require for saving the synchro execution) + peer.setId("fake-hash"); + + // Set the API (require for synchro) + peer.setApi(EndpointApi.ES_USER_API.name()); + SynchroResult result = service.synchronizePeer(peer, false); + Assert.assertNotNull(result); + Assert.assertTrue(result.getInserts() > 0); } diff --git a/duniter4j-es-user/src/test/resources/log4j.properties b/duniter4j-es-user/src/test/resources/log4j.properties index 2712b72e..1c39b0d7 100644 --- a/duniter4j-es-user/src/test/resources/log4j.properties +++ b/duniter4j-es-user/src/test/resources/log4j.properties @@ -8,11 +8,14 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %5p (%c:%L) - [%t] %m%n # duniter4j levels -log4j.logger.org.duniter=INFO -#log4j.logger.org.duniter=DEBUG +#log4j.logger.org.duniter=INFO +log4j.logger.org.duniter=DEBUG log4j.logger.org.duniter.core=WARN log4j.logger.org.duniter.elasticsearch=DEBUG # Other frameworks levels log4j.logger.org.elasticsearch=INFO +log4j.logger.org.apache.http=WARN +log4j.logger.org.glassfish.grizzly=WARN +log4j.logger.org.glassfish.tyrus=WARN diff --git a/pom.xml b/pom.xml index e41b67b9..2da59a99 100644 --- a/pom.xml +++ b/pom.xml @@ -5,16 +5,27 @@ <artifactId>duniter4j</artifactId> <version>1.0.0-RC3-SNAPSHOT</version> <packaging>pom</packaging> - <name>Duniter4j : a Duniter Java Client API</name> + <name>Duniter4j</name> + <description>a Duniter Java Client API</description> + + <url>http://doc.e-is.pro/duniter4j/</url> + <inceptionYear>2014</inceptionYear> + <organization> + <name>Duniter Team</name> + <url>http://www.duniter.fr</url> + </organization> <prerequisites> <maven>3.1.1</maven> </prerequisites> <properties> - <!-- source file encoding --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <javaVersion>8</javaVersion> + + <!-- Project properties --> + <javaVersion>1.8</javaVersion> + <signatureArtifactId>java18</signatureArtifactId> + <signatureVersion>1.0</signatureVersion> <!-- Commons versions --> <file.encoding>UTF-8</file.encoding> @@ -23,15 +34,18 @@ <guava.version>22.0</guava.version> <xml-apis.version>2.0.2</xml-apis.version> <kalium.version>0.5.0_blavenie</kalium.version> - <jnr-ffi.version>2.0.5</jnr-ffi.version> + <jnr-ffi.version>2.1.0</jnr-ffi.version> <scrypt.version>1.4.0</scrypt.version> - <elasticsearch.version>2.4.5</elasticsearch.version> - <jna.version>4.1.0</jna.version> - <tyrus.version>1.13</tyrus.version> - - <nuitonConfigVersion>3.0-rc-4</nuitonConfigVersion> + <elasticsearch.version>2.4.6</elasticsearch.version> + <jna.version>4.2.0</jna.version> + <tyrus.version>1.13.1</tyrus.version> + <jackson.version>2.8.1</jackson.version> + <stringtemplate.version>4.0.2</stringtemplate.version> + <jTextUtilsVersion>0.3.3</jTextUtilsVersion> + + <nuitonConfigVersion>3.1</nuitonConfigVersion> <nuitonVersionVersion>1.0-rc-2</nuitonVersionVersion> - <nuitonI18nVersion>3.5</nuitonI18nVersion> + <nuitonI18nVersion>3.6.3</nuitonI18nVersion> <!-- UI versions --> <spring.version>4.2.1.RELEASE</spring.version> @@ -41,13 +55,12 @@ <junit.version>4.12</junit.version> <jetty.version>9.0.4.v20130625</jetty.version> - <!--license-maven-plugin config --> - <maven.license.file>${project.basedir}/LICENSE</maven.license.file> + <maven.license.file>${project.basedir}/LICENSE.txt</maven.license.file> <license.licenseFile>${maven.license.file}</license.licenseFile> <license.useMissingFile>true</license.useMissingFile> <license.failIfWarning>true</license.failIfWarning> - <license.organizationName>EIS</license.organizationName> + <license.organizationName>${project.organization.name}</license.organizationName> <license.licenseName>gpl_v3</license.licenseName> <!-- release config --> @@ -55,14 +68,36 @@ <goals>deploy</goals> <arguments>-DperformFullRelease</arguments> <preparationGoals>verify</preparationGoals> - <projectInfoReportsPluginVersion>2.7</projectInfoReportsPluginVersion> <!-- Last JRE version to use --> <jreVersion>1.8.77</jreVersion> - <jarPluginVersion>2.5</jarPluginVersion> - - <locales>en,fr</locales> + <!-- nuiton maven plugins version --> + <jrstPluginVersion>2.1</jrstPluginVersion> + <helperPluginVersion>2.3.2</helperPluginVersion> + + <!-- apache maven plugins version --> + <jarPluginVersion>3.0.2</jarPluginVersion> + <sitePluginVersion>3.6</sitePluginVersion> + <changesPluginVersion>2.12.1</changesPluginVersion> + <changelogPluginVersion>2.3</changelogPluginVersion> + <projectInfoReportsPluginVersion>2.9</projectInfoReportsPluginVersion> + <jrxPluginVersion>2.5</jrxPluginVersion> + <surefirePluginVersion>2.20.1</surefirePluginVersion> + <markdownPluginVersion>1.7</markdownPluginVersion> + <enforcerPluginVersion>1.4.1</enforcerPluginVersion> + <sourcePluginVersion>3.0.1</sourcePluginVersion> + <releasePluginVersion>2.5.3</releasePluginVersion> + + <!-- codehaus mojo plugins --> + <licensePluginVersion>1.13</licensePluginVersion> + <execPluginVersion>1.6.0</execPluginVersion> + <wagonPluginVersion>1.0</wagonPluginVersion> + <versionsPluginVersion>2.3</versionsPluginVersion> + <findbugsPluginVersion>3.0.5</findbugsPluginVersion> + + <!-- web site --> + <locales>en</locales> <!-- I18n configuration --> <i18n.bundles>fr_FR,en_GB</i18n.bundles> @@ -81,17 +116,19 @@ <maven.javadoc.skip>true</maven.javadoc.skip> <!-- distribution management --> - <distribution.site.id>eis-public-reports</distribution.site.id> - <distribution.site.host>server.e-is.pro:22</distribution.site.host> - <distribution.site.repository>scp://${distribution.site.host}/var/www</distribution.site.repository> - <distribution.site.projectId>duniter4j</distribution.site.projectId> - <distribution.repository.id>eis-nexus-deploy</distribution.repository.id> - <distribution.repository.url>http://nexus.e-is.pro/nexus/content/repositories/duniter4j-releases</distribution.repository.url> - <distribution.internet.url>${distribution.repository.url}</distribution.internet.url> - <distribution.snapshotRepository.id>eis-nexus-deploy</distribution.snapshotRepository.id> - <distribution.snapshotRepository.url>http://nexus.e-is.pro/nexus/content/repositories/duniter4j-snapshots</distribution.snapshotRepository.url> + <projectId>${project.artifactId}</projectId> + <site.server>eis-public-reports</site.server> + <distribution.site.host>doc.e-is.pro</distribution.site.host> + <site.repository>scpexe://${distribution.site.host}/var/www/doc.e-is.pro/duniter4j</site.repository> + <release.server>eis-nexus-deploy</release.server> + <release.repository>http://nexus.e-is.pro/nexus/content/repositories/duniter4j-releases</release.repository> + <snapshot.server>eis-nexus-deploy</snapshot.server> + <snapshot.repository>http://nexus.e-is.pro/nexus/content/repositories/duniter4j-snapshots</snapshot.repository> <assembly.skip>false</assembly.skip> + + <!-- to deploy with scpexe for maven 3 --> + <wagonSshVersion>2.12</wagonSshVersion> </properties> <licenses> @@ -102,8 +139,6 @@ </license> </licenses> - <inceptionYear>2014</inceptionYear> - <modules> <module>duniter4j-core-shared</module> <module>duniter4j-core-client</module> @@ -156,13 +191,29 @@ <dependency> <groupId>org.antlr</groupId> <artifactId>stringtemplate</artifactId> - <version>4.0.2</version> + <version>${stringtemplate.version}</version> + <exclusions> + <exclusion> + <groupId>org.antlr</groupId> + <artifactId>stringtemplate</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.6</version> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>2.5</version> + </dependency> <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> @@ -219,6 +270,12 @@ <version>1.1</version> </dependency> + <dependency> + <groupId>dnl.utils</groupId> + <artifactId>j-text-utils</artifactId> + <version>${jTextUtilsVersion}</version> + </dependency> + <!-- NaCL lib --> <dependency> <groupId>org.abstractj.kalium</groupId> @@ -259,7 +316,7 @@ <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> - <version>2.6.6</version> + <version>${jackson.version}</version> </dependency> <!-- WebSocket --> @@ -318,20 +375,26 @@ </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> + <version>${findbugsPluginVersion}</version> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>license-maven-plugin</artifactId> - <version>1.9</version> + <version>${licensePluginVersion}</version> </plugin> <plugin> <artifactId>maven-enforcer-plugin</artifactId> - <version>1.3.1</version> + <version>${enforcerPluginVersion}</version> </plugin> <plugin> <artifactId>maven-source-plugin</artifactId> - <version>2.3</version> + <version>${sourcePluginVersion}</version> </plugin> <plugin> @@ -346,35 +409,35 @@ <plugin> <artifactId>maven-release-plugin</artifactId> - <version>2.5.1</version> - <configuration> - <autoVersionSubmodules>true</autoVersionSubmodules> - </configuration> + <version>${releasePluginVersion}</version> </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> - <version>2.5</version> + <version>3.0.0</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>wagon-maven-plugin</artifactId> - <version>1.0</version> + <version>${wagonPluginVersion}</version> </plugin> + <plugin> - <artifactId>maven-changes-plugin</artifactId> - <version>2.11</version> + <groupId>org.codehaus.mojo</groupId> + <artifactId>versions-maven-plugin</artifactId> + <version>${versionsPluginVersion}</version> <configuration> - <escapeHTML>false</escapeHTML> - <feedType>rss_2.0</feedType> - <issueLinkTemplatePerSystem> - <default>${project.url}/issues/%ISSUE%</default> - </issueLinkTemplatePerSystem> + <generateBackupPoms>false</generateBackupPoms> </configuration> </plugin> + <plugin> + <artifactId>maven-changes-plugin</artifactId> + <version>${changesPluginVersion}</version> + </plugin> + <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> @@ -398,7 +461,7 @@ <plugin> <artifactId>maven-jar-plugin</artifactId> <version>${jarPluginVersion}</version> - + <inherited>true</inherited> <configuration> <archive> <!-- cela fait bugger le chargement des service via ServiceLoader donc on desactive --> @@ -439,7 +502,7 @@ <dependency> <groupId>ant-contrib</groupId> <artifactId>ant-contrib</artifactId> - <version>1.0b2</version> + <version>1.0b3</version> <exclusions> <exclusion> <groupId>ant</groupId> @@ -454,27 +517,115 @@ </pluginManagement> <plugins> + <plugin> <artifactId>maven-enforcer-plugin</artifactId> <executions> <execution> - <id>enforce-maven</id> + <id>enforce-project-files</id> <goals> <goal>enforce</goal> </goals> + <phase>validate</phase> <configuration> <rules> - <requireMavenVersion> - <version>3.1.1</version> - </requireMavenVersion> + <requireFilesExist> + <files> + <file>LICENSE.txt</file> + </files> + </requireFilesExist> </rules> + <ignoreCache>true</ignoreCache> + <failFast>true</failFast> + <fail>true</fail> + </configuration> </execution> + + <execution> + <id>enforce-javaVersion</id> + <goals> + <goal>enforce</goal> + </goals> + <phase>validate</phase> + <configuration> + <rules> + <requireProperty> + <property>javaVersion</property> + <message>"javaVersion property must be specified."</message> + <regex>1\.6|1\.7|1\.8$</regex> + <regexMessage>"javaVersion property can not be empty and must be 1.6 or 1.7 or 1.8."</regexMessage> + </requireProperty> + </rules> + <ignoreCache>true</ignoreCache> + <failFast>true</failFast> + <fail>true</fail> + </configuration> + </execution> + + <execution> + <id>enforce-java-versions</id> + <goals> + <goal>enforce</goal> + </goals> + <phase>validate</phase> + <configuration> + <rules> + <requireJavaVersion> + <version>${javaVersion}</version> + </requireJavaVersion> + </rules> + </configuration> + </execution> + </executions> </plugin> + <!-- site --> + <plugin> + <artifactId>maven-site-plugin</artifactId> + <version>${sitePluginVersion}</version> + <dependencies> + <dependency> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-module-markdown</artifactId> + <version>${markdownPluginVersion}</version> + </dependency> + </dependencies> + </plugin> + + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>nuiton-config-maven-plugin</artifactId> + <version>${nuitonConfigVersion}</version> + </plugin> + + <plugin> + <groupId>org.nuiton</groupId> + <artifactId>helper-maven-plugin</artifactId> + <version>${helperPluginVersion}</version> + <configuration> + <!-- avoid error on hibernate-maven-plugin IFR version--> + <failIfNotSafe>false</failIfNotSafe> + </configuration> + </plugin> + </plugins> + <!-- Enabling the use of scpexe with maven 3.0 --> + <extensions> + <extension> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-ssh-external</artifactId> + <version>${wagonSshVersion}</version> + </extension> + <!-- Enabling the use of scp/sftp:// with maven 3.0 --> + <extension> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-ssh</artifactId> + <version>${wagonSshVersion}</version> + </extension> + </extensions> </build> <!-- Repositories needed to find the dependencies --> @@ -494,27 +645,32 @@ </repositories> <pluginRepositories> - <!-- Need for javascript minify maven plugin (yuicompressor-maven-plugin) --> <pluginRepository> - <name>oss.sonatype.org</name> - <id>oss.sonatype.org</id> - <url>http://oss.sonatype.org/content/groups/public</url> + <id>duniter4j-public-group</id> + <url>http://nexus.e-is.pro/nexus/content/groups/duniter4j</url> + <snapshots> + <enabled>true</enabled> + <checksumPolicy>fail</checksumPolicy> + </snapshots> + <releases> + <enabled>true</enabled> + <checksumPolicy>fail</checksumPolicy> + </releases> </pluginRepository> </pluginRepositories> <distributionManagement> <repository> - <uniqueVersion>true</uniqueVersion> - <id>${distribution.repository.id}</id> - <url>${distribution.repository.url}</url> + <id>${release.server}</id> + <url>${release.repository}</url> </repository> <snapshotRepository> - <id>${distribution.snapshotRepository.id}</id> - <url>${distribution.snapshotRepository.url}</url> + <id>${snapshot.server}</id> + <url>${snapshot.repository}</url> </snapshotRepository> <site> - <id>${distribution.site.id}</id> - <url>${distribution.site.repository}/${distribution.site.projectId}</url> + <id>${site.server}</id> + <url>${site.repository}</url> </site> </distributionManagement> @@ -559,6 +715,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> + <version>${execPluginVersion}</version> <executions> <execution> <id>run</id> @@ -688,40 +845,6 @@ </property> </activation> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-changes-plugin</artifactId> - <executions> - <execution> - <id>check-changes</id> - <phase>verify</phase> - <goals> - <goal>changes-check</goal> - </goals> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>com.github.github</groupId> - <artifactId>site-maven-plugin</artifactId> - <configuration> - <message>Creating site for ${project.version}</message> - </configuration> - <executions> - <execution> - <goals> - <goal>site</goal> - </goals> - <phase>site</phase> - </execution> - </executions> - </plugin> - </plugins> - </build> - <reporting> <plugins> <plugin> @@ -732,13 +855,13 @@ <reports> <report>project-team</report> <report>mailing-list</report> - <report>cim</report> + <!--<report>cim</report>--> <report>issue-tracking</report> <report>license</report> <report>scm</report> + <report>dependency-info</report> <report>dependencies</report> <report>dependency-convergence</report> - <report>dependency-info</report> <report>plugin-management</report> <report>plugins</report> <report>dependency-management</report> @@ -751,17 +874,29 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changelog-plugin</artifactId> + <version>${changelogPluginVersion}</version> + </plugin> + + <plugin> + <artifactId>maven-jxr-plugin</artifactId> + <version>${jrxPluginVersion}</version> + </plugin> + + <plugin> + <artifactId>maven-surefire-report-plugin</artifactId> + <version>${surefirePluginVersion}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-changes-plugin</artifactId> + <version>${changesPluginVersion}</version> <configuration> <aggregated>true</aggregated> <escapeHTML>false</escapeHTML> <feedType>rss_2.0</feedType> <issueLinkTemplatePerSystem> - <default>https://github.com/blavenie/duniter4j/issues/%ISSUE%</default> + <default>https://github.com/duniter/duniter4j/issues/%ISSUE%</default> </issueLinkTemplatePerSystem> </configuration> </plugin> @@ -769,7 +904,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>versions-maven-plugin</artifactId> - <version>2.3</version> + <version>${versionsPluginVersion}</version> <reportSets> <reportSet> <reports> @@ -783,20 +918,20 @@ <plugin> <groupId>org.nuiton</groupId> - <artifactId>nuiton-maven-report-plugin</artifactId> - <version>3.0</version> + <artifactId>nuiton-config-maven-plugin</artifactId> + <version>${nuitonConfigVersion}</version> <inherited>false</inherited> <reportSets> <reportSet> <reports> - <report>aggregate-config-report</report> + <report>aggregate-report</report> </reports> </reportSet> </reportSets> <configuration> - <i18nBundleName>duniter4j-i18n</i18nBundleName> + <include>duniter4j</include> + <i18nBundleName>duniter4j-client-i18n</i18nBundleName> <verbose>true</verbose> - <showOptionDetail>true</showOptionDetail> <outputEncoding>UTF-8</outputEncoding> </configuration> </plugin> diff --git a/doc/CLI.md b/src/site/markdown/CLI.md similarity index 86% rename from doc/CLI.md rename to src/site/markdown/CLI.md index 13fa7e56..573b073d 100644 --- a/doc/CLI.md +++ b/src/site/markdown/CLI.md @@ -2,16 +2,16 @@ ## Installation - - Download the file `duniter4j-client-<version>-full-<platform>.zip` from the [lastest releases page](https://www.github.com/duniter/duniter4j/releases) + - Download the file `duniter4j-client-<version>-full-<platform>.zip` from the [latest releases page](https://www.github.com/duniter/duniter4j/releases) - Unzip the archive; - The open a terminal and execute the script `duniter4j.sh` (or `duniter4j.bat`) : - ```bash +```bash cd duniter4j-client-<version> ./duniter4j.sh --help - ``` +``` ## Usage @@ -21,20 +21,20 @@ To send money to a pubkey, execute this command : ```bash - > ./duniter4j.sh transaction --auth-scrypt --amount 10 --output 2ny7YAdmzReQxAayyJZsyVYwYhVyax2thKcGknmQy5nQ --comment "Thks for Duniter" + ./duniter4j.sh transaction --auth-scrypt --amount 10 --output 2ny7YAdmzReQxAayyJZsyVYwYhVyax2thKcGknmQy5nQ --comment "Thks for Duniter" ``` ### Help - ```bash - > ./duniter4j.sh --help +```bash + ./duniter4j.sh --help Usage: <main class> [options] [command] [command options] Options: --config Fichier de configuration Default: duniter-client.config --help - Affichage de l'aide + Affichage de l''aide Default: false -debug Activer les logs de débuggage @@ -85,4 +85,4 @@ To send money to a pubkey, execute this command : --timeout HTTP request timeout, in millisecond - ``` \ No newline at end of file +``` \ No newline at end of file diff --git a/src/site/markdown/ES.md b/src/site/markdown/ES.md new file mode 100644 index 00000000..22702a1a --- /dev/null +++ b/src/site/markdown/ES.md @@ -0,0 +1,202 @@ +# ElastiSearch node + +## Install + +### Prerequisites + +#### Install Java + + - Install Java JRE 8 or more. + + - Windows: see [Oracle web site](http://oracle.com/java/index.html) + + - Linux (Ubuntu): + +```bash +sudo apt-get install openjdk-8-jre +``` + +### Install libsodium + +[The Sodium crypto library (libsodium)](https://download.libsodium.org/doc/installation/) is a modern, easy-to-use software library for encryption, decryption, signatures, password hashing and more. + +- Get libsodium (version 1.0.11 or newer) +``` + wget -kL https://github.com/jedisct1/libsodium/releases/download/1.0.14/libsodium-1.0.14.tar.gz + tar -xvf libsodium-1.0.14.tar.gz +``` + +- Installation: +``` + cd libsodium-1.0.14 + sudo apt-get install build-essential + sudo ./configure + sudo make && make check + sudo make install +``` + +### Install bundle (ElasticSearch + Duniter4j) + + - Download [lastest release](https://github.com/duniter/duniter4j/releases) of file duniter4j-es-X.Y-standalone.zip + + - Unzip + +```bash +unzip duniter4j-es-X.Y-standalone.zip +cd duniter4j-es-X.Y/config +``` + + - Edit the configuration file `config/elasticsearch.yml`, in particular this properties: + +```bash +# Your ES cluster name +cluster.name: duniter4j-elasticsearch + +# Use a descriptive name for the node: +node.name: ES-NODE-1 + +# Set the bind address to a specific IP (IPv4 or IPv6): +network.host: 192.168.0.28 + +# Set a custom port for HTTP: +http.port: 9203 + +# Duniter node to connect with +duniter.host: g1-test.duniter.org +duniter.port: 10900 + +# Initial list of hosts to perform synchronization +duniter.p2p.ping.endpoints: [ + "g1-test:ES_USER_API g1-test.data.duniter.fr 443", + "g1-test:ES_SUBSCRIPTION_API g1-test.data.duniter.fr 443" +] + +``` + + - Launch the node + +```bash +cd duniter4j-es-X.Y/bin +./elasticsearch +``` + +Output example (on [G1-test](http://g1-test.duniter.fr) currency): + +```bash +$ ./elasticsearch +[2016-09-24 00:16:45,803][INFO ][node ] [ES-NODE-1] version[2.3.3], pid[15365], build[218bdf1/2016-05-17T15:40:04Z] +[2016-09-24 00:16:45,804][INFO ][node ] [ES-NODE-1] initializing ... +[2016-09-24 00:16:46,257][INFO ][plugins ] [ES-NODE-1] modules [reindex, lang-expression, lang-groovy], plugins [mapper-attachments, duniter4j-elasticsearch], sites [duniter4j-elasticsearch] +[2016-09-24 00:16:46,270][INFO ][env ] [ES-NODE-1] using [1] data paths, mounts [[/home (/dev/mapper/isw_defjaaicfj_Volume1p1)]], net usable_space [1tb], net total_space [1.7tb], spins? [possibly], types [ext4] +[2016-09-24 00:16:46,270][INFO ][env ] [ES-NODE-1] heap size [989.8mb], compressed ordinary object pointers [true] +[2016-09-24 00:16:47,757][INFO ][node ] [ES-NODE-1] initialized +[2016-09-24 00:16:47,757][INFO ][node ] [ES-NODE-1] starting ... +[2016-09-24 00:16:47,920][INFO ][transport ] [ES-NODE-1] publish_address {192.168.0.5:9300}, bound_addresses {192.168.0.5:9300} +[2016-09-24 00:16:47,924][INFO ][discovery ] [ES-NODE-1] duniter4j-elasticsearch/jdzzh_jUTbuN26Enl-9whQ +[2016-09-24 00:16:50,982][INFO ][cluster.service ] [ES-NODE-1] detected_master {EIS-DEV}{FD0IzkxETM6tyOqzrKuVYw}{192.168.0.28}{192.168.0.28:9300}, added {{EIS-DEV}{FD0IzkxETM6tyOqzrKuVYw}{192.168.0.28}{192.168.0.28:9300},}, reason: zen-disco-receive(from master [{EIS-DEV}{FD0IzkxETM6tyOqzrKuVYw}{192.168.0.28}{192.168.0.28:9300}]) +[2016-09-24 00:16:53,570][INFO ][http ] [ES-NODE-1] publish_address {192.168.0.5:9203}, bound_addresses {192.168.0.5:9203} +[2016-09-24 00:16:53,570][INFO ][node ] [ES-NODE-1] started +[2016-09-24 00:16:57,850][INFO ][node ] Checking Duniter indices... +[2016-09-24 00:16:57,859][INFO ][node ] Checking Duniter indices... [OK] +[2016-09-24 00:17:08,026][INFO ][duniter.blockchain ] [g1-test] [g1-test.duniter.org:10900] Indexing last blocks... +[2016-09-24 00:17:08,026][INFO ][duniter.blockchain ] [g1-test] [g1-test.duniter.org:10900] Indexing block #999 / 41282 (2%)... +[2016-09-24 00:17:08,045][INFO ][duniter.blockchain ] [g1-test] [g1-test.duniter.org:10900] Indexing block #1998 / 41282 (4%)... +[2016-09-24 00:17:09,026][INFO ][duniter.blockchain ] [g1-test] [g1-test.duniter.org:10900] Indexing block #2997 / 41282 (6%)... +[2016-09-24 00:17:10,057][INFO ][duniter.blockchain ] [g1-test] [g1-test.duniter.org:10900] Indexing block #3996 / 41282 (8%)... +... +[2016-09-24 00:17:11,026][INFO ][duniter.blockchain ] [g1-gtest] [g1-test.duniter.org:10900] Indexing block #41282 - hash [00000AAD73B0E76B870E6779CD7ACCCE175802D7867C13B5C8ED077F380548C5] +``` + +### Test your node + +#### Using a web browser + +The following web address should works: http://localhost:9200/node/summary + +#### Using Cesium + +You should also be able to use your node in the [Cesium](https://github.com/duniter/cesium) application: + + - in the Cesium+ settings, replace the data node address; + - check if graph and profil avatar are display correctly. + + +## Request the ES node + +When a blockchain currency has been indexed, you can test some fun queries : + + - get a block by number (e.g the block #0): + + http://localhost:9200/g1-test/block/0 -> with some additional metadata given by ES + + http://localhost:9200/gtest/block/0/_source -> the original JSON block + + - Block #125 with only hash, dividend and memberCount: + + http://localhost:9200/gtest/block/125/_source?_source=number,hash,dividend,membersCount + + - All blocks using a pubkey (or whatever): + + http://localhost:9200/gtest/block/_search?q=9sbUKBMvJVxtEVhC4N9zV1GFTdaempezehAmtwA8zjKQ1 + + - All blocks with a dividend, with only some selected fields (like dividend, number, hahs). + Note : Query executed in command line, using CURL: + +```bash +curl -XGET 'http://localhost:9200/gtest/block/_search' -d '{ +"query": { + "filtered" : { + "filter": { + "exists" : { "field" : "dividend" } + } + } + }, + "_source": ["number", "dividend", "hash", "membersCount"] + }' +``` + + +More documentation here : + + - ElasticSearch [official web site](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-get.html#get-source-filtering) + + - a good [tutorial](http://okfnlabs.org/blog/2013/07/01/elasticsearch-query-tutorial.html) + + + +## Roadmap + + - Maintain a updated list of peers + + - Add a new index for TX, with validation percentage + + - Enable P2P synchronisation between Duniter4j ES nodes + + +## Troubleshooting + +### Could not find an implementation class. + +Message: + +``` +java.lang.RuntimeException: java.lang.RuntimeException: Could not find an implementation class. + at org.duniter.core.util.websocket.WebsocketClientEndpoint.<init>(WebsocketClientEndpoint.java:56) + at org.duniter.core.client.service.bma.BlockchainRemoteServiceImpl.addNewBlockListener(BlockchainRemoteServiceImpl.java:545) + at org.duniter.elasticsearch.service.BlockchainService.listenAndIndexNewBlock(BlockchainService.java:106) +``` + +Cause: + +Plugin use Websocket to get notification from a Duniter nodes. The current library ([Tyrus](https://tyrus.java.net/)) is loaded throw java Service Loader, that need access to file `META-INF/services/javax.websocket.ContainerProvider` contains by Tyrus. +ElasticSearch use separated classloader, for each plugin, that disable access to META-INF resource. + +Solution : + +Move Tyrus libraries into elasticsearch `lib/` directory : + +``` + cd <ES_HOME> + mv plugins/duniter4j-elasticsearch/tyrus-*.jar lib + mv plugins/duniter4j-elasticsearch/javax.websocket-api-*.jar lib +``` \ No newline at end of file diff --git a/doc/API.md b/src/site/markdown/ES_API.md similarity index 70% rename from doc/API.md rename to src/site/markdown/ES_API.md index 3536c64d..1f161392 100644 --- a/doc/API.md +++ b/src/site/markdown/ES_API.md @@ -1,36 +1,39 @@ -# HTTP API +# ES HTTP API ## Contents -* [Contents](#contents) -* [Overview](#overview) -* [ES CORE API](#es-core-api) - * [currency](#currency) - * [currency/block](#currencyblock) - * [currency/blockstat](#currencyblockstat) - * [currency/peer](#currencypeer) - * [currency/tx](#currencytx) -* [ES USER API](#userapi) - * [user](#user) +- [Contents](#contents) +- [Overview](#overview) +- [ES CORE API](#ES_CORE_API) + * [currency](#acurrency) + * [currency/block](#acurrencyblock) + * [currency/blockstat](#acurrencyblockstat) + * [currency/peer](#acurrencypeer) + * [currency/tx](#acurrencytx) +- [ES USER API](#es_user_api) + * [user](#user) * [user/event](#userevent) * [user/profile](#userprofile) * [user/settings](#usersettings) - * [message](#message) + * [message](#message) * [message/inbox](#messageinbox) * [message/oubox](#messageoutbox) - * [invitation](#invitation) + * [invitation](#invitation) * [invitation/certification](#invitationcertification) +- [ES SUBSCRIPTION API](#ES SUBSCRIPTION API) ## Overview -Duniter4j Elasticsearch offer HTTP access to 3 main API : +Duniter4j Elasticsearch offer HTTP access to this sub-API: - - `ES CORE API` (ECA): BlockChain indexation; - - `ES USER API` (EUA): User data indexation, such as: profiles, private messages, settings (crypted); +- `ES CORE API`: BlockChain indexation; +- `ES USER API`: User data indexation, such as: profiles, private messages, settings (crypted); +- `ES SUBSCRIPTION API`: User service configuration, such as: email notification service; Data is made accessible through an HTTP API : +```text http[s]://node[:port]/... |-- <currency_name>/ | |-- block @@ -45,6 +48,7 @@ Data is made accessible through an HTTP API : | `-- outbox `-- invitation/ `-- certification +``` ### Document format @@ -54,9 +58,10 @@ All stored documents use a JSON format. Every document have the following mandatory fields: +- `version` : The document's version. - `issuer` : The document's emitter -- `hash`: -- `signature`: the signature emitted by the issuer. +- `hash`: the document's hash +- `signature`: the signature emitted by the issuer. Since `version: 2`, only the `hash` is signed. #### Deletion @@ -67,12 +72,21 @@ Document deletion use a document with this mandatory fields: - `issuer`: The deletion issuer. Should correspond to the document's `issuer`, or the `recipient` in some special case ([inbox message](#messageinbox) or [invitation](#invitation)) - `time`: the current time - `hash` -- `signature`. +- `signature` -For example, a deletion on `message/inbox` should send this document: +For instance, a deletion on `message/inbox` should send this document: ```json - +{ + "version" : 2, + "index" : "message", + "type" : "inbox", + "id" : "AV9VOeOuTvXJwYisNfU6", + "issuer" : "F13aXKWQPGCjSQAxxTyJYyRyPm5SqzFSsYYWSDEQGi2A", + "time" : 1509806623, + "hash" : "61EBBFBCA630E8B715C360DDE1CD6CABD92B9267CA4B724A2F1F36F0FF7E3455", + "signature" : "FOkYCX1b05LTAbtz72F/LMWZb8F8zhQKEqcvbuiQy1N6AXtCUC5Xmjcn+NeO9sCLdcmA0HxsJx42GnWZOmKCDA==" +} ``` ## ES CORE API @@ -89,6 +103,7 @@ For example, a deletion on `message/inbox` should send this document: #### `<currency>/peer` +#### `<currency>/tx` ## ES USER API @@ -120,6 +135,7 @@ Example with only mandatory fields: ```json { + "version" : 2, "title" : "Pecquot Ludovic", "description" : "Développeur Java et techno client-serveur\nParticipation aux #RML7, #EIS et #Sou", "time" : 1488359903, @@ -133,15 +149,16 @@ Some additional fields are `description`, `socials`, `tags` and `avatar` : ```json { - "title" : "Cédric Moreau", - "description" : "#Duniter developer", + "version" : 2, + "title" : "My profile name", + "description" : "#developer", "city" : "Rennes", "socials" : [ { "type" : "diaspora", - "url" : "https://diaspora-fr.org/people/f9d13420f9ff013197aa01beea1f31e2" + "url" : "https://diaspora-fr.org/people/f9d13420f9ssqzq97aa01beea1f31e2" } ], "time" : 1487422234, - "tags" : [ "Duniter" ], + "tags" : [ "developer" ], "issuer" : "2ny7YAdmzReQxAayyJZsyVYwYhVyax2thKcGknmQy5nQ", "avatar" : { "_content_type" : "image/png", @@ -169,3 +186,6 @@ Some additional fields are `description`, `socials`, `tags` and `avatar` : - Delete an existing invitation: `invitation/certification/_delete` (POST) - Search on invitations: `invitation/certification/_search` (POST or GET) +## ES SUBSCRIPTION API + +TODO \ No newline at end of file diff --git a/src/site/markdown/Java_API.md b/src/site/markdown/Java_API.md new file mode 100644 index 00000000..ce47c909 --- /dev/null +++ b/src/site/markdown/Java_API.md @@ -0,0 +1,68 @@ + +# Java API + + +## Maven dependency + +In your `pom.xml` file, add this dependency: + +```xml + +<dependencies> + <!-- (...) --> + + <dependency> + <groupId>org.duniter</groupId> + <artifactId>duniter4j-core-client</artifactId> + <version>${project.version}</version> + </dependency> + +</dependencies> +``` + +## Example + +Using Duniter4j is simple. Here a basic example : + +```java +public class Example { + + // ... + + public static void main(String[] args) { + + // Init configuration + String configFilename = "duniter4j-config.properties"; + Configuration config = new Configuration(configFilename, args); + Configuration.setInstance(config); + + // Set a wallet id (an identifier required for cache) + ServiceLocator.instance().getDataContext().setAccountId(0); + + // Initialize service locator + ServiceLocator.instance().init(); + + // Create a peer, from configuration + Peer aPeer = Peer.newBuilder() + .setHost(config.getNodeHost()) + .setPort(config.getNodePort()) + .build(); + + // Get the current block ! + BlockchainBlock currentBlock = ServiceLocator.instance().getBlockchainRemoteService().getCurrentBlock(aPeer); + System.out.println(String.format("Hello %s world !", currentBlock.getCurrency())); + + // Let's do something else ? + } +} +``` + +> See [the full example](./xref/org/duniter/core/client/example/Example1.html). + +## Configuration + + Java API use Nuiton-config to manage options. + + See [all available options](./config-report.html) in the configuration file. + + \ No newline at end of file diff --git a/src/site/markdown/build.md b/src/site/markdown/build.md new file mode 100644 index 00000000..cc82a364 --- /dev/null +++ b/src/site/markdown/build.md @@ -0,0 +1,54 @@ + +# Build from source + +## Get source and compile + +Install required dependencies: + +- Install Java JDK (8 or more) + +- Install [libsodium](http://doc.libsodium.org/installation/index.html) + + * Linux: after [installation](http://doc.libsodium.org/installation/index.html), make sure the file 'libsodium.so' exists on: /usr/local/lib or /opt/local/lib. + If not, create a symbolic link. + + * Windows: copy the file 'sodium.dll' into directory 'duniter4j-core/lib/' + +- Install [Maven 3](http://maven.apache.org/): `sudo apt-get install maven` + +- Get the source code, then compile using Maven: + +``` +git clone https://github.com/duniter/duniter4j.git +cd duniter4j +git submodule init +git submodule sync +git submodule update + +mvn install -DskipTests +``` + +- Then, package all binaries: + +```bash +mvn install -DskipTests -DperformRelease +``` + +## Deploy binaries + +You will need to have access to project site repository. + +To deploy binaries: + +```bash +mvn release:prepare +mvn release:perform +``` + +## Deploy the web site + +To deploy the web site: + +```bash +mvn site-deploy -DperformRelease +``` diff --git a/doc/fr/development_tutorial.md b/src/site/markdown/development_tutorial.md similarity index 82% rename from doc/fr/development_tutorial.md rename to src/site/markdown/development_tutorial.md index 03980443..4338b20d 100644 --- a/doc/fr/development_tutorial.md +++ b/src/site/markdown/development_tutorial.md @@ -37,7 +37,7 @@ Rendez-vous sur https://github.com (site en anglais). Renseigner les 3 champs pr * E-mail * Mot de passe -<img src="https://forum.duniter.org/uploads/default/original/1X/13ade346327b73bbf1acc97027af147eeb4e9089.png" width="346" height="325"> +<img src="https://forum.duniter.org/uploads/default/original/1X/13ade346327b73bbf1acc97027af147eeb4e9089.png" width="346" height="325"/> Vous recevrez probablement un e-mail de confirmation qu'il vous faudra valider. Une fois cette étape passée, vous devriez disposer d'un compte GitHub . @@ -45,7 +45,7 @@ Vous recevrez probablement un e-mail de confirmation qu'il vous faudra valider. Rendez-vous à l'adresse https://github.com/duniter/duniter4j. Cliquez sur le bouton « Fork » en dans le coin supérieur droit de la page : -<img src="https://forum.duniter.org/uploads/default/original/1X/3b9228c664520496d6a7e86e3f9c4c438f111914.png" width="388" height="98"> +<img src="https://forum.duniter.org/uploads/default/original/1X/3b9228c664520496d6a7e86e3f9c4c438f111914.png" width="388" height="98"/> ### Installer Git @@ -62,7 +62,7 @@ Pour récupérer le code source, lancez Git en mode console. * Sous Linux et MacOS, ouvrez tout simplement le Terminal * Sous Windows lancez le programme *Git Bash* : -<img src="https://forum.duniter.org/uploads/default/original/1X/6fc638dc0a22d88da7e84dbf0371e69747767f78.png" width="432" height="80"> +<img src="https://forum.duniter.org/uploads/default/original/1X/6fc638dc0a22d88da7e84dbf0371e69747767f78.png" width="432" height="80"/> #### Clonez votre fork, en ligne de commande @@ -249,7 +249,7 @@ Vous devriez avoir maintenant : [2016-11-17 13:29:41,655][INFO ][cluster.routing.allocation] [Att-Lass] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[registry][1], [registry][1]] ...]). [2016-11-17 13:29:45,756][INFO ][node ] Checking Duniter indices... [2016-11-17 13:29:45,766][INFO ][node ] Checking Duniter indices... [OK] -[2016-11-17 13:29:58,052][INFO ][duniter.blockchain ] [gtest] [cgeek.fr:9330] Indexing last blocks... +[2016-11-17 13:29:58,052][INFO ][duniter.blockchain ] [g1-test] [cgeek.fr:9330] Indexing last blocks... ``` ### Vérifier le fonctionnement @@ -257,7 +257,7 @@ Vous devriez avoir maintenant : Pour vérifier le bon fonctionnement de votre noeud ES, ouvrez un navigateur à l'adresse suivante : http://127.0.0.1:9200 (il s'agit de l'adresse par défaut d'ElasticSearch). Vous devriez voir le contenu suivant : -<img src="https://forum.duniter.org/uploads/default/original/2X/f/fb3d42bb463334b4223d40c1a45a16caa8f589a2.png" width="506" height="260"> +<img src="https://forum.duniter.org/uploads/default/original/2X/f/fb3d42bb463334b4223d40c1a45a16caa8f589a2.png" width="506" height="260"/> Bravo, votre noeud ElasticSearch Duniter4j est fonctionnel ! @@ -299,11 +299,11 @@ Dans le répertoire `duniter4j-core-client/src/main/java`, cherchez et répérez ### Aller plus loin dans le code -Duniter4j s'appuie sur ElasticSearch **en version 2.3**. D'excellentes documentations sont présentes sur le web : https://www.elastic.co/guide/en/elasticsearch/reference/2.3/index.html. +Duniter4j s'appuie sur ElasticSearch **en version 2.4**. D'excellentes documentations sont présentes sur le web : https://www.elastic.co/guide/en/elasticsearch/reference/2.3/index.html. ## Niveau V : Requêtage sur ES API -Nous allons requeter l'indexation de la BlockChain `gtest`, qui s'est fait dès le démarrage de votre noeud ElastiSearch. Nous appellons cette indexation l'**ES API**. +Nous allons requeter l'indexation de la BlockChain `g1-test`, qui s'est fait dès le démarrage de votre noeud ElastiSearch. Nous appellons cette indexation l'**ES API**. Il existe plusieurs manière de requéter un noeud ES : @@ -314,25 +314,25 @@ Il existe plusieurs manière de requéter un noeud ES : En utilisant un navigateur, vous allez requêter . -- [GET-1] Visualisez un bloc quelconque (par exemple le premier #0): http://localhost:9200/gtest/block/0 +- [GET-1] Visualisez un bloc quelconque (par exemple le premier #0): http://localhost:9200/g1-test/block/0 Etudiez ensuite le format du résultat : ```json -{"_index":"gtest","_type":"block","_id":"0","_version":1,"found":true,"_source":{ +{"_index":"g1-test","_type":"block","_id":"0","_version":1,"found":true,"_source":{ ... } ``` > Observez qu'ElasticSeach a ajouté des informations : `_index`, `_type`, etc. -- [GET-2] Pour éviter d'avoir les informations additionnelles, ajoutez `/_source` : http://localhost:9200/gtest/block/0/_source +- [GET-2] Pour éviter d'avoir les informations additionnelles, ajoutez `/_source` : http://localhost:9200/g1-test/block/0/_source -> Notez que le bloc courant est accessible en `/gtest/block/current` +> Notez que le bloc courant est accessible en `/g1-test/block/current` -- [GET-3] Récupérer **uniquement** les champs `hash`, `dividend` et `memberCount`, pour le bloc #125 : http://localhost:9200/gtest/block/125/_source?_source=number,hash,dividend,membersCount +- [GET-3] Récupérer **uniquement** les champs `hash`, `dividend` et `memberCount`, pour le bloc #125 : http://localhost:9200/g1-test/block/125/_source?_source=number,hash,dividend,membersCount > Notez que vous pouvez avoir une meilleure présentation en ajoutant "`&pretty`" dans l'adresse; -- [GET-4] Les blocks qui référence une clef publique (recherche full text) : http://localhost:9200/gtest/block/_search?q=8Fi1VSTbjkXguwThF4v2ZxC5whK7pwG2vcGTkPUPjPGU +- [GET-4] Les blocks qui référence une clef publique (recherche full text) : http://localhost:9200/g1-test/block/_search?q=8Fi1VSTbjkXguwThF4v2ZxC5whK7pwG2vcGTkPUPjPGU > Vous pouvez rechercher sur n'importe quelle chaine (recherche `full-text`), via cet option "`q=`" @@ -351,7 +351,7 @@ Dans un terminal, exécuter les commandes suivantes : - [POST-1] Récupérez les blocs ayant un dividende universel, en sélectionnant **quelques champs** uniquement (dividend, number, hash). : ```bash -curl -XGET 'http://localhost:9200/gtest/block/_search?pretty' -d '{ +curl -XGET 'http://localhost:9200/g1-test/block/_search?pretty' -d '{ "query": { "filtered" : { "filter": { @@ -367,7 +367,7 @@ curl -XGET 'http://localhost:9200/gtest/block/_search?pretty' -d '{ - [POST-2] Récupérez tous les blocs de #0 à #100 : ```bash -curl -XGET 'http://localhost:9200/gtest/block/_search' -d '{ +curl -XGET 'http://localhost:9200/g1-test/block/_search' -d '{ "query": { "bool": { "should": { @@ -389,16 +389,15 @@ Voici la documentation pour aller plus loin : - ElasticSearch [official web site](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-get.html#get-source-filtering) - un bon [tutoriel](http://okfnlabs.org/blog/2013/07/01/elasticsearch-query-tutorial.html) -## Niveau VI : Requêtage sur Cesium+ API et Ğchange API +## Niveau VI : Requêtage sur Cesium+ API -Duniter4j permet aussi de stocker et d'indexer les données hors BlockChain, comme celles utilisées par Cesium+ et ĞChange : +Duniter4j permet aussi de stocker et d'indexer les données hors BlockChain, comme celles utilisées par Cesium+ : - `/user/profile` : les profiles utilisateurs (nom complet, réseaux sociaux, avatar, etc.) -- `/message/inbox` : les messages privées envoyés -- `/mail/record` : les annonces de la [place de maché](http://cesium.duniter.fr/#/app/market/lg) Ğchange; - * `/mail/record` : les commentaires sur les annonces -- `/mail/record` : les référencement de l'[annuaire pro](http://cesium.duniter.fr/#/app/registry/lg) Ğchange; - * `/mail/comment` : les commentaires sur les référencements +- `/message/inbox` : les messages privées recus +- `/message/outbox` : les messages privées envoyés +- `/page/record` : les pages de l'[annuaire des pages Cesium+](https://g1.duniter.fr/#/app/wot/page/lg); + * `/page/comment` : les commentaires sur les annonces > La document de l'API HTTP est disponible [ici](../API.md). @@ -408,61 +407,54 @@ Duniter4j permet aussi de stocker et d'indexer les données hors BlockChain, com #### Requêtes GET -- [GET-5] Liste des annonces avec le mot `rml8` : http://data.duniter.fr/market/record/_search?pretty&q=rml8 +- [GET-5] Liste des pages avec le mot `cours` : [/page/record/_search?pretty&q=cours](https://g1.data.duniter.fr/page/record/_search?pretty&q=cours) -- [GET-5] Liste des messages à destination de la clef `` : data.duniter.fr/message/record/_search?pretty&receiver=5ocqzyDMMWf1V8bsoNhWb1iNwax1e9M7VTUN6navs8of +- [GET-5] Liste des messages à destination de la clef `38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE` : [/message/inbox/_search?pretty&receiver=38MEAS...](https://g1.data.duniter.fr/message/inbox/_search?pretty&receiver=38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE) -> Observez que le contenu des messages est chiffré. Seul sont destinataire peut y accéder. +> Observez que le contenu des messages est chiffré. Seul le destinataire (`recipient`) peut y accéder. #### Requêtes POST -- [POST-3] Liste des [annonces soumises par Sybille](http://cesium.duniter.fr/#/app/market/lg?q=GzfTB21AnTmbVfNANZmPGSXVtYE4YNnvA9E9ovokttZr) (pubkey=`GzfTB21AnTmbVfNANZmPGSXVtYE4YNnvA9E9ovokttZr`) +- [POST-3] Liste des [pages soumises par Michele T](https://g1.duniter.fr/#/app/wot/2getXnbrRRYFUoEdgAdV4xniCxNERdBFoLvu6xZcsjRW/Turbin,%20Mich%C3%A8le) (pubkey=`2getXnbrRRYFUoEdgAdV4xniCxNERdBFoLvu6xZcsjRW`) ```bash -curl -XPOST "http://data.duniter.fr/market/record/_search?pretty" -d' +curl -XPOST "https://g1.data.duniter.fr/page/record/_search?pretty" -d' { - "query": { - + "query": { "bool":{ - "should": { - "range":{ - "price":{ - "gte":0 - } - } - }, "filter": [ {"term":{ - "issuer":"GzfTB21AnTmbVfNANZmPGSXVtYE4YNnvA9E9ovokttZr" + "issuer":"2getXnbrRRYFUoEdgAdV4xniCxNERdBFoLvu6xZcsjRW" } } ] } }, - "_source": ["title", "description", "price", "time", "unit", "type"], + "_source": ["title", "description", "time"], "from":0, "size":100 }' ``` -Normalement, vous devriez récupérer **une annonce**. +Normalement, vous devriez récupérer **au moins une page**. -> **Note** : Dans Cesium (dans la partie qui deviendra ĞChange), ce même contenu est visible ici : http://cesium.duniter.fr/#/app/market/lg?q=GzfTB21AnTmbVfNANZmPGSXVtYE4YNnvA9E9ovokttZr +> **Note** : Dans Cesium+, ce même contenu est [visible ici](https://g1.duniter.fr/#/app/page/view/AV-XoXFcMEOHZ8iLvso3/michle-turbin-architecte) > Notez que l'option dans cette adresse utilise `q=` pour la recherche `full text`. Copiez la valeur du champ `_id`, et utilisez la dans la prochaine requête : - - [POST-4] : Récupérez les commentaires [de l'annonce précédente](http://cesium.duniter.fr/#/app/market/view/AVbieTIAup9uzWgKipsC/animation-geconomicus) : +- [POST-4] : Récupérez les commentaires [de la page](https://g1.duniter.fr/#/app/page/view/AV-XoXFcMEOHZ8iLvso3/michle-turbin-architecte) : + ```bash -curl -XPOST "http://data.duniter.fr/market/comment/_search?pretty" -d' +curl -XPOST "https://g1.data.duniter.fr/page/comment/_search?pretty" -d' { "query": { "bool":{ "filter": [ {"term":{ - "record": " ... " <-- mettre ici l'identifiant (id) de l'annonce + "record": " ... " <-- mettre ICI la valeur [_id] de la page } } ] @@ -471,6 +463,3 @@ curl -XPOST "http://data.duniter.fr/market/comment/_search?pretty" -d' }' ``` -> **Note** : Dans Cesium (dans la partie qui deviendra ĞChange), le contenu de cette requete est visible ici : [http://cesium.duniter.fr/#/app/market/view/AVbieTIAup...](http://cesium.duniter.fr/#/app/market/view/AVbieTIAup9uzWgKipsC/animation-geconomicus/AVbkYjuR?u=kimamila) -> (notez que l'identifiant de l'annonce est également présent dans cette adresse). - diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md new file mode 100644 index 00000000..99935e5c --- /dev/null +++ b/src/site/markdown/index.md @@ -0,0 +1,21 @@ +# Home + +Welcome to Duniter4j web site ! + +Duniter4j is a Java Toolkit for [Duniter](http://duniter.org). + +<img src="./images/logos/logo_duniter.png"/> + +## Modules + +Duniter4j has tree main modules : + +- `duniter4j-client`: [a command line tool](./CLI.html), to execute basic operation on a Duniter currency: transfer, view peers, ... + +- `duniter4j-core-client`: [a Java API](./Java_API.html) to help Java developers to communicate with a Duniter network. + +- `duniter4j-elasticsearch`: [a ElastiSearch node](./ES.html) used to store (with full-text capabilities) all blockchain data, and additional user data. + + * It comes with an [HTTP API](./ES_API.html) to store and retrieve all this data. + + * This API is used by [Cesium+](https://www.github.com/duniter/cesium) (a Duniter wallet client software). diff --git a/src/site/resources/css/site.css b/src/site/resources/css/site.css new file mode 100644 index 00000000..1da3a679 --- /dev/null +++ b/src/site/resources/css/site.css @@ -0,0 +1,39 @@ +/* + * #%L + * Reef DB + * $Id:$ + * $HeadURL:$ + * %% + * Copyright (C) 2014 - 2017 Ifremer + * %% + * 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% + */ +#bannerRight { + position: absolute; + top: 10px; + right: 20px; +} + +#bannerRight img { + max-width: 75px; +} + +#leftColumn { + width: 20%; +} + +#bodyColumn { + width: 75%; +} \ No newline at end of file diff --git a/src/site/resources/images/logos/logo_duniter.png b/src/site/resources/images/logos/logo_duniter.png new file mode 100644 index 0000000000000000000000000000000000000000..66e96304bf2efa8d2e5ad3b374499f65041907a7 GIT binary patch literal 5607 zcmV<D6&UJ?P)<h;3K|Lk000e1NJLTq003J6003JE1^@s695(rx00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY4c7nw4c7reD4Tcy000McNliru-~=8DFEP=Biq8N56?92N zK~#9!?VWj;9A%xyzi%B~eNWGwnG89|sks1Uh9nLNxQS6f(Jbo<vY?BRD2fJM7qcLz z2u8CJqVC2Z3rGM15rL5e5;GE#kc%WFlgT8LWbXUuo<8e(_mAnGsi~>z>7MD%G>_Kv z)YH?)R8@cK+u!&1{_1^yMUXiQN%8h5GHf9ky8n@0r=x&O{~lqJIM0d6qyF<W4oGV7 zJR`u941i2DD*!Miuj{u#4dBuQo{t-Nk^z7j-E-}0dhmz?JGQF2N23)Z{5n2zu#FVS z=zzwavjCWn-TrWX{=93JTC9$F48s&K43h^!a|xlWs*(Vusvi_SITAb<>})uA>e>4a zdh2T<8o2RR{RvP_Ea)QzJ04_4v$Eyu_ugQ4xNqh_%UCLAF^a?`7j6(JtR*6YtrJ6m zJsltJdf~&(YtKYMDh6xpb^R~kqCh8U20aY&()Ig3V|BQHY@y-H7)4@J{e@)C<`0RH zz0F5<{OZ)x|5XJ*j;@OCZ!^`W4LC^?<e^rPJBwemZs$semHUwp>Yl}k0RmM?yF*H> z(An8gyYBr*R&E0zMnOv&=&}a5V&Lm3g-%kq4ZUTsInzrmAG`mxn|OEL4+z7})czAI zhrmXBgb(+C3-=LFHEq~MR_N)xP_yp9V_%Lz7j^KpR+BcBlQgKA1;AYS+v-J*!f6`_ z%YDq$bE!%IfKU}�Ngq1xv7pq{A{P0Fkq|p0C`xruq*L9gV_{L?0!My(sBYIY}XC z1^`oZ{TkQwuRd@eXLsERfHMPZx?xp@CD;W^pq;RCIQ7sOmU@GszwBOf^;!VoC~!0A zYAS(~6o4MEjZgmfk$H|O^PXoIZhAZ=C%Ui^AF+Fzz)Jp<Lys`lj$_Y1^7ZCDTk8RY zqTodX=qa-mc8ne!i!!){zi+tCUOeL^hGC11A=9K!Eae1<j(o_xop4eBB!!JCM`g!^ z1xx<LQat;7`{C`)BXpor;s|UCK(mWq>|P^e6>cPi*ir#mzo@(oqN4y5Ae`t=SqQ~Y zmGKl$UFMp*G~B%Bl^PA`v_vE9SQTCVqW3>}yXPnRvz@GEjJ$UOMQ}s5Wr2_M5u(be z*(_Cw%aeOmUg`DrhTSh7i<4cXV^udh7Dbo8<b8m%yZ>{n-kg-Ruoj4pd@xcdWeq3+ zh27zr@40LlX?k~SRh-<*nCyg25_AkUxA?{GHN4%k_F{t8s$8<?0-%Hw{V4(tI6b+S zIi@cRwCsPaR;TEA2`rK-*xC&ZD0<=lHQ!{(%3n{?Z5<<Z%>_3oKzOk)MV3N|E3c?j z73@{rr}lT4WEG8|lT^ZvDVi<YaO`sHgiE&)5Pm#C#}-9!15{0+!c~$x<BBD1C-=S` z>1~gUkfu$pK~4sA$?|`9*d~AcH-s=kCV-AD;jBxjXw6F5_E<#}%I<l3JpdN~CjdJD zD*#KhqsC%riZ~&4vq|_gJO8JZkFplq4VeUbz*214;6puxNl}!-6Y9>If32ly&nqVo zKQEqec*rE!cCc4&tSaT~uGQ%TJy&SLwvs2wQ$^1w-vJ^Ff;pGcRA!9}Ce2uxGxL)r z031<u+W-gvc#XnIqUvT64fE{9(;gyp@bl?VG)ENTVS~tGLIbZAlO`-+kB|lI5t2o` z@%@{3AnYtiot;pHx%|!z_Zq;C*$I=3ov?{`^`d8*SMm<e-Fhvh8n#3^)JeJI{qQu@ zNqGQ(Tlvl8yOwoW&Q;)qI-fMs$?@&P;(`$9AOxvN*;+U@N0j8M-rA#`x&)QpT4=I1 zGF;WUvv`Xqf9=Ka=`O{A3jcgs8JIQtE;7R)>?%xMNDqqX*L`zURN2~wl25j=WJgr> z#v|8rj_g(GR<+sUBz_Wv1GVZ*98t??56uNn!^o1GVN<;bvsnhY6bFPrJ0U4bYw#SK z<@fd;>#MKohVgaHgw$>3*#ln0c?$0u&*)>nT23qE8)=1nBMnhI0AO0+uViiQG_tmK znxS1#hJk3yPMx}`ikY8ZeM{7{ZBccbHIyU~*u%znT>jX*vsq49G@c>dROT!;SieCw zSieDT<Nr6|6D>OOQ+m0_>2%Kq&&NQUSqX{PtBk8``;<91WnxTy-d;|BG4%-j#ndB| znnbUP#R<w<QWu#(W)|G>^A#FZ3kIE>gp_SGQi<hlt}l!?Sg-2AZu!&LEq@v()%gH` z2;)SHFb^%lJlx7}CR=TvCHGh!9rh(f!IjcuDVSBdM5pYSy7i5uA#l!2+4CNGXNLBQ z_;{(hiI(7};=`tvARr7k@xnp;24SEZLa-}k$6^yK1scd^%GR@_@j^cWfVd{j`4lpE z`Cjf0^2@?4q#9S?8R?sNM_w`PGj5kavk&|RTzgGQ_Q_D0o${GG=4fn$H}P$fNCP=w zA&lTyn8~nb@ol)=T8~=#ar%OE8{Mlc8K(X_B2SU!t{32Wdlmc}Z-%tzIVb_|nD$$I z)pd(CkYmc`60s698zG!vyE4-nM(y%@?_zk^AbM51;rpL;9w&|uwj#eo!Hg0GeZe~H zKDr4zHf#Yu|8sCHz6pGG@|_=hcK#%dSMw&GZD=K&LAXK+uKiaVSZ;FWO_TsQ(tm~h zP-rSuHHZFH{%O)mi|~&8Sz5^Ya98$Dd=RebM*+ZPr?_E}jAd7PQL*ojczxY#uuLmO z-ap+6+oahE?_aQ5-BE75M%AOT5da{C<zJslXhIpmi@Ho_YEWS-Cl$7Ga-VSTkT3LA z{%I`d-ULS|?#q9jsJ=6>@x!lCT6u~uT`l3!J3^Syw-<F!eFqKC+>c0GU4qFeYSlrG zfo4Yv{Wt^o#5SR1Dn4S%_rw1~18`uqXD68>G@_>ZWZWNSah{3?z81lbg9^61^B&Gs zzYkC8=TNZXYhdl}IE|!2+?USH_MJP?7bibrG$g`sU<$(sjtQCQ*CH%vrX^^mCFrC> zQ>mxaIhbgb$rs&+0RXLyr$_FF6W}wYGS>c^h%B3g-hHp5_KDlkduTgA%}-U<q`CPT zHJgDRQP~6lVF+W(MD^CIQ*e9eWlErep$Zr%P)UC-t%UEvy*U*i08~|imFZ4+yE94@ zJbtH&4KMRJRqsQ~OFxJA(A$`J%UW=*;W-vt{^V@v2KJj|{^G{jF>Q}KY=$aW+4?QA zvh`b}P^=#E-inU<$>XQ(<gU6U1OW0mKh_s+AuhK6qQm(!)nJ+AT6dS7;)l0LSTMc6 z0S?w4McuEz2dTStxbJ)N+;J40Py;!rZjuSGWi0I7goVAEkR>&kTA4s(Je0SM<gtUp z8BQMGKdOBSJjI$XN3d{CKX9?L33b0+1F@q)msT92Y9>zDXKEt@XN9V2c)Vd#hDEh= zIRGHQ<_(eQY3B+WX0k{hUxWwqw~^UG^T2z(-ab_9zkumQz{f8kDD)&5TC%{mzZ3z_ z3HaMF7E(_;E^NFTMJvA#*SzxnBv<nJC#z)dT=FoG_$H5#M;jR>0wRC2tyf!8zNf zP;XyMAIy7|l-bS>dGCoQpF>R(MNJb>afl+@3Cx*9uwV+o<bwW2F_DII)eR9yvVeUj zSttP?8lQa-mI+gkUHUnQfq-n#>mG5-#<0cExWkSuH(K5xli9(a@mcj!Y!{c)`}6)p z7TJe_R#g=roNgNOT8|&tQ$?|-io)Xr7EB>1n?;cC9sxK5tiCY<Sru^bRDUBZwq8Kn zpMQ<e?8RZToHgQH8Z(5ggnT{Y1@~dc!-N6FPH8E2iC5FBEC=uj?%2Tl`=wHpXZc8( z?cA{c{ZmCHB9eK-*y{%>Pf%2zq?lPuaNQ>figV(0U|8Vpl@UDks(}4f(JP1?hmNy{ z&JVb^fdiVoXBdrmPwYE0Ua-sf!zkqsql9TPe1Czp0Y;z!;4i!0ORzxzYMLlEzM-P6 zHvxrzF@h^*_BWbLR-qd4c7-sCA!&^6j8Fiy_L(&;RF(UXfs36)3}0_*>&AuFU{c#+ zS-{FC)@a_fQpD^@3Wz%|jFIQc8>*c%c|%oYv6i)PmtAa_cl13)2`Id3|5fv5wHT9V z8}iw{Xpc)U{J-BlyA4W`Lq%M6Ku&Pxh`>|)@MaND>|^~^Crqbr(_|XRfiooqyvJCJ z{i4IJS4sw9FcG-z6H(-dpM$29;`r(FN$;z@7kK<t6%%uS850R+O#~+A6L2OYAgvaP z0#{Eb%m?YjwG__4%qajh)Ox1Unq72Ty5YJ=09ni+%r>O}5;$CCt0h0keG9ql$U}kO zc>6GV{G%HIMJdqO1vGY1{PlSM*LT~2i8%x%`9Mi7Q0O7ZarS?H@1fRx2Cx+qbyG8C z4>>dSFFt-C>%mV+3}N_mCZm>Fc9PY$%>&Qx3qC}bx$DTaj#CM5<F&VTrSzD5LBJQJ zIMq0a#^VI0PvB8i+fk2^2kOv~qLCprJGwup=u?7yhcC8`JXo+TDbT*Y5bE1|(|%mN zen8<p+Nsyt`R``HM-2U9A5=n()mzj3C7jIA=z>Rba~=Qi>bsES^oxLHfR<3s{y4Ce zkwQQQ#`TpH0Lr;%fAlt0<zT80oB>d3J4b$!|0i;5_7M<1cVGocs^kcE?)wmw0%~-n zbc}N`OqP;77F*sry$gfI1!Ak2vg1Z0`qDp2&+$rMq_=&$HK+KCWA$wYz<g^17TL~_ zYaG=W%+h%P-ZQFgs;Y{vp6=lREgjxM5nTs5*)QWMyu=4wP)uNJft!{?Vh#2^FoG2T z%UiSRv*wn61xWsyWHH~1CHB+g%kBf@o}BIE^R5rb9HAL@Mofv?ni?<Qs<}J_o<&D@ z7-2DS3mPWBI42_4P4MR7$i_fO_M?BEdk}yhKp^^etk{4Y&rXa=yD?G4ThKpZ)3NC3 zhV_=*;v3BJ$rCs)3OO$+;=Gu|cVQ~ufvJ2aJZvznK6<9+1f~}D=gd?}QCsiB$#XrZ zs_n+9^Sx;63PDvzXC_4R$Gkby{7=48yDkdY3!oQ3PjvN0p@*Wtwf;Rs+1fZ;U&d|V zCu2Lj`Pm=evfz3T8zN4GiGz*6!9?IBk%6HF<CF9r{Dm-tV8-Mu%$S^o8?TuH0FY!A z&FvvHclyy6ln@9?5XI!;@%C;B54_a9DQX$9stww*8QO|GG|@O48owr5;5#=yaQvPx zJa_Vnf`)mSlqa!T;-6@qV=%ecfyu>=QSaliEuHPY-m^XpWTP4-@#>Sr&-!T_$(Xty zfBbjf?UwCICc$>v(mS-}XibFP|J(hWbfCi;;F3Y(NE6NaK_8JsHzro@tZaV%q_8QI z21z;WeA>3{56bw}cJVC}(Aq*UW|0U@R@p;<-+kNa-&A%Mp2-y0951A&DWJd$@3Ae< zZLK_{0Ue7%LMF<l$tc?}Ar;+FtZ@jh`p(bpI3LaqWddx%I@3}G@^8mg`P+}Y`LqtS zcGbdG5=pOW<7|_NbNE!f?#^z-XP;QLWM0vARz@Dz(Ncu5LJT&6Wm0z-C(efHjrYI* zWH1<x#ngdl$fsRHI%VrKel%IwrbTLxzJIujEuP!Bc$ViHjws^?oDlfhKZI3a!7v;^ z#x|MyTw@qF|LpYU^L6d*2B7<*k3kb<V>HS(>&*^<{_gI54YpZVN6MyHN;xt<;{hfA zIS8Z;RE+>?2!zT2RiLO8iVAQnlhDuw0BCF#v3gVYEBg*s*G6F)DLP=H>V%30unBac z%pRFt+jrHlGna<SrU<3{MOHXf`XKubf{?-QNT~u!B@h|`Lqniy2%r)`Wr(5-S&5zi zhJX+ZtQVTYSoLJf)_4AP?4+(c-ltJ?07FaCNl3CfLn5$^ls+&hrE<rvGxhw;vscb7 zS?XpZ7iUa2l|a4wKxib9vjR{VERn#HFrWrO)&5^UAq2jFjGKRU?)lyOPoLI-)>?;O z6NzX$GD#&DlPOzddLoV=IM8~$ojv%8vdgb6;DeU5a#q8jefy!xePc+Ws(>otuSaEh z$#)NJsIF~mi7M6zbRfDK`Lv28YK|mREKoZ<Ha2<3iopr=E}PAj{nE?7c<j28t~m@z zLp@d53)*)8suBXFqu;(SpyH2*a#~hDvRxbA1vNe$&p!0I5G1PZWU8ORq_;W9LKc-R zTVCJoEn4iKH6?$3HWyA&eQXLEJOicg15i~Q(?x*~&#Cl3wy1Be+x%{YCWa1-U>!ys zn9*kv6a1XE_9~}QxDZXp+R<NA$>Gk<_N?Fd=$e0?6)JPHk<mAvQad8v6JXJYF^Cy; zEeig8BB$=2Cw4p+1*cWCR@DK`8Zt;YjjCi(GO!IhI2udgHNb7?uRP-b;J9qz!l`S2 zc-x)JrvzrZnFOIz3M#gtx8o#SR{xkFH?%6)S>x&Y!7tzYy)O{*>vA0-4Q#&#x;B<h z3Fu^D$5VLhVnfWwZ5l7P1F&Cm>7@ntKKT9HSIl59pK9$jY(!N#h~|b<u%a0rr#fo8 zpcJUCQ|Rv6yyhQ2`R?<9Kp><^IT(S~uKMn{Hu6wM3wkuL&49ByTe0e_#ja7k_0I3D zDqnuhCzf3~LAs=fZDZ@tSAj?^n3$)Gx(g^N6t#^iPPSzSUfvgYXWJWlk81Kd1G$|j zL~WiUsPkrR94)6p(W!t9T{oUJuoVG=RSaypM*)EFm6cbOmCtssnCuBmD0GIol6*pP zvf{U^l1$Okp`x{yq3wPla<<FXv~@?#+Xp_p(1M{u4I~3ahc(I$>y)flbIL%E7Ir+~ zj85fR=vwfC=Fx(o<s>+#+i736bitfy1zeGZw>kkpr7~^q@ORYJx3?TTR@V{~RT0B) zfud;CsJ)D(zseHU0oFo}H#A{f%J7?Y=^35Mwa~StBeca)1Py5Y#QS)Y@AU-@^@C?5 zjU8yA>aQW{ha_mn@F7*8QvusZ<&1%~Xy<xcba1uLwG;34^TD;Vv8V>P_9BNKwidWn z<wk>S6r}l{H5cbTHG{(=SdDVEa5)UG-N9*2nEpOv`T<4yJ1$8WdQTdo$B_m`rWAB4 zVJ8Ef)hU<L{mo+dRAnRB&{>EcxY1pgWEdAhOe^Gc!H##OM-N>OpVd7lI#m;$jTot0 zKVDjad6mg{jo(M&-eQSDH@xqd!D|HOH9V+EL#dja0BWM*kMv#hM%stbL`}1MLIUw8 zb<zY@Rd-^Hpk9;_8kuybQ?p+{GTBF(;A<BZ@_4|Gx6gR@@iqHD8b|4gd@dutc&6-s zG{;6q`QG0J>~tMZ29^@bJlLZ-PKtjl|5)_P{{z)037eLK2rB>p002ovPDHLkV1g`> BvJL<M literal 0 HcmV?d00001 diff --git a/src/site/resources/images/logos/maven-feather.png b/src/site/resources/images/logos/maven-feather.png new file mode 100644 index 0000000000000000000000000000000000000000..b5ada836e9eb4af4db810f648b013933e72c8fbe GIT binary patch literal 3330 zcmX9>c{JN;_x~o5Ac>t)`_^PEV{L6MNl>(?QcG&7ly=N-Xep}HlEki6%d`xGQff?J zZ3V5?nxMK^TW!%rlc2Oi#TE&YeBaFbd(OGfJ<mP&k9+Pt_w)HY1t(9q%OKT}0077w z^KkVO`(UwYOF_lA0qnN9*h$BEoK64$GlPE(lH7<(5(g!s2;Kw$Xe~<H^Svp4>qdI` zc>}=J0{}qD0)QP*?7suRWeWiKhXeo)6#$?b`+NA18vvk_kGT^3lRrj~)ZiX~E=7&X z2SKm_0zsnO+$cbVdd$U-?NJjv4pVQ1Nhjly1q-WLl67`_;z%v-QHPc;g_!S~IRE^{ z!-r;4Azogl1_mw!0>pbvoPqVZ9U2s5dwy6sHa1p4L7^@xJ3CvqEtc6=V;Sjo`SKw` zH=oaUc5x93g$)f2RLqLwrQCI9Ez?$q{#(_7txem8O7-r(E=u3NrnVzb>g3;N!E`D4 z$F(MEarBhUUxI^!j~_>3u~Bhx7JsSR*w|dSa6vbc*_R&srRM|ftV?XHdFb}1C$WrQ zvCqw{t=r+KeZT{28=Et|SGiR|Ew_)PCPc7HL$FRx^tIjT!gS^&HZAG+)pJ^j_L!yB z-&JbQI5tJZ0TS}9l}GV-#=yY9@UZdW!+Wo8V)3OP+M~kh8Cox&UgiEXkb|OHrtnt7 z^5^7qoPgd(mzSp^UljFw^Ea1#($jleS~zn<*Qt%~?;g8p7T$+e1_e6_0RivD9i_fn zntBj|S0D{TF>ZC0BjrC=O}^<#pa0LS&uvarfWzp2`pUd__f_%7YV~7dt=r6SgMYpk zjT&tozdBVDfMU+}3PBKu{I@a0eE%y;<26%LfpraXnsz78oRL+ASlucsJ9Ov}^-cnR z?X0S*D(PH#SsA1;IVGjHr-u@pc=<9LQ|*-QU~8*d0k5yGUszbEsHmW5uYUjj;c@h| zc=i>Ql~f4Q{2jFogTeH_k#4q)N#10=x?L3lT5fn+n;f?)a5}#)D(b9?5F`jW*8R2B zY10|kzu50Yt-pEkr?pP=J)v#j+39IETXnv??EKOqdr`^I$PR$!&#+i*wr^07q=V|W zRr`cRLkwol7wvCgY>XVWV#HBVP$e>vs8#}bhe8j(d*@G*O1g5TCFF^jnVIZQvS`z% z5v0FEpQe3XqLbN{Z+4@!!}?n1jYn$VqUAWElr$a=d)NRcr?dxiBP0c$a4eq)C6kW} zg`-#3YZthl;XEcu_;g!xn!}4v15@n5<!{K8N{d&<wD^3~E6>*WxOpB14=8A8Dk>`K z>FLRD7bsziv>lNxci1YB3`T!H<SebN4cdIr$jFGK4*3%{YPG$+UBRW_?kKOX{*227 zahwP8V8Y>V#jF&kvayv7^9-Sg&l|eQ^qB(FU%g~JDx-!K6@(Waovi+Tc$s`@s@Sv* z9p0C*!~5#c{h1>d>@N5DL);Ea=d|P<cdxDisF!{ZT)_{4xvyDWSV%-7DS*C>U4}@o zGdG0Ng%R<9V_jn-yfB3nD7kxXb8!sMIXlJ1WeD*5?60hT&XSa)+yVT<LqpNZ1%-vC z#>Vl9iP_o8v^w8_0650v?-3$V0uILqsvdAu+2y6|YCewgNhga^h4Y-lNq0Cah}ivo zpoq6EpmWSceZAoF%B5UfVPU3op{AfPhFM{FSFJMU!)c~SDTMch@trf6$~-E;5xn-d z<8`e~UPj0w%vDYVje(iQii)`c=wzHbR6^djAF^dnW5A}!CD-JMWyVHEkW;BwukLPq z9nsR%B=!TuB0vQ|DPO#J@zkle(n^?>&z)~)XSMt|Ks2+uT9af6QEqK-hanLX5&&xP z-l-<%m`WTuBR<~hh#iYkQxoQNXtTFvX)i0JF_1Iu5Wn+7^<q)@O0B59tzE#2kiR-! z&#w(wv>XJlfPFX+T%IM9_7+4B=%5Y=a!X6S`QV)~knSitusE`|vEgD?+D*SdgtN-v z@2!tnPsQ$W9OoldXg5!7EGfyuKEmbk%8!pz518D&%P>a8*ji>n+N5Y15QI!N3aw76 zk?~TlC_r^z21V(@jrIB2O=fW{*e;OxLwTOl%b7{65NYoUzv46uU?y1WK`h1$gXk#s zGM!NC1T6)2&vea(*Gjoe-Y0OseT68UKVi7GtWs>+{mTm3?9wmCl9JqVL7fcIg7PHy zS|uV8fd^!W2I;)j*_@ml#-BrjgIWH)bTI&Jf1fXAax!YjYc<O|%-$vPYTq_Et5YOb zOTI2-XYliKxDze4WP7?Geen7E7M-%nc_P<of0`~5jExU*H+klShh(eKl~OO9cc&=* ztbm^tMjRNL)YDMY1R$=yaRADfqy$s@#F)Y!$)$1+&}5JcNE8aTi8Jd389*^qAM$#g z;lH`ZGtVW1U>dmoW44Np%MhjRZR?D*fO!{1UqRj<c{>~p#EAohT=T-17$$k6AmQb( zr9h0V!aUsY=NL_BPmf|~=n=+2*+gqRK=3w1+z;yxltfUx%}G^AqM7qBoD>Zu#))>h z(O-H}7=Go_Xv&X~RNksk#{u}JDqbNyJIauD&lJ!>cpV`<W0R1O;9>%&T(-`&1Vx}= z8{BIG$r-+Li5}_#{<?uh0Xs<AlttkJg!3gVKuR|v3-+s~MMtSdFk?99`gPQU__DGx zxXlt<pHU7U$ZohUI<W<wYS?S?U-u~x)W(<L!p1?_Q4z?KJGs3+|AL{eO1#kB)df9l z7w1X6V3TS=Y>j}s%FlGk$jM1|WKp=Pv|*T=m!~I+rUjJ3F@7W!gumQD8RFwVZryr0 zG6IWssk0)%eJuVTRDtKPo&xDaOWF|RzCnozye=JYW-)oDFHKrbK}AL7sWkcH57B~D zWIZ`=QNK#g)SEJ<lwW>B!`69JGO3P=r08pDX))Bb6t@_;R!2TlYhv>Ek*cIBeDucB zNbDTV5C(L0<PUTH|JYbYmgK2?(d>1Ze7}3Kc7OC~(zLdAV~G`9N+1xB3ie(wD=k6U z@g3gU065J9XPq{lyp>keB&(ixxdnV8$%i$asL6b0O)JUdYtCpuubGB*DbEFHXlQtp zXgMTG%@{+j0dI{Adnj6-$)BcQylA>}r~l(e_1pE-*`Eac5PAGF#EWMIO6;2ECZAeo ziPF85kd7Ft6f{I>ZQIUbf5YND4#d%gJpKl~IaM@Xl!bUvZj*0lQR<R-VTJ~IS!17o z$wu8Tpc2rd1O`I;SuI1bp^VTa$nk#j^HX#Uii|XPM)V*<Cq0uvk)!B;17Ef$6%y1K zi6$5fBKFFlrwqwjd7v-;E3zj=R`pymC~?ckj6+J^q_8=$w-nv`B?c%>vUOOhugnVG zMF7OiLdS5a+otCLNQI8V^8vu3ka8NP_S>32`v3S)2n{Pe(fRVLdLST=H+AiBqCTY3 zZWI=>Zsgp=`Z%jG=8)QMYZO=@1A#!)z2kiwpnq3DhkpUGZV&>CeaB0vA>Y6+Mrd+| zrA52d@P7Qe=6m=0Lz-`5yrGM(x*9Y0sP7_5T2*v`@~JgS7L3#>yY<iJ(gZc&uwf#L zkhD0uUutl2^7lF)2sHn17VuZASVIlEH?zhbh_f1`^(FJ_>-7x_MJ+9`9JqyEa*$Q0 ziiL%hken<6A7+&3D;!0f@qP3TvIRVoufv)c8?&aw&B~1Y(02aUpDjK7B)cSkx8QDV zQMj_M+x+$UXOfa)nmweB@KP^Xm2R7$9(p;LCnufvW}*eG4R>Eak)Ei}%-KE8gsec^ zj=Hu<?vp7=d=fovMv?%mrD)P}E#oYMV~i=5ScmC-K`h=2Xbyy+MkHD6^L&=Z=Ou>X z(qyBjd`DTC3ZeF2!np?{CKA-DtE=Op^zuqOJMFU}UTntQB1KKp81%{!bT~6heKA2v zt?`kF-Zi+k^YcN<E%|;u0|VGWotbl)u7_ynxIA9o2-Fd_f`oOyWOT$jJ40z4l)r$x z98?!^>Cz>V!+^RbV}r|Gp2j0+=crL`N5t}4tX=Ugo&7+C6ua?F4oX!wQ+)83@^vkY zDLFc>n(A(&_r09T&@t7l6XQ+b#6#=gA#14-D;h1Uq<(+=C8<Qq!)m~o1V+Z=F|q|i z{kc`FiaZivYDx?@2@5#nQ)Eg?N=bIy=Aw7qnK~G&A2ND{p^yIQ*XU?ZFZzCQ0sjo7 z?`}z}VM`_zW(KmPpkc6Mt$6oAtURU0fmGOE<tPRAqzb_ADkN1+|G4-K>$D8`D^qmZ z9NOcdL`OIEho{GDl585|eQ0-*j0e<F+BA^Lh2K3R8E8@hG4@a+90B*EDQMEx+UBNG zbrMvn?#*etTmLT2UvEz05dh@iwUYpz0s*pv?_wPmlj6ny72w#>6Rr=PNtyozBAqJr literal 0 HcmV?d00001 diff --git a/doc/fr/presentation-2016-11-18.odp b/src/site/resources/presentation-2016-11-18.odp similarity index 100% rename from doc/fr/presentation-2016-11-18.odp rename to src/site/resources/presentation-2016-11-18.odp diff --git a/src/site/site.xml b/src/site/site.xml new file mode 100644 index 00000000..9314e0ed --- /dev/null +++ b/src/site/site.xml @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + Reef DB + $Id:$ + $HeadURL:$ + %% + Copyright (C) 2014 - 2015 Ifremer + %% + 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}"> + + <skin> + <groupId>org.apache.maven.skins</groupId> + <artifactId>maven-fluido-skin</artifactId> + <version>1.5</version> + </skin> + + <custom> + <fluidoSkin> + <topBarEnabled>false</topBarEnabled> + <googleSearch/> + <sideBarEnabled>true</sideBarEnabled> + <searchEnabled>true</searchEnabled> + <sourceLineNumbersEnabled>true</sourceLineNumbersEnabled> + </fluidoSkin> + </custom> + + <bannerLeft> + <name>${project.name}</name> + <href>./index.html</href> + </bannerLeft> + + <bannerRight> + <name>${project.name}</name> + <src>http://doc.e-is.pro/duniter4j/images/logos/logo_duniter.png</src> + <href>./index.html</href> + </bannerRight> + + <publishDate position="right" format="yyyy-MM-dd"/> + <version position="none"/> + + <poweredBy> + <logo href="http://maven.apache.org" name="Maven" + img="./images/logos/maven-feather.png"/> + </poweredBy> + + <body> + <head><![CDATA[ + <link rel="stylesheet" type="text/css" href="http://doc.e-is.pro/duniter4j/css/site.css"></link> + <link rel="icon" href="https://duniter.org/fr/images/duniter-logo.png"></link> + ]]> + </head> + + <links> + <item name="Duniter" href="http://duniter.org"/> + <item name="Github project" href="https://github.com/duniter/duniter4"/> + </links> + + <breadcrumbs> + <item name="${project.name}" href="./index.html"/> + </breadcrumbs> + + <menu name="${project.name}" inherit="top"> + <item name="Home" href="./index.html"/> + <item name="Downloads" + href="https://github.com/duniter/duniter4j/releases"/> + </menu> + + <menu name="User manual" inherit="top"> + <item name="Command line tools" href="./CLI.html"/> + <item name="ES node" href="./ES.html"/> + </menu> + + <menu name="Technical documentation" inherit="top"> + <item name="Java API" href="./Java_API.html"/> + <item name="ES API" href="./ES_API.html"/> + <item name="Build from source" href="./build.html"/> + <item name="Development tutorial (french)" href="./development_tutorial.html"/> + </menu> + + <!--<menu name="Modules" ref="modules"/>--> + + <menu name="Community" inherit="bottom"> + <item name="Source code" + href="https://github.com/duniter/duniter4"/> + <item name="Issue Tracking" + href="https://github.com/duniter/duniter4/issues"/> + <item name="Forum" + href="https://forum.duniter.org"/> + </menu> + + <menu ref="reports" inherit="bottom"/> + + </body> +</project> -- GitLab