diff --git a/.gitignore b/.gitignore index 8d59199..5bf83d8 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ release.properties .classpath .project .settings/ +designer.log +.idea/ +Designer.iml diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000..16209f9 --- /dev/null +++ b/.hgignore @@ -0,0 +1,4 @@ +syntax: glob +target +*.class +designer.log diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..dff5f3a --- /dev/null +++ b/.travis.yml @@ -0,0 +1 @@ +language: java diff --git a/LICENSE.txt b/LICENSE.txt old mode 100755 new mode 100644 index abbcffa..931d270 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,507 +1,505 @@ - - OpenClinica, copyright (C) 2005-2009 Akaza Research, is distributed - under the GNU Lesser General Public License (GNU LGPL). OpenClinica - 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 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -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 this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -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 -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser 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 Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "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 -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY 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 -LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - Copyright (C) 2005-2008 Akaza Research - - This library 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 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -460 Totten Pond Rd, Suite 200 -Waltham, MA 02451 - - \ No newline at end of file + + OpenClinica, copyright (C) 2005-2009 Akaza Research, is distributed + under the GNU Lesser General Public License (GNU LGPL). OpenClinica + 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 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +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 this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser 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 Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + Copyright (C) 2005-2008 Akaza Research + + This library 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 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +460 Totten Pond Rd, Suite 200 +Waltham, MA 02451 diff --git a/pom.xml b/pom.xml index 4704c59..e74c0dc 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.akaza.openclinica.designer Designer war - 1.1 + SNAPSHOT Designer 1.1.5.RELEASE @@ -14,9 +14,19 @@ UTF-8 3.0.5.RELEASE 0.9.28 + + scm:git:https://github.com/OpenClinica/Designer.git + + + false + + central + libs-release + https://dev.openclinica.com/artifactory/libs-release + spring-maven-release Spring Maven Release Repository @@ -46,6 +56,10 @@ false + + maven-central + http://repo1.maven.org/maven2 + Akaza Dev Repository http://svn.akazaresearch.com/ocrepository/repository @@ -321,6 +335,21 @@ tiles-jsp 2.2.1 + + org.apache.tiles + tiles-api + 2.2.1 + + + org.apache.tiles + tiles-servlet + 2.2.1 + + + org.apache.tiles + tiles-template + 2.2.1 + org.springframework spring-web @@ -479,11 +508,16 @@ org.akaza.openclinica.odm openclinica-odm - 0.1.0.BUILD-SNAPSHOT + 2.0 jar compile + + org.codehaus.jackson + jackson-core-asl + 1.5.3 + org.codehaus.jackson jackson-mapper-asl @@ -506,21 +540,41 @@ commons-httpclient 3.1 + + commons-validator + commons-validator + 1.4.1 + org.springframework.security.oauth spring-security-oauth 1.0.0.M2 - + org.apache.httpcomponents httpclient 4.1 + + org.apache.httpcomponents + httpcore + 4.1 + + + org.ow2.asm + asm + 3.2 + org.codehaus.groovy groovy 1.8.0 + + commons-beanutils + commons-beanutils-core + 1.8.3 + @@ -712,6 +766,12 @@ false false changeSet + + @@ -723,9 +783,15 @@ changeSetDate yyyy-MM-dd HH:mm Z + + @@ -734,6 +800,7 @@ true **/*.properties + **/*.xml @@ -741,6 +808,7 @@ false **/*.properties + **/*.xml diff --git a/src/assemble/designer-assemble.xml b/src/assemble/designer-assemble.xml index a9e4e3a..92c8a98 100644 --- a/src/assemble/designer-assemble.xml +++ b/src/assemble/designer-assemble.xml @@ -16,4 +16,8 @@ Designer-${project.version}.war - \ No newline at end of file +<<<<<<< HEAD + +======= + +>>>>>>> 1.1 diff --git a/src/bin/org/akaza/openclinica/designer/web/controller/ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj b/src/bin/org/akaza/openclinica/designer/web/controller/ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj new file mode 100644 index 0000000..0e9bd12 --- /dev/null +++ b/src/bin/org/akaza/openclinica/designer/web/controller/ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj @@ -0,0 +1,13 @@ +// WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO. +// You may push code into the target .java compilation unit if you wish to edit any member(s). + +package org.akaza.openclinica.designer.web.controller; + + +privileged aspect ApplicationConversionServiceFactoryBean_Roo_ConversionService { + + public void ApplicationConversionServiceFactoryBean.afterPropertiesSet() { + super.afterPropertiesSet(); + } + +} diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/AccessResourceController.java b/src/main/java/org/akaza/openclinica/designer/web/controller/AccessResourceController.java index 1ac687d..4e94f54 100644 --- a/src/main/java/org/akaza/openclinica/designer/web/controller/AccessResourceController.java +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/AccessResourceController.java @@ -47,6 +47,8 @@ public class AccessResourceController { private static final String PARAM_APP_PATH = "path"; private static final String PARAM_STUDY_OID = "study_oid"; private static final String PARAM_PROVIDER_USER = "provider_user"; + private static final String PARAM_RUN_TIME = "runTime"; + private static final String PARAM_MESSAGE = "msg"; private static final String SESSION_ATTR_FORM = "form"; protected final Logger logger = LoggerFactory.getLogger(getClass().getName()); @@ -59,14 +61,17 @@ public AccessResourceController() { public String createForm(Model model, HttpSession session, HttpServletRequest request, @RequestParam(PARAM_HOST) String providerHost, @RequestParam(PARAM_APP) String providerApp, @RequestParam(PARAM_STUDY_OID) String studyOid, @RequestParam(PARAM_PROVIDER_USER) String providerUser, @RequestParam(value = PARAM_APP_PATH, required = false) String path, - @RequestParam(value = PARAM_RULE_OID, required = false) String ruleOid, @RequestParam(value = PARAM_TARGET, required = false) String target) + @RequestParam(value = PARAM_RULE_OID, required = false) String ruleOid, @RequestParam(value = PARAM_TARGET, required = false) String target, @RequestParam(value = PARAM_RUN_TIME, required = false) String runTime, @RequestParam(value = PARAM_MESSAGE, required = false) String message) throws Exception { if (!hostAccessService.isHostAllowedAccess(providerHost)) { return "index"; } logger.debug("Host is Valid ..."); - + if (message != null) { + message = message.replace("-0-","\n"); + message = message.replace("-1-"," "); + } userPreferences.setAppName(providerApp); userPreferences.setPath(path); userPreferences.setUser(providerUser); @@ -81,7 +86,7 @@ public String createForm(Model model, HttpSession session, HttpServletRequest re session.setAttribute("providerUser", userPreferences.getUser()); session.setAttribute("providerHost", userPreferences.getHost()); if (ruleOid != null && target != null) { - session.setAttribute(SESSION_ATTR_FORM, uiODMBuilder.getContainer().getRuleCommandByRuleOidAndTarget(ruleOid, target)); + session.setAttribute(SESSION_ATTR_FORM, uiODMBuilder.getContainer().getRuleCommandByRuleOidAndTarget(ruleOid, target, runTime, message)); userPreferences.turnOnEditMode(); } // doRest(); diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/LazyEventActionType.java b/src/main/java/org/akaza/openclinica/designer/web/controller/LazyEventActionType.java new file mode 100644 index 0000000..c9539c7 --- /dev/null +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/LazyEventActionType.java @@ -0,0 +1,37 @@ +package org.akaza.openclinica.designer.web.controller; + +import org.openclinica.ns.rules.v31.EventActionType; +import org.openclinica.ns.rules.v31.EventDestinationType; +import org.springframework.util.AutoPopulatingList; + +public class LazyEventActionType extends EventActionType { + + private AutoPopulatingList lazyProperties; + + public LazyEventActionType() { + // TODO Auto-generated constructor stub + // destinationProperty = new ArrayList(); + lazyProperties = new AutoPopulatingList(LazyEventDestinationType.class); + } + + public LazyEventActionType(EventActionType eventActionType) { + this(); + this.setIfExpressionEvaluates(eventActionType.getIfExpressionEvaluates()); + this.setOID(eventActionType.getOID()); + this.setRunOnStatus(eventActionType.getRunOnStatus()); + this.getEventDestination().addAll(eventActionType.getEventDestination()); + for (EventDestinationType eventDestinationType : this.getEventDestination()) { + LazyEventDestinationType lazyEventDestination = new LazyEventDestinationType(eventDestinationType, "placeHolder"); + getLazyProperties().add(lazyEventDestination); + } + } + + public AutoPopulatingList getLazyProperties() { + return lazyProperties; + } + + public void setLazyProperties(AutoPopulatingList lazyProperties) { + this.lazyProperties = lazyProperties; + } + +} diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/LazyEventDestinationType.java b/src/main/java/org/akaza/openclinica/designer/web/controller/LazyEventDestinationType.java new file mode 100644 index 0000000..dc3a199 --- /dev/null +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/LazyEventDestinationType.java @@ -0,0 +1,27 @@ +package org.akaza.openclinica.designer.web.controller; + +import org.openclinica.ns.rules.v31.EventDestinationType; + +public class LazyEventDestinationType extends EventDestinationType { + + String placeHolder; + + public LazyEventDestinationType() { + // TODO Auto-generated constructor stub + } + + public LazyEventDestinationType(EventDestinationType eventDestinationType, String placeHolder) { + this.setProperty(eventDestinationType.getProperty()); + this.setValueExpression(eventDestinationType.getValueExpression()); + this.placeHolder = placeHolder; + } + + public String getPlaceHolder() { + return placeHolder; + } + + public void setPlaceHolder(String placeHolder) { + this.placeHolder = placeHolder; + } + +} diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/LazyRuleRefType2.java b/src/main/java/org/akaza/openclinica/designer/web/controller/LazyRuleRefType2.java index 7b5e6cb..1caf3c7 100644 --- a/src/main/java/org/akaza/openclinica/designer/web/controller/LazyRuleRefType2.java +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/LazyRuleRefType2.java @@ -1,11 +1,6 @@ package org.akaza.openclinica.designer.web.controller; -import org.openclinica.ns.rules.v31.DiscrepancyNoteActionType; -import org.openclinica.ns.rules.v31.EmailActionType; -import org.openclinica.ns.rules.v31.HideActionType; -import org.openclinica.ns.rules.v31.InsertActionType; -import org.openclinica.ns.rules.v31.RuleRefType; -import org.openclinica.ns.rules.v31.ShowActionType; +import org.openclinica.ns.rules.v31.*; import org.springframework.util.AutoPopulatingList; import java.util.ArrayList; @@ -27,6 +22,8 @@ public class LazyRuleRefType2 extends RuleRefType { private AutoPopulatingList lazyShowActions; private AutoPopulatingList lazyHideActions; private AutoPopulatingList lazyInsertActions; + private AutoPopulatingList lazyEventActions; + private AutoPopulatingList lazyNotificationActions; public LazyRuleRefType2() { discrepancyNoteAction = new ArrayList(); @@ -34,11 +31,15 @@ public LazyRuleRefType2() { showAction = new ArrayList(); hideAction = new ArrayList(); insertAction = new ArrayList(); + eventAction = new ArrayList(); + notificationAction = new ArrayList(); lazyDiscrepancyNoteActions = new AutoPopulatingList(discrepancyNoteAction, DiscrepancyNoteActionType.class); lazyEmailActions = new AutoPopulatingList(emailAction, EmailActionType.class); lazyShowActions = new AutoPopulatingList(LazyShowActionType.class); lazyHideActions = new AutoPopulatingList(LazyHideActionType.class); lazyInsertActions = new AutoPopulatingList(LazyInsertActionType.class); + lazyEventActions = new AutoPopulatingList(LazyEventActionType.class); + lazyNotificationActions = new AutoPopulatingList(notificationAction, NotificationActionType.class); // TODO Auto-generated constructor stub } @@ -49,17 +50,120 @@ public LazyRuleRefType2(RuleRefType ruleRef) { showActionToLazyShowAction(ruleRef.getShowAction()); hideActionToLazyHideAction(ruleRef.getHideAction()); insertActionToLazyInsertAction(ruleRef.getInsertAction()); - + eventActionToLazyEventAction(ruleRef.getEventAction()); + notificationActionToLazyNotificationAction(ruleRef.getNotificationAction()); } public void lazyToNonLazy() { - reAlignDiscrepancyNoteActions(); reAlignEmailActions(); reAlignLazyShowActions(); reAlignLazyHideActions(); reAlignLazyInsertActions(); + reAlignLazyEventActions(); + reAlignNotificationActions(); + } + public List splitRuleRef(RuleRefType ruleRef) { + List listLazy = new ArrayList(); + int count = 0; + int currentActionNumber = countActions(ruleRef); + String oid = null; + for (EmailActionType ea : ruleRef.getEmailAction()) { + LazyRuleRefType2 rr = new LazyRuleRefType2(); + oid = ruleRef.getOID(); + if (currentActionNumber > 1) { + oid = ruleRef.getOID()+"_"+count; + } + rr.setOID(oid); + rr.getEmailAction().add(ea); + count++; + listLazy.add(rr); + } + for (DiscrepancyNoteActionType ea : ruleRef.getDiscrepancyNoteAction()) { + LazyRuleRefType2 rr = new LazyRuleRefType2(); + oid = ruleRef.getOID(); + if (currentActionNumber > 1) { + oid = ruleRef.getOID()+"_"+count; + } + rr.setOID(oid); + rr.getDiscrepancyNoteAction().add(ea); + count++; + listLazy.add(rr); + } + for (ShowActionType ea : ruleRef.getShowAction()) { + LazyRuleRefType2 rr = new LazyRuleRefType2(); + oid = ruleRef.getOID(); + if (currentActionNumber > 1) { + oid = ruleRef.getOID()+"_"+count; + } + rr.setOID(oid); + rr.getShowAction().add(ea); + count++; + listLazy.add(rr); + } + for (HideActionType ea : ruleRef.getHideAction()) { + LazyRuleRefType2 rr = new LazyRuleRefType2(); + oid = ruleRef.getOID(); + if (currentActionNumber > 1) { + oid = ruleRef.getOID()+"_"+count; + } + rr.setOID(oid); + rr.getHideAction().add(ea); + count++; + listLazy.add(rr); + } + for (InsertActionType ea : ruleRef.getInsertAction()) { + LazyRuleRefType2 rr = new LazyRuleRefType2(); + oid = ruleRef.getOID(); + if (currentActionNumber > 1) { + oid = ruleRef.getOID()+"_"+count; + } + rr.setOID(oid); + rr.getInsertAction().add(ea); + count++; + listLazy.add(rr); + } + for (EventActionType ea : ruleRef.getEventAction()) { + LazyRuleRefType2 rr = new LazyRuleRefType2(); + oid = ruleRef.getOID(); + if (currentActionNumber > 1) { + oid = ruleRef.getOID()+"_"+count; + } + rr.setOID(oid); + rr.getEventAction().add(ea); + count++; + listLazy.add(rr); + } + for (NotificationActionType ea : ruleRef.getNotificationAction()) { + LazyRuleRefType2 rr = new LazyRuleRefType2(); + oid = ruleRef.getOID(); + if (currentActionNumber > 1) { + oid = ruleRef.getOID()+"_"+count; + } + rr.setOID(oid); + rr.getNotificationAction().add(ea); + count++; + listLazy.add(rr); + } + return listLazy; + } + + public List splitRuleDef(RuleDefType ruleDef, int size) { + List listRdt = new ArrayList(); + for (int i = 0; i < size; i++) { + RuleDefType rdt = new RuleDefType(); + String oid = ruleDef.getOID(); + if (size > 1) { + oid = ruleDef.getOID()+"_"+i; + } + rdt.setOID(oid); + rdt.setExpression(ruleDef.getExpression()); + rdt.setName(oid); + rdt.setDescription(oid); + listRdt.add(rdt); + } + return listRdt; } /** @@ -93,9 +197,23 @@ public Boolean willAnyActionFire(String ruleExpressionResult) { return true; } } + for (EventActionType eventActionType : eventAction) { + if (eventActionType.getIfExpressionEvaluates().equals(ruleExpressionResult)) { + return true; + } + } + for (NotificationActionType notificationActionType : notificationAction) { + if (notificationActionType.getIfExpressionEvaluates().equals(ruleExpressionResult)) { + return true; + } + } return false; } + private int countActions(RuleRefType ruleRef) { + return ruleRef.getDiscrepancyNoteAction().size() + ruleRef.getEmailAction().size() + ruleRef.getShowAction().size() + ruleRef.getHideAction().size() + ruleRef.getInsertAction().size() + ruleRef.getEventAction().size() + ruleRef.getNotificationAction().size(); + } + private void emailActionToLazyEmailAction(List emailAction) { Iterator emailActionsIterator = emailAction.iterator(); @@ -144,6 +262,25 @@ private void insertActionToLazyInsertAction(List insertAction) } } + private void eventActionToLazyEventAction(List eventAction) { + Iterator eventActionsIterator = eventAction.iterator(); + + while (eventActionsIterator.hasNext()) { + EventActionType eventActionType = eventActionsIterator.next(); + LazyEventActionType lazyEventActionType = new LazyEventActionType(eventActionType); + getLazyEventActions().add(lazyEventActionType); + } + } + + private void notificationActionToLazyNotificationAction(List notificationAction) { + Iterator notificationActionsIterator = notificationAction.iterator(); + + while (notificationActionsIterator.hasNext()) { + NotificationActionType notificationActionType = notificationActionsIterator.next(); + getLazyNotificationActions().add(notificationActionType); + } + } + private void reAlignEmailActions() { Iterator emailActionsIterator = getLazyEmailActions().iterator(); @@ -235,11 +372,47 @@ private void reAlignLazyInsertActions() { } } + private void reAlignLazyEventActions() { + Iterator lazyEventActionsIterator = getLazyEventActions().iterator(); + getEventAction().clear(); + + while (lazyEventActionsIterator.hasNext()) { + LazyEventActionType eventActionType = lazyEventActionsIterator.next(); + Iterator lazyEventDestinationTypeIterator = eventActionType.getLazyProperties().iterator(); + while (lazyEventDestinationTypeIterator.hasNext()) { + LazyEventDestinationType lazyEventDestinationType = lazyEventDestinationTypeIterator.next(); + if (lazyEventDestinationType.getPlaceHolder() == null) { + lazyEventDestinationTypeIterator.remove(); + } + } + if (eventActionType.getIfExpressionEvaluates() == null) { + lazyEventActionsIterator.remove(); + } else { + eventActionType.getEventDestination().clear(); + eventActionType.getEventDestination().addAll(eventActionType.getLazyProperties()); + getEventAction().add(eventActionType); + } + } + } + + private void reAlignNotificationActions() { + Iterator notificationActionsIterator = getLazyNotificationActions().iterator(); + + while (notificationActionsIterator.hasNext()) { + NotificationActionType notificationActionType = notificationActionsIterator.next(); + if (notificationActionType.getIfExpressionEvaluates() == null) { + notificationActionsIterator.remove(); + } + } + } + @Transient public void formToModel() { showAction.addAll(lazyShowActions); hideAction.addAll(lazyHideActions); insertAction.addAll(lazyInsertActions); + eventAction.addAll(lazyEventActions); + notificationAction.addAll(lazyNotificationActions); } public AutoPopulatingList getLazyDiscrepancyNoteActions() { @@ -282,6 +455,22 @@ public void setLazyInsertActions(AutoPopulatingList lazyIn this.lazyInsertActions = lazyInsertActions; } + public AutoPopulatingList getLazyEventActions() { + return lazyEventActions; + } + + public void setLazyEventActions(AutoPopulatingList lazyEventActions) { + this.lazyEventActions = lazyEventActions; + } + + public AutoPopulatingList getLazyNotificationActions() { + return lazyNotificationActions; + } + + public void setLazyNotificationActions(AutoPopulatingList lazyNotificationActions) { + this.lazyNotificationActions = lazyNotificationActions; + } + /* * private List lazyDiscrepancyNoteActions = LazyList.decorate(new * ArrayList(), FactoryUtils.instantiateFactory(DiscrepancyNoteActionType.class)); private diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/RuleBuilderController.java b/src/main/java/org/akaza/openclinica/designer/web/controller/RuleBuilderController.java index ce1b23c..df82646 100644 --- a/src/main/java/org/akaza/openclinica/designer/web/controller/RuleBuilderController.java +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/RuleBuilderController.java @@ -6,6 +6,8 @@ import org.openclinica.ns.response.v31.MessagesType; import org.openclinica.ns.response.v31.Response; import org.openclinica.ns.rules.v31.RuleAssignmentType; +import org.openclinica.ns.rules.v31.RuleDefType; +import org.openclinica.ns.rules.v31.RuleImportType; import org.openclinica.ns.rules.v31.Rules; import org.openclinica.ns.rules_test.v31.ParameterType; import org.openclinica.ns.rules_test.v31.RulesTest; @@ -42,6 +44,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import javax.validation.Valid; +import javax.xml.bind.JAXBElement; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; @@ -87,13 +90,14 @@ public static boolean isAjaxUploadRequest(HttpServletRequest request) { @RequestMapping(method = RequestMethod.GET) public String getCreateForm(Model model, HttpSession session, HttpServletRequest request) throws IOException { - final String ruleOid = request.getParameter("ruleOid"); final String target = request.getParameter("target"); + final String runTime = request.getParameter("runTime"); + final String message = request.getParameter("message"); if (ruleOid != null && target != null) { final UIODMContainer uiODMContainer = (UIODMContainer) session.getAttribute(SESSION_ATTR_UIODMCONTAINER); - session.setAttribute(SESSION_ATTR_FORM, uiODMContainer.getRuleCommandByRuleOidAndTarget(ruleOid, target)); + session.setAttribute(SESSION_ATTR_FORM, uiODMContainer.getRuleCommandByRuleOidAndTarget(ruleOid, target, runTime, message)); userPreferences.turnOnEditMode(); } return "ruleBuilder"; @@ -102,9 +106,7 @@ public String getCreateForm(Model model, HttpSession session, HttpServletRequest @RequestMapping(value = "/ruleBuilderFormA", method = RequestMethod.GET) public void form(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, HttpSession session, Model model, @RequestParam(value = PARAM_RESET, required = false) String resetParam) { - RulesCommand form = (RulesCommand) session.getAttribute(SESSION_ATTR_FORM) != null ? (RulesCommand) session.getAttribute(SESSION_ATTR_FORM) : null; - if (form == null || (resetParam != null && resetParam.equals("true"))) { form = new RulesCommand(); session.setAttribute(SESSION_ATTR_FORM, form); @@ -122,7 +124,6 @@ public void form(@RequestHeader(value = "X-Requested-With", required = false) St public @ResponseBody ArrayList processDesignTabToTest(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, @Valid RulesCommand form, BindingResult result, HttpSession session, Model model) throws IOException { - ArrayList messages = new ArrayList(); UIODMContainer uiODMContainer = (UIODMContainer) session.getAttribute(SESSION_ATTR_UIODMCONTAINER); // TODO: See if there is a way to move this to one place currently happens here and in Validator. @@ -181,7 +182,6 @@ String processDesignTabSubmit(@RequestHeader(value = "X-Requested-With", require @RequestMapping(value = "/ruleBuilderFormA", method = RequestMethod.POST) public String processSubmit(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, @Valid RulesCommand form, BindingResult result, HttpSession session, Model model) throws IOException { - logger.debug("Validating form ..."); ArrayList messages = new ArrayList(); UIODMContainer uiODMContainer = (UIODMContainer) session.getAttribute(SESSION_ATTR_UIODMCONTAINER); @@ -196,7 +196,6 @@ public String processSubmit(@RequestHeader(value = "X-Requested-With", required messages = validateRule(uiODMContainer, rulesCommandToRules(form), new DefaultResponseHandler(VALID_RULE_MESSAGE)); session.setAttribute(SESSION_ATTR_FORM, form); - // success response handling if (isAjaxRequest(requestedWith)) { model.addAttribute("messages", messages); @@ -246,7 +245,6 @@ public String saveRuleFromDesignerTab(@RequestHeader(value = "X-Requested-With", @RequestMapping(value = "/xmlForm", method = RequestMethod.GET) public void processSubmit(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, HttpSession session, Model model, @RequestParam(value = PARAM_RESET, required = false) String resetParam) throws IOException { - RulesCommand form = (RulesCommand) session.getAttribute(SESSION_ATTR_FORM); if (resetParam != null && resetParam.equals("true")) { form = new RulesCommand(); @@ -285,7 +283,6 @@ public void processSubmit(@RequestHeader(value = "X-Requested-With", required = @RequestMapping(value = "/xmlForm", method = RequestMethod.POST) public String processXmlFormSubmit(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, RulesCommand form, BindingResult result, HttpSession session, Model model, @RequestParam("ignoreDuplicates") Boolean ignoreDuplicates) throws IOException { - UIODMContainer uiODMContainer = (UIODMContainer) session.getAttribute(SESSION_ATTR_UIODMCONTAINER); ArrayList messages = new ArrayList(); @@ -399,12 +396,11 @@ ArrayList xmlTabSubmitToTestTab(@RequestHeader(value = "X-Requested-Wit ArrayList processXmlTabSubmit(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, RulesCommand form, BindingResult result, HttpSession session, Model model) throws IOException { ArrayList messages = new ArrayList(); - if (result.hasErrors()) { model.addAttribute("ajaxRequest", isAjaxRequest(requestedWith)); return messages; } - + Rules r = null; try { r = loadRulesFromString(form.getXml()); @@ -433,7 +429,6 @@ ArrayList processXmlTabSubmit(@RequestHeader(value = "X-Requested-With" @RequestMapping(value = "/testForm", method = RequestMethod.GET) public String testForm(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, HttpSession session, Model model) throws IOException { - ArrayList messages = new ArrayList(); RulesCommand form = (RulesCommand) session.getAttribute(SESSION_ATTR_FORM); form.getRuleRef().lazyToNonLazy(); @@ -455,7 +450,12 @@ public String testForm(@RequestHeader(value = "X-Requested-With", required = fal * session.setAttribute(SESSION_ATTR_TESTINPUTFIELDS, inputFields); */ - testRules(form, uiODMBuilder, new TestRulesGetResponseHandler()); + ArrayList responseHandlers = new ArrayList(); + responseHandlers.add(new TestRulesGetResponseHandler()); + responseHandlers.add(new TestRulesSubmitResponseHandler()); + + testRules(form, uiODMBuilder, responseHandlers); + form.populateTestWillActionsRun(); session.setAttribute(SESSION_ATTR_TESTINPUTFIELDS, form.getRulePropertiesHtml()); // success response handling @@ -476,6 +476,9 @@ public String testForm(@RequestHeader(value = "X-Requested-With", required = fal @RequestMapping(value = "/testForm", method = RequestMethod.POST) public String processTestSubmit(@RequestHeader(value = "X-Requested-With", required = false) String requestedWith, @Valid RulesCommand form, BindingResult result, HttpSession session, Model model) throws IOException { + ArrayList messages = new ArrayList(); + form.getRuleRef().lazyToNonLazy(); + form.setTestRulesResults(new HashMap()); UIODMContainer uiODMContainer = (UIODMContainer) session.getAttribute(SESSION_ATTR_UIODMCONTAINER); UIODMBuilder uiODMBuilder = new UIODMBuilder(uiODMContainer); @@ -492,10 +495,11 @@ public String processTestSubmit(@RequestHeader(value = "X-Requested-With", requi return null; } - form.getRuleRef().lazyToNonLazy(); - ArrayList messages = new ArrayList(); + ArrayList responseHandlers = new ArrayList(); + responseHandlers.add(new TestRulesGetResponseHandler()); + responseHandlers.add(new TestRulesSubmitResponseHandler()); - testRules(form, uiODMBuilder, new TestRulesSubmitResponseHandler()); + testRules(form, uiODMBuilder, responseHandlers); form.populateTestWillActionsRun(); session.setAttribute(SESSION_ATTR_FORM, form); @@ -515,13 +519,15 @@ private Message createRestExceptionMessage(Exception e) { return new Message(MessageType.error, "Could not submit to OC instance because :: " + message); } - private void testRules(RulesCommand form, UIODMBuilder uiODMBuilder, TestRulesResponseHandler responseHandler) { + private void testRules(RulesCommand form, UIODMBuilder uiODMBuilder, ArrayList responseHandlers) { ArrayList messages = new ArrayList(); RulesTest resp = null; try { resp = userPreferences.getRestTemplate().postForObject(userPreferences.getValidateAndTestRuleURL(), createRulesTestFromCommand(form), RulesTest.class); - responseHandler.handle(form, resp, uiODMBuilder); + for (TestRulesResponseHandler responseHandler : responseHandlers) { + responseHandler.handle(form, resp, uiODMBuilder); + } return; } catch (Exception e) { messages.add(createRestExceptionMessage(e)); @@ -534,7 +540,7 @@ private ArrayList callREST(UIODMContainer uiODMContainer, Rules rule, R Map vars = Collections.singletonMap("study", uiODMContainer.getStudyOid()); Response resp = null; try { - resp = userPreferences.getRestTemplate().postForObject(url, rule, Response.class, vars); + resp = userPreferences.getRestTemplate().postForObject(url, rule, Response.class, vars); if (resp.isValid()) { messages.addAll(responseHandler.handle()); } else { @@ -567,17 +573,24 @@ private ArrayList saveRule(UIODMContainer uiODMContainer, Rules rule, R * Convert RulesCommand to Rules Object */ private Rules rulesCommandToRules(RulesCommand form) { - form.getRuleRef().lazyToNonLazy(); + RulesCommand rc = new RulesCommand(form); + rc.getRuleRef().setOID(form.getRuleDef().getOID()); + LazyRuleRefType2 lzRuleRef = new LazyRuleRefType2(); + List listLzRuleRef = lzRuleRef.splitRuleRef(rc.getRuleRef()); RuleAssignmentType ra = new RuleAssignmentType(); form.getTarget().setValue(form.getTarget().getValue() == null ? "" : form.getTarget().getValue().trim()); ra.setTarget(form.getTargetCurated(form.getTarget())); - ra.getRuleRef().add(form.getRuleRef()); - ra.getRuleRef().get(0).setOID(form.getRuleDef().getOID()); + if (form.getRunOnSchedule() != null && !form.getRunOnSchedule().getTime().equals("")) { + ra.setRunOnSchedule(form.getRunOnSchedule()); + } Rules r = new Rules(); + for (LazyRuleRefType2 lrr : listLzRuleRef) { + ra.getRuleRef().add(lrr); + } r.getRuleAssignment().add(ra); - r.getRuleDef().add(form.getRuleDefCurated()); - r.getRuleDef().get(0).setName(r.getRuleDef().get(0).getOID()); - r.getRuleDef().get(0).setDescription(r.getRuleDef().get(0).getOID()); + for(RuleDefType rdt : lzRuleRef.splitRuleDef(form.getRuleDefCurated(), listLzRuleRef.size())) { + r.getRuleDef().add(rdt); + } return r; } @@ -604,11 +617,12 @@ private RulesTest createRulesTestFromCommand(RulesCommand form) { * Convert XML which is represented as a String to Rules Object */ private Rules loadRulesFromString(String rulesString) throws UnMarshallingException { - StringReader reader = new StringReader(rulesString); Rules rules = null; try { - rules = (Rules) this.unMarshaller.unmarshal(new StreamSource(reader)); + // rules = (Rules) this.unMarshaller.unmarshal(new StreamSource(reader)); + JAXBElement root = (JAXBElement) this.unMarshaller.unmarshal(new StreamSource(reader)); + rules = (Rules) root.getValue(); } catch (FileNotFoundException e) { throw new UnMarshallingException(); // TODO Auto-generated catch block diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/RulesCommand.java b/src/main/java/org/akaza/openclinica/designer/web/controller/RulesCommand.java index 6267297..08dacd7 100644 --- a/src/main/java/org/akaza/openclinica/designer/web/controller/RulesCommand.java +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/RulesCommand.java @@ -4,6 +4,7 @@ import org.jsoup.Jsoup; import org.openclinica.ns.rules.v31.RuleDefType; import org.openclinica.ns.rules.v31.RuleRefType; +import org.openclinica.ns.rules.v31.RunOnScheduleType; import org.openclinica.ns.rules.v31.TargetType; import java.util.ArrayList; @@ -17,6 +18,7 @@ public class RulesCommand { TargetType target; RuleDefType ruleDef; List addActions = new ArrayList(); + RunOnScheduleType runOnSchedule; // XML tab String xml; // Test tab @@ -31,6 +33,17 @@ public RulesCommand() { ruleDef = new RuleDefType(); } + public RulesCommand(RulesCommand rule) { + ruleRef = rule.getRuleRef(); + target = rule.getTarget(); + addActions = rule.getAddActions(); + xml = rule.getXml(); + rulePropertiesHtml = rule.getRulePropertiesHtml(); + ruleProperties = rule.getRuleProperties(); + testRulesResults = rule.getTestRulesResults(); + testWillActionsRun = rule.getTestWillActionsRun(); + } + public LazyRuleRefType2 getRuleRef() { return ruleRef; } @@ -67,6 +80,14 @@ public TargetType getTargetCurated() { return getTargetCurated(this.target); } + public void setRunOnSchedule(RunOnScheduleType runOnSchedule) { + this.runOnSchedule = runOnSchedule; + } + + public RunOnScheduleType getRunOnSchedule() { + return runOnSchedule; + } + public TargetType getTargetCurated(TargetType htmlBasedTarget) { // To avoid receiving org.codehaus.jackson.map.JsonMappingException when command object is JSONd if (htmlBasedTarget == null) { @@ -98,11 +119,16 @@ public RuleDefType getRuleDefCurated() { return ruleDef; } - public void buildFromRules(TargetType target, RuleDefType ruleDef, RuleRefType ruleRef) { + public void buildFromRules(TargetType target, RuleDefType ruleDef, RuleRefType ruleRef, String runTime) { this.setTarget(target); this.setRuleDef(ruleDef); LazyRuleRefType2 ruleRefType = new LazyRuleRefType2(ruleRef); this.setRuleRef(ruleRefType); + if (runTime != null) { + RunOnScheduleType runOnScheduleType = new RunOnScheduleType(); + runOnScheduleType.setTime(runTime); + this.setRunOnSchedule(runOnScheduleType); + } } public List getRulePropertiesHtml() { diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/RulesCommandValidator.java b/src/main/java/org/akaza/openclinica/designer/web/controller/RulesCommandValidator.java index a5f4578..562e3d1 100644 --- a/src/main/java/org/akaza/openclinica/designer/web/controller/RulesCommandValidator.java +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/RulesCommandValidator.java @@ -1,5 +1,6 @@ package org.akaza.openclinica.designer.web.controller; +import org.apache.commons.validator.routines.EmailValidator; import org.openclinica.ns.rules.v31.DiscrepancyNoteActionType; import org.openclinica.ns.rules.v31.EmailActionType; import org.openclinica.ns.rules.v31.HideActionType; @@ -7,7 +8,9 @@ import org.openclinica.ns.rules.v31.PropertyType; import org.openclinica.ns.rules.v31.RuleDefType; import org.openclinica.ns.rules.v31.ShowActionType; +import org.openclinica.ns.rules.v31.EventActionType; import org.openclinica.ns.rules.v31.TargetType; +import org.openclinica.ns.rules.v31.NotificationActionType; import org.springframework.validation.Errors; import org.springframework.validation.ValidationUtils; import org.springframework.validation.Validator; @@ -45,7 +48,7 @@ public void validate(Object obj, Errors e) { LazyRuleRefType2 action = p.getRuleRef(); // At least one action has to be selected if (action.getLazyDiscrepancyNoteActions().isEmpty() && action.getLazyEmailActions().isEmpty() && action.getLazyHideActions().isEmpty() - && action.getLazyInsertActions().isEmpty() && action.getLazyShowActions().isEmpty()) { + && action.getLazyInsertActions().isEmpty() && action.getLazyShowActions().isEmpty() && action.getLazyEventActions().isEmpty() && action.getLazyNotificationActions().isEmpty()) { e.rejectValue("addActions", "add.action"); } @@ -59,7 +62,8 @@ public void validate(Object obj, Errors e) { validateHideAction(action, e); // Insert action validation validateInsertAction(action, e); - + // Notification action validation + validateNotificationAction(action, e); } private void validateDiscrepancyNoteAction(LazyRuleRefType2 action, Errors e) { @@ -79,17 +83,15 @@ private void validateEmailAction(LazyRuleRefType2 action, Errors e) { if (emailAction.getTo() == null || emailAction.getTo().trim().length() == 0) { e.rejectValue("ruleRef.lazyEmailActions[" + action.getEmailAction().indexOf(emailAction) + "].to", "email.to.empty"); } else { - Pattern pattern = Pattern.compile("^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"); + EmailValidator validator = EmailValidator.getInstance(); StringTokenizer tokenizer = new StringTokenizer(emailAction.getTo(), ","); if (tokenizer.countTokens() == 0) { - Matcher matcher = pattern.matcher(emailAction.getTo()); - if (!matcher.matches()) { + if (!validator.isValid(emailAction.getTo())) { e.rejectValue("ruleRef.lazyEmailActions[" + action.getEmailAction().indexOf(emailAction) + "].to", "email.to.not.valid"); } } else { while (tokenizer.hasMoreTokens()) { - Matcher matcher = pattern.matcher(tokenizer.nextToken().trim()); - if (!matcher.matches()) { + if (!validator.isValid(tokenizer.nextToken().trim())) { e.rejectValue("ruleRef.lazyEmailActions[" + action.getEmailAction().indexOf(emailAction) + "].to", "email.to.not.valid"); break; } @@ -165,4 +167,40 @@ private void validateInsertAction(LazyRuleRefType2 action, Errors e) { } } + private void validateNotificationAction(LazyRuleRefType2 action, Errors e) { + if (!action.getLazyNotificationActions().isEmpty()) { + for (NotificationActionType notificationAction : action.getNotificationAction()) { + if (notificationAction.getTo() == null || notificationAction.getTo().trim().length() == 0) { + e.rejectValue("ruleRef.lazyNotificationActions[" + action.getNotificationAction().indexOf(notificationAction) + "].to", "email.to.empty"); + } else { + Pattern pattern = Pattern.compile("^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"); + StringTokenizer tokenizer = new StringTokenizer(notificationAction.getTo(), ","); + if (tokenizer.countTokens() == 0) { + Matcher matcher = pattern.matcher(notificationAction.getTo()); + if (!matcher.matches()) { + e.rejectValue("ruleRef.lazyNotificationActions[" + action.getNotificationAction().indexOf(notificationAction) + "].to", "email.to.not.valid"); + } + } else { + while (tokenizer.hasMoreTokens()) { + String stringToken = tokenizer.nextToken().trim(); + if (!stringToken.equals("${participant}")) { + Matcher matcher = pattern.matcher(stringToken.trim()); + if (!matcher.matches()) { + e.rejectValue("ruleRef.lazyNotificationActions[" + action.getNotificationAction().indexOf(notificationAction) + "].to", "email.to.not.valid"); + break; + } + } + } + } + } + if (notificationAction.getSubject() == null || notificationAction.getSubject().trim().length() == 0) { + e.rejectValue("ruleRef.lazyNotificationActions[" + action.getNotificationAction().indexOf(notificationAction) + "].subject", "email.subject.empty"); + } + if (notificationAction.getMessage() == null || notificationAction.getMessage().trim().length() == 0) { + e.rejectValue("ruleRef.lazyNotificationActions[" + action.getNotificationAction().indexOf(notificationAction) + "].message", "error.empty"); + } + } + } + } + } diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/TestRulesGetResponseHandler.java b/src/main/java/org/akaza/openclinica/designer/web/controller/TestRulesGetResponseHandler.java index 0f15c63..d18ca7d 100644 --- a/src/main/java/org/akaza/openclinica/designer/web/controller/TestRulesGetResponseHandler.java +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/TestRulesGetResponseHandler.java @@ -2,8 +2,10 @@ import org.akaza.openclinica.designer.web.fields.InputField; import org.akaza.openclinica.designer.web.fields.InputFieldFactory; +import org.akaza.openclinica.designer.web.fields.validators.FieldValidator; import org.openclinica.ns.rules_test.v31.ParameterType; import org.openclinica.ns.rules_test.v31.RulesTest; +import org.cdisc.ns.odm.v130.ODMcomplexTypeDefinitionStudyEventDef; import java.util.ArrayList; import java.util.List; @@ -16,9 +18,24 @@ public void handle(RulesCommand form, RulesTest response, UIODMBuilder uiODMBuil for (ParameterType parameterType : response.getParameters()) { if (!parameterType.getKey().equals("result") && !parameterType.getKey().equals("ruleEvaluatesTo") && !parameterType.getKey().equals("ruleValidation")) { - UIItemDetail itemDetail = uiODMBuilder.buildItemDetail(parameterType.getKey()); - form.getRuleProperties().put(parameterType.getKey(), parameterType.getValue()); - inputFields.add(InputFieldFactory.createInputField("ruleProperties['" + parameterType.getKey() + "']", parameterType.getKey(), itemDetail)); + UIEntityDetail itemDetail = uiODMBuilder.buildItemDetail(parameterType.getKey()); + if (itemDetail.getClass() == UIItemDetail.class) { + form.getRuleProperties().put(parameterType.getKey(), parameterType.getValue()); + inputFields.add(InputFieldFactory.createInputField("ruleProperties['" + parameterType.getKey() + "']", parameterType.getKey(), itemDetail)); + } else { + // parameterType.getKey() == SE_REGISTRATIONVISIT.STARTDATE + String[] oidSplitter = parameterType.getKey().split("\\."); + ODMcomplexTypeDefinitionStudyEventDef studyEventDef = uiODMBuilder.getStudyEventDefByStudyEventOID(oidSplitter[0]); + if (studyEventDef != null) { + if (oidSplitter[1].equals("STATUS")) { + } else if (oidSplitter[1].equals("STARTDATE")) { + inputFields.add(InputFieldFactory.createInputField(InputField.Type.TEXT, InputField.DataType.DATE, "ruleProperties['" + parameterType.getKey() + "']", parameterType.getKey(), FieldValidator.DATE_VALIDATOR)); + } else { + // SOMETHING ELSE IS GOING ON HERE THROW AN ERROR ??? + } + } + } + } } diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/TreeController.java b/src/main/java/org/akaza/openclinica/designer/web/controller/TreeController.java index 7bae06e..6474e57 100644 --- a/src/main/java/org/akaza/openclinica/designer/web/controller/TreeController.java +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/TreeController.java @@ -49,13 +49,18 @@ public static boolean isAjaxUploadRequest(HttpServletRequest request) { @RequestMapping(value = "/itemDetails", method = RequestMethod.GET) public @ResponseBody - UIItemDetail getItemDetails(@RequestParam String name, HttpSession session) throws IOException { + UIEntityDetail getItemDetails(@RequestParam String name, HttpSession session) throws IOException { UIODMContainer uiODMContainer = (UIODMContainer) session.getAttribute("uiODMContainer"); UIODMBuilder uiODMBuilder = new UIODMBuilder(uiODMContainer); - UIItemDetail itemDetail = uiODMBuilder.buildItemDetail(name); + UIEntityDetail itemDetail = uiODMBuilder.buildItemDetail(name); - return itemDetail; + if (name.lastIndexOf('.') != -1) { + return (UIEventItemDetail) itemDetail; + } else { + return (UIItemDetail) itemDetail; + } + } @RequestMapping(value = "/eventsList", method = RequestMethod.GET) @@ -97,7 +102,7 @@ private List getEventsList(UIODMContainer uiODMContainer, @RequestMapping(value = "/eventCrfsList", method = RequestMethod.GET) public @ResponseBody - List eventsCrfsList(@RequestParam String eventOid, HttpSession session) throws IOException { + List eventsCrfsList(@RequestParam String eventOid, HttpSession session) throws IOException { UIODMContainer uiODMContainer = (UIODMContainer) session.getAttribute("uiODMContainer"); return getEventCrfs(uiODMContainer, eventOid, false); @@ -105,14 +110,34 @@ List eventsCrfsList(@RequestParam String eventOid, HttpSession sessio @RequestMapping(value = "/eventCrfsListOid", method = RequestMethod.GET) public @ResponseBody - List eventsCrfsListOid(@RequestParam String eventOid, HttpSession session) throws IOException { + List eventsCrfsListOid(@RequestParam String eventOid, HttpSession session) throws IOException { UIODMContainer uiODMContainer = (UIODMContainer) session.getAttribute("uiODMContainer"); return getEventCrfs(uiODMContainer, eventOid, true); } - private List getEventCrfs(UIODMContainer uiODMContainer, String eventOid, Boolean useOid) { - List crfs = new ArrayList(); + private List getEventCrfs(UIODMContainer uiODMContainer, String eventOid, Boolean useOid) { + + List crfs = new ArrayList(); + + // Event Start Date + TreeModelLeaf startDate = new TreeModelLeaf(useOid ? "STARTDATE" : "Start Date", "closed", "item", "E_", eventOid + ".STARTDATE"); + startDate.setName("Start Date"); + startDate.setOid(eventOid + ".STARTDATE"); + startDate.addAttr("oid", eventOid + ".STARTDATE"); + startDate.addAttr("eventOid", eventOid); + startDate.getData().setIcon("item"); + crfs.add(startDate); + + // Event Status + TreeModelLeaf eventStatus = new TreeModelLeaf(useOid ? "STATUS" : "Status", "closed", "item", "E_", eventOid + ".STATUS"); + eventStatus.setName("Status"); + eventStatus.setOid(eventOid + ".STATUS"); + eventStatus.addAttr("oid", eventOid + ".STATUS"); + eventStatus.addAttr("eventOid", eventOid); + eventStatus.getData().setIcon("item"); + crfs.add(eventStatus); + UIEvent uiEvent = uiODMContainer.getEventsByOID(eventOid); for (UICrf uiCrf : uiEvent.getCrfs()) { @@ -127,6 +152,7 @@ private List getEventCrfs(UIODMContainer uiODMContainer, String event crfs.add(newCrf); } + return crfs; } diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/UIEntityDetail.java b/src/main/java/org/akaza/openclinica/designer/web/controller/UIEntityDetail.java new file mode 100644 index 0000000..ca71cc6 --- /dev/null +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/UIEntityDetail.java @@ -0,0 +1,32 @@ +package org.akaza.openclinica.designer.web.controller; + +public class UIEntityDetail { + String itemName; + String oid; + String dataType; + + public String getItemName() { + return itemName; + } + + public void setItemName(String itemName) { + this.itemName = itemName; + } + + public String getOid() { + return oid; + } + + public void setOid(String oid) { + this.oid = oid; + } + + public String getDataType() { + return dataType; + } + + public void setDataType(String dataType) { + this.dataType = dataType; + } + +} diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/UIEventItemDetail.java b/src/main/java/org/akaza/openclinica/designer/web/controller/UIEventItemDetail.java new file mode 100644 index 0000000..bbf7856 --- /dev/null +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/UIEventItemDetail.java @@ -0,0 +1,52 @@ +package org.akaza.openclinica.designer.web.controller; + +import java.util.Map; + +public class UIEventItemDetail extends UIEntityDetail { + String eventName; + String eventOid; + String eventRepeating; + String responseLabel; + Map responseOptions; + + public String getEventName() { + return eventName; + } + + public void setEventName(String eventName) { + this.eventName = eventName; + } + + public String getEventOid() { + return eventOid; + } + + public void setEventOid(String eventOid) { + this.eventOid = eventOid; + } + + public String getEventRepeating() { + return eventRepeating; + } + + public void setEventRepeating(String eventRepeating) { + this.eventRepeating = eventRepeating; + } + + public String getResponseLabel() { + return responseLabel; + } + + public void setResponseLabel(String responseLabel) { + this.responseLabel = responseLabel; + } + + public Map getResponseOptions() { + return responseOptions; + } + + public void setResponseOptions(Map responseOptions) { + this.responseOptions = responseOptions; + } + +} diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/UIItemDetail.java b/src/main/java/org/akaza/openclinica/designer/web/controller/UIItemDetail.java index ea6ccd6..c110ae3 100644 --- a/src/main/java/org/akaza/openclinica/designer/web/controller/UIItemDetail.java +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/UIItemDetail.java @@ -8,12 +8,9 @@ import java.util.List; import java.util.Map; -public class UIItemDetail { +public class UIItemDetail extends UIEntityDetail { String crfName; - String itemName; - String oid; String description; - String dataType; String units; String phi; List itemDetailsPerCrfVersion; @@ -26,22 +23,6 @@ public void setCrfName(String crfName) { this.crfName = crfName; } - public String getItemName() { - return itemName; - } - - public void setItemName(String itemName) { - this.itemName = itemName; - } - - public String getOid() { - return oid; - } - - public void setOid(String oid) { - this.oid = oid; - } - public String getDescription() { return description; } @@ -50,14 +31,6 @@ public void setDescription(String description) { this.description = description; } - public String getDataType() { - return dataType; - } - - public void setDataType(String dataType) { - this.dataType = dataType; - } - public String getUnits() { return units; } diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/UIODMBuilder.java b/src/main/java/org/akaza/openclinica/designer/web/controller/UIODMBuilder.java index 1f85858..3957ffe 100644 --- a/src/main/java/org/akaza/openclinica/designer/web/controller/UIODMBuilder.java +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/UIODMBuilder.java @@ -21,7 +21,9 @@ import com.google.common.collect.Collections2; import java.util.ArrayList; +import java.util.LinkedHashMap; import java.util.List; +import java.util.Map; public class UIODMBuilder { @@ -84,75 +86,117 @@ private String oidCleaner(String oid) { return oid; } - UIItemDetail buildItemDetail(String oid) { - final UIItemDetail itemDetail = new UIItemDetail(); - ODMcomplexTypeDefinitionItemDef itemDef = getItemDefFromItemOid(oidCleaner(oid)); - itemDetail.setItemName(itemDef.getName()); - itemDetail.setOid(itemDef.getOID()); - itemDetail.setDescription(itemDef.getComment() == null ? "" : itemDef.getComment()); - itemDetail.setDataType(itemDef.getDataType().name()); - String validation = ""; - String validationErrorMessage = ""; - ODMcomplexTypeDefinitionCodeList codeList = new ODMcomplexTypeDefinitionCodeList(); - if (itemDef.getCodeListRef() != null) { - codeList = getCodeListDefFromCodeListOID(itemDef.getCodeListRef().getCodeListOID()); - } - OCodmComplexTypeDefinitionMultiSelectList multiSelectList = new OCodmComplexTypeDefinitionMultiSelectList(); - for (OCodmComplexTypeDefinitionMultiSelectListRef multiSelectRef : this.container.getMultiSelectRefFromItemDef(itemDef)) { - multiSelectList = getMultiSelectListDefFromMultiSelectOID(multiSelectRef.getMultiSelectListID()); - } - if (itemDef.getRangeCheck() != null) { - for (ODMcomplexTypeDefinitionRangeCheck rangeCheck : itemDef.getRangeCheck()) { - if (rangeCheck.getCheckValue() != null) { - for (ODMcomplexTypeDefinitionCheckValue checkValue : rangeCheck.getCheckValue()) { - validation += checkValue.getValue() + "
"; + UIEntityDetail buildItemDetail(String oid) { + + if (oid.lastIndexOf('.') != -1) { + + UIEventItemDetail itemDetail = new UIEventItemDetail(); + + String seOid = oid.substring(0, oid.lastIndexOf('.')); + ODMcomplexTypeDefinitionStudyEventDef seDef = getStudyEventDefByStudyEventOID(seOid); + + itemDetail.setEventName(seDef.getName()); + itemDetail.setEventOid(seDef.getOID()); + itemDetail.setEventRepeating(seDef.getRepeating().value()); + + itemDetail.setItemName(oidCleaner(oid)); + itemDetail.setOid(oid); + + if (oidCleaner(oid).equals("STARTDATE")) { + itemDetail.setDataType("DATE"); + itemDetail.setResponseLabel("Start Date"); + } else if (oidCleaner(oid).equals("STATUS")) { + itemDetail.setDataType("STRING"); + itemDetail.setResponseLabel("Event Status"); + + Map responseOptions = new LinkedHashMap(); + responseOptions.put("Not Scheduled", "not_scheduled"); + responseOptions.put("Scheduled", "scheduled"); + responseOptions.put("Data Entry Started", "data_entry_started"); + responseOptions.put("Completed", "completed"); + responseOptions.put("Signed", "signed"); + responseOptions.put("Skipped", "skipped"); + responseOptions.put("Stopped", "stopped"); + responseOptions.put("Locked", "locked"); + + itemDetail.setResponseOptions(responseOptions); + } + + return itemDetail; + + } else { + + UIItemDetail itemDetail = new UIItemDetail(); + ODMcomplexTypeDefinitionItemDef itemDef = getItemDefFromItemOid(oidCleaner(oid)); + itemDetail.setItemName(itemDef.getName()); + itemDetail.setOid(itemDef.getOID()); + itemDetail.setDescription(itemDef.getComment() == null ? "" : itemDef.getComment()); + itemDetail.setDataType(itemDef.getDataType().name()); + String validation = ""; + String validationErrorMessage = ""; + ODMcomplexTypeDefinitionCodeList codeList = new ODMcomplexTypeDefinitionCodeList(); + if (itemDef.getCodeListRef() != null) { + codeList = getCodeListDefFromCodeListOID(itemDef.getCodeListRef().getCodeListOID()); + } + OCodmComplexTypeDefinitionMultiSelectList multiSelectList = new OCodmComplexTypeDefinitionMultiSelectList(); + for (OCodmComplexTypeDefinitionMultiSelectListRef multiSelectRef : this.container.getMultiSelectRefFromItemDef(itemDef)) { + multiSelectList = getMultiSelectListDefFromMultiSelectOID(multiSelectRef.getMultiSelectListID()); + } + if (itemDef.getRangeCheck() != null) { + for (ODMcomplexTypeDefinitionRangeCheck rangeCheck : itemDef.getRangeCheck()) { + if (rangeCheck.getCheckValue() != null) { + for (ODMcomplexTypeDefinitionCheckValue checkValue : rangeCheck.getCheckValue()) { + validation += checkValue.getValue() + "
"; + } } - } - if (rangeCheck.getErrorMessage() != null) { - for (ODMcomplexTypeDefinitionTranslatedText errorMessage : rangeCheck.getErrorMessage().getTranslatedText()) { - validationErrorMessage += errorMessage.getValue() + "
"; + if (rangeCheck.getErrorMessage() != null) { + for (ODMcomplexTypeDefinitionTranslatedText errorMessage : rangeCheck.getErrorMessage().getTranslatedText()) { + validationErrorMessage += errorMessage.getValue() + "
"; + } } } } - } - itemDetail.setUnits(""); - // List itemGroupDefs = getItemGroupByItemOID(itemDef.getOID(), - // getItemGroupDefs()); - for (OCodmComplexTypeDefinitionItemPresentInForm itemPresentInForm : this.container.getItemDetailsFromItemDef(itemDef).getItemPresentInForm()) { - ODMcomplexTypeDefinitionFormDef formDef = getFormDefFromFormOid(itemPresentInForm.getFormOID()); - UIItemDetailPerCrfVersion uiItemDetailPerCrfVersion = new UIItemDetailPerCrfVersion(); - itemDetail.getItemDetailsPerCrfVersion().add(uiItemDetailPerCrfVersion); - itemDetail.setCrfName(crfNameFromFormDefName(formDef.getName())); - uiItemDetailPerCrfVersion.setLeftItemText(itemPresentInForm.getLeftItemText()); - uiItemDetailPerCrfVersion.setRightItemText(itemPresentInForm.getRightItemText() == null ? "" : itemPresentInForm.getRightItemText()); - uiItemDetailPerCrfVersion.setDefaultValue(itemPresentInForm.getDefaultValue() == null ? "" : itemPresentInForm.getDefaultValue()); - uiItemDetailPerCrfVersion.setResponseLayout(itemPresentInForm.getItemResponse().getResponseLayout() == null ? "" : itemPresentInForm - .getItemResponse().getResponseLayout()); - uiItemDetailPerCrfVersion.setResponseType(itemPresentInForm.getItemResponse().getResponseType()); - uiItemDetailPerCrfVersion.setResponseLabel(itemPresentInForm.getItemResponse().getResponseType()); - uiItemDetailPerCrfVersion.setSectionLabel(itemPresentInForm.getSectionLabel()); - uiItemDetailPerCrfVersion.setPhi(itemPresentInForm.getPHI()); - uiItemDetailPerCrfVersion.setCodeList(codeList); - uiItemDetailPerCrfVersion.setMultiSelectList(multiSelectList); - uiItemDetailPerCrfVersion.setValidation(validation); - uiItemDetailPerCrfVersion.setValidationErrorMessage(validationErrorMessage); - uiItemDetailPerCrfVersion.setRequired(""); - - // Get the group by using the form and then searching for the item. Is there a better way ? - for (ODMcomplexTypeDefinitionItemGroupRef itemGroupRef : formDef.getItemGroupRef()) { - uiItemDetailPerCrfVersion.setCrfVersionName(formDef.getName()); - ODMcomplexTypeDefinitionItemGroupDef itemGroupDef = getItemGroupDefFromItemGroupRef(itemGroupRef); - for (ODMcomplexTypeDefinitionItemRef itemRef : itemGroupDef.getItemRef()) { - if (itemRef.getItemOID().equals(itemDef.getOID())) { - uiItemDetailPerCrfVersion.setGroupName(itemGroupDef.getName()); - uiItemDetailPerCrfVersion.setRequired(itemRef.getMandatory().value()); - break; + itemDetail.setUnits(""); + // List itemGroupDefs = getItemGroupByItemOID(itemDef.getOID(), + // getItemGroupDefs()); + for (OCodmComplexTypeDefinitionItemPresentInForm itemPresentInForm : this.container.getItemDetailsFromItemDef(itemDef).getItemPresentInForm()) { + ODMcomplexTypeDefinitionFormDef formDef = getFormDefFromFormOid(itemPresentInForm.getFormOID()); + UIItemDetailPerCrfVersion uiItemDetailPerCrfVersion = new UIItemDetailPerCrfVersion(); + itemDetail.getItemDetailsPerCrfVersion().add(uiItemDetailPerCrfVersion); + itemDetail.setCrfName(crfNameFromFormDefName(formDef.getName())); + uiItemDetailPerCrfVersion.setLeftItemText(itemPresentInForm.getLeftItemText()); + uiItemDetailPerCrfVersion.setRightItemText(itemPresentInForm.getRightItemText() == null ? "" : itemPresentInForm.getRightItemText()); + uiItemDetailPerCrfVersion.setDefaultValue(itemPresentInForm.getDefaultValue() == null ? "" : itemPresentInForm.getDefaultValue()); + uiItemDetailPerCrfVersion.setResponseLayout(itemPresentInForm.getItemResponse().getResponseLayout() == null ? "" : itemPresentInForm + .getItemResponse().getResponseLayout()); + uiItemDetailPerCrfVersion.setResponseType(itemPresentInForm.getItemResponse().getResponseType()); + uiItemDetailPerCrfVersion.setResponseLabel(itemPresentInForm.getItemResponse().getResponseType()); + uiItemDetailPerCrfVersion.setSectionLabel(itemPresentInForm.getSectionLabel()); + uiItemDetailPerCrfVersion.setPhi(itemPresentInForm.getPHI()); + uiItemDetailPerCrfVersion.setCodeList(codeList); + uiItemDetailPerCrfVersion.setMultiSelectList(multiSelectList); + uiItemDetailPerCrfVersion.setValidation(validation); + uiItemDetailPerCrfVersion.setValidationErrorMessage(validationErrorMessage); + uiItemDetailPerCrfVersion.setRequired(""); + + // Get the group by using the form and then searching for the item. Is there a better way ? + for (ODMcomplexTypeDefinitionItemGroupRef itemGroupRef : formDef.getItemGroupRef()) { + uiItemDetailPerCrfVersion.setCrfVersionName(formDef.getName()); + ODMcomplexTypeDefinitionItemGroupDef itemGroupDef = getItemGroupDefFromItemGroupRef(itemGroupRef); + for (ODMcomplexTypeDefinitionItemRef itemRef : itemGroupDef.getItemRef()) { + if (itemRef.getItemOID().equals(itemDef.getOID())) { + uiItemDetailPerCrfVersion.setGroupName(itemGroupDef.getName()); + uiItemDetailPerCrfVersion.setRequired(itemRef.getMandatory().value()); + break; + } } } } + + return itemDetail; + } - return itemDetail; } @@ -340,6 +384,22 @@ public boolean apply(ODMcomplexTypeDefinitionStudyEventDef eventDef) { }; } + public ODMcomplexTypeDefinitionStudyEventDef getStudyEventDefByStudyEventOID(String oid) { + List eventDefs = new ArrayList(); + eventDefs.addAll(Collections2.filter(getStudyEventDefs(), studyEventOidEqualTo(oid))); + return eventDefs.size() > 0 ? eventDefs.get(0) : null; + + } + + private Predicate studyEventOidEqualTo(final String value) { + return new Predicate() { + @Override + public boolean apply(ODMcomplexTypeDefinitionStudyEventDef eventDef) { + return eventDef.getOID().equals(value); + } + }; + } + public UICrf getCrfByCrfVersionOID(String oid, List crfs) { List localCrfs = new ArrayList(); localCrfs.addAll(Collections2.filter(crfs, crfVersionOidEqualTo(oid))); diff --git a/src/main/java/org/akaza/openclinica/designer/web/controller/UIODMContainer.java b/src/main/java/org/akaza/openclinica/designer/web/controller/UIODMContainer.java index 76aa0c6..0f5224c 100644 --- a/src/main/java/org/akaza/openclinica/designer/web/controller/UIODMContainer.java +++ b/src/main/java/org/akaza/openclinica/designer/web/controller/UIODMContainer.java @@ -107,17 +107,24 @@ private Rules getRules() { return null; } - public RulesCommand getRuleCommandByRuleOidAndTarget(String ruleOid, String target) { + public RulesCommand getRuleCommandByRuleOidAndTarget(String ruleOid, String target, String runTime, String message) { Rules rules = getRules(); - for (RuleAssignmentType ruleAssignment : rules.getRuleAssignment()) { if (ruleAssignment.getTarget().getValue().equals(target)) { for (RuleRefType ruleRef : ruleAssignment.getRuleRef()) { if (ruleRef.getOID().equals(ruleOid)) { + if (message != null) { + if (ruleRef.getNotificationAction().size() > 0) { + ruleRef.getNotificationAction().get(0).setMessage(message); + } + if (ruleRef.getEmailAction().size() > 0) { + ruleRef.getEmailAction().get(0).setMessage(message); + } + } RuleDefType ruleDef = getRuleDefByOid(ruleRef.getOID(), rules.getRuleDef()); if (ruleDef != null) { RulesCommand rc = new RulesCommand(); - rc.buildFromRules(ruleAssignment.getTarget(), ruleDef, ruleRef); + rc.buildFromRules(ruleAssignment.getTarget(), ruleDef, ruleRef, runTime); return rc; } else { return null; diff --git a/src/main/java/org/akaza/openclinica/designer/web/fields/InputFieldFactory.java b/src/main/java/org/akaza/openclinica/designer/web/fields/InputFieldFactory.java index 5ade922..5c57021 100644 --- a/src/main/java/org/akaza/openclinica/designer/web/fields/InputFieldFactory.java +++ b/src/main/java/org/akaza/openclinica/designer/web/fields/InputFieldFactory.java @@ -1,5 +1,6 @@ package org.akaza.openclinica.designer.web.fields; +import org.akaza.openclinica.designer.web.controller.UIEntityDetail; import org.akaza.openclinica.designer.web.controller.UIItemDetail; import org.akaza.openclinica.designer.web.fields.InputField.DataType; import org.akaza.openclinica.designer.web.fields.InputField.Type; @@ -23,8 +24,8 @@ public static InputField createSelectField(InputField.Type type, InputField.Data return new SelectInputField(type, dataType, propertyName, displayName, options, validators); } - public static InputField createInputField(String propertyName, String displayName, UIItemDetail itemDetail) { - String itemResponseType = itemDetail.getItemDetailsPerCrfVersion().get(0).getResponseType(); + public static InputField createInputField(String propertyName, String displayName, UIEntityDetail itemDetail) { + String itemResponseType = ((UIItemDetail) itemDetail).getItemDetailsPerCrfVersion().get(0).getResponseType(); final String ocIntegerDataType = "INTEGER"; final String ocStringDataType = "TEXT"; final String ocDateDataType = "DATE"; @@ -41,23 +42,23 @@ public static InputField createInputField(String propertyName, String displayNam } } else if (itemResponseType.equals("single-select") || itemResponseType.equals("radio")) { if (itemDetail.getDataType().equals(ocIntegerDataType)) { - return createSelectField(Type.SINGLESELECT, DataType.INTEGER, propertyName, displayName, itemDetail.getOptionsForFirstVersion(), + return createSelectField(Type.SINGLESELECT, DataType.INTEGER, propertyName, displayName, ((UIItemDetail) itemDetail).getOptionsForFirstVersion(), FieldValidator.INTEGER_VALIDATOR); } else if (itemDetail.getDataType().equals(ocFloatDataType)) { - return createSelectField(Type.SINGLESELECT, DataType.INTEGER, propertyName, displayName, itemDetail.getOptionsForFirstVersion(), + return createSelectField(Type.SINGLESELECT, DataType.INTEGER, propertyName, displayName, ((UIItemDetail) itemDetail).getOptionsForFirstVersion(), FieldValidator.NUMBER_VALIDATOR); } else { - return createSelectField(Type.SINGLESELECT, DataType.STRING, propertyName, displayName, itemDetail.getOptionsForFirstVersion()); + return createSelectField(Type.SINGLESELECT, DataType.STRING, propertyName, displayName, ((UIItemDetail) itemDetail).getOptionsForFirstVersion()); } } else if (itemResponseType.equals("multi-select") || itemResponseType.equals("checkbox")) { if (itemDetail.getDataType().equals(ocIntegerDataType)) { - return createSelectField(Type.MULTISELECT, DataType.INTEGER, propertyName, displayName, itemDetail.getMultiSelectListForFirstVersion(), + return createSelectField(Type.MULTISELECT, DataType.INTEGER, propertyName, displayName, ((UIItemDetail) itemDetail).getMultiSelectListForFirstVersion(), FieldValidator.INTEGER_VALIDATOR); } else if (itemDetail.getDataType().equals(ocFloatDataType)) { - return createSelectField(Type.MULTISELECT, DataType.INTEGER, propertyName, displayName, itemDetail.getMultiSelectListForFirstVersion(), + return createSelectField(Type.MULTISELECT, DataType.INTEGER, propertyName, displayName, ((UIItemDetail) itemDetail).getMultiSelectListForFirstVersion(), FieldValidator.NUMBER_VALIDATOR); } else { - return createSelectField(Type.MULTISELECT, DataType.STRING, propertyName, displayName, itemDetail.getMultiSelectListForFirstVersion()); + return createSelectField(Type.MULTISELECT, DataType.STRING, propertyName, displayName, ((UIItemDetail) itemDetail).getMultiSelectListForFirstVersion()); } } else { return createInputField(Type.TEXT, DataType.STRING, propertyName, displayName); diff --git a/src/main/java/org/openclinica/ns/rules/v31/ActionRunType.java b/src/main/java/org/openclinica/ns/rules/v31/ActionRunType.java new file mode 100644 index 0000000..6f3c9f3 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/ActionRunType.java @@ -0,0 +1,131 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ActionRunType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ActionRunType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *       </sequence>
+ *       <attGroup ref="{http://www.openclinica.org/ns/rules/v3.1}ActionRunAttributeType"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ActionRunType") +public class ActionRunType { + + @XmlAttribute(name = "AdministrativeDataEntry", required = true) + protected boolean administrativeDataEntry; + @XmlAttribute(name = "InitialDataEntry", required = true) + protected boolean initialDataEntry; + @XmlAttribute(name = "DoubleDataEntry", required = true) + protected boolean doubleDataEntry; + @XmlAttribute(name = "ImportDataEntry", required = true) + protected boolean importDataEntry; + @XmlAttribute(name = "Batch", required = true) + protected boolean batch; + + /** + * Gets the value of the administrativeDataEntry property. + * + */ + public boolean isAdministrativeDataEntry() { + return administrativeDataEntry; + } + + /** + * Sets the value of the administrativeDataEntry property. + * + */ + public void setAdministrativeDataEntry(boolean value) { + this.administrativeDataEntry = value; + } + + /** + * Gets the value of the initialDataEntry property. + * + */ + public boolean isInitialDataEntry() { + return initialDataEntry; + } + + /** + * Sets the value of the initialDataEntry property. + * + */ + public void setInitialDataEntry(boolean value) { + this.initialDataEntry = value; + } + + /** + * Gets the value of the doubleDataEntry property. + * + */ + public boolean isDoubleDataEntry() { + return doubleDataEntry; + } + + /** + * Sets the value of the doubleDataEntry property. + * + */ + public void setDoubleDataEntry(boolean value) { + this.doubleDataEntry = value; + } + + /** + * Gets the value of the importDataEntry property. + * + */ + public boolean isImportDataEntry() { + return importDataEntry; + } + + /** + * Sets the value of the importDataEntry property. + * + */ + public void setImportDataEntry(boolean value) { + this.importDataEntry = value; + } + + /** + * Gets the value of the batch property. + * + */ + public boolean isBatch() { + return batch; + } + + /** + * Sets the value of the batch property. + * + */ + public void setBatch(boolean value) { + this.batch = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/ContextType.java b/src/main/java/org/openclinica/ns/rules/v31/ContextType.java new file mode 100644 index 0000000..1e5d6f6 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/ContextType.java @@ -0,0 +1,55 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for contextType. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="contextType">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="OC_RULES_V1"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "contextType") +@XmlEnum +public enum ContextType { + + @XmlEnumValue("OC_RULES_V1") + OC_RULES_V_1("OC_RULES_V1"); + private final String value; + + ContextType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static ContextType fromValue(String v) { + for (ContextType c: ContextType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/DiscrepancyNoteActionType.java b/src/main/java/org/openclinica/ns/rules/v31/DiscrepancyNoteActionType.java new file mode 100644 index 0000000..3e82f03 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/DiscrepancyNoteActionType.java @@ -0,0 +1,125 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DiscrepancyNoteActionType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DiscrepancyNoteActionType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Run" type="{http://www.openclinica.org/ns/rules/v3.1}ActionRunType" minOccurs="0"/>
+ *         <element name="Message" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *       <attGroup ref="{http://www.openclinica.org/ns/rules/v3.1}DiscrepancyNoteActionAttributeType"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DiscrepancyNoteActionType", propOrder = { + "run", + "message" +}) +public class DiscrepancyNoteActionType { + + @XmlElement(name = "Run") + protected ActionRunType run; + @XmlElement(name = "Message", required = true) + protected String message; + @XmlAttribute(name = "IfExpressionEvaluates") + protected String ifExpressionEvaluates; + + /** + * Gets the value of the run property. + * + * @return + * possible object is + * {@link ActionRunType } + * + */ + public ActionRunType getRun() { + return run; + } + + /** + * Sets the value of the run property. + * + * @param value + * allowed object is + * {@link ActionRunType } + * + */ + public void setRun(ActionRunType value) { + this.run = value; + } + + /** + * Gets the value of the message property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMessage() { + return message; + } + + /** + * Sets the value of the message property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMessage(String value) { + this.message = value; + } + + /** + * Gets the value of the ifExpressionEvaluates property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIfExpressionEvaluates() { + return ifExpressionEvaluates; + } + + /** + * Sets the value of the ifExpressionEvaluates property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIfExpressionEvaluates(String value) { + this.ifExpressionEvaluates = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/EmailActionType.java b/src/main/java/org/openclinica/ns/rules/v31/EmailActionType.java new file mode 100644 index 0000000..63f2642 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/EmailActionType.java @@ -0,0 +1,153 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for EmailActionType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EmailActionType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Run" type="{http://www.openclinica.org/ns/rules/v3.1}ActionRunType" minOccurs="0"/>
+ *         <element name="Message" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="To" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *       <attGroup ref="{http://www.openclinica.org/ns/rules/v3.1}DiscrepancyNoteActionAttributeType"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EmailActionType", propOrder = { + "run", + "message", + "to" +}) +public class EmailActionType { + + @XmlElement(name = "Run") + protected ActionRunType run; + @XmlElement(name = "Message", required = true) + protected String message; + @XmlElement(name = "To", required = true) + protected String to; + @XmlAttribute(name = "IfExpressionEvaluates") + protected String ifExpressionEvaluates; + + /** + * Gets the value of the run property. + * + * @return + * possible object is + * {@link ActionRunType } + * + */ + public ActionRunType getRun() { + return run; + } + + /** + * Sets the value of the run property. + * + * @param value + * allowed object is + * {@link ActionRunType } + * + */ + public void setRun(ActionRunType value) { + this.run = value; + } + + /** + * Gets the value of the message property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMessage() { + return message; + } + + /** + * Sets the value of the message property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMessage(String value) { + this.message = value; + } + + /** + * Gets the value of the to property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTo() { + return to; + } + + /** + * Sets the value of the to property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTo(String value) { + this.to = value; + } + + /** + * Gets the value of the ifExpressionEvaluates property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIfExpressionEvaluates() { + return ifExpressionEvaluates; + } + + /** + * Sets the value of the ifExpressionEvaluates property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIfExpressionEvaluates(String value) { + this.ifExpressionEvaluates = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/EventActionType.java b/src/main/java/org/openclinica/ns/rules/v31/EventActionType.java new file mode 100644 index 0000000..da24e06 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/EventActionType.java @@ -0,0 +1,159 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for EventActionType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EventActionType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="RunOnStatus" type="{http://www.openclinica.org/ns/rules/v3.1}RunOnType" minOccurs="0"/>
+ *         <element name="EventDestination" type="{http://www.openclinica.org/ns/rules/v3.1}EventDestinationType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attGroup ref="{http://www.openclinica.org/ns/rules/v3.1}DiscrepancyNoteActionAttributeType"/>
+ *       <attribute name="OID" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EventActionType", propOrder = { + "runOnStatus", + "eventDestination" +}) +public class EventActionType { + + @XmlElement(name = "RunOnStatus") + protected RunOnType runOnStatus; + @XmlElement(name = "EventDestination", required = true) + protected List eventDestination; + @XmlAttribute(name = "OID") + protected String oid; + @XmlAttribute(name = "IfExpressionEvaluates") + protected String ifExpressionEvaluates; + + /** + * Gets the value of the runOnStatus property. + * + * @return + * possible object is + * {@link RunOnType } + * + */ + public RunOnType getRunOnStatus() { + return runOnStatus; + } + + /** + * Sets the value of the runOnStatus property. + * + * @param value + * allowed object is + * {@link RunOnType } + * + */ + public void setRunOnStatus(RunOnType value) { + this.runOnStatus = value; + } + + /** + * Gets the value of the eventDestination property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the eventDestination property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEventDestination().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EventDestinationType } + * + * + */ + public List getEventDestination() { + if (eventDestination == null) { + eventDestination = new ArrayList(); + } + return this.eventDestination; + } + + /** + * Gets the value of the oid property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOID() { + return oid; + } + + /** + * Sets the value of the oid property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOID(String value) { + this.oid = value; + } + + /** + * Gets the value of the ifExpressionEvaluates property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIfExpressionEvaluates() { + return ifExpressionEvaluates; + } + + /** + * Sets the value of the ifExpressionEvaluates property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIfExpressionEvaluates(String value) { + this.ifExpressionEvaluates = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/EventDestinationType.java b/src/main/java/org/openclinica/ns/rules/v31/EventDestinationType.java new file mode 100644 index 0000000..5250491 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/EventDestinationType.java @@ -0,0 +1,97 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for EventDestinationType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="EventDestinationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ValueExpression" type="{http://www.openclinica.org/ns/rules/v3.1}TargetType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="Property" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EventDestinationType", propOrder = { + "valueExpression" +}) +public class EventDestinationType { + + @XmlElement(name = "ValueExpression") + protected TargetType valueExpression; + @XmlAttribute(name = "Property", required = true) + protected String property; + + /** + * Gets the value of the valueExpression property. + * + * @return + * possible object is + * {@link TargetType } + * + */ + public TargetType getValueExpression() { + return valueExpression; + } + + /** + * Sets the value of the valueExpression property. + * + * @param value + * allowed object is + * {@link TargetType } + * + */ + public void setValueExpression(TargetType value) { + this.valueExpression = value; + } + + /** + * Gets the value of the property property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getProperty() { + return property; + } + + /** + * Sets the value of the property property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProperty(String value) { + this.property = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/HideActionType.java b/src/main/java/org/openclinica/ns/rules/v31/HideActionType.java new file mode 100644 index 0000000..a6e3f93 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/HideActionType.java @@ -0,0 +1,160 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for HideActionType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="HideActionType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Run" type="{http://www.openclinica.org/ns/rules/v3.1}ActionRunType" minOccurs="0"/>
+ *         <element name="Message" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="DestinationProperty" type="{http://www.openclinica.org/ns/rules/v3.1}PropertyType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attGroup ref="{http://www.openclinica.org/ns/rules/v3.1}DiscrepancyNoteActionAttributeType"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "HideActionType", propOrder = { + "run", + "message", + "destinationProperty" +}) +public class HideActionType { + + @XmlElement(name = "Run") + protected ActionRunType run; + @XmlElement(name = "Message", required = true) + protected String message; + @XmlElement(name = "DestinationProperty", required = true) + protected List destinationProperty; + @XmlAttribute(name = "IfExpressionEvaluates") + protected String ifExpressionEvaluates; + + /** + * Gets the value of the run property. + * + * @return + * possible object is + * {@link ActionRunType } + * + */ + public ActionRunType getRun() { + return run; + } + + /** + * Sets the value of the run property. + * + * @param value + * allowed object is + * {@link ActionRunType } + * + */ + public void setRun(ActionRunType value) { + this.run = value; + } + + /** + * Gets the value of the message property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMessage() { + return message; + } + + /** + * Sets the value of the message property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMessage(String value) { + this.message = value; + } + + /** + * Gets the value of the destinationProperty property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the destinationProperty property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDestinationProperty().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link PropertyType } + * + * + */ + public List getDestinationProperty() { + if (destinationProperty == null) { + destinationProperty = new ArrayList(); + } + return this.destinationProperty; + } + + /** + * Gets the value of the ifExpressionEvaluates property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIfExpressionEvaluates() { + return ifExpressionEvaluates; + } + + /** + * Sets the value of the ifExpressionEvaluates property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIfExpressionEvaluates(String value) { + this.ifExpressionEvaluates = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/InsertActionType.java b/src/main/java/org/openclinica/ns/rules/v31/InsertActionType.java new file mode 100644 index 0000000..0b16a66 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/InsertActionType.java @@ -0,0 +1,132 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for InsertActionType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="InsertActionType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Run" type="{http://www.openclinica.org/ns/rules/v3.1}ActionRunType" minOccurs="0"/>
+ *         <element name="DestinationProperty" type="{http://www.openclinica.org/ns/rules/v3.1}PropertyType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attGroup ref="{http://www.openclinica.org/ns/rules/v3.1}DiscrepancyNoteActionAttributeType"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "InsertActionType", propOrder = { + "run", + "destinationProperty" +}) +public class InsertActionType { + + @XmlElement(name = "Run") + protected ActionRunType run; + @XmlElement(name = "DestinationProperty", required = true) + protected List destinationProperty; + @XmlAttribute(name = "IfExpressionEvaluates") + protected String ifExpressionEvaluates; + + /** + * Gets the value of the run property. + * + * @return + * possible object is + * {@link ActionRunType } + * + */ + public ActionRunType getRun() { + return run; + } + + /** + * Sets the value of the run property. + * + * @param value + * allowed object is + * {@link ActionRunType } + * + */ + public void setRun(ActionRunType value) { + this.run = value; + } + + /** + * Gets the value of the destinationProperty property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the destinationProperty property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDestinationProperty().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link PropertyType } + * + * + */ + public List getDestinationProperty() { + if (destinationProperty == null) { + destinationProperty = new ArrayList(); + } + return this.destinationProperty; + } + + /** + * Gets the value of the ifExpressionEvaluates property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIfExpressionEvaluates() { + return ifExpressionEvaluates; + } + + /** + * Sets the value of the ifExpressionEvaluates property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIfExpressionEvaluates(String value) { + this.ifExpressionEvaluates = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/NotificationActionType.java b/src/main/java/org/openclinica/ns/rules/v31/NotificationActionType.java new file mode 100644 index 0000000..3ba8d60 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/NotificationActionType.java @@ -0,0 +1,121 @@ +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "NotificationActionType", propOrder = { + "to", + "subject", + "message", +}) +public class NotificationActionType { + + @XmlAttribute(name = "IfExpressionEvaluates") + protected String ifExpressionEvaluates; + @XmlElement(name = "To", required = true) + protected String to; + @XmlElement(name = "Subject", required = true) + protected String subject; + @XmlElement(name = "Message", required = true) + protected String message; + + /** + * Gets the value of the ifExpressionEvaluates property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIfExpressionEvaluates() { + return ifExpressionEvaluates; + } + + /** + * Sets the value of the ifExpressionEvaluates property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIfExpressionEvaluates(String value) { + this.ifExpressionEvaluates = value; + } + + /** + * Gets the value of the to property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTo() { + return to; + } + + /** + * Sets the value of the to property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTo(String value) { + this.to = value; + } + + /** + * Gets the value of the subject property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSubject() { + return subject; + } + + /** + * Sets the value of the subject property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSubject(String value) { + this.subject = value; + } + + /** + * Gets the value of the message property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMessage() { + return message; + } + + /** + * Sets the value of the message property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMessage(String value) { + this.message = value; + } +} \ No newline at end of file diff --git a/src/main/java/org/openclinica/ns/rules/v31/ObjectFactory.java b/src/main/java/org/openclinica/ns/rules/v31/ObjectFactory.java new file mode 100644 index 0000000..c0ec788 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/ObjectFactory.java @@ -0,0 +1,272 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the org.openclinica.ns.rules.v31 package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _Rules_QNAME = new QName("http://www.openclinica.org/ns/rules/v3.1", "Rules"); + private final static QName _DiscrepancyNoteAction_QNAME = new QName("http://www.openclinica.org/ns/rules/v3.1", "DiscrepancyNoteAction"); + private final static QName _HideAction_QNAME = new QName("http://www.openclinica.org/ns/rules/v3.1", "HideAction"); + private final static QName _EventAction_QNAME = new QName("http://www.openclinica.org/ns/rules/v3.1", "EventAction"); + private final static QName _ShowAction_QNAME = new QName("http://www.openclinica.org/ns/rules/v3.1", "ShowAction"); + private final static QName _RuleAssignment_QNAME = new QName("http://www.openclinica.org/ns/rules/v3.1", "RuleAssignment"); + private final static QName _RuleDef_QNAME = new QName("http://www.openclinica.org/ns/rules/v3.1", "RuleDef"); + private final static QName _InsertAction_QNAME = new QName("http://www.openclinica.org/ns/rules/v3.1", "InsertAction"); + private final static QName _RuleRef_QNAME = new QName("http://www.openclinica.org/ns/rules/v3.1", "RuleRef"); + private final static QName _EmailAction_QNAME = new QName("http://www.openclinica.org/ns/rules/v3.1", "EmailAction"); + private final static QName _Target_QNAME = new QName("http://www.openclinica.org/ns/rules/v3.1", "Target"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openclinica.ns.rules.v31 + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link RuleDefType } + * + */ + public RuleDefType createRuleDefType() { + return new RuleDefType(); + } + + /** + * Create an instance of {@link InsertActionType } + * + */ + public InsertActionType createInsertActionType() { + return new InsertActionType(); + } + + /** + * Create an instance of {@link RuleRefType } + * + */ + public RuleRefType createRuleRefType() { + return new RuleRefType(); + } + + /** + * Create an instance of {@link TargetType } + * + */ + public TargetType createTargetType() { + return new TargetType(); + } + + /** + * Create an instance of {@link EmailActionType } + * + */ + public EmailActionType createEmailActionType() { + return new EmailActionType(); + } + + /** + * Create an instance of {@link RuleAssignmentType } + * + */ + public RuleAssignmentType createRuleAssignmentType() { + return new RuleAssignmentType(); + } + + /** + * Create an instance of {@link RuleImportType } + * + */ + public RuleImportType createRuleImportType() { + return new RuleImportType(); + } + + /** + * Create an instance of {@link DiscrepancyNoteActionType } + * + */ + public DiscrepancyNoteActionType createDiscrepancyNoteActionType() { + return new DiscrepancyNoteActionType(); + } + + /** + * Create an instance of {@link EventActionType } + * + */ + public EventActionType createEventActionType() { + return new EventActionType(); + } + + /** + * Create an instance of {@link HideActionType } + * + */ + public HideActionType createHideActionType() { + return new HideActionType(); + } + + /** + * Create an instance of {@link ShowActionType } + * + */ + public ShowActionType createShowActionType() { + return new ShowActionType(); + } + + /** + * Create an instance of {@link PropertyType } + * + */ + public PropertyType createPropertyType() { + return new PropertyType(); + } + + /** + * Create an instance of {@link EventDestinationType } + * + */ + public EventDestinationType createEventDestinationType() { + return new EventDestinationType(); + } + + /** + * Create an instance of {@link RunOnType } + * + */ + public RunOnType createRunOnType() { + return new RunOnType(); + } + + /** + * Create an instance of {@link ActionRunType } + * + */ + public ActionRunType createActionRunType() { + return new ActionRunType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link RuleImportType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.openclinica.org/ns/rules/v3.1", name = "Rules") + public JAXBElement createRules(RuleImportType value) { + return new JAXBElement(_Rules_QNAME, RuleImportType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link DiscrepancyNoteActionType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.openclinica.org/ns/rules/v3.1", name = "DiscrepancyNoteAction") + public JAXBElement createDiscrepancyNoteAction(DiscrepancyNoteActionType value) { + return new JAXBElement(_DiscrepancyNoteAction_QNAME, DiscrepancyNoteActionType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link HideActionType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.openclinica.org/ns/rules/v3.1", name = "HideAction") + public JAXBElement createHideAction(HideActionType value) { + return new JAXBElement(_HideAction_QNAME, HideActionType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link EventActionType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.openclinica.org/ns/rules/v3.1", name = "EventAction") + public JAXBElement createEventAction(EventActionType value) { + return new JAXBElement(_EventAction_QNAME, EventActionType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link ShowActionType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.openclinica.org/ns/rules/v3.1", name = "ShowAction") + public JAXBElement createShowAction(ShowActionType value) { + return new JAXBElement(_ShowAction_QNAME, ShowActionType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link RuleAssignmentType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.openclinica.org/ns/rules/v3.1", name = "RuleAssignment") + public JAXBElement createRuleAssignment(RuleAssignmentType value) { + return new JAXBElement(_RuleAssignment_QNAME, RuleAssignmentType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link RuleDefType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.openclinica.org/ns/rules/v3.1", name = "RuleDef") + public JAXBElement createRuleDef(RuleDefType value) { + return new JAXBElement(_RuleDef_QNAME, RuleDefType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link InsertActionType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.openclinica.org/ns/rules/v3.1", name = "InsertAction") + public JAXBElement createInsertAction(InsertActionType value) { + return new JAXBElement(_InsertAction_QNAME, InsertActionType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link RuleRefType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.openclinica.org/ns/rules/v3.1", name = "RuleRef") + public JAXBElement createRuleRef(RuleRefType value) { + return new JAXBElement(_RuleRef_QNAME, RuleRefType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link EmailActionType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.openclinica.org/ns/rules/v3.1", name = "EmailAction") + public JAXBElement createEmailAction(EmailActionType value) { + return new JAXBElement(_EmailAction_QNAME, EmailActionType.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TargetType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://www.openclinica.org/ns/rules/v3.1", name = "Target") + public JAXBElement createTarget(TargetType value) { + return new JAXBElement(_Target_QNAME, TargetType.class, null, value); + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/PropertyType.java b/src/main/java/org/openclinica/ns/rules/v31/PropertyType.java new file mode 100644 index 0000000..c80b6d5 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/PropertyType.java @@ -0,0 +1,123 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for PropertyType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="PropertyType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ValueExpression" type="{http://www.openclinica.org/ns/rules/v3.1}TargetType" minOccurs="0"/>
+ *       </sequence>
+ *       <attGroup ref="{http://www.openclinica.org/ns/rules/v3.1}PropertyAttributeType"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PropertyType", propOrder = { + "valueExpression" +}) +public class PropertyType { + + @XmlElement(name = "ValueExpression") + protected TargetType valueExpression; + @XmlAttribute(name = "OID", required = true) + protected String oid; + @XmlAttribute(name = "Value") + protected String value; + + /** + * Gets the value of the valueExpression property. + * + * @return + * possible object is + * {@link TargetType } + * + */ + public TargetType getValueExpression() { + return valueExpression; + } + + /** + * Sets the value of the valueExpression property. + * + * @param value + * allowed object is + * {@link TargetType } + * + */ + public void setValueExpression(TargetType value) { + this.valueExpression = value; + } + + /** + * Gets the value of the oid property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOID() { + return oid; + } + + /** + * Sets the value of the oid property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOID(String value) { + this.oid = value; + } + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/RuleAssignmentType.java b/src/main/java/org/openclinica/ns/rules/v31/RuleAssignmentType.java new file mode 100644 index 0000000..2b36e9e --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/RuleAssignmentType.java @@ -0,0 +1,132 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for RuleAssignmentType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RuleAssignmentType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.openclinica.org/ns/rules/v3.1}Target"/>
+ *         <element ref="{http://www.openclinica.org/ns/rules/v3.1}RuleRef" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RuleAssignmentType", propOrder = { + "target", + "runOnSchedule", + "ruleRef" +}) +public class RuleAssignmentType { + + @XmlElement(name = "Target", required = true) + protected TargetType target; + @XmlElement(name = "RuleRef", required = true) + protected List ruleRef; + @XmlElement(name = "RunOnSchedule", required = true) + protected RunOnScheduleType runOnSchedule; + + /** + * Gets the value of the target property. + * + * @return + * possible object is + * {@link TargetType } + * + */ + public TargetType getTarget() { + return target; + } + + /** + * Sets the value of the target property. + * + * @param value + * allowed object is + * {@link TargetType } + * + */ + public void setTarget(TargetType value) { + this.target = value; + } + + /** + * Gets the value of the ruleRef property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ruleRef property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRuleRef().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link RuleRefType } + * + * + */ + public List getRuleRef() { + if (ruleRef == null) { + ruleRef = new ArrayList(); + } + return this.ruleRef; + } + + /** + * Gets the value of the runOnSchedule property. + * + * @return + * possible object is + * {@link RunOnScheduleType } + * + */ + public RunOnScheduleType getRunOnSchedule() { + return runOnSchedule; + } + + /** + * Sets the value of the runOnSchedule property. + * + * @param value + * allowed object is + * {@link RunOnScheduleType } + * + */ + public void setRunOnSchedule(RunOnScheduleType runOnSchedule) { + this.runOnSchedule = runOnSchedule; + } + + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/RuleDefType.java b/src/main/java/org/openclinica/ns/rules/v31/RuleDefType.java new file mode 100644 index 0000000..7416a3f --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/RuleDefType.java @@ -0,0 +1,151 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for RuleDefType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RuleDefType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Description" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Expression" type="{http://www.openclinica.org/ns/rules/v3.1}TargetType"/>
+ *       </sequence>
+ *       <attGroup ref="{http://www.openclinica.org/ns/rules/v3.1}RuleDefAttributeType"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RuleDefType", propOrder = { + "description", + "expression" +}) +public class RuleDefType { + + @XmlElement(name = "Description", required = true) + protected String description; + @XmlElement(name = "Expression", required = true) + protected TargetType expression; + @XmlAttribute(name = "OID", required = true) + protected String oid; + @XmlAttribute(name = "Name") + protected String name; + + /** + * Gets the value of the description property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDescription() { + return description; + } + + /** + * Sets the value of the description property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Gets the value of the expression property. + * + * @return + * possible object is + * {@link TargetType } + * + */ + public TargetType getExpression() { + return expression; + } + + /** + * Sets the value of the expression property. + * + * @param value + * allowed object is + * {@link TargetType } + * + */ + public void setExpression(TargetType value) { + this.expression = value; + } + + /** + * Gets the value of the oid property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOID() { + return oid; + } + + /** + * Sets the value of the oid property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOID(String value) { + this.oid = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/RuleImport.java b/src/main/java/org/openclinica/ns/rules/v31/RuleImport.java new file mode 100644 index 0000000..b4c6ce9 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/RuleImport.java @@ -0,0 +1,111 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 08:37:00 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{}RuleAssignment" maxOccurs="unbounded"/>
+ *         <element ref="{}RuleDef" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "ruleAssignment", + "ruleDef" +}) +@XmlRootElement(name = "RuleImport") +public class RuleImport { + + @XmlElement(name = "RuleAssignment", required = true) + protected List ruleAssignment; + @XmlElement(name = "RuleDef") + protected List ruleDef; + + /** + * Gets the value of the ruleAssignment property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ruleAssignment property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRuleAssignment().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link RuleAssignmentType } + * + * + */ + public List getRuleAssignment() { + if (ruleAssignment == null) { + ruleAssignment = new ArrayList(); + } + return this.ruleAssignment; + } + + /** + * Gets the value of the ruleDef property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ruleDef property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRuleDef().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link RuleDefType } + * + * + */ + public List getRuleDef() { + if (ruleDef == null) { + ruleDef = new ArrayList(); + } + return this.ruleDef; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/RuleImportType.java b/src/main/java/org/openclinica/ns/rules/v31/RuleImportType.java new file mode 100644 index 0000000..96b8ab5 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/RuleImportType.java @@ -0,0 +1,112 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * The top level root element. Allows the definition of default values + * for all nested bean definitions. + * + *

Java class for RuleImportType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RuleImportType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.openclinica.org/ns/rules/v3.1}RuleAssignment" maxOccurs="unbounded"/>
+ *         <element ref="{http://www.openclinica.org/ns/rules/v3.1}RuleDef" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RuleImportType", propOrder = { + "ruleAssignment", + "ruleDef" +}) +public class RuleImportType { + + @XmlElement(name = "RuleAssignment", required = true) + protected List ruleAssignment; + @XmlElement(name = "RuleDef") + protected List ruleDef; + + /** + * Gets the value of the ruleAssignment property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ruleAssignment property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRuleAssignment().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link RuleAssignmentType } + * + * + */ + public List getRuleAssignment() { + if (ruleAssignment == null) { + ruleAssignment = new ArrayList(); + } + return this.ruleAssignment; + } + + /** + * Gets the value of the ruleDef property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ruleDef property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRuleDef().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link RuleDefType } + * + * + */ + public List getRuleDef() { + if (ruleDef == null) { + ruleDef = new ArrayList(); + } + return this.ruleDef; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/RuleRefType.java b/src/main/java/org/openclinica/ns/rules/v31/RuleRefType.java new file mode 100644 index 0000000..0b3dad9 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/RuleRefType.java @@ -0,0 +1,301 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for RuleRefType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RuleRefType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://www.openclinica.org/ns/rules/v3.1}DiscrepancyNoteAction" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element ref="{http://www.openclinica.org/ns/rules/v3.1}EmailAction" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element ref="{http://www.openclinica.org/ns/rules/v3.1}ShowAction" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element ref="{http://www.openclinica.org/ns/rules/v3.1}HideAction" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element ref="{http://www.openclinica.org/ns/rules/v3.1}InsertAction" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element ref="{http://www.openclinica.org/ns/rules/v3.1}EventAction" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attGroup ref="{http://www.openclinica.org/ns/rules/v3.1}RuleRefAttributeType"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RuleRefType", propOrder = { + "discrepancyNoteAction", + "emailAction", + "showAction", + "hideAction", + "insertAction", + "eventAction", + "notificationAction" +}) +public class RuleRefType { + + @XmlElement(name = "DiscrepancyNoteAction") + protected List discrepancyNoteAction; + @XmlElement(name = "EmailAction") + protected List emailAction; + @XmlElement(name = "ShowAction") + protected List showAction; + @XmlElement(name = "HideAction") + protected List hideAction; + @XmlElement(name = "InsertAction") + protected List insertAction; + @XmlElement(name = "EventAction") + protected List eventAction; + @XmlElement(name = "NotificationAction") + protected List notificationAction; + @XmlAttribute(name = "OID", required = true) + protected String oid; + + /** + * Gets the value of the discrepancyNoteAction property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the discrepancyNoteAction property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDiscrepancyNoteAction().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DiscrepancyNoteActionType } + * + * + */ + public List getDiscrepancyNoteAction() { + if (discrepancyNoteAction == null) { + discrepancyNoteAction = new ArrayList(); + } + return this.discrepancyNoteAction; + } + + /** + * Gets the value of the emailAction property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the emailAction property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEmailAction().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EmailActionType } + * + * + */ + public List getEmailAction() { + if (emailAction == null) { + emailAction = new ArrayList(); + } + return this.emailAction; + } + + /** + * Gets the value of the showAction property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the showAction property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getShowAction().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ShowActionType } + * + * + */ + public List getShowAction() { + if (showAction == null) { + showAction = new ArrayList(); + } + return this.showAction; + } + + /** + * Gets the value of the hideAction property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the hideAction property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getHideAction().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link HideActionType } + * + * + */ + public List getHideAction() { + if (hideAction == null) { + hideAction = new ArrayList(); + } + return this.hideAction; + } + + /** + * Gets the value of the insertAction property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the insertAction property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getInsertAction().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link InsertActionType } + * + * + */ + public List getInsertAction() { + if (insertAction == null) { + insertAction = new ArrayList(); + } + return this.insertAction; + } + + /** + * Gets the value of the eventAction property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the eventAction property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEventAction().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EventActionType } + * + * + */ + public List getEventAction() { + if (eventAction == null) { + eventAction = new ArrayList(); + } + return this.eventAction; + } + + /** + * Gets the value of the notificationAction property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the notificationAction property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getNotificationAction().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link NotificationActionType } + * + * + */ + public List getNotificationAction() { + if (notificationAction == null) { + notificationAction = new ArrayList(); + } + return this.notificationAction; + } + + /** + * Gets the value of the oid property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOID() { + return oid; + } + + /** + * Sets the value of the oid property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOID(String value) { + this.oid = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/RunOnScheduleType.java b/src/main/java/org/openclinica/ns/rules/v31/RunOnScheduleType.java new file mode 100644 index 0000000..b98d0ee --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/RunOnScheduleType.java @@ -0,0 +1,39 @@ +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RunOnScheduleType", propOrder = {}) +public class RunOnScheduleType { + + @XmlAttribute(name = "Time") + protected String time; + + /** + * Gets the value of the time property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTime() { + return time; + } + + /** + * Sets the value of the time property. + * + * @param time + * allowed object is + * {@link String } + * + */ + public void setTime(String time) { + this.time = time; + } +} \ No newline at end of file diff --git a/src/main/java/org/openclinica/ns/rules/v31/RunOnType.java b/src/main/java/org/openclinica/ns/rules/v31/RunOnType.java new file mode 100644 index 0000000..454548b --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/RunOnType.java @@ -0,0 +1,206 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for RunOnType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="RunOnType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="not_scheduled" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="scheduled" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="data_entry_started" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="completed" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="skipped" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="stopped" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="signed" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *       <attribute name="locked" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RunOnType") +public class RunOnType { + + @XmlAttribute(name = "not_scheduled", required = true) + protected boolean notScheduled; + @XmlAttribute(name = "scheduled", required = true) + protected boolean scheduled; + @XmlAttribute(name = "data_entry_started", required = true) + protected boolean dataEntryStarted; + @XmlAttribute(name = "completed", required = true) + protected boolean completed; + @XmlAttribute(name = "skipped", required = true) + protected boolean skipped; + @XmlAttribute(name = "stopped", required = true) + protected boolean stopped; + @XmlAttribute(name = "signed") + protected Boolean signed; + @XmlAttribute(name = "locked") + protected Boolean locked; + + /** + * Gets the value of the notScheduled property. + * + */ + public boolean isNotScheduled() { + return notScheduled; + } + + /** + * Sets the value of the notScheduled property. + * + */ + public void setNotScheduled(boolean value) { + this.notScheduled = value; + } + + /** + * Gets the value of the scheduled property. + * + */ + public boolean isScheduled() { + return scheduled; + } + + /** + * Sets the value of the scheduled property. + * + */ + public void setScheduled(boolean value) { + this.scheduled = value; + } + + /** + * Gets the value of the dataEntryStarted property. + * + */ + public boolean isDataEntryStarted() { + return dataEntryStarted; + } + + /** + * Sets the value of the dataEntryStarted property. + * + */ + public void setDataEntryStarted(boolean value) { + this.dataEntryStarted = value; + } + + /** + * Gets the value of the completed property. + * + */ + public boolean isCompleted() { + return completed; + } + + /** + * Sets the value of the completed property. + * + */ + public void setCompleted(boolean value) { + this.completed = value; + } + + /** + * Gets the value of the skipped property. + * + */ + public boolean isSkipped() { + return skipped; + } + + /** + * Sets the value of the skipped property. + * + */ + public void setSkipped(boolean value) { + this.skipped = value; + } + + /** + * Gets the value of the stopped property. + * + */ + public boolean isStopped() { + return stopped; + } + + /** + * Sets the value of the stopped property. + * + */ + public void setStopped(boolean value) { + this.stopped = value; + } + + /** + * Gets the value of the signed property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isSigned() { + return signed; + } + + /** + * Sets the value of the signed property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setSigned(Boolean value) { + this.signed = value; + } + + /** + * Gets the value of the locked property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public Boolean isLocked() { + return locked; + } + + /** + * Sets the value of the locked property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setLocked(Boolean value) { + this.locked = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/ShowActionType.java b/src/main/java/org/openclinica/ns/rules/v31/ShowActionType.java new file mode 100644 index 0000000..828f667 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/ShowActionType.java @@ -0,0 +1,160 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ShowActionType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ShowActionType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Run" type="{http://www.openclinica.org/ns/rules/v3.1}ActionRunType" minOccurs="0"/>
+ *         <element name="Message" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="DestinationProperty" type="{http://www.openclinica.org/ns/rules/v3.1}PropertyType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attGroup ref="{http://www.openclinica.org/ns/rules/v3.1}DiscrepancyNoteActionAttributeType"/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ShowActionType", propOrder = { + "run", + "message", + "destinationProperty" +}) +public class ShowActionType { + + @XmlElement(name = "Run") + protected ActionRunType run; + @XmlElement(name = "Message", required = true) + protected String message; + @XmlElement(name = "DestinationProperty", required = true) + protected List destinationProperty; + @XmlAttribute(name = "IfExpressionEvaluates") + protected String ifExpressionEvaluates; + + /** + * Gets the value of the run property. + * + * @return + * possible object is + * {@link ActionRunType } + * + */ + public ActionRunType getRun() { + return run; + } + + /** + * Sets the value of the run property. + * + * @param value + * allowed object is + * {@link ActionRunType } + * + */ + public void setRun(ActionRunType value) { + this.run = value; + } + + /** + * Gets the value of the message property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMessage() { + return message; + } + + /** + * Sets the value of the message property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMessage(String value) { + this.message = value; + } + + /** + * Gets the value of the destinationProperty property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the destinationProperty property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDestinationProperty().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link PropertyType } + * + * + */ + public List getDestinationProperty() { + if (destinationProperty == null) { + destinationProperty = new ArrayList(); + } + return this.destinationProperty; + } + + /** + * Gets the value of the ifExpressionEvaluates property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getIfExpressionEvaluates() { + return ifExpressionEvaluates; + } + + /** + * Sets the value of the ifExpressionEvaluates property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setIfExpressionEvaluates(String value) { + this.ifExpressionEvaluates = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/TargetType.java b/src/main/java/org/openclinica/ns/rules/v31/TargetType.java new file mode 100644 index 0000000..0549edf --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/TargetType.java @@ -0,0 +1,94 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Java class for TargetType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="TargetType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="Context" type="{http://www.openclinica.org/ns/rules/v3.1}contextType" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TargetType", propOrder = { + "value" +}) +public class TargetType { + + @XmlValue + protected String value; + @XmlAttribute(name = "Context") + protected ContextType context; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the context property. + * + * @return + * possible object is + * {@link ContextType } + * + */ + public ContextType getContext() { + return context; + } + + /** + * Sets the value of the context property. + * + * @param value + * allowed object is + * {@link ContextType } + * + */ + public void setContext(ContextType value) { + this.context = value; + } + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/ValueExpressionType.java b/src/main/java/org/openclinica/ns/rules/v31/ValueExpressionType.java new file mode 100644 index 0000000..48d2d91 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/ValueExpressionType.java @@ -0,0 +1,39 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 08:37:00 PM WIB +// + + +package org.openclinica.ns.rules.v31; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for ValueExpressionType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="ValueExpressionType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ValueExpressionType") +public class ValueExpressionType { + + +} diff --git a/src/main/java/org/openclinica/ns/rules/v31/package-info.java b/src/main/java/org/openclinica/ns/rules/v31/package-info.java new file mode 100644 index 0000000..c9232e4 --- /dev/null +++ b/src/main/java/org/openclinica/ns/rules/v31/package-info.java @@ -0,0 +1,9 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2014.04.30 at 09:52:30 PM WIB +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.openclinica.org/ns/rules/v3.1", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package org.openclinica.ns.rules.v31; diff --git a/src/main/resources/org/akaza/openclinica/i18n/licensing.properties b/src/main/resources/org/akaza/openclinica/i18n/licensing.properties index 04fd924..4c758c6 100644 --- a/src/main/resources/org/akaza/openclinica/i18n/licensing.properties +++ b/src/main/resources/org/akaza/openclinica/i18n/licensing.properties @@ -1 +1 @@ -Version_release = Version: ${pom.version} - Changeset: ${changeSet} "${changeSetDate}" \ No newline at end of file +Version_release = Version: ${pom.version} - Changeset: ${changeSet} "${changeSetDate}" diff --git a/src/main/webapp/WEB-INF/i18n/application.properties b/src/main/webapp/WEB-INF/i18n/application.properties index c671b27..e951e00 100644 --- a/src/main/webapp/WEB-INF/i18n/application.properties +++ b/src/main/webapp/WEB-INF/i18n/application.properties @@ -5,6 +5,7 @@ application_name=Designer atleast.one.apply.on=There should be atleast one apply on discrepancy.note.message.empty=Message should not be empty email.to.empty=To should not be empty +email.subject.empty=Subject should not be empty email.to.not.valid=Not a valid email address error.empty=Can not be empty label_actions=Actions @@ -25,6 +26,8 @@ label_hide_action=Hide Action label_import_data_entry=Import data entry label_initial_data_entry=Initial data entry label_insert_action=Insert Action +label_event_action=Event Action +label_property=Property label_message=Message label_or_names=or names label_org_akaza_openclinica_designer_core_domain_contact=Contact @@ -44,9 +47,25 @@ label_step_3=Step 3\: Verify results label_target=Target label_test_index=Test Controller View label_to=To +label_subject=Subject label_view_by_crf=View by CRF label_view_by_crf_version=View by CRF Version label_view_by_event=View by Event +label_event_apply_to=Apply To +label_event_value_expression=Value Expression +label_event_specify_runonstatus_mode=Run this action if the status of the 'Apply To' Event is: +label_not_scheduled=Not Scheduled +label_scheduled=Scheduled +label_data_entry_started=Data Entry Started +label_completed=Completed +label_skipped=Skipped +label_stopped=Stopped +label_signed=Signed +label_locked=Locked +label_run_on_a_shedule= Run on a Schedule +label_run_time=Run Time +label_notification_action=Notification Action +run_time_format=(24 hour format) menu_category_contact_label=Contact menu_category_controller_label=Controller menu_item_contact_list_label=Contacts @@ -77,3 +96,8 @@ tooltip_apply_on_hide=This is the item you would like to Hide. Drag and drop an tooltip_apply_on_insert=This is the item for which you would like a value to be inserted. Drag and drop an item from the tree on the left. tooltip_apply_on_value=If you want to enter a static value (such as a text or numeric value) enter it here. tooltip_apply_on_expression=If you would like to insert the value from another item
(either within the same CRF or from a different CRF in the same event), add the variable here. +tooltip_event_apply_to=Select the Event that this action applies to. +tooltip_event_expression=This expression defines with what you would like the property to be populated with. +tooltip_event_property=Select the property of the above Event that this applies to. +tooltip_notification_subject=The subject of your message. This will be omitted if the message is sent via SMS. +tooltip_notification_message=The body of your message. \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/tags/designer/renderActionRunOnStatusTable.tag b/src/main/webapp/WEB-INF/tags/designer/renderActionRunOnStatusTable.tag new file mode 100644 index 0000000..efef4a9 --- /dev/null +++ b/src/main/webapp/WEB-INF/tags/designer/renderActionRunOnStatusTable.tag @@ -0,0 +1,34 @@ +<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%> +<%@taglib prefix="designerTags" tagdir="/WEB-INF/tags/designer"%> +<%@attribute name="pathPrefix" type="java.lang.String" required="true"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/east.jsp b/src/main/webapp/WEB-INF/views/east.jsp index e110c12..8414e2e 100644 --- a/src/main/webapp/WEB-INF/views/east.jsp +++ b/src/main/webapp/WEB-INF/views/east.jsp @@ -18,6 +18,12 @@

Select an item to view its data.

+
+ +

Entity Metadata

+
+

Select an entity to view its data.

+
+ + + + + + + + + + + + + + + +

diff --git a/src/main/webapp/WEB-INF/views/south.jsp b/src/main/webapp/WEB-INF/views/south.jsp index 131e80f..39fe7b9 100644 --- a/src/main/webapp/WEB-INF/views/south.jsp +++ b/src/main/webapp/WEB-INF/views/south.jsp @@ -3,7 +3,7 @@ \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/west.jsp b/src/main/webapp/WEB-INF/views/west.jsp index 20de6f4..37db2a8 100644 --- a/src/main/webapp/WEB-INF/views/west.jsp +++ b/src/main/webapp/WEB-INF/views/west.jsp @@ -24,7 +24,7 @@ $(function () { }); $("#demo3").jstree({ "dnd": { - "drop_target": "#ocTextArea, input[name*='lazyProperties'], #targetWYSIWYG>div:last, #ruleExpressionWYSIWYG>div:last", + "drop_target": "#ocTextArea, input[name*='lazyProperties'], #targetWYSIWYG>div:last, #ruleExpressionWYSIWYG>div:last, input[name*='lazyEventActions']", "drop_finish": function (data) { //data.r.html(data.o.attr("oid")); @@ -126,7 +126,7 @@ $(function () { $(function () { $("#demo2").jstree({ "dnd": { - "drop_target": "#ocTextArea, input[name*='lazyProperties'], #targetWYSIWYG>div:last, #ruleExpressionWYSIWYG>div:last", + "drop_target": "#ocTextArea, input[name*='lazyProperties'], #targetWYSIWYG>div:last, #ruleExpressionWYSIWYG>div:last, input[name*='lazyEventActions']", "drop_finish": function (data) { //data.r.html(data.o.attr("oid")); if ( data.r.context.nodeName == 'DIV'){ @@ -231,7 +231,7 @@ $(function () { $(function () { $("#demo4").jstree({ "dnd": { - "drop_target": "#ocTextArea, input[name*='lazyProperties'], #targetWYSIWYG>div:last, #ruleExpressionWYSIWYG>div:last", + "drop_target": "#ocTextArea, input[name*='lazyProperties'], #targetWYSIWYG>div:last, #ruleExpressionWYSIWYG>div:last, input[name*='lazyEventActions']", "drop_finish": function (data) { //data.r.html(data.o.attr("oid")); if ( data.r.context.nodeName == 'DIV'){ @@ -248,23 +248,28 @@ $(function () { pos = 0, sel; if (document.selection) { - ctrl.focus(); - var r = document.selection.createRange(); - - if (r == null) { - return 0; - } + ctrl.focus(); + var r = document.selection.createRange(); + + if (r == null) { + return 0; + } - var re = ctrl.createTextRange(), - rc = re.duplicate(); - re.moveToBookmark(r.getBookmark()); - rc.setEndPoint('EndToStart', re); + var re = ctrl.createTextRange(), + rc = re.duplicate(); + re.moveToBookmark(r.getBookmark()); + rc.setEndPoint('EndToStart', re); - pos = rc.text.length; - } else if (ctrl.selectionStart || ctrl.selectionStart == '0') { - pos = ctrl.selectionStart; - } - ctrl.value = ctrl.value.slice(0, pos) + "" + data.o.attr("oid") + "" + ctrl.value.slice(pos); + pos = rc.text.length; + } else if (ctrl.selectionStart || ctrl.selectionStart == '0') { + pos = ctrl.selectionStart; + } + ctrl.value = ctrl.value.slice(0, pos) + "" + data.o.attr("oid") + "" + ctrl.value.slice(pos); + if (data.r.context.id.indexOf("lazyEventActions") > -1 && data.r.context.id.indexOf("OID") > -1 && data.o.attr("id").indexOf(".STARTDATE") > -1) { + var ctrl_value = data.o.attr("oid"); + ctrl.value = ctrl_value.slice(0, ctrl_value.indexOf(".")); + $(document.getElementById(data.r.context.id)).parent().next().find('select').val(ctrl_value.substr(ctrl_value.indexOf(".") + 1)); + } } }, "drag_check": function (data) { @@ -334,13 +339,13 @@ $(function () { - - - + + + } diff --git a/src/main/webapp/includes/bauhouse-fluid960gs-7b59717/css/layout.css b/src/main/webapp/includes/bauhouse-fluid960gs-7b59717/css/layout.css index 21fec60..f10bb1d 100644 --- a/src/main/webapp/includes/bauhouse-fluid960gs-7b59717/css/layout.css +++ b/src/main/webapp/includes/bauhouse-fluid960gs-7b59717/css/layout.css @@ -583,3 +583,96 @@ input.search.button { #kwick .four { background: #999; } + + +/* Notification Action +----------------------------------------------- */ +.onoff_btn { + cursor: pointer; + float: none; + padding-top: 5px; +} + +.time_table { + width: 425px; + border: white; + margin-bottom: -1px; + display: none; + padding-top: 3px; +} + +.time_table_td { + border: white; + background: white; + vertical-align: middle; + padding-right: 0px; +} + +.time_ddown { + border-radius: 5px; + height: 23px; + width: 80px; + background: white; +} + +.evaluate_select { + border-radius: 5px; + height: 23px; + width: 55px; + background: white; +} + +.background_header_div { + width: 560px; + margin-left: 85px; + height: 21px; +} + +.span_header { + padding: 5px; + border-radius: 10px 10px 0px 0px; + background-color: rgb(239, 239, 239); +} + +.background_button_div { + width: 586px; + margin-left: 85px; + background-color: rgb(239, 239, 239); + border: 1px solid rgb(204, 204, 204); + color: white; + font-weight: bold; +} + +.margin_left_notif { + margin-left: -15px; +} + +.span_btn { + border-radius: 5px; + margin-top: 2px; + border: 1px solid #729fcf; + moz-box-shadow: 1px 1px 3px #456B99; + -webkit-box-shadow: 1px 1px 3px #456B99; + box-shadow: 1px 1px 3px #456B99; +} + +.active > .span_btn:hover { + border: 1px solid rgb(102, 102, 102); + background-color: rgb(221, 221, 221); +} + +.img_divider { + width: 1px; + height: 18px; + padding-left: 5px; + margin-bottom: -6px; +} + +.notif_input { + margin-left: 85px; + width: 584px; + height: 25px; + margin-top: -1px; + border: 1px solid rgb(223, 211, 211); + padding: 5px; +} \ No newline at end of file diff --git a/src/main/webapp/includes/designer.js b/src/main/webapp/includes/designer.js index 4ea51a9..7311dee 100644 --- a/src/main/webapp/includes/designer.js +++ b/src/main/webapp/includes/designer.js @@ -1,8 +1,8 @@ - function addRun(propPrefix,idPrefix,runOnAdmin,runOnInitial,runOnDouble,runOnBatch){ - var runOnAdminVal = runOnAdmin == true ? "checked" : ""; - var runOnInitialVal = runOnInitial == true ? "checked" : ""; - var runOnDoubleVal = runOnDouble == true ? "checked" : ""; - var runOnBatchVal = runOnBatch == true ? "checked" : ""; + function addRun(propPrefix,idPrefix,runOnAdmin,runOnInitial,runOnDouble,runOnBatch){ + var runOnAdminVal = runOnAdmin == true ? "checked" : ""; + var runOnInitialVal = runOnInitial == true ? "checked" : ""; + var runOnDoubleVal = runOnDouble == true ? "checked" : ""; + var runOnBatchVal = runOnBatch == true ? "checked" : ""; var html = "
" + "" + "" @@ -52,7 +52,7 @@ + "<\/span><\/legend>" + "

" + "

" + "

" + "

" + "

" + "

" + + "Event Action " //+ index + + "\"Remove\"<\/a>" + + "<\/span><\/legend>" + + "

" + + "

" + + "

" + + "Notification Action " //+ index + + "\"Remove\"<\/a>" + + "<\/span><\/legend>" + + "

" + + "

" + + "

" + + "OpenClinica Variables<\/span>" + + "<\/div>" + + "
" + + "OpenClinica Participant Variables<\/span>" + + "<\/div>" + + "
" + + "
" + + "Study<\/span>" + + "Event<\/span>" + + "<\/div><\/div>" + + "
" + + "
" + + "Participant<\/span>" + + "First Name<\/span>" + + "URL<\/span>" + + "URL+Login<\/span>" + + "Access Code<\/span>" + + "<\/div><\/div>" + + + " " + + "<\/p>

" + + "

" + + "OpenClinica Variables<\/span>" + + "<\/div>" + + "
" + + "OpenClinica Participant Variables<\/span>" + + "<\/div>" + + "
" + + "
" + + "Study<\/span>" + + "Event<\/span>" + + "<\/div><\/div>" + + "
" + + "
" + + "Participant<\/span>" + + "First Name<\/span>" + + "URL<\/span>" + + "URL+Login<\/span>" + + "Access Code<\/span>" + + "<\/div><\/div>" + + + "