This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit b81e539a4e672918fd5bfa6bbb4c859588a5f038 Author: Tony CHEMIT <chemit@codelutin.com> Date: Thu Sep 1 15:55:59 2016 +0200 Séparation du module de configuration --- application-swing-configuration/LICENSE.txt | 674 +++++++++++++++++++++ application-swing-configuration/README.md | 2 + application-swing-configuration/pom.xml | 124 ++++ .../ObserveSwingApplicationActionDefinition.java | 117 ++++ .../ObserveSwingApplicationConfig.java | 309 +++------- .../ObserveSwingApplicationConfigOption.java | 8 +- .../ObserveSwingApplicationConfigProvider.java | 5 +- .../configuration}/constants/CreationMode.java | 2 +- .../swing/configuration}/constants/DbMode.java | 2 +- .../org.nuiton.config.ApplicationConfigProvider | 0 ...pplication-swing-configuration_en_GB.properties | 104 ++++ ...pplication-swing-configuration_es_ES.properties | 104 ++++ ...pplication-swing-configuration_fr_FR.properties | 104 ++++ .../src/main/resources/log4j.properties | 0 .../src/main/resources/observe-log4j.properties | 0 .../src/main/resources/observeSwing.conf | 0 .../src/main/resources/validators.xml | 0 application-swing/pom.xml | 5 + .../observe/application/swing/ObserveCLAction.java | 120 +--- .../observe/application/swing/ObserveRunner.java | 49 +- .../swing/ObserveSwingApplicationContext.java | 2 +- .../ObserveSwingApplicationDataSourcesManager.java | 55 +- .../swing/db/ObserveSwingDataSource.java | 2 +- .../swing/ui/actions/ChangeStorageAction.java | 2 +- .../ui/actions/ImportStorageFromFileAction.java | 4 +- .../application/swing/ui/admin/AdminStep.java | 2 +- .../application/swing/ui/admin/AdminUIModel.java | 8 +- .../swing/ui/storage/ObstunaAdminAction.java | 2 +- .../swing/ui/storage/RemoteUILauncher.java | 2 +- .../swing/ui/storage/StorageBackupUILauncher.java | 2 +- .../swing/ui/storage/StorageUIHandler.java | 51 +- .../swing/ui/storage/StorageUILauncher.java | 2 +- .../swing/ui/storage/StorageUIModel.java | 37 +- .../swing/ui/storage/tabs/ChooseDbModeUI.jaxx | 4 +- .../swing/ui/storage/tabs/ConfigDataUI.jaxx | 2 +- .../swing/ui/storage/tabs/ConfigReferentielUI.jaxx | 2 +- .../swing/ui/storage/tabs/ConfigUI.jaxx | 1 - .../swing/ui/storage/tabs/StorageTabUIHandler.java | 4 +- .../i18n/application-swing_en_GB.properties | 104 ---- .../i18n/application-swing_es_ES.properties | 104 ---- .../i18n/application-swing_fr_FR.properties | 104 ---- application-web-configuration/LICENSE.txt | 674 +++++++++++++++++++++ application-web-configuration/README.md | 2 + application-web-configuration/pom.xml | 130 ++++ .../ObserveWebApplicationConfiguration.java | 12 +- ...veWebApplicationConfigurationInitException.java | 0 .../ObserveWebApplicationConfigurationOption.java | 0 ...ObserveWebApplicationConfigurationProvider.java | 0 .../db/InvalidObserveWebDatabaseException.java | 0 .../db/InvalidObserveWebDatabaseRoleException.java | 0 .../db/InvalidObserveWebDatabasesException.java | 0 .../web/configuration/db/ObserveWebDatabase.java | 0 .../configuration/db/ObserveWebDatabaseRole.java | 0 .../web/configuration/db/ObserveWebDatabases.java | 0 .../db/ObserveWebDatabasesHelper.java | 0 .../db/impl/ObserveWebDatabaseBean.java | 0 .../db/impl/ObserveWebDatabaseImmutable.java | 0 .../db/impl/ObserveWebDatabaseRoleBean.java | 0 .../db/impl/ObserveWebDatabaseRoleImmutable.java | 0 .../db/impl/ObserveWebDatabasesBean.java | 0 .../db/impl/ObserveWebDatabasesImmutable.java | 0 .../user/InvalidObserveWebUserException.java | 0 .../InvalidObserveWebUserPermissionException.java | 0 .../user/InvalidObserveWebUsersException.java | 0 .../web/configuration/user/ObserveWebUser.java | 0 .../user/ObserveWebUserPermission.java | 0 .../web/configuration/user/ObserveWebUsers.java | 0 .../configuration/user/ObserveWebUsersHelper.java | 0 .../user/impl/ObserveWebUserBean.java | 0 .../user/impl/ObserveWebUserImmutable.java | 0 .../user/impl/ObserveWebUserPermissionBean.java | 0 .../impl/ObserveWebUserPermissionImmutable.java | 0 .../user/impl/ObserveWebUsersBean.java | 0 .../user/impl/ObserveWebUsersImmutable.java | 0 .../org.nuiton.config.ApplicationConfigProvider | 0 .../application-web-configuration_en_GB.properties | 15 + .../application-web-configuration_es_ES.properties | 15 + .../application-web-configuration_fr_FR.properties | 15 + .../src/main/resources/log4j.properties | 0 .../src/main/resources/observeweb-log4j.conf | 0 .../src/main/resources/observeweb.conf | 0 .../src/main/resources/validators.xml | 0 application-web/pom.xml | 58 +- .../application/web/ObserveWebMotionFilter.java | 2 +- .../web/request/ObserveWebRequestContext.java | 2 +- pom.xml | 75 +-- 86 files changed, 2400 insertions(+), 825 deletions(-) diff --git a/application-swing-configuration/LICENSE.txt b/application-swing-configuration/LICENSE.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/application-swing-configuration/LICENSE.txt @@ -0,0 +1,674 @@ + 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 link 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/application-swing-configuration/README.md b/application-swing-configuration/README.md new file mode 100644 index 0000000..d2e50d3 --- /dev/null +++ b/application-swing-configuration/README.md @@ -0,0 +1,2 @@ +To deploy new version of pom: mvn deploy +To install localy: mvn install diff --git a/application-swing-configuration/pom.xml b/application-swing-configuration/pom.xml new file mode 100644 index 0000000..b2a1940 --- /dev/null +++ b/application-swing-configuration/pom.xml @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Swing configuration + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser 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 Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>fr.ird.observe</groupId> + <artifactId>observe</artifactId> + <version>5.0-SNAPSHOT</version> + </parent> + + <artifactId>application-swing-configuration</artifactId> + + <name>ObServe :: Application Swing Configuration</name> + <description>ObServe Application Swing Configuration</description> + + <properties> + + </properties> + + <dependencies> + + <!-- sibling dependencies --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>services-model</artifactId> + <version>${project.version}</version> + </dependency> + + <!-- commons dependencies --> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </dependency> + + <!-- Nuiton --> + <dependency> + <groupId>org.nuiton</groupId> + <artifactId>nuiton-version</artifactId> + </dependency> + <dependency> + <groupId>org.nuiton.i18n</groupId> + <artifactId>nuiton-i18n</artifactId> + </dependency> + <dependency> + <groupId>org.nuiton</groupId> + <artifactId>nuiton-config</artifactId> + </dependency> + + <dependency> + <groupId>org.nuiton.jaxx</groupId> + <artifactId>jaxx-runtime</artifactId> + </dependency> + + </dependencies> + + <build> + + <resources> + <resource> + <directory>src/main/resources</directory> + <includes> + <include>observeSwing.conf</include> + </includes> + <filtering>true</filtering> + </resource> + <resource> + <directory>src/main/resources</directory> + <excludes> + <exclude>observeSwing.conf</exclude> + </excludes> + </resource> + </resources> + + <plugins> + + <plugin> + <groupId>org.nuiton.i18n</groupId> + <artifactId>i18n-maven-plugin</artifactId> + <executions> + <execution> + <id>scan-sources</id> + <goals> + <goal>parserJava</goal> + <goal>gen</goal> + </goals> + </execution> + </executions> + </plugin> + + + </plugins> + </build> + + +</project> diff --git a/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationActionDefinition.java b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationActionDefinition.java new file mode 100644 index 0000000..23a8025 --- /dev/null +++ b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationActionDefinition.java @@ -0,0 +1,117 @@ +package fr.ird.observe.application.swing.configuration; + +import org.nuiton.config.ConfigActionDef; + +import static org.nuiton.i18n.I18n.t; + +/** + * Les actions appellables en ligne de commande. + * + * @author Tony Chemit - chemit@codelutin.com + * @since 1.4 + */ +public enum ObserveSwingApplicationActionDefinition implements ConfigActionDef { + /** + * Afficher l'aide dans la console. + * + * @since 1.0 + */ + HELP(false, t("observe.action.commandline.help"), + "fr.ird.observe.application.swing.ObserveCLAction#help", "-h", "--help"), + /** + * Afficher l'aide embarqué de l'application (dans une interface + * graphique). + * + * @since 1.0 + */ + HELP_UI(false, t("observe.action.commandline.help.ui"), + "fr.ird.observe.application.swing.ObserveCLAction#helpUI", "--help-ui"), + /** + * Pour désactiver le lancement de l'application graphique. + * + * @since 1.0 + */ + NO_MAIN_UI(false, t("observe.action.commandline.disable.main.ui"), + "fr.ird.observe.application.swing.ObserveCLAction#disableMainUI", "-n", + "--no-main"), + /** + * Pour lancer l'interface graphique du configuration de l'application. + * + * @since 1.0 + */ + CONFIGURE_UI(false, t("observe.action.commandline.configure.ui"), + "fr.ird.observe.application.swing.ObserveCLAction#configure", + "--configure"), + /** + * Pour lancer une opération d'administration via un assistant + * graphique. + * + * @since 1.4 + */ + ADMIN_UI(true, t("observe.action.commandline.launch.admin.ui"), + "fr.ird.observe.application.swing.ObserveCLAction#launchAdminUI", "-a", + "--admin"), + /** + * Pour lancer une opération d'administration via un assistant + * graphique. + * + * @since 1.4 + */ + OBSTUNA_ADMIN_UI(true, t("observe.action.commandline.launch.obstuna.admin.ui"), + "fr.ird.observe.application.swing.ObserveCLAction#launchObstunaAdminUI", + "--obstuna-admin"), + + /** + * Pour lancer la base locale en mode serveur. + * + * @since 2.1 + */ + H2_SERVER_MODE(true, t("observe.action.commandline.launch.h2.server.mode"), + "fr.ird.observe.application.swing.ObserveCLAction#launchH2ServerMode", + "--h2-server"), + /** + * Pour activer le support JMX pour les source de données. + * + * @since 1.4 + */ + USE_JMX(true, t("observe.action.commandline.use.jmx"), + "fr.ird.observe.application.swing.ObserveCLAction#useJMX", + "--jmx"), + + CREATE_ID(true, + t("observe.action.commandline.create.id"), + "fr.ird.observe.application.swing.ObserveCLAction#createId", + "--create-id"); + + + public final String description; + + public final String action; + + public final String[] aliases; + + public final boolean admin; + + ObserveSwingApplicationActionDefinition(boolean admin, String description, String action, String... aliases) { + this.description = description; + this.action = action; + this.aliases = aliases; + this.admin = admin; + } + + public String getDescription() { + return description; + } + + public String getAction() { + return action; + } + + public String[] getAliases() { + return aliases; + } + + public boolean isAdmin() { + return admin; + } +} diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfig.java b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfig.java similarity index 70% rename from application-swing/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfig.java rename to application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfig.java index 86cf8a5..7a74adc 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfig.java +++ b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfig.java @@ -25,22 +25,16 @@ import com.google.common.base.Charsets; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; import com.google.common.collect.Sets; -import fr.ird.observe.application.swing.ObserveCLAction; -import fr.ird.observe.application.swing.ObserveResourceManager; -import fr.ird.observe.application.swing.ObserveSwingApplicationContext; -import fr.ird.observe.application.swing.db.constants.CreationMode; -import fr.ird.observe.application.swing.db.constants.DbMode; -import fr.ird.observe.services.runner.ObserveDataSourceConfigurationMainFactory; -import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationRest; -import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationTopiaH2; -import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationTopiaPG; -import fr.ird.observe.application.swing.ui.UIHelper; +import fr.ird.observe.application.swing.configuration.constants.CreationMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; +import jaxx.runtime.SwingUtil; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.nuiton.config.ApplicationConfig; import org.nuiton.config.ApplicationConfigHelper; import org.nuiton.config.ApplicationConfigProvider; +import org.nuiton.config.ConfigActionDef; import org.nuiton.version.Version; import org.nuiton.version.Versions; @@ -58,7 +52,6 @@ import java.util.Locale; import java.util.Properties; import java.util.Set; -import static fr.ird.observe.application.swing.ObserveResourceManager.Resource; import static org.nuiton.i18n.I18n.t; /** @@ -67,185 +60,132 @@ import static org.nuiton.i18n.I18n.t; * @author Tony Chemit - chemit@codelutin.com * @since 1.0 */ -public class ObserveSwingApplicationConfig extends ApplicationConfig { - - - /** - * le fichier de configuration de l'application avec les informations sur le - * projet (version, license,...) et la configuration des ui (icons, ...) - */ - public static final String APPLICATION_PROPERTIES = "/observe.properties"; - - /** le lastName du repertoire ou sont les donnees de l'application */ - public static final String USER_DIRECTORY_FILENAME = ".observe"; +public class ObserveSwingApplicationConfig extends ApplicationConfig { /** le pattern du fichier de sauvegarde d'une base locale */ public static final String BACKUP_DB_PATTERN = "obstuna-local-%1$tF--%1$tk-%1$tM-%1$tS.sql.gz"; - /** le pattern du fichier de sauvegarde d'une base access importée */ - public static final String ACCESS_DB_PATTERN = "import-access-%1$tF--%1$tk-%1$tM-%1$tS.sql.gz"; - public static final String DB_NAME = "obstuna"; /** * La version de l'application. */ - public static final String APPLICATION_VERSION = "application.version"; - - public static final String VERSION = "version"; - - public static final String PROPERTY_DEFAULT_DB_MODE = "defaultDbMode"; - - public static final String PROPERTY_DEFAULT_CREATION_MODE = "defaultCreationMode"; - - public static final String PROPERTY_SPECIES_LIST_SEINE_TARGET_CATCH_ID = "speciesListSeineTargetCatchId"; - - public static final String PROPERTY_SPECIES_LIST_SEINE_SCHOOL_ESTIMATE_ID = "speciesListSeineSchoolEstimateId"; - - public static final String PROPERTY_SPECIES_LIST_SEINE_OBJECT_SCHOOL_ESTIMATE_ID = "speciesListSeineObjectSchoolEstimateId"; - - public static final String PROPERTY_SPECIES_LIST_SEINE_NON_TARGET_CATCH_ID = "speciesListSeineNonTargetCatchId"; - - public static final String PROPERTY_SPECIES_LIST_SEINE_OBJECT_OBSERVED_SPECIES_ID = "speciesListSeineObjectObservedSpeciesId"; - - public static final String PROPERTY_SPECIES_LIST_LONGLINE_CATCH_ID = "speciesListLonglineCatchId"; - - public static final String PROPERTY_SPECIES_LIST_LONGLINE_ENCOUNTER_ID = "speciesListLonglineEncounterId"; + private static final String APPLICATION_VERSION = "application.version"; - public static final String PROPERTY_SPECIES_LIST_LONGLINE_DEPREDATOR_ID = "speciesListLonglineDepredatorId"; + private static final String VERSION = "version"; - public static final String PROPERTY_VERSION = "version"; + static final String PROPERTY_DEFAULT_DB_MODE = "defaultDbMode"; - public static final String PROPERTY_DB_VERSION = "dbVersion"; + static final String PROPERTY_DEFAULT_CREATION_MODE = "defaultCreationMode"; - public static final String PROPERTY_AUTO_POPUP_NUMBER_EDITOR = "autoPopupNumberEditor"; + static final String PROPERTY_SPECIES_LIST_SEINE_TARGET_CATCH_ID = "speciesListSeineTargetCatchId"; - public static final String PROPERTY_SHOW_NUMBER_EDITOR_BUTTON = "showNumberEditorButton"; + static final String PROPERTY_SPECIES_LIST_SEINE_SCHOOL_ESTIMATE_ID = "speciesListSeineSchoolEstimateId"; - public static final String PROPERTY_SHOW_DATE_TIME_EDITOR_SLIDER= "showTimeEditorSlider"; + static final String PROPERTY_SPECIES_LIST_SEINE_OBJECT_SCHOOL_ESTIMATE_ID = "speciesListSeineObjectSchoolEstimateId"; - public static final String PROPERTY_LOCAL_STORAGE_EXIST = "localStorageExist"; + static final String PROPERTY_SPECIES_LIST_SEINE_NON_TARGET_CATCH_ID = "speciesListSeineNonTargetCatchId"; - public static final String PROPERTY_INITIAL_DUMP_EXIST = "initialDumpExist"; + static final String PROPERTY_SPECIES_LIST_SEINE_OBJECT_OBSERVED_SPECIES_ID = "speciesListSeineObjectObservedSpeciesId"; - public static final String PROPERTY_MAIN_STORAGE_OPENED = "mainStorageOpened"; + static final String PROPERTY_SPECIES_LIST_LONGLINE_CATCH_ID = "speciesListLonglineCatchId"; - public static final String PROPERTY_STORE_REMOTE_STORAGE = "storeRemoteStorage"; + static final String PROPERTY_SPECIES_LIST_LONGLINE_ENCOUNTER_ID = "speciesListLonglineEncounterId"; - public static final String PROPERTY_DEFAULT_GPS_MAX_DELAY = "defaultGpsMaxDelay"; + static final String PROPERTY_SPECIES_LIST_LONGLINE_DEPREDATOR_ID = "speciesListLonglineDepredatorId"; - public static final String PROPERTY_DEFAULT_GPS_MAX_SPEED = "defaultGpsMaxSpeed"; + static final String PROPERTY_AUTO_POPUP_NUMBER_EDITOR = "autoPopupNumberEditor"; - public static final String PROPERTY_CHANGE_SYNCHRO_SRC = "changeSynchroSrc"; + static final String PROPERTY_SHOW_NUMBER_EDITOR_BUTTON = "showNumberEditorButton"; - public static final String PROPERTY_NON_TARGET_OBSERVATION = "nonTargetObservation"; + static final String PROPERTY_SHOW_DATE_TIME_EDITOR_SLIDER = "showTimeEditorSlider"; - public static final String PROPERTY_TARGET_DISCARDS_OBSERVATION = "targetDiscardsObservation"; + private static final String PROPERTY_LOCAL_STORAGE_EXIST = "localStorageExist"; - public static final String PROPERTY_SAMPLES_OBSERVATION = "samplesObservation"; + private static final String PROPERTY_INITIAL_DUMP_EXIST = "initialDumpExist"; - public static final String PROPERTY_OBJECTS_OBSERVATION = "objectsObservation"; + private static final String PROPERTY_MAIN_STORAGE_OPENED = "mainStorageOpened"; - public static final String PROPERTY_DETAILLED_ACTIVITIES_OBSERVATION = "detailledActivitiesObservation"; + static final String PROPERTY_STORE_REMOTE_STORAGE = "storeRemoteStorage"; - public static final String PROPERTY_MAMMALS_OBSERVATION = "mammalsObservation"; + static final String PROPERTY_DEFAULT_GPS_MAX_DELAY = "defaultGpsMaxDelay"; - public static final String PROPERTY_BIRDS_OBSERVATION = "birdsObservation"; + static final String PROPERTY_DEFAULT_GPS_MAX_SPEED = "defaultGpsMaxSpeed"; - public static final String PROPERTY_BAIT_OBSERVATION = "baitObservation"; + static final String PROPERTY_CHANGE_SYNCHRO_SRC = "changeSynchroSrc"; - public static final String PROPERTY_RESOURCES_DIRECTORY = "resourcesDirectory"; + static final String PROPERTY_NON_TARGET_OBSERVATION = "nonTargetObservation"; - public static final String PROPERTY_LOCALE = "locale"; + static final String PROPERTY_TARGET_DISCARDS_OBSERVATION = "targetDiscardsObservation"; - public static final String PROPERTY_DB_LOCALE = "dbLocale"; + static final String PROPERTY_SAMPLES_OBSERVATION = "samplesObservation"; - public static final String PROPERTY_CAN_MIGRATE_OBSTUNA = "canMigrateObstuna"; + static final String PROPERTY_OBJECTS_OBSERVATION = "objectsObservation"; - public static final String PROPERTY_CAN_MIGRATE_H2 = "canMigrateH2"; + static final String PROPERTY_DETAILLED_ACTIVITIES_OBSERVATION = "detailledActivitiesObservation"; - public static final String PROPERTY_MAIN_STORAGE_OPENED_LOCAL = "mainStorageOpenedLocal"; + static final String PROPERTY_MAMMALS_OBSERVATION = "mammalsObservation"; - public static final String PROPERTY_COPYRIGHT_TEXT = "copyrightText"; + static final String PROPERTY_BIRDS_OBSERVATION = "birdsObservation"; - public static final String PROPERTY_FULL_SCREEN = "fullScreen"; + static final String PROPERTY_BAIT_OBSERVATION = "baitObservation"; - public static final String PROPERTY_LOCAL_DBDIRECTORY = "localDBDirectory"; + static final String PROPERTY_RESOURCES_DIRECTORY = "resourcesDirectory"; - public static final String PROPERTY_I18N_DIRECTORY = "i18nDirectory"; + static final String PROPERTY_LOCALE = "locale"; - public static final String PROPERTY_INITIAL_DB_DUMP = "initialDbDump"; + static final String PROPERTY_DB_LOCALE = "dbLocale"; - public static final String PROPERTY_BACKUP_DIRECTORY = "backupDirectory"; + static final String PROPERTY_FULL_SCREEN = "fullScreen"; - public static final String PROPERTY_REPORT_DIRECTORY = "reportDirectory"; + static final String PROPERTY_I18N_DIRECTORY = "i18nDirectory"; - public static final String PROPERTY_MAP_DIRECTORY = "mapDirectory"; + static final String PROPERTY_REPORT_DIRECTORY = "reportDirectory"; - public static final String PROPERTY_TMP_DIRECTORY = "tmpDirectory"; + static final String PROPERTY_MAP_DIRECTORY = "mapDirectory"; - public static final String PROPERTY_DISPLAY_MAIN_UI = "displayMainUI"; + static final String PROPERTY_LOAD_LOCAL_STORAGE = "loadLocalStorage"; - public static final String PROPERTY_CAN_USE_UI = "canUseUI"; + static final String PROPERTY_SHOW_MIGRATION_PROGRESSION = "showMigrationProgression"; - public static final String PROPERTY_ADJUSTING = "adjusting"; + static final String PROPERTY_SHOW_MIGRATION_SQL = "showMigrationSql"; - public static final String PROPERTY_H2_LOGIN = "h2Login"; + static final String PROPERTY_VALIDATION_REPORT_DIRECTORY = "validationReportDirectory"; - public static final String PROPERTY_H2_PASSWORD = "h2Password"; + static final String PROPERTY_SHOW_SQL = "showSql"; - public static final String PROPERTY_OBSTUNA_URL = "obstunaUrl"; + static final String PROPERTY_DEV_MODE = "devMode"; - public static final String PROPERTY_OBSTUNA_LOGIN = "obstunaLogin"; - - public static final String PROPERTY_OBSTUNA_PASSWORD = "obstunaPassword"; - - public static final String PROPERTY_OBSTUNA_USE_SSL = "obstunaUseSsl"; - - public static final String PROPERTY_LOAD_LOCAL_STORAGE = "loadLocalStorage"; - - public static final String PROPERTY_SHOW_MIGRATION_PROGRESSION = "showMigrationProgression"; - - public static final String PROPERTY_SHOW_MIGRATION_SQL = "showMigrationSql"; - - public static final String PROPERTY_VALIDATION_REPORT_DIRECTORY = "validationReportDirectory"; - - public static final String PROPERTY_SHOW_SQL = "showSql"; - - public static final String PROPERTY_H2_SERVER_PORT = "h2ServerPort"; - - public static final String PROPERTY_DEV_MODE = "devMode"; - - public static final String PROPERTY_TREE_OPEN_NODES = "treeOpenNodes"; + static final String PROPERTY_TREE_OPEN_NODES = "treeOpenNodes"; /** Logger */ private static final Log log = LogFactory.getLog(ObserveSwingApplicationConfig.class); - protected static final String DEFAULT_OBSERVE_SWING_CONFIGURATION_FILENAME = "observeSwing.conf"; + static final String DEFAULT_OBSERVE_SWING_CONFIGURATION_FILENAME = "observeSwing.conf"; /** * un drepeau pour savoir s'il faut lancer l'interface graphique. Cette * valeur peut être programmées lors des actions. */ - protected boolean displayMainUI = true; + private boolean displayMainUI = true; /** drapeau pour savoir si une base locale existe */ - protected boolean localStorageExist; + private boolean localStorageExist; /** * drapeau pour savoir si le dump initial a ete chargee depuis la base * centrale */ - protected boolean initialDumpExist; + private boolean initialDumpExist; /** drapeau pour savoir si une source de données est ouverte */ - protected boolean mainStorageOpened; + private boolean mainStorageOpened; /** * drapeau pour savoir si la source ouverte est locale (attention, lorsqu'il * n'y a pas de storage d'ouvert, la valeur est null). */ - protected Boolean mainStorageOpenedLocal; + private Boolean mainStorageOpenedLocal; /** * drapeau pour savoir si on peut utiliser des ui dans l'environnement. @@ -254,13 +194,13 @@ public class ObserveSwingApplicationConfig extends ApplicationConfig { * si on désactive explicitement ou si pas d'environnement graphique * trouvé. */ - protected boolean canUseUI = true; + private boolean canUseUI = true; /** La version de l'application */ private Version version; /** Texte du copyright (calculé dynamiquement). */ - protected String copyrightText; + private String copyrightText; /** * Liste des options qu'on ne peut pas sauvegarder (les mots de passes, @@ -268,20 +208,20 @@ public class ObserveSwingApplicationConfig extends ApplicationConfig { * * @since 1.5 */ - protected String[] unsavables; + private String[] unsavables; //FIXME private final ImmutableSet<String> longlinVesselTypeIds = ImmutableSet.copyOf( Sets.newHashSet("fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.044156847891821505", - "fr.ird.observe.entities.referentiel.VesselType#1239832675736#0.8708229847859869", - "fr.ird.observe.entities.referentiel.VesselType#1239832686137#0.1")); + "fr.ird.observe.entities.referentiel.VesselType#1239832675736#0.8708229847859869", + "fr.ird.observe.entities.referentiel.VesselType#1239832686137#0.1")); private final ImmutableSet<String> seineVesselTypeIds = ImmutableSet.copyOf( Sets.newHashSet("fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.044156847891821505", - "fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.307197212385357", - "fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.7380146830307519", - "fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.9086075071905084", - "fr.ird.observe.entities.referentiel.VesselType#1239832675737#0.43324169605639407")); + "fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.307197212385357", + "fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.7380146830307519", + "fr.ird.observe.entities.referentiel.VesselType#1239832675735#0.9086075071905084", + "fr.ird.observe.entities.referentiel.VesselType#1239832675737#0.43324169605639407")); public ObserveSwingApplicationConfig() { this(DEFAULT_OBSERVE_SWING_CONFIGURATION_FILENAME); @@ -299,12 +239,10 @@ public class ObserveSwingApplicationConfig extends ApplicationConfig { return !(list == null || list.isEmpty()); } - public void initConfig(ObserveResourceManager manager) throws IOException { + public void initConfig(Properties p, ConfigActionDef... actions) throws IOException { Version version = null; - Properties p = manager.getResource(Resource.application); - for (Object k : p.keySet()) { String key = String.valueOf(k); Object value = p.get(k); @@ -332,10 +270,10 @@ public class ObserveSwingApplicationConfig extends ApplicationConfig { setDefaultOption(APPLICATION_VERSION, version.getVersion()); // creation des actions disponibles - for (ObserveCLAction.ActionDefinition a : ObserveCLAction.ActionDefinition.values()) { + for (ConfigActionDef a : actions) { - for (String alias : a.aliases) { - addActionAlias(alias, a.action); + for (String alias : a.getAliases()) { + addActionAlias(alias, a.getAction()); } } @@ -348,13 +286,13 @@ public class ObserveSwingApplicationConfig extends ApplicationConfig { // on previent l'utilisateur que son fichier de configuration a été // deplacé JOptionPane.showInternalMessageDialog(null, - t("observe.title.config.migrate"), - t("observe.runner.config.migrate.file", - oldHomeConfig.getName(), - oldHomeConfig, - homeConfig - ), - JOptionPane.WARNING_MESSAGE); + t("observe.title.config.migrate"), + t("observe.runner.config.migrate.file", + oldHomeConfig.getName(), + oldHomeConfig, + homeConfig + ), + JOptionPane.WARNING_MESSAGE); } public void installSaveAction() { @@ -435,10 +373,6 @@ public class ObserveSwingApplicationConfig extends ApplicationConfig { return getOptionAsFile(ObserveSwingApplicationConfigOption.I18N_DIRECTORY.key); } - public void setResourcesDirectory(File newValue) { - setOption(ObserveSwingApplicationConfigOption.RESOURCES_DIRECTORY, newValue); - } - public File getInitialDbDump() { return getOptionAsFile(ObserveSwingApplicationConfigOption.INITIAL_DB_DUMP.key); } @@ -893,7 +827,7 @@ public class ObserveSwingApplicationConfig extends ApplicationConfig { setOption(ObserveSwingApplicationConfigOption.TREE_OPEN_NODES, joinIds); } - public String[] getUnsavables() { + private String[] getUnsavables() { if (unsavables == null) { List<String> tmp = new ArrayList<>(); tmp.add(ObserveSwingApplicationConfigOption.OBSTUNA_PASSWORD.getKey()); @@ -924,91 +858,6 @@ public class ObserveSwingApplicationConfig extends ApplicationConfig { super.saveForUser(getUnsavables()); } - - public void fromStorageConfig(ObserveDataSourceConfigurationTopiaH2 config) { - setShowMigrationProgression(config.isShowMigrationProgression()); - setShowMigrationSql(config.isShowMigrationSql()); - saveForUser(); - } - - public void fromStorageConfig(ObserveDataSourceConfigurationTopiaPG config) { - setObstunaUrl(config.getJdbcUrl()); - setObstunaLogin(config.getUsername()); - setObstunaPassword(config.getPassword()); - setObstunaUseSsl(config.isUseSsl()); -// if (useSsl) { -// setOption(OBSTUNA_SSL_CERTIFICAT_FILE, -// config.getSslCertificatFile().getAbsolutePath()); -// setOption(OBSTUNA_SSL_CERTIFICAT_PASSWORD, -// new String(config.getSslCertificatPassword())); -// } else { -// setOption(OBSTUNA_SSL_CERTIFICAT_FILE.key, ""); -// setOption(OBSTUNA_SSL_CERTIFICAT_PASSWORD, EMPTY_CHAR_ARRAY); -// } - setShowMigrationProgression(config.isShowMigrationProgression()); - setShowMigrationSql(config.isShowMigrationSql()); - //TODO-TC20100311 : on devrait pas regarder si l'utilisateur veut sauver - //TODO-TC20100311 : la configuration ? - saveForUser(); - } - - public void fromStorageConfig(ObserveDataSourceConfigurationRest config) { - setServerUrl(config.getServerUrl()); - setServerLogin(config.getLogin()); - setServerPassword(config.getPassword()); - setServerDataBaseName(config.getOptionalDatabaseName().orElse(null)); - saveForUser(); - } - - - public ObserveDataSourceConfigurationTopiaH2 getDataSourceConfigurationH2(String label) { - ObserveSwingApplicationContext applicationContext = ObserveSwingApplicationContext.get(); - ObserveDataSourceConfigurationMainFactory configurationMainFactory = applicationContext.getObserveDataSourceConfigurationMainFactory(); - - File dbDirectory = new File(getLocalDBDirectory(), DB_NAME); - - return configurationMainFactory.createObserveDataSourceConfigurationTopiaH2( - label, - dbDirectory, - DB_NAME, - getH2Login(), - getH2Password(), - isShowMigrationProgression(), - isShowMigrationSql(), - getModelVersion() - ); - } - - public ObserveDataSourceConfigurationTopiaPG getDataSourceConfigurationPG(String label) { - ObserveSwingApplicationContext applicationContext = ObserveSwingApplicationContext.get(); - ObserveDataSourceConfigurationMainFactory configurationMainFactory = applicationContext.getObserveDataSourceConfigurationMainFactory(); - - return configurationMainFactory.createObserveDataSourceConfigurationTopiaPG( - label, - getObstunaUrl(), - getObstunaLogin(), - getObstunaPassword(), - isObstunaUseSsl(), - isShowMigrationProgression(), - isShowMigrationSql(), - getModelVersion() - ); - } - - public ObserveDataSourceConfigurationRest getDataSourceConfigurationRest(String label) { - ObserveSwingApplicationContext applicationContext = ObserveSwingApplicationContext.get(); - ObserveDataSourceConfigurationMainFactory configurationMainFactory = applicationContext.getObserveDataSourceConfigurationMainFactory(); - - return configurationMainFactory.createObserveDataSourceConfigurationRest( - label, - getServerUrl(), - getServerLogin(), - getServerPassword(), - getServerDataBaseName(), - getModelVersion() - ); - } - public void removeJaxxPropertyChangeListener() { List<String> tmp = new ArrayList<>(); for (ObserveSwingApplicationConfigOption option : ObserveSwingApplicationConfigOption.values()) { @@ -1024,7 +873,7 @@ public class ObserveSwingApplicationConfig extends ApplicationConfig { new String[tmp.size()]); PropertyChangeListener[] toRemove = - UIHelper.findJaxxPropertyChangeListener( + SwingUtil.findJaxxPropertyChangeListener( propertyNames, getPropertyChangeListeners()); if (toRemove == null || toRemove.length == 0) { @@ -1060,7 +909,7 @@ public class ObserveSwingApplicationConfig extends ApplicationConfig { } } - void setVersion(Version version) { + private void setVersion(Version version) { this.version = version; } @@ -1097,7 +946,7 @@ public class ObserveSwingApplicationConfig extends ApplicationConfig { AfterInit, BeforeExit } - protected void firePropertyChange(String propertyName, Object newValue) { + private void firePropertyChange(String propertyName, Object newValue) { pcs.firePropertyChange(propertyName, null, newValue); } } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigOption.java b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigOption.java similarity index 98% rename from application-swing/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigOption.java rename to application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigOption.java index 0d08b4f..756fc02 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigOption.java +++ b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigOption.java @@ -23,9 +23,9 @@ package fr.ird.observe.application.swing.configuration; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; -import fr.ird.observe.application.swing.db.constants.CreationMode; -import fr.ird.observe.application.swing.db.constants.DbMode; -import fr.ird.observe.services.ObserveSpeciesListConfiguration; +import fr.ird.observe.application.swing.configuration.constants.CreationMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; +import fr.ird.observe.services.dto.ObserveSpeciesListConfiguration; import org.nuiton.config.ApplicationConfig; import org.nuiton.config.ConfigOptionDef; import org.nuiton.version.Version; @@ -815,7 +815,7 @@ public enum ObserveSwingApplicationConfigOption implements ConfigOptionDef { ); public static final List<ObserveSwingApplicationConfigOption> MAP_LAYERS = ImmutableList.of(MAP_LAYER_1, MAP_LAYER_2, MAP_LAYER_3, - MAP_LAYER_4, MAP_LAYER_5, MAP_LAYER_6, MAP_LAYER_7, MAP_LAYER_8, MAP_LAYER_9, MAP_LAYER_10); + MAP_LAYER_4, MAP_LAYER_5, MAP_LAYER_6, MAP_LAYER_7, MAP_LAYER_8, MAP_LAYER_9, MAP_LAYER_10); /** * Clef qui represente l'option (c'est celle enregistrée dans le fichier de diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigProvider.java b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigProvider.java similarity index 88% rename from application-swing/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigProvider.java rename to application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigProvider.java index 1414548..9d0dc57 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigProvider.java +++ b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/ObserveSwingApplicationConfigProvider.java @@ -22,7 +22,6 @@ package fr.ird.observe.application.swing.configuration; * #L% */ -import fr.ird.observe.application.swing.ObserveCLAction; import org.nuiton.config.ApplicationConfigProvider; import org.nuiton.config.ConfigActionDef; import org.nuiton.config.ConfigOptionDef; @@ -36,7 +35,7 @@ import static org.nuiton.i18n.I18n.l; */ public class ObserveSwingApplicationConfigProvider implements ApplicationConfigProvider { - public static final String OBSERVE_SWING_CONFIGURATION_PROVIDER_NAME = "observeSwing"; + static final String OBSERVE_SWING_CONFIGURATION_PROVIDER_NAME = "observeSwing"; @Override public String getName() { @@ -55,6 +54,6 @@ public class ObserveSwingApplicationConfigProvider implements ApplicationConfigP @Override public ConfigActionDef[] getActions() { - return ObserveCLAction.ActionDefinition.values(); + return ObserveSwingApplicationActionDefinition.values(); } } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/db/constants/CreationMode.java b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/constants/CreationMode.java similarity index 98% rename from application-swing/src/main/java/fr/ird/observe/application/swing/db/constants/CreationMode.java rename to application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/constants/CreationMode.java index 6dc2c65..c70bf54 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/db/constants/CreationMode.java +++ b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/constants/CreationMode.java @@ -19,7 +19,7 @@ * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ -package fr.ird.observe.application.swing.db.constants; +package fr.ird.observe.application.swing.configuration.constants; import fr.ird.observe.services.dto.DataSourceCreateConfigurationDto; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/db/constants/DbMode.java b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/constants/DbMode.java similarity index 96% rename from application-swing/src/main/java/fr/ird/observe/application/swing/db/constants/DbMode.java rename to application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/constants/DbMode.java index 519ce5d..3633c5b 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/db/constants/DbMode.java +++ b/application-swing-configuration/src/main/java/fr/ird/observe/application/swing/configuration/constants/DbMode.java @@ -19,7 +19,7 @@ * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ -package fr.ird.observe.application.swing.db.constants; +package fr.ird.observe.application.swing.configuration.constants; import static org.nuiton.i18n.I18n.n; diff --git a/application-swing/src/main/resources/META-INF/services/org.nuiton.config.ApplicationConfigProvider b/application-swing-configuration/src/main/resources/META-INF/services/org.nuiton.config.ApplicationConfigProvider similarity index 100% rename from application-swing/src/main/resources/META-INF/services/org.nuiton.config.ApplicationConfigProvider rename to application-swing-configuration/src/main/resources/META-INF/services/org.nuiton.config.ApplicationConfigProvider diff --git a/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_en_GB.properties b/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_en_GB.properties new file mode 100644 index 0000000..661bca7 --- /dev/null +++ b/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_en_GB.properties @@ -0,0 +1,104 @@ +observe.action.commandline.configure.ui=Configure application +observe.action.commandline.create.id=Générer des topiaIds.\nDeux paramètres sont nécessaires \: le FQN de la classe et le nombre d'id à générer. +observe.action.commandline.disable.main.ui=Do NOT launch main gui +observe.action.commandline.help=Show help +observe.action.commandline.help.ui=Show gui help +observe.action.commandline.launch.admin.ui=Launch an administration task +observe.action.commandline.launch.h2.server.mode=Launch ObServe in server mode +observe.action.commandline.launch.obstuna.admin.ui=Launch an adminstration task on obstuna +observe.action.commandline.use.jmx=Add JMX support +observe.config.configFileName.description=Configuration filename +observe.config.db.locale=Language of data source +observe.config.defaultBackupDirectory.description=Default directory where are stored backup of data sources +observe.config.defaultCreationMode=Default creation mode of new local data source +observe.config.defaultDataDirectory.description=Default user directory +observe.config.defaultDbMode=Default db mode +observe.config.defaultGpsMaxDelay=Default maximum range of minutes between two Gps points +observe.config.defaultGpsMaxSpeed=Maximum speed +observe.config.defaultI18nDirectory.description=Default i18n directory where to store i18n resources +observe.config.defaultInitialDbDump.description=Default location of initial database +observe.config.defaultLocalDbDirectory.description=Default directory where to store local data source +observe.config.defaultMapDirectory.description=Default directory where to store map layers +observe.config.defaultReportDirectory.description=Default directory where to store report definition files +observe.config.defaultResourcesDirectory.description=Default user resources directory +observe.config.defaultTmpDirectory.description=Default temporary directory used by application and clean at each launch. +observe.config.defaultValidationReportDirectory.description=Default validation report directory +observe.config.devMode=Dev mode +observe.config.h2.can.migrate.description=Flag to know if you can migrate h2 data sources +observe.config.h2.login.description=H2 Login +observe.config.h2.password.description=H2 Password +observe.config.h2.serverPort.description=Server port number +observe.config.logConfigurationFile.description=Log file configuration +observe.config.map.background.description=Color of background +observe.config.map.layer1.description=File (shapefile) for layer 1 of map +observe.config.map.layer10.description=File (shapefile) for layer 10 of map +observe.config.map.layer2.description=File (shapefile) for layer 2 of map +observe.config.map.layer3.description=File (shapefile) for layer 3 of map +observe.config.map.layer4.description=File (shapefile) for layer 4 of map +observe.config.map.layer5.description=File (shapefile) for layer 5 of map +observe.config.map.layer6.description=File (shapefile) for layer 6 of map +observe.config.map.layer7.description=File (shapefile) for layer 7 of map +observe.config.map.layer8.description=File (shapefile) for layer 8 of map +observe.config.map.layer9.description=File (shapefile) for layer 9 of map +observe.config.map.style.description=File of styles used in map +observe.config.name=ObServe configuration +observe.config.observation.activitysDetaillees=Observation of detailled activities +observe.config.observation.fauneAssociee=Observation of non target +observe.config.observation.floatingObject=Observation of floating objects +observe.config.observation.gleure=Observation of gleure +observe.config.observation.mammiferes=Observation of mammals +observe.config.observation.mensurations=Observation of mensurations +observe.config.observation.oiseaux=Observation of birds +observe.config.observation.rejetsThons=Observation of discarded target catch +observe.config.obstuna.login.description=Remote login +observe.config.obstuna.password.description=Remote password +observe.config.obstuna.url.description=URL of remote data source +observe.config.obstuna.useSsl.description=Flag sets to true when your are using remote with ssl +observe.config.pg.can.migrate.description=Flat sets to true when you can migrate remote data sources +observe.config.server.dataBaseName.description=Optional name of database name on server +observe.config.server.login.description=Server login +observe.config.server.password.description=Server password +observe.config.server.url.description=Server url +observe.config.showMigrationProgression=Show migration progression +observe.config.showMigrationSql=Show migration sql queries +observe.config.showSql=Show sql +observe.config.speciesList.longline.catch=Species for catches +observe.config.speciesList.longline.encounter=Species for encounters +observe.config.speciesList.seine.nonTargetCatch=Species for non target catches +observe.config.speciesList.seine.objectObservedSpecies=Species for object observed species +observe.config.speciesList.seine.objectSchoolEstimate=Species for object school estimates +observe.config.speciesList.seine.schoolEstimate=Species for school esitmates +observe.config.speciesList.seine.targetCatch=Species for target catches +observe.config.ui.autoPopupNumberEditor=Flag sets to true when number editor show automaticly popup +observe.config.ui.changeSynchroSrc=Flag sets to true if you can change local source in admin tasks +observe.config.ui.fullscreen=Flag sets to true to lauch application in full screen mode +observe.config.ui.loadLocalStorage=Flag sets to true to load local data source when application starts +observe.config.ui.locale=Application's language +observe.config.ui.showNumberEditorButton=Flag sets to true to show button to invoke popup on number's editors +observe.config.ui.showTimeEditorSlider=Show timer slider +observe.config.ui.storeRemoteStorage=Flag sets to true to store in config a remote connexion (except passwords) +observe.config.ui.treeOpenNodes=Opened data from last session +observe.message.save.configuration=Save configuration in file %1$s +observe.model.version=Model version +observe.runner.config.migrate.file=Le fichier de configuration %1$s a été déplacée de \n%2$s\nvers\n%3$s +observe.storage.creationMode.empty=Generate an empty data base. +observe.storage.creationMode.empty.description=Generate a new empty data base.\nThis database won't any any referential, so you will need to import a referential later to use it. +observe.storage.creationMode.externalDump=Load a database backup (*.sql.gz) +observe.storage.creationMode.externalDump.description=Create a new databse from \na data base backup +observe.storage.creationMode.importLocalStorage=Import referential from a local data base +observe.storage.creationMode.importLocalStorage.description=Generate a new local data bse and import in it the referential of another local data base. +observe.storage.creationMode.importRemoteStorage=Import referential from a remote database +observe.storage.creationMode.importRemoteStorage.description=Generate a new local data base and import in it the referential of a remove database. +observe.storage.creationMode.importServerStorage=Import referential from a remote server +observe.storage.creationMode.importServerStorage.description=Generate a new local data base and import in it the referential of a remove server. +observe.storage.creationMode.internalDump=Load embbeded local database +observe.storage.creationMode.internalDump.description=Generate a new local data base and import in it the referential of the last embbeded database. +observe.storage.dbMode.createLocal=Create a new local database +observe.storage.dbMode.createLocal.description=Create a new local database (type H2) +observe.storage.dbMode.useLocal=Use local database +observe.storage.dbMode.useLocal.description=Use the local database (type H2) +observe.storage.dbMode.useRemote=Use a remote database +observe.storage.dbMode.useRemote.description=Use a remote database (type Postgresql) +observe.storage.dbMode.useServer=Use a remote server +observe.storage.dbMode.useServer.description=Use a remote server (type ObserveWeb) +observe.title.config.migrate=Move configuration file diff --git a/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_es_ES.properties b/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_es_ES.properties new file mode 100644 index 0000000..728c45f --- /dev/null +++ b/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_es_ES.properties @@ -0,0 +1,104 @@ +observe.action.commandline.configure.ui=Configurar la aplicación +observe.action.commandline.create.id=Generar topiaIds.\nDos parametros son necesarios\:\n\tEl FQN de la clase\n\tEl número de id a generar. +observe.action.commandline.disable.main.ui=No ejecutar la interfaz grafica +observe.action.commandline.help=Mostrar la ayuda +observe.action.commandline.help.ui=Mostrar el manual de usuario (modo grafico) +observe.action.commandline.launch.admin.ui=Ejecutar una operación de administración +observe.action.commandline.launch.h2.server.mode=Ejecutar ObServe en modo servidor +observe.action.commandline.launch.obstuna.admin.ui=Ejecutar una operación de administración sobre Obstuna +observe.action.commandline.use.jmx=Mostrar el soporte JMX +observe.config.configFileName.description=Nombre del archivo de configuración +observe.config.db.locale=Idioma del referencial +observe.config.defaultBackupDirectory.description=Carpeta por defecto para copia de seguridad de bases locales +observe.config.defaultCreationMode=Modo de creación de la base local por defecto +observe.config.defaultDataDirectory.description=Directorio por defecto de los recursos de usuario de la aplicación +observe.config.defaultDbMode=Modo de conexión creado por defecto +observe.config.defaultGpsMaxDelay=Número de minutos máximos por defectro entre 2 puntos gps +observe.config.defaultGpsMaxSpeed=Velocidad máxima por defecto entre 2 puntos pgs +observe.config.defaultI18nDirectory.description=Directorio por defecto de recursos de traducción de la aplicación +observe.config.defaultInitialDbDump.description=Base empotrada creada durante la primera importación de una base remota +observe.config.defaultLocalDbDirectory.description=Directorio de almacenamiento de la base local +observe.config.defaultMapDirectory.description=El directorio donde se ubican los mapas. +observe.config.defaultReportDirectory.description=Directorio por defecto de los informes de la aplicación +observe.config.defaultResourcesDirectory.description=Directorio de almacenamiento de los recursos de usuario como las traducciones o la consultas de informes +observe.config.defaultTmpDirectory.description=Directorio temporal por defecto +observe.config.defaultValidationReportDirectory.description=Directorio por defecto de almacenamiento de los informes de validación +observe.config.devMode=Modo desarrollador +observe.config.h2.can.migrate.description=Autorizar la actualización de las bases locales (h2) +observe.config.h2.login.description=Login h2 +observe.config.h2.password.description=Contraseña h2 +observe.config.h2.serverPort.description=Puerto del servidor h2 +observe.config.logConfigurationFile.description=Archivo de configuration de los logs +observe.config.map.background.description=Color del fondo del mapa +observe.config.map.layer1.description=Archivo (shapeFiles) del primer calco del mapa +observe.config.map.layer10.description=Archivo (shapeFiles) del décimo calco del mapa +observe.config.map.layer2.description=Archivo (shapeFiles) del segundo calco del mapa +observe.config.map.layer3.description=Archivo (shapeFiles) del tercero calco del mapa +observe.config.map.layer4.description=Archivo (shapeFiles) del cuarto calco del mapa +observe.config.map.layer5.description=Archivo (shapeFiles) del quinto calco del mapa +observe.config.map.layer6.description=Archivo (shapeFiles) del sixto calco del mapa +observe.config.map.layer7.description=Archivo (shapeFiles) del septimo calco del mapa +observe.config.map.layer8.description=Archivo (shapeFiles) del octavo calco del mapa +observe.config.map.layer9.description=Archivo (shapeFiles) del noveno calco del mapa +observe.config.map.style.description=Archivo de los estilos a aplicar sobre los calcos del mapa +observe.config.name=Configuración de ObServe +observe.config.observation.activitysDetaillees=Observación de actividades detalladas +observe.config.observation.fauneAssociee=Observación de Fauna asociada +observe.config.observation.floatingObject=Observación de objetos flotantes +observe.config.observation.gleure=Observación de carnada +observe.config.observation.mammiferes=Observación de mamiferos +observe.config.observation.mensurations=Observación de mendiciones +observe.config.observation.oiseaux=Observaciones de pájaros +observe.config.observation.rejetsThons=Observación de descartes de atún +observe.config.obstuna.login.description=Nombre de usuario para conectarse a la base Obstuna +observe.config.obstuna.password.description=Contraseña para conectarse a la base Obstuna +observe.config.obstuna.url.description=Url de conexión a la base Obstuna +observe.config.obstuna.useSsl.description=Bandera para permitir la utilización del modo ssl para la conexión a Obstuna +observe.config.pg.can.migrate.description=Autorizar la actualización de las bases remotas (debe ser el propietario de la base) +observe.config.server.dataBaseName.description=El nombre opcinal de la base de referencia sobre el servidor +observe.config.server.login.description=Identificador del usuario +observe.config.server.password.description=La contraseña del usuario +observe.config.server.url.description=La dirección (url) del servidor +observe.config.showMigrationProgression=Mostar los logs de actualización de una base de datos +observe.config.showMigrationSql=Mostrar en los logs las consultas realizadas durante la actualización de una base de datos +observe.config.showSql=Mostrar en los los todas las consultas sql ejecutadas +observe.config.speciesList.longline.catch=Especies para las capturas - TDR +observe.config.speciesList.longline.encounter=Especies para los encuentros +observe.config.speciesList.seine.nonTargetCatch=Especies para las capturas que no forman parte del objetivo +observe.config.speciesList.seine.objectObservedSpecies=Especies para los especies que no forman parte del objetivo y que fueron observadas +observe.config.speciesList.seine.objectSchoolEstimate=Especies para las estimaciones banco objeto +observe.config.speciesList.seine.schoolEstimate=Especies para las estimaciones +observe.config.speciesList.seine.targetCatch=Especies par las capturas objetivo +observe.config.ui.autoPopupNumberEditor=Para mostrar automáticamente el editor numérico durante la edición de un número +observe.config.ui.changeSynchroSrc=Pour autoriser la sélection de la base source dans les opérations sur base +observe.config.ui.fullscreen=Para mostrar en modo pantalla completa la aplicación +observe.config.ui.loadLocalStorage=Cambiar la base local al iniciar la aplicación +observe.config.ui.locale=Idioma de la aplicación (fr_FR, en_GB o es_ES) +observe.config.ui.showNumberEditorButton=Para mostrar el botón que permite usar el editor numérico a la izquierda de cada campo numérico +observe.config.ui.showTimeEditorSlider=Para mostrar la regla de edición de las horas +observe.config.ui.storeRemoteStorage=Para activar la copia de seguridad de la configuración de la fuente de datos remota +observe.config.ui.treeOpenNodes=Nudos abiertos del arbol abiertos cuando se cerró la base por última vez +observe.message.save.configuration=Guardar la configuración en el archivo %1$s +observe.model.version=Versión del modelo de datos +observe.runner.config.migrate.file=El fichero de configuración %1$s ha sido reemplazado por \n%2$s\nhacia\n%3$s +observe.storage.creationMode.empty=Generar una base vacía +observe.storage.creationMode.empty.description=Generar una nueva base local vacía.\nEsta base no tendrá referencial y usted tendrá que importar lo posteriormente... +observe.storage.creationMode.externalDump=Cargar una copia de seguridad de la base local (*.sql.gz) +observe.storage.creationMode.externalDump.description=Crear una nueva base local a partir\nde una copia de seguridad anterior de la aplicación +observe.storage.creationMode.importLocalStorage=Importar el referencial de una base local +observe.storage.creationMode.importLocalStorage.description=Generar una nueva base local e importar el referencial de una otra base local. +observe.storage.creationMode.importRemoteStorage=Importar el referencial de una base remota +observe.storage.creationMode.importRemoteStorage.description=Generar una nueva base locale e importar el referencial e una otra base remota. +observe.storage.creationMode.importServerStorage=Importar el referencial de un servidor remoto +observe.storage.creationMode.importServerStorage.description=Generar una nueva base local e importar el referencial de un servidor remoto. +observe.storage.creationMode.internalDump=Cargar la base de datos incrustada +observe.storage.creationMode.internalDump.description=Generar una nueva base local a partir\nde la última versión de la base incrustada. +observe.storage.dbMode.createLocal=Crear una base local +observe.storage.dbMode.createLocal.description=Crear una base local de tipo h2 +observe.storage.dbMode.useLocal=Utilizar une base local +observe.storage.dbMode.useLocal.description=Utilizar una base local de tipo h2 +observe.storage.dbMode.useRemote=Utilizar una base remota +observe.storage.dbMode.useRemote.description=Utilizar una base remota de tipo postgres +observe.storage.dbMode.useServer=Utilizar un servidor remoto +observe.storage.dbMode.useServer.description=Utilizar un servidor remoto +observe.title.config.migrate=Cambio de la ubicación del archivo de configuración diff --git a/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_fr_FR.properties b/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_fr_FR.properties new file mode 100644 index 0000000..8744e14 --- /dev/null +++ b/application-swing-configuration/src/main/resources/i18n/application-swing-configuration_fr_FR.properties @@ -0,0 +1,104 @@ +observe.action.commandline.configure.ui=Configurer l'application +observe.action.commandline.create.id=Générer des topiaIds.\nDeux paramètres sont nécessaires\:\n\tLe FQN de la classe\n\tLe nombre d'id à générer. +observe.action.commandline.disable.main.ui=Ne pas lancer l'interface graphique +observe.action.commandline.help=Afficher l'aide +observe.action.commandline.help.ui=Afficher le manuel utilisateur (mode graphique) +observe.action.commandline.launch.admin.ui=Lancer une opération d'administration +observe.action.commandline.launch.h2.server.mode=Lancer ObServe en mode serveur +observe.action.commandline.launch.obstuna.admin.ui=Lancer une opération d'administration sur Obstuna +observe.action.commandline.use.jmx=Ajouter le support JMX +observe.config.configFileName.description=Le nom du fichier de configuration +observe.config.db.locale=La langue du référentiel +observe.config.defaultBackupDirectory.description=Répertoire par défaut où sauvegarder les bases locales +observe.config.defaultCreationMode=Le mode de création de base locale par défaut +observe.config.defaultDataDirectory.description=Répertoire par défault des resources utilisateurs de l'application +observe.config.defaultDbMode=Le mode de connexion a créer par défaut +observe.config.defaultGpsMaxDelay=Le nombre par défaut de minutes maximum entre deux points gps +observe.config.defaultGpsMaxSpeed=La vitesse maximum par défaut en tre deux points gps +observe.config.defaultI18nDirectory.description=Répertoire par défaut des resources de traduction de l'application +observe.config.defaultInitialDbDump.description=La base embarquée créee lors de le premier import d'une base distante. +observe.config.defaultLocalDbDirectory.description=Le répertoire où est stockée la base locale. +observe.config.defaultMapDirectory.description=Le répertoire où sont stockées les cartes. +observe.config.defaultReportDirectory.description=Répertoire par défaut des rapports de l'application +observe.config.defaultResourcesDirectory.description=Le répertoire où sont stockées les resources de l'utilisateur comme les traductions ou les requètes de rapports. +observe.config.defaultTmpDirectory.description=Le répertoire temporaire par défaut +observe.config.defaultValidationReportDirectory.description=Le répertoire par défaut où sont stockés les rapports de validation +observe.config.devMode=Mode développeur +observe.config.h2.can.migrate.description=Autoriser la mise à jour des bases locales (h2) +observe.config.h2.login.description=Le login h2 +observe.config.h2.password.description=Le mot de passe h2 +observe.config.h2.serverPort.description=Port du serveur h2 +observe.config.logConfigurationFile.description=Fichier de configuration des logs +observe.config.map.background.description=Couleur du fond de carte +observe.config.map.layer1.description=Fichier (shapeFiles) du premier calque de la carte +observe.config.map.layer10.description=Fichier (shapeFiles) du dixième calque de la carte +observe.config.map.layer2.description=Fichier (shapeFiles) du deuxième calque de la carte +observe.config.map.layer3.description=Fichier (shapeFiles) du troisième calque de la carte +observe.config.map.layer4.description=Fichier (shapeFiles) du quatrième calque de la carte +observe.config.map.layer5.description=Fichier (shapeFiles) du cinquième calque de la carte +observe.config.map.layer6.description=Fichier (shapeFiles) du sixième calque de la carte +observe.config.map.layer7.description=Fichier (shapeFiles) du septième calque de la carte +observe.config.map.layer8.description=Fichier (shapeFiles) du huitième calque de la carte +observe.config.map.layer9.description=Fichier (shapeFiles) du neuvième calque de la carte +observe.config.map.style.description=Fichier des style à appliquer sur les calques de la carte +observe.config.name=configuration d'ObServe +observe.config.observation.activitysDetaillees=Observation des activités détaillées +observe.config.observation.fauneAssociee=Observation des Faunes associées +observe.config.observation.floatingObject=Observation des objets flottants +observe.config.observation.gleure=Observation des gleures +observe.config.observation.mammiferes=Observation des mammifères +observe.config.observation.mensurations=Observation des mensurations +observe.config.observation.oiseaux=Observation des oiseaux +observe.config.observation.rejetsThons=Observation des rejets thon +observe.config.obstuna.login.description=Le nom d'utilisateur pour se connecter à la base Obstuna +observe.config.obstuna.password.description=Le mote de passe pour se connecter à la base Obstuna +observe.config.obstuna.url.description=L'url de connexion à la base Obstuna +observe.config.obstuna.useSsl.description=Drapeau pour permettre l'utilisation du mode ssl pour la connexion à Obstuna +observe.config.pg.can.migrate.description=Autoriser la mise à jour des bases distantes (il faut être propriétaire de la base) +observe.config.server.dataBaseName.description=Le nom optionel de la base cible sur le serveur +observe.config.server.login.description=Identifiant de l'utilisateur +observe.config.server.password.description=Le mot de passe de l'utilisateur +observe.config.server.url.description=L'url du serveur +observe.config.showMigrationProgression=Affichier dans les logs la progression de la mise à jour d'une base +observe.config.showMigrationSql=Afficher dans les logs les requêtes jouées lors de la mise à jour d'une base +observe.config.showSql=Afficher dans les logs toutes les requêtes sql exéts +observe.config.speciesList.longline.catch=Espèces pour les captures - TDR +observe.config.speciesList.longline.encounter=Espèces pour les rencontre +observe.config.speciesList.seine.nonTargetCatch=Espèces pour les captures non cible +observe.config.speciesList.seine.objectObservedSpecies=Espèces pour les espèces non cible observées +observe.config.speciesList.seine.objectSchoolEstimate=Espèces pour les estimations banc objet +observe.config.speciesList.seine.schoolEstimate=Espèces pour les estimations +observe.config.speciesList.seine.targetCatch=Espèces pour les captures cible +observe.config.ui.autoPopupNumberEditor=Pour afficher automatiquement l'éditeur numérique lors de l'édition d'un count +observe.config.ui.changeSynchroSrc=Pour autoriser la sélection de la base source dans les opérations sur base +observe.config.ui.fullscreen=Pour afficher l'application en mode pleine écran +observe.config.ui.loadLocalStorage=Charger la base locale au démarrage de l'application +observe.config.ui.locale=Langue utilisée par l'application (fr_FR, en_GB ou es_ES) +observe.config.ui.showNumberEditorButton=Pour afficher le bouton qui permet d'utiliser l'éditeur numérique à gauche de chaque champs numérique +observe.config.ui.showTimeEditorSlider=Pour afficher la réglette d'édition des heures +observe.config.ui.storeRemoteStorage=Pour activer la sauvegarde de la configuration de la source distante +observe.config.ui.treeOpenNodes=Noeuds de l'arbre ouverts lors de la dernière fermeture de la base +observe.message.save.configuration=Sauvegarde de la configuration dans le fichier %1$s +observe.model.version=Version du modèle de données +observe.runner.config.migrate.file=Le fichier de configuration %1$s a été déplacée de \n%2$s\nvers\n%3$s +observe.storage.creationMode.empty=Générer une base vide +observe.storage.creationMode.empty.description=Générer une nouvelle base locale vide.\nCette base n'aura pas de référentiel et il vous faudra ensuite faire un import de référentiel... +observe.storage.creationMode.externalDump=Charger une sauvegarde de base locale (*.sql.gz) +observe.storage.creationMode.externalDump.description=Créer une nouvelle base locale à partir\nd'une précédente sauvegarde de l'application +observe.storage.creationMode.importLocalStorage=Importer le référentiel d'une base locale +observe.storage.creationMode.importLocalStorage.description=Générer une nouvelle base locale et y importer le référentiel d'une autre base locale. +observe.storage.creationMode.importRemoteStorage=Importer le référentiel d'une base distante +observe.storage.creationMode.importRemoteStorage.description=Générer une nouvelle base locale et y importer le référentiel d'une autre base distante. +observe.storage.creationMode.importServerStorage=Importer le référentiel dun serveur distant +observe.storage.creationMode.importServerStorage.description=Générer une nouvelle base locale et y importer le référentiel d'un serveur distant. +observe.storage.creationMode.internalDump=Charger la base embarquée +observe.storage.creationMode.internalDump.description=Générer une nouvelle base locale à partir\nde la dernière version de la base embarquée. +observe.storage.dbMode.createLocal=Créer une base locale +observe.storage.dbMode.createLocal.description=Creer une base locale de type h2 +observe.storage.dbMode.useLocal=Utiliser une base locale +observe.storage.dbMode.useLocal.description=Utiliser une base locale de type h2 +observe.storage.dbMode.useRemote=Utiliser une base distante +observe.storage.dbMode.useRemote.description=Utiliser une base distante de type postgres +observe.storage.dbMode.useServer=Utiliser un serveur distant +observe.storage.dbMode.useServer.description=Utiliser un serveur distant +observe.title.config.migrate=Déplacement du fichier de configuration diff --git a/application-swing/src/main/resources/log4j.properties b/application-swing-configuration/src/main/resources/log4j.properties similarity index 100% rename from application-swing/src/main/resources/log4j.properties rename to application-swing-configuration/src/main/resources/log4j.properties diff --git a/application-swing/src/main/resources/observe-log4j.properties b/application-swing-configuration/src/main/resources/observe-log4j.properties similarity index 100% rename from application-swing/src/main/resources/observe-log4j.properties rename to application-swing-configuration/src/main/resources/observe-log4j.properties diff --git a/application-swing/src/main/resources/observeSwing.conf b/application-swing-configuration/src/main/resources/observeSwing.conf similarity index 100% rename from application-swing/src/main/resources/observeSwing.conf rename to application-swing-configuration/src/main/resources/observeSwing.conf diff --git a/application-swing/src/main/resources/validators.xml b/application-swing-configuration/src/main/resources/validators.xml similarity index 100% rename from application-swing/src/main/resources/validators.xml rename to application-swing-configuration/src/main/resources/validators.xml diff --git a/application-swing/pom.xml b/application-swing/pom.xml index d8cefd6..8e8d85f 100644 --- a/application-swing/pom.xml +++ b/application-swing/pom.xml @@ -117,6 +117,11 @@ <artifactId>application-swing-decoration</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>application-swing-configuration</artifactId> + <version>${project.version}</version> + </dependency> <!-- FIXME Voir pourquoi on doit mettre ça sinon l'analyse des dépendances ne passe pas --> <dependency> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveCLAction.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveCLAction.java index 1840948..cba8ef5 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveCLAction.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveCLAction.java @@ -21,6 +21,7 @@ */ package fr.ird.observe.application.swing; +import fr.ird.observe.application.swing.configuration.ObserveSwingApplicationActionDefinition; import fr.ird.observe.application.swing.configuration.ObserveSwingApplicationConfig; import fr.ird.observe.application.swing.configuration.ObserveSwingApplicationConfigOption; import fr.ird.observe.application.swing.ui.ObserveMainUIHandler; @@ -31,7 +32,6 @@ import fr.ird.observe.application.swing.ui.storage.RemoteUILauncher; import jaxx.runtime.swing.application.ActionWorker; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.nuiton.config.ConfigActionDef; import java.io.Console; import java.io.IOException; @@ -43,7 +43,7 @@ import static org.nuiton.i18n.I18n.t; /** * Les actions appellables via {@link ObserveRunner}. * - * Consulter la classe {@link ActionDefinition} pour connaitre les actions + * Consulter la classe {@link ObserveSwingApplicationActionDefinition} pour connaitre les actions * possibles. * * @author Tony Chemit - chemit@codelutin.com @@ -56,118 +56,6 @@ public class ObserveCLAction { /** Logger */ private static final Log log = LogFactory.getLog(ObserveCLAction.class); - /** - * Les actions appellables en ligne de commande. - * - * @author Tony Chemit - chemit@codelutin.com - * @since 1.4 - */ - public enum ActionDefinition implements ConfigActionDef { - /** - * Afficher l'aide dans la console. - * - * @since 1.0 - */ - HELP(false, t("observe.action.commandline.help"), - ObserveCLAction.class.getName() + "#help", "-h", "--help"), - /** - * Afficher l'aide embarqué de l'application (dans une interface - * graphique). - * - * @since 1.0 - */ - HELP_UI(false, t("observe.action.commandline.help.ui"), - ObserveCLAction.class.getName() + "#helpUI", "--help-ui"), - /** - * Pour désactiver le lancement de l'application graphique. - * - * @since 1.0 - */ - NO_MAIN_UI(false, t("observe.action.commandline.disable.main.ui"), - ObserveCLAction.class.getName() + "#disableMainUI", "-n", - "--no-main"), - /** - * Pour lancer l'interface graphique du configuration de l'application. - * - * @since 1.0 - */ - CONFIGURE_UI(false, t("observe.action.commandline.configure.ui"), - ObserveCLAction.class.getName() + "#configure", - "--configure"), - /** - * Pour lancer une opération d'administration via un assistant - * graphique. - * - * @since 1.4 - */ - ADMIN_UI(true, t("observe.action.commandline.launch.admin.ui"), - ObserveCLAction.class.getName() + "#launchAdminUI", "-a", - "--admin"), - /** - * Pour lancer une opération d'administration via un assistant - * graphique. - * - * @since 1.4 - */ - OBSTUNA_ADMIN_UI(true, t("observe.action.commandline.launch.obstuna.admin.ui"), - ObserveCLAction.class.getName() + "#launchObstunaAdminUI", - "--obstuna-admin"), - - /** - * Pour lancer la base locale en mode serveur. - * - * @since 2.1 - */ - H2_SERVER_MODE(true, t("observe.action.commandline.launch.h2.server.mode"), - ObserveCLAction.class.getName() + "#launchH2ServerMode", - "--h2-server"), - /** - * Pour activer le support JMX pour les source de données. - * - * @since 1.4 - */ - USE_JMX(true, t("observe.action.commandline.use.jmx"), - ObserveCLAction.class.getName() + "#useJMX", - "--jmx"), - - CREATE_ID(true, - t("observe.action.commandline.create.id"), - ObserveCLAction.class.getName() + "#createId", - "--create-id"); - - - public final String description; - - public final String action; - - public final String[] aliases; - - public final boolean admin; - - ActionDefinition(boolean admin, String description, String action, String... aliases) { - this.description = description; - this.action = action; - this.aliases = aliases; - this.admin = admin; - } - - public String getDescription() { - return description; - } - - public String getAction() { - return action; - } - - public String[] getAliases() { - return aliases; - } - - public boolean isAdmin() { - return admin; - } - } - /** La configuration de l'application. */ protected ObserveSwingApplicationConfig config; @@ -205,7 +93,7 @@ public class ObserveCLAction { out.append("Actions:"); out.append('\n'); - for (ActionDefinition a : ActionDefinition.values()) { + for (ObserveSwingApplicationActionDefinition a : ObserveSwingApplicationActionDefinition.values()) { out.append("\t"); out.append(Arrays.toString(a.aliases)); out.append("("); @@ -307,7 +195,7 @@ public class ObserveCLAction { ObserveSwingApplicationContext.get().setContextValue( true, - ActionDefinition.H2_SERVER_MODE.name()); + ObserveSwingApplicationActionDefinition.H2_SERVER_MODE.name()); } } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveRunner.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveRunner.java index ec34dc5..4bf0f8e 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveRunner.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveRunner.java @@ -22,12 +22,14 @@ package fr.ird.observe.application.swing; import com.google.common.base.Preconditions; +import fr.ird.observe.application.swing.configuration.ObserveSwingApplicationActionDefinition; import fr.ird.observe.application.swing.configuration.ObserveSwingApplicationConfig; import fr.ird.observe.application.swing.ui.ObserveMainUI; import fr.ird.observe.application.swing.ui.ObserveMainUIHandler; import fr.ird.observe.application.swing.ui.UIHelper; import fr.ird.observe.application.swing.ui.actions.StartServerModeAction; import fr.ird.observe.application.swing.ui.util.FloatConverter; +import fr.ird.observe.util.ObserveUtil; import jaxx.runtime.FileChooserUtil; import jaxx.runtime.swing.application.ApplicationRunner; import org.apache.commons.beanutils.ConvertUtils; @@ -41,6 +43,7 @@ import org.apache.log4j.LogManager; import org.apache.log4j.PropertyConfigurator; import org.jdesktop.swingx.plaf.basic.CalendarHeaderHandler; import org.jdesktop.swingx.plaf.basic.SpinningCalendarHeaderHandler; +import org.nuiton.config.ConfigActionDef; import org.nuiton.converter.ConverterUtil; import org.nuiton.i18n.I18n; import org.nuiton.i18n.init.DefaultI18nInitializer; @@ -58,7 +61,6 @@ import java.net.URL; import java.util.Arrays; import java.util.Date; import java.util.Locale; -import java.util.Map; import java.util.Properties; import static fr.ird.observe.application.swing.configuration.ObserveSwingApplicationConfigOption.BACKUP_DIRECTORY; @@ -83,9 +85,9 @@ public abstract class ObserveRunner extends ApplicationRunner { /** Logger */ private static Log log = LogFactory.getLog(ObserveRunner.class); - protected static ObserveResourceManager resourceManager; + private static ObserveResourceManager resourceManager; - protected static ObserveActionExecutor actionExecutor; + private static ObserveActionExecutor actionExecutor; public static ObserveRunner getRunner() { return (ObserveRunner) ApplicationRunner.getRunner(); @@ -111,7 +113,7 @@ public abstract class ObserveRunner extends ApplicationRunner { // return true; // } - public final boolean init; + private final boolean init; public ObserveRunner(String... args) { super(args); @@ -119,14 +121,14 @@ public abstract class ObserveRunner extends ApplicationRunner { initOnce(); } - public static void runAction(String actionLabel, Runnable action) { + private static void runAction(String actionLabel, Runnable action) { getActionExecutor().addAction(actionLabel, action); } - public static void runAction(String actionLabel, - Object invoker, - String methodName, - Object... arguments) { + private static void runAction(String actionLabel, + Object invoker, + String methodName, + Object... arguments) { Runnable action; try { action = getActionExecutor().createRunnable( @@ -244,7 +246,7 @@ public abstract class ObserveRunner extends ApplicationRunner { } } - protected void initLog(ObserveSwingApplicationConfig config) throws IOException { + private void initLog(ObserveSwingApplicationConfig config) throws IOException { File logFile = config.getLogConfigurationFile(); Preconditions.checkState(logFile.exists(), "Le fichier de configuration des logs %s n'existe pas.", logFile); @@ -260,13 +262,8 @@ public abstract class ObserveRunner extends ApplicationRunner { log.info("Chargement du fichier de de log4j depuis " + resource); } Properties logConfigurationProperties = resourceManager.load(resource); - Properties finalLogConfigurationProperties = new Properties(); - for (Map.Entry<Object, Object> entry : logConfigurationProperties.entrySet()) { - String key = (String) entry.getKey(); - String value = (String) entry.getValue(); - String newValue = config.replaceRecursiveOptions(value); - finalLogConfigurationProperties.setProperty(key, newValue); - } + Properties finalLogConfigurationProperties = ObserveUtil.loadProperties(logConfigurationProperties, config); + LogManager.resetConfiguration(); PropertyConfigurator.configure(finalLogConfigurationProperties); @@ -398,12 +395,14 @@ public abstract class ObserveRunner extends ApplicationRunner { UIHelper.handlingError(e); } - protected ObserveSwingApplicationConfig initConfig() throws Exception { + private ObserveSwingApplicationConfig initConfig() throws Exception { ObserveSwingApplicationConfig config = new ObserveSwingApplicationConfig(); // init config (load application configuration) - config.initConfig(resourceManager); + config.initConfig( + resourceManager.getResource(ObserveResourceManager.Resource.application), + (ConfigActionDef[]) ObserveSwingApplicationActionDefinition.values()); // init config arguments config.parse(args); @@ -419,7 +418,7 @@ public abstract class ObserveRunner extends ApplicationRunner { return config; } - protected void initUserDirectories(ObserveSwingApplicationConfig config) throws IOException { + private void initUserDirectories(ObserveSwingApplicationConfig config) throws IOException { // 1 - user data directory @@ -503,7 +502,7 @@ public abstract class ObserveRunner extends ApplicationRunner { } - protected void detectLocalDataBase(ObserveSwingApplicationConfig config) { + private void detectLocalDataBase(ObserveSwingApplicationConfig config) { boolean hasLocalStorage = new File(config.getLocalDBDirectory(), ObserveSwingApplicationConfig.DB_NAME).exists(); config.setLocalStorageExist(hasLocalStorage); if (!hasLocalStorage) { @@ -522,7 +521,7 @@ public abstract class ObserveRunner extends ApplicationRunner { } } - protected void initI18n(ObserveSwingApplicationConfig config) { + private void initI18n(ObserveSwingApplicationConfig config) { I18n.close(); @@ -553,7 +552,7 @@ public abstract class ObserveRunner extends ApplicationRunner { } } - protected void initUIConfiguration(ObserveSwingApplicationConfig config) { + private void initUIConfiguration(ObserveSwingApplicationConfig config) { // prepare ui look&feel and load ui properties try { @@ -611,7 +610,7 @@ public abstract class ObserveRunner extends ApplicationRunner { } - protected ObserveMainUI startUI(ObserveSwingApplicationContext context, ObserveSwingApplicationConfig config) { + private ObserveMainUI startUI(ObserveSwingApplicationContext context, ObserveSwingApplicationConfig config) { ObserveMainUIHandler uiHandler = context.getContextValue(ObserveMainUIHandler.class); @@ -628,7 +627,7 @@ public abstract class ObserveRunner extends ApplicationRunner { * * @since 2.5 */ - protected void checkScriptEngineFound() { + private void checkScriptEngineFound() { ScriptEngineManager factory = new ScriptEngineManager(); diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveSwingApplicationContext.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveSwingApplicationContext.java index 2235c8e..91d366a 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveSwingApplicationContext.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveSwingApplicationContext.java @@ -28,7 +28,7 @@ import fr.ird.observe.application.swing.decoration.DecoratorService; import fr.ird.observe.application.swing.configuration.ObserveSwingApplicationConfig; import fr.ird.observe.application.swing.db.DataContext; import fr.ird.observe.application.swing.db.ObserveSwingDataSource; -import fr.ird.observe.application.swing.db.constants.DbMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; import fr.ird.observe.application.swing.db.event.ObserveSwingDataSourceEvent; import fr.ird.observe.application.swing.db.event.ObserveSwingDataSourceListenerAdapter; import fr.ird.observe.services.runner.ObserveDataSourceConfigurationMainFactory; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveSwingApplicationDataSourcesManager.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveSwingApplicationDataSourcesManager.java index 5830641..af958ac 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveSwingApplicationDataSourcesManager.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ObserveSwingApplicationDataSourcesManager.java @@ -29,12 +29,17 @@ import fr.ird.observe.application.swing.db.ObserveSwingDataSource; import fr.ird.observe.application.swing.db.event.ObserveSwingDataSourceEvent; import fr.ird.observe.application.swing.db.event.ObserveSwingDataSourceListenerAdapter; import fr.ird.observe.services.configuration.ObserveDataSourceConfiguration; +import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationRest; import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationTopiaH2; +import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationTopiaPG; +import fr.ird.observe.services.runner.ObserveDataSourceConfigurationMainFactory; import java.io.Closeable; +import java.io.File; import java.util.LinkedList; import java.util.List; +import static fr.ird.observe.application.swing.configuration.ObserveSwingApplicationConfig.DB_NAME; import static jaxx.runtime.swing.editor.bean.BeanUIUtil.PopupHandler.log; import static org.nuiton.i18n.I18n.t; @@ -63,13 +68,61 @@ public class ObserveSwingApplicationDataSourcesManager implements Closeable { */ public ObserveSwingDataSource newLocalDatasource(ObserveSwingApplicationConfig config) { - ObserveDataSourceConfigurationTopiaH2 dataSourceConfigurationH2 = config.getDataSourceConfigurationH2(t("observe.storage.label.local")); + ObserveDataSourceConfigurationTopiaH2 dataSourceConfigurationH2 = getDataSourceConfigurationH2(config, t("observe.storage.label.local")); Preconditions.checkState(dataSourceConfigurationH2.getDatabaseFile().exists(), "local base must exist, when using this method (" + dataSourceConfigurationH2.getDirectory() + ')'); return newDataSource(dataSourceConfigurationH2); } + public ObserveDataSourceConfigurationTopiaH2 getDataSourceConfigurationH2(ObserveSwingApplicationConfig config, String label) { + ObserveSwingApplicationContext applicationContext = ObserveSwingApplicationContext.get(); + ObserveDataSourceConfigurationMainFactory configurationMainFactory = applicationContext.getObserveDataSourceConfigurationMainFactory(); + + File dbDirectory = new File(config.getLocalDBDirectory(), DB_NAME); + + return configurationMainFactory.createObserveDataSourceConfigurationTopiaH2( + label, + dbDirectory, + DB_NAME, + config.getH2Login(), + config.getH2Password(), + config.isShowMigrationProgression(), + config.isShowMigrationSql(), + config.getModelVersion() + ); + } + + public ObserveDataSourceConfigurationTopiaPG getDataSourceConfigurationPG(ObserveSwingApplicationConfig config, String label) { + ObserveSwingApplicationContext applicationContext = ObserveSwingApplicationContext.get(); + ObserveDataSourceConfigurationMainFactory configurationMainFactory = applicationContext.getObserveDataSourceConfigurationMainFactory(); + + return configurationMainFactory.createObserveDataSourceConfigurationTopiaPG( + label, + config.getObstunaUrl(), + config.getObstunaLogin(), + config.getObstunaPassword(), + config.isObstunaUseSsl(), + config.isShowMigrationProgression(), + config.isShowMigrationSql(), + config.getModelVersion() + ); + } + + public ObserveDataSourceConfigurationRest getDataSourceConfigurationRest(ObserveSwingApplicationConfig config, String label) { + ObserveSwingApplicationContext applicationContext = ObserveSwingApplicationContext.get(); + ObserveDataSourceConfigurationMainFactory configurationMainFactory = applicationContext.getObserveDataSourceConfigurationMainFactory(); + + return configurationMainFactory.createObserveDataSourceConfigurationRest( + label, + config.getServerUrl(), + config.getServerLogin(), + config.getServerPassword(), + config.getServerDataBaseName(), + config.getModelVersion() + ); + } + public ObserveSwingDataSource getMainDataSource() { return dataSource; } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/db/ObserveSwingDataSource.java b/application-swing/src/main/java/fr/ird/observe/application/swing/db/ObserveSwingDataSource.java index 91fe464..495036d 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/db/ObserveSwingDataSource.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/db/ObserveSwingDataSource.java @@ -33,7 +33,7 @@ import fr.ird.observe.services.ObserveService; import fr.ird.observe.services.ObserveServiceInitializer; import fr.ird.observe.services.runner.ObserveServiceMainFactory; import fr.ird.observe.services.ObserveServicesProvider; -import fr.ird.observe.services.ObserveSpeciesListConfiguration; +import fr.ird.observe.services.dto.ObserveSpeciesListConfiguration; import fr.ird.observe.services.configuration.ObserveDataSourceConfiguration; import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationAndConnection; import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationRest; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/ChangeStorageAction.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/ChangeStorageAction.java index 8a15b26..596a4ec 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/ChangeStorageAction.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/ChangeStorageAction.java @@ -23,7 +23,7 @@ package fr.ird.observe.application.swing.ui.actions; */ import fr.ird.observe.application.swing.ObserveSwingApplicationContext; -import fr.ird.observe.application.swing.db.constants.DbMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; import fr.ird.observe.application.swing.ui.ObserveMainUI; import fr.ird.observe.application.swing.ui.storage.StorageUILauncher; import jaxx.runtime.SwingUtil; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/ImportStorageFromFileAction.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/ImportStorageFromFileAction.java index 13cc0ff..d8b0a42 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/ImportStorageFromFileAction.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/actions/ImportStorageFromFileAction.java @@ -23,8 +23,8 @@ package fr.ird.observe.application.swing.ui.actions; */ import fr.ird.observe.application.swing.ObserveSwingApplicationContext; -import fr.ird.observe.application.swing.db.constants.CreationMode; -import fr.ird.observe.application.swing.db.constants.DbMode; +import fr.ird.observe.application.swing.configuration.constants.CreationMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; import fr.ird.observe.application.swing.ui.ObserveMainUI; import fr.ird.observe.application.swing.ui.storage.StorageStep; import fr.ird.observe.application.swing.ui.storage.StorageUI; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/AdminStep.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/AdminStep.java index 62890cd..af308b1 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/AdminStep.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/AdminStep.java @@ -21,7 +21,7 @@ */ package fr.ird.observe.application.swing.ui.admin; -import fr.ird.observe.application.swing.db.constants.DbMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; import fr.ird.observe.application.swing.ui.UIHelper; import fr.ird.observe.application.swing.ui.admin.config.ConfigUI; import fr.ird.observe.application.swing.ui.admin.config.SelectDataUI; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/AdminUIModel.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/AdminUIModel.java index 175770a..7e1e3d7 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/AdminUIModel.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/admin/AdminUIModel.java @@ -26,7 +26,7 @@ import fr.ird.observe.application.swing.I18nEnumHelper; import fr.ird.observe.application.swing.ObserveSwingApplicationContext; import fr.ird.observe.application.swing.configuration.ObserveSwingApplicationConfig; import fr.ird.observe.application.swing.db.ObserveSwingDataSource; -import fr.ird.observe.application.swing.db.constants.DbMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; import fr.ird.observe.application.swing.ui.admin.config.ConfigUI; import fr.ird.observe.application.swing.ui.admin.consolidate.ConsolidateModel; import fr.ird.observe.application.swing.ui.admin.export.ExportModel; @@ -75,9 +75,9 @@ import java.util.Objects; import java.util.Set; import static fr.ird.observe.application.swing.ObserveResourceManager.Resource; -import static fr.ird.observe.application.swing.db.constants.DbMode.USE_LOCAL; -import static fr.ird.observe.application.swing.db.constants.DbMode.USE_REMOTE; -import static fr.ird.observe.application.swing.db.constants.DbMode.USE_SERVER; +import static fr.ird.observe.application.swing.configuration.constants.DbMode.USE_LOCAL; +import static fr.ird.observe.application.swing.configuration.constants.DbMode.USE_REMOTE; +import static fr.ird.observe.application.swing.configuration.constants.DbMode.USE_SERVER; import static org.nuiton.i18n.I18n.n; import static org.nuiton.i18n.I18n.t; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/ObstunaAdminAction.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/ObstunaAdminAction.java index c6e3488..3ba983c 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/ObstunaAdminAction.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/ObstunaAdminAction.java @@ -25,7 +25,7 @@ import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import fr.ird.observe.application.swing.ObserveSwingApplicationContext; import fr.ird.observe.application.swing.db.ObserveSwingDataSource; -import fr.ird.observe.application.swing.db.constants.DbMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; import fr.ird.observe.services.configuration.ObserveDataSourceConfiguration; import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationRest; import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationTopiaPG; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/RemoteUILauncher.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/RemoteUILauncher.java index 53eded2..07180b0 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/RemoteUILauncher.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/RemoteUILauncher.java @@ -21,7 +21,7 @@ */ package fr.ird.observe.application.swing.ui.storage; -import fr.ird.observe.application.swing.db.constants.DbMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; import fr.ird.observe.application.swing.ui.UIHelper; import fr.ird.observe.application.swing.ui.storage.tabs.SecurityModel; import jaxx.runtime.JAXXContext; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageBackupUILauncher.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageBackupUILauncher.java index d07cf46..d0d7057 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageBackupUILauncher.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageBackupUILauncher.java @@ -23,7 +23,7 @@ package fr.ird.observe.application.swing.ui.storage; import fr.ird.observe.application.swing.ObserveSwingApplicationContext; import fr.ird.observe.application.swing.db.ObserveSwingDataSource; -import fr.ird.observe.application.swing.db.constants.DbMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; import fr.ird.observe.services.dto.DataReference; import fr.ird.observe.application.swing.ui.storage.tabs.DataSelectionModel; import jaxx.runtime.JAXXContext; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageUIHandler.java index 75d2ae0..90d5a5e 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageUIHandler.java @@ -26,15 +26,22 @@ import com.google.common.collect.ImmutableSet; import fr.ird.observe.application.swing.ObserveActionExecutor; import fr.ird.observe.application.swing.ObserveRunner; import fr.ird.observe.application.swing.ObserveSwingApplicationContext; +import fr.ird.observe.application.swing.ObserveSwingApplicationDataSourcesManager; import fr.ird.observe.application.swing.ObserveTextGenerator; -import fr.ird.observe.application.swing.decoration.DecoratorService; import fr.ird.observe.application.swing.configuration.ObserveSwingApplicationConfig; import fr.ird.observe.application.swing.db.ObserveSwingDataSource; import fr.ird.observe.application.swing.db.constants.ConnexionStatus; -import fr.ird.observe.application.swing.db.constants.CreationMode; -import fr.ird.observe.application.swing.db.constants.DbMode; +import fr.ird.observe.application.swing.configuration.constants.CreationMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; import fr.ird.observe.application.swing.db.event.ObserveSwingDataSourceEvent; import fr.ird.observe.application.swing.db.event.ObserveSwingDataSourceListenerAdapter; +import fr.ird.observe.application.swing.decoration.DecoratorService; +import fr.ird.observe.application.swing.ui.ObserveMainUI; +import fr.ird.observe.application.swing.ui.UIHelper; +import fr.ird.observe.application.swing.ui.storage.tabs.DataSelectionModel; +import fr.ird.observe.application.swing.ui.storage.tabs.RolesTableModel; +import fr.ird.observe.application.swing.ui.storage.tabs.SecurityModel; +import fr.ird.observe.application.swing.ui.storage.tabs.StorageTabUI; import fr.ird.observe.services.configuration.ObserveDataSourceConfiguration; import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationRest; import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationTopiaH2; @@ -45,12 +52,6 @@ import fr.ird.observe.services.dto.DataSourceCreateConfigurationDto; import fr.ird.observe.services.dto.ObserveDbUserDto; import fr.ird.observe.services.service.AddSqlScriptProducerRequest; import fr.ird.observe.services.service.SqlScriptProducerService; -import fr.ird.observe.application.swing.ui.ObserveMainUI; -import fr.ird.observe.application.swing.ui.UIHelper; -import fr.ird.observe.application.swing.ui.storage.tabs.DataSelectionModel; -import fr.ird.observe.application.swing.ui.storage.tabs.RolesTableModel; -import fr.ird.observe.application.swing.ui.storage.tabs.SecurityModel; -import fr.ird.observe.application.swing.ui.storage.tabs.StorageTabUI; import jaxx.runtime.context.DefaultApplicationContext.AutoLoad; import jaxx.runtime.swing.wizard.WizardUILancher; import org.apache.commons.io.FileUtils; @@ -348,7 +349,8 @@ public class StorageUIHandler { } - ObserveSwingDataSource currentDataSource = observeContext.getDataSourcesManager().getMainDataSource(); + ObserveSwingApplicationDataSourcesManager dataSourcesManager = observeContext.getDataSourcesManager(); + ObserveSwingDataSource currentDataSource = dataSourcesManager.getMainDataSource(); ObserveSwingDataSource localDataSource = null; @@ -359,7 +361,7 @@ public class StorageUIHandler { boolean localDbIsSane = true; if (destroyLocalBase || model.isDoBackup()) { if (localDataSource == null) { - ObserveDataSourceConfigurationTopiaH2 localConfiguration = config.getDataSourceConfigurationH2(t("observe.storage.label.local")); + ObserveDataSourceConfigurationTopiaH2 localConfiguration = dataSourcesManager.getDataSourceConfigurationH2(config, t("observe.storage.label.local")); // la base ne doit pas etre mise a jour dans ce cas localConfiguration.setCanMigrate(false); @@ -482,7 +484,7 @@ public class StorageUIHandler { } - observeContext.getDataSourcesManager().setMainDataSource(currentDataSource); + dataSourcesManager.setMainDataSource(currentDataSource); observeContext.prepareMainStorage(currentDataSource, true); if (model.getDbMode() == DbMode.CREATE_LOCAL) { @@ -508,7 +510,7 @@ public class StorageUIHandler { } config.setLocalStorageExist(false); - observeContext.getDataSourcesManager().setMainDataSource(null); + dataSourcesManager.setMainDataSource(null); throw e; } @@ -570,12 +572,31 @@ public class StorageUIHandler { if (model.isEditRemoteConfig()) { ObserveDataSourceConfigurationTopiaPG configurationTopiaPG = model.toPGStorageConfig(""); - config.fromStorageConfig(configurationTopiaPG); + + config.setObstunaUrl(configurationTopiaPG.getJdbcUrl()); + config.setObstunaLogin(configurationTopiaPG.getUsername()); + config.setObstunaPassword(configurationTopiaPG.getPassword()); + config.setObstunaUseSsl(configurationTopiaPG.isUseSsl()); + config.setShowMigrationProgression(configurationTopiaPG.isShowMigrationProgression()); + config.setShowMigrationSql(configurationTopiaPG.isShowMigrationSql()); + + //TODO-TC20100311 : on devrait pas regarder si l'utilisateur veut sauver + //TODO-TC20100311 : la configuration ? + config.saveForUser(); } else if (model.isEditServerConfig()) { ObserveDataSourceConfigurationRest configurationRest = model.toRestStorageConfig(""); - config.fromStorageConfig(configurationRest); + + config.setServerUrl(configurationRest.getServerUrl()); + config.setServerLogin(configurationRest.getLogin()); + config.setServerPassword(configurationRest.getPassword()); + config.setServerDataBaseName(configurationRest.getOptionalDatabaseName().orElse(null)); + + //TODO-TC20100311 : on devrait pas regarder si l'utilisateur veut sauver + //TODO-TC20100311 : la configuration ? + + config.saveForUser(); } } diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageUILauncher.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageUILauncher.java index 1ed30e3..c407b69 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageUILauncher.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageUILauncher.java @@ -23,7 +23,7 @@ package fr.ird.observe.application.swing.ui.storage; import fr.ird.observe.application.swing.ObserveSwingApplicationContext; import fr.ird.observe.application.swing.configuration.ObserveSwingApplicationConfig; -import fr.ird.observe.application.swing.db.constants.DbMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; import fr.ird.observe.application.swing.ui.ObserveMainUIHandler; import fr.ird.observe.application.swing.ui.UIHelper; import jaxx.runtime.JAXXContext; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageUIModel.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageUIModel.java index 940358f..8bd9c4b 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageUIModel.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/StorageUIModel.java @@ -22,13 +22,15 @@ package fr.ird.observe.application.swing.ui.storage; import fr.ird.observe.application.swing.ObserveSwingApplicationContext; +import fr.ird.observe.application.swing.ObserveSwingApplicationDataSourcesManager; import fr.ird.observe.application.swing.ObserveSwingTechnicalException; import fr.ird.observe.application.swing.configuration.ObserveSwingApplicationConfig; import fr.ird.observe.application.swing.db.ObserveSwingDataSource; import fr.ird.observe.application.swing.db.constants.ConnexionStatus; -import fr.ird.observe.application.swing.db.constants.CreationMode; -import fr.ird.observe.application.swing.db.constants.DbMode; -import fr.ird.observe.services.runner.ObserveDataSourceConfigurationMainFactory; +import fr.ird.observe.application.swing.configuration.constants.CreationMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; +import fr.ird.observe.application.swing.ui.storage.tabs.DataSelectionModel; +import fr.ird.observe.application.swing.ui.storage.tabs.SecurityModel; import fr.ird.observe.services.configuration.ObserveDataSourceConfiguration; import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationRest; import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationTopiaH2; @@ -38,6 +40,7 @@ import fr.ird.observe.services.dto.DataSourceCreateConfigurationDto; import fr.ird.observe.services.dto.DataSourceCreateWithNoReferentialImportException; import fr.ird.observe.services.dto.IncompatibleDataSourceCreateConfigurationException; import fr.ird.observe.services.dto.ObserveDbUserDto; +import fr.ird.observe.services.runner.ObserveDataSourceConfigurationMainFactory; import fr.ird.observe.services.security.BadObserveWebUserPasswordException; import fr.ird.observe.services.security.ObserveWebSecurityExceptionSupport; import fr.ird.observe.services.security.UnknownObserveWebUserException; @@ -50,8 +53,6 @@ import fr.ird.observe.services.service.DatabaseConnexionNotAuthorizedException; import fr.ird.observe.services.service.DatabaseNotFoundException; import fr.ird.observe.services.service.PingService; import fr.ird.observe.services.service.SqlScriptProducerService; -import fr.ird.observe.application.swing.ui.storage.tabs.DataSelectionModel; -import fr.ird.observe.application.swing.ui.storage.tabs.SecurityModel; import jaxx.runtime.JAXXContext; import jaxx.runtime.swing.wizard.WizardModel; import jaxx.runtime.swing.wizard.WizardUILancher; @@ -379,9 +380,12 @@ public class StorageUIModel extends WizardModel<StorageStep> { CreationMode mode = config.getDefaultCreationMode(); // on initialise les configuration avec les valeurs par défaut - h2Config = config.getDataSourceConfigurationH2(t("observe.storage.label.local")); - pgConfig = config.getDataSourceConfigurationPG(t("observe.storage.label.remote")); - restConfig = config.getDataSourceConfigurationRest(t("observe.storage.label.server")); + + ObserveSwingApplicationDataSourcesManager dataSourcesManager = ObserveSwingApplicationContext.get().getDataSourcesManager(); + + h2Config = dataSourcesManager.getDataSourceConfigurationH2(config, t("observe.storage.label.local")); + pgConfig = dataSourcesManager.getDataSourceConfigurationPG(config, t("observe.storage.label.remote")); + restConfig = dataSourcesManager.getDataSourceConfigurationRest(config, t("observe.storage.label.server")); if (source != null) { @@ -487,10 +491,12 @@ public class StorageUIModel extends WizardModel<StorageStep> { log.debug("canMigrate ? " + isCanMigrate()); } + ObserveSwingApplicationDataSourcesManager dataSourcesManager = ObserveSwingApplicationContext.get().getDataSourcesManager(); + // on initialise les configuration avec les valeurs par défaut - h2Config = config.getDataSourceConfigurationH2(t("observe.storage.label.local")); - pgConfig = config.getDataSourceConfigurationPG(t("observe.storage.label.remote")); - restConfig = config.getDataSourceConfigurationRest(t("observe.storage.label.server")); + h2Config = dataSourcesManager.getDataSourceConfigurationH2(config, t("observe.storage.label.local")); + pgConfig = dataSourcesManager.getDataSourceConfigurationPG(config, t("observe.storage.label.remote")); + restConfig = dataSourcesManager.getDataSourceConfigurationRest(config, t("observe.storage.label.server")); if (previousConfig instanceof ObserveDataSourceConfigurationTopiaH2) { @@ -563,9 +569,12 @@ public class StorageUIModel extends WizardModel<StorageStep> { // on utilise la configuration par defaut // ce cas ne devrait arriver uniquement tant qu'aucune // base locale est crée - h2Config = config.getDataSourceConfigurationH2(t("observe.storage.label.local")); - pgConfig = config.getDataSourceConfigurationPG(t("observe.storage.label.remote")); - restConfig = config.getDataSourceConfigurationRest(t("observe.storage.label.server")); + + ObserveSwingApplicationDataSourcesManager dataSourcesManager = ObserveSwingApplicationContext.get().getDataSourcesManager(); + + h2Config = dataSourcesManager.getDataSourceConfigurationH2(config, t("observe.storage.label.local")); + pgConfig = dataSourcesManager.getDataSourceConfigurationPG(config, t("observe.storage.label.remote")); + restConfig = dataSourcesManager.getDataSourceConfigurationRest(config, t("observe.storage.label.server")); DbMode newDbMode = config.getDefaultDbMode(); if (getAdminAction() != null) { diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ChooseDbModeUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ChooseDbModeUI.jaxx index c860205..8b938a6 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ChooseDbModeUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ChooseDbModeUI.jaxx @@ -30,8 +30,8 @@ fr.ird.observe.application.swing.configuration.ObserveSwingApplicationConfig fr.ird.observe.application.swing.ui.UIHelper fr.ird.observe.application.swing.ui.storage.StorageStep - fr.ird.observe.application.swing.db.constants.DbMode - fr.ird.observe.application.swing.db.constants.CreationMode + fr.ird.observe.application.swing.configuration.constants.DbMode + fr.ird.observe.application.swing.configuration.constants.CreationMode </import> <StorageStep id='step' initializer='StorageStep.CHOOSE_DB_MODE'/> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ConfigDataUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ConfigDataUI.jaxx index ffb28ad..68c31b6 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ConfigDataUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ConfigDataUI.jaxx @@ -24,7 +24,7 @@ <StorageTabUI> <import> - fr.ird.observe.application.swing.db.constants.CreationMode + fr.ird.observe.application.swing.configuration.constants.CreationMode fr.ird.observe.application.swing.ui.storage.StorageStep javax.swing.Icon diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ConfigReferentielUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ConfigReferentielUI.jaxx index f66577d..91f9047 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ConfigReferentielUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ConfigReferentielUI.jaxx @@ -26,7 +26,7 @@ <StorageTabUI> <import> - fr.ird.observe.application.swing.db.constants.CreationMode + fr.ird.observe.application.swing.configuration.constants.CreationMode fr.ird.observe.application.swing.ui.storage.StorageStep javax.swing.Icon diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ConfigUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ConfigUI.jaxx index 810fb4c..327ae39 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ConfigUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/ConfigUI.jaxx @@ -29,7 +29,6 @@ <import> fr.ird.observe.application.swing.ui.storage.StorageStep fr.ird.observe.application.swing.db.constants.ConnexionStatus - fr.ird.observe.application.swing.db.constants.DbMode; java.awt.Color java.awt.Dimension diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/StorageTabUIHandler.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/StorageTabUIHandler.java index 1de0247..cd5b000 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/StorageTabUIHandler.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/storage/tabs/StorageTabUIHandler.java @@ -25,8 +25,8 @@ import fr.ird.observe.application.swing.ObserveSwingApplicationContext; import fr.ird.observe.application.swing.ObserveTextGenerator; import fr.ird.observe.application.swing.db.ObserveSwingDataSource; import fr.ird.observe.application.swing.db.constants.ConnexionStatus; -import fr.ird.observe.application.swing.db.constants.CreationMode; -import fr.ird.observe.application.swing.db.constants.DbMode; +import fr.ird.observe.application.swing.configuration.constants.CreationMode; +import fr.ird.observe.application.swing.configuration.constants.DbMode; import fr.ird.observe.services.configuration.ObserveDataSourceInformation; import fr.ird.observe.application.swing.ui.UIHelper; import fr.ird.observe.application.swing.ui.storage.StorageStep; diff --git a/application-swing/src/main/resources/i18n/application-swing_en_GB.properties b/application-swing/src/main/resources/i18n/application-swing_en_GB.properties index 26e155b..48bf952 100644 --- a/application-swing/src/main/resources/i18n/application-swing_en_GB.properties +++ b/application-swing/src/main/resources/i18n/application-swing_en_GB.properties @@ -46,15 +46,6 @@ observe.action.close.route.tip=Close road observe.action.close.storage=Close storage observe.action.close.storage.tip=Close current storage observe.action.close.synchro.tip=close window -observe.action.commandline.configure.ui=Configure application -observe.action.commandline.create.id=Générer des topiaIds.\nDeux paramètres sont nécessaires \: le FQN de la classe et le nombre d'id à générer. -observe.action.commandline.disable.main.ui=Do NOT launch main gui -observe.action.commandline.help=Show help -observe.action.commandline.help.ui=Show gui help -observe.action.commandline.launch.admin.ui=Launch an administration task -observe.action.commandline.launch.h2.server.mode=Launch ObServe in server mode -observe.action.commandline.launch.obstuna.admin.ui=Launch an adminstration task on obstuna -observe.action.commandline.use.jmx=Add JMX support observe.action.config.export.required.read.referentiel=Read permission is required on referential for this operation observe.action.config.export.required.write.data=Write permission is required on data for this operation observe.action.configuration=Preferences @@ -576,77 +567,6 @@ observe.config.category.speciesList.seine=Species lists for seine observe.config.category.speciesList.seine.description=Species lists for seine observe.config.category.synchro=Admin Tasks observe.config.category.synchro.description=Administrations tasks to perform on data sources -observe.config.configFileName.description=Configuration filename -observe.config.db.locale=Language of data source -observe.config.defaultBackupDirectory.description=Default directory where are stored backup of data sources -observe.config.defaultCreationMode=Default creation mode of new local data source -observe.config.defaultDataDirectory.description=Default user directory -observe.config.defaultDbMode=Default db mode -observe.config.defaultGpsMaxDelay=Default maximum range of minutes between two Gps points -observe.config.defaultGpsMaxSpeed=Maximum speed -observe.config.defaultI18nDirectory.description=Default i18n directory where to store i18n resources -observe.config.defaultInitialDbDump.description=Default location of initial database -observe.config.defaultLocalDbDirectory.description=Default directory where to store local data source -observe.config.defaultMapDirectory.description=Default directory where to store map layers -observe.config.defaultReportDirectory.description=Default directory where to store report definition files -observe.config.defaultResourcesDirectory.description=Default user resources directory -observe.config.defaultTmpDirectory.description=Default temporary directory used by application and clean at each launch. -observe.config.defaultValidationReportDirectory.description=Default validation report directory -observe.config.devMode=Dev mode -observe.config.h2.can.migrate.description=Flag to know if you can migrate h2 data sources -observe.config.h2.login.description=H2 Login -observe.config.h2.password.description=H2 Password -observe.config.h2.serverPort.description=Server port number -observe.config.logConfigurationFile.description=Log file configuration -observe.config.map.background.description=Color of background -observe.config.map.layer1.description=File (shapefile) for layer 1 of map -observe.config.map.layer10.description=File (shapefile) for layer 10 of map -observe.config.map.layer2.description=File (shapefile) for layer 2 of map -observe.config.map.layer3.description=File (shapefile) for layer 3 of map -observe.config.map.layer4.description=File (shapefile) for layer 4 of map -observe.config.map.layer5.description=File (shapefile) for layer 5 of map -observe.config.map.layer6.description=File (shapefile) for layer 6 of map -observe.config.map.layer7.description=File (shapefile) for layer 7 of map -observe.config.map.layer8.description=File (shapefile) for layer 8 of map -observe.config.map.layer9.description=File (shapefile) for layer 9 of map -observe.config.map.style.description=File of styles used in map -observe.config.name=ObServe configuration -observe.config.observation.activitysDetaillees=Observation of detailled activities -observe.config.observation.fauneAssociee=Observation of non target -observe.config.observation.floatingObject=Observation of floating objects -observe.config.observation.gleure=Observation of gleure -observe.config.observation.mammiferes=Observation of mammals -observe.config.observation.mensurations=Observation of mensurations -observe.config.observation.oiseaux=Observation of birds -observe.config.observation.rejetsThons=Observation of discarded target catch -observe.config.obstuna.login.description=Remote login -observe.config.obstuna.password.description=Remote password -observe.config.obstuna.url.description=URL of remote data source -observe.config.obstuna.useSsl.description=Flag sets to true when your are using remote with ssl -observe.config.pg.can.migrate.description=Flat sets to true when you can migrate remote data sources -observe.config.server.dataBaseName.description=Optional name of database name on server -observe.config.server.login.description=Server login -observe.config.server.password.description=Server password -observe.config.server.url.description=Server url -observe.config.showMigrationProgression=Show migration progression -observe.config.showMigrationSql=Show migration sql queries -observe.config.showSql=Show sql -observe.config.speciesList.longline.catch=Species for catches -observe.config.speciesList.longline.encounter=Species for encounters -observe.config.speciesList.seine.nonTargetCatch=Species for non target catches -observe.config.speciesList.seine.objectObservedSpecies=Species for object observed species -observe.config.speciesList.seine.objectSchoolEstimate=Species for object school estimates -observe.config.speciesList.seine.schoolEstimate=Species for school esitmates -observe.config.speciesList.seine.targetCatch=Species for target catches -observe.config.ui.autoPopupNumberEditor=Flag sets to true when number editor show automaticly popup -observe.config.ui.changeSynchroSrc=Flag sets to true if you can change local source in admin tasks -observe.config.ui.fullscreen=Flag sets to true to lauch application in full screen mode -observe.config.ui.loadLocalStorage=Flag sets to true to load local data source when application starts -observe.config.ui.locale=Application's language -observe.config.ui.showNumberEditorButton=Flag sets to true to show button to invoke popup on number's editors -observe.config.ui.showTimeEditorSlider=Show timer slider -observe.config.ui.storeRemoteStorage=Flag sets to true to store in config a remote connexion (except passwords) -observe.config.ui.treeOpenNodes=Opened data from last session observe.content.action.activity=Create a new activity observe.content.action.activity.tip=Create a new activity observe.content.action.baitHaulingStatus.create.tip=Create a new statut de bait hauling status @@ -1908,7 +1828,6 @@ observe.message.quit.valid.edit=Data are modified and valid\! observe.message.referentiel.editable=Referential is editable. observe.message.referentiel.home=< Referential > observe.message.referentiel.no.editable=You are not allowed to edit referential. -observe.message.save.configuration=Save configuration in file %1$s observe.message.select.report=Select a report observe.message.server.info=Local database %1$s is ready in server mode. observe.message.show.usage.for.delete=Referential %1$s "%2$s" can not be deleted. @@ -1922,7 +1841,6 @@ observe.message.table.editBean.modified.but.invalid=Current entry is modified bu observe.message.updating.floatingObject=Floating object is in edition mode observe.message.updating.referentiel=Referential is in edition mode observe.message.warning.will.be.delete=%1$s\n\nBe ware, export will replace existing data. -observe.model.version=Model version observe.navigationMenu.move.activityLongline=Change trip observe.navigationMenu.move.activitySeine=change route observe.navigationMenu.move.route=Change trip @@ -1935,7 +1853,6 @@ observe.obstuna.action.security.description=Update security observe.obstuna.action.update=Update observe.obstuna.action.update.description=Update a obstuna database observe.runner.config.loaded=Configuration d'ObServe v. %1$s chargée. -observe.runner.config.migrate.file=Le fichier de configuration %1$s a été déplacée de \n%2$s\nvers\n%3$s observe.runner.context.loaded=Initialisation du contexte terminée en %1$s. observe.runner.copy.default.logConfigurationFile.file=Création du fichier de configuration des logs %1$s. observe.runner.copy.default.map.file=Création des cartes %1$s. @@ -2010,26 +1927,6 @@ observe.storage.connexionStatut.success=Connexion success observe.storage.connexionStatut.success.description=connexion details\:\n%1$s. observe.storage.connexionStatut.untested=None validate connexion observe.storage.connexionStatut.untested.description=Connexion was never validate, \nor was modified after last validate test. -observe.storage.creationMode.empty=Generate an empty data base. -observe.storage.creationMode.empty.description=Generate a new empty data base.\nThis database won't any any referential, so you will need to import a referential later to use it. -observe.storage.creationMode.externalDump=Load a database backup (*.sql.gz) -observe.storage.creationMode.externalDump.description=Create a new databse from \na data base backup -observe.storage.creationMode.importLocalStorage=Import referential from a local data base -observe.storage.creationMode.importLocalStorage.description=Generate a new local data bse and import in it the referential of another local data base. -observe.storage.creationMode.importRemoteStorage=Import referential from a remote database -observe.storage.creationMode.importRemoteStorage.description=Generate a new local data base and import in it the referential of a remove database. -observe.storage.creationMode.importServerStorage=Import referential from a remote server -observe.storage.creationMode.importServerStorage.description=Generate a new local data base and import in it the referential of a remove server. -observe.storage.creationMode.internalDump=Load embbeded local database -observe.storage.creationMode.internalDump.description=Generate a new local data base and import in it the referential of the last embbeded database. -observe.storage.dbMode.createLocal=Create a new local database -observe.storage.dbMode.createLocal.description=Create a new local database (type H2) -observe.storage.dbMode.useLocal=Use local database -observe.storage.dbMode.useLocal.description=Use the local database (type H2) -observe.storage.dbMode.useRemote=Use a remote database -observe.storage.dbMode.useRemote.description=Use a remote database (type Postgresql) -observe.storage.dbMode.useServer=Use a remote server -observe.storage.dbMode.useServer.description=Use a remote server (type ObserveWeb) observe.storage.error.badUrl=The url format is not valid (%s) observe.storage.error.dbVersionMismatch=Version of remote database (%s) is not compiliant with the model version (%s) observe.storage.error.rest.database.unknownForUser=Database "%s" is not defined for user "%s" @@ -2145,7 +2042,6 @@ observe.title.can.not.export.obstuna=Could not export obstuna data... observe.title.choose.db.dump=Choose a database backup observe.title.choose.db.dump.directory=Chhose directory of backup observe.title.choose.reportFile=Choose report definition file -observe.title.config.migrate=Move configuration file observe.title.connect.existingDB=Connect to existing database observe.title.connect.localDB=Connect to local database observe.title.connect.remoteDB=Connect to remove database diff --git a/application-swing/src/main/resources/i18n/application-swing_es_ES.properties b/application-swing/src/main/resources/i18n/application-swing_es_ES.properties index 226c583..c0c1f93 100644 --- a/application-swing/src/main/resources/i18n/application-swing_es_ES.properties +++ b/application-swing/src/main/resources/i18n/application-swing_es_ES.properties @@ -46,15 +46,6 @@ observe.action.close.route.tip=Cierre de la ruta abierta observe.action.close.storage=Cerrar la fuente de datos observe.action.close.storage.tip=Cerrar la fuente de datos usado actualmente observe.action.close.synchro.tip=Cerrar la ventana -observe.action.commandline.configure.ui=Configurar la aplicación -observe.action.commandline.create.id=Generar topiaIds.\nDos parametros son necesarios\:\n\tEl FQN de la clase\n\tEl número de id a generar. -observe.action.commandline.disable.main.ui=No ejecutar la interfaz grafica -observe.action.commandline.help=Mostrar la ayuda -observe.action.commandline.help.ui=Mostrar el manual de usuario (modo grafico) -observe.action.commandline.launch.admin.ui=Ejecutar una operación de administración -observe.action.commandline.launch.h2.server.mode=Ejecutar ObServe en modo servidor -observe.action.commandline.launch.obstuna.admin.ui=Ejecutar una operación de administración sobre Obstuna -observe.action.commandline.use.jmx=Mostrar el soporte JMX observe.action.config.export.required.read.referentiel=Debe tener derechos de lectura sobre el referencial de datos para esta operación observe.action.config.export.required.write.data=Debe tener derechos de escritura sobre los datos para esta operación observe.action.configuration=Configuración @@ -576,77 +567,6 @@ observe.config.category.speciesList.seine=Configuración de las listas de especi observe.config.category.speciesList.seine.description=Elegir las listas de especies a utilizar en los formularios de una marea de tipo pesca al cerco observe.config.category.synchro=Acciones sobre la base observe.config.category.synchro.description=Configuración de acciones sobre la base -observe.config.configFileName.description=Nombre del archivo de configuración -observe.config.db.locale=Idioma del referencial -observe.config.defaultBackupDirectory.description=Carpeta por defecto para copia de seguridad de bases locales -observe.config.defaultCreationMode=Modo de creación de la base local por defecto -observe.config.defaultDataDirectory.description=Directorio por defecto de los recursos de usuario de la aplicación -observe.config.defaultDbMode=Modo de conexión creado por defecto -observe.config.defaultGpsMaxDelay=Número de minutos máximos por defectro entre 2 puntos gps -observe.config.defaultGpsMaxSpeed=Velocidad máxima por defecto entre 2 puntos pgs -observe.config.defaultI18nDirectory.description=Directorio por defecto de recursos de traducción de la aplicación -observe.config.defaultInitialDbDump.description=Base empotrada creada durante la primera importación de una base remota -observe.config.defaultLocalDbDirectory.description=Directorio de almacenamiento de la base local -observe.config.defaultMapDirectory.description=El directorio donde se ubican los mapas. -observe.config.defaultReportDirectory.description=Directorio por defecto de los informes de la aplicación -observe.config.defaultResourcesDirectory.description=Directorio de almacenamiento de los recursos de usuario como las traducciones o la consultas de informes -observe.config.defaultTmpDirectory.description=Directorio temporal por defecto -observe.config.defaultValidationReportDirectory.description=Directorio por defecto de almacenamiento de los informes de validación -observe.config.devMode=Modo desarrollador -observe.config.h2.can.migrate.description=Autorizar la actualización de las bases locales (h2) -observe.config.h2.login.description=Login h2 -observe.config.h2.password.description=Contraseña h2 -observe.config.h2.serverPort.description=Puerto del servidor h2 -observe.config.logConfigurationFile.description=Archivo de configuration de los logs -observe.config.map.background.description=Color del fondo del mapa -observe.config.map.layer1.description=Archivo (shapeFiles) del primer calco del mapa -observe.config.map.layer10.description=Archivo (shapeFiles) del décimo calco del mapa -observe.config.map.layer2.description=Archivo (shapeFiles) del segundo calco del mapa -observe.config.map.layer3.description=Archivo (shapeFiles) del tercero calco del mapa -observe.config.map.layer4.description=Archivo (shapeFiles) del cuarto calco del mapa -observe.config.map.layer5.description=Archivo (shapeFiles) del quinto calco del mapa -observe.config.map.layer6.description=Archivo (shapeFiles) del sixto calco del mapa -observe.config.map.layer7.description=Archivo (shapeFiles) del septimo calco del mapa -observe.config.map.layer8.description=Archivo (shapeFiles) del octavo calco del mapa -observe.config.map.layer9.description=Archivo (shapeFiles) del noveno calco del mapa -observe.config.map.style.description=Archivo de los estilos a aplicar sobre los calcos del mapa -observe.config.name=Configuración de ObServe -observe.config.observation.activitysDetaillees=Observación de actividades detalladas -observe.config.observation.fauneAssociee=Observación de Fauna asociada -observe.config.observation.floatingObject=Observación de objetos flotantes -observe.config.observation.gleure=Observación de carnada -observe.config.observation.mammiferes=Observación de mamiferos -observe.config.observation.mensurations=Observación de mendiciones -observe.config.observation.oiseaux=Observaciones de pájaros -observe.config.observation.rejetsThons=Observación de descartes de atún -observe.config.obstuna.login.description=Nombre de usuario para conectarse a la base Obstuna -observe.config.obstuna.password.description=Contraseña para conectarse a la base Obstuna -observe.config.obstuna.url.description=Url de conexión a la base Obstuna -observe.config.obstuna.useSsl.description=Bandera para permitir la utilización del modo ssl para la conexión a Obstuna -observe.config.pg.can.migrate.description=Autorizar la actualización de las bases remotas (debe ser el propietario de la base) -observe.config.server.dataBaseName.description=El nombre opcinal de la base de referencia sobre el servidor -observe.config.server.login.description=Identificador del usuario -observe.config.server.password.description=La contraseña del usuario -observe.config.server.url.description=La dirección (url) del servidor -observe.config.showMigrationProgression=Mostar los logs de actualización de una base de datos -observe.config.showMigrationSql=Mostrar en los logs las consultas realizadas durante la actualización de una base de datos -observe.config.showSql=Mostrar en los los todas las consultas sql ejecutadas -observe.config.speciesList.longline.catch=Especies para las capturas - TDR -observe.config.speciesList.longline.encounter=Especies para los encuentros -observe.config.speciesList.seine.nonTargetCatch=Especies para las capturas que no forman parte del objetivo -observe.config.speciesList.seine.objectObservedSpecies=Especies para los especies que no forman parte del objetivo y que fueron observadas -observe.config.speciesList.seine.objectSchoolEstimate=Especies para las estimaciones banco objeto -observe.config.speciesList.seine.schoolEstimate=Especies para las estimaciones -observe.config.speciesList.seine.targetCatch=Especies par las capturas objetivo -observe.config.ui.autoPopupNumberEditor=Para mostrar automáticamente el editor numérico durante la edición de un número -observe.config.ui.changeSynchroSrc=Pour autoriser la sélection de la base source dans les opérations sur base -observe.config.ui.fullscreen=Para mostrar en modo pantalla completa la aplicación -observe.config.ui.loadLocalStorage=Cambiar la base local al iniciar la aplicación -observe.config.ui.locale=Idioma de la aplicación (fr_FR, en_GB o es_ES) -observe.config.ui.showNumberEditorButton=Para mostrar el botón que permite usar el editor numérico a la izquierda de cada campo numérico -observe.config.ui.showTimeEditorSlider=Para mostrar la regla de edición de las horas -observe.config.ui.storeRemoteStorage=Para activar la copia de seguridad de la configuración de la fuente de datos remota -observe.config.ui.treeOpenNodes=Nudos abiertos del arbol abiertos cuando se cerró la base por última vez observe.content.action.activity=Crear una nueva actividad observe.content.action.activity.tip=Crear una nueva actividad para la ruta actual observe.content.action.baitHaulingStatus.create.tip=Crear un nuevo estatuto del cebo en el arrastre @@ -1908,7 +1828,6 @@ observe.message.quit.valid.edit=¡Los datos han sido modificados y son válidos\ observe.message.referentiel.editable=El referencial es editable. observe.message.referentiel.home=< Referencial > observe.message.referentiel.no.editable=No tiene permisos para editar el referencial. -observe.message.save.configuration=Guardar la configuración en el archivo %1$s observe.message.select.report=Seleccione informe observe.message.server.info=Información modo servidor observe.message.show.usage.for.delete=El referencial %1$s "%2$s" no se puede eliminar. @@ -1922,7 +1841,6 @@ observe.message.table.editBean.modified.but.invalid=El registro actual se ha mod observe.message.updating.floatingObject=El objeto flotante está en proceso de modificación. observe.message.updating.referentiel=Se está actualizando el objeto. observe.message.warning.will.be.delete=%1$s\n\nAtención, la exportación reemplazará la marea existente. -observe.model.version=Versión del modelo de datos observe.navigationMenu.move.activityLongline=Cambiar de marea observe.navigationMenu.move.activitySeine=Cambiar de ruta observe.navigationMenu.move.route=Cambiar de marea @@ -1935,7 +1853,6 @@ observe.obstuna.action.security.description=Actualización de securidad de una b observe.obstuna.action.update=Actualización de Obstuna observe.obstuna.action.update.description=Actualización de una base remota Obstuna observe.runner.config.loaded=Configuración de Observe v. %1$s cargada. -observe.runner.config.migrate.file=El fichero de configuración %1$s ha sido reemplazado por \n%2$s\nhacia\n%3$s observe.runner.context.loaded=Finlazada la inicialización del contexto en %1$s. observe.runner.copy.default.logConfigurationFile.file=Creación del archivo de configuración de los logs %1$s. observe.runner.copy.default.map.file=Creación de los mapas %1$s. @@ -2010,26 +1927,6 @@ observe.storage.connexionStatut.success=Conexión con éxito observe.storage.connexionStatut.success.description=Información sobre la conexión \:\n%1$s. observe.storage.connexionStatut.untested=Conexión invalida observe.storage.connexionStatut.untested.description=La conexión no fue validada, \no ha sido modificada desde el último test de conexión. -observe.storage.creationMode.empty=Generar una base vacía -observe.storage.creationMode.empty.description=Generar una nueva base local vacía.\nEsta base no tendrá referencial y usted tendrá que importar lo posteriormente... -observe.storage.creationMode.externalDump=Cargar una copia de seguridad de la base local (*.sql.gz) -observe.storage.creationMode.externalDump.description=Crear una nueva base local a partir\nde una copia de seguridad anterior de la aplicación -observe.storage.creationMode.importLocalStorage=Importar el referencial de una base local -observe.storage.creationMode.importLocalStorage.description=Generar una nueva base local e importar el referencial de una otra base local. -observe.storage.creationMode.importRemoteStorage=Importar el referencial de una base remota -observe.storage.creationMode.importRemoteStorage.description=Generar una nueva base locale e importar el referencial e una otra base remota. -observe.storage.creationMode.importServerStorage=Importar el referencial de un servidor remoto -observe.storage.creationMode.importServerStorage.description=Generar una nueva base local e importar el referencial de un servidor remoto. -observe.storage.creationMode.internalDump=Cargar la base de datos incrustada -observe.storage.creationMode.internalDump.description=Generar una nueva base local a partir\nde la última versión de la base incrustada. -observe.storage.dbMode.createLocal=Crear una base local -observe.storage.dbMode.createLocal.description=Crear una base local de tipo h2 -observe.storage.dbMode.useLocal=Utilizar une base local -observe.storage.dbMode.useLocal.description=Utilizar una base local de tipo h2 -observe.storage.dbMode.useRemote=Utilizar una base remota -observe.storage.dbMode.useRemote.description=Utilizar una base remota de tipo postgres -observe.storage.dbMode.useServer=Utilizar un servidor remoto -observe.storage.dbMode.useServer.description=Utilizar un servidor remoto observe.storage.error.badUrl=Error en el formato de la dirección (URL) %s observe.storage.error.dbVersionMismatch=La versión de la base remota (%s) no es compatible con la versión del modelo (%s). observe.storage.error.rest.database.unknownForUser=La base de datos "%s" no está configurada para el usuario "%s" @@ -2145,7 +2042,6 @@ observe.title.can.not.export.obstuna=Impossible exportar los datos de obstuna... observe.title.choose.db.dump=Seleccionar una copia de seguridad de base local observe.title.choose.db.dump.directory=Seleccionar e directorio de destinación de la copia de seguridad observe.title.choose.reportFile=Seleccionar el archivo de definición de los informes -observe.title.config.migrate=Cambio de la ubicación del archivo de configuración observe.title.connect.existingDB=Conexión a una fuente de datos que ya existe observe.title.connect.localDB=Conexión a una fuente de datos local observe.title.connect.remoteDB=Conexión a una fuente de datos distante diff --git a/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties b/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties index fdc622f..6749446 100644 --- a/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties +++ b/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties @@ -46,15 +46,6 @@ observe.action.close.route.tip=Clôturer la route ouverte observe.action.close.storage=Fermer la source de données observe.action.close.storage.tip=Fermer la source de données actuellement utilisée observe.action.close.synchro.tip=Fermer la fenêtre -observe.action.commandline.configure.ui=Configurer l'application -observe.action.commandline.create.id=Générer des topiaIds.\nDeux paramètres sont nécessaires\:\n\tLe FQN de la classe\n\tLe nombre d'id à générer. -observe.action.commandline.disable.main.ui=Ne pas lancer l'interface graphique -observe.action.commandline.help=Afficher l'aide -observe.action.commandline.help.ui=Afficher le manuel utilisateur (mode graphique) -observe.action.commandline.launch.admin.ui=Lancer une opération d'administration -observe.action.commandline.launch.h2.server.mode=Lancer ObServe en mode serveur -observe.action.commandline.launch.obstuna.admin.ui=Lancer une opération d'administration sur Obstuna -observe.action.commandline.use.jmx=Ajouter le support JMX observe.action.config.export.required.read.referentiel=Lecture sur le référentiel requis pour cette opération observe.action.config.export.required.write.data=Écriture sur les données requis pour cette opération observe.action.configuration=Configuration @@ -576,77 +567,6 @@ observe.config.category.speciesList.seine=Configuration des listes d'espèces (S observe.config.category.speciesList.seine.description=Choisir les listes d'espèces à utiliser dans les formulaire d'une maréee de type senne observe.config.category.synchro=Actions sur base observe.config.category.synchro.description=Configuration actions sur base -observe.config.configFileName.description=Le nom du fichier de configuration -observe.config.db.locale=La langue du référentiel -observe.config.defaultBackupDirectory.description=Répertoire par défaut où sauvegarder les bases locales -observe.config.defaultCreationMode=Le mode de création de base locale par défaut -observe.config.defaultDataDirectory.description=Répertoire par défault des resources utilisateurs de l'application -observe.config.defaultDbMode=Le mode de connexion a créer par défaut -observe.config.defaultGpsMaxDelay=Le nombre par défaut de minutes maximum entre deux points gps -observe.config.defaultGpsMaxSpeed=La vitesse maximum par défaut en tre deux points gps -observe.config.defaultI18nDirectory.description=Répertoire par défaut des resources de traduction de l'application -observe.config.defaultInitialDbDump.description=La base embarquée créee lors de le premier import d'une base distante. -observe.config.defaultLocalDbDirectory.description=Le répertoire où est stockée la base locale. -observe.config.defaultMapDirectory.description=Le répertoire où sont stockées les cartes. -observe.config.defaultReportDirectory.description=Répertoire par défaut des rapports de l'application -observe.config.defaultResourcesDirectory.description=Le répertoire où sont stockées les resources de l'utilisateur comme les traductions ou les requètes de rapports. -observe.config.defaultTmpDirectory.description=Le répertoire temporaire par défaut -observe.config.defaultValidationReportDirectory.description=Le répertoire par défaut où sont stockés les rapports de validation -observe.config.devMode=Mode développeur -observe.config.h2.can.migrate.description=Autoriser la mise à jour des bases locales (h2) -observe.config.h2.login.description=Le login h2 -observe.config.h2.password.description=Le mot de passe h2 -observe.config.h2.serverPort.description=Port du serveur h2 -observe.config.logConfigurationFile.description=Fichier de configuration des logs -observe.config.map.background.description=Couleur du fond de carte -observe.config.map.layer1.description=Fichier (shapeFiles) du premier calque de la carte -observe.config.map.layer10.description=Fichier (shapeFiles) du dixième calque de la carte -observe.config.map.layer2.description=Fichier (shapeFiles) du deuxième calque de la carte -observe.config.map.layer3.description=Fichier (shapeFiles) du troisième calque de la carte -observe.config.map.layer4.description=Fichier (shapeFiles) du quatrième calque de la carte -observe.config.map.layer5.description=Fichier (shapeFiles) du cinquième calque de la carte -observe.config.map.layer6.description=Fichier (shapeFiles) du sixième calque de la carte -observe.config.map.layer7.description=Fichier (shapeFiles) du septième calque de la carte -observe.config.map.layer8.description=Fichier (shapeFiles) du huitième calque de la carte -observe.config.map.layer9.description=Fichier (shapeFiles) du neuvième calque de la carte -observe.config.map.style.description=Fichier des style à appliquer sur les calques de la carte -observe.config.name=configuration d'ObServe -observe.config.observation.activitysDetaillees=Observation des activités détaillées -observe.config.observation.fauneAssociee=Observation des Faunes associées -observe.config.observation.floatingObject=Observation des objets flottants -observe.config.observation.gleure=Observation des gleures -observe.config.observation.mammiferes=Observation des mammifères -observe.config.observation.mensurations=Observation des mensurations -observe.config.observation.oiseaux=Observation des oiseaux -observe.config.observation.rejetsThons=Observation des rejets thon -observe.config.obstuna.login.description=Le nom d'utilisateur pour se connecter à la base Obstuna -observe.config.obstuna.password.description=Le mote de passe pour se connecter à la base Obstuna -observe.config.obstuna.url.description=L'url de connexion à la base Obstuna -observe.config.obstuna.useSsl.description=Drapeau pour permettre l'utilisation du mode ssl pour la connexion à Obstuna -observe.config.pg.can.migrate.description=Autoriser la mise à jour des bases distantes (il faut être propriétaire de la base) -observe.config.server.dataBaseName.description=Le nom optionel de la base cible sur le serveur -observe.config.server.login.description=Identifiant de l'utilisateur -observe.config.server.password.description=Le mot de passe de l'utilisateur -observe.config.server.url.description=L'url du serveur -observe.config.showMigrationProgression=Affichier dans les logs la progression de la mise à jour d'une base -observe.config.showMigrationSql=Afficher dans les logs les requêtes jouées lors de la mise à jour d'une base -observe.config.showSql=Afficher dans les logs toutes les requêtes sql exéts -observe.config.speciesList.longline.catch=Espèces pour les captures - TDR -observe.config.speciesList.longline.encounter=Espèces pour les rencontre -observe.config.speciesList.seine.nonTargetCatch=Espèces pour les captures non cible -observe.config.speciesList.seine.objectObservedSpecies=Espèces pour les espèces non cible observées -observe.config.speciesList.seine.objectSchoolEstimate=Espèces pour les estimations banc objet -observe.config.speciesList.seine.schoolEstimate=Espèces pour les estimations -observe.config.speciesList.seine.targetCatch=Espèces pour les captures cible -observe.config.ui.autoPopupNumberEditor=Pour afficher automatiquement l'éditeur numérique lors de l'édition d'un count -observe.config.ui.changeSynchroSrc=Pour autoriser la sélection de la base source dans les opérations sur base -observe.config.ui.fullscreen=Pour afficher l'application en mode pleine écran -observe.config.ui.loadLocalStorage=Charger la base locale au démarrage de l'application -observe.config.ui.locale=Langue utilisée par l'application (fr_FR, en_GB ou es_ES) -observe.config.ui.showNumberEditorButton=Pour afficher le bouton qui permet d'utiliser l'éditeur numérique à gauche de chaque champs numérique -observe.config.ui.showTimeEditorSlider=Pour afficher la réglette d'édition des heures -observe.config.ui.storeRemoteStorage=Pour activer la sauvegarde de la configuration de la source distante -observe.config.ui.treeOpenNodes=Noeuds de l'arbre ouverts lors de la dernière fermeture de la base observe.content.action.activity=Créer une nouvelle activité observe.content.action.activity.tip=Créer une nouvelle activité pour la route courante observe.content.action.baitHaulingStatus.create.tip=Créer un nouveau statut de l'appât au virage @@ -1908,7 +1828,6 @@ observe.message.quit.valid.edit=Les données ont été modifiées et sont valide observe.message.referentiel.editable=Le référentiel est éditable. observe.message.referentiel.home=< Référentiel > observe.message.referentiel.no.editable=Vous n'êtes pas autorisé à éditer le référentiel. -observe.message.save.configuration=Sauvegarde de la configuration dans le fichier %1$s observe.message.select.report=Choisissez une requête observe.message.server.info=La base locale %1$s est démarrée en mode serveur. observe.message.show.usage.for.delete=Le référentiel %1$s "%2$s" ne peut pas être supprimé. @@ -1922,7 +1841,6 @@ observe.message.table.editBean.modified.but.invalid=L'entrée en cours d'éditio observe.message.updating.floatingObject=L'objet flottant est en cours de modification. observe.message.updating.referentiel=L'objet est en cours de mise à jour. observe.message.warning.will.be.delete=%1$s\n\nAttention, l'export remplacera la marée existante. -observe.model.version=Version du modèle de données observe.navigationMenu.move.activityLongline=Changer de marée observe.navigationMenu.move.activitySeine=Changer de route observe.navigationMenu.move.route=Changer de marée @@ -1935,7 +1853,6 @@ observe.obstuna.action.security.description=Mise à jour de la sécurité d'une observe.obstuna.action.update=Mise à jour d'obstuna observe.obstuna.action.update.description=Mise à jour d'une base distante obstuna observe.runner.config.loaded=Configuration d'ObServe v. %1$s chargée. -observe.runner.config.migrate.file=Le fichier de configuration %1$s a été déplacée de \n%2$s\nvers\n%3$s observe.runner.context.loaded=Initialisation du contexte terminée en %1$s. observe.runner.copy.default.logConfigurationFile.file=Création du fichier de configuration des logs %1$s. observe.runner.copy.default.map.file=Création des cartes %1$s. @@ -2010,26 +1927,6 @@ observe.storage.connexionStatut.success=Connexion réussie observe.storage.connexionStatut.success.description=Information sur la connexion \:\n%1$s. observe.storage.connexionStatut.untested=Connexion non validée observe.storage.connexionStatut.untested.description=La connexion n'a jamais été validée, \nou a été modifiée depuis le dernier test de connexion. -observe.storage.creationMode.empty=Générer une base vide -observe.storage.creationMode.empty.description=Générer une nouvelle base locale vide.\nCette base n'aura pas de référentiel et il vous faudra ensuite faire un import de référentiel... -observe.storage.creationMode.externalDump=Charger une sauvegarde de base locale (*.sql.gz) -observe.storage.creationMode.externalDump.description=Créer une nouvelle base locale à partir\nd'une précédente sauvegarde de l'application -observe.storage.creationMode.importLocalStorage=Importer le référentiel d'une base locale -observe.storage.creationMode.importLocalStorage.description=Générer une nouvelle base locale et y importer le référentiel d'une autre base locale. -observe.storage.creationMode.importRemoteStorage=Importer le référentiel d'une base distante -observe.storage.creationMode.importRemoteStorage.description=Générer une nouvelle base locale et y importer le référentiel d'une autre base distante. -observe.storage.creationMode.importServerStorage=Importer le référentiel dun serveur distant -observe.storage.creationMode.importServerStorage.description=Générer une nouvelle base locale et y importer le référentiel d'un serveur distant. -observe.storage.creationMode.internalDump=Charger la base embarquée -observe.storage.creationMode.internalDump.description=Générer une nouvelle base locale à partir\nde la dernière version de la base embarquée. -observe.storage.dbMode.createLocal=Créer une base locale -observe.storage.dbMode.createLocal.description=Creer une base locale de type h2 -observe.storage.dbMode.useLocal=Utiliser une base locale -observe.storage.dbMode.useLocal.description=Utiliser une base locale de type h2 -observe.storage.dbMode.useRemote=Utiliser une base distante -observe.storage.dbMode.useRemote.description=Utiliser une base distante de type postgres -observe.storage.dbMode.useServer=Utiliser un serveur distant -observe.storage.dbMode.useServer.description=Utiliser un serveur distant observe.storage.error.badUrl=Erreur dans le format de l'URL %s observe.storage.error.dbVersionMismatch=La version de la base distante (%s) n'est pas compatible avec la version du modèle (%s) observe.storage.error.rest.database.unknownForUser=La base de données "%s" n'est pas définie pour l'utilisateur "%s" @@ -2145,7 +2042,6 @@ observe.title.can.not.export.obstuna=Impossible d'exporter des données d'obstun observe.title.choose.db.dump=Choisir une sauvegarder de base locale observe.title.choose.db.dump.directory=Choisir le répertoire de destination de la sauvegarde observe.title.choose.reportFile=Choisir le fichier de définition des reports -observe.title.config.migrate=Déplacement du fichier de configuration observe.title.connect.existingDB=Connexion à une source de données existante observe.title.connect.localDB=Connexion à une source de données locale observe.title.connect.remoteDB=Connexion à une source de données distante diff --git a/application-web-configuration/LICENSE.txt b/application-web-configuration/LICENSE.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/application-web-configuration/LICENSE.txt @@ -0,0 +1,674 @@ + 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 link 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/application-web-configuration/README.md b/application-web-configuration/README.md new file mode 100644 index 0000000..d2e50d3 --- /dev/null +++ b/application-web-configuration/README.md @@ -0,0 +1,2 @@ +To deploy new version of pom: mvn deploy +To install localy: mvn install diff --git a/application-web-configuration/pom.xml b/application-web-configuration/pom.xml new file mode 100644 index 0000000..844e9b2 --- /dev/null +++ b/application-web-configuration/pom.xml @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Web configuration + %% + Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser 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 Lesser Public License for more details. + + You should have received a copy of the GNU General Lesser Public + License along with this program. If not, see + <http://www.gnu.org/licenses/lgpl-3.0.html>. + #L% + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>fr.ird.observe</groupId> + <artifactId>observe</artifactId> + <version>5.0-SNAPSHOT</version> + </parent> + + <artifactId>application-web-configuration</artifactId> + + <name>ObServe :: Application Web Configuration</name> + <description>ObServe Application Web Configuration</description> + + <dependencies> + + <!-- sibling dependencies --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>services-model</artifactId> + <version>${project.version}</version> + </dependency> + + <!-- commons dependencies --> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-collections4</artifactId> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </dependency> + + <!-- Nuiton --> + <dependency> + <groupId>org.nuiton</groupId> + <artifactId>nuiton-version</artifactId> + </dependency> + <dependency> + <groupId>org.nuiton.i18n</groupId> + <artifactId>nuiton-i18n</artifactId> + </dependency> + <dependency> + <groupId>org.nuiton</groupId> + <artifactId>nuiton-config</artifactId> + </dependency> + + <!-- Yaml --> + <dependency> + <groupId>com.esotericsoftware.yamlbeans</groupId> + <artifactId>yamlbeans</artifactId> + </dependency> + + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <scope>compile</scope> + </dependency> + + </dependencies> + + <build> + <resources> + <resource> + <directory>src/main/resources</directory> + <includes> + <include>observeweb.conf</include> + </includes> + <filtering>true</filtering> + </resource> + <resource> + <directory>src/main/resources</directory> + <excludes> + <exclude>observeweb.conf</exclude> + </excludes> + </resource> + </resources> + + <plugins> + + <plugin> + <groupId>org.nuiton.i18n</groupId> + <artifactId>i18n-maven-plugin</artifactId> + <executions> + <execution> + <id>scan-sources</id> + <goals> + <goal>parserJava</goal> + <goal>gen</goal> + </goals> + </execution> + </executions> + </plugin> + + + </plugins> + + </build> + +</project> diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfiguration.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfiguration.java similarity index 96% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfiguration.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfiguration.java index 394781a..8876fe5 100644 --- a/application-web/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfiguration.java +++ b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfiguration.java @@ -25,6 +25,7 @@ package fr.ird.observe.application.web.configuration; import com.google.common.base.Charsets; import com.google.common.io.CharSource; import com.google.common.io.Resources; +import fr.ird.observe.util.ObserveUtil; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.log4j.LogManager; @@ -45,7 +46,6 @@ import java.nio.file.Paths; import java.nio.file.attribute.FileAttribute; import java.nio.file.attribute.PosixFilePermission; import java.nio.file.attribute.PosixFilePermissions; -import java.util.Map; import java.util.Properties; import java.util.Set; @@ -271,18 +271,14 @@ public class ObserveWebApplicationConfiguration { log.info("Chargement du fichier de log : " + logFile); } - Properties finalLogConfigurationProperties = new Properties(); + Properties finalLogConfigurationProperties; try (BufferedReader inputStream = Files.newBufferedReader(logFile.toPath(), Charsets.UTF_8)) { Properties logConfigurationProperties = new Properties(); logConfigurationProperties.load(inputStream); - for (Map.Entry<Object, Object> entry : logConfigurationProperties.entrySet()) { - String key = (String) entry.getKey(); - String value = (String) entry.getValue(); - String newValue = applicationConfig.replaceRecursiveOptions(value); - finalLogConfigurationProperties.setProperty(key, newValue); - } + finalLogConfigurationProperties = ObserveUtil.loadProperties(logConfigurationProperties, applicationConfig); + } catch (Exception e) { throw new ObserveWebApplicationConfigurationInitException("Impossible de charger le fichier de configuration des logs", e); } diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfigurationInitException.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfigurationInitException.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfigurationInitException.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfigurationInitException.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfigurationOption.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfigurationOption.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfigurationOption.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfigurationOption.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfigurationProvider.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfigurationProvider.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfigurationProvider.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/ObserveWebApplicationConfigurationProvider.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/InvalidObserveWebDatabaseException.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/InvalidObserveWebDatabaseException.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/InvalidObserveWebDatabaseException.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/InvalidObserveWebDatabaseException.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/InvalidObserveWebDatabaseRoleException.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/InvalidObserveWebDatabaseRoleException.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/InvalidObserveWebDatabaseRoleException.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/InvalidObserveWebDatabaseRoleException.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/InvalidObserveWebDatabasesException.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/InvalidObserveWebDatabasesException.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/InvalidObserveWebDatabasesException.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/InvalidObserveWebDatabasesException.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabase.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabase.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabase.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabase.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabaseRole.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabaseRole.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabaseRole.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabaseRole.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabases.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabases.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabases.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabases.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabasesHelper.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabasesHelper.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabasesHelper.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/ObserveWebDatabasesHelper.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseBean.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseBean.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseBean.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseBean.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseImmutable.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseImmutable.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseImmutable.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseImmutable.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseRoleBean.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseRoleBean.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseRoleBean.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseRoleBean.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseRoleImmutable.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseRoleImmutable.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseRoleImmutable.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabaseRoleImmutable.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabasesBean.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabasesBean.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabasesBean.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabasesBean.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabasesImmutable.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabasesImmutable.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabasesImmutable.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/db/impl/ObserveWebDatabasesImmutable.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/InvalidObserveWebUserException.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/InvalidObserveWebUserException.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/InvalidObserveWebUserException.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/InvalidObserveWebUserException.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/InvalidObserveWebUserPermissionException.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/InvalidObserveWebUserPermissionException.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/InvalidObserveWebUserPermissionException.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/InvalidObserveWebUserPermissionException.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/InvalidObserveWebUsersException.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/InvalidObserveWebUsersException.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/InvalidObserveWebUsersException.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/InvalidObserveWebUsersException.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUser.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUser.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUser.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUser.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUserPermission.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUserPermission.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUserPermission.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUserPermission.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUsers.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUsers.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUsers.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUsers.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUsersHelper.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUsersHelper.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUsersHelper.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/ObserveWebUsersHelper.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserBean.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserBean.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserBean.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserBean.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserImmutable.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserImmutable.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserImmutable.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserImmutable.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserPermissionBean.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserPermissionBean.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserPermissionBean.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserPermissionBean.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserPermissionImmutable.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserPermissionImmutable.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserPermissionImmutable.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUserPermissionImmutable.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUsersBean.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUsersBean.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUsersBean.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUsersBean.java diff --git a/application-web/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUsersImmutable.java b/application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUsersImmutable.java similarity index 100% rename from application-web/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUsersImmutable.java rename to application-web-configuration/src/main/java/fr/ird/observe/application/web/configuration/user/impl/ObserveWebUsersImmutable.java diff --git a/application-web/src/main/resources/META-INF/services/org.nuiton.config.ApplicationConfigProvider b/application-web-configuration/src/main/resources/META-INF/services/org.nuiton.config.ApplicationConfigProvider similarity index 100% rename from application-web/src/main/resources/META-INF/services/org.nuiton.config.ApplicationConfigProvider rename to application-web-configuration/src/main/resources/META-INF/services/org.nuiton.config.ApplicationConfigProvider diff --git a/application-web-configuration/src/main/resources/i18n/application-web-configuration_en_GB.properties b/application-web-configuration/src/main/resources/i18n/application-web-configuration_en_GB.properties new file mode 100644 index 0000000..6820200 --- /dev/null +++ b/application-web-configuration/src/main/resources/i18n/application-web-configuration_en_GB.properties @@ -0,0 +1,15 @@ +observe.model.version=Model version +observeweb.adminApiKey.description=API Key to use the admin mode (You should change it). +observeweb.apiUrl.description=REST API end point +observeweb.baseDirectory.description=Base directory +observeweb.build.date.description=Build date +observeweb.build.number.description=Build number +observeweb.build.version.description=Build version +observeweb.configuration.description=ObServe Web configuration +observeweb.databasesConfigurationFile.description=Path to databases configuration file +observeweb.devMode.description=Dev mode +observeweb.log4jConfigurationFile.description=Path to log configuration file +observeweb.sessionExpirationDelay.description=Session expiration deplay (in minutes) +observeweb.sessionMaximumSize.description=Session maximum size +observeweb.temporaryDirectory.description=Path to temporary directory +observeweb.usersConfigurationFile.description=Path to users configuration file diff --git a/application-web-configuration/src/main/resources/i18n/application-web-configuration_es_ES.properties b/application-web-configuration/src/main/resources/i18n/application-web-configuration_es_ES.properties new file mode 100644 index 0000000..10057d6 --- /dev/null +++ b/application-web-configuration/src/main/resources/i18n/application-web-configuration_es_ES.properties @@ -0,0 +1,15 @@ +observe.model.version=Version du modèle +observeweb.adminApiKey.description=Admin API Key (À changer). +observeweb.apiUrl.description=Url de l'api rest +observeweb.baseDirectory.description=Répertoire de l'application +observeweb.build.date.description=Date de construction +observeweb.build.number.description=Numéro de construction +observeweb.build.version.description=Version de construction +observeweb.configuration.description=Observe web Configuration +observeweb.databasesConfigurationFile.description=Chemin vers le fichier de configuration des bases +observeweb.devMode.description=Mode développeur +observeweb.log4jConfigurationFile.description=Chemin vers le fichier de configuration des logs +observeweb.sessionExpirationDelay.description=Temps maximum d'une session (en minutes) +observeweb.sessionMaximumSize.description=Taille maximum de session +observeweb.temporaryDirectory.description=Chemin vers le répertoire temporaire +observeweb.usersConfigurationFile.description=Chemin vers le fichier de configuration des utilisateurs diff --git a/application-web-configuration/src/main/resources/i18n/application-web-configuration_fr_FR.properties b/application-web-configuration/src/main/resources/i18n/application-web-configuration_fr_FR.properties new file mode 100644 index 0000000..10057d6 --- /dev/null +++ b/application-web-configuration/src/main/resources/i18n/application-web-configuration_fr_FR.properties @@ -0,0 +1,15 @@ +observe.model.version=Version du modèle +observeweb.adminApiKey.description=Admin API Key (À changer). +observeweb.apiUrl.description=Url de l'api rest +observeweb.baseDirectory.description=Répertoire de l'application +observeweb.build.date.description=Date de construction +observeweb.build.number.description=Numéro de construction +observeweb.build.version.description=Version de construction +observeweb.configuration.description=Observe web Configuration +observeweb.databasesConfigurationFile.description=Chemin vers le fichier de configuration des bases +observeweb.devMode.description=Mode développeur +observeweb.log4jConfigurationFile.description=Chemin vers le fichier de configuration des logs +observeweb.sessionExpirationDelay.description=Temps maximum d'une session (en minutes) +observeweb.sessionMaximumSize.description=Taille maximum de session +observeweb.temporaryDirectory.description=Chemin vers le répertoire temporaire +observeweb.usersConfigurationFile.description=Chemin vers le fichier de configuration des utilisateurs diff --git a/application-web/src/main/resources/log4j.properties b/application-web-configuration/src/main/resources/log4j.properties similarity index 100% rename from application-web/src/main/resources/log4j.properties rename to application-web-configuration/src/main/resources/log4j.properties diff --git a/application-web/src/main/resources/observeweb-log4j.conf b/application-web-configuration/src/main/resources/observeweb-log4j.conf similarity index 100% rename from application-web/src/main/resources/observeweb-log4j.conf rename to application-web-configuration/src/main/resources/observeweb-log4j.conf diff --git a/application-web/src/main/resources/observeweb.conf b/application-web-configuration/src/main/resources/observeweb.conf similarity index 100% rename from application-web/src/main/resources/observeweb.conf rename to application-web-configuration/src/main/resources/observeweb.conf diff --git a/application-web/src/main/resources/validators.xml b/application-web-configuration/src/main/resources/validators.xml similarity index 100% rename from application-web/src/main/resources/validators.xml rename to application-web-configuration/src/main/resources/validators.xml diff --git a/application-web/pom.xml b/application-web/pom.xml index 33b2662..f131e0e 100644 --- a/application-web/pom.xml +++ b/application-web/pom.xml @@ -19,6 +19,10 @@ <!-- Webapp configuration --> <defaultWebContextPath>observeweb</defaultWebContextPath> + <i18n.bundleOutputName>${projectId}-i18n</i18n.bundleOutputName> + <i18n.bundleCsvFile>${projectId}-i18n.csv</i18n.bundleCsvFile> + <i18n.bundleCsvSeparator>|</i18n.bundleCsvSeparator> + <!-- deploy configuration --> <deployFiles>${project.build.directory}/${project.artifactId}-${project.version}.war</deployFiles> @@ -62,6 +66,11 @@ <artifactId>services-runner</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>application-web-configuration</artifactId> + <version>${project.version}</version> + </dependency> <!-- commons dependencies --> @@ -79,10 +88,6 @@ </dependency> <dependency> <groupId>org.apache.commons</groupId> - <artifactId>commons-collections4</artifactId> - </dependency> - <dependency> - <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> <dependency> @@ -103,14 +108,6 @@ <groupId>org.nuiton</groupId> <artifactId>nuiton-converter</artifactId> </dependency> - <dependency> - <groupId>org.nuiton</groupId> - <artifactId>nuiton-config</artifactId> - </dependency> - <dependency> - <groupId>org.nuiton.i18n</groupId> - <artifactId>nuiton-i18n</artifactId> - </dependency> <!-- WebMotion --> <dependency> @@ -141,12 +138,6 @@ <artifactId>javax.servlet-api</artifactId> </dependency> - <!-- Yaml --> - <dependency> - <groupId>com.esotericsoftware.yamlbeans</groupId> - <artifactId>yamlbeans</artifactId> - </dependency> - <!-- Logging --> <dependency> <groupId>org.slf4j</groupId> @@ -166,12 +157,6 @@ <scope>test</scope> </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <scope>compile</scope> - </dependency> - <!-- test dependencies --> <dependency> @@ -186,7 +171,6 @@ <resource> <directory>src/main/resources</directory> <includes> - <include>observeweb.conf</include> <include>mapping</include> </includes> <filtering>true</filtering> @@ -194,7 +178,7 @@ <resource> <directory>src/main/resources</directory> <excludes> - <exclude>observeweb.conf</exclude> + <exclude>mapping</exclude> </excludes> </resource> </resources> @@ -212,6 +196,28 @@ </plugin> <plugin> + <groupId>org.nuiton.i18n</groupId> + <artifactId>i18n-maven-plugin</artifactId> + <executions> + <execution> + <id>make-bundle</id> + <goals> + <goal>bundle</goal> + <goal>generate-csv-bundle</goal> + </goals> + </execution> + </executions> + <dependencies> + <!--FIXME Si on ne rajoute pas ça, alors une vieille version de nuiton-utils est prise où il manque des dépendances--> + <dependency> + <groupId>org.nuiton</groupId> + <artifactId>nuiton-utils</artifactId> + <version>${nuitonUtilsVersion}</version> + </dependency> + </dependencies> + </plugin> + + <plugin> <groupId>${project.groupId}</groupId> <artifactId>maven-plugin</artifactId> <version>${project.version}</version> diff --git a/application-web/src/main/java/fr/ird/observe/application/web/ObserveWebMotionFilter.java b/application-web/src/main/java/fr/ird/observe/application/web/ObserveWebMotionFilter.java index a7e04e4..311c8b0 100644 --- a/application-web/src/main/java/fr/ird/observe/application/web/ObserveWebMotionFilter.java +++ b/application-web/src/main/java/fr/ird/observe/application/web/ObserveWebMotionFilter.java @@ -25,7 +25,7 @@ package fr.ird.observe.application.web; import com.google.common.base.Strings; import com.google.gson.Gson; import fr.ird.observe.application.web.request.ObserveWebRequestContext; -import fr.ird.observe.services.ObserveSpeciesListConfiguration; +import fr.ird.observe.services.dto.ObserveSpeciesListConfiguration; import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationRestConstants; import fr.ird.observe.services.dto.constants.ReferentialLocale; import org.apache.commons.lang3.StringUtils; diff --git a/application-web/src/main/java/fr/ird/observe/application/web/request/ObserveWebRequestContext.java b/application-web/src/main/java/fr/ird/observe/application/web/request/ObserveWebRequestContext.java index 494a619..96df65e 100644 --- a/application-web/src/main/java/fr/ird/observe/application/web/request/ObserveWebRequestContext.java +++ b/application-web/src/main/java/fr/ird/observe/application/web/request/ObserveWebRequestContext.java @@ -25,7 +25,7 @@ package fr.ird.observe.application.web.request; import fr.ird.observe.application.web.ObserveWebApplicationContext; import fr.ird.observe.services.ObserveService; import fr.ird.observe.services.ObserveServiceInitializer; -import fr.ird.observe.services.ObserveSpeciesListConfiguration; +import fr.ird.observe.services.dto.ObserveSpeciesListConfiguration; import fr.ird.observe.services.configuration.ObserveDataSourceConfiguration; import fr.ird.observe.services.configuration.ObserveDataSourceConfigurationAndConnection; import fr.ird.observe.services.dto.constants.ReferentialLocale; diff --git a/pom.xml b/pom.xml index 3c303e7..7936d21 100644 --- a/pom.xml +++ b/pom.xml @@ -128,10 +128,12 @@ <module>services-topia</module> <module>services-rest</module> <module>services-runner</module> + <module>application-web-configuration</module> <module>application-web</module> <module>application-swing-decoration</module> <module>application-swing-validators</module> <module>application-swing-validation</module> + <module>application-swing-configuration</module> <module>application-swing</module> </modules> <!--scm> @@ -163,7 +165,7 @@ <jaxxVersion>2.31</jaxxVersion> <nuitonI18nVersion>3.6</nuitonI18nVersion> <nuitonValidatorVersion>3.0.1</nuitonValidatorVersion> - + <nuitonUtilsVersion>3.0-rc-14</nuitonUtilsVersion> <xworkVersion>2.3.29</xworkVersion> <hibernateVersion>4.3.11.Final</hibernateVersion> <sl4jVersion>1.7.21</sl4jVersion> @@ -309,7 +311,7 @@ <dependency> <groupId>org.nuiton</groupId> <artifactId>nuiton-utils</artifactId> - <version>3.0-rc-14</version> + <version>${nuitonUtilsVersion}</version> <scope>compile</scope> <exclusions> <exclusion> @@ -468,11 +470,6 @@ <artifactId>eugene</artifactId> <version>${eugenePluginVersion}</version> </dependency> - <dependency> - <groupId>org.nuiton.eugene</groupId> - <artifactId>eugene-java-templates</artifactId> - <version>${eugenePluginVersion}</version> - </dependency> <!-- topia --> <dependency> @@ -486,13 +483,7 @@ </exclusion> </exclusions> </dependency> - <dependency> - <groupId>org.nuiton.topia</groupId> - <artifactId>topia-persistence</artifactId> - <version>${topiaVersion}</version> - <scope>test</scope> - <classifier>tests</classifier> - </dependency> + <dependency> <groupId>org.nuiton.topia</groupId> <artifactId>topia-service-migration</artifactId> @@ -505,13 +496,6 @@ <version>${topiaVersion}</version> <scope>compile</scope> </dependency> - <dependency> - <groupId>org.nuiton.topia</groupId> - <artifactId>topia-service-replication</artifactId> - <version>${topiaVersion}</version> - <scope>test</scope> - <classifier>tests</classifier> - </dependency> <!-- FreeMarker --> <dependency> @@ -541,11 +525,6 @@ <artifactId>hibernate-core</artifactId> <version>${hibernateVersion}</version> </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-jmx</artifactId> - <version>${hibernateVersion}</version> - </dependency> <!-- Map --> <dependency> @@ -952,17 +931,28 @@ <phase>pre-site</phase> <configuration> <!-- TODO chemit 2011-02-24 Change to 'target' when using ant-run 1.6 in mavenpom4labs... --> - <tasks> + <target> <echo message="Copy model to site" /> <copy verbose="true" failonerror="false" overwrite="true" todir="${project.reporting.outputDirectory}/model"> - <fileset dir="${basedir}/doc/modelisation"> + <fileset dir="doc/modelisation"> <include name="**/*.pdf" /> </fileset> - <fileset dir="${basedir}/observe-entities/src/main/xmi"> + <fileset dir="entities/src/main/xmi"> <include name="**/*.zargo" /> </fileset> </copy> - </tasks> + </target> + <!--tasks> + <echo message="Copy model to site" /> + <copy verbose="true" failonerror="false" overwrite="true" todir="${project.reporting.outputDirectory}/model"> + <fileset dir="doc/modelisation"> + <include name="**/*.pdf" /> + </fileset> + <fileset dir="entities/src/main/xmi"> + <include name="**/*.zargo" /> + </fileset> + </copy> + </tasks--> </configuration> <goals> <goal>run</goal> @@ -974,25 +964,18 @@ <phase>pre-site</phase> <configuration> <tasks> - <copy todir="${project.reporting.outputDirectory}" verbose="true" failonerror="false" overwrite="false"> - <fileset dir="observe-validation/src/main/java"> + <copy todir="${project.reporting.outputDirectory}/validation/service" verbose="true" failonerror="false" overwrite="false"> + <fileset dir="services-topia-validation/src/main/java"> <include name="**/*-validation.xml" /> </fileset> </copy> - </tasks> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - <execution> - <!-- on recopie le fichier validators.xml dans le site principal --> - <id>ValidatorXmlToSite</id> - <phase>pre-site</phase> - <configuration> - <tasks> - <copy todir="${project.reporting.outputDirectory}" verbose="true" failonerror="false" overwrite="false"> - <fileset dir="observe-validation/src/main/resources"> + <copy todir="${project.reporting.outputDirectory}/validation/ui" verbose="true" failonerror="false" overwrite="false"> + <fileset dir="application-swing-validation/src/main/java"> + <include name="**/*-validation.xml" /> + </fileset> + </copy> + <copy todir="${project.reporting.outputDirectory}/validation" verbose="true" failonerror="false" overwrite="false"> + <fileset dir="application-swing/src/main/resources"> <include name="validators.xml" /> </fileset> </copy> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.