You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(39) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(19) |
Feb
(150) |
Mar
(10) |
Apr
|
May
(8) |
Jun
(11) |
Jul
(27) |
Aug
(52) |
Sep
(35) |
Oct
(30) |
Nov
(18) |
Dec
(4) |
2008 |
Jan
(76) |
Feb
(121) |
Mar
(39) |
Apr
(55) |
May
(18) |
Jun
(49) |
Jul
(32) |
Aug
(4) |
Sep
(10) |
Oct
|
Nov
(3) |
Dec
(33) |
2009 |
Jan
(19) |
Feb
(87) |
Mar
(69) |
Apr
(38) |
May
(47) |
Jun
(20) |
Jul
(5) |
Aug
(76) |
Sep
(145) |
Oct
(34) |
Nov
(8) |
Dec
(68) |
2010 |
Jan
(150) |
Feb
(379) |
Mar
(191) |
Apr
(100) |
May
(525) |
Jun
(269) |
Jul
(127) |
Aug
(190) |
Sep
(190) |
Oct
(29) |
Nov
(147) |
Dec
(83) |
2011 |
Jan
(188) |
Feb
(81) |
Mar
(43) |
Apr
(97) |
May
(63) |
Jun
(129) |
Jul
(17) |
Aug
(124) |
Sep
(6) |
Oct
(20) |
Nov
(67) |
Dec
(23) |
2012 |
Jan
(6) |
Feb
(14) |
Mar
(181) |
Apr
(64) |
May
(102) |
Jun
(47) |
Jul
(26) |
Aug
(3) |
Sep
(1) |
Oct
(14) |
Nov
(13) |
Dec
(23) |
2013 |
Jan
(4) |
Feb
(14) |
Mar
(18) |
Apr
(14) |
May
(27) |
Jun
(27) |
Jul
(5) |
Aug
(2) |
Sep
(74) |
Oct
(79) |
Nov
(21) |
Dec
(97) |
2014 |
Jan
(6) |
Feb
(3) |
Mar
(8) |
Apr
|
May
(5) |
Jun
|
Jul
(9) |
Aug
(6) |
Sep
(3) |
Oct
(10) |
Nov
(6) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(25) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <fg...@us...> - 2008-06-20 14:44:09
|
Revision: 847 http://openutils.svn.sourceforge.net/openutils/?rev=847&view=rev Author: fgiust Date: 2008-06-20 07:44:15 -0700 (Fri, 20 Jun 2008) Log Message: ----------- minor touchups Modified Paths: -------------- trunk/openutils-mgnlcontrols/src/site/apt/grid.apt Modified: trunk/openutils-mgnlcontrols/src/site/apt/grid.apt =================================================================== --- trunk/openutils-mgnlcontrols/src/site/apt/grid.apt 2008-06-20 14:40:27 UTC (rev 846) +++ trunk/openutils-mgnlcontrols/src/site/apt/grid.apt 2008-06-20 14:44:15 UTC (rev 847) @@ -12,7 +12,7 @@ The image below shows how the control looks in a dialog: - [images/grid.png] +[images/grid.png] Saving data @@ -20,8 +20,11 @@ The grid control save all its content as a single fields (a newline/tab delimited string). You will need to parse this value in your jsp templates. + Configuration + This is a sample control configuration, you should find it pretty self-explanatory + +------------------------------------------------------+ [*] footer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 846 http://openutils.svn.sourceforge.net/openutils/?rev=846&view=rev Author: fgiust Date: 2008-06-20 07:40:27 -0700 (Fri, 20 Jun 2008) Log Message: ----------- javadoc Modified Paths: -------------- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java Modified: trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java =================================================================== --- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java 2008-06-20 14:38:28 UTC (rev 845) +++ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java 2008-06-20 14:40:27 UTC (rev 846) @@ -191,7 +191,7 @@ } /** - * @return + * @return ftl template path */ protected abstract String getPath(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-20 14:38:21
|
Revision: 845 http://openutils.svn.sourceforge.net/openutils/?rev=845&view=rev Author: fgiust Date: 2008-06-20 07:38:28 -0700 (Fri, 20 Jun 2008) Log Message: ----------- fix module name Modified Paths: -------------- trunk/openutils-mgnlcontrols/src/site/site.xml Modified: trunk/openutils-mgnlcontrols/src/site/site.xml =================================================================== --- trunk/openutils-mgnlcontrols/src/site/site.xml 2008-06-20 14:37:37 UTC (rev 844) +++ trunk/openutils-mgnlcontrols/src/site/site.xml 2008-06-20 14:38:28 UTC (rev 845) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<project name="Openutils mgnlstripes"> +<project name="Openutils mgnlcontrols"> <publishDate position="navigation-bottom" format="yyyy-MM-dd" /> <version position="navigation-bottom" /> <bannerRight> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-20 14:37:32
|
Revision: 844 http://openutils.svn.sourceforge.net/openutils/?rev=844&view=rev Author: fgiust Date: 2008-06-20 07:37:37 -0700 (Fri, 20 Jun 2008) Log Message: ----------- openutils-mgnlcontrols added Modified Paths: -------------- trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2008-06-20 14:37:06 UTC (rev 843) +++ trunk/pom.xml 2008-06-20 14:37:37 UTC (rev 844) @@ -235,6 +235,7 @@ <module>openutils-mgnltasks</module> <module>openutils-spring-rmibernate</module> <module>openutils-mgnlbootstrapsync</module> + <module>openutils-mgnlcontrols</module> <!-- <module>openutils-spring-remote-callback</module>--> </modules> <dependencyManagement> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-20 14:37:03
|
Revision: 843 http://openutils.svn.sourceforge.net/openutils/?rev=843&view=rev Author: fgiust Date: 2008-06-20 07:37:06 -0700 (Fri, 20 Jun 2008) Log Message: ----------- snapshot version Modified Paths: -------------- trunk/openutils-mgnlcontrols/pom.xml Modified: trunk/openutils-mgnlcontrols/pom.xml =================================================================== --- trunk/openutils-mgnlcontrols/pom.xml 2008-06-20 14:35:27 UTC (rev 842) +++ trunk/openutils-mgnlcontrols/pom.xml 2008-06-20 14:37:06 UTC (rev 843) @@ -1,4 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> @@ -9,6 +10,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlcontrols</artifactId> <name>openutils-mgnlcontrols</name> + <version>3.5-SNAPSHOT</version> <licenses> <license> <name>GPLv3</name> @@ -63,4 +65,4 @@ </exclusions> </dependency> </dependencies> -</project> +</project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-20 14:35:27
|
Revision: 842 http://openutils.svn.sourceforge.net/openutils/?rev=842&view=rev Author: fgiust Date: 2008-06-20 07:35:27 -0700 (Fri, 20 Jun 2008) Log Message: ----------- missing license header Modified Paths: -------------- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/setup/ControlsModuleVersionHandler.java Modified: trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/setup/ControlsModuleVersionHandler.java =================================================================== --- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/setup/ControlsModuleVersionHandler.java 2008-06-20 14:34:46 UTC (rev 841) +++ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/setup/ControlsModuleVersionHandler.java 2008-06-20 14:35:27 UTC (rev 842) @@ -1,3 +1,20 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ package net.sourceforge.openutils.mgnlcontrols.setup; import it.openutils.mgnltasks.SimpleModuleVersionHandler; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-20 14:34:47
|
Revision: 841 http://openutils.svn.sourceforge.net/openutils/?rev=841&view=rev Author: fgiust Date: 2008-06-20 07:34:46 -0700 (Fri, 20 Jun 2008) Log Message: ----------- docs Added Paths: ----------- trunk/openutils-mgnlcontrols/src/site/ trunk/openutils-mgnlcontrols/src/site/apt/ trunk/openutils-mgnlcontrols/src/site/apt/grid.apt trunk/openutils-mgnlcontrols/src/site/apt/index.apt trunk/openutils-mgnlcontrols/src/site/changes/ trunk/openutils-mgnlcontrols/src/site/changes/changes.xml trunk/openutils-mgnlcontrols/src/site/resources/ trunk/openutils-mgnlcontrols/src/site/resources/images/ trunk/openutils-mgnlcontrols/src/site/resources/images/grid.png trunk/openutils-mgnlcontrols/src/site/site.xml Added: trunk/openutils-mgnlcontrols/src/site/apt/grid.apt =================================================================== --- trunk/openutils-mgnlcontrols/src/site/apt/grid.apt (rev 0) +++ trunk/openutils-mgnlcontrols/src/site/apt/grid.apt 2008-06-20 14:34:46 UTC (rev 841) @@ -0,0 +1,38 @@ + -------------------------- + openutils-mgnlcontrols + -------------------------- + Fabrizio Giustina + -------------------------- + +The grid control + + The grid control is a {{{http://extjs.com/}extjs}} powered spreadsheet like grid that can be used in magnolia dialogs. + + In order to use it you need to configure a control with the controlType property set to "grid" and declare the number/name of the grid columns and the number of rows. + + The image below shows how the control looks in a dialog: + + [images/grid.png] + + +Saving data + + The grid control save all its content as a single fields (a newline/tab delimited string). You will need to parse this + value in your jsp templates. + +Configuration + ++------------------------------------------------------+ + + [*] footer + [*] columns + [*] col0 + header Text + [*] col1 + header Link + + controlType grid + label links + rows 8 + ++------------------------------------------------------+ Property changes on: trunk/openutils-mgnlcontrols/src/site/apt/grid.apt ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlcontrols/src/site/apt/index.apt (rev 0) +++ trunk/openutils-mgnlcontrols/src/site/apt/index.apt 2008-06-20 14:34:46 UTC (rev 841) @@ -0,0 +1,24 @@ + -------------------------- + openutils-mgnlcontrols + -------------------------- + Fabrizio Giustina + -------------------------- + +About openutils-mgnlcontrols + + openutils-mgnlcontrols is a custom {{{http://www.magnolia.info}magnolia}} module which adds useful controls (at this time one) + that can be used in magnolia dialogs. + + <<This module requires magnolia 3.5.x, and will not work on any earlier version!>> + + The module needs to be installed as usual, by declaring an additional dependency into your pom or by manually dropping the jar + into magnolia. If you are installing it manually, please note that you will also need to install + {{{http://openutils.sourceforge.net/openutils-mgnltasks}openutils-mgnltasks}} + + After installing the openutils-mgnlcontrols module, you will be able to use the new control types in dialogs. See the + {{{grid.html}grid control documentation}} for details. + + +Released versions + + {{{http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-mgnlcontrols}http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-mgnlcontrols}} Property changes on: trunk/openutils-mgnlcontrols/src/site/apt/index.apt ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/site/changes/changes.xml =================================================================== --- trunk/openutils-mgnlcontrols/src/site/changes/changes.xml (rev 0) +++ trunk/openutils-mgnlcontrols/src/site/changes/changes.xml 2008-06-20 14:34:46 UTC (rev 841) @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<!-- + "type" attribute can be: add, remove, update or fix. +--> +<document> + <properties> + <title>Changes</title> + <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> + </properties> + <body> + <release version="3.5" date="2008-06-20" description="first release"> + <action type="new" dev="fgiust">Initial public release. Version numbering starts from 3.5 to match the + compatible magnolia version.</action> + </release> + </body> +</document> \ No newline at end of file Property changes on: trunk/openutils-mgnlcontrols/src/site/changes/changes.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/site/resources/images/grid.png =================================================================== (Binary files differ) Property changes on: trunk/openutils-mgnlcontrols/src/site/resources/images/grid.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: trunk/openutils-mgnlcontrols/src/site/site.xml =================================================================== --- trunk/openutils-mgnlcontrols/src/site/site.xml (rev 0) +++ trunk/openutils-mgnlcontrols/src/site/site.xml 2008-06-20 14:34:46 UTC (rev 841) @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils mgnlstripes"> + <publishDate position="navigation-bottom" format="yyyy-MM-dd" /> + <version position="navigation-bottom" /> + <bannerRight> + <name>Openutils</name> + <src>http://openutils.sourceforge.net/images/openutils-logo.png + </src> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://www.sourceforge.net/projects/openutils</href> + </bannerLeft> + <body> + <head> + <link rel="icon" href="images/favicon.ico" /> + </head> + <breadcrumbs> + <item name="openutils" href="http://openutils.sourceforge.net/" /> + <item name="openutils-mgnlcontrols" href="http://openutils.sourceforge.net/openutils-mgnlcontrols" /> + </breadcrumbs> + <menu name="openutils mgnlcontrols"> + <item name="Intro" href="index.html"></item> + <item name="Grid control" href="grid.html"></item> + </menu> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + </body> + <skin> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-maven-skin</artifactId> + <version>1.1</version> + </skin> +</project> Property changes on: trunk/openutils-mgnlcontrols/src/site/site.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-20 13:57:53
|
Revision: 840 http://openutils.svn.sourceforge.net/openutils/?rev=840&view=rev Author: fgiust Date: 2008-06-20 06:58:00 -0700 (Fri, 20 Jun 2008) Log Message: ----------- import Modified Paths: -------------- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/ext-all-debug.js Added Paths: ----------- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/setup/ControlsModuleVersionHandler.java trunk/openutils-mgnlcontrols/src/main/resources/META-INF/magnolia/controls.xml trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/basic-dialog.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/borders.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/box.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/button.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/combo.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/core.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/date-picker.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/dialog.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/ext-all.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/form.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/grid.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/layout.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/menu.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/panel.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/progress.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/qtips.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/reset-min.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/resizable.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/slider.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/tabs.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/toolbar.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/tree.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/window.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/xtheme-aero.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/xtheme-gray.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/xtheme-vista.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/ext-all.js trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/ext-base.js trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/aero-close-over.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/aero-close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/bg-center.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/bg-left.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/bg-right.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/collapse-over.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/collapse.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/e-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/expand-over.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/expand.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/hd-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/s-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/se-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/w-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/gradient-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/grid/grid-split.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/grid/grid-vista-hd.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/grid/pspbrwse.jbf trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/grid/sort-col-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/grid/sort_asc.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/grid/sort_desc.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/layout/collapse.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/layout/expand.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/layout/gradient-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/layout/ns-expand.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/layout/panel-close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/layout/panel-title-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/layout/panel-title-light-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/layout/tab-close-on.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/layout/tab-close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/menu/menu.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/menu/unchecked.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/ne-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/ne-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/nw-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/se-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/tabs/tab-btm-inactive-left-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/tabs/tab-btm-inactive-right-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/tabs/tab-btm-left-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/tabs/tab-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/tabs/tab-strip-btm-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/toolbar/bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/toolbar/tb-btn-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/basic-dialog/btn-arrow.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/basic-dialog/btn-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/basic-dialog/close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/basic-dialog/collapse.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/basic-dialog/e-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/basic-dialog/expand.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/basic-dialog/hd-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/basic-dialog/progress.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/basic-dialog/progress2.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/basic-dialog/se-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/box/corners-blue.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/box/corners.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/box/l-blue.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/box/l.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/box/r-blue.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/box/r.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/box/tb-blue.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/box/tb.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/button/btn-arrow.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/button/btn-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/dd/drop-add.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/dd/drop-no.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/dd/drop-yes.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/clear-trigger.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/clear-trigger.psd trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/date-trigger.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/date-trigger.psd trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/exclamation.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/search-trigger.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/search-trigger.psd trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/text-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/trigger-tpl.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/trigger.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/trigger.psd trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/gradient-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/Thumbs.db trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/arrow-left-white.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/arrow-right-white.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/col-move-top.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/dirty.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/drop-no.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/drop-yes.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/footer-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/grid-blue-hd.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/grid-blue-split.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/grid-hrow.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/grid-loading.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/grid-split.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/grid-vista-hd.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/grid3-hd-btn.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/grid3-hrow-over.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/grid3-hrow.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/grid3-special-col-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/grid3-special-col-sel-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/group-by.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/group-expand-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/hd-pop.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/hmenu-asc.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/hmenu-desc.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/hmenu-lock.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/hmenu-lock.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/hmenu-unlock.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/hmenu-unlock.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/loading.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/mso-hd.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/nowait.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/page-first-disabled.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/page-first.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/page-last-disabled.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/page-last.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/page-next-disabled.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/page-prev-disabled.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/page-prev.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/pick-button.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/refresh.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/row-expand-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/row-over.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/row-sel.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/sort_asc.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/sort_desc.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/wait.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/collapse.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/expand.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/gradient-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/mini-left.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/mini-right.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/ns-expand.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/panel-close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/stick.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/stuck.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/tab-close-on.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/tab-close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/menu/checked.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/menu/group-checked.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/menu/item-over.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/menu/menu-parent.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/menu/menu.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/menu/unchecked.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/panel/corners-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/panel/left-right.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/panel/tool-sprite-tpl.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/panel/tool-sprites.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/panel/tools-sprites-trans.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/panel/top-bottom.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/panel/top-bottom.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/panel/white-corners-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/panel/white-left-right.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/panel/white-top-bottom.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/progress/progress-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/qtip/bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/qtip/close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/qtip/tip-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/s.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shadow-c.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shadow-lr.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shadow.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shared/blue-loading.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shared/calendar.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shared/hd-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shared/large-loading.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shared/loading-balls.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shared/right-btn.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shared/warning.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/e-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/ne-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/nw-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/nw-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/s-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/se-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/square.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/sw-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/sw-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/slider/slider-bg.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/slider/slider-v-bg.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/slider/slider-v-thumb.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/scroll-left.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/scroll-right.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/scroller-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/tab-btm-inactive-left-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/tab-btm-inactive-right-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/tab-btm-left-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/tab-btm-right-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/tab-close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/tab-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/tab-strip-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/tab-strip-bg.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/tab-strip-btm-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/tabs-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/toolbar/bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/toolbar/btn-arrow-light.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/toolbar/btn-arrow.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/toolbar/btn-over-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/toolbar/tb-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/toolbar/tb-btn-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/arrows.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/drop-add.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/drop-between.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/drop-no.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/drop-over.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/drop-under.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/drop-yes.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/elbow-end-minus-nl.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/elbow-end-plus-nl.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/elbow-end-plus.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/elbow-end.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/elbow-line.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/folder.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/loading.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/icon-error.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/icon-info.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/icon-question.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/left-corners.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/left-right.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/right-corners.psd trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/top-bottom.psd trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/basic-dialog/close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/basic-dialog/collapse.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/basic-dialog/dlg-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/basic-dialog/e-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/basic-dialog/expand.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/basic-dialog/hd-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/basic-dialog/s-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/basic-dialog/se-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/button/btn-arrow.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/button/btn-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/gradient-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/grid/grid-hrow.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/layout/collapse.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/layout/expand.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/layout/gradient-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/layout/ns-collapse.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/layout/ns-expand.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/layout/panel-close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/layout/panel-title-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/layout/stick.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/layout/tab-close-on.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/layout/tab-close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/menu/checked.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/menu/group-checked.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/menu/menu-parent.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/menu/menu.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/menu/unchecked.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/panel/corners-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/panel/left-right.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/panel/light-hd.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/panel/tool-sprite-tpl.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/panel/tools-sprites-trans.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/panel/top-bottom.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/panel/top-bottom.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/panel/white-left-right.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/panel/white-top-bottom.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/s.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/e-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/e-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/ne-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/nw-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/s-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/s-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/se-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/se-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/sw-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/scroll-left.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/scroll-right.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/scroller-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/tab-btm-inactive-right-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/tab-btm-left-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/tab-btm-right-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/tab-close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/tab-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/tab-strip-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/tab-strip-btm-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/toolbar/bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/toolbar/btn-arrow-light.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/toolbar/btn-arrow.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/toolbar/btn-over-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/toolbar/tb-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/window/icon-error.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/window/icon-info.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/window/icon-question.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/window/icon-warning.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/window/left-corners.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/window/left-corners.pspimage trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/window/right-corners.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/window/top-bottom.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/bg-center.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/collapse.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/e-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/expand.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/hd-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/s-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/se-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/w-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/gradient-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/grid/grid-split.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/grid/grid-vista-hd.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/layout/collapse.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/layout/expand.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/layout/gradient-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/layout/ns-collapse.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/layout/ns-expand.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/layout/panel-close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/layout/stick.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/layout/tab-close-on.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/layout/tab-close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/qtip/bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/qtip/tip-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/s.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/e-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/e-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/ne-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/nw-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/nw-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/s-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/s-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/se-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/sw-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/sw-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/tabs/tab-btm-inactive-left-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/tabs/tab-btm-inactive-right-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/tabs/tab-btm-left-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/tabs/tab-btm-right-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/toolbar/tb-btn-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/grid-paste.html trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/img/icon-delete.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/img/icon-paste.png Added: trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java =================================================================== --- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java 2008-06-20 13:58:00 UTC (rev 840) @@ -0,0 +1,198 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package net.sourceforge.openutils.mgnlcontrols.dialog; + +import freemarker.template.TemplateException; +import info.magnolia.cms.core.Content; +import info.magnolia.cms.core.ItemType; +import info.magnolia.cms.core.NodeData; +import info.magnolia.cms.core.SystemProperty; +import info.magnolia.cms.gui.control.ControlImpl; +import info.magnolia.cms.gui.control.FreemarkerControl; +import info.magnolia.cms.gui.dialog.DialogBox; +import info.magnolia.cms.gui.dialog.DialogFreemarker; +import info.magnolia.cms.security.AccessDeniedException; +import info.magnolia.cms.util.NodeDataUtil; + +import java.io.IOException; +import java.io.Writer; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import javax.jcr.PathNotFoundException; +import javax.jcr.PropertyType; +import javax.jcr.RepositoryException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.exception.NestableRuntimeException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * similar to DialogFreemarker but with a fixed template, needed till MAGNOLIA-2175 is done + * @author fgiust + * @version $Id: $ + */ +public abstract class ConfigurableFreemarkerDialog extends DialogBox +{ + + /** + * Logger. + */ + private static Logger log = LoggerFactory.getLogger(DialogFreemarker.class); + + private Map configuration; + + /** + * {@inheritDoc} + */ + @Override + protected List readValues() + { + + List values = new ArrayList(); + + if (this.getStorageNode() != null) + { + try + { + // cycles on website content node to get multiple value + int size = this.getStorageNode().getContent(this.getName()).getNodeDataCollection().size(); + for (int i = 0; i < size; i++) + { + NodeData data = this.getStorageNode().getContent(this.getName()).getNodeData("" + i); + values.add(data.getString()); + } + } + catch (PathNotFoundException e) + { + // not yet existing: OK + } + catch (RepositoryException re) + { + log.error("can't set values", re); + } + } + return values; + } + + /** + * Get a recursive map view of a content node + * @param node content node + * @return recursive map view on content node properties and children + * @throws PathNotFoundException + * @throws RepositoryException + * @throws AccessDeniedException + */ + protected Map getSubNodes(Content node) throws RepositoryException, AccessDeniedException + { + + Map values = new LinkedHashMap(); + + // cycles on properties and stores them in map + Collection properties = node.getNodeDataCollection(); + + if (properties != null && properties.size() > 0) + { + Iterator propertiesIt = properties.iterator(); + while (propertiesIt.hasNext()) + { + NodeData property = (NodeData) propertiesIt.next(); + values.put(property.getName(), NodeDataUtil.getValueObject(property)); + } + } + + // cycle on children + Collection children = node.getChildren(ItemType.CONTENTNODE); + if (children != null && children.size() > 0) + { + Iterator childrenIt = children.iterator(); + while (childrenIt.hasNext()) + { + Content child = (Content) childrenIt.next(); + + // gets sub map + Map subValues = getSubNodes(child); + // stores it in map + values.put(child.getName(), subValues); + } + } + + return values; + } + + /** + * {@inheritDoc} + */ + + @Override + public void init(HttpServletRequest request, HttpServletResponse response, Content websiteNode, Content configNode) + throws RepositoryException + { + super.init(request, response, websiteNode, configNode); + configuration = this.getSubNodes(configNode); + } + + /** + * {@inheritDoc} + */ + @Override + public void drawHtml(Writer out) throws IOException + { + + Map parameters = new HashMap(); + parameters.put("name", this.getName()); + parameters.put("value", this.getValue()); + parameters.put("values", this.getValues()); + parameters.put("request", this.getRequest()); + parameters.put("debug", SystemProperty.getBooleanProperty("magnolia.develop")); + parameters.put("configuration", this.configuration); + this.drawHtmlPre(out); + + try + { + FreemarkerControl control = new FreemarkerControl("multiple".equals(this.getConfigValue("valueType")) + ? ControlImpl.VALUETYPE_MULTIPLE + : ControlImpl.VALUETYPE_SINGLE); + control.setType(this.getConfigValue("type", PropertyType.TYPENAME_STRING)); + control.setName(this.getName()); + control.drawHtml(out, getPath(), parameters); + } + + catch (TemplateException ex) + { + log.error("Error processing dialog template:", ex); + throw new NestableRuntimeException(ex); + } + + this.drawHtmlPost(out); + } + + /** + * @return + */ + protected abstract String getPath(); + +} Property changes on: trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ConfigurableFreemarkerDialog.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/setup/ControlsModuleVersionHandler.java =================================================================== --- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/setup/ControlsModuleVersionHandler.java (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/setup/ControlsModuleVersionHandler.java 2008-06-20 13:58:00 UTC (rev 840) @@ -0,0 +1,13 @@ +package net.sourceforge.openutils.mgnlcontrols.setup; + +import it.openutils.mgnltasks.SimpleModuleVersionHandler; + + +/** + * @author fgiust + * @version $Id$ + */ +public class ControlsModuleVersionHandler extends SimpleModuleVersionHandler +{ + +} Property changes on: trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/setup/ControlsModuleVersionHandler.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/META-INF/magnolia/controls.xml =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/META-INF/magnolia/controls.xml (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/META-INF/magnolia/controls.xml 2008-06-20 13:58:00 UTC (rev 840) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE module SYSTEM "module.dtd"> +<module> + <name>controls</name> + <displayName>controls</displayName> + <description>openutils magnolia controls module</description> + <versionHandler>net.sourceforge.openutils.mgnlcontrols.setup.ControlsModuleVersionHandler</versionHandler> + <version>${project.version}</version> + <dependencies> + <dependency> + <name>adminInterface</name> + <version>3.5/*</version> + </dependency> + <dependency> + <name>cache</name> + <version>3.5/*</version> + </dependency> + </dependencies> +</module> \ No newline at end of file Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/META-INF/magnolia/controls.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl 2008-06-20 13:58:00 UTC (rev 840) @@ -0,0 +1,200 @@ + +<script type="text/javascript" src="${request.contextPath}/.resources/controls/ext/ext-base.js"></script> + +[#if debug] +<script type="text/javascript" src="${request.contextPath}/.resources/controls/ext/ext-all-debug.js"></script> +[#else] +<script type="text/javascript" src="${request.contextPath}/.resources/controls/ext/ext-all.js"></script> +[/#if] + +<link rel="stylesheet" type="text/css" href="${request.contextPath}/.resources/controls/ext/css/ext-all.css" /> + +<input type="hidden" id="${name}" name="${name}" value="${value}"/> + +<div id="grid-container-${name}"> + <div id="grid-${name}"></div> +</div> + + +<script type="text/javascript"> + // <![CDATA[ + +function loadTable${name}(action) { + var numOfRows= ${configuration.rows}; + + var hidden = document.getElementById('${name}'); + var rows = hidden.value.split('\n'); + + var i, myData = []; + for (i = 0; i < numOfRows; i++) { + myData.push(((action != 'delete' && i < rows.length) ? rows[i] : '').split('\t').concat([ undefined, undefined ]).slice(0, 2)); + } + + var dataStore = new Ext.data.SimpleStore({ + fields: ['0', '1'] + }); + dataStore.loadData(myData); + + // shorthand alias + var fm = Ext.form, Ed = Ext.grid.GridEditor; + + var colModel = new Ext.grid.ColumnModel([ + [#list configuration.columns?values as colmap] + { + header: '${colmap.header}', + dataIndex: '${colmap_index}', + sortable: false, + + // todo: gestire checkbox + [#if (colmap.type?? && colmap.type = 'checkbox')] + editor: new Ed(new fm.Checkbox({ + check:false + })) + [#else] + editor: new Ed(new fm.TextField({ + allowBlank: true + })) + [/#if] + }[#if colmap_has_next],[/#if] + [/#list] + ]); + colModel.defaultSortable = true; + + var grid = new Ext.grid.EditorGridPanel({ + store: dataStore, + cm: colModel, + selModel: new Ext.grid.CellSelectionModel(), + autoSizeColumns: true, + enableColLock: false, + clicksToEdit: 1, + renderTo: 'grid-${name}', + tbar: [{ + text: 'Clear all', + tooltip: 'Clear all', + icon: '${request.contextPath}/.resources/controls/img/icon-delete.png', + iconCls: 'button-delete', + handler: function() { + var dat = grid.store.data, cm = grid.getColumnModel(), j, row, k; + for (j = 0; j < dat.length; j++) { + row = dat.item(j); + for (k = 0; k < cm.getColumnCount(); k++) { + row.set(k, ''); + } + } + } + }, { + text: 'Paste from spreadsheet', + tooltip: 'Paste from spreadsheet', + icon: '${request.contextPath}/.resources/controls/img/icon-paste.png', + iconCls: 'button-paste', + handler: function() { + mgnlOpenWindow('/.resources/controls/clipboard.html?name=${name}', 320, 200); + } + }], + viewConfig: { + forceFit: true + } + }); + grid.render(); + grid.view.fitColumns(); + grid.view.onHeaderChange(); + + grid.on('afteredit', function(grid) { + var dat = grid.grid.store.data; + var cm = grid.grid.getColumnModel(); + + var fullValue = '', j, row, k, cell; + for (j = 0; j < dat.length; j++) { + row = dat.item(j); + for (k = 0; k < cm.getColumnCount(); k++) { + cell = row.get(k); + fullValue += cell; + if ((k+1) < cm.getColumnCount()) { + fullValue += '\t'; + } + } + fullValue += '\n'; + } + hidden.value = fullValue.replace(/\r/g, ''); + }, this, true); + + if (action == 'delete') { + document.getElementById(areaName).value = ''; + } + + hidden._grid = grid; +} + +function paste${name}(text) { + var hidden = document.getElementById('${name}'); + var grid = hidden._grid; + var rows, i, I; + var cols, j, J; + + var data = []; + rows = text.split('\n'); + I = rows.length; + if (I > 0 && rows[I - 1] == '') { + I--; + rows.splice(I, 1); + } + J = 0; + for (i = 0; i < I; i++) { + cols = rows[i].split('\t'); + data.push(cols); + if (J < cols.length) J = cols.length; + } + // padding + for (i = 0; i < I; i++) { + cols = rows[i]; + for (j = cols.length; j < J; j++) { + cols.push(''); + } + } + + var cell0, cell1; + if (grid.selModel.selection) { + cell0 = grid.selModel.selection.cell[0]; + cell1 = grid.selModel.selection.cell[1]; + } else { + cell0 = 0; + cell1 = 0; + } + var row, col; + var record, field; + var e; + for (i = 0; i < I; i++) { + row = cell0 + i; + record = grid.store.getAt(row); + if (record) { + for (j = 0; j < J; j++) { + col = cell1 + j; + if (col < grid.colModel.getColumnCount()) { + field = grid.colModel.getDataIndex(col); + e = { + grid: grid, + record: record, + field: field, + originalValue: record.get(field), + value: data[i][j], + row: row, + column: col + }; + record.set(field, e.value); + grid.fireEvent("afteredit", e); + } + } + } + } +} + +Ext.onReady(function(){ + loadTable${name}('load','${name}'); +}); + + + + // ]]> + </script> + +</div> \ No newline at end of file Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/dialogs/grid.ftl ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/basic-dialog.css =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/basic-dialog.css (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/basic-dialog.css 2008-06-20 13:58:00 UTC (rev 840) @@ -0,0 +1,286 @@ +/* + * Ext JS Library 1.1 + * Copyright(c) 2006-2007, Ext JS, LLC. + * lic...@ex... + * + * http://www.extjs.com/license + */ + +.x-dlg-proxy { + background-image: url(../images/default/gradient-bg.gif); + background-color:#c3daf9; + border:1px solid #6593cf; + z-index:10001; + overflow:hidden; + position:absolute; + left:0;top:0; +} +.x-dlg-shadow{ + background:#aaaaaa; + position:absolute; + left:0;top:0; +} +.x-dlg-focus{ + -moz-outline:0 none; + outline:0 none; + width:0; + height:0; + overflow:hidden; + position:absolute; + top:0; + left:0; +} +.x-dlg-mask{ + z-index:10000; + display:none; + position:absolute; + top:0; + left:0; + -moz-opacity: 0.5; + opacity:.50; + filter: alpha(opacity=50); + background-color:#CCC; +} +body.x-body-masked select { + visibility:hidden; +} +body.x-body-masked .x-dlg select { + visibility:visible; +} +.x-dlg{ + z-index:10001; + overflow:hidden; + position:absolute; + left:300;top:0; +} +.x-dlg .x-dlg-hd { + background: url(../images/default/basic-dialog/hd-sprite.gif) repeat-x 0 -82px; + background-color:navy; + color:#FFF; + font:bold 12px "sans serif", tahoma, verdana, helvetica; + overflow:hidden; + padding:5px; + white-space: nowrap; +} +.x-dlg .x-dlg-hd-left { + background: url(../images/default/basic-dialog/hd-sprite.gif) no-repeat 0 -41px; + padding-left:3px; + margin:0; +} +.x-dlg .x-dlg-hd-right { + background: url(../images/default/basic-dialog/hd-sprite.gif) no-repeat right 0; + padding-right:3px; +} +.x-dlg .x-dlg-dlg-body{ + background:url(../images/default/layout/gradient-bg.gif); + border:1px solid #6593cf; + border-top:0 none; + padding:10px; + position:absolute; + top:24px;left:0; + z-index:1; + overflow:hidden; +} +.x-dlg-collapsed .x-resizable-handle{ + display:none; +} +.x-dlg .x-dlg-bd{ + overflow:hidden; +} +.x-dlg .x-dlg-ft{ + overflow:hidden; + padding:5px; + padding-bottom:0; +} + +.x-dlg .x-tabs-body{ + background:white; + overflow:auto; +} +.x-dlg .x-tabs-top .x-tabs-body{ + border:1px solid #6593cf; + border-top:0 none; +} +.x-dlg .x-tabs-bottom .x-tabs-body{ + border:1px solid #6593cf; + border-bottom:0 none; +} +.x-dlg .x-layout-container .x-tabs-body{ + border:0 none; +} +.x-dlg .inner-tab{ + margin:5px; +} +.x-dlg .x-dlg-ft .x-btn{ + margin-right:5px; + float:right; + clear:none; +} +.x-dlg .x-dlg-ft .x-dlg-btns td { + border:0; + padding:0; +} +.x-dlg .x-dlg-ft .x-dlg-btns-right table{ + float:right; + clear:none; +} +.x-dlg .x-dlg-ft .x-dlg-btns-left table{ + float:left; + clear:none; +} +.x-dlg .x-dlg-ft .x-dlg-btns-center{ + text-align:center; /*ie*/ +} +.x-dlg .x-dlg-ft .x-dlg-btns-center table{ + margin:0 auto; /*everyone else*/ +} + + +.x-dlg .x-dlg-ft .x-dlg-btns .x-btn-focus .x-btn-left{ + background-position:0 -147px; +} +.x-dlg .x-dlg-ft .x-dlg-btns .x-btn-focus .x-btn-right{ + background-position:0 -168px; +} +.x-dlg .x-dlg-ft .x-dlg-btns .x-btn-focus .x-btn-center{ + background-position:0 -189px; +} + +.x-dlg .x-dlg-ft .x-dlg-btns .x-btn-click .x-btn-center{ + background-position:0 -126px; +} +.x-dlg .x-dlg-ft .x-dlg-btns .x-btn-click .x-btn-right{ + background-position:0 -84px... [truncated message content] |
From: <fg...@us...> - 2008-06-20 13:26:50
|
Revision: 839 http://openutils.svn.sourceforge.net/openutils/?rev=839&view=rev Author: fgiust Date: 2008-06-20 06:26:47 -0700 (Fri, 20 Jun 2008) Log Message: ----------- openutils-mgnlcontrols first import Added Paths: ----------- trunk/openutils-mgnlcontrols/ trunk/openutils-mgnlcontrols/pom.xml trunk/openutils-mgnlcontrols/src/ trunk/openutils-mgnlcontrols/src/main/ trunk/openutils-mgnlcontrols/src/main/java/ trunk/openutils-mgnlcontrols/src/main/java/net/ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogGrid.java trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/setup/ trunk/openutils-mgnlcontrols/src/main/resources/ trunk/openutils-mgnlcontrols/src/main/resources/META-INF/ trunk/openutils-mgnlcontrols/src/main/resources/META-INF/magnolia/ trunk/openutils-mgnlcontrols/src/main/resources/dialogs/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.grid.xml trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/clipboard.html trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/README.txt trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/dd.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/debug.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/editor.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/reset.css trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/ext-all-debug.js trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/basic-dialog/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/grid/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/grid/grid-blue-split.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/grid/grid-hrow.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/layout/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/layout/ns-collapse.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/menu/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/menu/checked.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/menu/item-over.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/qtip/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/qtip/bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/s.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/e-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/e-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/nw-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/s-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/s-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/se-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/sw-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/sizer/sw-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/tabs/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/tabs/tab-btm-right-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/tabs/tab-strip-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/tabs/tab-strip-bg.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/aero/toolbar/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/basic-dialog/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/basic-dialog/s-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/box/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/button/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/dd/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/editor/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/editor/tb-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/form/error-tip-corners.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/col-move-bottom.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/columns.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/done.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/invalid_line.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/page-next.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/grid/row-check-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/mini-bottom.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/mini-top.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/ns-collapse.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/panel-title-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/layout/panel-title-light-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/menu/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/panel/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/panel/light-hd.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/progress/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/qtip/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shared/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shared/glass-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/shared/left-btn.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/e-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/ne-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/s-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/sizer/se-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/slider/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/slider/slider-thumb.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tabs/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/toolbar/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/toolbar/gray-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/elbow-end-minus.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/elbow-minus-nl.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/elbow-minus.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/elbow-plus-nl.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/elbow-plus.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/elbow.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/folder-open.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/leaf.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/tree/s.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/icon-warning.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/left-corners.psd trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/left-right.psd trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/right-corners.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/default/window/top-bottom.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/basic-dialog/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/button/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/grid/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/layout/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/layout/panel-title-light-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/menu/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/panel/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/panel/tool-sprites.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/panel/white-corners-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/qtip/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/qtip/bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/qtip/close.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/qtip/tip-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/ne-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/nw-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/sizer/sw-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/tab-btm-inactive-left-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/tab-strip-bg.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/tabs/tabs-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/toolbar/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/toolbar/gray-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/toolbar/tb-btn-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/window/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/gray/window/left-right.png trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/bg-left.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/bg-right.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/basic-dialog/dlg-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/grid/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/layout/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/layout/panel-title-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/layout/panel-title-light-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/qtip/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/ne-handle-dark.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/sizer/se-handle.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/tabs/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/tabs/tab-sprite.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/toolbar/ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/images/vista/toolbar/gray-bg.gif trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/img/ Property changes on: trunk/openutils-mgnlcontrols ___________________________________________________________________ Name: svn:ignore + target .settings .checkstyle .classpath .project Added: trunk/openutils-mgnlcontrols/pom.xml =================================================================== --- trunk/openutils-mgnlcontrols/pom.xml (rev 0) +++ trunk/openutils-mgnlcontrols/pom.xml 2008-06-20 13:26:47 UTC (rev 839) @@ -0,0 +1,66 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>8</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + <packaging>jar</packaging> + <artifactId>openutils-mgnlcontrols</artifactId> + <name>openutils-mgnlcontrols</name> + <licenses> + <license> + <name>GPLv3</name> + <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> + </license> + </licenses> + <build> + <resources> + <resource> + <filtering>false</filtering> + <directory>src/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + <resource> + <filtering>true</filtering> + <directory>src/main/resources</directory> + <includes> + <include>META-INF/magnolia/*</include> + </includes> + </resource> + </resources> + </build> + <dependencies> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-core</artifactId> + <version>3.5.8</version> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-module-admininterface</artifactId> + <version>3.5.8</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnltasks</artifactId> + <version>3.5.2</version> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.1</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> +</project> Property changes on: trunk/openutils-mgnlcontrols/pom.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogGrid.java =================================================================== --- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogGrid.java (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogGrid.java 2008-06-20 13:26:47 UTC (rev 839) @@ -0,0 +1,35 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package net.sourceforge.openutils.mgnlcontrols.dialog; + +/** + * @author fgiust + * @version $Id$ + */ +public class DialogGrid extends ConfigurableFreemarkerDialog +{ + + /** + * {@inheritDoc} + */ + @Override + protected String getPath() + { + return "dialogs/grid.ftl"; + } +} Property changes on: trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogGrid.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.grid.xml =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.grid.xml (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.grid.xml 2008-06-20 13:26:47 UTC (rev 839) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="grid" xmlns:jcrutils="xalan://it.openmindonline.urmetdomus.assembler.utils.Path" + xmlns:stringutils="xalan://org.apache.commons.lang.StringUtils" xmlns:jcr="http://www.jcp.org/jcr/1.0" + xmlns:mgnl="http://www.magnolia.info/jcr/mgnl" xmlns:rep="internal" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" + xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:fn="http://www.w3.org/2005/xpath-functions" + xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" + xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" xmlns:jcrfn="http://www.jcp.org/jcr/xpath-functions/1.0"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> + <sv:value>mix:lockable</sv:value> + <sv:value>mix:versionable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>a17aea87-1b2a-4ab1-bc61-64e27e7957ca</sv:value> + </sv:property> + <sv:property sv:name="class" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlcontrols.dialog.DialogGrid</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2008-06-07T18:15:12.496+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2008-06-07T18:15:33.676+02:00</sv:value> + </sv:property> + </sv:node> +</sv:node> Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-bootstrap/controls/config.modules.controls.controls.grid.xml ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/clipboard.html =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/clipboard.html (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/clipboard.html 2008-06-20 13:26:47 UTC (rev 839) @@ -0,0 +1,23 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html> + <head> + <title>Paste from spreadsheet</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <script type="text/javascript" src="../../.magnolia/pages/javascript.js"></script> + <script type="text/javascript" src="../../.resources/admin-js/dialogs/dialogs.js"></script> + <link rel="stylesheet" type="text/css" href="../../.resources/admin-css/admin-all.css" /> + </head> + <body style="padding:0;margin:0"> + <h1 style="background-color:#F0F2E6; color:#396101; font-size:11pt; border-bottom:1px solid #999;margin:0;padding:3px 10px">Paste from spreadsheet</h1> + <p style="margin: 10px;font-size:9pt">Please paste inside the following box using the keyboard (<strong>Ctrl+V</strong>) and hit <strong>OK</strong>.</p> + <p style="margin: 10px"> + <textarea id="clipboard" name="clipboard" rows="4" cols="20" style="width: 100%;border: 1px solid #999"></textarea> + </p> + <div class="mgnlDialogTabsetSaveBar"> + <span class="mgnlControlButton" onclick="opener.window['paste' + location.search.replace(/^.*[?&]name=([^&]+).*$/, '$1')](document.getElementById('clipboard').value); mgnlShiftPushButtonClick(this); window.top.close();" onmouseout="mgnlShiftPushButtonOut(this);" + onmousedown="mgnlShiftPushButtonDown(this);"> + OK + </span> + </div> + </body> +</html> \ No newline at end of file Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/clipboard.html ___________________________________________________________________ Name: svn:mime-type + text/html Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/README.txt =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/README.txt (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/README.txt 2008-06-20 13:26:47 UTC (rev 839) @@ -0,0 +1,3 @@ +2006-11-21 jvs: +ext-all.css contains all of the other css files combined and stripped of comments (except themes). + Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/README.txt ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/dd.css =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/dd.css (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/dd.css 2008-06-20 13:26:47 UTC (rev 839) @@ -0,0 +1,75 @@ +/* + * Ext JS Library 2.1 + * Copyright(c) 2006-2008, Ext JS, LLC. + * lic...@ex... + * + * http://extjs.com/license + */ + +.x-dd-drag-proxy{ + position:absolute; + left:0;top:0; + visibility:hidden; + z-index:15000; +} +.x-dd-drag-ghost{ + color: black; + font: normal 11px arial, helvetica, sans-serif; + -moz-opacity: 0.85; + opacity:.85; + filter: alpha(opacity=85); + border-top:1px solid #dddddd; + border-left:1px solid #dddddd; + border-right:1px solid #bbbbbb; + border-bottom:1px solid #bbbbbb; + padding:3px; + padding-left:20px; + background-color:white; + white-space:nowrap; +} +.x-dd-drag-repair .x-dd-drag-ghost{ + -moz-opacity: 0.4; + opacity:.4; + filter: alpha(opacity=40); + border:0 none; + padding:0; + background-color:transparent; +} +.x-dd-drag-repair .x-dd-drop-icon{ + visibility:hidden; +} +.x-dd-drop-icon{ + position:absolute; + top:3px; + left:3px; + display:block; + width:16px; + height:16px; + background-color:transparent; + background-position: center; + background-repeat: no-repeat; + z-index:1; +} +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + + +.x-view-selector { + position:absolute; + left:0; + top:0; + width:0; + background:#c3daf9; + border:1px dotted #3399bb; + opacity: .5; + -moz-opacity: .5; + filter:alpha(opacity=50); + zoom:1; +} \ No newline at end of file Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/dd.css ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/debug.css =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/debug.css (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/debug.css 2008-06-20 13:26:47 UTC (rev 839) @@ -0,0 +1,37 @@ +/* + * Ext JS Library 2.1 + * Copyright(c) 2006-2008, Ext JS, LLC. + * lic...@ex... + * + * http://extjs.com/license + */ + +#x-debug-browser .x-tree .x-tree-node a span { + color:#222297; + font-size:11px; + padding-top:2px; + font-family:"monotype","courier new",sans-serif; + line-height:18px; +} +#x-debug-browser .x-tree a i { + color:#FF4545; + font-style:normal; +} +#x-debug-browser .x-tree a em { + color:#999; +} +#x-debug-browser .x-tree .x-tree-node .x-tree-selected a span{ + background:#c3daf9; +} +#x-debug-browser .x-tool-toggle { + background-position:0 -75px; +} +#x-debug-browser .x-tool-toggle-over { + background-position:-15px -75px; +} +#x-debug-browser.x-panel-collapsed .x-tool-toggle { + background-position:0 -60px; +} +#x-debug-browser.x-panel-collapsed .x-tool-toggle-over { + background-position:-15px -60px; +} \ No newline at end of file Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/debug.css ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/editor.css =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/editor.css (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/editor.css 2008-06-20 13:26:47 UTC (rev 839) @@ -0,0 +1,66 @@ +/* + * Ext JS Library 2.1 + * Copyright(c) 2006-2008, Ext JS, LLC. + * lic...@ex... + * + * http://extjs.com/license + */ + +.x-html-editor-wrap { + border:1px solid #a9bfd3; + background:white; +} +.x-html-editor-tb .x-btn-text { + background:transparent url(../images/default/editor/tb-sprite.gif) no-repeat; +} +.x-html-editor-tb .x-edit-bold .x-btn-text { + background-position:0 0; +} +.x-html-editor-tb .x-edit-italic .x-btn-text { + background-position:-16px 0; +} +.x-html-editor-tb .x-edit-underline .x-btn-text { + background-position:-32px 0; +} +.x-html-editor-tb .x-edit-forecolor .x-btn-text { + background-position:-160px 0; +} +.x-html-editor-tb .x-edit-backcolor .x-btn-text { + background-position:-176px 0; +} +.x-html-editor-tb .x-edit-justifyleft .x-btn-text { + background-position:-112px 0; +} +.x-html-editor-tb .x-edit-justifycenter .x-btn-text { + background-position:-128px 0; +} +.x-html-editor-tb .x-edit-justifyright .x-btn-text { + background-position:-144px 0; +} +.x-html-editor-tb .x-edit-insertorderedlist .x-btn-text { + background-position:-80px 0; +} +.x-html-editor-tb .x-edit-insertunorderedlist .x-btn-text { + background-position:-96px 0; +} +.x-html-editor-tb .x-edit-increasefontsize .x-btn-text { + background-position:-48px 0; +} +.x-html-editor-tb .x-edit-decreasefontsize .x-btn-text { + background-position:-64px 0; +} +.x-html-editor-tb .x-edit-sourceedit .x-btn-text { + background-position:-192px 0; +} +.x-html-editor-tb .x-edit-createlink .x-btn-text { + background-position:-208px 0; +} + +.x-html-editor-tip .x-tip-bd .x-tip-bd-inner { + padding:5px; + padding-bottom:1px; +} + +.x-html-editor-tb .x-toolbar { + position:static !important; +} \ No newline at end of file Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/editor.css ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/reset.css =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/reset.css (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/reset.css 2008-06-20 13:26:47 UTC (rev 839) @@ -0,0 +1,9 @@ +/* + * Ext JS Library 2.1 + * Copyright(c) 2006-2008, Ext JS, LLC. + * lic...@ex... + * + * http://extjs.com/license + */ + +html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} \ No newline at end of file Property changes on: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/css/reset.css ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/ext-all-debug.js =================================================================== --- trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/ext-all-debug.js (rev 0) +++ trunk/openutils-mgnlcontrols/src/main/resources/mgnl-resources/controls/ext/ext-all-debug.js 2008-06-20 13:26:47 UTC (rev 839) @@ -0,0 +1,34343 @@ +/* + * Ext JS Library 2.1 + * Copyright(c) 2006-2008, Ext JS, LLC. + * lic...@ex... + * + * http://extjs.com/license + */ + + +Ext.DomHelper = function(){ + var tempTableEl = null; + var emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i; + var tableRe = /^table|tbody|tr|td$/i; + + var createHtml = function(o){ + if(typeof o == 'string'){ + return o; + } + var b = ""; + if (Ext.isArray(o)) { + for (var i = 0, l = o.length; i < l; i++) { + b += createHtml(o[i]); + } + return b; + } + if(!o.tag){ + o.tag = "div"; + } + b += "<" + o.tag; + for(var attr in o){ + if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || typeof o[attr] == "function") continue; + if(attr == "style"){ + var s = o["style"]; + if(typeof s == "function"){ + s = s.call(); + } + if(typeof s == "string"){ + b += ' style="' + s + '"'; + }else if(typeof s == "object"){ + b += ' style="'; + for(var key in s){ + if(typeof s[key] != "function"){ + b += key + ":" + s[key] + ";"; + } + } + b += '"'; + } + }else{ + if(attr == "cls"){ + b += ' class="' + o["cls"] + '"'; + }else if(attr == "htmlFor"){ + b += ' for="' + o["htmlFor"] + '"'; + }else{ + b += " " + attr + '="' + o[attr] + '"'; + } + } + } + if(emptyTags.test(o.tag)){ + b += "/>"; + }else{ + b += ">"; + var cn = o.children || o.cn; + if(cn){ + b += createHtml(cn); + } else if(o.html){ + b += o.html; + } + b += "</" + o.tag + ">"; + } + return b; + }; + + + var createDom = function(o, parentNode){ + var el; + if (Ext.isArray(o)) { el = document.createDocumentFragment(); for(var i = 0, l = o.length; i < l; i++) { + createDom(o[i], el); + } + } else if (typeof o == "string") { el = document.createTextNode(o); + } else { + el = document.createElement(o.tag||'div'); + var useSet = !!el.setAttribute; for(var attr in o){ + if(attr == "tag" || attr == "children" || attr == "cn" || attr == "html" || attr == "style" || typeof o[attr] == "function") continue; + if(attr=="cls"){ + el.className = o["cls"]; + }else{ + if(useSet) el.setAttribute(attr, o[attr]); + else el[attr] = o[attr]; + } + } + Ext.DomHelper.applyStyles(el, o.style); + var cn = o.children || o.cn; + if(cn){ + createDom(cn, el); + } else if(o.html){ + el.innerHTML = o.html; + } + } + if(parentNode){ + parentNode.appendChild(el); + } + return el; + }; + + var ieTable = function(depth, s, h, e){ + tempTableEl.innerHTML = [s, h, e].join(''); + var i = -1, el = tempTableEl; + while(++i < depth){ + el = el.firstChild; + } + return el; + }; + + var ts = '<table>', + te = '</table>', + tbs = ts+'<tbody>', + tbe = '</tbody>'+te, + trs = tbs + '<tr>', + tre = '</tr>'+tbe; + + + var insertIntoTable = function(tag, where, el, html){ + if(!tempTableEl){ + tempTableEl = document.createElement('div'); + } + var node; + var before = null; + if(tag == 'td'){ + if(where == 'afterbegin' || where == 'beforeend'){ return; + } + if(where == 'beforebegin'){ + before = el; + el = el.parentNode; + } else{ + before = el.nextSibling; + el = el.parentNode; + } + node = ieTable(4, trs, html, tre); + } + else if(tag == 'tr'){ + if(where == 'beforebegin'){ + before = el; + el = el.parentNode; + node = ieTable(3, tbs, html, tbe); + } else if(where == 'afterend'){ + before = el.nextSibling; + el = el.parentNode; + node = ieTable(3, tbs, html, tbe); + } else{ if(where == 'afterbegin'){ + before = el.firstChild; + } + node = ieTable(4, trs, html, tre); + } + } else if(tag == 'tbody'){ + if(where == 'beforebegin'){ + before = el; + el = el.parentNode; + node = ieTable(2, ts, html, te); + } else if(where == 'afterend'){ + before = el.nextSibling; + el = el.parentNode; + node = ieTable(2, ts, html, te); + } else{ + if(where == 'afterbegin'){ + before = el.firstChild; + } + node = ieTable(3, tbs, html, tbe); + } + } else{ if(where == 'beforebegin' || where == 'afterend'){ return; + } + if(where == 'afterbegin'){ + before = el.firstChild; + } + node = ieTable(2, ts, html, te); + } + el.insertBefore(node, before); + return node; + }; + + + return { + + useDom : false, + + + markup : function(o){ + return createHtml(o); + }, + + + applyStyles : function(el, styles){ + if(styles){ + el = Ext.fly(el); + if(typeof styles == "string"){ + var re = /\s?([a-z\-]*)\:\s?([^;]*);?/gi; + var matches; + while ((matches = re.exec(styles)) != null){ + el.setStyle(matches[1], matches[2]); + } + }else if (typeof styles == "object"){ + for (var style in styles){ + el.setStyle(style, styles[style]); + } + }else if (typeof styles == "function"){ + Ext.DomHelper.applyStyles(el, styles.call()); + } + } + }, + + + insertHtml : function(where, el, html){ + where = where.toLowerCase(); + if(el.insertAdjacentHTML){ + if(tableRe.test(el.tagName)){ + var rs; + if(rs = insertIntoTable(el.tagName.toLowerCase(), where, el, html)){ + return rs; + } + } + switch(where){ + case "beforebegin": + el.insertAdjacentHTML('BeforeBegin', html); + return el.previousSibling; + case "afterbegin": + el.insertAdjacentHTML('AfterBegin', html); + return el.firstChild; + case "beforeend": + el.insertAdjacentHTML('BeforeEnd', html); + return el.lastChild; + case "afterend": + el.insertAdjacentHTML('AfterEnd', html); + return el.nextSibling; + } + throw 'Illegal insertion point -> "' + where + '"'; + } + var range = el.ownerDocument.createRange(); + var frag; + switch(where){ + case "beforebegin": + range.setStartBefore(el); + frag = range.createContextualFragment(html); + el.parentNode.insertBefore(frag, el); + return el.previousSibling; + case "afterbegin": + if(el.firstChild){ + range.setStartBefore(el.firstChild); + frag = range.createContextualFragment(html); + el.insertBefore(frag, el.firstChild); + return el.firstChild; + }else{ + el.innerHTML = html; + return el.firstChild; + } + case "beforeend": + if(el.lastChild){ + range.setStartAfter(el.lastChild); + frag = range.createContextualFragment(html); + el.appendChild(frag); + return el.lastChild; + }else{ + el.innerHTML = html; + return el.lastChild; + } + case "afterend": + range.setStartAfter(el); + frag = range.createContextualFragment(html); + el.parentNode.insertBefore(frag, el.nextSibling); + return el.nextSibling; + } + throw 'Illegal insertion point -> "' + where + '"'; + }, + + + insertBefore : function(el, o, returnElement){ + return this.doInsert(el, o, returnElement, "beforeBegin"); + }, + + + insertAfter : function(el, o, returnElement){ + return this.doInsert(el, o, returnElement, "afterEnd", "nextSibling"); + }, + + + insertFirst : function(el, o, returnElement){ + return this.doInsert(el, o, returnElement, "afterBegin", "firstChild"); + }, + + doInsert : function(el, o, returnElement, pos, sibling){ + el = Ext.getDom(el); + var newNode; + if(this.useDom){ + newNode = createDom(o, null); + (sibling === "firstChild" ? el : el.parentNode).insertBefore(newNode, sibling ? el[sibling] : el); + }else{ + var html = createHtml(o); + newNode = this.insertHtml(pos, el, html); + } + return returnElement ? Ext.get(newNode, true) : newNode; + }, + + + append : function(el, o, returnElement){ + el = Ext.getDom(el); + var newNode; + if(this.useDom){ + newNode = createDom(o, null); + el.appendChild(newNode); + }else{ + var html = createHtml(o); + newNode = this.insertHtml("beforeEnd", el, html); + } + return returnElement ? Ext.get(newNode, true) : newNode; + }, + + + overwrite : function(el, o, returnElement){ + el = Ext.getDom(el); + el.innerHTML = createHtml(o); + return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; + }, + + + createTemplate : function(o){ + var html = createHtml(o); + return new Ext.Template(html); + } + }; +}(); + + +Ext.Template = function(html){ + var a = arguments; + if(Ext.isArray(html)){ + html = html.join(""); + }else if(a.length > 1){ + var buf = []; + for(var i = 0, len = a.length; i < len; i++){ + if(typeof a[i] == 'object'){ + Ext.apply(this, a[i]); + }else{ + buf[buf.length] = a[i]; + } + } + html = buf.join(''); + } + + this.html = html; + if(this.compiled){ + this.compile(); + } +}; +Ext.Template.prototype = { + + applyTemplate : function(values){ + if(this.compiled){ + return this.compiled(values); + } + var useF = this.disableFormats !== true; + var fm = Ext.util.Format, tpl = this; + var fn = function(m, name, format, args){ + if(format && useF){ + if(format.substr(0, 5) == "this."){ + return tpl.call(format.substr(5), values[name], values); + }else{ + if(args){ + var re = /^\s*['"](.*)["']\s*$/; + args = args.split(','); + for(var i = 0, len = args.length; i < len; i++){ + args[i] = args[i].replace(re, "$1"); + } + args = [values[name]].concat(args); + }else{ + args = [values[name]]; + } + return fm[format].apply(fm, args); + } + }else{ + return values[name] !== undefined ? values[name] : ""; + } + }; + return this.html.replace(this.re, fn); + }, + + + set : function(html, compile){ + this.html = html; + this.compiled = null; + if(compile){ + this.compile(); + } + return this; + }, + + + disableFormats : false, + + + re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, + + + compile : function(){ + var fm = Ext.util.Format; + var useF = this.disableFormats !== true; + var sep = Ext.isGecko ? "+" : ","; + var fn = function(m, name, format, args){ + if(format && useF){ + args = args ? ',' + args : ""; + if(format.substr(0, 5) != "this."){ + format = "fm." + format + '('; + }else{ + format = 'this.call("'+ format.substr(5) + '", '; + args = ", values"; + } + }else{ + args= ''; format = "(values['" + name + "'] == undefined ? '' : "; + } + return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'"; + }; + var body; + if(Ext.isGecko){ + body = "this.compiled = function(values){ return '" + + this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) + + "';};"; + }else{ + body = ["this.compiled = function(values){ return ['"]; + body.push(this.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn)); + body.push("'].join('');};"); + body = body.join(''); + } + eval(body); + return this; + }, + + call : function(fnName, value, allValues){ + return this[fnName](value, allValues); + }, + + + insertFirst: function(el, values, returnElement){ + return this.doInsert('afterBegin', el, values, returnElement); + }, + + + insertBefore: function(el, values, returnElement){ + return this.doInsert('beforeBegin', el, values, returnElement); + }, + + + insertAfter : function(el, values, returnElement){ + return this.doInsert('afterEnd', el, values, returnElement); + }, + + + append : function(el, values, returnElement){ + return this.doInsert('beforeEnd', el, values, returnElement); + }, + + doInsert : function(where, el, values, returnEl){ + el = Ext.getDom(el); + var newNode = Ext.DomHelper.insertHtml(where, el, this.applyTemplate(values)); + return returnEl ? Ext.get(newNode, true) : newNode; + }, + + + overwrite : function(el, values, returnElement){ + el = Ext.getDom(el); + el.innerHTML = this.applyTemplate(values); + return returnElement ? Ext.get(el.firstChild, true) : el.firstChild; + } +}; + +Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; + +Ext.DomHelper.Template = Ext.Template; + + +Ext.Template.from = function(el, config){ + el = Ext.getDom(el); + return new Ext.Template(el.value || el.innerHTML, config || ''); +}; + + +Ext.DomQuery = function(){ + var cache = {}, simpleCache = {}, valueCache = {}; + var nonSpace = /\S/; + var trimRe = /^\s+|\s+$/g; + var tplRe = /\{(\d+)\}/g; + var modeRe = /^(\s?[\/>+~]\s?|\s|$)/; + var tagTokenRe = /^(#)?([\w-\*]+)/; + var nthRe = /(\d*)n\+?(\d*)/, nthRe2 = /\D/; + + function child(p, index){ + var i = 0; + var n = p.firstChild; + while(n){ + if(n.nodeType == 1){ + if(++i == index){ + return n; + } + } + n = n.nextSibling; + } + return null; + }; + + function next(n){ + while((n = n.nextSibling) && n.nodeType != 1); + return n; + }; + + function prev(n){ + while((n = n.previousSibling) && n.nodeType != 1); + return n; + }; + + function children(d){ + var n = d.firstChild, ni = -1; + while(n){ + var nx = n.nextSibling; + if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ + d.removeChild(n); + }else{ + n.nodeIndex = ++ni; + } + n = nx; + } + return this; + }; + + function byClassName(c, a, v){ + if(!v){ + return c; + } + var r = [], ri = -1, cn; + for(var i = 0, ci; ci = c[i]; i++){ + if((' '+ci.className+' ').indexOf(v) != -1){ + r[++ri] = ci; + } + } + return r; + }; + + function attrValue(n, attr){ + if(!n.tagName && typeof n.length != "undefined"){ + n = n[0]; + } + if(!n){ + return null; + } + if(attr == "for"){ + return n.htmlFor; + } + if(attr == "class" || attr == "className"){ + return n.className; + } + return n.getAttribute(attr) || n[attr]; + + }; + + function getNodes(ns, mode, tagName){ + var result = [], ri = -1, cs; + if(!ns){ + return result; + } + tagName = tagName || "*"; + if(typeof ns.getElementsByTagName != "undefined"){ + ns = [ns]; + } + if(!mode){ + for(var i = 0, ni; ni = ns[i]; i++){ + cs = ni.getElementsByTagName(tagName); + for(var j = 0, ci; ci = cs[j]; j++){ + result[++ri] = ci; + } + } + }else if(mode == "/" || mode == ">"){ + var utag = tagName.toUpperCase(); + for(var i = 0, ni, cn; ni = ns[i]; i++){ + cn = ni.children || ni.childNodes; + for(var j = 0, cj; cj = cn[j]; j++){ + if(cj.nodeName == utag || cj.nodeName == tagName || tagName == '*'){ + result[++ri] = cj; + } + } + } + }else if(mode == "+"){ + var utag = tagName.toUpperCase(); + for(var i = 0, n; n = ns[i]; i++){ + while((n = n.nextSibling) && n.nodeType != 1); + if(n && (n.nodeName == utag || n.nodeName == tagName || tagName == '*')){ + result[++ri] = n; + } + } + }else if(mode == "~"){ + for(var i = 0, n; n = ns[i]; i++){ + while((n = n.nextSibling) && (n.nodeType != 1 || (tagName == '*' || n.tagName.toLowerCase()!=tagName))); + if(n){ + result[++ri] = n; + } + } + } + return result; + }; + + function concat(a, b){ + if(b.slice){ + return a.concat(b); + } + for(var i = 0, l = b.length; i < l; i++){ + a[a.length] = b[i]; + } + return a; + } + + function byTag(cs, tagName){ + if(cs.tagName || cs == document){ + cs = [cs]; + } + if(!tagName){ + return cs; + } + var r = [], ri = -1; + tagName = tagName.toLowerCase(); + for(var i = 0, ci; ci = cs[i]; i++){ + if(ci.nodeType == 1 && ci.tagName.toLowerCase()==tagName){ + r[++ri] = ci; + } + } + return r; + }; + + function byId(cs, attr, id){ + if(cs.tagName || cs == document){ + cs = [cs]; + } + if(!id){ + return cs; + } + var r = [], ri = -1; + for(var i = 0,ci; ci = cs[i]; i++){ + if(ci && ci.id == id){ + r[++ri] = ci; + return r; + } + } + return r; + }; + + function byAttribute(cs, attr, value, op, custom){ + var r = [], ri = -1, st = custom=="{"; + var f = Ext.DomQuery.operators[op]; + for(var i = 0, ci; ci = cs[i]; i++){ + var a; + if(st){ + a = Ext.DomQuery.getStyle(ci, attr); + } + else if(attr == "class" || attr == "className"){ + a = ci.className; + }else if(attr == "for"){ + a = ci.htmlFor; + }else if(attr == "href"){ + a = ci.getAttribute("href", 2); + }else{ + a = ci.getAttribute(attr); + } + if((f && f(a, value)) || (!f && a)){ + r[++ri] = ci; + } + } + return r; + }; + + function byPseudo(cs, name, value){ + return Ext.DomQuery.pseudos[name](cs, value); + }; + + + + + var isIE = window.ActiveXObject ? true : false; + + + + eval("var batch = 30803;"); + + var key = 30803; + + function nodupIEXml(cs){ + var d = ++key; + cs[0].setAttribute("_nodup", d); + var r = [cs[0]]; + for(var i = 1, len = cs.length; i < len; i++){ + var c = cs[i]; + if(!c.getAttribute("_nodup") != d){ + c.setAttribute("_nodup", d); + r[r.length] = c; + } + } + for(var i = 0, len = cs.length; i < len; i++){ + cs[i].removeAttribute("_nodup"); + } + return r; + } + + function nodup(cs){ + if(!cs){ + return []; + } + var len = cs.length, c, i, r = cs, cj, ri = -1; + if(!len || typeof cs.nodeType != "undefined" || len == 1){ + return cs; + } + if(isIE && typeof cs[0].selectSingleNode != "undefined"){ + return nodupIEXml(cs); + } + var d = ++key; + cs[0]._nodup = d; + for(i = 1; c = cs[i]; i++){ + if(c._nodup != d){ + c._nodup = d; + }else{ + r = []; + for(var j = 0; j < i; j++){ + r[++ri] = cs[j]; + } + for(j = i+1; cj = cs[j]; j++){ + if(cj._nodup != d){ + cj._nodup = d; + r[++ri] = cj; + } + } + return r; + } + } + return r; + } + + function quickDiffIEXml(c1, c2){ + var d = ++key; + for(var i = 0, len = c1.length; i < len; i++){ + c1[i].setAttribute("_qdiff", d); + } + var r = []; + for(var i = 0, len = c2.length; i < len; i++){ + if(c2[i].getAttribute("_qdiff") != d){ + r[r.length] = c2[i]; + } + } + for(var i = 0, len = c1.length; i < len; i++){ + c1[i].removeAttribute("_qdiff"); + } + return r; + } + + function quickDiff(c1, c2){ + var len1 = c1.length; + if(!len1){ + return c2; + } + if(isIE && c1[0].selectSingleNode){ + return quickDiffIEXml(c1, c2); + } + var d = ++key; + for(var i = 0; i < len1; i++){ + c1[i]._qdiff = d; + } + var r = []; + for(var i = 0, len = c2.length; i < len; i++){ + if(c2[i]._qdiff != d){ + r[r.length] = c2[i]; + } + } + return r; + } + + function quickId(ns, mode, root, id){ + if(ns == root){ + var d = root.ownerDocument || root; + return d.getElementById(id); + } + ns = getNodes(ns, mode, "*"); + return byId(ns, null, id); + } + + return { + getStyle : function(el, name){ + return Ext.fly(el).getStyle(name); + }, + + compile : function(path, type){ + type = type || "select"; + + var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"]; + var q = path, mode, lq; + var tk = Ext.DomQuery.matchers; + var tklen = tk.length; + var mm; + + + var lmode = q.match(modeRe); + if(lmode && lmode[1]){ + fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";'; + q = q.replace(lmode[1], ""); + } + + while(path.substr(0, 1)=="/"){ + path = path.substr(1); + } + + while(q && lq != q){ + lq = q; + var tm = q.match(tagTokenRe); + if(type == "select"){ + if(tm){ + if(tm[1] == "#"){ + fn[fn.length] = 'n = quickId(n, mode, root, "'+tm[2]+'");'; + }else{ + fn[fn.length] = 'n = getNodes(n, mode, "'+tm[2]+'");'; + } + q = q.replace(tm[0], ""); + }else if(q.substr(0, 1) != '@'){ + fn[fn.le... [truncated message content] |
From: <fg...@us...> - 2008-06-11 21:27:27
|
Revision: 838 http://openutils.svn.sourceforge.net/openutils/?rev=838&view=rev Author: fgiust Date: 2008-06-11 14:26:56 -0700 (Wed, 11 Jun 2008) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-dbmigration/pom.xml Modified: trunk/openutils-dbmigration/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2008-06-11 21:25:54 UTC (rev 837) +++ trunk/openutils-dbmigration/pom.xml 2008-06-11 21:26:56 UTC (rev 838) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-dbmigration</artifactId> <name>openutils db migration</name> - <version>2.0.4</version> + <version>2.0.5-SNAPSHOT</version> <description /> <dependencies> <dependency> @@ -93,10 +93,4 @@ <properties> <spring.version>2.5.1</spring.version> </properties> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-2.0.4</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-2.0.4</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-dbmigration-2.0.4</url> - </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-11 21:26:37
|
Revision: 837 http://openutils.svn.sourceforge.net/openutils/?rev=837&view=rev Author: fgiust Date: 2008-06-11 14:25:54 -0700 (Wed, 11 Jun 2008) Log Message: ----------- [maven-release-plugin] copy for tag openutils-dbmigration-2.0.4 Added Paths: ----------- tags/openutils-dbmigration-2.0.4/ tags/openutils-dbmigration-2.0.4/pom.xml tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java tags/openutils-dbmigration-2.0.4/src/site/changes/changes.xml Removed Paths: ------------- tags/openutils-dbmigration-2.0.4/pom.xml tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java tags/openutils-dbmigration-2.0.4/src/site/changes/changes.xml Copied: tags/openutils-dbmigration-2.0.4 (from rev 824, trunk/openutils-dbmigration) Deleted: tags/openutils-dbmigration-2.0.4/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2008-05-07 12:57:08 UTC (rev 824) +++ tags/openutils-dbmigration-2.0.4/pom.xml 2008-06-11 21:25:54 UTC (rev 837) @@ -1,96 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>8</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-dbmigration</artifactId> - <name>openutils db migration</name> - <version>2.0.4-SNAPSHOT</version> - <description /> - <dependencies> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.3</version> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>1.3</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-jdbc</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-beans</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>1.4.1</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>jcl104-over-slf4j</artifactId> - <version>1.4.1</version> - </dependency> - <dependency> - <groupId>org.apache.poi</groupId> - <artifactId>poi</artifactId> - <version>3.0-FINAL</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <classifier>jdk15</classifier> - <version>5.1</version> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - <properties> - <spring.version>2.5.1</spring.version> - </properties> -</project> \ No newline at end of file Copied: tags/openutils-dbmigration-2.0.4/pom.xml (from rev 836, trunk/openutils-dbmigration/pom.xml) =================================================================== --- tags/openutils-dbmigration-2.0.4/pom.xml (rev 0) +++ tags/openutils-dbmigration-2.0.4/pom.xml 2008-06-11 21:25:54 UTC (rev 837) @@ -0,0 +1,102 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>8</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-dbmigration</artifactId> + <name>openutils db migration</name> + <version>2.0.4</version> + <description /> + <dependencies> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>1.3</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-jdbc</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl104-over-slf4j</artifactId> + <version>1.4.1</version> + </dependency> + <dependency> + <groupId>org.apache.poi</groupId> + <artifactId>poi</artifactId> + <version>3.0-FINAL</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.1</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + <properties> + <spring.version>2.5.1</spring.version> + </properties> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-2.0.4</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-2.0.4</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-dbmigration-2.0.4</url> + </scm> +</project> \ No newline at end of file Deleted: tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java 2008-05-07 12:57:08 UTC (rev 824) +++ tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java 2008-06-11 21:25:54 UTC (rev 837) @@ -1,178 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.migration.generic; - -import it.openutils.migration.task.setup.BaseConditionalTask; - -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.ResultSet; -import java.sql.ResultSetMetaData; -import java.sql.SQLException; -import java.util.HashMap; -import java.util.Map; - -import org.apache.commons.lang.StringUtils; -import org.springframework.dao.DataAccessException; -import org.springframework.jdbc.core.ConnectionCallback; -import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; - - -/** - * Base conditional task that operates on conditions related to a specific column. This base task takes care of - * retrieving the column metadata, so that subclasses only need to override <code>checkColumnMetadata()</code>. - * @author fgiust - * @version $Id$ - */ -public abstract class JdbcColumnBasedConditionalTask extends BaseConditionalTask -{ - - /** - * Column name - */ - protected String column; - - /** - * Catalog name - */ - protected String catalog; - - /** - * Schema name - */ - protected String schema; - - /** - * Sets the catalog. - * @param catalog the catalog to set - */ - public void setCatalog(String catalog) - { - this.catalog = catalog; - } - - /** - * Sets the schema. - * @param schema the schema to set - */ - public void setSchema(String schema) - { - this.schema = schema; - } - - /** - * Sets the column. - * @param column the column to set - */ - public void setColumn(String column) - { - this.column = column; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean check(SimpleJdbcTemplate jdbcTemplate) - { - - String columnTrim = StringUtils.trim(column); - - final String tableName = StringUtils.substringBefore(columnTrim, "."); - final String columnName = StringUtils.substringAfter(columnTrim, "."); - return (Boolean) jdbcTemplate.getJdbcOperations().execute(new ConnectionCallback() - { - - public Object doInConnection(Connection con) throws SQLException, DataAccessException - { - DatabaseMetaData dbMetadata = con.getMetaData(); - ResultSet rs = dbMetadata.getColumns(catalog, schema, tableName, columnName); - boolean conditionMet = rs.next(); - if (conditionMet) - { - ResultSetMetaData rsmeta = rs.getMetaData(); - int colcount = rsmeta.getColumnCount(); - Map<String, Object> params = new HashMap<String, Object>(); - for (int j = 1; j <= colcount; j++) - { - params.put(rsmeta.getColumnName(j), rs.getObject(j)); - } - conditionMet = !checkColumnMetadata(params); - } - rs.close(); - return conditionMet; - } - }); - } - - /** - * <p> - * Check if a specific condition is met depending on column metadata. - * </p> - * Column attributes included in the Map are: - * <ol> - * <li><strong>TABLE_CAT</strong> String => table catalog (may be <code>null</code>)</li> - * <li><strong>TABLE_SCHEM</strong> String => table schema (may be <code>null</code>)</li> - * <li><strong>TABLE_NAME</strong> String => table name</li> - * <li><strong>COLUMN_NAME</strong> String => column name</li> - * <li><strong>DATA_TYPE</strong> int => SQL type from java.sql.Types</li> - * <li><strong>TYPE_NAME</strong> String => Data source dependent type name, for a UDT the type name is fully - * qualified</li> - * <li><strong>COLUMN_SIZE</strong> int => column size.</li> - * <li><strong>BUFFER_LENGTH</strong> is not used.</li> - * <li><strong>DECIMAL_DIGITS</strong> int => the number of fractional digits. Null is returned for data types - * where DECIMAL_DIGITS is not applicable.</li> - * <li><strong>NUM_PREC_RADIX</strong> int => Radix (typically either 10 or 2)</li> - * <li><strong>NULLABLE</strong> int => is NULL allowed.</li> - * <ul> - * <li> columnNoNulls - might not allow <code>NULL</code> values</li> - * <li> columnNullable - definitely allows <code>NULL</code> values</li> - * <li> columnNullableUnknown - nullability unknown</li> - * </ul> - * <li><strong>REMARKS</strong> String => comment describing column (may be <code>null</code>)</li> - * <li><strong>COLUMN_DEF</strong> String => default value for the column, which should be interpreted as a string - * when the value is enclosed in single quotes (may be <code>null</code>)</li> - * <li><strong>SQL_DATA_TYPE</strong> int => unused</li> - * <li><strong>SQL_DATETIME_SUB</strong> int => unused</li> - * <li><strong>CHAR_OCTET_LENGTH</strong> int => for char types the maximum number of bytes in the column</li> - * <li><strong>ORDINAL_POSITION</strong> int => index of column in table (starting at 1)</li> - * <li><strong>IS_NULLABLE</strong> String => ISO rules are used to determine the nullability for a column.</li> - * <ul> - * <li> YES --- if the parameter can include NULLs</li> - * <li> NO --- if the parameter cannot include NULLs</li> - * <li> empty string --- if the nullability for the parameter is unknown</li> - * </ul> - * <li><strong>SCOPE_CATLOG</strong> String => catalog of table that is the scope of a reference attribute (<code>null</code> - * if DATA_TYPE isn't REF)</li> - * <li><strong>SCOPE_SCHEMA</strong> String => schema of table that is the scope of a reference attribute (<code>null</code> - * if the DATA_TYPE isn't REF)</li> - * <li><strong>SCOPE_TABLE</strong> String => table name that this the scope of a reference attribure (<code>null</code> - * if the DATA_TYPE isn't REF)</li> - * <li><strong>SOURCE_DATA_TYPE</strong> short => source type of a distinct type or user-generated Ref type, SQL - * type from java.sql.Types (<code>null</code> if DATA_TYPE isn't DISTINCT or user-generated REF)</li> - * <li><strong>IS_AUTOINCREMENT</strong> String => Indicates whether this column is auto incremented</li> - * <ul> - * <li> YES --- if the column is auto incremented</li> - * <li> NO --- if the column is not auto incremented</li> - * <li> empty string --- if it cannot be determined whether the column is auto incremented parameter is unknown</li> - * </ul> - * </ol> - * @param metadata column metadata - * @return <code>true</code> if the condition is met - */ - protected abstract boolean checkColumnMetadata(Map<String, Object> metadata); - -} Copied: tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java (from rev 834, trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java) =================================================================== --- tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java (rev 0) +++ tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java 2008-06-11 21:25:54 UTC (rev 837) @@ -0,0 +1,178 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.openutils.migration.generic; + +import it.openutils.migration.task.setup.BaseConditionalTask; + +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang.StringUtils; +import org.springframework.dao.DataAccessException; +import org.springframework.jdbc.core.ConnectionCallback; +import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; + + +/** + * Base conditional task that operates on conditions related to a specific column. This base task takes care of + * retrieving the column metadata, so that subclasses only need to override <code>checkColumnMetadata()</code>. + * @author fgiust + * @version $Id$ + */ +public abstract class JdbcColumnBasedConditionalTask extends BaseConditionalTask +{ + + /** + * Column name + */ + protected String column; + + /** + * Catalog name + */ + protected String catalog; + + /** + * Schema name + */ + protected String schema; + + /** + * Sets the catalog. + * @param catalog the catalog to set + */ + public void setCatalog(String catalog) + { + this.catalog = catalog; + } + + /** + * Sets the schema. + * @param schema the schema to set + */ + public void setSchema(String schema) + { + this.schema = schema; + } + + /** + * Sets the column. + * @param column the column to set + */ + public void setColumn(String column) + { + this.column = column; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean check(SimpleJdbcTemplate jdbcTemplate) + { + + String columnTrim = StringUtils.trim(column); + + final String tableName = StringUtils.substringBefore(columnTrim, "."); + final String columnName = StringUtils.substringAfter(columnTrim, "."); + return (Boolean) jdbcTemplate.getJdbcOperations().execute(new ConnectionCallback() + { + + public Object doInConnection(Connection con) throws SQLException, DataAccessException + { + DatabaseMetaData dbMetadata = con.getMetaData(); + ResultSet rs = dbMetadata.getColumns(catalog, schema, tableName, columnName); + boolean conditionMet = rs.next(); + if (conditionMet) + { + ResultSetMetaData rsmeta = rs.getMetaData(); + int colcount = rsmeta.getColumnCount(); + Map<String, Object> params = new HashMap<String, Object>(); + for (int j = 1; j <= colcount; j++) + { + params.put(rsmeta.getColumnName(j), rs.getObject(j)); + } + conditionMet = checkColumnMetadata(params); + } + rs.close(); + return conditionMet; + } + }); + } + + /** + * <p> + * Check if a specific condition is met depending on column metadata. + * </p> + * Column attributes included in the Map are: + * <ol> + * <li><strong>TABLE_CAT</strong> String => table catalog (may be <code>null</code>)</li> + * <li><strong>TABLE_SCHEM</strong> String => table schema (may be <code>null</code>)</li> + * <li><strong>TABLE_NAME</strong> String => table name</li> + * <li><strong>COLUMN_NAME</strong> String => column name</li> + * <li><strong>DATA_TYPE</strong> int => SQL type from java.sql.Types</li> + * <li><strong>TYPE_NAME</strong> String => Data source dependent type name, for a UDT the type name is fully + * qualified</li> + * <li><strong>COLUMN_SIZE</strong> int => column size.</li> + * <li><strong>BUFFER_LENGTH</strong> is not used.</li> + * <li><strong>DECIMAL_DIGITS</strong> int => the number of fractional digits. Null is returned for data types + * where DECIMAL_DIGITS is not applicable.</li> + * <li><strong>NUM_PREC_RADIX</strong> int => Radix (typically either 10 or 2)</li> + * <li><strong>NULLABLE</strong> int => is NULL allowed.</li> + * <ul> + * <li> columnNoNulls - might not allow <code>NULL</code> values</li> + * <li> columnNullable - definitely allows <code>NULL</code> values</li> + * <li> columnNullableUnknown - nullability unknown</li> + * </ul> + * <li><strong>REMARKS</strong> String => comment describing column (may be <code>null</code>)</li> + * <li><strong>COLUMN_DEF</strong> String => default value for the column, which should be interpreted as a string + * when the value is enclosed in single quotes (may be <code>null</code>)</li> + * <li><strong>SQL_DATA_TYPE</strong> int => unused</li> + * <li><strong>SQL_DATETIME_SUB</strong> int => unused</li> + * <li><strong>CHAR_OCTET_LENGTH</strong> int => for char types the maximum number of bytes in the column</li> + * <li><strong>ORDINAL_POSITION</strong> int => index of column in table (starting at 1)</li> + * <li><strong>IS_NULLABLE</strong> String => ISO rules are used to determine the nullability for a column.</li> + * <ul> + * <li> YES --- if the parameter can include NULLs</li> + * <li> NO --- if the parameter cannot include NULLs</li> + * <li> empty string --- if the nullability for the parameter is unknown</li> + * </ul> + * <li><strong>SCOPE_CATLOG</strong> String => catalog of table that is the scope of a reference attribute (<code>null</code> + * if DATA_TYPE isn't REF)</li> + * <li><strong>SCOPE_SCHEMA</strong> String => schema of table that is the scope of a reference attribute (<code>null</code> + * if the DATA_TYPE isn't REF)</li> + * <li><strong>SCOPE_TABLE</strong> String => table name that this the scope of a reference attribure (<code>null</code> + * if the DATA_TYPE isn't REF)</li> + * <li><strong>SOURCE_DATA_TYPE</strong> short => source type of a distinct type or user-generated Ref type, SQL + * type from java.sql.Types (<code>null</code> if DATA_TYPE isn't DISTINCT or user-generated REF)</li> + * <li><strong>IS_AUTOINCREMENT</strong> String => Indicates whether this column is auto incremented</li> + * <ul> + * <li> YES --- if the column is auto incremented</li> + * <li> NO --- if the column is not auto incremented</li> + * <li> empty string --- if it cannot be determined whether the column is auto incremented parameter is unknown</li> + * </ul> + * </ol> + * @param metadata column metadata + * @return <code>true</code> if the condition is met + */ + protected abstract boolean checkColumnMetadata(Map<String, Object> metadata); + +} Deleted: tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java 2008-05-07 12:57:08 UTC (rev 824) +++ tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java 2008-06-11 21:25:54 UTC (rev 837) @@ -1,108 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.migration.generic; - -import it.openutils.migration.task.setup.BaseConditionalTask; - -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.ResultSet; -import java.sql.SQLException; - -import org.apache.commons.lang.StringUtils; -import org.springframework.dao.DataAccessException; -import org.springframework.jdbc.core.ConnectionCallback; -import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; - - -/** - * Task that executes if a given column exists. - * @author fgiust - * @version $Id: $ - */ -public class JdbcIfColumnExistsConditionalTask extends BaseConditionalTask -{ - - /** - * Column name. - */ - protected String column; - - /** - * Catalog. - */ - protected String catalog; - - /** - * Schema. - */ - protected String schema; - - /** - * Sets the catalog. - * @param catalog the catalog to set - */ - public void setCatalog(String catalog) - { - this.catalog = catalog; - } - - /** - * Sets the schema. - * @param schema the schema to set - */ - public void setSchema(String schema) - { - this.schema = schema; - } - - /** - * Sets the column. - * @param column the column to set - */ - public void setColumn(String column) - { - this.column = column; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean check(SimpleJdbcTemplate jdbcTemplate) - { - - String columnTrim = StringUtils.trim(column); - - final String tableName = StringUtils.substringBefore(columnTrim, "."); - final String columnName = StringUtils.substringAfter(columnTrim, "."); - return (Boolean) jdbcTemplate.getJdbcOperations().execute(new ConnectionCallback() - { - - public Object doInConnection(Connection con) throws SQLException, DataAccessException - { - - DatabaseMetaData dbMetadata = con.getMetaData(); - ResultSet rs = dbMetadata.getColumns(catalog, schema, tableName, columnName); - boolean tableExists = rs.next(); - rs.close(); - - return !tableExists; - } - }); - } - -} Copied: tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java (from rev 834, trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java) =================================================================== --- tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java (rev 0) +++ tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java 2008-06-11 21:25:54 UTC (rev 837) @@ -0,0 +1,108 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.openutils.migration.generic; + +import it.openutils.migration.task.setup.BaseConditionalTask; + +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.lang.StringUtils; +import org.springframework.dao.DataAccessException; +import org.springframework.jdbc.core.ConnectionCallback; +import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; + + +/** + * Task that executes if a given column exists. + * @author fgiust + * @version $Id: $ + */ +public class JdbcIfColumnExistsConditionalTask extends BaseConditionalTask +{ + + /** + * Column name. + */ + protected String column; + + /** + * Catalog. + */ + protected String catalog; + + /** + * Schema. + */ + protected String schema; + + /** + * Sets the catalog. + * @param catalog the catalog to set + */ + public void setCatalog(String catalog) + { + this.catalog = catalog; + } + + /** + * Sets the schema. + * @param schema the schema to set + */ + public void setSchema(String schema) + { + this.schema = schema; + } + + /** + * Sets the column. + * @param column the column to set + */ + public void setColumn(String column) + { + this.column = column; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean check(SimpleJdbcTemplate jdbcTemplate) + { + + String columnTrim = StringUtils.trim(column); + + final String tableName = StringUtils.substringBefore(columnTrim, "."); + final String columnName = StringUtils.substringAfter(columnTrim, "."); + return (Boolean) jdbcTemplate.getJdbcOperations().execute(new ConnectionCallback() + { + + public Object doInConnection(Connection con) throws SQLException, DataAccessException + { + + DatabaseMetaData dbMetadata = con.getMetaData(); + ResultSet rs = dbMetadata.getColumns(catalog, schema, tableName, columnName); + boolean tableExists = rs.next(); + rs.close(); + + return tableExists; + } + }); + } + +} Deleted: tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java 2008-05-07 12:57:08 UTC (rev 824) +++ tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java 2008-06-11 21:25:54 UTC (rev 837) @@ -1,105 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.migration.generic; - -import it.openutils.migration.task.setup.BaseConditionalTask; - -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.ResultSet; -import java.sql.SQLException; - -import org.apache.commons.lang.StringUtils; -import org.springframework.dao.DataAccessException; -import org.springframework.jdbc.core.ConnectionCallback; -import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; - - -/** - * Task that executes if a named foreign key eists. - * @author fgiust - * @version $Id$ - */ -public class JdbcIfForeignKeyExistsConditionalTask extends BaseConditionalTask -{ - - private String fkName; - - private String catalog; - - private String schema; - - /** - * Sets the catalog. - * @param catalog the catalog to set - */ - public void setCatalog(String catalog) - { - this.catalog = catalog; - } - - /** - * Sets the schema. - * @param schema the schema to set - */ - public void setSchema(String schema) - { - this.schema = schema; - } - - /** - * Sets the fkName (TABLE.FKNAME). - * @param fkName the fkName to set - */ - public void setFkName(String fkName) - { - this.fkName = fkName; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean check(SimpleJdbcTemplate jdbcTemplate) - { - - String fkNameTrim = StringUtils.trim(fkName); - - final String tableName = StringUtils.substringBefore(fkNameTrim, "."); - final String fkName = StringUtils.substringAfter(fkNameTrim, "."); - return (Boolean) jdbcTemplate.getJdbcOperations().execute(new ConnectionCallback() - { - - public Object doInConnection(Connection con) throws SQLException, DataAccessException - { - boolean fkExists = false; - DatabaseMetaData dbMetadata = con.getMetaData(); - ResultSet rs = dbMetadata.getExportedKeys(catalog, schema, tableName); - while (rs.next()) - { - if (StringUtils.equals(fkName, rs.getString("FK_NAME"))) - { - fkExists = true; - } - } - rs.close(); - - return !fkExists; - } - }); - } - -} Copied: tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java (from rev 834, trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java) =================================================================== --- tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java (rev 0) +++ tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java 2008-06-11 21:25:54 UTC (rev 837) @@ -0,0 +1,105 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.openutils.migration.generic; + +import it.openutils.migration.task.setup.BaseConditionalTask; + +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.lang.StringUtils; +import org.springframework.dao.DataAccessException; +import org.springframework.jdbc.core.ConnectionCallback; +import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; + + +/** + * Task that executes if a named foreign key eists. + * @author fgiust + * @version $Id$ + */ +public class JdbcIfForeignKeyExistsConditionalTask extends BaseConditionalTask +{ + + private String fkName; + + private String catalog; + + private String schema; + + /** + * Sets the catalog. + * @param catalog the catalog to set + */ + public void setCatalog(String catalog) + { + this.catalog = catalog; + } + + /** + * Sets the schema. + * @param schema the schema to set + */ + public void setSchema(String schema) + { + this.schema = schema; + } + + /** + * Sets the fkName (TABLE.FKNAME). + * @param fkName the fkName to set + */ + public void setFkName(String fkName) + { + this.fkName = fkName; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean check(SimpleJdbcTemplate jdbcTemplate) + { + + String fkNameTrim = StringUtils.trim(fkName); + + final String tableName = StringUtils.substringBefore(fkNameTrim, "."); + final String fkName = StringUtils.substringAfter(fkNameTrim, "."); + return (Boolean) jdbcTemplate.getJdbcOperations().execute(new ConnectionCallback() + { + + public Object doInConnection(Connection con) throws SQLException, DataAccessException + { + boolean fkExists = false; + DatabaseMetaData dbMetadata = con.getMetaData(); + ResultSet rs = dbMetadata.getExportedKeys(catalog, schema, tableName); + while (rs.next()) + { + if (StringUtils.equals(fkName, rs.getString("FK_NAME"))) + { + fkExists = true; + } + } + rs.close(); + + return fkExists; + } + }); + } + +} Deleted: tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java 2008-05-07 12:57:08 UTC (rev 824) +++ tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java 2008-06-11 21:25:54 UTC (rev 837) @@ -1,240 +0,0 @@ -/* - * Copyright Openmind http://www.openmindonline.it - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.migration.task.setup; - -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import javax.sql.DataSource; - -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.core.io.Resource; -import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; - - -/** - * A base conditional task that executes a task only if an expected condition is met. - * @author fgiust - * @version $Id:SqlServerObjCreationTask.java 3143 2007-09-24 19:50:49Z fgiust $ - */ -public abstract class BaseConditionalTask extends BaseDbTask -{ - - /** - * Logger. - */ - protected Logger log = LoggerFactory.getLogger(getClass()); - - /** - * DDL to run when the condition is met. - */ - protected String ddl; - - /** - * If <code>true</code> executes only if check returned <code>false</code> - */ - protected boolean not; - - /** - * Map of key-value that will be replaced in ddl. - */ - protected Map<String, String> variables; - - /** - * Script list to execute - */ - protected List<Resource> scripts; - - /** - * Sets the scripts. - * @param scripts the scripts to set - */ - public void setScripts(List<Resource> scripts) - { - this.scripts = scripts; - } - - /** - * {@inheritDoc} - */ - public final void setDdl(String ddls) - { - this.ddl = ddls; - } - - /** - * Sets the not. - * @param not the not to set - */ - public final void setNot(boolean not) - { - this.not = not; - } - - /** - * Sets the ddlScript. - * @param ddlScript the ddlScript to set - * @deprecated use the "scripts" property - */ - @Deprecated - public final void setDdlScript(Resource ddlScript) - { - log.warn("ddlScript is deprecated, please use \"scripts\""); - if (scripts == null) - { - scripts = new ArrayList<Resource>(1); - } - scripts.add(ddlScript); - } - - /** - * Subclasses need to override this method and provide specific checks. - * @param jdbcTemplate SimpleJdbcTemplate - * @return true if the condition is met - */ - public abstract boolean check(SimpleJdbcTemplate jdbcTemplate); - - /** - * {@inheritDoc} - */ - @Override - public String getDescription() - { - - if (StringUtils.isNotEmpty(super.getDescription())) - { - return super.getDescription(); - } - - if (scripts != null && !scripts.isEmpty()) - { - StringBuffer result = new StringBuffer(); - result.append("Checking :\n"); - for (Resource script : scripts) - { - result.append(" - " + objectNameFromFileName(script) + "\n"); - } - return result.toString(); - - } - - return getClass().getName(); - } - - /** - * @param script The script resource - * @return The script name - */ - protected String objectNameFromFileName(Resource script) - { - return StringUtils.substringBeforeLast(script.getFilename(), "."); - } - - /** - * Perform sobstitution in the given string. - * @param string Original String - * @return processed string - */ - protected String performSubstitution(String string) - { - if (variables == null || variables.isEmpty()) - { - return string; - } - - String stringReplaced = string; - for (String key : variables.keySet()) - { - stringReplaced = StringUtils.replace(stringReplaced, "${" + key + "}", variables.get(key)); - } - - return stringReplaced; - } - - /** - * {@inheritDoc} - */ - public void execute(DataSource dataSource) - { - SimpleJdbcTemplate jdbcTemplate = new SimpleJdbcTemplate(dataSource); - - if (check(jdbcTemplate) ^ !not) - { - log.info("Executing Alter Task: {}", getDescription()); - - if (StringUtils.isNotBlank(ddl)) - { - executeSingle(jdbcTemplate, ddl); - } - else - { - if (scripts == null || scripts.isEmpty()) - { - log.error("Unable to execute db task \"{}\", no ddl or scripts configured.", getDescription()); - return; - } - - for (Resource script : scripts) - { - String scriptContent = ddl; - InputStream is = null; - try - { - is = script.getInputStream(); - scriptContent = IOUtils.toString(is, "UTF8"); - } - catch (IOException e) - { - log.error( - "Unable to execute db task \"{}\", script \"{}\" can't be read.", - getDescription(), - script); - return; - } - finally - { - IOUtils.closeQuietly(is); - } - executeSingle(jdbcTemplate, scriptContent); - } - } - } - } - - /** - * @param jdbcTemplate - * @param scriptContent - */ - protected void executeSingle(SimpleJdbcTemplate jdbcTemplate, String scriptContent) - { - String[] ddls = StringUtils.split(performSubstitution(scriptContent), ';'); - for (String statement : ddls) - { - if (StringUtils.isNotBlank(statement)) - { - log.debug("Executing:\n{}", statement); - jdbcTemplate.update(statement); - } - } - } - -} Copied: tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java (from rev 834, trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java) =================================================================== --- tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java (rev 0) +++ tags/openutils-dbmigration-2.0.4/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java 2008-06-11 21:25:54 UTC (rev 837) @@ -0,0 +1,240 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.openutils.migration.task.setup; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.io.Resource; +import org.springframework.jdbc.core.simple.SimpleJdbcTemplate; + + +/** + * A base conditional task that executes a task only if an expected condition is met. + * @author fgiust + * @version $Id:SqlServerObjCreationTask.java 3143 2007-09-24 19:50:49Z fgiust $ + */ +public abstract class BaseConditionalTask extends BaseDbTask +{ + + /** + * Logger. + */ + protected Logger log = LoggerFactory.getLogger(getClass()); + + /** + * DDL to run when the condition is met. + */ + protected String ddl; + + /** + * If <code>true</code> executes only if check returned <code>false</code> + */ + protected boolean not; + + /** + * Map of key-value that will be replaced in ddl. + */ + protected Map<String, String> variables; + + /** + * Script list to execute + */ + protected List<Resource> scripts; + + /** + * Sets the scripts. + * @param scripts the scripts to set + */ + public void setScripts(List<Resource> scripts) + { + this.scripts = scripts; + } + + /** + * {@inheritDoc} + */ + public final void setDdl(String ddls) + { + this.ddl = ddls; + } + + /** + * Sets the not. + * @param not the not to set + */ + public final void setNot(boolean not) + { + this.not = not; + } + + /** + * Sets the ddlScript. + * @param ddlScript the ddlScript to set + * @deprecated use the "scripts" property + */ + @Deprecated + public final void setDdlScript(Resource ddlScript) + { + log.warn("ddlScript is deprecated, please use \"scripts\""); + if (scripts == null) + { + scripts = new ArrayList<Resource>(1); + } + scripts.add(ddlScript); + } + + /** + * Subclasses need to override this method and provide specific checks. + * @param jdbcTemplate SimpleJdbcTemplate + * @return true if the condition is met + */ + public abstract boolean check(SimpleJdbcTemplate jdbcTemplate); + + /** + * {@inheritDoc} + */ + @Override + public String getDescription() + { + + if (StringUtils.isNotEmpty(super.getDescription())) + { + return super.getDescription(); + } + + if (scripts != null && !scripts.isEmpty()) + { + StringBuffer result = new StringBuffer(); + result.append("Checking :\n"); + for (Resource script : scripts) + { + result.append(" - " + objectNameFromFileName(script) + "\n"); + } + return result.toString(); + + } + + return getClass().getName(); + } + + /** + * @param script The script resource + * @return The script name + */ + protected String objectNameFromFileName(Resource script) + { + return StringUtils.substringBeforeLast(script.getFilename(), "."); + } + + /** + * Perform sobstitution in the given string. + * @param string Original String + * @return processed string + */ + protected String performSubstitution(String string) + { + if (variables == null || variables.isEmpty()) + { + return string; + } + + String stringReplaced = string; + for (String key : variables.keySet()) + { + stringReplaced = StringUtils.replace(stringReplaced, "${" + key + "}", variables.get(key)); + } + + return stringReplaced; + } + + /** + * {@inheritDoc} + */ + public void execute(DataSource dataSource) + { + SimpleJdbcTemplate jdbcTemplate = new SimpleJdbcTemplate(dataSource); + + if (check(jdbcTemplate) ^ not) + { + log.info("Executing Alter Task: {}", getDescription()); + + if (StringUtils.isNotBlank(ddl)) + { + executeSingle(jdbcTemplate, ddl); + } + else + { + if (scripts == null || scripts.isEmpty()) + { + log.error("Unable to execute db task \"{}\", no ddl or scripts configured.", getDescription()); + return; + } + + for (Resource script : scripts) + { + String scriptContent = ddl; + InputStream is = null; + try + { + is = script.getInputStream(); + scriptContent = IOUtils.toString(is, "UTF8"); + } + catch (IOException e) + { + log.error( + "Unable to execute db task \"{}\", script \"{}\" can't be read.", + getDescription(), + script); + return; + } + finally + { + IOUtils.closeQuietly(is); + } + executeSingle(jdbcTemplate, scriptContent); + } + } + } + } + + /** + * @param jdbcTemplate + * @param scriptContent + */ + protected void executeSingle(SimpleJdbcTemplate jdbcTemplate, String scriptContent) + { + String[] ddls = StringUtils.split(performSubstitution(scriptContent), ';'); + for (String statement : ddls) + { + if (StringUtils.isNotBlank(statement)) + { + log.debug("Executing:\n{}", statement); + jdbcTemplate.update(statement); + } + } + } + +} Deleted: tags/openutils-dbmigration-2.0.4/src/site/changes/changes.xml =================================================================== --- trunk/openutils-dbmigration/src/site/changes/changes.xml 2008-05-07 12:57:08 UTC (rev 824) +++ tags/openutils-dbmigration-2.0.4/src/site/changes/changes.xml 2008-06-11 21:25:54 UTC (rev 837) @@ -1,33 +0,0 @@ -<?xml version="1.0"?> -<!-- - "type" attribute can be: add, remove, update or fix. ---> -<document> - <properties> - <title>Changes</title> - <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> - </properties> - <body> - <release version="2.0.4" date="in svn" description="2.0.4"> - <action type="add" dev="fgiust">New jdbc generic tasks: IfColumnIsNotIdentityConditionalTask, - JdbcIfColumnIsNotNullableConditionalTask, JdbcIfForeignKeyExistsConditionalTask</action> - <action type="add" dev="fgiust">New oracle specific tasks: OraclePackageCreationTask, - OracleStoredProcedureCallTask</action> - </release> - <release version="2.0.3" date="2008-02-21" description="2.0.3"> - <action type="add" dev="fgiust">New it.openutils.migration.oracle.OracleViewCreateOrUpdateTask</action> - <action type="fix" dev="fgiust">Fix handling of empty strings for numeric types in ExcelConfigurationTask - </action> - <action type="update" dev="fgiust"> Dates are now always processed using an ISO8601 date format in - ExcelConfigurationTask (previously the parsing was left to the jdbc driver, leading to different results with - different drivers)</action> - <action type="add" dev="fgiust">Added a new "enabled" flag in ExcelConfigurationTask</action> - </release> - <release version="2.0.2" date="2008-02-11" description="2.0.2"> - <action type="add" dev="fgiust">New it.openutils.migration.oracle.OracleSequenceCreationTask</action> - <action type="update" dev="fgiust"> Added ability to set a schema name in - it.openutils.migration.generic.JdbcObjectCreationTask and - it.openutils.migration.generic.JdbcIfColumnExistsConditionalTask</action> - </release> - </body> -</document> \ No newline at end of file Copied: tags/openutils-dbmigration-2.0.4/src/site/changes/changes.xml (from rev 835, trunk/openutils-dbmigration/src/site/changes/changes.xml) =================================================================== --- tags/openutils-dbmigration-2.0.4/src/site/changes/changes.xml (rev 0) +++ tags/openutils-dbmigration-2.0.4/src/site/changes/changes.xml 2008-06-11 21:25:54 UTC (rev 837) @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- + "type" attribute can be: add, remove, update or fix. +--> +<document> + <properties> + <title>Changes</title> + <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> + </properties> + <body> + <release version="2.0.4" date="2008-06-11" description="2.0.4"> + <action type="fix" dev="fgiust"> Warning: fixed the usage of the "not" condition in + it.openutils.migration.task.setup.BaseConditionalTask that previosly caused unexpected (inverted) results. You + may need to review your conditional tasks in order to check if the condition is still valid!</action> + <action type="add" dev="fgiust">New jdbc generic tasks: IfColumnIsNotIdentityConditionalTask, + JdbcIfColumnIsNotNullableConditionalTask, JdbcIfForeignKeyExistsConditionalTask</action> + <action type="add" dev="fgiust">New oracle specific tasks: OraclePackageCreationTask, + OracleStoredProcedureCallTask</action> + </release> + <release version="2.0.3" date="2008-02-21" description="2.0.3"> + <action type="add" dev="fgiust">New it.openutils.migration.oracle.OracleViewCreateOrUpdateTask</action> + <action type="fix" dev="fgiust">Fix handling of empty strings for numeric types in ExcelConfigurationTask + </action> + <action type="update" dev="fgiust"> Dates are now always processed using an ISO8601 date format in + ExcelConfigurationTask (previously the parsing was left to the jdbc driver, leading to different results with + different drivers)</action> + <action type="add" dev="fgiust">Added a new "enabled" flag in ExcelConfigurationTask</action> + </release> + <release version="2.0.2" date="2008-02-11" description="2.0.2"> + <action type="add" dev="fgiust">New it.openutils.migration.oracle.OracleSequenceCreationTask</action> + <action type="update" dev="fgiust"> Added ability to set a schema name in + it.openutils.migration.generic.JdbcObjectCreationTask and + it.openutils.migration.generic.JdbcIfColumnExistsConditionalTask</action> + </release> + </body> +</document> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-11 21:25:22
|
Revision: 836 http://openutils.svn.sourceforge.net/openutils/?rev=836&view=rev Author: fgiust Date: 2008-06-11 14:25:18 -0700 (Wed, 11 Jun 2008) Log Message: ----------- [maven-release-plugin] prepare release openutils-dbmigration-2.0.4 Modified Paths: -------------- trunk/openutils-dbmigration/pom.xml Modified: trunk/openutils-dbmigration/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2008-06-11 21:23:37 UTC (rev 835) +++ trunk/openutils-dbmigration/pom.xml 2008-06-11 21:25:18 UTC (rev 836) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-dbmigration</artifactId> <name>openutils db migration</name> - <version>2.0.4-SNAPSHOT</version> + <version>2.0.4</version> <description /> <dependencies> <dependency> @@ -93,4 +93,10 @@ <properties> <spring.version>2.5.1</spring.version> </properties> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-2.0.4</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-dbmigration-2.0.4</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-dbmigration-2.0.4</url> + </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-11 21:24:01
|
Revision: 835 http://openutils.svn.sourceforge.net/openutils/?rev=835&view=rev Author: fgiust Date: 2008-06-11 14:23:37 -0700 (Wed, 11 Jun 2008) Log Message: ----------- release date Modified Paths: -------------- trunk/openutils-dbmigration/src/site/changes/changes.xml Modified: trunk/openutils-dbmigration/src/site/changes/changes.xml =================================================================== --- trunk/openutils-dbmigration/src/site/changes/changes.xml 2008-06-11 21:18:57 UTC (rev 834) +++ trunk/openutils-dbmigration/src/site/changes/changes.xml 2008-06-11 21:23:37 UTC (rev 835) @@ -8,7 +8,7 @@ <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> </properties> <body> - <release version="2.0.4" date="in svn" description="2.0.4"> + <release version="2.0.4" date="2008-06-11" description="2.0.4"> <action type="fix" dev="fgiust"> Warning: fixed the usage of the "not" condition in it.openutils.migration.task.setup.BaseConditionalTask that previosly caused unexpected (inverted) results. You may need to review your conditional tasks in order to check if the condition is still valid!</action> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-11 21:19:25
|
Revision: 834 http://openutils.svn.sourceforge.net/openutils/?rev=834&view=rev Author: fgiust Date: 2008-06-11 14:18:57 -0700 (Wed, 11 Jun 2008) Log Message: ----------- fixed wrong usage of "not" condition in BaseConditionalTask Modified Paths: -------------- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java trunk/openutils-dbmigration/src/site/changes/changes.xml Modified: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java 2008-06-09 16:48:00 UTC (rev 833) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcColumnBasedConditionalTask.java 2008-06-11 21:18:57 UTC (rev 834) @@ -110,7 +110,7 @@ { params.put(rsmeta.getColumnName(j), rs.getObject(j)); } - conditionMet = !checkColumnMetadata(params); + conditionMet = checkColumnMetadata(params); } rs.close(); return conditionMet; Modified: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java 2008-06-09 16:48:00 UTC (rev 833) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcIfColumnExistsConditionalTask.java 2008-06-11 21:18:57 UTC (rev 834) @@ -100,7 +100,7 @@ boolean tableExists = rs.next(); rs.close(); - return !tableExists; + return tableExists; } }); } Modified: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java 2008-06-09 16:48:00 UTC (rev 833) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/generic/JdbcIfForeignKeyExistsConditionalTask.java 2008-06-11 21:18:57 UTC (rev 834) @@ -97,7 +97,7 @@ } rs.close(); - return !fkExists; + return fkExists; } }); } Modified: trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java =================================================================== --- trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java 2008-06-09 16:48:00 UTC (rev 833) +++ trunk/openutils-dbmigration/src/main/java/it/openutils/migration/task/setup/BaseConditionalTask.java 2008-06-11 21:18:57 UTC (rev 834) @@ -177,7 +177,7 @@ { SimpleJdbcTemplate jdbcTemplate = new SimpleJdbcTemplate(dataSource); - if (check(jdbcTemplate) ^ !not) + if (check(jdbcTemplate) ^ not) { log.info("Executing Alter Task: {}", getDescription()); Modified: trunk/openutils-dbmigration/src/site/changes/changes.xml =================================================================== --- trunk/openutils-dbmigration/src/site/changes/changes.xml 2008-06-09 16:48:00 UTC (rev 833) +++ trunk/openutils-dbmigration/src/site/changes/changes.xml 2008-06-11 21:18:57 UTC (rev 834) @@ -9,6 +9,9 @@ </properties> <body> <release version="2.0.4" date="in svn" description="2.0.4"> + <action type="fix" dev="fgiust"> Warning: fixed the usage of the "not" condition in + it.openutils.migration.task.setup.BaseConditionalTask that previosly caused unexpected (inverted) results. You + may need to review your conditional tasks in order to check if the condition is still valid!</action> <action type="add" dev="fgiust">New jdbc generic tasks: IfColumnIsNotIdentityConditionalTask, JdbcIfColumnIsNotNullableConditionalTask, JdbcIfForeignKeyExistsConditionalTask</action> <action type="add" dev="fgiust">New oracle specific tasks: OraclePackageCreationTask, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2008-06-09 16:47:52
|
Revision: 833 http://openutils.svn.sourceforge.net/openutils/?rev=833&view=rev Author: fcarone Date: 2008-06-09 09:48:00 -0700 (Mon, 09 Jun 2008) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-bshd5/pom.xml Modified: trunk/openutils-bshd5/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2008-06-09 16:47:53 UTC (rev 832) +++ trunk/openutils-bshd5/pom.xml 2008-06-09 16:48:00 UTC (rev 833) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-bshd5</artifactId> <name>openutils base Spring-Hibernate DAO for java 5.0</name> - <version>2.0.4</version> + <version>2.0.5-SNAPSHOT</version> <description>openutils base Spring-Hibernate DAO for java 5.0</description> <dependencies> <dependency> @@ -105,10 +105,4 @@ <properties> <spring.version>2.5.3</spring.version> </properties> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-2.0.4</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-2.0.4</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-bshd5-2.0.4</url> - </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2008-06-09 16:47:50
|
Revision: 832 http://openutils.svn.sourceforge.net/openutils/?rev=832&view=rev Author: fcarone Date: 2008-06-09 09:47:53 -0700 (Mon, 09 Jun 2008) Log Message: ----------- [maven-release-plugin] copy for tag openutils-bshd5-2.0.4 Added Paths: ----------- tags/openutils-bshd5-2.0.4/ tags/openutils-bshd5-2.0.4/pom.xml tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java Removed Paths: ------------- tags/openutils-bshd5-2.0.4/pom.xml tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java Copied: tags/openutils-bshd5-2.0.4 (from rev 829, trunk/openutils-bshd5) Deleted: tags/openutils-bshd5-2.0.4/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2008-06-08 11:47:36 UTC (rev 829) +++ tags/openutils-bshd5-2.0.4/pom.xml 2008-06-09 16:47:53 UTC (rev 832) @@ -1,108 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>8</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-bshd5</artifactId> - <name>openutils base Spring-Hibernate DAO for java 5.0</name> - <version>2.0.4-SNAPSHOT</version> - <description>openutils base Spring-Hibernate DAO for java 5.0</description> - <dependencies> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.5.0</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>jcl104-over-slf4j</artifactId> - <version>1.5.0</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-jdbc</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-beans</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-orm</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-aop</artifactId> - <version>${spring.version}</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate</artifactId> - <version>3.2.1.ga</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - <exclusion> - <groupId>cglib</groupId> - <artifactId>cglib</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>cglib</groupId> - <artifactId>cglib-nodep</artifactId> - <version>2.1_3</version> - </dependency> - <dependency> - <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> - <version>1.7.0</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.4</version> - </dependency> - </dependencies> - <properties> - <spring.version>2.5.3</spring.version> - </properties> -</project> \ No newline at end of file Copied: tags/openutils-bshd5-2.0.4/pom.xml (from rev 831, trunk/openutils-bshd5/pom.xml) =================================================================== --- tags/openutils-bshd5-2.0.4/pom.xml (rev 0) +++ tags/openutils-bshd5-2.0.4/pom.xml 2008-06-09 16:47:53 UTC (rev 832) @@ -0,0 +1,114 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>8</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-bshd5</artifactId> + <name>openutils base Spring-Hibernate DAO for java 5.0</name> + <version>2.0.4</version> + <description>openutils base Spring-Hibernate DAO for java 5.0</description> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.5.0</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl104-over-slf4j</artifactId> + <version>1.5.0</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-jdbc</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-orm</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-aop</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate</artifactId> + <version>3.2.1.ga</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> + <groupId>cglib</groupId> + <artifactId>cglib</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>cglib</groupId> + <artifactId>cglib-nodep</artifactId> + <version>2.1_3</version> + </dependency> + <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + <version>1.7.0</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.4</version> + </dependency> + </dependencies> + <properties> + <spring.version>2.5.3</spring.version> + </properties> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-2.0.4</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-2.0.4</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-bshd5-2.0.4</url> + </scm> +</project> \ No newline at end of file Deleted: tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java =================================================================== --- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java 2008-06-08 11:47:36 UTC (rev 829) +++ tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java 2008-06-09 16:47:53 UTC (rev 832) @@ -1,254 +0,0 @@ -package it.openutils.dao.hibernate; - -import it.openutils.hibernate.example.FilterMetadata; - -import java.io.Serializable; -import java.util.List; -import java.util.Map; - -import org.hibernate.criterion.Criterion; -import org.hibernate.criterion.Order; -import org.hibernate.type.Type; - - -/** - * @author Fabrizio Giustina - * @version $Id$ - * @param <T> Persistence class - * @param <K> Object Key - */ -public interface HibernateDAO<T extends Object, K extends Serializable> -{ - - /** - * Execute a query. - * @param query a query expressed in Hibernate's query language - * @return a distinct list of instances (or arrays of instances) - */ - List<T> find(String query); - - /** - * Return all objects related to the implementation of this DAO with no filter. - * @return a list of all instances - */ - List<T> findAll(); - - /** - * Return all objects related to the implementation of this DAO with no filter. - * @param orderProperties <code>desc</code> or <code>asc</code> - * @return a list of all instances - */ - List<T> findAll(final Order[] orderProperties); - - /** - * Return all objects related to the implementation of this DAO with no filter. - * @param orderProperties <code>desc</code> or <code>asc</code> - * @param criteria Additional Criterion conditions - * @return a list of all instances - */ - List<T> findAll(final Order[] orderProperties, List<Criterion> criteria); - - /** - * Execute a query. - * @param query a query expressed in Hibernate's query language - * @param obj filter value - * @param type filter type - * @return a distinct list of instances (or arrays of instances) - */ - List<T> find(String query, Object obj, Type type); - - /** - * Execute a query. - * @param query a query expressed in Hibernate's query language - * @param obj filter values - * @param type filter types - * @return a distinct list of instances (or arrays of instances) - */ - List<T> find(final String query, final Object[] obj, final Type[] type); - - /** - * Re-read the state of the given instance from the underlying database. It is inadvisable to use this to implement - * long-running sessions that span many business tasks. This method is, however, useful in certain special - * circumstances. For example - * <ul> - * <li>where a database trigger alters the object state upon insert or update - * <li>after executing direct SQL (eg. a mass update) in the same session - * <li>after inserting a <tt>Blob</tt> or <tt>Clob</tt> - * </ul> - * @param obj Object - */ - void refresh(T obj); - - /** - * Remove the given object from the Session cache. - * @param obj Object - */ - void evict(T obj); - - /** - * Copy the state of the given object onto the persistent object with the same identifier. If there is no persistent - * instance currently associated with the session, it will be loaded. Return the persistent instance. If the given - * instance is unsaved, save a copy of and return it as a newly persistent instance. The given instance does not - * become associated with the session. This operation cascades to associated instances if the association is mapped - * with <tt>cascade="merge"</tt>.<br> - * <br> - * The semantics of this method are defined by JSR-220. - * @param obj a detached instance with state to be copied - * @return an updated persistent instance - */ - T merge(T obj); - - /** - * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. - * @param filter an instance of the object with the properties you whish to filter on. - * @param maxResults maximum number of results - * @param page result page (first result is maxResults * page) - * @return list of objects - */ - List<T> findFiltered(final T filter, final int maxResults, final int page); - - /** - * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. - * @param filter an instance of the object with the properties you whish to filter on. - * @param metadata filter metadata - * @param maxResults maximum number of results - * @param page result page (first result is maxResults * page) - * @return list of objects - */ - List<T> findFiltered(final T filter, Map<String, FilterMetadata> metadata, final int maxResults, final int page); - - /** - * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. - * @param filter an instance of the object with the properties you whish to filter on. - * @param customOrder order criterias - * @param metadata filter metadata - * @param maxResults maximum number of results - * @param page result page (first result is maxResults * page) - * @return list of objects - */ - List<T> findFiltered(final T filter, final Order[] customOrder, final Map<String, FilterMetadata> metadata, - final int maxResults, final int page); - - /** - * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. - * @param filter an instance of the object with the properties you whish to filter on. - * @param customOrder order criterias - * @param metadata filter metadata - * @param maxResults maximum number of results - * @param page result page (first result is maxResults * page) - * @param additionalCriteria additional criteria - * @return list of objects - */ - List<T> findFiltered(final T filter, final Order[] customOrder, final Map<String, FilterMetadata> metadata, - final int maxResults, final int page, List<Criterion> additionalCriteria); - - /** - * Return properties from all objects related to the implementation of this DAO filtered using properties of the - * provided instance. - * @param filter an instance of the object with the properties you whish to filter on. - * @param customOrder order criterias - * @param metadata filter metadata - * @param maxResults maximum number of results - * @param page result page (first result is maxResults * page) - * @param additionalCriteria additional criteria - * @param properties properties to be returned - * @return list of properties from all objects - */ - List< ? > findFilteredProperties(final T filter, final Order[] customOrder, - final Map<String, FilterMetadata> metadata, final int maxResults, final int page, - List<Criterion> additionalCriteria, List<String> properties); - - /** - * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. - * @param filter an instance of the object with the properties you whish to filter on. - * @return list of objects - */ - List<T> findFiltered(final T filter); - - /** - * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. - * @param filter an instance of the object with the properties you whish to filter on. - * @param orderProperties the name of the property used for ordering - * @return list of objects - */ - List<T> findFiltered(final T filter, final Order[] orderProperties); - - /** - * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. - * @param filter an instance of the object with the properties you whish to filter on. - * @param metadata filter metadata - * @return list of objects - */ - List<T> findFiltered(final T filter, Map<String, FilterMetadata> metadata); - - /** - * Return the first object related to the implementation of this DAO filtered using properties of the provided - * instance. - * @param filter an instance of the object with the properties you whish to filter on. - * @return first object in the collection - */ - T findFilteredFirst(final T filter); - - /** - * Return the first object related to the implementation of this DAO filtered using properties of the provided - * instance. - * @param filter an instance of the object with the properties you whish to filter on. - * @param criteria additional criterion - * @return first object in the collection - */ - T findFilteredFirst(final T filter, final List<Criterion> criteria); - - /** - * Used by the base DAO classes but here for your modification Remove a persistent instance from the datastore. The - * argument may be an instance associated with the receiving Session or a transient instance with an identifier - * associated with existing persistent state. - * @param key key - * @return true if the object was successfully deleted, false otherwise - */ - boolean delete(final K key); - - /** - * Load object matching the given key and return it. Throw an exception if not found. - * @param key serializable key - * @return Object - */ - T load(K key); - - /** - * Load object matching the given key and return it. Lazy object will be initialized. - * @param key serializable key - * @return Object - */ - T loadIfAvailable(K key); - - /** - * Load object matching the given key and return it. Lazy object will be initialized. - * @param key serializable key - * @return Object - */ - T get(K key); - - /** - * Used by the base DAO classes but here for your modification Either save() or update() the given instance, - * depending upon the value of its identifier property. - * @param obj Object - */ - void saveOrUpdate(final T obj); - - /** - * Used by the base DAO classes but here for your modification Update the persistent state associated with the given - * identifier. An exception is thrown if there is a persistent instance with the same identifier in the current - * session. - * @param obj a transient instance containing updated state - */ - void update(T obj); - - /** - * Persist the given transient instance, first assigning a generated identifier. (Or using the current value of the - * identifier property if the assigned generator is used.) - * @param obj Object - * @return generated id - */ - K save(T obj); - -} Copied: tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java (from rev 830, trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java) =================================================================== --- tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java (rev 0) +++ tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java 2008-06-09 16:47:53 UTC (rev 832) @@ -0,0 +1,262 @@ +package it.openutils.dao.hibernate; + +import it.openutils.hibernate.example.FilterMetadata; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +import org.hibernate.criterion.Criterion; +import org.hibernate.criterion.Order; +import org.hibernate.type.Type; + + +/** + * @author Fabrizio Giustina + * @version $Id$ + * @param <T> Persistence class + * @param <K> Object Key + */ +public interface HibernateDAO<T extends Object, K extends Serializable> +{ + + /** + * Execute a query. + * @param query a query expressed in Hibernate's query language + * @return a distinct list of instances (or arrays of instances) + */ + List<T> find(String query); + + /** + * Return all objects related to the implementation of this DAO with no filter. + * @return a list of all instances + */ + List<T> findAll(); + + /** + * Return all objects related to the implementation of this DAO with no filter. + * @param orderProperties <code>desc</code> or <code>asc</code> + * @return a list of all instances + */ + List<T> findAll(final Order[] orderProperties); + + /** + * Return all objects related to the implementation of this DAO with no filter. + * @param orderProperties <code>desc</code> or <code>asc</code> + * @param criteria Additional Criterion conditions + * @return a list of all instances + */ + List<T> findAll(final Order[] orderProperties, List<Criterion> criteria); + + /** + * Execute a query. + * @param query a query expressed in Hibernate's query language + * @param obj filter value + * @param type filter type + * @return a distinct list of instances (or arrays of instances) + */ + List<T> find(String query, Object obj, Type type); + + /** + * Execute a query. + * @param query a query expressed in Hibernate's query language + * @param obj filter values + * @param type filter types + * @return a distinct list of instances (or arrays of instances) + */ + List<T> find(final String query, final Object[] obj, final Type[] type); + + /** + * Re-read the state of the given instance from the underlying database. It is inadvisable to use this to implement + * long-running sessions that span many business tasks. This method is, however, useful in certain special + * circumstances. For example + * <ul> + * <li>where a database trigger alters the object state upon insert or update + * <li>after executing direct SQL (eg. a mass update) in the same session + * <li>after inserting a <tt>Blob</tt> or <tt>Clob</tt> + * </ul> + * @param obj Object + */ + void refresh(T obj); + + /** + * Remove the given object from the Session cache. + * @param obj Object + */ + void evict(T obj); + + /** + * Copy the state of the given object onto the persistent object with the same identifier. If there is no persistent + * instance currently associated with the session, it will be loaded. Return the persistent instance. If the given + * instance is unsaved, save a copy of and return it as a newly persistent instance. The given instance does not + * become associated with the session. This operation cascades to associated instances if the association is mapped + * with <tt>cascade="merge"</tt>.<br> + * <br> + * The semantics of this method are defined by JSR-220. + * @param obj a detached instance with state to be copied + * @return an updated persistent instance + */ + T merge(T obj); + + /** + * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @param maxResults maximum number of results + * @param page result page (first result is maxResults * page) + * @return list of objects + */ + List<T> findFiltered(final T filter, final int maxResults, final int page); + + /** + * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @param metadata filter metadata + * @param maxResults maximum number of results + * @param page result page (first result is maxResults * page) + * @return list of objects + */ + List<T> findFiltered(final T filter, Map<String, FilterMetadata> metadata, final int maxResults, final int page); + + /** + * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @param customOrder order criterias + * @param metadata filter metadata + * @param maxResults maximum number of results + * @param page result page (first result is maxResults * page) + * @return list of objects + */ + List<T> findFiltered(final T filter, final Order[] customOrder, final Map<String, FilterMetadata> metadata, + final int maxResults, final int page); + + /** + * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @param customOrder order criterias + * @param metadata filter metadata + * @param maxResults maximum number of results + * @param page result page (first result is maxResults * page) + * @param additionalCriteria additional criteria + * @return list of objects + */ + List<T> findFiltered(final T filter, final Order[] customOrder, final Map<String, FilterMetadata> metadata, + final int maxResults, final int page, List<Criterion> additionalCriteria); + + /** + * Return properties from all objects related to the implementation of this DAO filtered using properties of the + * provided instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @param customOrder order criterias + * @param metadata filter metadata + * @param maxResults maximum number of results + * @param page result page (first result is maxResults * page) + * @param additionalCriteria additional criteria + * @param properties properties to be returned + * @return list of properties from all objects + */ + List< ? > findFilteredProperties(final T filter, final Order[] customOrder, + final Map<String, FilterMetadata> metadata, final int maxResults, final int page, + List<Criterion> additionalCriteria, List<String> properties); + + /** + * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @return list of objects + */ + List<T> findFiltered(final T filter); + + /** + * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @param orderProperties the name of the property used for ordering + * @return list of objects + */ + List<T> findFiltered(final T filter, final Order[] orderProperties); + + /** + * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @param metadata filter metadata + * @return list of objects + */ + List<T> findFiltered(final T filter, Map<String, FilterMetadata> metadata); + + /** + * Return the first object related to the implementation of this DAO filtered using properties of the provided + * instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @return first object in the collection + */ + T findFilteredFirst(final T filter); + + /** + * Return the first object related to the implementation of this DAO filtered using properties of the provided + * instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @return first object in the collection + */ + T findFilteredFirst(final T filter, final Order[] order); + + /** + * Return the first object related to the implementation of this DAO filtered using properties of the provided + * instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @param criteria additional criterion + * @return first object in the collection + */ + T findFilteredFirst(final T filter, final List<Criterion> criteria); + + /** + * Used by the base DAO classes but here for your modification Remove a persistent instance from the datastore. The + * argument may be an instance associated with the receiving Session or a transient instance with an identifier + * associated with existing persistent state. + * @param key key + * @return true if the object was successfully deleted, false otherwise + */ + boolean delete(final K key); + + /** + * Load object matching the given key and return it. Throw an exception if not found. + * @param key serializable key + * @return Object + */ + T load(K key); + + /** + * Load object matching the given key and return it. Lazy object will be initialized. + * @param key serializable key + * @return Object + */ + T loadIfAvailable(K key); + + /** + * Load object matching the given key and return it. Lazy object will be initialized. + * @param key serializable key + * @return Object + */ + T get(K key); + + /** + * Used by the base DAO classes but here for your modification Either save() or update() the given instance, + * depending upon the value of its identifier property. + * @param obj Object + */ + void saveOrUpdate(final T obj); + + /** + * Used by the base DAO classes but here for your modification Update the persistent state associated with the given + * identifier. An exception is thrown if there is a persistent instance with the same identifier in the current + * session. + * @param obj a transient instance containing updated state + */ + void update(T obj); + + /** + * Persist the given transient instance, first assigning a generated identifier. (Or using the current value of the + * identifier property if the assigned generator is used.) + * @param obj Object + * @return generated id + */ + K save(T obj); + +} Deleted: tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java =================================================================== --- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2008-06-08 11:47:36 UTC (rev 829) +++ tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2008-06-09 16:47:53 UTC (rev 832) @@ -1,674 +0,0 @@ -package it.openutils.dao.hibernate; - -import it.openutils.hibernate.example.EnhancedExample; -import it.openutils.hibernate.example.FilterMetadata; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.aopalliance.aop.AspectException; -import org.hibernate.Criteria; -import org.hibernate.Hibernate; -import org.hibernate.HibernateException; -import org.hibernate.ObjectNotFoundException; -import org.hibernate.Query; -import org.hibernate.Session; -import org.hibernate.criterion.CriteriaSpecification; -import org.hibernate.criterion.Criterion; -import org.hibernate.criterion.Order; -import org.hibernate.criterion.ProjectionList; -import org.hibernate.criterion.Projections; -import org.hibernate.criterion.Property; -import org.hibernate.type.Type; -import org.springframework.aop.framework.AopContext; -import org.springframework.orm.hibernate3.HibernateCallback; -import org.springframework.orm.hibernate3.support.HibernateDaoSupport; - - -/** - * Base Hibernate DAO. - * @author Fabrizio Giustina - * @version $Id$ - * @param <T> Persistence class - * @param <K> Object Key - */ -public abstract class HibernateDAOImpl<T extends Object, K extends Serializable> extends HibernateDaoSupport - implements - HibernateDAO<T, K> -{ - - private Class<T> referenceClass; - - private boolean aopenabled; - - /** - * Instantiates a new DAO instance - */ - public HibernateDAOImpl() - { - super(); - } - - /** - * Sets the class of the persistent bean managed by this DAO - * @param referenceClass the class for the bean managed by this DAO - */ - @SuppressWarnings({"unchecked" }) - public HibernateDAOImpl(Class referenceClass) - { - super(); - this.referenceClass = referenceClass; - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public List<T> find(String query) - { - return getHibernateTemplate().find(query); - } - - /** - * {@inheritDoc} - */ - public List<T> findAll() - { - return findAll(getDefaultOrder()); - } - - /** - * {@inheritDoc} - */ - public List<T> findAll(final Order[] orderProperties) - { - return getThis().findAll(orderProperties, new ArrayList<Criterion>()); - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public List<T> findAll(final Order[] orderProperties, final List<Criterion> criteria) - { - return (List<T>) getHibernateTemplate().execute(new HibernateCallback() - { - - public Object doInHibernate(Session ses) throws HibernateException - { - Criteria crit = ses.createCriteria(getReferenceClass()); - if (null != orderProperties) - { - for (int j = 0; j < orderProperties.length; j++) - { - crit.addOrder(orderProperties[j]); - } - - } - if (criteria != null) - { - for (Criterion criterion : criteria) - { - crit.add(criterion); - } - } - return crit.list(); - } - }); - } - - /** - * {@inheritDoc} - */ - public List<T> find(String query, Object obj, Type type) - { - return find(query, new Object[]{obj }, new Type[]{type }); - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public List<T> find(final String query, final Object[] obj, final Type[] type) - { - return (List<T>) getHibernateTemplate().execute(new HibernateCallback() - { - - public Object doInHibernate(Session ses) throws HibernateException - { - // hibernate 3 - return ses.createQuery(query).setParameters(obj, type).list(); - } - }); - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public T load(K key) - { - T result = (T) getHibernateTemplate().load(getReferenceClass(), key); - Hibernate.initialize(result); - return result; - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public T loadIfAvailable(K key) - { - T result; - try - { - result = (T) getHibernateTemplate().get(getReferenceClass(), key); - if (result != null) - { - Hibernate.initialize(result); - } - } - catch (ObjectNotFoundException e) - { - // during lazy initialization - return null; - } - return result; - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public T get(K key) - { - return (T) getHibernateTemplate().get(getReferenceClass(), key); - } - - /** - * {@inheritDoc} - */ - public void saveOrUpdate(final T obj) - { - getHibernateTemplate().saveOrUpdate(obj); - } - - /** - * {@inheritDoc} - */ - public void update(T obj) - { - getHibernateTemplate().update(obj); - } - - /** - * {@inheritDoc} - */ - public boolean delete(final K key) - { - - return (Boolean) getHibernateTemplate().execute(new HibernateCallback() - { - - public Object doInHibernate(Session ses) throws HibernateException - { - ses.delete(ses.load(getReferenceClass(), key)); - return true; - } - }); - - } - - /** - * {@inheritDoc} - */ - public void refresh(T obj) - { - getHibernateTemplate().refresh(obj); - } - - /** - * {@inheritDoc} - */ - public void evict(T obj) - { - getHibernateTemplate().evict(obj); - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public T merge(final T obj) - { - return (T) getHibernateTemplate().execute(new HibernateCallback() - { - - public Object doInHibernate(Session ses) throws HibernateException - { - return ses.merge(obj); - } - }); - - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public K save(T obj) - { - return (K) getHibernateTemplate().save(obj); - } - - /** - * {@inheritDoc} - */ - public T findFilteredFirst(final T filter) - { - return getFirstInCollection(findFiltered(filter, 1, 0)); - } - - /** - * {@inheritDoc} - */ - public T findFilteredFirst(final T filter, List<Criterion> criteria) - { - return getFirstInCollection(findFiltered(filter, null, getDefaultFilterMetadata(), 1, 0, criteria)); - } - - /** - * {@inheritDoc} - */ - public List<T> findFiltered(final T filter) - { - return findFiltered(filter, getDefaultFilterMetadata()); - } - - /** - * {@inheritDoc} - */ - public List<T> findFiltered(T filter, Order[] orderProperties) - { - return findFiltered(filter, orderProperties, getDefaultFilterMetadata(), Integer.MAX_VALUE, 0); - } - - /** - * {@inheritDoc} - */ - public List<T> findFiltered(final T filter, final Map<String, FilterMetadata> metadata) - { - return findFiltered(filter, metadata, Integer.MAX_VALUE, 0); - } - - /** - * {@inheritDoc} - */ - public List<T> findFiltered(final T filter, final int maxResults, final int page) - { - return findFiltered(filter, getDefaultFilterMetadata(), maxResults, page); - } - - /** - * {@inheritDoc} - */ - public List<T> findFiltered(final T filter, final Map<String, FilterMetadata> metadata, final int maxResults, - final int page) - { - return findFiltered(filter, null, metadata, maxResults, page); - } - - /** - * {@inheritDoc} - */ - public List<T> findFiltered(final T filter, final Order[] customOrder, final Map<String, FilterMetadata> metadata, - final int maxResults, final int page) - { - return getThis().findFiltered(filter, customOrder, metadata, maxResults, page, new ArrayList<Criterion>()); - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public List<T> findFiltered(T filter, Order[] customOrder, Map<String, FilterMetadata> metadata, int maxResults, - int page, List<Criterion> additionalCriteria) - { - final Order[] orderProperties = customOrder != null && customOrder.length > 0 ? customOrder : this - .getDefaultOrder(); - - return (List<T>) getHibernateTemplate().execute( - new HibernateCallbackForExecution( - filter, - page, - maxResults, - metadata, - orderProperties, - additionalCriteria, - null)); - } - - /** - * {@inheritDoc} - */ - public List< ? > findFilteredProperties(final T filter, final Order[] customOrder, - final Map<String, FilterMetadata> metadata, final int maxResults, final int page, - List<Criterion> additionalCriteria, List<String> properties) - { - final Order[] orderProperties = customOrder != null && customOrder.length > 0 ? customOrder : this - .getDefaultOrder(); - - return (List< ? >) getHibernateTemplate().execute( - new HibernateCallbackForExecution( - filter, - page, - maxResults, - metadata, - orderProperties, - additionalCriteria, - properties)); - } - - /** - * Return the specific Object class that will be used for class-specific implementation of this DAO. - * @return the reference Class - */ - protected Class<T> getReferenceClass() - { - return referenceClass; - } - - public void setReferenceClass(Class<T> referenceClass) - { - this.referenceClass = referenceClass; - } - - /** - * Return a list of <code>Order</code> object to be used for the default ordering of the collection. - * @return the property name - */ - protected Order[] getDefaultOrder() - { - return new Order[0]; - } - - /** - * Obtain an instance of Query for a named query string defined in the mapping file. Use the parameters given. - * @param name the name of a query defined externally - * @param params the parameter array - * @param maxResults max number of results - * @return Query - */ - protected List< ? > findByNamedQuery(final String name, final Serializable[] params, final Integer maxResults) - { - return (List< ? >) getHibernateTemplate().execute(new HibernateCallback() - { - - public Object doInHibernate(Session ses) throws HibernateException - { - Query q = ses.getNamedQuery(name); - if (maxResults != null) - { - q.setMaxResults(maxResults); - } - if (params != null) - { - for (int i = 0; i < params.length; i++) - { - q.setParameter(i, params[i]); - } - } - return q.list(); - } - }); - } - - /** - * Obtain an instance of Query for a named query string defined in the mapping file. Use the parameters given. - * @param name the name of a query defined externally - * @param params the parameter Map - * @param maxResults max number of results - * @return Query - */ - protected List< ? > findByNamedQuery(final String name, final Map<String, Object> params, final Integer maxResults) - { - return (List< ? >) getHibernateTemplate().execute(new HibernateCallback() - { - - public Object doInHibernate(Session ses) throws HibernateException - { - Query q = ses.getNamedQuery(name); - if (maxResults != null) - { - q.setMaxResults(maxResults); - } - - if (params != null) - { - for (Map.Entry<String, Object> entry : params.entrySet()) - { - setParameterValue(q, entry.getKey(), entry.getValue()); - } - } - return q.list(); - } - }); - } - - /** - * Obtain an instance of Query for a named query string defined in the mapping file. Use the parameters given. - * @param name the name of a query defined externally - * @param params the parameter array - * @param maxResults max number of results - * @return Query - * @deprecated use the better named <code>findByNamedQuery</code> method - */ - @Deprecated - protected List< ? > getNamedQuery(final String name, final Serializable[] params, int maxResults) - { - return findByNamedQuery(name, params, maxResults > 0 ? maxResults : Integer.MAX_VALUE); - } - - /** - * Obtain an instance of Query for a named query string defined in the mapping file. Use the parameters given. - * @param name the name of a query defined externally - * @param params the parameter Map - * @param maxResults max number of results - * @return Query - * @deprecated use the better named <code>findByNamedQuery</code> method - */ - @Deprecated - protected List< ? > getNamedQuery(final String name, final Map<String, Object> params, int maxResults) - { - return findByNamedQuery(name, params, maxResults > 0 ? maxResults : Integer.MAX_VALUE); - } - - /** - * Convenience method to set paramers in the query given based on the actual object type in passed in as the value. - * You may need to add more functionaly to this as desired (or not use this at all). - * @param query the Query to set - * @param key the key name - * @param value the object to set as the parameter - */ - protected void setParameterValue(Query query, String key, Object value) - { - if (null == key || null == value) - { - return; - } - query.setParameter(key, value); - } - - /** - * Returns the default set of FilterMetadata that will be applied to any query. The default implementation doesn't - * set any default filter, subclasses may override this. - * @return map of property name - filter metadata - */ - protected Map<String, FilterMetadata> getDefaultFilterMetadata() - { - return new HashMap<String, FilterMetadata>(0); - } - - /** - * Returns the first object in the collection or null if the collection is null or empty. - * @param list collection - * @return first element in the list - */ - @SuppressWarnings("unchecked") - private T getFirstInCollection(Collection<T> list) - { - if (list != null && !list.isEmpty()) - { - Object result = list.iterator().next(); - Hibernate.initialize(result); - return (T) result; - } - return null; - } - - /** - * Sets the aopenabled. - * @param aopenabled the aopenabled to set - */ - public void setAopenabled(boolean aopenabled) - { - this.aopenabled = aopenabled; - } - - /** - * @return This is needed as for http://opensource.atlassian.com/projects/spring/browse/SPR-2226 - */ - @SuppressWarnings("unchecked") - private HibernateDAO<T, K> getThis() - { - if (!aopenabled) - { - return this; - } - - try - { - return (HibernateDAO<T, K>) AopContext.currentProxy(); - } - catch (AspectException exc) - { - logger.debug("Not running inside an AOP proxy, so no proxy can be returned: " + exc.getMessage()); - return this; - } - catch (IllegalStateException e) - { - logger.warn("Cannot access proxy: " + e.getMessage()); - aopenabled = false; - return this; - } - } - - /** - * @author carone - * @version $Id$ - */ - private final class HibernateCallbackForExecution implements HibernateCallback - { - - /** - * - */ - private final T filter; - - /** - * - */ - private final int page; - - /** - * - */ - private final int maxResults; - - /** - * - */ - private final Map<String, FilterMetadata> metadata; - - /** - * - */ - private final List<String> properties; - - /** - * - */ - private final Order[] orderProperties; - - private List<Criterion> additionalCriteria; - - /** - * @param filter - * @param page - * @param maxResults - * @param metadata - * @param orderProperties - */ - private HibernateCallbackForExecution( - T filter, - int page, - int maxResults, - Map<String, FilterMetadata> metadata, - Order[] orderProperties, - List<Criterion> additionalCriteria, - List<String> properties) - { - this.filter = filter; - this.page = page; - this.maxResults = maxResults; - this.metadata = metadata; - this.orderProperties = orderProperties; - this.additionalCriteria = additionalCriteria; - this.properties = properties; - } - - public Object doInHibernate(Session ses) throws HibernateException - { - Criteria crit = ses.createCriteria(filter.getClass()); - crit.setResultTransformer(CriteriaSpecification.DISTINCT_ROOT_ENTITY); - crit.setMaxResults(maxResults); - crit.setFirstResult(maxResults * page); - - if (orderProperties != null && orderProperties.length > 0) - { - for (Order order : orderProperties) - { - if (order != null) - { - crit.addOrder(order); - } - } - } - EnhancedExample.create(crit, filter, metadata); - if (additionalCriteria != null && !additionalCriteria.isEmpty()) - { - for (Criterion criterion : additionalCriteria) - { - crit.add(criterion); - } - } - if (properties != null) - { - ProjectionList projectionList = Projections.projectionList(); - - for (String property : properties) - { - projectionList.add(Property.forName(property)); - } - - crit.setProjection(projectionList); - } - return crit.list(); - } - } - -} \ No newline at end of file Copied: tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java (from rev 830, trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java) =================================================================== --- tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java (rev 0) +++ tags/openutils-bshd5-2.0.4/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2008-06-09 16:47:53 UTC (rev 832) @@ -0,0 +1,683 @@ +package it.openutils.dao.hibernate; + +import it.openutils.hibernate.example.EnhancedExample; +import it.openutils.hibernate.example.FilterMetadata; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.aopalliance.aop.AspectException; +import org.hibernate.Criteria; +import org.hibernate.Hibernate; +import org.hibernate.HibernateException; +import org.hibernate.ObjectNotFoundException; +import org.hibernate.Query; +import org.hibernate.Session; +import org.hibernate.criterion.CriteriaSpecification; +import org.hibernate.criterion.Criterion; +import org.hibernate.criterion.Order; +import org.hibernate.criterion.ProjectionList; +import org.hibernate.criterion.Projections; +import org.hibernate.criterion.Property; +import org.hibernate.type.Type; +import org.springframework.aop.framework.AopContext; +import org.springframework.orm.hibernate3.HibernateCallback; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; + + +/** + * Base Hibernate DAO. + * @author Fabrizio Giustina + * @version $Id$ + * @param <T> Persistence class + * @param <K> Object Key + */ +public abstract class HibernateDAOImpl<T extends Object, K extends Serializable> extends HibernateDaoSupport + implements + HibernateDAO<T, K> +{ + + private Class<T> referenceClass; + + private boolean aopenabled; + + /** + * Instantiates a new DAO instance + */ + public HibernateDAOImpl() + { + super(); + } + + /** + * Sets the class of the persistent bean managed by this DAO + * @param referenceClass the class for the bean managed by this DAO + */ + @SuppressWarnings({"unchecked" }) + public HibernateDAOImpl(Class referenceClass) + { + super(); + this.referenceClass = referenceClass; + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public List<T> find(String query) + { + return getHibernateTemplate().find(query); + } + + /** + * {@inheritDoc} + */ + public List<T> findAll() + { + return findAll(getDefaultOrder()); + } + + /** + * {@inheritDoc} + */ + public List<T> findAll(final Order[] orderProperties) + { + return getThis().findAll(orderProperties, new ArrayList<Criterion>()); + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public List<T> findAll(final Order[] orderProperties, final List<Criterion> criteria) + { + return (List<T>) getHibernateTemplate().execute(new HibernateCallback() + { + + public Object doInHibernate(Session ses) throws HibernateException + { + Criteria crit = ses.createCriteria(getReferenceClass()); + if (null != orderProperties) + { + for (int j = 0; j < orderProperties.length; j++) + { + crit.addOrder(orderProperties[j]); + } + + } + if (criteria != null) + { + for (Criterion criterion : criteria) + { + crit.add(criterion); + } + } + return crit.list(); + } + }); + } + + /** + * {@inheritDoc} + */ + public List<T> find(String query, Object obj, Type type) + { + return find(query, new Object[]{obj }, new Type[]{type }); + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public List<T> find(final String query, final Object[] obj, final Type[] type) + { + return (List<T>) getHibernateTemplate().execute(new HibernateCallback() + { + + public Object doInHibernate(Session ses) throws HibernateException + { + // hibernate 3 + return ses.createQuery(query).setParameters(obj, type).list(); + } + }); + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public T load(K key) + { + T result = (T) getHibernateTemplate().load(getReferenceClass(), key); + Hibernate.initialize(result); + return result; + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public T loadIfAvailable(K key) + { + T result; + try + { + result = (T) getHibernateTemplate().get(getReferenceClass(), key); + if (result != null) + { + Hibernate.initialize(result); + } + } + catch (ObjectNotFoundException e) + { + // during lazy initialization + return null; + } + return result; + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public T get(K key) + { + return (T) getHibernateTemplate().get(getReferenceClass(), key); + } + + /** + * {@inheritDoc} + */ + public void saveOrUpdate(final T obj) + { + getHibernateTemplate().saveOrUpdate(obj); + } + + /** + * {@inheritDoc} + */ + public void update(T obj) + { + getHibernateTemplate().update(obj); + } + + /** + * {@inheritDoc} + */ + public boolean delete(final K key) + { + + return (Boolean) getHibernateTemplate().execute(new HibernateCallback() + { + + public Object doInHibernate(Session ses) throws HibernateException + { + ses.delete(ses.load(getReferenceClass(), key)); + return true; + } + }); + + } + + /** + * {@inheritDoc} + */ + public void refresh(T obj) + { + getHibernateTemplate().refresh(obj); + } + + /** + * {@inheritDoc} + */ + public void evict(T obj) + { + getHibernateTemplate().evict(obj); + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public T merge(final T obj) + { + return (T) getHibernateTemplate().execute(new HibernateCallback() + { + + public Object doInHibernate(Session ses) throws HibernateException + { + return ses.merge(obj); + } + }); + + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public K save(T obj) + { + return (K) getHibernateTemplate().save(obj); + } + + /** + * {@inheritDoc} + */ + public T findFilteredFirst(final T filter) + { + return getFirstInCollection(findFiltered(filter, 1, 0)); + } + + /** + * {@inheritDoc} + */ + public T findFilteredFirst(final T filter, final Order[] order) + { + return getFirstInCollection(findFiltered(filter, order, getDefaultFilterMetadata(), 1, 0)); + } + + + /** + * {@inheritDoc} + */ + public T findFilteredFirst(final T filter, List<Criterion> criteria) + { + return getFirstInCollection(findFiltered(filter, null, getDefaultFilterMetadata(), 1, 0, criteria)); + } + + /** + * {@inheritDoc} + */ + public List<T> findFiltered(final T filter) + { + return findFiltered(filter, getDefaultFilterMetadata()); + } + + /** + * {@inheritDoc} + */ + public List<T> findFiltered(T filter, Order[] orderProperties) + { + return findFiltered(filter, orderProperties, getDefaultFilterMetadata(), Integer.MAX_VALUE, 0); + } + + /** + * {@inheritDoc} + */ + public List<T> findFiltered(final T filter, final Map<String, FilterMetadata> metadata) + { + return findFiltered(filter, metadata, Integer.MAX_VALUE, 0); + } + + /** + * {@inheritDoc} + */ + public List<T> findFiltered(final T filter, final int maxResults, final int page) + { + return findFiltered(filter, getDefaultFilterMetadata(), maxResults, page); + } + + /** + * {@inheritDoc} + */ + public List<T> findFiltered(final T filter, final Map<String, FilterMetadata> metadata, final int maxResults, + final int page) + { + return findFiltered(filter, null, metadata, maxResults, page); + } + + /** + * {@inheritDoc} + */ + public List<T> findFiltered(final T filter, final Order[] customOrder, final Map<String, FilterMetadata> metadata, + final int maxResults, final int page) + { + return getThis().findFiltered(filter, customOrder, metadata, maxResults, page, new ArrayList<Criterion>()); + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public List... [truncated message content] |
From: <fc...@us...> - 2008-06-09 16:47:41
|
Revision: 831 http://openutils.svn.sourceforge.net/openutils/?rev=831&view=rev Author: fcarone Date: 2008-06-09 09:47:40 -0700 (Mon, 09 Jun 2008) Log Message: ----------- [maven-release-plugin] prepare release openutils-bshd5-2.0.4 Modified Paths: -------------- trunk/openutils-bshd5/pom.xml Modified: trunk/openutils-bshd5/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2008-06-09 16:46:26 UTC (rev 830) +++ trunk/openutils-bshd5/pom.xml 2008-06-09 16:47:40 UTC (rev 831) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-bshd5</artifactId> <name>openutils base Spring-Hibernate DAO for java 5.0</name> - <version>2.0.4-SNAPSHOT</version> + <version>2.0.4</version> <description>openutils base Spring-Hibernate DAO for java 5.0</description> <dependencies> <dependency> @@ -105,4 +105,10 @@ <properties> <spring.version>2.5.3</spring.version> </properties> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-2.0.4</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-2.0.4</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-bshd5-2.0.4</url> + </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2008-06-09 16:46:23
|
Revision: 830 http://openutils.svn.sourceforge.net/openutils/?rev=830&view=rev Author: fcarone Date: 2008-06-09 09:46:26 -0700 (Mon, 09 Jun 2008) Log Message: ----------- findFilteredFirst with order added Modified Paths: -------------- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java Modified: trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java =================================================================== --- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java 2008-06-08 11:47:36 UTC (rev 829) +++ trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java 2008-06-09 16:46:26 UTC (rev 830) @@ -193,6 +193,14 @@ * Return the first object related to the implementation of this DAO filtered using properties of the provided * instance. * @param filter an instance of the object with the properties you whish to filter on. + * @return first object in the collection + */ + T findFilteredFirst(final T filter, final Order[] order); + + /** + * Return the first object related to the implementation of this DAO filtered using properties of the provided + * instance. + * @param filter an instance of the object with the properties you whish to filter on. * @param criteria additional criterion * @return first object in the collection */ Modified: trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java =================================================================== --- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2008-06-08 11:47:36 UTC (rev 829) +++ trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2008-06-09 16:46:26 UTC (rev 830) @@ -276,6 +276,15 @@ /** * {@inheritDoc} */ + public T findFilteredFirst(final T filter, final Order[] order) + { + return getFirstInCollection(findFiltered(filter, order, getDefaultFilterMetadata(), 1, 0)); + } + + + /** + * {@inheritDoc} + */ public T findFilteredFirst(final T filter, List<Criterion> criteria) { return getFirstInCollection(findFiltered(filter, null, getDefaultFilterMetadata(), 1, 0, criteria)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-08 11:47:32
|
Revision: 829 http://openutils.svn.sourceforge.net/openutils/?rev=829&view=rev Author: fgiust Date: 2008-06-08 04:47:36 -0700 (Sun, 08 Jun 2008) Log Message: ----------- small fixes Modified Paths: -------------- trunk/openutils-mgnltasks/src/site/apt/index.apt Modified: trunk/openutils-mgnltasks/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnltasks/src/site/apt/index.apt 2008-06-08 11:39:26 UTC (rev 828) +++ trunk/openutils-mgnltasks/src/site/apt/index.apt 2008-06-08 11:47:36 UTC (rev 829) @@ -12,12 +12,10 @@ Most of them are useful to handle the bootstrap or configuration of simple content modules. See the full list and description in {{{apidocs/index.html}javadocs}}. - Openutils-mgnltasks is licensed under GPLv3 (since magnolia 3.5 is GPLv3 we are forced to use GPL instead of ASF, sorry) + Openutils-mgnltasks is licensed under GPLv3 (forced by the fact that magnolia 3.5 is GPLv3) Released versions - openutils-testing-testng: - {{{http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-mgnltasks}http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-mgnltasks}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-08 11:39:19
|
Revision: 828 http://openutils.svn.sourceforge.net/openutils/?rev=828&view=rev Author: fgiust Date: 2008-06-08 04:39:26 -0700 (Sun, 08 Jun 2008) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-mgnltasks/pom.xml Modified: trunk/openutils-mgnltasks/pom.xml =================================================================== --- trunk/openutils-mgnltasks/pom.xml 2008-06-08 11:39:19 UTC (rev 827) +++ trunk/openutils-mgnltasks/pom.xml 2008-06-08 11:39:26 UTC (rev 828) @@ -10,7 +10,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnltasks</artifactId> <name>openutils-mgnltasks</name> - <version>3.5.2</version> + <version>3.5.3-SNAPSHOT</version> <description>A collection of useful magnolia update tasks that can be reused in custom modules</description> <licenses> <license> @@ -86,10 +86,4 @@ </snapshots> </repository> </repositories> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnltasks-3.5.2</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnltasks-3.5.2</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnltasks-3.5.2</url> - </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-08 11:39:12
|
Revision: 827 http://openutils.svn.sourceforge.net/openutils/?rev=827&view=rev Author: fgiust Date: 2008-06-08 04:39:19 -0700 (Sun, 08 Jun 2008) Log Message: ----------- [maven-release-plugin] copy for tag openutils-mgnltasks-3.5.2 Added Paths: ----------- tags/openutils-mgnltasks-3.5.2/ tags/openutils-mgnltasks-3.5.2/pom.xml Removed Paths: ------------- tags/openutils-mgnltasks-3.5.2/pom.xml Copied: tags/openutils-mgnltasks-3.5.2 (from rev 825, trunk/openutils-mgnltasks) Deleted: tags/openutils-mgnltasks-3.5.2/pom.xml =================================================================== --- trunk/openutils-mgnltasks/pom.xml 2008-06-08 11:38:26 UTC (rev 825) +++ tags/openutils-mgnltasks-3.5.2/pom.xml 2008-06-08 11:39:19 UTC (rev 827) @@ -1,89 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>8</version> - <relativePath>..</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - <packaging>jar</packaging> - <artifactId>openutils-mgnltasks</artifactId> - <name>openutils-mgnltasks</name> - <version>3.5.2-SNAPSHOT</version> - <description>A collection of useful magnolia update tasks that can be reused in custom modules</description> - <licenses> - <license> - <name>GPLv3</name> - <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> - </license> - </licenses> - <build> - <resources> - <resource> - <filtering>false</filtering> - <directory>src/main/resources</directory> - <includes> - <include>**/*</include> - </includes> - </resource> - <resource> - <filtering>true</filtering> - <directory>src/main/resources</directory> - <includes> - <include>META-INF/magnolia/*</include> - </includes> - </resource> - </resources> - </build> - <dependencies> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-core</artifactId> - <version>3.5.8</version> - </dependency> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-module-admininterface</artifactId> - <version>3.5.8</version> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.4</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>jsp-api</artifactId> - <version>2.0</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <classifier>jdk15</classifier> - <version>5.7</version> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - <repositories> - <repository> - <id>repository.magnolia.info</id> - <name>magnolia repository</name> - <url>http://repo.magnolia.info/m2</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> -</project> Copied: tags/openutils-mgnltasks-3.5.2/pom.xml (from rev 826, trunk/openutils-mgnltasks/pom.xml) =================================================================== --- tags/openutils-mgnltasks-3.5.2/pom.xml (rev 0) +++ tags/openutils-mgnltasks-3.5.2/pom.xml 2008-06-08 11:39:19 UTC (rev 827) @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>8</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + <packaging>jar</packaging> + <artifactId>openutils-mgnltasks</artifactId> + <name>openutils-mgnltasks</name> + <version>3.5.2</version> + <description>A collection of useful magnolia update tasks that can be reused in custom modules</description> + <licenses> + <license> + <name>GPLv3</name> + <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> + </license> + </licenses> + <build> + <resources> + <resource> + <filtering>false</filtering> + <directory>src/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + <resource> + <filtering>true</filtering> + <directory>src/main/resources</directory> + <includes> + <include>META-INF/magnolia/*</include> + </includes> + </resource> + </resources> + </build> + <dependencies> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-core</artifactId> + <version>3.5.8</version> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-module-admininterface</artifactId> + <version>3.5.8</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.4</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + <version>2.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.7</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + <repositories> + <repository> + <id>repository.magnolia.info</id> + <name>magnolia repository</name> + <url>http://repo.magnolia.info/m2</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnltasks-3.5.2</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnltasks-3.5.2</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnltasks-3.5.2</url> + </scm> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-08 11:39:00
|
Revision: 826 http://openutils.svn.sourceforge.net/openutils/?rev=826&view=rev Author: fgiust Date: 2008-06-08 04:39:08 -0700 (Sun, 08 Jun 2008) Log Message: ----------- [maven-release-plugin] prepare release openutils-mgnltasks-3.5.2 Modified Paths: -------------- trunk/openutils-mgnltasks/pom.xml Modified: trunk/openutils-mgnltasks/pom.xml =================================================================== --- trunk/openutils-mgnltasks/pom.xml 2008-06-08 11:38:26 UTC (rev 825) +++ trunk/openutils-mgnltasks/pom.xml 2008-06-08 11:39:08 UTC (rev 826) @@ -10,7 +10,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnltasks</artifactId> <name>openutils-mgnltasks</name> - <version>3.5.2-SNAPSHOT</version> + <version>3.5.2</version> <description>A collection of useful magnolia update tasks that can be reused in custom modules</description> <licenses> <license> @@ -86,4 +86,10 @@ </snapshots> </repository> </repositories> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnltasks-3.5.2</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnltasks-3.5.2</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnltasks-3.5.2</url> + </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-06-08 11:38:23
|
Revision: 825 http://openutils.svn.sourceforge.net/openutils/?rev=825&view=rev Author: fgiust Date: 2008-06-08 04:38:26 -0700 (Sun, 08 Jun 2008) Log Message: ----------- ready for 3.5.2 Modified Paths: -------------- trunk/openutils-mgnltasks/pom.xml trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/AnonymousUserSetupTask.java trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/CheckAndCreateUserTask.java trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/DeleteNodeTask.java trunk/openutils-mgnltasks/src/site/changes/changes.xml trunk/openutils-mgnltasks/src/site/site.xml Added Paths: ----------- trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/DisableSubscribersTask.java trunk/openutils-mgnltasks/src/site/apt/howto.apt Modified: trunk/openutils-mgnltasks/pom.xml =================================================================== --- trunk/openutils-mgnltasks/pom.xml 2008-05-07 12:57:08 UTC (rev 824) +++ trunk/openutils-mgnltasks/pom.xml 2008-06-08 11:38:26 UTC (rev 825) @@ -40,12 +40,12 @@ <dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-core</artifactId> - <version>3.5.4</version> + <version>3.5.8</version> </dependency> <dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-module-admininterface</artifactId> - <version>3.5.4</version> + <version>3.5.8</version> </dependency> <dependency> <groupId>javax.servlet</groupId> Modified: trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/AnonymousUserSetupTask.java =================================================================== --- trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/AnonymousUserSetupTask.java 2008-05-07 12:57:08 UTC (rev 824) +++ trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/AnonymousUserSetupTask.java 2008-06-08 11:38:26 UTC (rev 825) @@ -44,8 +44,7 @@ private boolean allowAccess; /** - * @param name - * @param description + * @param allowAccess true to add access to anonymous users, false to remove it */ public AnonymousUserSetupTask(boolean allowAccess) { Modified: trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/CheckAndCreateUserTask.java =================================================================== --- trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/CheckAndCreateUserTask.java 2008-05-07 12:57:08 UTC (rev 824) +++ trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/CheckAndCreateUserTask.java 2008-06-08 11:38:26 UTC (rev 825) @@ -43,8 +43,7 @@ /** * @param user User path (e.g. /system/superuser) - * @param defaultPassword default password - * @param newpassword new password, will be set only if the current password matches the default one + * @param bootstrapFile bootstrap file used to create the user */ public CheckAndCreateUserTask(String user, String bootstrapFile) { Modified: trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/DeleteNodeTask.java =================================================================== --- trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/DeleteNodeTask.java 2008-05-07 12:57:08 UTC (rev 824) +++ trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/DeleteNodeTask.java 2008-06-08 11:38:26 UTC (rev 825) @@ -38,10 +38,8 @@ private final String nodePath; /** - * @param workspaceName - * @param nodePath - * @param propertyName - * @param newValue + * @param workspaceName workspace (for example "config") + * @param nodePath node path */ public DeleteNodeTask(String workspaceName, String nodePath) { Added: trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/DisableSubscribersTask.java =================================================================== --- trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/DisableSubscribersTask.java (rev 0) +++ trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/DisableSubscribersTask.java 2008-06-08 11:38:26 UTC (rev 825) @@ -0,0 +1,76 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package it.openutils.mgnltasks; + +import info.magnolia.cms.core.Content; +import info.magnolia.cms.core.HierarchyManager; +import info.magnolia.cms.core.NodeData; +import info.magnolia.cms.util.ContentUtil; +import info.magnolia.module.InstallContext; +import info.magnolia.module.delta.AbstractRepositoryTask; +import info.magnolia.module.delta.TaskExecutionException; + +import java.util.List; + +import javax.jcr.RepositoryException; + + +/** + * Disable any configured subscriber. + * @author fgiust + * @version $Id: $ + */ +public class DisableSubscribersTask extends AbstractRepositoryTask +{ + + private String subscribersPath = "/server/activation/subscribers"; + + public DisableSubscribersTask() + { + super("Disabling subscribers", "Disabling subscribers"); + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + protected void doExecute(InstallContext installContext) throws RepositoryException, TaskExecutionException + { + + HierarchyManager hm = installContext.getHierarchyManager("config"); + + if (hm.isExist(subscribersPath)) + { + + Content subscribersNode = hm.getContent(subscribersPath); + List<Content> subscribers = ContentUtil.collectAllChildren(subscribersNode); + + for (Content content : subscribers) + { + NodeData nd = content.getNodeData("active"); + if (nd.getBoolean()) + { + nd.setValue(false); + } + + } + } + } + +} Property changes on: trunk/openutils-mgnltasks/src/main/java/it/openutils/mgnltasks/DisableSubscribersTask.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Added: trunk/openutils-mgnltasks/src/site/apt/howto.apt =================================================================== --- trunk/openutils-mgnltasks/src/site/apt/howto.apt (rev 0) +++ trunk/openutils-mgnltasks/src/site/apt/howto.apt 2008-06-08 11:38:26 UTC (rev 825) @@ -0,0 +1,85 @@ + -------------------------- + O p e n u t i l s + -------------------------- + Fabrizio Giustina + -------------------------- + +Usage + + You can subclass openutils' SimpleModuleVersionHandler in order to get a fully functional module version handler ready. + + SimpleModuleVersionHandler will by default take care of (read carefully!): + + * Re-bootstrapping all its configuration (config workspace) when the version number changes + + * Update the module version in the jcr repository + + [] + + + In addition to this, you can override the getStartupTasks() method and, by using the standard tasks provided by + magnolia itself or openutils-mgnltasks, perform all the sorts of initialization/configuration/checks you may need. + + See the example below for an inspiration on how you could setup your content modules: + + ++------------------------------------------------+ + +public class MymoduleModuleVersionHandler extends SimpleModuleVersionHandler +{ + + public List<Task> getStartupTasks(InstallContext installContext) + { + + boolean admin = SystemProperty.getBooleanProperty("magnolia.bootstrap.authorInstance"); + boolean develop = SystemProperty.getBooleanProperty("magnolia.develop"); + + List<Task> tasks = new ArrayList<Task>(); + + // allow access for public or development instances only + tasks.add(new AnonymousUserSetupTask(!admin || develop)); + + // configure the smtp from magnolia.properties + String smtp = SystemProperty.getProperty("mail.host"); + if (StringUtils.isNotEmpty(smtp)) + { + tasks.add(new SetPropertyTask("config", "/modules/mail/config/smtp", "smtpServer", smtp)); + } + + // sort dialogs and paragraphs by name, templates by title + tasks.add(new NodeSortTask("config", "/modules/mymodule/dialogs")); + tasks.add(new NodeSortTask("config", "/modules/mymodule/paragraphs")); + tasks.add(new NodeSortTask("config", "/modules/mymodule/templates", "title")); + + // don't use COS + tasks.add(new SetPropertyTask( + "config", + "/server/filters/multipartRequest", + "class", + "info.magnolia.cms.filters.MultipartRequestFilter")); + + // we want to be able to set a different default page in magnolia.properties + String defaultpage = !admin || develop + ? "redirect:" + SystemProperty.getProperty("magnolia.defaultpage") + : "redirect:/.magnolia/pages/adminCentral.html"; + tasks.add(new SetPropertyTask( + "config", + "/modules/adminInterface/virtualURIMapping/default", + "toURI", + defaultpage)); + + // adds a new admin user if missing + tasks.add(new CheckAndCreateUserTask("/admin/admin", "/mgnl-bootstrap/users/users.admin.admin.xml")); + + // disable any subscriber during development + if (develop || !admin) + { + tasks.add(new DisableSubscribersTask()); + } + + return tasks; + } + +} + ++------------------------------------------------+ Property changes on: trunk/openutils-mgnltasks/src/site/apt/howto.apt ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + text/plain Name: svn:keywords + Author Date Id Revision Name: svn:eol-style + native Modified: trunk/openutils-mgnltasks/src/site/changes/changes.xml =================================================================== --- trunk/openutils-mgnltasks/src/site/changes/changes.xml 2008-05-07 12:57:08 UTC (rev 824) +++ trunk/openutils-mgnltasks/src/site/changes/changes.xml 2008-06-08 11:38:26 UTC (rev 825) @@ -8,9 +8,10 @@ <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> </properties> <body> - <release version="3.5.2" date="in svn" description="in svn"> + <release version="3.5.2" date="2008-06-08" description="in svn"> <action type="add" dev="fgiust">Added [modulename].update.disabled property in SimpleModuleVersionHandler that can be set to true in order to disable module configuration updates</action> + <action type="add" dev="fgiust">Added it.openutils.mgnltasks.DisableSubscribersTask</action> </release> <release version="3.5.1" date="2008-04-28" description="3.5.1"> <action type="add" dev="fgiust">Added UpdateModuleVersionTask.</action> Modified: trunk/openutils-mgnltasks/src/site/site.xml =================================================================== --- trunk/openutils-mgnltasks/src/site/site.xml 2008-05-07 12:57:08 UTC (rev 824) +++ trunk/openutils-mgnltasks/src/site/site.xml 2008-06-08 11:38:26 UTC (rev 825) @@ -22,6 +22,7 @@ </breadcrumbs> <menu name="openutils mgnltasks"> <item name="Introduction" href="index.html"></item> + <item name="How to" href="howto.html"></item> </menu> <menu ref="modules" inherit="bottom" /> <menu ref="reports" inherit="bottom" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-05-07 14:20:14
|
Revision: 822 http://openutils.svn.sourceforge.net/openutils/?rev=822&view=rev Author: fgiust Date: 2008-05-07 05:56:35 -0700 (Wed, 07 May 2008) Log Message: ----------- [maven-release-plugin] prepare release openutils-mgnlspring-3.5 Modified Paths: -------------- trunk/openutils-mgnlspring/pom.xml Modified: trunk/openutils-mgnlspring/pom.xml =================================================================== --- trunk/openutils-mgnlspring/pom.xml 2008-05-07 12:56:00 UTC (rev 821) +++ trunk/openutils-mgnlspring/pom.xml 2008-05-07 12:56:35 UTC (rev 822) @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> @@ -11,7 +10,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlspring</artifactId> <name>openutils-mgnlspring</name> - <version>0.2-SNAPSHOT</version> + <version>3.5</version> <licenses> <license> <name>GPLv3</name> @@ -149,4 +148,10 @@ <properties> <spring.version>2.5.3</spring.version> </properties> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlspring-3.5</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlspring-3.5</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlspring-3.5</url> + </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-05-07 12:57:03
|
Revision: 824 http://openutils.svn.sourceforge.net/openutils/?rev=824&view=rev Author: fgiust Date: 2008-05-07 05:57:08 -0700 (Wed, 07 May 2008) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-mgnlspring/pom.xml Modified: trunk/openutils-mgnlspring/pom.xml =================================================================== --- trunk/openutils-mgnlspring/pom.xml 2008-05-07 12:56:53 UTC (rev 823) +++ trunk/openutils-mgnlspring/pom.xml 2008-05-07 12:57:08 UTC (rev 824) @@ -10,7 +10,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlspring</artifactId> <name>openutils-mgnlspring</name> - <version>3.5</version> + <version>3.5.1-SNAPSHOT</version> <licenses> <license> <name>GPLv3</name> @@ -148,10 +148,4 @@ <properties> <spring.version>2.5.3</spring.version> </properties> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlspring-3.5</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlspring-3.5</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlspring-3.5</url> - </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |