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: <die...@us...> - 2012-02-27 10:31:15
|
Revision: 3739 http://openutils.svn.sourceforge.net/openutils/?rev=3739&view=rev Author: diego_schivo Date: 2012-02-27 10:31:04 +0000 (Mon, 27 Feb 2012) Log Message: ----------- CRIT-48 net.sourceforge.openutils.mgnlcriteria.advanced.FirstDigitEscapeTest.testEscapeParentheses() Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java 2012-02-27 10:14:49 UTC (rev 3738) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java 2012-02-27 10:31:04 UTC (rev 3739) @@ -90,7 +90,7 @@ public void testEscapeParentheses() throws Exception { Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); - criteria.setBasePath("//myproject/Sport/F1/0a67369b-8cc6-43d8-b2d3-c07b12a2ed5f-(xyz)"); + criteria.setBasePath("//myproject/Sport/F1/0a67369b-8cc6-43d8-b2d3-(c07b12a2ed5f)"); criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:contentNode")); criteria.addOrder(Order.desc("@jcr:created")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-02-27 10:14:59
|
Revision: 3738 http://openutils.svn.sourceforge.net/openutils/?rev=3738&view=rev Author: diego_schivo Date: 2012-02-27 10:14:49 +0000 (Mon, 27 Feb 2012) Log Message: ----------- CRIT-48 net.sourceforge.openutils.mgnlcriteria.advanced.FirstDigitEscapeTest.testEscapeParentheses() Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java 2012-02-27 09:52:51 UTC (rev 3737) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java 2012-02-27 10:14:49 UTC (rev 3738) @@ -86,4 +86,18 @@ Assert.assertFalse(resultIterator.hasNext()); } + @Test + public void testEscapeParentheses() throws Exception + { + Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); + criteria.setBasePath("//myproject/Sport/F1/0a67369b-8cc6-43d8-b2d3-c07b12a2ed5f-(xyz)"); + criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:contentNode")); + criteria.addOrder(Order.desc("@jcr:created")); + + AdvancedResult advResult = criteria.execute(); + + ResultIterator<AdvancedResultItem> resultIterator = advResult.getItems(); + Assert.assertFalse(resultIterator.hasNext()); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-02-27 09:52:57
|
Revision: 3737 http://openutils.svn.sourceforge.net/openutils/?rev=3737&view=rev Author: diego_schivo Date: 2012-02-27 09:52:51 +0000 (Mon, 27 Feb 2012) Log Message: ----------- CRIT-47 Hyphen escape Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java 2012-02-27 09:51:38 UTC (rev 3736) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java 2012-02-27 09:52:51 UTC (rev 3737) @@ -141,6 +141,10 @@ { encodedPath.append("_x002c_"); } + else if (inXpathCondition <= 0 && ch == '-') + { + encodedPath.append("_x002d_"); + } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-02-27 09:51:49
|
Revision: 3736 http://openutils.svn.sourceforge.net/openutils/?rev=3736&view=rev Author: diego_schivo Date: 2012-02-27 09:51:38 +0000 (Mon, 27 Feb 2012) Log Message: ----------- CRIT-47 net.sourceforge.openutils.mgnlcriteria.advanced.FirstDigitEscapeTest.testEscapeHyphen() Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java 2012-02-17 17:42:45 UTC (rev 3735) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java 2012-02-27 09:51:38 UTC (rev 3736) @@ -72,4 +72,18 @@ Assert.assertEquals(resultIterator.next().getName(), "ceb55065-e6cd-451a-8ce0-7e495e7e8fbc"); } + @Test + public void testEscapeHyphen() throws Exception + { + Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); + criteria.setBasePath("//myproject/Sport/F1/-0a67369b-8cc6-43d8-b2d3-c07b12a2ed5f/versions/*"); + criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:contentNode")); + criteria.addOrder(Order.desc("@jcr:created")); + + AdvancedResult advResult = criteria.execute(); + + ResultIterator<AdvancedResultItem> resultIterator = advResult.getItems(); + Assert.assertFalse(resultIterator.hasNext()); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@op...> - 2012-02-17 18:43:00
|
See <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/70/changes> Changes: [molaschi] groovy shell IDE ------------------------------------------ Started by an SCM change Updating https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-mgnlgroovy D src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.java AU src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellScript.java A src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.java.bk AU src/main/resources/mgnl-resources/groovyshell/css/console.css A src/main/resources/mgnl-resources/groovyshell/css/bootstrap AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery.layout.css AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-1.8.16.custom.css AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/bootstrap.css A src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_inset-soft_95_fef1ec_1x100.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-icons_2e83ff_256x240.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-icons_888888_256x240.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_glass_55_fbf9ee_1x400.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_glass_75_dadada_1x400.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_glass_75_e6e6e6_1x400.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_glass_65_ffffff_1x400.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_glass_75_ffffff_1x400.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_highlight-soft_75_cccccc_1x100.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-icons_cd0a0a_256x240.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_flat_0_aaaaaa_40x100.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-icons_f6cf3b_256x240.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-icons_454545_256x240.png AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-icons_222222_256x240.png A src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput A src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/images AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/images/icon-generic.gif AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/images/icon-media.gif AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/images/icon-image.gif AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/images/icon-zip.gif AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/enhanced.css AU src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery.ui.1.8.16.ie.css AU src/main/resources/mgnl-resources/groovyshell/css/editor.css AU src/main/resources/mgnl-resources/groovyshell/js/jquery.cookie.js A src/main/resources/mgnl-resources/groovyshell/js/jquery-ui-fileinput AU src/main/resources/mgnl-resources/groovyshell/js/jquery-ui-fileinput/fileinput.jquery.js AU src/main/resources/mgnl-resources/groovyshell/js/jquery-ui-fileinput/enhance.min.js A src/main/resources/mgnl-resources/groovyshell/js/ace AU src/main/resources/mgnl-resources/groovyshell/js/ace/theme-eclipse.js AU src/main/resources/mgnl-resources/groovyshell/js/ace/mode-groovy.js AU src/main/resources/mgnl-resources/groovyshell/js/ace/ace.js D src/main/resources/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.html AU src/main/resources/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellScript.html A src/main/resources/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.html.bk U src/main/resources/mgnl-bootstrap/groovyshell/config.modules.adminInterface.config.menu.tools.groovyShell.xml AU src/main/resources/mgnl-bootstrap/groovyshell/config.modules.groovyshell.pages.groovyShellScript.xml At revision 3735 Found mavenVersion 2.2.1 from file jar:file:/usr/local/maven/lib/maven-2.2.1-uber.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties Parsing POMs [openutils-mgnlgroovy] $ /usr/local/jdk1.6.0_20/bin/java -cp /data/hudson-data/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.403.jar:/usr/local/maven/boot/classworlds-1.1.jar hudson.maven.agent.Main /usr/local/maven /data/webapps/hudson/WEB-INF/lib/remoting-1.403.jar /data/hudson-data/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.403.jar 45680 /data/hudson-data/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar <===[HUDSON REMOTING CAPACITY]===> channel started Executing Maven: -B -f <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/ws/openutils-mgnlgroovy/pom.xml> clean install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Groovy Shell for Magnolia CMS [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/ws/openutils-mgnlgroovy/target> [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 50 resources [INFO] Copying 1 resource [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 3 source files to <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/ws/openutils-mgnlgroovy/target/classes> [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/ws/openutils-mgnlgroovy/src/test/resources> [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] No tests to run. [JENKINS] Recording test results [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/ws/openutils-mgnlgroovy/target/openutils-mgnlgroovy-1.2.1-SNAPSHOT.jar> [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [source:jar {execution: attach-sources}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/ws/openutils-mgnlgroovy/target/openutils-mgnlgroovy-1.2.1-SNAPSHOT-sources.jar> [INFO] [assembly:single {execution: bundle}] [INFO] Reading assembly descriptor: <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/ws/openutils-mgnlgroovy/src/main/assembly/assembly-bundle.xml> [INFO] Building zip: <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/ws/openutils-mgnlgroovy/target/openutils-mgnlgroovy-1.2.1-SNAPSHOT-bundle.zip> [INFO] [license:check {execution: default}] [INFO] Checking licenses... [INFO] Missing header in: <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/ws/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellScript.java> [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/ws/openutils-mgnlgroovy/pom.xml> to /data/hudson-data/jobs/openutils-mgnlgroovy/modules/net.sourceforge.openutils$openutils-mgnlgroovy/builds/2012-02-17_19-22-21/archive/net.sourceforge.openutils/openutils-mgnlgroovy/1.2.1-SNAPSHOT/pom.xml [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/ws/openutils-mgnlgroovy/target/openutils-mgnlgroovy-1.2.1-SNAPSHOT.jar> to /data/hudson-data/jobs/openutils-mgnlgroovy/modules/net.sourceforge.openutils$openutils-mgnlgroovy/builds/2012-02-17_19-22-21/archive/net.sourceforge.openutils/openutils-mgnlgroovy/1.2.1-SNAPSHOT/openutils-mgnlgroovy-1.2.1-SNAPSHOT.jar [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/ws/openutils-mgnlgroovy/target/openutils-mgnlgroovy-1.2.1-SNAPSHOT-sources.jar> to /data/hudson-data/jobs/openutils-mgnlgroovy/modules/net.sourceforge.openutils$openutils-mgnlgroovy/builds/2012-02-17_19-22-21/archive/net.sourceforge.openutils/openutils-mgnlgroovy/1.2.1-SNAPSHOT/openutils-mgnlgroovy-1.2.1-SNAPSHOT-sources.jar [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Some files do not have the expected license header [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 37 seconds [INFO] Finished at: Fri Feb 17 19:23:05 CET 2012 [INFO] Final Memory: 50M/315M [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data Sending e-mails to: ope...@li... channel stopped |
From: <hu...@op...> - 2012-02-17 18:43:00
|
See <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/70/changes> Changes: [molaschi] groovy shell IDE ------------------------------------------ <===[HUDSON REMOTING CAPACITY]===> channel started Executing Maven: -B -f <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/ws/pom.xml> clean install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Groovy Shell for Magnolia CMS [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/ws/target> [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 50 resources [INFO] Copying 1 resource [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 3 source files to <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/ws/target/classes> [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/ws/src/test/resources> [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] No tests to run. [JENKINS] Recording test results [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/ws/target/openutils-mgnlgroovy-1.2.1-SNAPSHOT.jar> [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [source:jar {execution: attach-sources}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/ws/target/openutils-mgnlgroovy-1.2.1-SNAPSHOT-sources.jar> [INFO] [assembly:single {execution: bundle}] [INFO] Reading assembly descriptor: <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/ws/src/main/assembly/assembly-bundle.xml> [INFO] Building zip: <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/ws/target/openutils-mgnlgroovy-1.2.1-SNAPSHOT-bundle.zip> [INFO] [license:check {execution: default}] [INFO] Checking licenses... [INFO] Missing header in: <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/ws/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellScript.java> [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/ws/pom.xml> to /data/hudson-data/jobs/openutils-mgnlgroovy/modules/net.sourceforge.openutils$openutils-mgnlgroovy/builds/2012-02-17_19-22-21/archive/net.sourceforge.openutils/openutils-mgnlgroovy/1.2.1-SNAPSHOT/pom.xml [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/ws/target/openutils-mgnlgroovy-1.2.1-SNAPSHOT.jar> to /data/hudson-data/jobs/openutils-mgnlgroovy/modules/net.sourceforge.openutils$openutils-mgnlgroovy/builds/2012-02-17_19-22-21/archive/net.sourceforge.openutils/openutils-mgnlgroovy/1.2.1-SNAPSHOT/openutils-mgnlgroovy-1.2.1-SNAPSHOT.jar [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlgroovy/net.sourceforge.openutils$openutils-mgnlgroovy/ws/target/openutils-mgnlgroovy-1.2.1-SNAPSHOT-sources.jar> to /data/hudson-data/jobs/openutils-mgnlgroovy/modules/net.sourceforge.openutils$openutils-mgnlgroovy/builds/2012-02-17_19-22-21/archive/net.sourceforge.openutils/openutils-mgnlgroovy/1.2.1-SNAPSHOT/openutils-mgnlgroovy-1.2.1-SNAPSHOT-sources.jar [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Some files do not have the expected license header [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 37 seconds [INFO] Finished at: Fri Feb 17 19:23:05 CET 2012 [INFO] Final Memory: 50M/315M [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data |
From: <mol...@us...> - 2012-02-17 17:42:57
|
Revision: 3735 http://openutils.svn.sourceforge.net/openutils/?rev=3735&view=rev Author: molaschi Date: 2012-02-17 17:42:45 +0000 (Fri, 17 Feb 2012) Log Message: ----------- groovy shell IDE Modified Paths: -------------- trunk/openutils-mgnlgroovy/src/main/resources/mgnl-bootstrap/groovyshell/config.modules.adminInterface.config.menu.tools.groovyShell.xml Added Paths: ----------- trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.java.bk trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellScript.java trunk/openutils-mgnlgroovy/src/main/resources/mgnl-bootstrap/groovyshell/config.modules.groovyshell.pages.groovyShellScript.xml trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/ trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/bootstrap.css trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_flat_0_aaaaaa_40x100.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_glass_55_fbf9ee_1x400.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_glass_65_ffffff_1x400.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_glass_75_dadada_1x400.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_glass_75_e6e6e6_1x400.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_glass_75_ffffff_1x400.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_highlight-soft_75_cccccc_1x100.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-bg_inset-soft_95_fef1ec_1x100.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-icons_222222_256x240.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-icons_2e83ff_256x240.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-icons_454545_256x240.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-icons_888888_256x240.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-icons_cd0a0a_256x240.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/images/ui-icons_f6cf3b_256x240.png trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-1.8.16.custom.css trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/ trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/enhanced.css trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/images/ trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/images/icon-generic.gif trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/images/icon-image.gif trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/images/icon-media.gif trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery-ui-fileinput/images/icon-zip.gif trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery.layout.css trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/jquery.ui.1.8.16.ie.css trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/console.css trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/editor.css trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/js/ace/ trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/js/ace/ace.js trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/js/ace/mode-groovy.js trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/js/ace/theme-eclipse.js trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/js/jquery-ui-fileinput/ trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/js/jquery-ui-fileinput/enhance.min.js trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/js/jquery-ui-fileinput/fileinput.jquery.js trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/js/jquery.cookie.js trunk/openutils-mgnlgroovy/src/main/resources/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.html.bk trunk/openutils-mgnlgroovy/src/main/resources/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellScript.html Removed Paths: ------------- trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.java trunk/openutils-mgnlgroovy/src/main/resources/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.html Deleted: trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.java =================================================================== --- trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.java 2012-01-17 12:05:14 UTC (rev 3734) +++ trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.java 2012-02-17 17:42:45 UTC (rev 3735) @@ -1,193 +0,0 @@ -/** - * - * Groovy Shell for Magnolia CMS (http://www.openmindlab.com/lab/products/groovy.html) - * Copyright(C) 2008-2011, Openmind S.r.l. 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.mgnlgroovy.pages; - -import groovy.lang.GroovyShell; -import groovy.lang.Script; -import info.magnolia.cms.beans.runtime.Document; -import info.magnolia.cms.util.AlertUtil; -import info.magnolia.module.admininterface.TemplatedMVCHandler; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.exception.ExceptionUtils; -import org.codehaus.groovy.control.CompilationFailedException; -import org.codehaus.groovy.runtime.InvokerHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -/** - * A basic Groovy shell to be embedded in Magnolia. - * @author fgrilli - * @version $Id: GroovyShellPage.java 5074 2008-10-21 13:16:36Z federico.grilli $ - */ -public class GroovyShellPage extends TemplatedMVCHandler -{ - - private static final String LINE_SEP = System.getProperty("line.separator"); - - private static final String GROOVY_VERSION = InvokerHelper.getVersion(); - - private static final long serialVersionUID = 222L; - - private static Logger log = LoggerFactory.getLogger(GroovyShellPage.class); - - private String groovyScript; - - private Document groovyScriptFile; - - public GroovyShellPage(String name, HttpServletRequest request, HttpServletResponse response) - { - super(name, request, response); - - } - - public String executeGroovyScript() - { - if (StringUtils.isBlank(groovyScript)) - { - String msg = "No script to execute"; - log.warn(msg); - AlertUtil.setMessage(msg); - return this.show(); - } - - log.debug("executing script {}", groovyScript); - - Object retVal; - - try - { - GroovyShell shell = new GroovyShell(); - Script script = shell.parse(getGroovyScript()); - retVal = script.run(); - AlertUtil.setMessage("Script executed successfully. Return value is " + retVal); - } - - catch (CompilationFailedException e) - { - log.error("An error occurred while parsing the script. Error message is {}", e.getMessage()); - AlertUtil.setMessage("An error occurred while parsing the script. Error message is " + e.getMessage()); - } - catch (Throwable e) - { - log.error("An error occurred while executing the script. Error message is " + e.getMessage(), e); - AlertUtil.setMessage("An error occurred while executing the script. Error message is " - + e.getMessage() - + "\n" - + ExceptionUtils.getFullStackTrace(e)); - } - - return this.show(); - } - - public String getGroovyScript() - { - return groovyScript; - } - - public void setGroovyScript(String groovyScript) - { - this.groovyScript = groovyScript; - } - - public String getGroovyVersion() - { - return GROOVY_VERSION; - } - - public Document getGroovyScriptFile() - { - return groovyScriptFile; - } - - public void setGroovyScriptFile(Document groovyScriptFile) - { - this.groovyScriptFile = groovyScriptFile; - } - - public String loadGroovyScript() - { - if (groovyScriptFile == null) - { - String msg = "Please, select a file"; - log.warn(msg); - AlertUtil.setMessage(msg); - return this.show(); - } - if (!groovyScriptFile.getExtension().equalsIgnoreCase("groovy")) - { - String msg = groovyScriptFile.getFileNameWithExtension() + " doesn't seem to be a valid groovy file"; - log.warn(msg); - AlertUtil.setMessage(msg); - return this.show(); - } - groovyScript = readFile(groovyScriptFile.getFile()); - - String msg = groovyScriptFile.getFileNameWithExtension() + " loaded"; - log.info(msg); - AlertUtil.setMessage(msg); - return this.show(); - - } - - private String readFile(File file) - { - StringBuilder contents = new StringBuilder(); - - try - { - // use buffering, reading one line at a time - // FileReader always assumes default encoding is OK! - BufferedReader input = new BufferedReader(new FileReader(file)); - try - { - String line = null; // not declared within while loop - /* - * readLine is a bit quirky : it returns the content of a line MINUS the newline. it returns null only - * for the END of the stream. it returns an empty String if two newlines appear in a row. - */ - while ((line = input.readLine()) != null) - { - contents.append(line); - contents.append(LINE_SEP); - } - } - finally - { - IOUtils.closeQuietly(input); - } - } - catch (IOException ex) - { - log.error(ex.getMessage()); - } - return contents.toString(); - } -} \ No newline at end of file Copied: trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.java.bk (from rev 3734, trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.java) =================================================================== --- trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.java.bk (rev 0) +++ trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellPage.java.bk 2012-02-17 17:42:45 UTC (rev 3735) @@ -0,0 +1,193 @@ +/** + * + * Groovy Shell for Magnolia CMS (http://www.openmindlab.com/lab/products/groovy.html) + * Copyright(C) 2008-2011, Openmind S.r.l. 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.mgnlgroovy.pages; + +import groovy.lang.GroovyShell; +import groovy.lang.Script; +import info.magnolia.cms.beans.runtime.Document; +import info.magnolia.cms.util.AlertUtil; +import info.magnolia.module.admininterface.TemplatedMVCHandler; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.exception.ExceptionUtils; +import org.codehaus.groovy.control.CompilationFailedException; +import org.codehaus.groovy.runtime.InvokerHelper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * A basic Groovy shell to be embedded in Magnolia. + * @author fgrilli + * @version $Id: GroovyShellPage.java 5074 2008-10-21 13:16:36Z federico.grilli $ + */ +public class GroovyShellPage extends TemplatedMVCHandler +{ + + private static final String LINE_SEP = System.getProperty("line.separator"); + + private static final String GROOVY_VERSION = InvokerHelper.getVersion(); + + private static final long serialVersionUID = 222L; + + private static Logger log = LoggerFactory.getLogger(GroovyShellPage.class); + + private String groovyScript; + + private Document groovyScriptFile; + + public GroovyShellPage(String name, HttpServletRequest request, HttpServletResponse response) + { + super(name, request, response); + + } + + public String executeGroovyScript() + { + if (StringUtils.isBlank(groovyScript)) + { + String msg = "No script to execute"; + log.warn(msg); + AlertUtil.setMessage(msg); + return this.show(); + } + + log.debug("executing script {}", groovyScript); + + Object retVal; + + try + { + GroovyShell shell = new GroovyShell(); + Script script = shell.parse(getGroovyScript()); + retVal = script.run(); + AlertUtil.setMessage("Script executed successfully. Return value is " + retVal); + } + + catch (CompilationFailedException e) + { + log.error("An error occurred while parsing the script. Error message is {}", e.getMessage()); + AlertUtil.setMessage("An error occurred while parsing the script. Error message is " + e.getMessage()); + } + catch (Throwable e) + { + log.error("An error occurred while executing the script. Error message is " + e.getMessage(), e); + AlertUtil.setMessage("An error occurred while executing the script. Error message is " + + e.getMessage() + + "\n" + + ExceptionUtils.getFullStackTrace(e)); + } + + return this.show(); + } + + public String getGroovyScript() + { + return groovyScript; + } + + public void setGroovyScript(String groovyScript) + { + this.groovyScript = groovyScript; + } + + public String getGroovyVersion() + { + return GROOVY_VERSION; + } + + public Document getGroovyScriptFile() + { + return groovyScriptFile; + } + + public void setGroovyScriptFile(Document groovyScriptFile) + { + this.groovyScriptFile = groovyScriptFile; + } + + public String loadGroovyScript() + { + if (groovyScriptFile == null) + { + String msg = "Please, select a file"; + log.warn(msg); + AlertUtil.setMessage(msg); + return this.show(); + } + if (!groovyScriptFile.getExtension().equalsIgnoreCase("groovy")) + { + String msg = groovyScriptFile.getFileNameWithExtension() + " doesn't seem to be a valid groovy file"; + log.warn(msg); + AlertUtil.setMessage(msg); + return this.show(); + } + groovyScript = readFile(groovyScriptFile.getFile()); + + String msg = groovyScriptFile.getFileNameWithExtension() + " loaded"; + log.info(msg); + AlertUtil.setMessage(msg); + return this.show(); + + } + + private String readFile(File file) + { + StringBuilder contents = new StringBuilder(); + + try + { + // use buffering, reading one line at a time + // FileReader always assumes default encoding is OK! + BufferedReader input = new BufferedReader(new FileReader(file)); + try + { + String line = null; // not declared within while loop + /* + * readLine is a bit quirky : it returns the content of a line MINUS the newline. it returns null only + * for the END of the stream. it returns an empty String if two newlines appear in a row. + */ + while ((line = input.readLine()) != null) + { + contents.append(line); + contents.append(LINE_SEP); + } + } + finally + { + IOUtils.closeQuietly(input); + } + } + catch (IOException ex) + { + log.error(ex.getMessage()); + } + return contents.toString(); + } +} \ No newline at end of file Added: trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellScript.java =================================================================== --- trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellScript.java (rev 0) +++ trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellScript.java 2012-02-17 17:42:45 UTC (rev 3735) @@ -0,0 +1,278 @@ +/** + * + * Groovy Shell for Magnolia CMS (http://www.openmindlab.com/lab/products/groovy.html) + * Copyright(C) 2008-2010, Openmind S.r.l. 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.mgnlgroovy.pages; + +import groovy.lang.GroovyShell; +import groovy.lang.GroovySystem; +import groovy.lang.Script; +import info.magnolia.cms.beans.runtime.Document; +import info.magnolia.cms.util.AlertUtil; +import info.magnolia.context.MgnlContext; +import info.magnolia.module.admininterface.TemplatedMVCHandler; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.exception.ExceptionUtils; +import org.codehaus.groovy.control.CompilationFailedException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * A basic Groovy shell to be embedded in Magnolia. + * @author fgrilli + * @version $Id$ + */ +public class GroovyShellScript extends TemplatedMVCHandler +{ + + private static final String LINE_SEP = System.getProperty("line.separator"); + + private static final String GROOVY_VERSION = GroovySystem.getVersion(); + + private static Logger log = LoggerFactory.getLogger(GroovyShellScript.class); + + private String groovyScript; + + private Document groovyScriptFile; + + private String title; + + public GroovyShellScript(String name, HttpServletRequest request, HttpServletResponse response) + { + super(name, request, response); + + } + + public String save() + { + if (StringUtils.isBlank(title)) + { + title = "script"; + } + + response.setHeader( + "Content-Disposition", + "attachment;filename=\"" + + title + + (StringUtils.endsWith(title, ".groovy") ? StringUtils.EMPTY : ".groovy") + + "\""); + response.setContentType("application/octet-stream;charset=UTF-8"); + response.setCharacterEncoding("UTF-8"); + + try + { + response.getWriter().print(groovyScript); + response.flushBuffer(); + } + catch (IOException e) + { + log.error("Error writing file to response", e); + } + + return null; + } + + public String run() + { + response.setContentType("text/html"); + response.setStatus(200); + // response.setBufferSize(1); + response.setCharacterEncoding("UTF-8"); + + if (StringUtils.isBlank(groovyScript)) + { + String msg = "No script to execute"; + log.warn(msg); + AlertUtil.setMessage(msg); + return this.show(); + } + + log.debug("executing script {}", groovyScript); + + Object retVal; + // final OutputStream os = osTmp; + + PrintWriter w = null; + try + { + w = response.getWriter(); + } + catch (IOException e1) + { + } + w + .print("<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><title>Groovy shell execution console</title><link href=\""); + w.print(request.getContextPath()); + w + .println("/.resources/groovyshell/css/console.css\" type=\"text/css\" rel=\"stylesheet\" /></head><body><pre>"); + w.println("Running script..."); + w.println("--------------------------------------\n"); + w.flush(); + + try + { + GroovyShell shell = new GroovyShell(); + shell.setProperty("ctx", MgnlContext.getInstance()); + + PrintWriter pout = new PrintWriter(w) + { + + /** + * {@inheritDoc} + */ + @Override + public void print(String s) + { + super.print(s); + super.flush(); + } + + }; + shell.setProperty("out", pout); + shell.setProperty("err", pout); + Script script = shell.parse(getGroovyScript()); + retVal = script.run(); + if (retVal != null) + { + w.println("\n--------------------------------------"); + w.println("Return value is:"); + w.println(retVal); + } + // AlertUtil.setMessage("Script executed successfully. Return value is " + retVal); + } + + catch (CompilationFailedException e) + { + log.error("An error occurred while parsing the script. Error message is {}", e.getMessage()); + AlertUtil.setMessage("An error occurred while parsing the script. Error message is " + e.getMessage()); + w.println("<span class=\"err\">"); + e.printStackTrace(w); + w.println("</span>"); + } + catch (Throwable e) + { + log.error("An error occurred while executing the script. Error message is " + e.getMessage(), e); + AlertUtil.setMessage("An error occurred while executing the script. Error message is " + + e.getMessage() + + "\n" + + ExceptionUtils.getFullStackTrace(e)); + w.println("<span class=\"err\">"); + e.printStackTrace(w); + w.println("</span>"); + } + w.print("</pre></body></html>"); + + return null; // this.show(); + } + + public String load() + { + if (groovyScriptFile == null) + { + String msg = "Please, select a file"; + log.warn(msg); + AlertUtil.setMessage(msg); + return this.show(); + } + if (!groovyScriptFile.getExtension().equalsIgnoreCase("groovy")) + { + String msg = groovyScriptFile.getFileNameWithExtension() + " doesn't seem to be a valid groovy file"; + log.warn(msg); + AlertUtil.setMessage(msg); + return this.show(); + } + groovyScript = readFile(groovyScriptFile.getFile()); + + String msg = groovyScriptFile.getFileNameWithExtension() + " loaded"; + log.info(msg); + AlertUtil.setMessage(msg); + return this.show(); + + } + + private String readFile(File file) + { + StringBuilder contents = new StringBuilder(); + + try + { + // use buffering, reading one line at a time + // FileReader always assumes default encoding is OK! + BufferedReader input = new BufferedReader(new FileReader(file)); + try + { + String line = null; // not declared within while loop + /* + * readLine is a bit quirky : it returns the content of a line MINUS the newline. it returns null only + * for the END of the stream. it returns an empty String if two newlines appear in a row. + */ + while ((line = input.readLine()) != null) + { + contents.append(line); + contents.append(LINE_SEP); + } + } + finally + { + IOUtils.closeQuietly(input); + } + } + catch (IOException ex) + { + log.error(ex.getMessage()); + } + return contents.toString(); + } + + public String getGroovyScript() + { + return groovyScript; + } + + public void setGroovyScript(String groovyScript) + { + this.groovyScript = groovyScript; + } + + public String getGroovyVersion() + { + return GROOVY_VERSION; + } + + public Document getGroovyScriptFile() + { + return groovyScriptFile; + } + + public void setGroovyScriptFile(Document groovyScriptFile) + { + this.groovyScriptFile = groovyScriptFile; + } +} \ No newline at end of file Property changes on: trunk/openutils-mgnlgroovy/src/main/java/net/sourceforge/openutils/mgnlgroovy/pages/GroovyShellScript.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/openutils-mgnlgroovy/src/main/resources/mgnl-bootstrap/groovyshell/config.modules.adminInterface.config.menu.tools.groovyShell.xml =================================================================== --- trunk/openutils-mgnlgroovy/src/main/resources/mgnl-bootstrap/groovyshell/config.modules.adminInterface.config.menu.tools.groovyShell.xml 2012-01-17 12:05:14 UTC (rev 3734) +++ trunk/openutils-mgnlgroovy/src/main/resources/mgnl-bootstrap/groovyshell/config.modules.adminInterface.config.menu.tools.groovyShell.xml 2012-02-17 17:42:45 UTC (rev 3735) @@ -9,16 +9,22 @@ <sv:property sv:name="icon" sv:type="String"> <sv:value>/.resources/groovyshell/icons/groovy-small.png</sv:value> </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> <sv:property sv:name="label" sv:type="String"> <sv:value>Groovy Shell</sv:value> </sv:property> <sv:property sv:name="onclick" sv:type="String"> - <sv:value>MgnlAdminCentral.showContent('/.magnolia/pages/groovyShell.html');</sv:value> + <sv:value>window.open('/.magnolia/pages/groovyShell.html');</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="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> <sv:property sv:name="mgnl:Data" sv:type="String"> <sv:value>MetaData</sv:value> </sv:property> @@ -29,7 +35,7 @@ <sv:value>superuser</sv:value> </sv:property> <sv:property sv:name="mgnl:authorid" sv:type="String"> - <sv:value>admin</sv:value> + <sv:value>superuser</sv:value> </sv:property> <sv:property sv:name="mgnl:creationdate" sv:type="Date"> <sv:value>2005-05-16T20:46:43.549+02:00</sv:value> @@ -38,7 +44,7 @@ <sv:value>2006-05-04T12:02:10.817+02:00</sv:value> </sv:property> <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-08-22T16:58:05.902+02:00</sv:value> + <sv:value>2012-02-17T17:53:37.468+01:00</sv:value> </sv:property> </sv:node> </sv:node> Added: trunk/openutils-mgnlgroovy/src/main/resources/mgnl-bootstrap/groovyshell/config.modules.groovyshell.pages.groovyShellScript.xml =================================================================== --- trunk/openutils-mgnlgroovy/src/main/resources/mgnl-bootstrap/groovyshell/config.modules.groovyshell.pages.groovyShellScript.xml (rev 0) +++ trunk/openutils-mgnlgroovy/src/main/resources/mgnl-bootstrap/groovyshell/config.modules.groovyshell.pages.groovyShellScript.xml 2012-02-17 17:42:45 UTC (rev 3735) @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="groovyShellScript" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>2d1ea4dc-8d4c-4540-94c0-69d75b6f8252</sv:value> + </sv:property> + <sv:property sv:name="class" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlgroovy.pages.GroovyShellScript</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</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="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + <sv:property sv:name="mgnl:activatorid" sv:type="String"> + <sv:value>superuser</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>2006-06-10T17:40:37.578+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastaction" sv:type="Date"> + <sv:value>2006-07-11T21:37:16.259+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2012-02-16T23:59:16.648+01:00</sv:value> + </sv:property> + </sv:node> +</sv:node> Property changes on: trunk/openutils-mgnlgroovy/src/main/resources/mgnl-bootstrap/groovyshell/config.modules.groovyshell.pages.groovyShellScript.xml ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/bootstrap.css =================================================================== --- trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/bootstrap.css (rev 0) +++ trunk/openutils-mgnlgroovy/src/main/resources/mgnl-resources/groovyshell/css/bootstrap/bootstrap.css 2012-02-17 17:42:45 UTC (rev 3735) @@ -0,0 +1,2476 @@ +/*! + * Bootstrap v1.4.0 + * + * Copyright 2011 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + * Date: Sun Dec 25 20:18:31 PST 2011 + */ +/* Reset.less + * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). + * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */ +html, body { + margin: 0; + padding: 0; +} +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +cite, +code, +del, +dfn, +em, +img, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +dd, +dl, +dt, +li, +ol, +ul, +fieldset, +form, +label, +legend, +button, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td { + margin: 0; + padding: 0; + border: 0; + font-weight: normal; + font-style: normal; + font-size: 100%; + line-height: 1; + font-family: inherit; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +ol, ul { + list-style: none; +} +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} +html { + overflow-y: scroll; + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +a:focus { + outline: thin dotted; +} +a:hover, a:active { + outline: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} +audio, canvas, video { + display: inline-block; + *display: inline; + *zoom: 1; +} +audio:not([controls]) { + display: none; +} +sub, sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + border: 0; + -ms-interpolation-mode: bicubic; +} + +/* +button, +input, +select, +textarea { + font-size: 100%; + margin: 0; + vertical-align: baseline; + *vertical-align: middle; +} +button, input { + line-height: normal; + *overflow: visible; +} +button::-moz-focus-inner, input::-moz-focus-inner { + border: 0; + padding: 0; +} +button, +input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} +input[type="search"] { + -webkit-appearance: textfield; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +}*/ +textarea { + overflow: auto; + vertical-align: top; +} +/* Variables.less + * Variables to customize the look and feel of Bootstrap + * ----------------------------------------------------- */ +/* Mixins.less + * Snippets of reusable CSS to develop faster and keep code readable + * ----------------------------------------------------------------- */ +/* + * Scaffolding + * Basic and global styles for generating a grid system, structural layout, and page templates + * ------------------------------------------------------------------------------------------- */ +body { + background-color: #ffffff; + margin: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 18px; + color: #404040; +} +.container { + width: 940px; + margin-left: auto; + margin-right: auto; + zoom: 1; +} +.container:before, .container:after { + display: table; + content: ""; + zoom: 1; +} +.container:after { + clear: both; +} +.container-fluid { + position: relative; + min-width: 940px; + padding-left: 20px; + padding-right: 20px; + zoom: 1; +} +.container-fluid:before, .container-fluid:after { + display: table; + content: ""; + zoom: 1; +} +.container-fluid:after { + clear: both; +} +.container-fluid > .sidebar { + position: absolute; + top: 0; + left: 20px; + width: 220px; +} +.container-fluid > .content { + margin-left: 240px; +} +a { + color: #0069d6; + text-decoration: none; + line-height: inherit; + font-weight: inherit; +} +a:hover { + color: #00438a; + text-decoration: underline; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.hide { + display: none; +} +.show { + display: block; +} +.row { + zoom: 1; + margin-left: -20px; +} +.row:before, .row:after { + display: table; + content: ""; + zoom: 1; +} +.row:after { + clear: both; +} +.row > [class*="span"] { + display: inline; + float: left; + margin-left: 20px; +} +.span1 { + width: 40px; +} +.span2 { + width: 100px; +} +.span3 { + width: 160px; +} +.span4 { + width: 220px; +} +.span5 { + width: 280px; +} +.span6 { + width: 340px; +} +.span7 { + width: 400px; +} +.span8 { + width: 460px; +} +.span9 { + width: 520px; +} +.span10 { + width: 580px; +} +.span11 { + width: 640px; +} +.span12 { + width: 700px; +} +.span13 { + width: 760px; +} +.span14 { + width: 820px; +} +.span15 { + width: 880px; +} +.span16 { + width: 940px; +} +.span17 { + width: 1000px; +} +.span18 { + width: 1060px; +} +.span19 { + width: 1120px; +} +.span20 { + width: 1180px; +} +.span21 { + width: 1240px; +} +.span22 { + width: 1300px; +} +.span23 { + width: 1360px; +} +.span24 { + width: 1420px; +} +.row > .offset1 { + margin-left: 80px; +} +.row > .offset2 { + margin-left: 140px; +} +.row > .offset3 { + margin-left: 200px; +} +.row > .offset4 { + margin-left: 260px; +} +.row > .offset5 { + margin-left: 320px; +} +.row > .offset6 { + margin-left: 380px; +} +.row > .offset7 { + margin-left: 440px; +} +.row > .offset8 { + margin-left: 500px; +} +.row > .offset9 { + margin-left: 560px; +} +.row > .offset10 { + margin-left: 620px; +} +.row > .offset11 { + margin-left: 680px; +} +.row > .offset12 { + margin-left: 740px; +} +.span-one-third { + width: 300px; +} +.span-two-thirds { + width: 620px; +} +.row > .offset-one-third { + margin-left: 340px; +} +.row > .offset-two-thirds { + margin-left: 660px; +} +/* Typography.less + * Headings, body text, lists, code, and more for a versatile and durable typography system + * ---------------------------------------------------------------------------------------- */ + + +p { + font-size: 13px; + font-weight: normal; + line-height: 18px; + margin-bottom: 9px; +} +p small { + font-size: 11px; + color: #bfbfbf; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: bold; + color: #404040; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + color: #bfbfbf; +} +h1 { + margin-bottom: 18px; + font-size: 30px; + line-height: 36px; +} +h1 small { + font-size: 18px; +} +h2 { + font-size: 24px; + line-height: 36px; +} +h2 small { + font-size: 14px; +} +h3, +h4, +h5, +h6 { + line-height: 36px; +} +h3 { + font-size: 18px; +} +h3 small { + font-size: 14px; +} +h4 { + font-size: 16px; +} +h4 small { + font-size: 12px; +} +h5 { + font-size: 14px; +} +h6 { + font-size: 13px; + color: #bfbfbf; + text-transform: uppercase; +} +ul, ol { + margin: 0 0 18px 25px; +} +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} +ul { + list-style: disc; +} +ol { + list-style: decimal; +} +li { + line-height: 18px; + color: #808080; +} +ul.unstyled { + list-style: none; + margin-left: 0; +} +dl { + margin-bottom: 18px; +} +dl dt, dl dd { + line-height: 18px; +} +dl dt { + font-weight: bold; +} +dl dd { + margin-left: 9px; +} +hr { + margin: 20px 0 19px; + border: 0; + border-bottom: 1px solid #eee; +} +strong { + font-style: inherit; + font-weight: bold; +} +em { + font-style: italic; + font-weight: inherit; + line-height: inherit; +} +.muted { + color: #bfbfbf; +} +blockquote { + margin-bottom: 18px; + border-left: 5px solid #eee; + padding-left: 15px; +} +blockquote p { + font-size: 14px; + font-weight: 300; + line-height: 18px; + margin-bottom: 0; +} +blockquote small { + display: block; + font-size: 12px; + font-weight: 300; + line-height: 18px; + color: #bfbfbf; +} +blockquote small:before { + content: '\2014 \00A0'; +} +address { + display: block; + line-height: 18px; + margin-bottom: 18px; +} +code, pre { + padding: 0 3px 2px; + font-family: Monaco, Andale Mono, Courier New, monospace; + font-size: 12px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +code { + background-color: #fee9cc; + color: rgba(0, 0, 0, 0.75); + padding: 1px 3px; +} +pre { + background-color: #f5f5f5; + display: block; + padding: 8.5px; + margin: 0 0 18px; + line-height: 18px; + font-size: 12px; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} +/* Forms.less + * Base styles for various input types, form layouts, and states + * ------------------------------------------------------------- */ +form { + margin-bottom: 18px; +} +fieldset { + margin-bottom: 18px; + padding-top: 18px; +} +fieldset legend { + display: block; + padding-left: 150px; + font-size: 19.5px; + line-height: 1; + color: #404040; + *padding: 0 0 5px 145px; + /* IE6-7 */ + + *line-height: 1.5; + /* IE6-7 */ + +} +form .clearfix { + margin-bottom: 18px; + zoom: 1; +} +form .clearfix:before, form .clearfix:after { + display: table; + content: ""; + zoom: 1; +} +form .clearfix:after { + clear: both; +} + +/* +label, +input, +select, +textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: normal; +} +label { + padding-top: 6px; + font-size: 13px; + line-height: 18px; + float: left; + width: 130px; + text-align: right; + color: #404040; +} +form .input { + margin-left: 150px; +} +input[type=checkbox], input[type=radio] { + cursor: pointer; +} +input, +textarea, +select, +.uneditable-input { + display: inline-block; + width: 210px; + height: 18px; + padding: 4px; + font-size: 13px; + line-height: 18px; + color: #808080; + border: 1px solid #ccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +select { + padding: initial; +} +input[type=checkbox], input[type=radio] { + width: auto; + height: auto; + padding: 0; + margin: 3px 0; + *margin-top: 0; + + line-height: normal; + border: none; +} +input[type=file] { + background-color: #ffffff; + padding: initial; + border: initial; + line-height: initial; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +input[type=button], input[type=reset], input[type=submit] { + width: auto; + height: auto; +} +select, input[type=file] { + height: 27px; + *height: auto; + line-height: 27px; + *margin-top: 4px; + +} +*/ +select[multiple] { + height: inherit; + background-color: #ffffff; +} +textarea { + height: auto; +} +.uneditable-input { + background-color: #ffffff; + display: block; + border-color: #eee; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + cursor: not-allowed; +} +:-moz-placeholder { + color: #bfbfbf; +} +::-webkit-input-placeholder { + color: #bfbfbf; +} +input, textarea { + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -ms-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); +} +input:focus, textarea:focus { + outline: 0; + border-color: rgba(82, 168, 236, 0.8); + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); +} +input[type=file]:focus, input[type=checkbox]:focus, select:focus { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + outline: 1px dotted #666; +} +form .clearfix.error > label, form .clearfix.error .help-block, form .clearfix.error .help-inline { + color: #b94a48; +} +form .clearfix.error input, form .clearfix.error textarea { + color: #b94a48; + border-color: #ee5f5b; +} +form .clearfix.error input:focus, form .clearfix.error textarea:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} +form .clearfix.error .input-prepend .add-on, form .clearfix.error .input-append .add-on { + color: #b94a48; + background-color: #fce6e6; + border-color: #b94a48; +} +form .clearfix.warning > label, form .clearfix.warning .help-block, form .clearfix.warning .help-inline { + color: #c09853; +} +form .clearfix.warning input, form .clearfix.warning textarea { + color: #c09853; + border-color: #ccae64; +} +form .clearfix.warning input:focus, form .clearfix.warning textarea:focus { + border-color: #be9a3f; + -webkit-box-shadow: 0 0 6px #e5d6b1; + -moz-box-shadow: 0 0 6px #e5d6b1; + box-shadow: 0 0 6px #e5d6b1; +} +form .clearfix.warning .input-prepend .add-on, form .clearfix.warning .input-append .add-on { + color: #c09853; + background-color: #d2b877; + border-color: #c09853; +} +form .clearfix.success > label, form .clearfix.success .help-block, form .clearfix.success .help-inline { + color: #468847; +} +form .clearfix.success input, form .clearfix.success textarea { + color: #468847; + border-color: #57a957; +} +form .clearfix.success input:focus, form .clearfix.success textarea:focus { + border-color: #458845; + -webkit-box-shadow: 0 0 6px #9acc9a; + -moz-box-shadow: 0 0 6px #9acc9a; + box-shadow: 0 0 6px #9acc9a; +} +form .clearfix.success .input-prepend .add-on, form .clearfix.success .input-append .add-on { + color: #468847; + background-color: #bcddbc; + border-color: #468847; +} +.input-mini, +input.mini, +textarea.mini, +select.mini { + width: 60px; +} +.input-small, +input.small, +textarea.small, +select.small { + width: 90px; +} +.input-medium, +input.medium, +textarea.medium, +select.medium { + width: 150px; +} +.input-large, +input.large, +textarea.large, +select.large { + width: 210px; +} +.input-xlarge, +input.xlarge, +textarea.xlarge, +select.xlarge { + width: 270px; +} +.input-xxlarge, +input.xxlarge, +textarea.xxlarge, +select.xxlarge { + width: 530px; +} +textarea.xxlarge { + overflow-y: auto; +} +input.span1, textarea.span1 { + display: inline-block; + float: none; + width: 30px; + margin-left: 0; +} +input.span2, textarea.span2 { + display: inline-block; + float: none; + width: 90px; + margin-left: 0; +} +input.span3, textarea.span3 { + display: inline-block; + float: none; + width: 150px; + margin-left: 0; +} +input.span4, textarea.span4 { + display: inline-block; + float: none; + width: 210px; + margin-left: 0; +} +input.span5, textarea.span5 { + display: inline-block; + float: none; + width: 270px; + margin-left: 0; +} +input.span6, textarea.span6 { + display: inline-block; + float: none; + width: 330px; + margin-left: 0; +} +input.span7, textarea.span7 { + display: inline-block; + float: none; + width: 390px; + margin-left: 0; +} +input.span8, textarea.span8 { + display: inline-block; + float: none; + width: 450px; + margin-left: 0; +} +input.span9, textarea.span9 { + display: inline-block; + float: none; + width: 510px; + margin-left: 0; +} +input.span10, textarea.span10 { + display: inline-block; + float: none; + width: 570px; + margin-left: 0; +} +input.span11, textarea.span11 { + display: inline-block; + float: none; + width: 630px; + margin-left: 0; +} +input.span12, textarea.span12 { + display: inline-block; + float: none; + width: 690px; + margin-left: 0; +} +input.span13, textarea.span13 { + display: inline-block; + float: none; + width: 750px; + margin-left: 0; +} +input.span14, textarea.span14 { + display: inline-block; + float: none; + width: 810px; + margin-left: 0; +} +input.span15, textarea.span15 { + display: inline-block; + float: none; + width: 870px; + margin-left: 0; +} +input.span16, textarea.span16 { + display: inline-block; + float: none; + width: 930px; + margin-left: 0; +} +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + background-color: #f5f5f5; + border-color: #ddd; + cursor: not-allowed; +} +.actions { + background: #f5f5f5; + margin-top: 18px; + margin-bottom: 18px; + padding: 17px 20px 18px 150px; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; +} +.actions .secondary-action { + float: right; +} +.actions .secondary-action a { + line-height: 30px; +} +.actions .secondary-action a:hover { + text-decoration: underline; +} +.help-inline, .help-block { + font-size: 13px; + line-height: 18px; + color: #bfbfbf; +} +.help-inline { + padding-left: 5px; + *position: relative; + /* IE6-7 */ + + *top: -5px; + /* IE6-7 */ + +} +.help-block { + display: block; + max-width: 600px; +} +.inline-inputs { + color: #808080; +} +.inline-inputs span { + padding: 0 2px 0 1px; +} +.input-prepend input, .input-append input { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend .add-on, .input-append .add-on { + position: relative; + background: #f5f5f5; + border: 1px solid #ccc; + z-index: 2; + float: left; + display: block; + width: auto; + min-width: 16px; + height: 18px; + padding: 4px 4px 4px 5px; + margin-right: -1px; + font-weight: normal; + line-height: 18px; + color: #bfbfbf; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-prepend .active, .input-append .active { + background: #a9dba9; + border-color: #46a546; +} +.input-prepend .add-on { + *margin-top: 1px; + /* IE6-7 */ + +} +.input-append input { + float: left; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-append .add-on { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; + margin-right: 0; + margin-left: -1px; +} +.inputs-list { + margin: 0 0 5px; + width: 100%; +} +.inputs-list li { + display: block; + padding: 0; + width: 100%; +} +.inputs-list label { + display: block; + float: none; + width: auto; + padding: 0; + margin-left: 20px; + line-height: 18px; + text-align: left; + white-space: normal; +} +.inputs-list label strong { + color: #808080; +} +.inputs-list label small { + font-size: 11px; + font-weight: normal; +} +.inputs-list .inputs-list { + margin-left: 25px; + margin-bottom: 10px; + padding-top: 0; +} +.inputs-list:first-child { + padding-top: 6px; +} +.inputs-list li + li { + padding-top: 2px; +} +.inputs-list input[type=radio], .inputs-list input[type=checkbox] { + margin-bottom: 0; + margin-left: -20px; + float: left; +} +.form-stacked { + padding-left: 20px; +} +.form-stacked fieldset { + padding-top: 9px; +} +.form-stacked legend { + padding-left: 0; +} +.form-stacked label { + display: block; + float: none; + width: auto; + font-weight: bold; + text-align: left; + line-height: 20px; + padding-top: 0; +} +.form-stacked .clearfix { + margin-bottom: 9px; +} +.form-stacked .clearfix div.input { + margin-left: 0; +} +.form-stacked .inputs-list { + margin-bottom: 0; +} +.form-stacked .inputs-list li { + padding-top: 0; +} +.form-stacked .inputs-list li label { + font-weight: normal; + padding-top: 0; +} +.form-stacked div.clearfix.error { + padding-top: 10px; + padding-bottom: 10px; + padding-left: 10px; + margin-top: 0; + margin-left: -10px; +} +.form-stacked .actions { + margin-left: -20px; + padding-left: 20px; +} +/* + * Tables.less + * Tables for, you guessed it, tabular data + * ---------------------------------------- */ +table { + width: 100%; + margin-bottom: 18px; + padding: 0; + font-size: 13px; + border-collapse: collapse; +} +table th, table td { + padding: 10px 10px 9px; + line-height: 18px; + text-align: left; +} +table th { + padding-top: 9px; + font-weight: bold; + vertical-align: middle; +} +table td { + vertical-align: top; + border-top: 1px solid #ddd; +} +table tbody th { + border-top: 1px solid #ddd; + vertical-align: top; +} +.condensed-table th, .condensed-table td { + padding: 5px 5px 4px; +} +.bordered-table { + border: 1px solid #ddd; + border-collapse: separate; + *border-collapse: collapse; + /* IE7, collapse table to remove spacing */ + + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.bordered-table th + th, .bordered-table td + td, .bordered-table th + td { + border-left: 1px solid #ddd; +} +.bordered-table thead tr:first-child th:first-child, .bordered-table tbody tr:first-child td:first-child { + -webkit-border-radius: 4px 0 0 0; + -moz-border-radius: 4px 0 0 0; + border-radius: 4px 0 0 0; +} +.bordered-table thead tr:first-child th:last-child, .bordered-table tbody tr:first-child td:last-child { + -webkit-border-radius: 0 4px 0 0; + -moz-border-radius: 0 4px 0 0; + border-radius: 0 4px 0 0; +} +.bordered-table tbody tr:last-child td:first-child { + -webkit-border-radius: 0 0 0 4px; + -moz-border-radius: 0 0 0 4px; + border-radius: 0 0 0 4px; +} +.bordered-table tbody tr:last-child td:last-child { + -webkit-border-radius: 0 0 4px 0; + -moz-border-radius: 0 0 4px 0; + border-radius: 0 0 4px 0; +} +table .span1 { + width: 20px; +} +table .span2 { + width: 60px; +} +table .span3 { + width: 100px; +} +table .span4 { + width: 140px; +} +table .span5 { + width: 180px; +} +table .span6 { + width: 220px; +} +table .span7 { + width: 260px; +} +table .span8 { + width: 300px; +} +table .span9 { + width: 340px; +} +table .span10 { + width: 380px; +} +table .span11 { + width: 420px; +} +table .span12 { + width: 460px; +} +table .span13 { + width: 500px; +} +table .span14 { + width: 540px; +} +table .span15 { + width: 580px; +} +table .span16 { + width: 620px; +} +.zebra-striped tbody tr:nth-child(odd) td, .zebra-striped tbody tr:nth-child(odd) th { + background-color: #f9f9f9; +} +.zebra-striped tbody tr:hover td, .zebra-striped tbody tr:hover th { + background-color: #f5f5f5; +} +table .header { + cursor: pointer; +} +table .header:after { + content: ""; + float: right; + margin-top: 7px; + border-width: 0 4px 4px; + border-style: solid; + border-color: #000 transparent; + visibility: hidden; +} +table .headerSortUp, table .headerSortDown { + background-color: rgba(141, 192, 219, 0.25); + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); +} +table .header:hover:after { + visibility: visible; +} +table .headerSortDown:after, table .headerSortDown:hover:after { + visibility: visible; + filter: alpha(opacity=60); + -khtml-opacity: 0.6; + -moz-opacity: 0.6; + opacity: 0.6; +} +table .headerSortUp:after { + border-bottom: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000; + visibility: visible; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + filter: alpha(opacity=60); + -khtml-opacity: 0.6; + -moz-opacity: 0.6; + opacity: 0.6; +} +table .blue { + color: #049cdb; + border-bottom-color: #049cdb; +} +table .headerSortUp.blue, table .headerSortDown.blue { + background-color: #ade6fe; +} +table .green { + color: #46a546; + border-bottom-color: #46a546; +} +table .headerSortUp.green, table .headerSortDown.green { + background-color: #cdeacd; +} +table .red { + color: #9d261d; + border-bottom-color: #9d261d; +} +table .headerSortUp.red, table .headerSortDown.red { + background-color: #f4c8c5; +} +table .yellow { + color: #ffc40d; + border-bottom-color: #ffc40d; +} +table .headerSortUp.yellow, table .headerSortDown.yellow { + background-color: #fff6d9; +} +table .orange { + color: #f89406; + border-bottom-color: #f89406; +} +table .headerSortUp.orange, table .headerSortDown.orange { + background-color: #fee9cc; +} +table .purple { + color: #7a43b6; + border-bottom-color: #7a43b6; +} +table .headerSortUp.purple, table .headerSortDown.purple { + background-color: #e2d5f0; +} +/* Patterns.less + * Repeatable UI elements outside the base styles provided from the scaffolding + * ---------------------------------------------------------------------------- */ +.topbar { + height: 40px; + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 10000; + overflow: visible; +} +.topbar a { + color: #bfbfbf; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.topbar h3 a:hover, .topbar .brand:hover, .topbar ul .active > a { + background-color: #333; + background-color: rgba(255, 255, 255, 0.05); + color: #ffffff; + text-decoration: none; +} +.topbar h3 { + position: relative; +} +.topbar h3 a, .topbar .brand { + float: left; + display: block; + padding: 8px 20px 12px; + margin-left: -20px; + color: #ffffff; + font-size: 20px; + font-weight: 200; + line-height: 1; +} +.topbar p { + margin: 0; + line-height: 40px; +} +.topbar p a:hover { + background-color: transparent; + color: #ffffff; +} +.topbar form { + float: left; + margin: 5px 0 0 0; + position: relative; + filter: alpha(opacity=100); + -khtml-opacity: 1; + -moz-opacity: 1; + opacity: 1; +} +.topbar form.pull-right { + float: right; +} +.topbar input { + background-color: #444; + background-color: rgba(255, 255, 255, 0.3); + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: normal; + font-weight: 13px; + line-height: 1; + padding: 4px 9px; + color: #ffffff; + color: rgba(255, 255, 255, 0.75); + border: 1px solid #111; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0... [truncated message content] |
From: <hu...@op...> - 2012-01-17 12:45:00
|
See <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/85/changes> Changes: [diego_schivo] CONTROLS-42 adjustRowCount ------------------------------------------ <===[HUDSON REMOTING CAPACITY]===> channel started Executing Maven: -B -f <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/pom.xml> clean install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Controls module for Magnolia CMS [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target> [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 50 resources [INFO] Copying 1 resource [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 20 source files to <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target/classes> [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/src/test/resources> [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] No tests to run. [JENKINS] Recording test results [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT.jar> [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [source:jar {execution: attach-sources}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT-sources.jar> [INFO] [assembly:single {execution: bundle}] [INFO] Reading assembly descriptor: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/src/main/assembly/assembly-bundle.xml> [INFO] Building zip: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT-bundle.zip> [INFO] [license:check {execution: default}] [INFO] Checking licenses... [INFO] Missing header in: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/src/main/java/net/sourceforge/openutils/mgnlcontrols/configuration/EditCodeGridColumnType.java> [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/pom.xml> to /data/hudson-data/jobs/openutils-mgnlcontrols/modules/net.sourceforge.openutils$openutils-mgnlcontrols/builds/2012-01-17_13-25-27/archive/net.sourceforge.openutils/openutils-mgnlcontrols/4.1.3-SNAPSHOT/pom.xml [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT.jar> to /data/hudson-data/jobs/openutils-mgnlcontrols/modules/net.sourceforge.openutils$openutils-mgnlcontrols/builds/2012-01-17_13-25-27/archive/net.sourceforge.openutils/openutils-mgnlcontrols/4.1.3-SNAPSHOT/openutils-mgnlcontrols-4.1.3-SNAPSHOT.jar [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT-sources.jar> to /data/hudson-data/jobs/openutils-mgnlcontrols/modules/net.sourceforge.openutils$openutils-mgnlcontrols/builds/2012-01-17_13-25-27/archive/net.sourceforge.openutils/openutils-mgnlcontrols/4.1.3-SNAPSHOT/openutils-mgnlcontrols-4.1.3-SNAPSHOT-sources.jar [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Some files do not have the expected license header [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 27 seconds [INFO] Finished at: Tue Jan 17 13:25:59 CET 2012 [INFO] Final Memory: 48M/296M [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data |
From: <hu...@op...> - 2012-01-17 12:45:00
|
See <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/85/changes> Changes: [diego_schivo] CONTROLS-42 adjustRowCount ------------------------------------------ Started by an SCM change Updating https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-mgnlcontrols U src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogGrid.java At revision 3734 Found mavenVersion 2.2.1 from file jar:file:/usr/local/maven/lib/maven-2.2.1-uber.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties Parsing POMs [openutils-mgnlcontrols] $ /usr/local/jdk1.6.0_20/bin/java -cp /data/hudson-data/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.403.jar:/usr/local/maven/boot/classworlds-1.1.jar hudson.maven.agent.Main /usr/local/maven /data/webapps/hudson/WEB-INF/lib/remoting-1.403.jar /data/hudson-data/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.403.jar 49961 /data/hudson-data/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar <===[HUDSON REMOTING CAPACITY]===> channel started Executing Maven: -B -f <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/pom.xml> clean install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Controls module for Magnolia CMS [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target> [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 50 resources [INFO] Copying 1 resource [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 20 source files to <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target/classes> [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/src/test/resources> [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] No tests to run. [JENKINS] Recording test results [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT.jar> [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [source:jar {execution: attach-sources}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT-sources.jar> [INFO] [assembly:single {execution: bundle}] [INFO] Reading assembly descriptor: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/src/main/assembly/assembly-bundle.xml> [INFO] Building zip: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT-bundle.zip> [INFO] [license:check {execution: default}] [INFO] Checking licenses... [INFO] Missing header in: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/configuration/EditCodeGridColumnType.java> [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/pom.xml> to /data/hudson-data/jobs/openutils-mgnlcontrols/modules/net.sourceforge.openutils$openutils-mgnlcontrols/builds/2012-01-17_13-25-27/archive/net.sourceforge.openutils/openutils-mgnlcontrols/4.1.3-SNAPSHOT/pom.xml [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT.jar> to /data/hudson-data/jobs/openutils-mgnlcontrols/modules/net.sourceforge.openutils$openutils-mgnlcontrols/builds/2012-01-17_13-25-27/archive/net.sourceforge.openutils/openutils-mgnlcontrols/4.1.3-SNAPSHOT/openutils-mgnlcontrols-4.1.3-SNAPSHOT.jar [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT-sources.jar> to /data/hudson-data/jobs/openutils-mgnlcontrols/modules/net.sourceforge.openutils$openutils-mgnlcontrols/builds/2012-01-17_13-25-27/archive/net.sourceforge.openutils/openutils-mgnlcontrols/4.1.3-SNAPSHOT/openutils-mgnlcontrols-4.1.3-SNAPSHOT-sources.jar [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Some files do not have the expected license header [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 27 seconds [INFO] Finished at: Tue Jan 17 13:25:59 CET 2012 [INFO] Final Memory: 48M/296M [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data Sending e-mails to: ope...@li... channel stopped |
From: <die...@us...> - 2012-01-17 12:05:25
|
Revision: 3734 http://openutils.svn.sourceforge.net/openutils/?rev=3734&view=rev Author: diego_schivo Date: 2012-01-17 12:05:14 +0000 (Tue, 17 Jan 2012) Log Message: ----------- CONTROLS-42 adjustRowCount Modified Paths: -------------- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogGrid.java Modified: 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 2012-01-16 11:04:00 UTC (rev 3733) +++ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogGrid.java 2012-01-17 12:05:14 UTC (rev 3734) @@ -24,6 +24,7 @@ import info.magnolia.cms.util.NodeDataUtil; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Map; @@ -88,6 +89,11 @@ String value = getValue(); if (value != null) { + int rows = NumberUtils.toInt(String.valueOf(getConfigValue("rows")), -1); + if (rows > 0) + { + value = adjustRowCount(value, rows); + } List<String[]> columns = DialogGridSaveHandler.valueToColumns(value); int colIndex = 0; for (String[] column : columns) @@ -104,35 +110,28 @@ } colIndex++; } - int rows = NumberUtils.toInt(String.valueOf(parameters.get("rows")), -1); - if (rows > 0) - { - while (columns.size() < rows) - { - columns.add(new String[0]); - } - while (columns.size() > rows) - { - boolean empty = true; - for (String token : columns.get(columns.size() - 1)) - { - if (!StringUtils.isEmpty(token)) - { - empty = false; - break; - } - } - if (!empty) - { - // non-empty line: do not remove it - break; - } - columns.remove(columns.size() - 1); - } - } value = DialogGridSaveHandler.columnsToValue(columns); } parameters.put("gridValue", value); } + protected String adjustRowCount(String value, int count) + { + List<String> rows = new ArrayList<String>(Arrays.asList(StringUtils.splitPreserveAllTokens(value, '\n'))); + while (rows.size() < count) + { + rows.add(StringUtils.EMPTY); + } + while (rows.size() > count) + { + String row = StringUtils.removeEnd(rows.get(rows.size() - 1), "\r"); + if (!StringUtils.isEmpty(StringUtils.remove(row, '\t'))) + { + // non-empty line: do not remove it + break; + } + rows.remove(rows.size() - 1); + } + return StringUtils.join(rows, '\n'); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@op...> - 2012-01-16 12:13:24
|
See <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/84/changes> Changes: [diego_schivo] CONTROLS-42 Grid: extra empty lines are not removed on dialog save after row count has been decreased ------------------------------------------ <===[HUDSON REMOTING CAPACITY]===> channel started Executing Maven: -B -f <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/pom.xml> clean install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Controls module for Magnolia CMS [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target> [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 50 resources [INFO] Copying 1 resource [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 20 source files to <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target/classes> [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/src/test/resources> [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] No tests to run. [JENKINS] Recording test results [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT.jar> [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [source:jar {execution: attach-sources}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT-sources.jar> [INFO] [assembly:single {execution: bundle}] [INFO] Reading assembly descriptor: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/src/main/assembly/assembly-bundle.xml> [INFO] Building zip: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT-bundle.zip> [INFO] [license:check {execution: default}] [INFO] Checking licenses... [INFO] Missing header in: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/src/main/java/net/sourceforge/openutils/mgnlcontrols/configuration/EditCodeGridColumnType.java> [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/pom.xml> to /data/hudson-data/jobs/openutils-mgnlcontrols/modules/net.sourceforge.openutils$openutils-mgnlcontrols/builds/2012-01-16_12-25-41/archive/net.sourceforge.openutils/openutils-mgnlcontrols/4.1.3-SNAPSHOT/pom.xml [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT.jar> to /data/hudson-data/jobs/openutils-mgnlcontrols/modules/net.sourceforge.openutils$openutils-mgnlcontrols/builds/2012-01-16_12-25-41/archive/net.sourceforge.openutils/openutils-mgnlcontrols/4.1.3-SNAPSHOT/openutils-mgnlcontrols-4.1.3-SNAPSHOT.jar [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/net.sourceforge.openutils$openutils-mgnlcontrols/ws/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT-sources.jar> to /data/hudson-data/jobs/openutils-mgnlcontrols/modules/net.sourceforge.openutils$openutils-mgnlcontrols/builds/2012-01-16_12-25-41/archive/net.sourceforge.openutils/openutils-mgnlcontrols/4.1.3-SNAPSHOT/openutils-mgnlcontrols-4.1.3-SNAPSHOT-sources.jar [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Some files do not have the expected license header [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 32 seconds [INFO] Finished at: Mon Jan 16 12:26:25 CET 2012 [INFO] Final Memory: 49M/296M [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data |
From: <hu...@op...> - 2012-01-16 12:12:03
|
See <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/84/changes> Changes: [diego_schivo] CONTROLS-42 Grid: extra empty lines are not removed on dialog save after row count has been decreased ------------------------------------------ Started by an SCM change Updating https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-mgnlcontrols U src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogGrid.java At revision 3733 Found mavenVersion 2.2.1 from file jar:file:/usr/local/maven/lib/maven-2.2.1-uber.jar!/META-INF/maven/org.apache.maven/maven-core/pom.properties Parsing POMs [openutils-mgnlcontrols] $ /usr/local/jdk1.6.0_20/bin/java -cp /data/hudson-data/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.403.jar:/usr/local/maven/boot/classworlds-1.1.jar hudson.maven.agent.Main /usr/local/maven /data/webapps/hudson/WEB-INF/lib/remoting-1.403.jar /data/hudson-data/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.403.jar 49258 /data/hudson-data/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar <===[HUDSON REMOTING CAPACITY]===> channel started Executing Maven: -B -f <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/pom.xml> clean install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Controls module for Magnolia CMS [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target> [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 50 resources [INFO] Copying 1 resource [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 20 source files to <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target/classes> [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/src/test/resources> [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] No sources to compile [INFO] [surefire:test {execution: default-test}] [INFO] No tests to run. [JENKINS] Recording test results [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT.jar> [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [source:jar {execution: attach-sources}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT-sources.jar> [INFO] [assembly:single {execution: bundle}] [INFO] Reading assembly descriptor: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/src/main/assembly/assembly-bundle.xml> [INFO] Building zip: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT-bundle.zip> [INFO] [license:check {execution: default}] [INFO] Checking licenses... [INFO] Missing header in: <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/configuration/EditCodeGridColumnType.java> [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/pom.xml> to /data/hudson-data/jobs/openutils-mgnlcontrols/modules/net.sourceforge.openutils$openutils-mgnlcontrols/builds/2012-01-16_12-25-41/archive/net.sourceforge.openutils/openutils-mgnlcontrols/4.1.3-SNAPSHOT/pom.xml [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT.jar> to /data/hudson-data/jobs/openutils-mgnlcontrols/modules/net.sourceforge.openutils$openutils-mgnlcontrols/builds/2012-01-16_12-25-41/archive/net.sourceforge.openutils/openutils-mgnlcontrols/4.1.3-SNAPSHOT/openutils-mgnlcontrols-4.1.3-SNAPSHOT.jar [JENKINS] Archiving <https://hudson.openmindonline.it/job/openutils-mgnlcontrols/ws/openutils-mgnlcontrols/target/openutils-mgnlcontrols-4.1.3-SNAPSHOT-sources.jar> to /data/hudson-data/jobs/openutils-mgnlcontrols/modules/net.sourceforge.openutils$openutils-mgnlcontrols/builds/2012-01-16_12-25-41/archive/net.sourceforge.openutils/openutils-mgnlcontrols/4.1.3-SNAPSHOT/openutils-mgnlcontrols-4.1.3-SNAPSHOT-sources.jar [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Some files do not have the expected license header [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 32 seconds [INFO] Finished at: Mon Jan 16 12:26:25 CET 2012 [INFO] Final Memory: 49M/296M [INFO] ------------------------------------------------------------------------ Waiting for Jenkins to finish collecting data Sending e-mails to: ope...@li... channel stopped |
From: <die...@us...> - 2012-01-16 11:04:11
|
Revision: 3733 http://openutils.svn.sourceforge.net/openutils/?rev=3733&view=rev Author: diego_schivo Date: 2012-01-16 11:04:00 +0000 (Mon, 16 Jan 2012) Log Message: ----------- CONTROLS-42 Grid: extra empty lines are not removed on dialog save after row count has been decreased Modified Paths: -------------- trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogGrid.java Modified: 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 2011-12-28 07:41:17 UTC (rev 3732) +++ trunk/openutils-mgnlcontrols/src/main/java/net/sourceforge/openutils/mgnlcontrols/dialog/DialogGrid.java 2012-01-16 11:04:00 UTC (rev 3733) @@ -35,6 +35,7 @@ import net.sourceforge.openutils.mgnlcontrols.configuration.GridColumnTypeManager; import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.math.NumberUtils; /** @@ -103,6 +104,32 @@ } colIndex++; } + int rows = NumberUtils.toInt(String.valueOf(parameters.get("rows")), -1); + if (rows > 0) + { + while (columns.size() < rows) + { + columns.add(new String[0]); + } + while (columns.size() > rows) + { + boolean empty = true; + for (String token : columns.get(columns.size() - 1)) + { + if (!StringUtils.isEmpty(token)) + { + empty = false; + break; + } + } + if (!empty) + { + // non-empty line: do not remove it + break; + } + columns.remove(columns.size() - 1); + } + } value = DialogGridSaveHandler.columnsToValue(columns); } parameters.put("gridValue", value); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2011-12-28 07:41:25
|
Revision: 3732 http://openutils.svn.sourceforge.net/openutils/?rev=3732&view=rev Author: diego_schivo Date: 2011-12-28 07:41:17 +0000 (Wed, 28 Dec 2011) Log Message: ----------- MEDIA-277 skipRendering Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/crop/PzcImageProcessor.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/BaseImageResolutionProcessor.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/FitInAndFillWithBandsImageResolutionProcessor.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/FitInImageResolutionProcessor.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/ResizeCropCenteredImageResolutionProcessor.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/ResizeNoCropImageResolutionProcessor.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/RoundedCornersProcessor.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/crop/PzcImageProcessor.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/crop/PzcImageProcessor.java 2011-12-25 08:18:30 UTC (rev 3731) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/crop/PzcImageProcessor.java 2011-12-28 07:41:17 UTC (rev 3732) @@ -71,8 +71,18 @@ float oX = oWidth * zoom * factor; float oY = oX * oHeight / oWidth; - BufferedImage filled = ImageUtils.resizeImage(original, (int) oX, (int) oY); - return ImageUtils.cropImage(filled, (int) (panX * factor), (int) (panY * factor), x, y); + BufferedImage filled = ImageUtils.resizeImage( + original, + (int) oX, + (int) oY, + "true".equals(parameters.get("skipRendering"))); + return ImageUtils.cropImage( + filled, + (int) (panX * factor), + (int) (panY * factor), + x, + y, + "true".equals(parameters.get("skipRendering"))); } } Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/BaseImageResolutionProcessor.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/BaseImageResolutionProcessor.java 2011-12-25 08:18:30 UTC (rev 3731) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/BaseImageResolutionProcessor.java 2011-12-28 07:41:17 UTC (rev 3732) @@ -50,9 +50,14 @@ */ public BufferedImage fitIn(BufferedImage original, int x, int y) { - return resizeInOut(original, x, y, false, null); + return fitIn(original, x, y, false); } + public BufferedImage fitIn(BufferedImage original, int x, int y, boolean skipRendering) + { + return resizeInOut(original, x, y, false, null, skipRendering); + } + /** * Resize an image to fit into the rect x, y and fill empty spaces with given background color * @param original original image @@ -63,9 +68,14 @@ */ public BufferedImage fitIn(BufferedImage original, int x, int y, Color background) { - return resizeInOut(original, x, y, true, background); + return fitIn(original, x, y, background, false); } + public BufferedImage fitIn(BufferedImage original, int x, int y, Color background, boolean skipRendering) + { + return resizeInOut(original, x, y, true, background, skipRendering); + } + /** * Resize image to fit in x,y. If fit is true the resulting image is x,y and if there are two empty bands they are * filled with backgroung color. @@ -78,6 +88,11 @@ */ protected BufferedImage resizeInOut(BufferedImage original, int x, int y, boolean fit, Color background) { + return resizeInOut(original, x, y, fit, background, false); + } + + protected BufferedImage resizeInOut(BufferedImage original, int x, int y, boolean fit, Color background, boolean skipRendering) + { if (original == null) { throw new IllegalArgumentException("input image is null"); @@ -104,7 +119,7 @@ int newX = (int) Math.round(oX * ratio); int newY = (int) Math.round(oY * ratio); - return ImageUtils.resizeImage(original, newX, newY, fit ? x : newX, fit ? y : newY, background); + return ImageUtils.resizeImage(original, newX, newY, fit ? x : newX, fit ? y : newY, background, skipRendering); } /** @@ -117,6 +132,11 @@ */ public BufferedImage fill(BufferedImage original, int x, int y, boolean cropCentered) { + return fill(original, x, y, cropCentered, false); + } + + public BufferedImage fill(BufferedImage original, int x, int y, boolean cropCentered, boolean skipRendering) + { int oWidth = original.getWidth(); int oHeight = original.getHeight(); if (x == oWidth && y == oHeight) @@ -133,15 +153,15 @@ if (oDelta >= delta) { int newX = (int) (y * oX / oY); - BufferedImage filled = ImageUtils.resizeImage(original, newX, y); - return cropCentered ? ImageUtils.cropImage(filled, (newX - x) / 2, 0, x, y) : filled; + BufferedImage filled = ImageUtils.resizeImage(original, newX, y, skipRendering); + return cropCentered ? ImageUtils.cropImage(filled, (newX - x) / 2, 0, x, y, skipRendering) : filled; } else // if (oDelta < delta) { int newY = (int) (x * oY / oX); - BufferedImage filled = ImageUtils.resizeImage(original, x, newY); - return cropCentered ? ImageUtils.cropImage(filled, 0, (newY - y) / 2, x, y) : filled; + BufferedImage filled = ImageUtils.resizeImage(original, x, newY, skipRendering); + return cropCentered ? ImageUtils.cropImage(filled, 0, (newY - y) / 2, x, y, skipRendering) : filled; } } } Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/FitInAndFillWithBandsImageResolutionProcessor.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/FitInAndFillWithBandsImageResolutionProcessor.java 2011-12-25 08:18:30 UTC (rev 3731) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/FitInAndFillWithBandsImageResolutionProcessor.java 2011-12-28 07:41:17 UTC (rev 3732) @@ -62,6 +62,6 @@ log.error("Invalid color code: " + hexColor, e); } } - return fitIn(original, x, y, color); + return fitIn(original, x, y, color, "true".equals(parameters.get("skipRendering"))); } } Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/FitInImageResolutionProcessor.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/FitInImageResolutionProcessor.java 2011-12-25 08:18:30 UTC (rev 3731) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/FitInImageResolutionProcessor.java 2011-12-28 07:41:17 UTC (rev 3732) @@ -36,7 +36,7 @@ */ public BufferedImage getImageForResolution(BufferedImage original, int x, int y, Map<String, String> parameters) { - return fitIn(original, x, y); + return fitIn(original, x, y, "true".equals(parameters.get("skipRendering"))); } } Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/ResizeCropCenteredImageResolutionProcessor.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/ResizeCropCenteredImageResolutionProcessor.java 2011-12-25 08:18:30 UTC (rev 3731) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/ResizeCropCenteredImageResolutionProcessor.java 2011-12-28 07:41:17 UTC (rev 3732) @@ -37,7 +37,7 @@ */ public BufferedImage getImageForResolution(BufferedImage original, int x, int y, Map<String, String> parameters) { - return fill(original, x, y, true); + return fill(original, x, y, true, "true".equals(parameters.get("skipRendering"))); } } Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/ResizeNoCropImageResolutionProcessor.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/ResizeNoCropImageResolutionProcessor.java 2011-12-25 08:18:30 UTC (rev 3731) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/ResizeNoCropImageResolutionProcessor.java 2011-12-28 07:41:17 UTC (rev 3732) @@ -37,7 +37,7 @@ */ public BufferedImage getImageForResolution(BufferedImage original, int x, int y, Map<String, String> parameters) { - return fill(original, x, y, false); + return fill(original, x, y, false, "true".equals(parameters.get("skipRendering"))); } } Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/RoundedCornersProcessor.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/RoundedCornersProcessor.java 2011-12-25 08:18:30 UTC (rev 3731) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/processors/RoundedCornersProcessor.java 2011-12-28 07:41:17 UTC (rev 3732) @@ -80,7 +80,7 @@ log.error("Invalid color code: " + hexColor, e); } } - return ImageUtils.addRoundedCorners(image, backgroundColor, radius); + return ImageUtils.addRoundedCorners(image, backgroundColor, radius, "true".equals(parameters.get("skipRendering"))); } return image; } Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java 2011-12-25 08:18:30 UTC (rev 3731) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java 2011-12-28 07:41:17 UTC (rev 3732) @@ -172,9 +172,14 @@ */ public static BufferedImage resizeImage(BufferedImage original, int x, int y) { - return resizeImage(original, x, y, x, y, null); + return resizeImage(original, x, y, false); } + public static BufferedImage resizeImage(BufferedImage original, int x, int y, boolean skipRendering) + { + return resizeImage(original, x, y, x, y, null, skipRendering); + } + /** * Resize an image to x,y * @param original original image @@ -188,6 +193,12 @@ public static BufferedImage resizeImage(BufferedImage original, int x, int y, int canvasX, int canvasY, Color background) { + return resizeImage(original, x, y, canvasX, canvasY, background, false); + } + + public static BufferedImage resizeImage(BufferedImage original, int x, int y, int canvasX, int canvasY, + Color background, boolean skipRendering) + { if (x <= 0) { x = 1; @@ -222,54 +233,58 @@ + canvasY + "]"); } - Graphics2D graphics2D = resizedImage.createGraphics(); - graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); - if (canvasX > x || canvasY > y) + if (!skipRendering) { - graphics2D.clearRect(0, 0, canvasX, canvasY); + Graphics2D graphics2D = resizedImage.createGraphics(); - if (background == null && original.getColorModel().getTransparency() == Transparency.OPAQUE) + graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); + if (canvasX > x || canvasY > y) { - background = Color.WHITE; - } - // fill bands - if (background != null) - { - graphics2D.setColor(background); + graphics2D.clearRect(0, 0, canvasX, canvasY); - if (canvasX > x) + if (background == null && original.getColorModel().getTransparency() == Transparency.OPAQUE) { - graphics2D.fillRect(0, 0, (canvasX - x) / 2, canvasY); - graphics2D.fillRect(x + (canvasX - x) / 2, 0, canvasX, canvasY); + background = Color.WHITE; } - if (canvasY > y) + // fill bands + if (background != null) { - graphics2D.fillRect(0, 0, canvasX, (canvasY - y) / 2); - graphics2D.fillRect(0, y + (canvasY - y) / 2, canvasX, canvasY); + graphics2D.setColor(background); + + if (canvasX > x) + { + graphics2D.fillRect(0, 0, (canvasX - x) / 2, canvasY); + graphics2D.fillRect(x + (canvasX - x) / 2, 0, canvasX, canvasY); + } + if (canvasY > y) + { + graphics2D.fillRect(0, 0, canvasX, (canvasY - y) / 2); + graphics2D.fillRect(0, y + (canvasY - y) / 2, canvasX, canvasY); + } } } - } - graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); + graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); - AffineTransform at = new AffineTransform(); - double delta = ((double) x) / original.getWidth(); - if (x > original.getWidth()) - { - at.scale(delta, delta); - at.translate((canvasX - x) / (2 * delta), (canvasY - y) / (2 * delta)); + AffineTransform at = new AffineTransform(); + double delta = ((double) x) / original.getWidth(); + if (x > original.getWidth()) + { + at.scale(delta, delta); + at.translate((canvasX - x) / (2 * delta), (canvasY - y) / (2 * delta)); + } + else if (x < original.getWidth()) + { + original = getScaledInstance(original, x, y, RenderingHints.VALUE_INTERPOLATION_BILINEAR, true, false); + at.translate((canvasX - x) / 2.0, (canvasY - y) / 2.0); + } + + graphics2D.drawImage(original, at, null); + graphics2D.dispose(); } - else if (x < original.getWidth()) - { - original = getScaledInstance(original, x, y, RenderingHints.VALUE_INTERPOLATION_BILINEAR, true); - at.translate((canvasX - x) / 2.0, (canvasY - y) / 2.0); - } - graphics2D.drawImage(original, at, null); - graphics2D.dispose(); - return resizedImage; } @@ -290,6 +305,12 @@ public static BufferedImage getScaledInstance(BufferedImage img, int targetWidth, int targetHeight, Object hint, boolean higherQuality) { + return getScaledInstance(img, targetWidth, targetHeight, hint, higherQuality, false); + } + + public static BufferedImage getScaledInstance(BufferedImage img, int targetWidth, int targetHeight, Object hint, + boolean higherQuality, boolean skipRendering) + { int type = (img.getTransparency() == Transparency.OPAQUE) ? BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB; @@ -333,10 +354,13 @@ } BufferedImage tmp = new BufferedImage(w, h, type); - Graphics2D g2 = tmp.createGraphics(); - g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint); - g2.drawImage(ret, 0, 0, w, h, null); - g2.dispose(); + if (!skipRendering) + { + Graphics2D g2 = tmp.createGraphics(); + g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint); + g2.drawImage(ret, 0, 0, w, h, null); + g2.dispose(); + } ret = tmp; } @@ -356,16 +380,24 @@ */ public static BufferedImage cropImage(BufferedImage original, int left, int top, int width, int height) { + return cropImage(original, left, top, width, height, false); + } + + public static BufferedImage cropImage(BufferedImage original, int left, int top, int width, int height, boolean skipRendering) + { BufferedImage resizedImage = new BufferedImage(width, height, getType(original.getColorModel())); - Graphics2D graphics2D = resizedImage.createGraphics(); - graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); - graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_DEFAULT); + if (!skipRendering) + { + Graphics2D graphics2D = resizedImage.createGraphics(); + graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); + graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_DEFAULT); - AffineTransform at = new AffineTransform(); - at.translate(-left, -top); - graphics2D.drawImage(original, at, null); - graphics2D.dispose(); + AffineTransform at = new AffineTransform(); + at.translate(-left, -top); + graphics2D.drawImage(original, at, null); + graphics2D.dispose(); + } return resizedImage; } @@ -379,6 +411,11 @@ */ public static BufferedImage addRoundedCorners(BufferedImage original, Color backgroundColor, int radius) { + return addRoundedCorners(original, backgroundColor, radius, false); + } + + public static BufferedImage addRoundedCorners(BufferedImage original, Color backgroundColor, int radius, boolean skipRendering) + { int originalImageType = getType(original.getColorModel()); int roundedCornersImageType = BufferedImage.TYPE_4BYTE_ABGR; @@ -409,37 +446,40 @@ throw new RuntimeException("NegativeArraySizeException caught when adding rounded corners"); } - Graphics2D roundedGraphics2D = roundedImage.createGraphics(); - roundedGraphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - roundedGraphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); + if (!skipRendering) + { + Graphics2D roundedGraphics2D = roundedImage.createGraphics(); + roundedGraphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + roundedGraphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); - roundedGraphics2D.setColor(Color.WHITE); - roundedGraphics2D.fillRoundRect(0, 0, original.getWidth(), original.getHeight(), radius, radius); - roundedGraphics2D.setComposite(AlphaComposite.SrcIn); - roundedGraphics2D.drawImage(original, 0, 0, original.getWidth(), original.getHeight(), null); + roundedGraphics2D.setColor(Color.WHITE); + roundedGraphics2D.fillRoundRect(0, 0, original.getWidth(), original.getHeight(), radius, radius); + roundedGraphics2D.setComposite(AlphaComposite.SrcIn); + roundedGraphics2D.drawImage(original, 0, 0, original.getWidth(), original.getHeight(), null); - if (backgroundColor != null) - { + if (backgroundColor != null) + { - BufferedImage destImage; - try - { - destImage = new BufferedImage(original.getWidth(), original.getHeight(), originalImageType); + BufferedImage destImage; + try + { + destImage = new BufferedImage(original.getWidth(), original.getHeight(), originalImageType); + } + catch (NegativeArraySizeException e) + { + throw new RuntimeException("NegativeArraySizeException caught when resizing image]"); + } + // draw new image + Graphics2D destImageGraphics2D = destImage.createGraphics(); + destImageGraphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + destImageGraphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); + + destImageGraphics2D.setBackground(backgroundColor); + destImageGraphics2D.clearRect(0, 0, original.getWidth(), original.getHeight()); + // destImageGraphics2D.setComposite(AlphaComposite.DstIn); + destImageGraphics2D.drawImage(roundedImage, 0, 0, original.getWidth(), original.getHeight(), null); + return destImage; } - catch (NegativeArraySizeException e) - { - throw new RuntimeException("NegativeArraySizeException caught when resizing image]"); - } - // draw new image - Graphics2D destImageGraphics2D = destImage.createGraphics(); - destImageGraphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - destImageGraphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); - - destImageGraphics2D.setBackground(backgroundColor); - destImageGraphics2D.clearRect(0, 0, original.getWidth(), original.getHeight()); - // destImageGraphics2D.setComposite(AlphaComposite.DstIn); - destImageGraphics2D.drawImage(roundedImage, 0, 0, original.getWidth(), original.getHeight(), null); - return destImage; } return roundedImage; @@ -878,18 +918,15 @@ BufferedImage original = createBufferedImage(image); Map<String, String> params = parseParameters(resolutionstring); + if (lazy) + { + params.put("skipRendering", "true"); + } BufferedImage img; try { - if (lazy) - { - img = new BufferedImage(1, 1, getType(original.getColorModel())); - } - else - { - img = ImageUtils.getImageForResolution(original, resolutionstring, params); - } + img = ImageUtils.getImageForResolution(original, resolutionstring, params); } catch (IllegalArgumentException e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2011-12-25 08:18:36
|
Revision: 3731 http://openutils.svn.sourceforge.net/openutils/?rev=3731&view=rev Author: diego_schivo Date: 2011-12-25 08:18:30 +0000 (Sun, 25 Dec 2011) Log Message: ----------- MEDIA-277 Lazy resolution creation Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lifecycle/MediaModule.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/tags/el/MediaEl.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/uri/MediaURI2RepositoryMapping.java trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lifecycle/MediaModule.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lifecycle/MediaModule.java 2011-12-19 10:17:54 UTC (rev 3730) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lifecycle/MediaModule.java 2011-12-25 08:18:30 UTC (rev 3731) @@ -78,6 +78,8 @@ private List playlistLinks = new ArrayList(); + private boolean lazyResolutionCreation; + /** * Constructor */ @@ -291,4 +293,22 @@ { this.playlistLinks.add(playlistLink); } + + /** + * Returns the lazyResolutionCreation. + * @return the lazyResolutionCreation + */ + public boolean isLazyResolutionCreation() + { + return lazyResolutionCreation; + } + + /** + * Sets the lazyResolutionCreation. + * @param lazyResolutionCreation the lazyResolutionCreation to set + */ + public void setLazyResolutionCreation(boolean lazyResolutionCreation) + { + this.lazyResolutionCreation = lazyResolutionCreation; + } } Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/tags/el/MediaEl.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/tags/el/MediaEl.java 2011-12-19 10:17:54 UTC (rev 3730) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/tags/el/MediaEl.java 2011-12-25 08:18:30 UTC (rev 3731) @@ -303,7 +303,7 @@ } } - if (!ImageUtils.checkOrCreateResolution(media, resolution, null)) + if (!ImageUtils.checkOrCreateResolution(media, resolution, null, module().isLazyResolutionCreation())) { return null; } Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/uri/MediaURI2RepositoryMapping.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/uri/MediaURI2RepositoryMapping.java 2011-12-19 10:17:54 UTC (rev 3730) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/uri/MediaURI2RepositoryMapping.java 2011-12-25 08:18:30 UTC (rev 3731) @@ -20,12 +20,17 @@ package net.sourceforge.openutils.mgnlmedia.media.uri; import info.magnolia.cms.beans.config.URI2RepositoryMapping; +import info.magnolia.cms.core.Content; +import info.magnolia.cms.core.NodeData; +import info.magnolia.cms.util.ContentUtil; import info.magnolia.context.MgnlContext; import info.magnolia.link.Link; import javax.jcr.RepositoryException; +import net.sourceforge.openutils.mgnlmedia.media.lifecycle.MediaModule; import net.sourceforge.openutils.mgnlmedia.media.tags.el.MediaEl; +import net.sourceforge.openutils.mgnlmedia.media.utils.ImageUtils; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; @@ -97,4 +102,39 @@ return handle; } + /** + * {@inheritDoc} + */ + @Override + public String getHandle(String uri) + { + String handle = super.getHandle(uri); + if (MediaEl.module().isLazyResolutionCreation()) + { + String resolutionsName = "resolutions"; + String search = "/" + resolutionsName + "/"; + int p = StringUtils.indexOf(handle, search); + if (p != -1) + { + String mediaPath = handle.substring(0, p); + Content mediaNode = ContentUtil.getContent(MediaModule.REPO, mediaPath); + if (mediaNode != null) + { + Content resolutionsNode = ContentUtil.getContent(mediaNode, resolutionsName); + String ndName = StringUtils.substringBefore(handle.substring(p + search.length()), "/"); + if (resolutionsNode != null && !StringUtils.isEmpty(ndName)) + { + NodeData nd = resolutionsNode.getNodeData(ndName); + String resolution = nd.getAttribute("resolutionNotYetCreated"); + if (!StringUtils.isEmpty(resolution)) + { + ImageUtils.checkOrCreateResolution(mediaNode, resolution, null); + } + } + } + } + } + return handle; + } + } Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java 2011-12-19 10:17:54 UTC (rev 3730) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java 2011-12-25 08:18:30 UTC (rev 3731) @@ -455,10 +455,10 @@ * @throws RepositoryException exception in jcr operations * @throws IOException exception converting image to jpg */ - public static void saveResolution(BufferedImage image, Content saveTo, String extension, float quality, + public static NodeData saveResolution(BufferedImage image, Content saveTo, String extension, float quality, boolean forceProgressive) throws RepositoryException, IOException { - saveResolution(image, saveTo, null, extension, quality, forceProgressive); + return saveResolution(image, saveTo, null, extension, quality, forceProgressive); } /** @@ -472,7 +472,7 @@ * @throws RepositoryException exception in jcr operations * @throws IOException exception converting image to jpg */ - public static void saveResolution(BufferedImage image, Content saveTo, String name, String extension, + public static NodeData saveResolution(BufferedImage image, Content saveTo, String name, String extension, float quality, boolean forceProgressive) throws RepositoryException, IOException { @@ -564,6 +564,8 @@ nd.setAttribute(FileProperties.PROPERTY_SIZE, "" + count); resolutions.save(); + + return nd; } finally { @@ -746,7 +748,13 @@ public static boolean checkOrCreateResolution(final Content media, final String resolutionTarget, String nodeDataName) { + return checkOrCreateResolution(media, resolutionTarget, nodeDataName, false); + } + public static boolean checkOrCreateResolution(final Content media, final String resolutionTarget, + String nodeDataName, final boolean lazy) + { + Content resolutions = getResolutionsNode(media); String resolution = resolutionTarget; @@ -759,7 +767,19 @@ { if (resolutions != null && resolutions.hasNodeData(getResolutionPath(resolution))) { - return true; + if (lazy) + { + return true; + } + else if (!StringUtils.isEmpty(resolutions.getNodeData(getResolutionPath(resolution)).getAttribute( + "resolutionNotYetCreated"))) + { + // continue: replace the fake image with the actual one + } + else + { + return true; + } } } catch (RepositoryException e1) @@ -862,7 +882,14 @@ BufferedImage img; try { - img = ImageUtils.getImageForResolution(original, resolutionstring, params); + if (lazy) + { + img = new BufferedImage(1, 1, getType(original.getColorModel())); + } + else + { + img = ImageUtils.getImageForResolution(original, resolutionstring, params); + } } catch (IllegalArgumentException e) { @@ -893,13 +920,20 @@ forceProgressive = true; } - ImageUtils.saveResolution( + NodeData nd = ImageUtils.saveResolution( img, node, resolutioNodeName, outputextension, quality, forceProgressive); + if (lazy) + { + nd.setAttribute( + "resolutionNotYetCreated", + StringUtils.removeStart(resolutioNodeName, "res-")); + nd.getParent().save(); + } } catch (RepositoryException e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2011-12-19 10:18:13
|
Revision: 3730 http://openutils.svn.sourceforge.net/openutils/?rev=3730&view=rev Author: fgiust Date: 2011-12-19 10:17:54 +0000 (Mon, 19 Dec 2011) Log Message: ----------- Check on repository name: combine with other options Modified Paths: -------------- trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/templating/ExtendedTemplate.java Modified: trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/templating/ExtendedTemplate.java =================================================================== --- trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/templating/ExtendedTemplate.java 2011-12-02 15:39:01 UTC (rev 3729) +++ trunk/openutils-mgnlutils/src/main/java/it/openutils/mgnlutils/templating/ExtendedTemplate.java 2011-12-19 10:17:54 UTC (rev 3730) @@ -168,19 +168,18 @@ { try { - if (repositories.contains(node.getWorkspace().getName())) + if (!repositories.contains(node.getWorkspace().getName())) { - return true; + return false; } } catch (RepositoryException e) { // ignore, should never happen } - return false; } - if (levels != null && !levels.isEmpty()) + if (available && (levels != null && !levels.isEmpty())) { try { @@ -196,7 +195,7 @@ } } - if (StringUtils.isNotBlank(parentPath)) + if (available && StringUtils.isNotBlank(parentPath)) { if (!StringUtils.contains(node.getHandle(), parentPath)) { @@ -204,7 +203,7 @@ } } - if (parentTemplates != null && !parentTemplates.isEmpty()) + if (available && (parentTemplates != null && !parentTemplates.isEmpty())) { try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gca...@us...> - 2011-12-02 15:39:08
|
Revision: 3729 http://openutils.svn.sourceforge.net/openutils/?rev=3729&view=rev Author: gcatania Date: 2011-12-02 15:39:01 +0000 (Fri, 02 Dec 2011) Log Message: ----------- BSHD-2 more unit tests Modified Paths: -------------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Car.java trunk/openutils-bshd5/src/test/resources/hibernate.cfg.xml Added Paths: ----------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/StickerDAO.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Sticker.java Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java 2011-12-02 15:18:01 UTC (rev 3728) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java 2011-12-02 15:39:01 UTC (rev 3729) @@ -28,6 +28,7 @@ import it.openutils.hibernate.test.dao.CarDAO; import it.openutils.hibernate.test.dao.CarMakerDAO; import it.openutils.hibernate.test.dao.PersonDAO; +import it.openutils.hibernate.test.dao.StickerDAO; import it.openutils.hibernate.test.model.Address; import it.openutils.hibernate.test.model.Car; import it.openutils.hibernate.test.model.CarMaker; @@ -37,8 +38,10 @@ import it.openutils.hibernate.test.model.FullName; import it.openutils.hibernate.test.model.Owner; import it.openutils.hibernate.test.model.Person; +import it.openutils.hibernate.test.model.Sticker; import java.util.ArrayList; +import java.util.Arrays; import java.util.Calendar; import java.util.Collections; import java.util.GregorianCalendar; @@ -73,6 +76,9 @@ @Autowired private CarDAO carDAO; + @Autowired + private StickerDAO stickerDAO; + private static Person alice() { FullName fullName = new FullName("Alice", "McBeal"); @@ -165,7 +171,7 @@ return p; } - private Car bobsPrius(Owner bob, CarModel prius) + private static Car bobsPrius(Owner bob, CarModel prius) { Car bobsPrius = new Car(); bobsPrius.setModel(prius); @@ -176,7 +182,7 @@ return bobsPrius; } - private Car chucksPrius(Owner chuck, CarModel prius) + private static Car chucksPrius(Owner chuck, CarModel prius) { Car chucksPrius = new Car(); chucksPrius.setModel(prius); @@ -387,6 +393,32 @@ Assert.assertEquals(shouldBeBob.getName(), bob.getName()); } + @Test + public void testFindFilteredChildEntity() + { + Sticker st1 = new Sticker(); + st1.setName("Warning! Baby on board!"); + st1.setHeight(20d); + st1.setWidth(10d); + Sticker st2 = new Sticker(); + st2.setName("Object in the mirror are losing"); + st2.setHeight(5d); + st2.setWidth(10d); + Sticker st3 = new Sticker(); + st3.setName("(tribal tattoo sticker)"); + st3.setHeight(35d); + st3.setWidth(18d); + + Car chucksPrius = chucksPrius(chuck(), prius(toyota())); + chucksPrius.setStickers(Arrays.asList(st1, st2, st3)); + carDAO.save(chucksPrius); + carDAO.evict(chucksPrius); + Sticker filter = new Sticker(); + filter.setWidth(10d); + List<Sticker> found = stickerDAO.findFiltered(filter); + Assert.assertEquals(found.size(), 2); + } + // @Test // public void testExampleAssociations() // { Added: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/StickerDAO.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/StickerDAO.java (rev 0) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/StickerDAO.java 2011-12-02 15:39:01 UTC (rev 3729) @@ -0,0 +1,55 @@ +/** + * + * openutils base Spring-Hibernate DAO (http://www.openmindlab.com/lab/products/bshd5.html) + * + * Copyright(C) 2005-2011, Openmind S.r.l. http://www.openmindonline.it + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * You may obtain a copy of the License at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +package it.openutils.hibernate.test.dao; + +import it.openutils.dao.hibernate.HibernateDAO; +import it.openutils.dao.hibernate.HibernateDAOImpl; +import it.openutils.hibernate.test.model.Sticker; + +import org.hibernate.SessionFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Repository; + + +/** + * @author gcatania + */ +public interface StickerDAO extends HibernateDAO<Sticker, Long> +{ + + @Repository("stickerDAO") + class StickerDAOImpl extends HibernateDAOImpl<Sticker, Long> implements StickerDAO + { + + @Autowired + public StickerDAOImpl(SessionFactory factory) + { + super(Sticker.class); + setSessionFactory(factory); + } + } + +} Property changes on: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/StickerDAO.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Car.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Car.java 2011-12-02 15:18:01 UTC (rev 3728) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Car.java 2011-12-02 15:39:01 UTC (rev 3729) @@ -26,6 +26,7 @@ package it.openutils.hibernate.test.model; import java.util.Calendar; +import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; @@ -34,6 +35,7 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; /** @@ -59,6 +61,9 @@ @Column private CurrencyAmount marketValue; + @OneToMany(cascade = CascadeType.ALL) + private List<Sticker> stickers; + /** * @return the id */ @@ -140,6 +145,22 @@ } /** + * @return the stickers + */ + public List<Sticker> getStickers() + { + return stickers; + } + + /** + * @param stickers the stickers to set + */ + public void setStickers(List<Sticker> stickers) + { + this.stickers = stickers; + } + + /** * {@inheritDoc} */ @Override @@ -149,9 +170,8 @@ int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((marketValue == null) ? 0 : marketValue.hashCode()); - result = prime * result + ((model == null) ? 0 : model.hashCode()); - result = prime * result + ((owner == null) ? 0 : owner.hashCode()); result = prime * result + ((registrationDate == null) ? 0 : registrationDate.hashCode()); + result = prime * result + ((stickers == null) ? 0 : stickers.hashCode()); return result; } @@ -196,39 +216,28 @@ { return false; } - if (model == null) + if (registrationDate == null) { - if (other.model != null) + if (other.registrationDate != null) { return false; } } - else if (!model.equals(other.model)) + else if (!registrationDate.equals(other.registrationDate)) { return false; } - if (owner == null) + if (stickers == null) { - if (other.owner != null) + if (other.stickers != null) { return false; } } - else if (!owner.equals(other.owner)) + else if (!stickers.equals(other.stickers)) { return false; } - if (registrationDate == null) - { - if (other.registrationDate != null) - { - return false; - } - } - else if (!registrationDate.equals(other.registrationDate)) - { - return false; - } return true; } @@ -242,14 +251,12 @@ builder .append("Car [id=") .append(id) - .append(", model=") - .append(model) - .append(", owner=") - .append(owner) .append(", registrationDate=") .append(registrationDate) .append(", marketValue=") .append(marketValue) + .append(", stickers=") + .append(stickers) .append("]"); return builder.toString(); } Added: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Sticker.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Sticker.java (rev 0) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Sticker.java 2011-12-02 15:39:01 UTC (rev 3729) @@ -0,0 +1,219 @@ +/** + * + * openutils base Spring-Hibernate DAO (http://www.openmindlab.com/lab/products/bshd5.html) + * + * Copyright(C) 2005-2011, Openmind S.r.l. http://www.openmindonline.it + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * You may obtain a copy of the License at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +package it.openutils.hibernate.test.model; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; + + +/** + * @author gcatania + */ +@Entity +public class Sticker +{ + + @Id + @GeneratedValue + private Long id; + + @Column + private String name; + + @Column + private Double height; + + @Column + private Double width; + + /** + * @return the id + */ + public Long getId() + { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Long id) + { + this.id = id; + } + + /** + * @return the name + */ + public String getName() + { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) + { + this.name = name; + } + + /** + * @return the height + */ + public Double getHeight() + { + return height; + } + + /** + * @param height the height to set + */ + public void setHeight(Double height) + { + this.height = height; + } + + /** + * @return the width + */ + public Double getWidth() + { + return width; + } + + /** + * @param width the width to set + */ + public void setWidth(Double width) + { + this.width = width; + } + + /** + * {@inheritDoc} + */ + @Override + public int hashCode() + { + final int prime = 31; + int result = 1; + result = prime * result + ((height == null) ? 0 : height.hashCode()); + result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((width == null) ? 0 : width.hashCode()); + return result; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean equals(Object obj) + { + if (this == obj) + { + return true; + } + if (obj == null) + { + return false; + } + if (!(obj instanceof Sticker)) + { + return false; + } + Sticker other = (Sticker) obj; + if (height == null) + { + if (other.height != null) + { + return false; + } + } + else if (!height.equals(other.height)) + { + return false; + } + if (id == null) + { + if (other.id != null) + { + return false; + } + } + else if (!id.equals(other.id)) + { + return false; + } + if (name == null) + { + if (other.name != null) + { + return false; + } + } + else if (!name.equals(other.name)) + { + return false; + } + if (width == null) + { + if (other.width != null) + { + return false; + } + } + else if (!width.equals(other.width)) + { + return false; + } + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() + { + StringBuilder builder = new StringBuilder(); + builder + .append("Sticker [id=") + .append(id) + .append(", name=") + .append(name) + .append(", height=") + .append(height) + .append(", width=") + .append(width) + .append("]"); + return builder.toString(); + } + +} Property changes on: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Sticker.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/openutils-bshd5/src/test/resources/hibernate.cfg.xml =================================================================== --- trunk/openutils-bshd5/src/test/resources/hibernate.cfg.xml 2011-12-02 15:18:01 UTC (rev 3728) +++ trunk/openutils-bshd5/src/test/resources/hibernate.cfg.xml 2011-12-02 15:39:01 UTC (rev 3729) @@ -12,5 +12,6 @@ <mapping class="it.openutils.hibernate.test.model.FullName" /> <mapping class="it.openutils.hibernate.test.model.Owner" /> <mapping class="it.openutils.hibernate.test.model.Person" /> + <mapping class="it.openutils.hibernate.test.model.Sticker" /> </session-factory> </hibernate-configuration> \ 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: <gca...@us...> - 2011-12-02 15:18:08
|
Revision: 3728 http://openutils.svn.sourceforge.net/openutils/?rev=3728&view=rev Author: gcatania Date: 2011-12-02 15:18:01 +0000 (Fri, 02 Dec 2011) Log Message: ----------- BSHD-2 improved unit tests Modified Paths: -------------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java 2011-12-02 15:08:08 UTC (rev 3727) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java 2011-12-02 15:18:01 UTC (rev 3728) @@ -165,6 +165,28 @@ return p; } + private Car bobsPrius(Owner bob, CarModel prius) + { + Car bobsPrius = new Car(); + bobsPrius.setModel(prius); + bobsPrius.setRegistrationDate(new GregorianCalendar(2010, Calendar.OCTOBER, 28)); + bobsPrius.setMarketValue(new CurrencyAmount(1700, "USD")); + bobsPrius.setOwner(bob); + bob.setCars(Collections.singleton(bobsPrius)); + return bobsPrius; + } + + private Car chucksPrius(Owner chuck, CarModel prius) + { + Car chucksPrius = new Car(); + chucksPrius.setModel(prius); + chucksPrius.setRegistrationDate(new GregorianCalendar(2011, Calendar.DECEMBER, 13)); + chucksPrius.setMarketValue(new CurrencyAmount(5400, "USD")); + chucksPrius.setOwner(chuck); + chuck.setCars(Collections.singleton(chucksPrius)); + return chucksPrius; + } + /** * basic save/evict/get test. */ @@ -280,27 +302,17 @@ @Test public void testFindFilteredChild() { - Owner bob = bob(); CarMaker toyota = toyota(); CarModel prius = prius(toyota); - Car bobsPrius = new Car(); - bobsPrius.setModel(prius); - bobsPrius.setRegistrationDate(new GregorianCalendar(2010, Calendar.OCTOBER, 28)); - bobsPrius.setMarketValue(new CurrencyAmount(1700, "USD")); - bobsPrius.setOwner(bob); - bob.setCars(Collections.singleton(bobsPrius)); + Owner bob = bob(); + bobsPrius(bob, prius); + personDAO.save(bob); Owner chuck = chuck(); - Car chucksPrius = new Car(); - chucksPrius.setModel(prius); - chucksPrius.setRegistrationDate(new GregorianCalendar(2011, Calendar.DECEMBER, 13)); - chucksPrius.setMarketValue(new CurrencyAmount(5400, "USD")); - chucksPrius.setOwner(bob); - chuck.setCars(Collections.singleton(chucksPrius)); + chucksPrius(chuck, prius); + personDAO.save(chuck); - personDAO.save(bob); - personDAO.save(chuck); personDAO.save(priusDesigner(prius)); Car carFilter = new Car(); @@ -359,12 +371,7 @@ CarMaker toyota = toyota(); CarModel prius = prius(toyota); - Car bobsPrius = new Car(); - bobsPrius.setModel(prius); - bobsPrius.setRegistrationDate(new GregorianCalendar(2010, Calendar.OCTOBER, 28)); - bobsPrius.setMarketValue(new CurrencyAmount(1700, "USD")); - bobsPrius.setOwner(bob); - bob.setCars(Collections.singleton(bobsPrius)); + Car bobsPrius = bobsPrius(bob, prius); personDAO.save(bob); personDAO.save(alice()); personDAO.save(chuck()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gca...@us...> - 2011-12-02 15:08:14
|
Revision: 3727 http://openutils.svn.sourceforge.net/openutils/?rev=3727&view=rev Author: gcatania Date: 2011-12-02 15:08:08 +0000 (Fri, 02 Dec 2011) Log Message: ----------- BSHD-2 fix id class on test dao Modified Paths: -------------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarMakerDAO.java Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarMakerDAO.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarMakerDAO.java 2011-12-02 14:44:21 UTC (rev 3726) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarMakerDAO.java 2011-12-02 15:08:08 UTC (rev 3727) @@ -37,11 +37,11 @@ /** * @author gcatania */ -public interface CarMakerDAO extends HibernateDAO<CarMaker, Long> +public interface CarMakerDAO extends HibernateDAO<CarMaker, String> { @Repository("carMakerDAO") - class CarMakerDAOImpl extends HibernateDAOImpl<CarMaker, Long> implements CarMakerDAO + class CarMakerDAOImpl extends HibernateDAOImpl<CarMaker, String> implements CarMakerDAO { @Autowired This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gca...@us...> - 2011-12-02 14:44:27
|
Revision: 3726 http://openutils.svn.sourceforge.net/openutils/?rev=3726&view=rev Author: gcatania Date: 2011-12-02 14:44:21 +0000 (Fri, 02 Dec 2011) Log Message: ----------- BSHD-11 adding fix, unit tests Modified Paths: -------------- trunk/openutils-bshd5/src/main/java/it/openutils/hibernate/example/ExampleTree.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java Modified: trunk/openutils-bshd5/src/main/java/it/openutils/hibernate/example/ExampleTree.java =================================================================== --- trunk/openutils-bshd5/src/main/java/it/openutils/hibernate/example/ExampleTree.java 2011-12-02 14:40:25 UTC (rev 3725) +++ trunk/openutils-bshd5/src/main/java/it/openutils/hibernate/example/ExampleTree.java 2011-12-02 14:44:21 UTC (rev 3726) @@ -47,6 +47,8 @@ import org.hibernate.criterion.Example; import org.hibernate.criterion.Example.PropertySelector; import org.hibernate.criterion.MatchMode; +import org.hibernate.criterion.Restrictions; +import org.hibernate.engine.SessionImplementor; import org.hibernate.metadata.ClassMetadata; import org.hibernate.type.Type; @@ -282,6 +284,9 @@ crit.add(c); } ClassMetadata classMetadata = sessionFactory.getClassMetadata(Hibernate.getClass(entity)); + + addIdentifierRestriction(crit, entity, classMetadata); // BSHD-11 + Type[] types = classMetadata.getPropertyTypes(); String[] names = classMetadata.getPropertyNames(); for (int i = 0; i < types.length; i++) @@ -315,6 +320,25 @@ } } + /* + * BSHD-11 + */ + private void addIdentifierRestriction(Criteria crit, Object entity, ClassMetadata classMetadata) + { + String identifierName = classMetadata.getIdentifierPropertyName(); + if (identifierName != null) + { + // TODO is this cast really necessary? Will it fail in future hibernate versions? + SessionImplementor si = (SessionImplementor) sessionFactory.getCurrentSession(); + + Object idValue = classMetadata.getIdentifier(entity, si); + if (idValue != null) // TODO should we use property selectors instead? + { + crit.add(Restrictions.idEq(idValue)); + } + } + } + private String getAssociationPath(String[] walkedProperties) { return walkedProperties.length > 0 ? StringUtils.join(walkedProperties, '.') : StringUtils.EMPTY; Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java 2011-12-02 14:40:25 UTC (rev 3725) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java 2011-12-02 14:44:21 UTC (rev 3726) @@ -313,6 +313,73 @@ Assert.assertEquals(shouldBeBob.getName(), bob.getName()); } + /** + * @see BSHD-11 + */ + @Test + public void testFindFilteredById() + { + Person alice = alice(); + Long alicesId = personDAO.save(alice); + personDAO.save(bob()); + Person filter = new Person(); + filter.setId(alicesId); + List<Person> found = personDAO.findFiltered(filter); + + Assert.assertEquals(found.size(), 1, "Invalid number of persons found."); + Assert.assertEquals(found.get(0), alice); + } + + /** + * @see BSHD-11 + */ + @Test + public void testFindFilteredByNonDefaultId() + { + CarMaker toyota = toyota(); + carMakerDAO.save(toyota); + carMakerDAO.save(fiat()); + + CarMaker filter = new CarMaker(); + filter.setCode("TYT"); + List<CarMaker> found = carMakerDAO.findFiltered(filter); + + Assert.assertEquals(found.size(), 1, "Wrong number of car makers found"); + CarMaker foundCarMaker = found.get(0); + Assert.assertEquals(foundCarMaker.getName(), "Toyota"); + } + + /** + * @see BSHD-11 + */ + @Test + public void testFindFilteredByChildId() + { + Owner bob = bob(); + CarMaker toyota = toyota(); + CarModel prius = prius(toyota); + + Car bobsPrius = new Car(); + bobsPrius.setModel(prius); + bobsPrius.setRegistrationDate(new GregorianCalendar(2010, Calendar.OCTOBER, 28)); + bobsPrius.setMarketValue(new CurrencyAmount(1700, "USD")); + bobsPrius.setOwner(bob); + bob.setCars(Collections.singleton(bobsPrius)); + personDAO.save(bob); + personDAO.save(alice()); + personDAO.save(chuck()); + personDAO.save(priusDesigner(prius)); + + Car carFilter = new Car(); + carFilter.setId(bobsPrius.getId()); + Owner filter = new Owner(); + filter.setCars(Collections.singleton(carFilter)); + List<Person> found = personDAO.findFiltered(filter); + Assert.assertEquals(found.size(), 1); + Person shouldBeBob = found.get(0); + Assert.assertEquals(shouldBeBob.getName(), bob.getName()); + } + // @Test // public void testExampleAssociations() // { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gca...@us...> - 2011-12-02 14:40:35
|
Revision: 3725 http://openutils.svn.sourceforge.net/openutils/?rev=3725&view=rev Author: gcatania Date: 2011-12-02 14:40:25 +0000 (Fri, 02 Dec 2011) Log Message: ----------- BSHD-2 unit tests Modified Paths: -------------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java 2011-12-02 14:39:04 UTC (rev 3724) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java 2011-12-02 14:40:25 UTC (rev 3725) @@ -26,6 +26,7 @@ package it.openutils.hibernate.test; import it.openutils.hibernate.test.dao.CarDAO; +import it.openutils.hibernate.test.dao.CarMakerDAO; import it.openutils.hibernate.test.dao.PersonDAO; import it.openutils.hibernate.test.model.Address; import it.openutils.hibernate.test.model.Car; @@ -67,6 +68,9 @@ private PersonDAO personDAO; @Autowired + private CarMakerDAO carMakerDAO; + + @Autowired private CarDAO carDAO; private static Person alice() @@ -111,15 +115,26 @@ private static CarMaker toyota() { CarMaker toyota = new CarMaker(); + toyota.setCode("TYT"); toyota.setName("Toyota"); toyota.setCapitalization(new CurrencyAmount(12000, "YEN")); return toyota; } + private static CarMaker fiat() + { + CarMaker fiat = new CarMaker(); + fiat.setCode("FIA"); + fiat.setName("Fabbrica Italiana Automobili Torino"); + fiat.setCapitalization(new CurrencyAmount(80000, "EUR")); + return fiat; + } + private static CarModel prius(CarMaker toyota) { CarModel prius = new CarModel(); prius.setName("Prius"); + prius.setMake(toyota); prius.setYear(Integer.valueOf(2008)); List<CarModel> toyotaModels = toyota.getModels(); @@ -166,22 +181,31 @@ Assert.assertEquals(person, savedPerson); } - /* - * java.lang.ClassCastException: it.openutils.hibernate.test.model.Person_$$_javassist_7 cannot be cast to - * it.openutils.hibernate.test.model.Designer - */ - @Test(enabled = false) + @Test public void testSaveAndRetrieveWithCascade() { CarMaker toyota = toyota(); CarModel prius = prius(toyota); + + carMakerDAO.save(toyota); + Designer designer = priusDesigner(prius); - Long designerId = personDAO.save(designer); + personDAO.save(designer); + // FIXME evicting breaks the test, there must be something wrong in the hibernate mapping configuration + // personDAO.evict(designer); - personDAO.evict(designer); - Person reloadedDesigner = personDAO.load(designerId); + // cannot use load() with entity inheritance, see https://forum.hibernate.org/viewtopic.php?p=2418875 + // Person reloadedDesigner = personDAO.load(designer.getId()); + + Person filter = new Person(); + filter.setBirthDate(designer.getBirthDate()); + Person reloadedDesigner = personDAO.findFilteredFirst(filter); + Assert.assertNotNull(reloadedDesigner); + Assert.assertEquals(reloadedDesigner.getClass(), Designer.class); Designer rd = (Designer) reloadedDesigner; + Assert.assertEquals(rd.getEmployer(), toyota); + Assert.assertEquals(prius.getMake(), toyota); Assert.assertEquals(rd.getHipsterFactor(), 97); Assert.assertEquals(rd.getDesignedModels().iterator().next().getYear(), Integer.valueOf(2008)); } @@ -233,44 +257,6 @@ Assert.assertEquals(expectedBob.getClass(), Owner.class, "Inheritanche check failed"); } - @Test(enabled = false) - public void testFindFilteredById() - { - Person alice = alice(); - Long alicesId = personDAO.save(alice); - personDAO.save(bob()); - Person filter = new Person(); - filter.setId(alicesId); - List<Person> found = personDAO.findFiltered(filter); - - Assert.assertEquals(found.size(), 1, "No persons found."); - Assert.assertEquals(found.get(0), alice); - } - - /* - * disabled: filter by id on child objects isn't working yet (see - * http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/querycriteria.html#querycriteria-examples and - * https://forum.hibernate.org/viewtopic.php?f=9&t=1004833&view=next ) - */ - @Test(enabled = false) - public void testFindFilteredByChildId() - { - Owner bob = bob(); - CarMaker toyota = toyota(); - CarModel prius = prius(toyota); - - Car bobsPrius = new Car(new GregorianCalendar(2010, Calendar.OCTOBER, 12), prius, toyota); - bob.setCars(Collections.singleton(bobsPrius)); - personDAO.save(bob); - - Owner filter = new Owner(); - Car carFilter = new Car(null, null, null); - carFilter.setId(bobsPrius.getId()); - filter.setCars(Collections.singleton(carFilter)); - Person found = personDAO.findFilteredFirst(filter); - Assert.assertEquals(found.getName(), bob.getName()); - } - @Test public void testExampleBasic() { @@ -291,6 +277,42 @@ Assert.assertEquals(found.get(0).getName().getFamilyName(), "McBeal"); } + @Test + public void testFindFilteredChild() + { + Owner bob = bob(); + CarMaker toyota = toyota(); + CarModel prius = prius(toyota); + + Car bobsPrius = new Car(); + bobsPrius.setModel(prius); + bobsPrius.setRegistrationDate(new GregorianCalendar(2010, Calendar.OCTOBER, 28)); + bobsPrius.setMarketValue(new CurrencyAmount(1700, "USD")); + bobsPrius.setOwner(bob); + bob.setCars(Collections.singleton(bobsPrius)); + + Owner chuck = chuck(); + Car chucksPrius = new Car(); + chucksPrius.setModel(prius); + chucksPrius.setRegistrationDate(new GregorianCalendar(2011, Calendar.DECEMBER, 13)); + chucksPrius.setMarketValue(new CurrencyAmount(5400, "USD")); + chucksPrius.setOwner(bob); + chuck.setCars(Collections.singleton(chucksPrius)); + + personDAO.save(bob); + personDAO.save(chuck); + personDAO.save(priusDesigner(prius)); + + Car carFilter = new Car(); + carFilter.setMarketValue(new CurrencyAmount(1700, "USD")); + Owner filter = new Owner(); + filter.setCars(Collections.singleton(carFilter)); + List<Person> found = personDAO.findFiltered(filter); + Assert.assertEquals(found.size(), 1); + Person shouldBeBob = found.get(0); + Assert.assertEquals(shouldBeBob.getName(), bob.getName()); + } + // @Test // public void testExampleAssociations() // { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gca...@us...> - 2011-12-02 14:39:15
|
Revision: 3724 http://openutils.svn.sourceforge.net/openutils/?rev=3724&view=rev Author: gcatania Date: 2011-12-02 14:39:04 +0000 (Fri, 02 Dec 2011) Log Message: ----------- BSHD-2 adding test dao, fixing another one Modified Paths: -------------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarDAO.java Added Paths: ----------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarMakerDAO.java Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarDAO.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarDAO.java 2011-12-02 14:38:27 UTC (rev 3723) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarDAO.java 2011-12-02 14:39:04 UTC (rev 3724) @@ -27,7 +27,7 @@ import it.openutils.dao.hibernate.HibernateDAO; import it.openutils.dao.hibernate.HibernateDAOImpl; -import it.openutils.hibernate.test.model.Person; +import it.openutils.hibernate.test.model.Car; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -37,17 +37,17 @@ /** * @author gcatania */ -public interface CarDAO extends HibernateDAO<Person, Long> +public interface CarDAO extends HibernateDAO<Car, Long> { @Repository("carDAO") - class PersonDAOImpl extends HibernateDAOImpl<Person, Long> implements CarDAO + class CarDAOImpl extends HibernateDAOImpl<Car, Long> implements CarDAO { @Autowired - public PersonDAOImpl(SessionFactory factory) + public CarDAOImpl(SessionFactory factory) { - super(Person.class); + super(Car.class); setSessionFactory(factory); } } Added: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarMakerDAO.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarMakerDAO.java (rev 0) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarMakerDAO.java 2011-12-02 14:39:04 UTC (rev 3724) @@ -0,0 +1,55 @@ +/** + * + * openutils base Spring-Hibernate DAO (http://www.openmindlab.com/lab/products/bshd5.html) + * + * Copyright(C) 2005-2011, Openmind S.r.l. http://www.openmindonline.it + * + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * You may obtain a copy of the License at + * + * http://www.gnu.org/licenses/lgpl-2.1.html + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +package it.openutils.hibernate.test.dao; + +import it.openutils.dao.hibernate.HibernateDAO; +import it.openutils.dao.hibernate.HibernateDAOImpl; +import it.openutils.hibernate.test.model.CarMaker; + +import org.hibernate.SessionFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Repository; + + +/** + * @author gcatania + */ +public interface CarMakerDAO extends HibernateDAO<CarMaker, Long> +{ + + @Repository("carMakerDAO") + class CarMakerDAOImpl extends HibernateDAOImpl<CarMaker, Long> implements CarMakerDAO + { + + @Autowired + public CarMakerDAOImpl(SessionFactory factory) + { + super(CarMaker.class); + setSessionFactory(factory); + } + } + +} Property changes on: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/dao/CarMakerDAO.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gca...@us...> - 2011-12-02 14:38:39
|
Revision: 3723 http://openutils.svn.sourceforge.net/openutils/?rev=3723&view=rev Author: gcatania Date: 2011-12-02 14:38:27 +0000 (Fri, 02 Dec 2011) Log Message: ----------- BSHD-2 various test model fixes, improvements Modified Paths: -------------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Car.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CarMaker.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CarModel.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CurrencyAmount.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Designer.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Employee.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Owner.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Person.java Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Car.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Car.java 2011-12-02 14:37:44 UTC (rev 3722) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Car.java 2011-12-02 14:38:27 UTC (rev 3723) @@ -27,6 +27,7 @@ import java.util.Calendar; +import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; @@ -46,13 +47,10 @@ @GeneratedValue(strategy = GenerationType.AUTO) private Long id; - @ManyToOne - private final CarModel model; + @ManyToOne(cascade = CascadeType.ALL) + private CarModel model; - @ManyToOne - private final CarMaker maker; - - @ManyToOne + @ManyToOne(cascade = CascadeType.ALL) private Owner owner; @Column @@ -61,12 +59,6 @@ @Column private CurrencyAmount marketValue; - public Car(Calendar registrationDate, CarModel model, CarMaker maker) - { - this.model = model; - this.maker = maker; - } - /** * @return the id */ @@ -140,11 +132,11 @@ } /** - * @return the maker + * @param model the model to set */ - public CarMaker getMaker() + public void setModel(CarModel model) { - return maker; + this.model = model; } /** @@ -156,7 +148,6 @@ final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); - result = prime * result + ((maker == null) ? 0 : maker.hashCode()); result = prime * result + ((marketValue == null) ? 0 : marketValue.hashCode()); result = prime * result + ((model == null) ? 0 : model.hashCode()); result = prime * result + ((owner == null) ? 0 : owner.hashCode()); @@ -194,17 +185,6 @@ { return false; } - if (maker == null) - { - if (other.maker != null) - { - return false; - } - } - else if (!maker.equals(other.maker)) - { - return false; - } if (marketValue == null) { if (other.marketValue != null) @@ -252,4 +232,26 @@ return true; } + /** + * {@inheritDoc} + */ + @Override + public String toString() + { + StringBuilder builder = new StringBuilder(); + builder + .append("Car [id=") + .append(id) + .append(", model=") + .append(model) + .append(", owner=") + .append(owner) + .append(", registrationDate=") + .append(registrationDate) + .append(", marketValue=") + .append(marketValue) + .append("]"); + return builder.toString(); + } + } Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CarMaker.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CarMaker.java 2011-12-02 14:37:44 UTC (rev 3722) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CarMaker.java 2011-12-02 14:38:27 UTC (rev 3723) @@ -27,10 +27,9 @@ import java.util.List; +import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; @@ -43,8 +42,7 @@ { @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private Long id; + private String code; @Column private String name; @@ -52,23 +50,23 @@ @Column private CurrencyAmount capitalization; - @OneToMany + @OneToMany(cascade = CascadeType.ALL, mappedBy = "make") private List<CarModel> models; /** - * @return the id + * @return the code */ - public Long getId() + public String getCode() { - return id; + return code; } /** - * @param id the id to set + * @param code the code to set */ - public void setId(Long id) + public void setCode(String code) { - this.id = id; + this.code = code; } /** @@ -128,7 +126,7 @@ final int prime = 31; int result = 1; result = prime * result + ((capitalization == null) ? 0 : capitalization.hashCode()); - result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + ((code == null) ? 0 : code.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } @@ -163,14 +161,14 @@ { return false; } - if (id == null) + if (code == null) { - if (other.id != null) + if (other.code != null) { return false; } } - else if (!id.equals(other.id)) + else if (!code.equals(other.code)) { return false; } @@ -188,4 +186,24 @@ return true; } + /** + * {@inheritDoc} + */ + @Override + public String toString() + { + StringBuilder builder = new StringBuilder(); + builder + .append("CarMaker [id=") + .append(code) + .append(", name=") + .append(name) + .append(", capitalization=") + .append(capitalization) + .append(", models=") + .append(models) + .append("]"); + return builder.toString(); + } + } Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CarModel.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CarModel.java 2011-12-02 14:37:44 UTC (rev 3722) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CarModel.java 2011-12-02 14:38:27 UTC (rev 3723) @@ -25,6 +25,7 @@ package it.openutils.hibernate.test.model; +import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; @@ -44,7 +45,7 @@ @GeneratedValue(strategy = GenerationType.AUTO) private Long id; - @ManyToOne + @ManyToOne(cascade = CascadeType.ALL) private CarMaker make; @Column @@ -198,4 +199,22 @@ return true; } + /** + * {@inheritDoc} + */ + @Override + public String toString() + { + StringBuilder builder = new StringBuilder(); + builder + .append("CarModel [id=") + .append(id) + .append(", name=") + .append(name) + .append(", year=") + .append(year) + .append("]"); + return builder.toString(); + } + } Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CurrencyAmount.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CurrencyAmount.java 2011-12-02 14:37:44 UTC (rev 3722) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/CurrencyAmount.java 2011-12-02 14:38:27 UTC (rev 3723) @@ -134,4 +134,13 @@ this.currency = currency; } + /** + * {@inheritDoc} + */ + @Override + public String toString() + { + return new StringBuilder().append(currency).append(' ').append(amount).toString(); + } + } Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Designer.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Designer.java 2011-12-02 14:37:44 UTC (rev 3722) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Designer.java 2011-12-02 14:38:27 UTC (rev 3723) @@ -27,6 +27,7 @@ import java.util.Set; +import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; @@ -44,8 +45,8 @@ @Column private int hipsterFactor; - @ManyToMany - Set<CarModel> designedModels; + @ManyToMany(cascade = CascadeType.ALL) + private Set<CarModel> designedModels; /** * @return the hipsterFactor Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Employee.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Employee.java 2011-12-02 14:37:44 UTC (rev 3722) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Employee.java 2011-12-02 14:38:27 UTC (rev 3723) @@ -27,6 +27,7 @@ import java.util.Calendar; +import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; @@ -41,7 +42,7 @@ public class Employee extends Person { - @ManyToOne + @ManyToOne(cascade = CascadeType.ALL) private CarMaker employer; @Column Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Owner.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Owner.java 2011-12-02 14:37:44 UTC (rev 3722) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Owner.java 2011-12-02 14:38:27 UTC (rev 3723) @@ -27,6 +27,7 @@ import java.util.Set; +import javax.persistence.CascadeType; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import javax.persistence.OneToMany; @@ -41,7 +42,7 @@ public class Owner extends Person { - @OneToMany + @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner") private Set<Car> cars; @Transient Modified: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Person.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Person.java 2011-12-02 14:37:44 UTC (rev 3722) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/model/Person.java 2011-12-02 14:38:27 UTC (rev 3723) @@ -245,15 +245,16 @@ @Override public String toString() { - return "Person [currentAddress=" - + currentAddress - + ", fiscalAddress=" - + fiscalAddress - + ", id=" - + id - + ", name=" - + name - + "]"; + StringBuilder builder = new StringBuilder(); + builder.append("Person [id=").append(id).append(", name=").append(name) + // .append(", birthDate=") + // .append(birthDate) + .append(", currentAddress=") + .append(currentAddress) + .append(", fiscalAddress=") + .append(fiscalAddress) + .append("]"); + return builder.toString(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gca...@us...> - 2011-12-02 14:37:51
|
Revision: 3722 http://openutils.svn.sourceforge.net/openutils/?rev=3722&view=rev Author: gcatania Date: 2011-12-02 14:37:44 +0000 (Fri, 02 Dec 2011) Log Message: ----------- display hibernate parameters in logging Modified Paths: -------------- trunk/openutils-bshd5/src/test/resources/log4j.xml Modified: trunk/openutils-bshd5/src/test/resources/log4j.xml =================================================================== --- trunk/openutils-bshd5/src/test/resources/log4j.xml 2011-12-02 14:36:52 UTC (rev 3721) +++ trunk/openutils-bshd5/src/test/resources/log4j.xml 2011-12-02 14:37:44 UTC (rev 3722) @@ -6,6 +6,9 @@ <param name="ConversionPattern" value="%p - %C{1}.%M(%L) | %m%n" /> </layout> </appender> + <logger name="org.hibernate.type"> + <level value="TRACE" /> + </logger> <logger name="org.apache"> <level value="WARN" /> </logger> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gca...@us...> - 2011-12-02 14:36:58
|
Revision: 3721 http://openutils.svn.sourceforge.net/openutils/?rev=3721&view=rev Author: gcatania Date: 2011-12-02 14:36:52 +0000 (Fri, 02 Dec 2011) Log Message: ----------- updating hsqldb version Modified Paths: -------------- trunk/openutils-bshd5/pom.xml Modified: trunk/openutils-bshd5/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2011-12-01 17:51:12 UTC (rev 3720) +++ trunk/openutils-bshd5/pom.xml 2011-12-02 14:36:52 UTC (rev 3721) @@ -189,9 +189,9 @@ <scope>test</scope> </dependency> <dependency> - <groupId>hsqldb</groupId> + <groupId>org.hsqldb</groupId> <artifactId>hsqldb</artifactId> - <version>1.8.0.1</version> + <version>2.2.6</version> <scope>test</scope> </dependency> </dependencies> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |