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-03-19 10:31:38
|
Revision: 3827 http://openutils.svn.sourceforge.net/openutils/?rev=3827&view=rev Author: diego_schivo Date: 2012-03-19 10:31:31 +0000 (Mon, 19 Mar 2012) Log Message: ----------- stripes renderer Added Paths: ----------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.renderers.stripes.xml Removed Paths: ------------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.paragraph-renderers.stripes.xml magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.template-renderers.stripes.xml Deleted: magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.paragraph-renderers.stripes.xml =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.paragraph-renderers.stripes.xml 2012-03-19 10:15:38 UTC (rev 3826) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.paragraph-renderers.stripes.xml 2012-03-19 10:31:31 UTC (rev 3827) @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<sv:node sv:name="stripes" 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>42369a0d-1d6c-469b-b17d-dc5171435db9</sv:value> - </sv:property> - <sv:property sv:name="class" sv:type="String"> - <sv:value>it.openutils.magnoliastripes.StripesRenderer</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="name" sv:type="String"> - <sv:value>stripes</sv:value> - </sv:property> - <sv:property sv:name="renderer" sv:type="String"> - <sv:value>it.openutils.magnoliastripes.StripesRenderer</sv:value> - </sv:property> - <sv:property sv:name="type" sv:type="String"> - <sv:value>stripes</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>2007-04-12T03:58:33.504+02:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2007-07-23T22:39:14.178+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-08-05T12:09:27.489+02:00</sv:value> - </sv:property> - </sv:node> -</sv:node> Added: magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.renderers.stripes.xml =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.renderers.stripes.xml (rev 0) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.renderers.stripes.xml 2012-03-19 10:31:31 UTC (rev 3827) @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="stripes" 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>26a1d019-e5a3-4efa-a604-445b0816c3e1</sv:value> + </sv:property> + <sv:property sv:name="class" sv:type="String"> + <sv:value>it.openutils.magnoliastripes.StripesRenderer</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="name" sv:type="String"> + <sv:value>stripes</sv:value> + </sv:property> + <sv:property sv:name="renderer" sv:type="String"> + <sv:value>it.openutils.magnoliastripes.StripesRenderer</sv:value> + </sv:property> + <sv:property sv:name="type" sv:type="String"> + <sv:value>stripes</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>2007-04-12T03:58:33.504+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastaction" sv:type="Date"> + <sv:value>2007-07-23T22:39:14.178+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2011-08-05T12:09:27.489+02:00</sv:value> + </sv:property> + </sv:node> +</sv:node> Deleted: magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.template-renderers.stripes.xml =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.template-renderers.stripes.xml 2012-03-19 10:15:38 UTC (rev 3826) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.template-renderers.stripes.xml 2012-03-19 10:31:31 UTC (rev 3827) @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<sv:node sv:name="stripes" 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>42369a0d-1d6c-469b-b17d-dc5171435db0</sv:value> - </sv:property> - <sv:property sv:name="class" sv:type="String"> - <sv:value>it.openutils.magnoliastripes.StripesRenderer</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="name" sv:type="String"> - <sv:value>stripes</sv:value> - </sv:property> - <sv:property sv:name="renderer" sv:type="String"> - <sv:value>it.openutils.magnoliastripes.StripesRenderer</sv:value> - </sv:property> - <sv:property sv:name="type" sv:type="String"> - <sv:value>stripes</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>2007-04-12T03:58:33.504+02:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2007-07-23T22:39:14.178+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2011-08-05T12:09:15.512+02:00</sv:value> - </sv:property> - </sv:node> -</sv:node> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-19 10:15:48
|
Revision: 3826 http://openutils.svn.sourceforge.net/openutils/?rev=3826&view=rev Author: diego_schivo Date: 2012-03-19 10:15:38 +0000 (Mon, 19 Mar 2012) Log Message: ----------- web.xml: ActionResolver.Packages Modified Paths: -------------- magnoliamodules/trunk/magnolia-test-webapp/src/main/webapp/WEB-INF/web.xml Modified: magnoliamodules/trunk/magnolia-test-webapp/src/main/webapp/WEB-INF/web.xml =================================================================== --- magnoliamodules/trunk/magnolia-test-webapp/src/main/webapp/WEB-INF/web.xml 2012-03-19 09:41:41 UTC (rev 3825) +++ magnoliamodules/trunk/magnolia-test-webapp/src/main/webapp/WEB-INF/web.xml 2012-03-19 10:15:38 UTC (rev 3826) @@ -10,7 +10,7 @@ <filter-class>info.magnolia.cms.filters.MgnlMainFilter</filter-class> <init-param> <param-name>ActionResolver.Packages</param-name> - <param-value>net.sourceforge.openutils.mgnlstripes.samples</param-value> + <param-value>it.openutils.magnoliastripes.samples</param-value> </init-param> <init-param> <param-name>ActionResolver.Class</param-name> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-19 09:41:52
|
Revision: 3825 http://openutils.svn.sourceforge.net/openutils/?rev=3825&view=rev Author: diego_schivo Date: 2012-03-19 09:41:41 +0000 (Mon, 19 Mar 2012) Log Message: ----------- config.modules.stripes.templates.pages.samplestripes.xml Added Paths: ----------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.templates.pages.samplestripes.xml Removed Paths: ------------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.templates.samplestripes.xml Added: magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.templates.pages.samplestripes.xml =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.templates.pages.samplestripes.xml (rev 0) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.templates.pages.samplestripes.xml 2012-03-19 09:41:41 UTC (rev 3825) @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="samplestripes" 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:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>c13b60be-8596-4a24-a142-44ba54d90a46</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="renderType" sv:type="String"> + <sv:value>jsp</sv:value> + </sv:property> + <sv:property sv:name="templateScript" sv:type="String"> + <sv:value>/templates/samples-stripes/template.jsp</sv:value> + </sv:property> + <sv:property sv:name="title" sv:type="String"> + <sv:value>Stripes sample template</sv:value> + </sv:property> + <sv:property sv:name="visible" sv:type="String"> + <sv:value>true</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:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2008-09-23T16:56:46.344+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2012-03-19T10:40:33.757+01:00</sv:value> + </sv:property> + </sv:node> +</sv:node> Deleted: magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.templates.samplestripes.xml =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.templates.samplestripes.xml 2012-03-19 09:18:47 UTC (rev 3824) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.templates.samplestripes.xml 2012-03-19 09:41:41 UTC (rev 3825) @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<sv:node sv:name="samplestripes" 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:mixinTypes" sv:type="Name" sv:multiple="true"> - <sv:value>mix:lockable</sv:value> - </sv:property> - <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>c13b60be-8596-4a24-a142-44ba54d90a46</sv:value> - </sv:property> - <sv:property sv:name="jcr:createdBy" sv:type="String"> - <sv:value>admin</sv:value> - </sv:property> - <sv:property sv:name="templatePath" sv:type="String"> - <sv:value>/templates/samples-stripes/template.jsp</sv:value> - </sv:property> - <sv:property sv:name="title" sv:type="String"> - <sv:value>Stripes sample template</sv:value> - </sv:property> - <sv:property sv:name="type" sv:type="String"> - <sv:value>jsp</sv:value> - </sv:property> - <sv:property sv:name="visible" sv:type="String"> - <sv:value>true</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:authorid" sv:type="String"> - <sv:value>superuser</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="Date"> - <sv:value>2008-09-23T16:56:46.344+02:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2012-03-16T11:00:33.134+01:00</sv:value> - </sv:property> - </sv:node> -</sv:node> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-19 09:18:58
|
Revision: 3824 http://openutils.svn.sourceforge.net/openutils/?rev=3824&view=rev Author: diego_schivo Date: 2012-03-19 09:18:47 +0000 (Mon, 19 Mar 2012) Log Message: ----------- StripesConfigurationPage Modified Paths: -------------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/pages/StripesConfigurationPage.java Modified: magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/pages/StripesConfigurationPage.java =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/pages/StripesConfigurationPage.java 2012-03-19 09:03:18 UTC (rev 3823) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/pages/StripesConfigurationPage.java 2012-03-19 09:18:47 UTC (rev 3824) @@ -25,6 +25,10 @@ import info.magnolia.module.admininterface.DialogMVCHandler; import info.magnolia.module.admininterface.InvalidDialogHandlerException; import info.magnolia.module.admininterface.TemplatedMVCHandler; +import info.magnolia.objectfactory.Components; +import info.magnolia.registry.RegistrationException; +import info.magnolia.rendering.template.TemplateDefinition; +import info.magnolia.rendering.template.registry.TemplateDefinitionRegistry; import it.openutils.magnoliastripes.MgnlActionResolver; import java.util.Set; @@ -53,7 +57,7 @@ super(name, request, response); } - public Set<Paragraph> getStripesParagraphs() + public Set<TemplateDefinition> getStripesParagraphs() { return MgnlActionResolver.getParagraphs(); } @@ -67,14 +71,21 @@ "it.openutils.magnoliastripes" }); } - public ParagraphManager getParagraphManager() + public TemplateDefinitionRegistry getTemplateDefinitionRegistry() { - return ParagraphManager.getInstance(); + return Components.getComponent(TemplateDefinitionRegistry.class); } public boolean isDialogConfigured(String paragraphName) { - Paragraph paragraph = getParagraphManager().getParagraphs().get(paragraphName); + TemplateDefinition paragraph = null; + try + { + paragraph = getTemplateDefinitionRegistry().getTemplateDefinition(paragraphName); + } + catch (RegistrationException e) + { + } if (paragraph != null) { String dialogName = paragraph.getDialog(); @@ -98,7 +109,14 @@ public String getDialogPath(String paragraphName) { - Paragraph paragraph = getParagraphManager().getParagraphs().get(paragraphName); + TemplateDefinition paragraph = null; + try + { + paragraph = getTemplateDefinitionRegistry().getTemplateDefinition(paragraphName); + } + catch (RegistrationException e) + { + } if (paragraph != null) { String dialogName = paragraph.getDialog(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-19 09:03:29
|
Revision: 3823 http://openutils.svn.sourceforge.net/openutils/?rev=3823&view=rev Author: diego_schivo Date: 2012-03-19 09:03:18 +0000 (Mon, 19 Mar 2012) Log Message: ----------- StripesRenderer Modified Paths: -------------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesRenderer.java Modified: magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesRenderer.java =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesRenderer.java 2012-03-19 08:58:53 UTC (rev 3822) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesRenderer.java 2012-03-19 09:03:18 UTC (rev 3823) @@ -24,7 +24,9 @@ import info.magnolia.cms.core.NodeData; import info.magnolia.context.MgnlContext; import info.magnolia.context.WebContext; +import info.magnolia.rendering.context.RenderingContext; import info.magnolia.rendering.engine.RenderException; +import info.magnolia.rendering.renderer.JspRenderer; import info.magnolia.rendering.template.RenderableDefinition; import java.io.IOException; @@ -35,6 +37,7 @@ import java.util.Locale; import java.util.Map; +import javax.jcr.Node; import javax.jcr.PathNotFoundException; import javax.jcr.RepositoryException; import javax.servlet.ServletContext; @@ -76,7 +79,7 @@ * @author fgiust * @version $Id$ */ -public class StripesRenderer extends JspTemplateRenderer implements ParagraphRenderer +public class StripesRenderer extends JspRenderer //implements ParagraphRenderer { private StripesDispatcherServlet stripesDispatcherServlet = new StripesDispatcherServlet(); @@ -89,21 +92,9 @@ /** * {@inheritDoc} */ - public void render(Content content, Paragraph paragraph, Writer out) throws RenderException, IOException - { - try - { - render(content, (RenderableDefinition) paragraph, out); - } - finally - { - out.flush(); - } - } - @Override - protected void onRender(Content content, RenderableDefinition definition, Writer out, Map ctx, String templatePath) - throws RenderException + protected void onRender(Node content, RenderableDefinition definition, RenderingContext renderingCtx, + Map<String, Object> ctx, String templateScript) throws RenderException { Map<String, String[]> templateDataMap = contentToMap(getTemplateContent()); @@ -113,7 +104,7 @@ try { - renderCommon(definition.getTemplatePath(), nodeDataMap, out); + renderCommon(definition.getTemplateScript(), nodeDataMap, (Writer) renderingCtx.getOutputProvider().getAppendable()); } catch (IOException e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@op...> - 2012-03-19 09:00:49
|
See <https://hudson.openmindonline.it/job/openutils-bshd5/54/> |
From: <gca...@us...> - 2012-03-19 08:59:04
|
Revision: 3822 http://openutils.svn.sourceforge.net/openutils/?rev=3822&view=rev Author: gcatania Date: 2012-03-19 08:58:53 +0000 (Mon, 19 Mar 2012) Log Message: ----------- BSHD-12 added mechanism to optionally infer reference class from parameterized types, plus unit tests Modified Paths: -------------- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java Added Paths: ----------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOHierarchyTest.java trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java Removed Paths: ------------- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java Modified: trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java =================================================================== --- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2012-03-19 08:46:05 UTC (rev 3821) +++ trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2012-03-19 08:58:53 UTC (rev 3822) @@ -76,10 +76,27 @@ private boolean aopenabled; /** - * Instantiates a new DAO instance + * Instantiates a new DAO instance, will try to infer reference class from parameterized types from the class + * hierarchy */ public HibernateDAOImpl() { + // tries to iterate on class or subclasses until a parameterized type is found, otherwise leaves the superclass + // to be specified by the implementor calling setReferenceClass() + java.lang.reflect.Type genericSuperclass = getClass().getGenericSuperclass(); + while (genericSuperclass != null && !(genericSuperclass instanceof java.lang.reflect.ParameterizedType)) + { + genericSuperclass = ((Class< ? >) genericSuperclass).getGenericSuperclass(); + } + if (genericSuperclass != null) + { + java.lang.reflect.Type[] typeArguments = ((java.lang.reflect.ParameterizedType) genericSuperclass) + .getActualTypeArguments(); + // type arguments is guaranteed to be non-empty since the class is a ParameterizedType + @SuppressWarnings("unchecked") + Class<T> referenceClass = (Class<T>) typeArguments[0]; + setReferenceClass(referenceClass); + } } /** Added: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOHierarchyTest.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOHierarchyTest.java (rev 0) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOHierarchyTest.java 2012-03-19 08:58:53 UTC (rev 3822) @@ -0,0 +1,173 @@ +/** + * + * openutils base Spring-Hibernate DAO (http://www.openmindlab.com/lab/products/bshd5.html) + * + * Copyright(C) 2005-2012, 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; + +import it.openutils.dao.hibernate.HibernateDAOImpl; +import it.openutils.hibernate.test.model.Car; +import it.openutils.hibernate.test.model.Designer; +import it.openutils.hibernate.test.model.Employee; +import it.openutils.hibernate.test.model.Person; + +import org.testng.Assert; +import org.testng.annotations.Test; + + +/** + * @author gcatania + * @version $Id$ + */ +public class HibernateDAOHierarchyTest +{ + + /** + * make the reference class available for testing + */ + private static interface ReferenceClassAvailable + { + + Class< ? > getReferenceClass(); + } + + private static class TestDaoImplParameterizedSimple extends HibernateDAOImpl<Car, Long> + implements + ReferenceClassAvailable + { + + @Override + public Class<Car> getReferenceClass() + { + return super.getReferenceClass(); + } + } + + private static class TestDaoImplParameterizedInheriting extends TestDaoImplParameterizedSimple + { + } + + private static class TestDaoImplParameterizedOverwriting extends HibernateDAOImpl<Person, Long> + implements + ReferenceClassAvailable + { + + private TestDaoImplParameterizedOverwriting() + { + super(); + // cheat with raw types to make the method invocation compile + setReferenceClass((Class) Employee.class); + } + + @Override + public Class<Person> getReferenceClass() + { + return super.getReferenceClass(); + } + } + + @SuppressWarnings("rawtypes") + private static class TestDaoImplRawSimple extends HibernateDAOImpl implements ReferenceClassAvailable + { + + protected TestDaoImplRawSimple() + { + super(); + } + + @SuppressWarnings("unchecked") + protected TestDaoImplRawSimple(Class< ? > referenceClass) + { + super(referenceClass); + } + + @Override + public Class< ? > getReferenceClass() + { + return super.getReferenceClass(); + } + } + + private static class TestDaoImplRawInheriting extends TestDaoImplRawSimple + { + + private TestDaoImplRawInheriting() + { + super(Designer.class); + } + } + + /** + * tests a dao implementation in which the reference class has been inferred from the parameterized types of the + * class itself + */ + @Test + public void testInstantiateParameterizedSimple() + { + assertReferenceClassEquals(new TestDaoImplParameterizedSimple(), Car.class); + } + + /** + * tests a dao implementation in which the reference class has been inferred from the parameterized types of a + * superclass + */ + @Test + public void testInstantiateParameterizedInheriting() + { + assertReferenceClassEquals(new TestDaoImplParameterizedInheriting(), Car.class); + } + + /** + * tests a dao implementation in which the reference class has been inferred from the parameterized types of the + * class itself but overwritten by the implementor by calling setReferenceClass() afterwards + */ + @Test + public void testInstantiateParameterizedOverwriting() + { + assertReferenceClassEquals(new TestDaoImplParameterizedOverwriting(), Employee.class); + } + + /** + * tests the anomalous situation in which reference class has not been set (in production code this dao won't work) + */ + @Test + public void testInstantiateRawSimple() + { + assertReferenceClassEquals(new TestDaoImplRawSimple(), null); + } + + /** + * tests a non-parameterized dao implementation in which the reference class has been set by hand + */ + @Test + public void testInstantiateRawInheriting() + { + assertReferenceClassEquals(new TestDaoImplRawInheriting(), Designer.class); + } + + private static void assertReferenceClassEquals(ReferenceClassAvailable dao, Class< ? > expectedReferenceClass) + { + Assert.assertEquals(dao.getReferenceClass(), expectedReferenceClass); + } + +} Property changes on: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOHierarchyTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Copied: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java (from rev 3816, trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java) =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java (rev 0) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java 2012-03-19 08:58:53 UTC (rev 3822) @@ -0,0 +1,446 @@ +/** + * + * openutils base Spring-Hibernate DAO (http://www.openmindlab.com/lab/products/bshd5.html) + * + * Copyright(C) 2005-2012, 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; + +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; +import it.openutils.hibernate.test.model.CarModel; +import it.openutils.hibernate.test.model.CurrencyAmount; +import it.openutils.hibernate.test.model.Designer; +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; +import java.util.List; + +import org.hibernate.criterion.Example; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests; +import org.testng.Assert; +import org.testng.annotations.Test; + + +/** + * @author gcatania + */ +@ContextConfiguration(locations = "/spring-tests.xml") +public class HibernateDAOPersistenceTest extends AbstractTransactionalTestNGSpringContextTests +{ + + /* + * TODO tests to perform: 1) find filtered with collection with zero, one or more elements 2) find filtered with + * additional criteria 3) filter metadata support 4) find filtered with id 5) find filtered with backref + */ + + @Autowired + private PersonDAO personDAO; + + @Autowired + private CarMakerDAO carMakerDAO; + + @Autowired + private CarDAO carDAO; + + @Autowired + private StickerDAO stickerDAO; + + private static Person alice() + { + FullName fullName = new FullName("Alice", "McBeal"); + Calendar birthDate = new GregorianCalendar(1970, Calendar.MARCH, 7); + Address address = new Address("Long road", 15, "Smalltown", "MI", 14352); + Person p = new Person(); + p.setName(fullName); + p.setBirthDate(birthDate); + p.setFiscalAddress(address); + p.setCurrentAddress(address); + return p; + } + + private static Owner bob() + { + FullName fullName = new FullName("Bob", "Kelso"); + Calendar birthDate = new GregorianCalendar(1950, Calendar.MARCH, 7); + Address address = new Address("Sacred Heart Lane", 3, "Smalltown", "CA", 11243); + Owner o = new Owner(); + o.setName(fullName); + o.setBirthDate(birthDate); + o.setFiscalAddress(address); + o.setCurrentAddress(address); + return o; + } + + private static Owner chuck() + { + FullName fullName = new FullName("Chuck", "Palahniuk"); + Calendar birthDate = new GregorianCalendar(1962, Calendar.FEBRUARY, 21); + Address address = new Address("Awesome Street", 2, "Pasco", "WA", 13121); + Owner p = new Owner(); + p.setName(fullName); + p.setBirthDate(birthDate); + p.setFiscalAddress(address); + p.setCurrentAddress(address); + return p; + } + + 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(); + if (toyotaModels == null) + { + toyotaModels = new ArrayList<CarModel>(); + } + toyotaModels.add(prius); + toyota.setModels(toyotaModels); + return prius; + } + + private static Designer priusDesigner(CarModel prius) + { + FullName fullName = new FullName("Ken", "Shiro"); + Calendar birthDate = new GregorianCalendar(1981, Calendar.OCTOBER, 16); + Address address = new Address("Khan avenue", 6, "Nagato", "TK", 99867); + Designer p = new Designer(); + p.setName(fullName); + p.setBirthDate(birthDate); + p.setFiscalAddress(address); + p.setCurrentAddress(address); + p.setDepartment("design"); + p.setEmployer(prius.getMake()); + p.setDesignedModels(Collections.singleton(prius)); + p.setGrossAnnualSalary(new CurrencyAmount(60000, "YEN")); + p.setHipsterFactor(97); + return p; + } + + private static 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 static 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. + */ + @Test + public void testSaveAndRetrieveBasic() + { + Person person = alice(); + Long savedId = personDAO.save(person); + Assert.assertNotNull(savedId); + Long personId = person.getId(); + Assert.assertEquals(savedId, personId); + personDAO.evict(person); + Person savedPerson = personDAO.get(personId); + Assert.assertEquals(person, savedPerson); + } + + @Test + public void testSaveAndRetrieveWithCascade() + { + CarMaker toyota = toyota(); + CarModel prius = prius(toyota); + + carMakerDAO.save(toyota); + + Designer designer = priusDesigner(prius); + + personDAO.save(designer); + // FIXME evicting breaks the test, there must be something wrong in the hibernate mapping configuration + // personDAO.evict(designer); + + // 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)); + } + + @Test + public void testBasicFind() + { + Person alice = alice(); + personDAO.save(alice); + + Person filter = new Person(); + filter.setName(new FullName(null, "McBeal")); + List<Person> found = personDAO.findFiltered(filter); + + Assert.assertEquals(found.size(), 1, "No persons found."); + Assert.assertEquals(found.get(0), alice); + } + + @Test + public void testFindFiltered() + { + personDAO.save(alice()); + personDAO.save(bob()); + personDAO.save(chuck()); + Person filter = new Person(); + filter.setName(new FullName(null, "Kelso")); + List<Person> found = personDAO.findFiltered(filter); + + Assert.assertEquals(found.size(), 1, "Invalid number of persons found."); + Person actualBob = bob(); + Person expectedBob = found.get(0); + Assert.assertEquals(expectedBob.getName(), actualBob.getName()); + Assert.assertEquals(expectedBob.getCurrentAddress().getStreet(), actualBob.getCurrentAddress().getStreet()); + Assert.assertEquals(expectedBob.getBirthDate(), actualBob.getBirthDate()); + } + + @Test + public void testFindFilteredInheritance() + { + personDAO.save(alice()); + personDAO.save(bob()); + personDAO.save(chuck()); + Person filter = new Person(); + filter.setName(new FullName(null, "Kelso")); + List<Person> found = personDAO.findFiltered(filter); + + Assert.assertEquals(found.size(), 1, "Invalid number of persons found."); + Person expectedBob = found.get(0); + Assert.assertEquals(expectedBob.getClass(), Owner.class, "Inheritanche check failed"); + } + + @Test + public void testExampleBasic() + { + personDAO.save(alice()); + Person outsideFilter = alice(); + outsideFilter.getName().setFamilyName("Mahoney"); + personDAO.save(outsideFilter); + Person filter = new Person(); + filter.setName(new FullName(null, "McBeal")); + List<Person> foundByExample = personDAO.find(Collections.singletonList(Example.create(filter))); + Assert.assertNotNull(foundByExample); + Assert.assertEquals(foundByExample.size(), 1); + Assert.assertEquals(foundByExample.get(0).getName().getFamilyName(), "McBeal"); + + List<Person> found = personDAO.findFiltered(filter); + Assert.assertNotNull(found); + Assert.assertEquals(found.size(), 1); + Assert.assertEquals(found.get(0).getName().getFamilyName(), "McBeal"); + } + + @Test + public void testFindFilteredChild() + { + CarMaker toyota = toyota(); + CarModel prius = prius(toyota); + + Owner bob = bob(); + bobsPrius(bob, prius); + personDAO.save(bob); + + Owner chuck = chuck(); + chucksPrius(chuck, prius); + 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()); + } + + /** + * @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 = bobsPrius(bob, prius); + 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 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() + // { + // Person fifteenYearsOld = fifteenYearsOld(); + // fifteenYearsOld.setWish(new Wish(fifteenYearsOld, "because he's young")); + // personDAO.save(fifteenYearsOld); + // Person another = fifteenYearsOld(); + // another.setWish(new Wish(another, "because he's a nerd")); + // personDAO.save(another); + // + // Person filter = new Person(); + // filter.setWish(new Wish(null, "because he's young")); + // List<Person> foundByExample = personDAO.find(Collections.singletonList(Example.create(filter))); + // Hibernate.initialize(foundByExample); + // Assert.assertNotNull(foundByExample); + // Assert.assertEquals(foundByExample.size(), 2); + // + // List<Person> found = personDAO.findFiltered(filter); + // Hibernate.initialize(found); + // Assert.assertNotNull(found); + // Assert.assertEquals(found.size(), 1); + // Assert.assertEquals(found.get(0).getWish().getReason(), "because he's young"); + // } + +} Property changes on: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOPersistenceTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Deleted: trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java =================================================================== --- trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java 2012-03-19 08:46:05 UTC (rev 3821) +++ trunk/openutils-bshd5/src/test/java/it/openutils/hibernate/test/HibernateDAOTest.java 2012-03-19 08:58:53 UTC (rev 3822) @@ -1,446 +0,0 @@ -/** - * - * openutils base Spring-Hibernate DAO (http://www.openmindlab.com/lab/products/bshd5.html) - * - * Copyright(C) 2005-2012, 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; - -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; -import it.openutils.hibernate.test.model.CarModel; -import it.openutils.hibernate.test.model.CurrencyAmount; -import it.openutils.hibernate.test.model.Designer; -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; -import java.util.List; - -import org.hibernate.criterion.Example; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests; -import org.testng.Assert; -import org.testng.annotations.Test; - - -/** - * @author gcatania - */ -@ContextConfiguration(locations = "/spring-tests.xml") -public class HibernateDAOTest extends AbstractTransactionalTestNGSpringContextTests -{ - - /* - * TODO tests to perform: 1) find filtered with collection with zero, one or more elements 2) find filtered with - * additional criteria 3) filter metadata support 4) find filtered with id 5) find filtered with backref - */ - - @Autowired - private PersonDAO personDAO; - - @Autowired - private CarMakerDAO carMakerDAO; - - @Autowired - private CarDAO carDAO; - - @Autowired - private StickerDAO stickerDAO; - - private static Person alice() - { - FullName fullName = new FullName("Alice", "McBeal"); - Calendar birthDate = new GregorianCalendar(1970, Calendar.MARCH, 7); - Address address = new Address("Long road", 15, "Smalltown", "MI", 14352); - Person p = new Person(); - p.setName(fullName); - p.setBirthDate(birthDate); - p.setFiscalAddress(address); - p.setCurrentAddress(address); - return p; - } - - private static Owner bob() - { - FullName fullName = new FullName("Bob", "Kelso"); - Calendar birthDate = new GregorianCalendar(1950, Calendar.MARCH, 7); - Address address = new Address("Sacred Heart Lane", 3, "Smalltown", "CA", 11243); - Owner o = new Owner(); - o.setName(fullName); - o.setBirthDate(birthDate); - o.setFiscalAddress(address); - o.setCurrentAddress(address); - return o; - } - - private static Owner chuck() - { - FullName fullName = new FullName("Chuck", "Palahniuk"); - Calendar birthDate = new GregorianCalendar(1962, Calendar.FEBRUARY, 21); - Address address = new Address("Awesome Street", 2, "Pasco", "WA", 13121); - Owner p = new Owner(); - p.setName(fullName); - p.setBirthDate(birthDate); - p.setFiscalAddress(address); - p.setCurrentAddress(address); - return p; - } - - 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(); - if (toyotaModels == null) - { - toyotaModels = new ArrayList<CarModel>(); - } - toyotaModels.add(prius); - toyota.setModels(toyotaModels); - return prius; - } - - private static Designer priusDesigner(CarModel prius) - { - FullName fullName = new FullName("Ken", "Shiro"); - Calendar birthDate = new GregorianCalendar(1981, Calendar.OCTOBER, 16); - Address address = new Address("Khan avenue", 6, "Nagato", "TK", 99867); - Designer p = new Designer(); - p.setName(fullName); - p.setBirthDate(birthDate); - p.setFiscalAddress(address); - p.setCurrentAddress(address); - p.setDepartment("design"); - p.setEmployer(prius.getMake()); - p.setDesignedModels(Collections.singleton(prius)); - p.setGrossAnnualSalary(new CurrencyAmount(60000, "YEN")); - p.setHipsterFactor(97); - return p; - } - - private static 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 static 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. - */ - @Test - public void testSaveAndRetrieveBasic() - { - Person person = alice(); - Long savedId = personDAO.save(person); - Assert.assertNotNull(savedId); - Long personId = person.getId(); - Assert.assertEquals(savedId, personId); - personDAO.evict(person); - Person savedPerson = personDAO.get(personId); - Assert.assertEquals(person, savedPerson); - } - - @Test - public void testSaveAndRetrieveWithCascade() - { - CarMaker toyota = toyota(); - CarModel prius = prius(toyota); - - carMakerDAO.save(toyota); - - Designer designer = priusDesigner(prius); - - personDAO.save(designer); - // FIXME evicting breaks the test, there must be something wrong in the hibernate mapping configuration - // personDAO.evict(designer); - - // 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)); - } - - @Test - public void testBasicFind() - { - Person alice = alice(); - personDAO.save(alice); - - Person filter = new Person(); - filter.setName(new FullName(null, "McBeal")); - List<Person> found = personDAO.findFiltered(filter); - - Assert.assertEquals(found.size(), 1, "No persons found."); - Assert.assertEquals(found.get(0), alice); - } - - @Test - public void testFindFiltered() - { - personDAO.save(alice()); - personDAO.save(bob()); - personDAO.save(chuck()); - Person filter = new Person(); - filter.setName(new FullName(null, "Kelso")); - List<Person> found = personDAO.findFiltered(filter); - - Assert.assertEquals(found.size(), 1, "Invalid number of persons found."); - Person actualBob = bob(); - Person expectedBob = found.get(0); - Assert.assertEquals(expectedBob.getName(), actualBob.getName()); - Assert.assertEquals(expectedBob.getCurrentAddress().getStreet(), actualBob.getCurrentAddress().getStreet()); - Assert.assertEquals(expectedBob.getBirthDate(), actualBob.getBirthDate()); - } - - @Test - public void testFindFilteredInheritance() - { - personDAO.save(alice()); - personDAO.save(bob()); - personDAO.save(chuck()); - Person filter = new Person(); - filter.setName(new FullName(null, "Kelso")); - List<Person> found = personDAO.findFiltered(filter); - - Assert.assertEquals(found.size(), 1, "Invalid number of persons found."); - Person expectedBob = found.get(0); - Assert.assertEquals(expectedBob.getClass(), Owner.class, "Inheritanche check failed"); - } - - @Test - public void testExampleBasic() - { - personDAO.save(alice()); - Person outsideFilter = alice(); - outsideFilter.getName().setFamilyName("Mahoney"); - personDAO.save(outsideFilter); - Person filter = new Person(); - filter.setName(new FullName(null, "McBeal")); - List<Person> foundByExample = personDAO.find(Collections.singletonList(Example.create(filter))); - Assert.assertNotNull(foundByExample); - Assert.assertEquals(foundByExample.size(), 1); - Assert.assertEquals(foundByExample.get(0).getName().getFamilyName(), "McBeal"); - - List<Person> found = personDAO.findFiltered(filter); - Assert.assertNotNull(found); - Assert.assertEquals(found.size(), 1); - Assert.assertEquals(found.get(0).getName().getFamilyName(), "McBeal"); - } - - @Test - public void testFindFilteredChild() - { - CarMaker toyota = toyota(); - CarModel prius = prius(toyota); - - Owner bob = bob(); - bobsPrius(bob, prius); - personDAO.save(bob); - - Owner chuck = chuck(); - chucksPrius(chuck, prius); - 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()); - } - - /** - * @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 = bobsPrius(bob, prius); - 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 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() - // { - // Person fifteenYearsOld = fifteenYearsOld(); - // fifteenYearsOld.setWish(new Wish(fifteenYearsOld, "because he's young")); - // personDAO.save(fifteenYearsOld); - // Person another = fifteenYearsOld(); - // another.setWish(new Wish(another, "because he's a nerd")); - // personDAO.save(another); - // - // Person filter = new Person(); - // filter.setWish(new Wish(null, "because he's young")); - // List<Person> foundByExample = personDAO.find(Collections.singletonList(Example.create(filter))); - // Hibernate.initialize(foundByExample); - // Assert.assertNotNull(foundByExample); - // Assert.assertEquals(foundByExample.size(), 2); - // - // List<Person> found = personDAO.findFiltered(filter); - // Hibernate.initialize(found); - // Assert.assertNotNull(found); - // Assert.assertEquals(found.size(), 1); - // Assert.assertEquals(found.get(0).getWish().getReason(), "because he's young"); - // } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-19 08:46:14
|
Revision: 3821 http://openutils.svn.sourceforge.net/openutils/?rev=3821&view=rev Author: diego_schivo Date: 2012-03-19 08:46:05 +0000 (Mon, 19 Mar 2012) Log Message: ----------- header Modified Paths: -------------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/samples/SampleStripesActionBean.java Modified: magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/samples/SampleStripesActionBean.java =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/samples/SampleStripesActionBean.java 2012-03-19 08:38:37 UTC (rev 3820) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/samples/SampleStripesActionBean.java 2012-03-19 08:46:05 UTC (rev 3821) @@ -1,3 +1,22 @@ +/** + * + * Stripes module for Magnolia CMS (http://www.openmindlab.com/lab/products/mgnlstripes.html) + * Copyright(C) 2008-2012, 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 it.openutils.magnoliastripes.samples; import net.sourceforge.stripes.action.ActionBean; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-19 08:38:43
|
Revision: 3820 http://openutils.svn.sourceforge.net/openutils/?rev=3820&view=rev Author: diego_schivo Date: 2012-03-19 08:38:37 +0000 (Mon, 19 Mar 2012) Log Message: ----------- StripesModuleVersionHandler: SamplesExtractionTask Modified Paths: -------------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/StripesModuleVersionHandler.java Modified: magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/StripesModuleVersionHandler.java =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/StripesModuleVersionHandler.java 2012-03-19 08:37:08 UTC (rev 3819) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/StripesModuleVersionHandler.java 2012-03-19 08:38:37 UTC (rev 3820) @@ -20,12 +20,14 @@ package it.openutils.magnoliastripes.setup; import info.magnolia.cms.beans.config.ContentRepository; +import info.magnolia.cms.core.SystemProperty; import info.magnolia.module.DefaultModuleVersionHandler; import info.magnolia.module.InstallContext; import info.magnolia.module.delta.AddMimeMappingTask; import info.magnolia.module.delta.FilterOrderingTask; import info.magnolia.module.delta.Task; import it.openutils.mgnltasks.CreateMissingPropertyTask; +import it.openutils.mgnltasks.SamplesExtractionTask; import java.util.List; @@ -45,6 +47,11 @@ { List<Task> tasks = super.getBasicInstallTasks(installContext); + if (SystemProperty.getBooleanProperty(SystemProperty.MAGNOLIA_BOOTSTRAP_SAMPLES)) + { + tasks.add(new SamplesExtractionTask()); + } + tasks.add(new AddMimeMappingTask("action", "text/plain", "/.resources/file-icons/htm.png")); tasks.add(new CreateMissingPropertyTask( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-19 08:37:17
|
Revision: 3819 http://openutils.svn.sourceforge.net/openutils/?rev=3819&view=rev Author: diego_schivo Date: 2012-03-19 08:37:08 +0000 (Mon, 19 Mar 2012) Log Message: ----------- stripes mgnl-bootstrap-samples Added Paths: ----------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.dialogs.samplestripes.xml magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.templates.samplestripes.xml Added: magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.dialogs.samplestripes.xml =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.dialogs.samplestripes.xml (rev 0) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.dialogs.samplestripes.xml 2012-03-19 08:37:08 UTC (rev 3819) @@ -0,0 +1,142 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="samplestripes" 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>9615cf3a-bb91-4c47-b4ff-c07b6e959bbd</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:Data" sv:type="String"> + <sv:value>MetaData</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="String"> + <sv:value>2004-11-02T15:34:43.213+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastaction" sv:type="Date"> + <sv:value>2008-04-28T23:43:10.557+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2012-03-16T10:59:44.115+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:title" sv:type="String"> + <sv:value/> + </sv:property> + </sv:node> + <sv:node sv:name="tabGeneral"> + <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>83a61116-d736-4707-9be2-63bd03791731</sv:value> + </sv:property> + <sv:property sv:name="controlType" sv:type="String"> + <sv:value>tab</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>General</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> + <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="String"> + <sv:value>2004-11-02T15:34:29.217+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastaction" sv:type="Date"> + <sv:value>2008-06-19T14:49:08.436+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2012-03-16T10:59:44.116+01:00</sv:value> + </sv:property> + </sv:node> + <sv:node sv:name="text"> + <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>db32a2f3-65b0-4413-beee-0ac5fca76d84</sv:value> + </sv:property> + <sv:property sv:name="controlType" sv:type="String"> + <sv:value>edit</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>Text</sv:value> + </sv:property> + <sv:property sv:name="rows" sv:type="String"> + <sv:value>5</sv:value> + </sv:property> + <sv:property sv:name="type" sv:type="String"> + <sv:value>String</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> + <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="String"> + <sv:value>2004-11-02T15:34:29.357+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastaction" sv:type="Date"> + <sv:value>2008-07-07T14:56:33.437+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2012-03-16T10:59:44.116+01:00</sv:value> + </sv:property> + </sv:node> + </sv:node> + </sv:node> +</sv:node> Added: magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.templates.samplestripes.xml =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.templates.samplestripes.xml (rev 0) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap-samples/stripes/config.modules.stripes.templates.samplestripes.xml 2012-03-19 08:37:08 UTC (rev 3819) @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="samplestripes" 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:mixinTypes" sv:type="Name" sv:multiple="true"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>c13b60be-8596-4a24-a142-44ba54d90a46</sv:value> + </sv:property> + <sv:property sv:name="jcr:createdBy" sv:type="String"> + <sv:value>admin</sv:value> + </sv:property> + <sv:property sv:name="templatePath" sv:type="String"> + <sv:value>/templates/samples-stripes/template.jsp</sv:value> + </sv:property> + <sv:property sv:name="title" sv:type="String"> + <sv:value>Stripes sample template</sv:value> + </sv:property> + <sv:property sv:name="type" sv:type="String"> + <sv:value>jsp</sv:value> + </sv:property> + <sv:property sv:name="visible" sv:type="String"> + <sv:value>true</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:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2008-09-23T16:56:46.344+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2012-03-16T11:00:33.134+01:00</sv:value> + </sv:property> + </sv:node> +</sv:node> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-19 08:35:46
|
Revision: 3818 http://openutils.svn.sourceforge.net/openutils/?rev=3818&view=rev Author: diego_schivo Date: 2012-03-19 08:35:35 +0000 (Mon, 19 Mar 2012) Log Message: ----------- samples-stripes jsp Added Paths: ----------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-files/ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-files/templates/ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-files/templates/samples-stripes/ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-files/templates/samples-stripes/paragraph.jsp magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-files/templates/samples-stripes/template.jsp Added: magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-files/templates/samples-stripes/paragraph.jsp =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-files/templates/samples-stripes/paragraph.jsp (rev 0) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-files/templates/samples-stripes/paragraph.jsp 2012-03-19 08:35:35 UTC (rev 3818) @@ -0,0 +1,7 @@ +<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:cms="urn:jsptld:cms-taglib" + xmlns:c="urn:jsptld:http://java.sun.com/jsp/jstl/core" xmlns:fmt="urn:jsptld:http://java.sun.com/jsp/jstl/fmt" + xmlns:fn="urn:jsptld:http://java.sun.com/jsp/jstl/functions" xmlns:cmsu="urn:jsptld:cms-util-taglib" + xmlns:cmsfn="http://www.magnolia.info/tlds/cmsfn-taglib.tld" xmlns:mu="mgnlutils"> + <jsp:directive.page contentType="text/html; charset=UTF-8" session="false" /> + ${actionBean.text} +</jsp:root> \ No newline at end of file Added: magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-files/templates/samples-stripes/template.jsp =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-files/templates/samples-stripes/template.jsp (rev 0) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/resources/mgnl-files/templates/samples-stripes/template.jsp 2012-03-19 08:35:35 UTC (rev 3818) @@ -0,0 +1,26 @@ +<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core" + xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:cms="urn:jsptld:cms-taglib" + xmlns:cmsu="urn:jsptld:cms-util-taglib" xmlns:cmsfn="http://www.magnolia.info/tlds/cmsfn-taglib.tld"> + <jsp:directive.page contentType="text/html; charset=UTF-8" session="false" /> + <jsp:text> + <![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ]]> + </jsp:text> + <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <title>${actpage.title}</title> + <cms:links /> + </head> + <body> + <cms:mainBar dialog="o-page-home" /> + <h1>${actpage.title}</h1> + <div> + <cms:contentNodeIterator contentNodeCollectionName="main"> + <cms:editBar /> + <cms:includeTemplate /> + </cms:contentNodeIterator> + <cms:newBar contentNodeCollectionName="main" paragraph="samplestripes" /> + </div> + </body> + </html> +</jsp:root> \ 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: <die...@us...> - 2012-03-19 08:34:24
|
Revision: 3817 http://openutils.svn.sourceforge.net/openutils/?rev=3817&view=rev Author: diego_schivo Date: 2012-03-19 08:34:15 +0000 (Mon, 19 Mar 2012) Log Message: ----------- SampleStripesActionBean Added Paths: ----------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/samples/ magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/samples/SampleStripesActionBean.java Added: magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/samples/SampleStripesActionBean.java =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/samples/SampleStripesActionBean.java (rev 0) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/samples/SampleStripesActionBean.java 2012-03-19 08:34:15 UTC (rev 3817) @@ -0,0 +1,60 @@ +package it.openutils.magnoliastripes.samples; + +import net.sourceforge.stripes.action.ActionBean; +import net.sourceforge.stripes.action.ActionBeanContext; +import net.sourceforge.stripes.action.DefaultHandler; +import net.sourceforge.stripes.action.ForwardResolution; +import net.sourceforge.stripes.action.Resolution; + + +/** + * @author diego + * @version $Id: $ + */ +public class SampleStripesActionBean implements ActionBean +{ + + private ActionBeanContext context; + + private String text; + + /** + * {@inheritDoc} + */ + public void setContext(ActionBeanContext context) + { + this.context = context; + } + + /** + * {@inheritDoc} + */ + public ActionBeanContext getContext() + { + return context; + } + + /** + * Returns the text. + * @return the text + */ + public String getText() + { + return text; + } + + /** + * Sets the text. + * @param text the text to set + */ + public void setText(String text) + { + this.text = text; + } + + @DefaultHandler + public Resolution show() + { + return new ForwardResolution("/templates/samples-stripes/paragraph.jsp"); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3816 http://openutils.svn.sourceforge.net/openutils/?rev=3816&view=rev Author: diego_schivo Date: 2012-03-16 14:31:29 +0000 (Fri, 16 Mar 2012) Log Message: ----------- MEDIA-278 The first tab is not displayed in a LayerDialogMVC Modified Paths: -------------- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/dialog/LayerDialog.java Modified: magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/dialog/LayerDialog.java =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/dialog/LayerDialog.java 2012-03-16 14:19:26 UTC (rev 3815) +++ magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/dialog/LayerDialog.java 2012-03-16 14:31:29 UTC (rev 3816) @@ -20,6 +20,8 @@ package net.sourceforge.openutils.mgnlmedia.media.dialog; import info.magnolia.cms.gui.control.Button; +import info.magnolia.cms.gui.control.ButtonSet; +import info.magnolia.cms.gui.control.ControlImpl; import info.magnolia.cms.gui.dialog.Dialog; import info.magnolia.cms.gui.misc.CssConstants; import info.magnolia.cms.gui.misc.Sources; @@ -94,6 +96,7 @@ + this.getConfigValue("height", DIALOGSIZE_NORMAL_HEIGHT) //$NON-NLS-1$ + ");\n"); //$NON-NLS-1$ // MEDIA-278 + out.write("mgnlDialogResizeTabs('" + getId() + "');"); //$NON-NLS-1$ //$NON-NLS-2$ out.write("mgnlDialogShiftTab('" + getId() + "',false,0);\n"); //$NON-NLS-1$ //$NON-NLS-2$ out.write("});"); out.write("</script>\n"); //$NON-NLS-1$ @@ -102,4 +105,34 @@ this.drawCssSources(out); } + /** + * {@inheritDoc} + */ + @Override + protected void drawHtmlPostSubsTabSet(Writer out) throws IOException + { + // TabSet stuff + String id = this.getId(); + out.write("<div class=\"" + CssConstants.CSSCLASS_TABSETBUTTONBAR + "\">\n"); //$NON-NLS-1$ //$NON-NLS-2$ + out.write("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td class=\"" //$NON-NLS-1$ + + CssConstants.CSSCLASS_TABSETBUTTONBAR + + "\">"); //$NON-NLS-1$ + if (this.getOptions().size() != 0) { + ButtonSet control = new ButtonSet(); + ((Button) this.getOptions().get(0)).setState(ControlImpl.BUTTONSTATE_PUSHED); + control.setButtons(this.getOptions()); + control.setName(this.getId()); + control.setSaveInfo(false); + control.setButtonType(ControlImpl.BUTTONTYPE_PUSHBUTTON); + out.write(control.getHtml()); + } + out.write("</td></tr></table>\n</div>\n"); //$NON-NLS-1$ + // MEDIA-278 + // out.write("<script type=\"text/javascript\">"); //$NON-NLS-1$ + // out.write("mgnlDialogResizeTabs('" + id + "');"); //$NON-NLS-1$ //$NON-NLS-2$ + // out.write("mgnlDialogShiftTab('" + id + "',false,0)"); //$NON-NLS-1$ //$NON-NLS-2$ + // out.write("</script>\n"); //$NON-NLS-1$ + // end TabSet stuff + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3815 http://openutils.svn.sourceforge.net/openutils/?rev=3815&view=rev Author: diego_schivo Date: 2012-03-16 14:19:26 +0000 (Fri, 16 Mar 2012) Log Message: ----------- MEDIA-278 The first tab is not displayed in a LayerDialogMVC Modified Paths: -------------- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/dialog/LayerDialog.java Modified: magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/dialog/LayerDialog.java =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/dialog/LayerDialog.java 2012-03-16 13:35:49 UTC (rev 3814) +++ magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/dialog/LayerDialog.java 2012-03-16 14:19:26 UTC (rev 3815) @@ -82,6 +82,8 @@ out.write(new Sources(this.getRequest().getContextPath()).getHtmlCss()); out.write("<script type=\"text/javascript\">\n"); //$NON-NLS-1$ + // MAGNOLIA-3846 + out.write("mgnl.util.DHTMLUtil.addOnLoad(function(){\n"); // out.write("window.onresize = eventHandlerOnResize;\n"); //$NON-NLS-1$ out.write("parent.setLayerTitle('" + this.getMessage(this.getConfigValue("label", MessagesManager.get("dialog.editTitle"))) @@ -91,6 +93,9 @@ + "," //$NON-NLS-1$ + this.getConfigValue("height", DIALOGSIZE_NORMAL_HEIGHT) //$NON-NLS-1$ + ");\n"); //$NON-NLS-1$ + // MEDIA-278 + out.write("mgnlDialogShiftTab('" + getId() + "',false,0);\n"); //$NON-NLS-1$ //$NON-NLS-2$ + out.write("});"); out.write("</script>\n"); //$NON-NLS-1$ this.drawJavascriptSources(out); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-16 13:36:00
|
Revision: 3814 http://openutils.svn.sourceforge.net/openutils/?rev=3814&view=rev Author: diego_schivo Date: 2012-03-16 13:35:49 +0000 (Fri, 16 Mar 2012) Log Message: ----------- magnolia.version=4.4.6 Modified Paths: -------------- magnoliamodules/branches/magnolia44/magnolia-test-webapp/pom.xml magnoliamodules/branches/magnolia44/openutils-mgnlmedia/pom.xml Modified: magnoliamodules/branches/magnolia44/magnolia-test-webapp/pom.xml =================================================================== --- magnoliamodules/branches/magnolia44/magnolia-test-webapp/pom.xml 2012-03-16 13:19:31 UTC (rev 3813) +++ magnoliamodules/branches/magnolia44/magnolia-test-webapp/pom.xml 2012-03-16 13:35:49 UTC (rev 3814) @@ -277,7 +277,7 @@ </dependencies> </dependencyManagement> <properties> - <magnolia.version>4.4.5</magnolia.version> + <magnolia.version>4.4.6</magnolia.version> <stk.version>1.3.1</stk.version> <jackrabbit.version>2.2.5</jackrabbit.version> </properties> Modified: magnoliamodules/branches/magnolia44/openutils-mgnlmedia/pom.xml =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/pom.xml 2012-03-16 13:19:31 UTC (rev 3813) +++ magnoliamodules/branches/magnolia44/openutils-mgnlmedia/pom.xml 2012-03-16 13:35:49 UTC (rev 3814) @@ -249,6 +249,6 @@ </dependency> </dependencies> <properties> - <magnolia.version>4.4.4</magnolia.version> + <magnolia.version>4.4.6</magnolia.version> </properties> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-16 13:19:37
|
Revision: 3813 http://openutils.svn.sourceforge.net/openutils/?rev=3813&view=rev Author: diego_schivo Date: 2012-03-16 13:19:31 +0000 (Fri, 16 Mar 2012) Log Message: ----------- magnolia-test-webapp pom.xml Modified Paths: -------------- magnoliamodules/branches/magnolia44/magnolia-test-webapp/pom.xml Modified: magnoliamodules/branches/magnolia44/magnolia-test-webapp/pom.xml =================================================================== --- magnoliamodules/branches/magnolia44/magnolia-test-webapp/pom.xml 2012-03-16 11:21:07 UTC (rev 3812) +++ magnoliamodules/branches/magnolia44/magnolia-test-webapp/pom.xml 2012-03-16 13:19:31 UTC (rev 3813) @@ -137,7 +137,7 @@ <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-mgnlmedia</artifactId> - <version>4.4.3-SNAPSHOT</version> + <version>4.5.1-SNAPSHOT</version> </dependency> <dependency> <groupId>net.sourceforge.openutils</groupId> @@ -279,7 +279,7 @@ <properties> <magnolia.version>4.4.5</magnolia.version> <stk.version>1.3.1</stk.version> - <jackrabbit.version>2.3.3</jackrabbit.version> + <jackrabbit.version>2.2.5</jackrabbit.version> </properties> <build> <plugins> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3812 http://openutils.svn.sourceforge.net/openutils/?rev=3812&view=rev Author: diego_schivo Date: 2012-03-16 11:21:07 +0000 (Fri, 16 Mar 2012) Log Message: ----------- MEDIA-279 MediaEl.module().getLocks().nextLock() Modified Paths: -------------- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java Modified: magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java 2012-03-16 11:19:32 UTC (rev 3811) +++ magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java 2012-03-16 11:21:07 UTC (rev 3812) @@ -66,6 +66,7 @@ import net.sourceforge.openutils.mgnlmedia.media.configuration.MediaTypeConfiguration; import net.sourceforge.openutils.mgnlmedia.media.lifecycle.MediaModule; import net.sourceforge.openutils.mgnlmedia.media.processors.ImagePostProcessor; +import net.sourceforge.openutils.mgnlmedia.media.tags.el.MediaEl; import net.sourceforge.openutils.mgnlmedia.media.types.impl.BaseTypeHandler; import org.apache.commons.io.IOUtils; @@ -124,13 +125,6 @@ private static int currentWorkingThreads = 0; - private static LockUtils locks = new LockUtils(4); - - public static void setMediaThreads(int mediaThreads) - { - locks = new LockUtils(mediaThreads); - } - static { sdf = new SimpleDateFormat(); @@ -977,7 +971,7 @@ params.put("skipRendering", "true"); } - synchronized (locks.nextLock()) + synchronized (MediaEl.module().getLocks().nextLock()) { currentWorkingThreads++; if (log.isDebugEnabled()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3811 http://openutils.svn.sourceforge.net/openutils/?rev=3811&view=rev Author: diego_schivo Date: 2012-03-16 11:19:32 +0000 (Fri, 16 Mar 2012) Log Message: ----------- MEDIA-279 MediaModule: maxConcurrentThreads Modified Paths: -------------- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lifecycle/MediaModule.java Modified: magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lifecycle/MediaModule.java =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lifecycle/MediaModule.java 2012-03-16 11:10:27 UTC (rev 3810) +++ magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lifecycle/MediaModule.java 2012-03-16 11:19:32 UTC (rev 3811) @@ -33,6 +33,7 @@ import net.sourceforge.openutils.mgnlmedia.media.configuration.MediaConfigurationManager; import net.sourceforge.openutils.mgnlmedia.media.configuration.MediaTypeConfiguration; import net.sourceforge.openutils.mgnlmedia.media.configuration.MediaUsedInManager; +import net.sourceforge.openutils.mgnlmedia.media.utils.LockUtils; import net.sourceforge.openutils.mgnlmedia.media.zip.ZipImporter; import net.sourceforge.openutils.mgnlmedia.playlist.pages.PlaylistLink; import net.sourceforge.openutils.mgnlmedia.playlist.pages.PlaylistTrackExtensionContributor; @@ -80,6 +81,10 @@ private boolean lazyResolutionCreation; + private int maxConcurrentThreads = 4; + + private LockUtils locks = new LockUtils(4); + /** * Constructor */ @@ -270,7 +275,6 @@ this.playlistTrackExtensionContributors.add(contributor); } - /** * Returns the playlistLinks. * @return the playlistLinks @@ -279,7 +283,7 @@ { return playlistLinks; } - + /** * Sets the playlistLinks. * @param playlistLinks the playlistLinks to set @@ -288,7 +292,7 @@ { this.playlistLinks = playlistLinks; } - + public void addPlaylistLink(PlaylistLink playlistLink) { this.playlistLinks.add(playlistLink); @@ -311,4 +315,32 @@ { this.lazyResolutionCreation = lazyResolutionCreation; } + + /** + * Returns the maxConcurrentThreads. + * @return the maxConcurrentThreads + */ + public int getMaxConcurrentThreads() + { + return maxConcurrentThreads; + } + + /** + * Sets the maxConcurrentThreads. + * @param maxConcurrentThreads the maxConcurrentThreads to set + */ + public void setMaxConcurrentThreads(int maxConcurrentThreads) + { + this.maxConcurrentThreads = maxConcurrentThreads; + locks = new LockUtils(maxConcurrentThreads); + } + + /** + * Returns the locks. + * @return the locks + */ + public LockUtils getLocks() + { + return locks; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3810 http://openutils.svn.sourceforge.net/openutils/?rev=3810&view=rev Author: diego_schivo Date: 2012-03-16 11:10:27 +0000 (Fri, 16 Mar 2012) Log Message: ----------- MEDIA-279 ImageUtils Modified Paths: -------------- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java Modified: magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java 2012-03-16 10:58:18 UTC (rev 3809) +++ magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java 2012-03-16 11:10:27 UTC (rev 3810) @@ -57,9 +57,9 @@ import javax.imageio.ImageWriteParam; import javax.imageio.ImageWriter; import javax.imageio.stream.ImageOutputStream; +import javax.jcr.Node; import javax.jcr.PropertyType; import javax.jcr.RepositoryException; -import javax.jcr.lock.Lock; import net.sourceforge.openutils.mgnlmedia.media.configuration.ImageProcessorsManager; import net.sourceforge.openutils.mgnlmedia.media.configuration.MediaConfigurationManager; @@ -72,6 +72,7 @@ import org.apache.commons.lang.ClassUtils; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.math.NumberUtils; +import org.apache.jackrabbit.util.Locked; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -121,6 +122,15 @@ private static final String[] extensions = new String[]{"jpg", "jpeg", "gif", "png", "ico" }; + private static int currentWorkingThreads = 0; + + private static LockUtils locks = new LockUtils(4); + + public static void setMediaThreads(int mediaThreads) + { + locks = new LockUtils(mediaThreads); + } + static { sdf = new SimpleDateFormat(); @@ -512,8 +522,9 @@ * @throws RepositoryException exception in jcr operations * @throws IOException exception converting image to jpg */ - public static NodeData saveResolution(BufferedImage image, Content saveTo, String name, String extension, - float quality, boolean forceProgressive) throws RepositoryException, IOException + public static NodeData saveResolution(final BufferedImage image, final Content saveTo, final String name, + final String extension, final float quality, final boolean forceProgressive) throws RepositoryException, + IOException { Content resolutions = getResolutionsNode(saveTo); @@ -530,87 +541,129 @@ resolution = "res-" + image.getWidth() + "x" + image.getHeight(); } - String originalRes = resolution; - resolution = getResolutionPath(resolution); + final String resolutionNodeName = getResolutionPath(resolution); + final Content resolutionsFinal = resolutions; - // max wait 5 secs - Lock lock = resolutions.lock(false, true, 5000); + Node resolutionsJcrNode = resolutions.getJCRNode(); + Object ret; try { - - if (resolutions.hasNodeData(resolution)) + ret = new Locked() { - NodeData nd = resolutions.getNodeData(resolution); - nd.delete(); - resolutions.save(); - } - // don't remove deprecated method call, needed for magnolia 4.0 compatibility - final NodeData nd = resolutions.createNodeData(resolution, PropertyType.BINARY); - final PipedInputStream stream = new PipedInputStream(); - PipedOutputStream outputstream = new PipedOutputStream(stream); + @Override + protected Object run(Node resolutionsJcrNode) throws RepositoryException + { + NodeData ndtemp; + boolean existing = false; + if (resolutionsFinal.hasNodeData(resolutionNodeName)) + { + ndtemp = resolutionsFinal.getNodeData(resolutionNodeName); + existing = true; + } + else + { + // don't remove deprecated method call, needed for magnolia 4.0 compatibility + ndtemp = resolutionsFinal.createNodeData(resolutionNodeName, PropertyType.BINARY); + } + log.debug("setting value to {}", ndtemp.getHandle()); - log.debug("setting value to {}", nd.getHandle()); + final NodeData nd = ndtemp; + final PipedInputStream stream = new PipedInputStream(); + PipedOutputStream outputstream = null; + Thread t = null; + long count = 0; - Thread t = new Thread(new Runnable() - { - - /** - * {@inheritDoc} - */ - public void run() - { try { - nd.setValue(stream); + outputstream = new PipedOutputStream(stream); + t = new Thread(new Runnable() + { + + /** + * {@inheritDoc} + */ + public void run() + { + try + { + nd.setValue(stream); + } + catch (RepositoryException e) + { + log.error(e.getMessage(), e); + } + } + + }); + t.start(); + + count = getStream(image, extension, quality, forceProgressive, outputstream); } - catch (RepositoryException e) + catch (IOException e) { // TODO Auto-generated catch block - log.error(e.getMessage(), e); + e.printStackTrace(); } - } - }); - t.start(); + IOUtils.closeQuietly(outputstream); + try + { + t.join(); + } + catch (InterruptedException e) + { + log.warn(e.getMessage(), e); + } - long count = getStream(image, extension, quality, forceProgressive, outputstream); - IOUtils.closeQuietly(outputstream); - try - { - t.join(); - } - catch (InterruptedException e) - { - log.warn(e.getMessage(), e); - } + IOUtils.closeQuietly(stream); - IOUtils.closeQuietly(stream); + String mimetype = "image/" + extension; + if ("jpg".equals(extension)) + { + mimetype = "image/jpeg"; + } + nd.setAttribute(ImageUtils.RESOLUTION_PROPERTY, resolutionNodeName); + nd.setAttribute(FileProperties.PROPERTY_EXTENSION, extension); + nd.setAttribute(FileProperties.PROPERTY_FILENAME, saveTo.getName()); + nd.setAttribute(FileProperties.PROPERTY_CONTENTTYPE, mimetype); + nd.setAttribute( + FileProperties.PROPERTY_LASTMODIFIED, + GregorianCalendar.getInstance(TimeZone.getDefault())); + nd.setAttribute(FileProperties.PROPERTY_WIDTH, "" + image.getWidth()); + nd.setAttribute(FileProperties.PROPERTY_HEIGHT, "" + image.getHeight()); - String mimetype = "image/" + extension; - if ("jpg".equals(extension)) - { - mimetype = "image/jpeg"; - } - nd.setAttribute(ImageUtils.RESOLUTION_PROPERTY, originalRes); - nd.setAttribute(FileProperties.PROPERTY_EXTENSION, extension); - nd.setAttribute(FileProperties.PROPERTY_FILENAME, saveTo.getName()); - nd.setAttribute(FileProperties.PROPERTY_CONTENTTYPE, mimetype); - nd.setAttribute(FileProperties.PROPERTY_LASTMODIFIED, GregorianCalendar.getInstance(TimeZone.getDefault())); - nd.setAttribute(FileProperties.PROPERTY_WIDTH, "" + image.getWidth()); - nd.setAttribute(FileProperties.PROPERTY_HEIGHT, "" + image.getHeight()); + nd.setAttribute(FileProperties.PROPERTY_SIZE, "" + count); - nd.setAttribute(FileProperties.PROPERTY_SIZE, "" + count); + if (existing) + { + nd.save(); + } + else + { + resolutionsFinal.save(); + } - resolutions.save(); - - return nd; + return nd; + } + }.with(resolutionsJcrNode, false, 5000); } - finally + catch (InterruptedException e) { - resolutions.unlock(); + MgnlContext.getHierarchyManager("media").refresh(false); + ret = Locked.TIMED_OUT; } + if (ret == Locked.TIMED_OUT) + { + // do whatever you think is appropriate in this case + return null; + } + else + { + // get the value + return (NodeData) ret; + } } @@ -793,7 +846,7 @@ public static boolean checkOrCreateResolution(final Content media, final String resolutionTarget, String nodeDataName, final boolean lazy) - { + { Content resolutions = getResolutionsNode(media); @@ -915,23 +968,37 @@ outputextension = "jpg"; } - BufferedImage original = createBufferedImage(image); + BufferedImage original = null; + BufferedImage img = null; + Map<String, String> params = parseParameters(resolutionstring); - Map<String, String> params = parseParameters(resolutionstring); if (lazy) { params.put("skipRendering", "true"); } - BufferedImage img; - try + synchronized (locks.nextLock()) { - img = ImageUtils.getImageForResolution(original, resolutionstring, params); + currentWorkingThreads++; + if (log.isDebugEnabled()) + { + log.debug("Current working resizing thread: {}", currentWorkingThreads); + } + original = createBufferedImage(image); + + try + { + img = ImageUtils.getImageForResolution(original, resolutionstring, params); + } + catch (IllegalArgumentException e) + { + throw new RuntimeException(e); + } + finally + { + currentWorkingThreads--; + } } - catch (IllegalArgumentException e) - { - throw new RuntimeException(e); - } try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3809 http://openutils.svn.sourceforge.net/openutils/?rev=3809&view=rev Author: diego_schivo Date: 2012-03-16 10:58:18 +0000 (Fri, 16 Mar 2012) Log Message: ----------- MEDIA-279 LockUtils Added Paths: ----------- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/LockUtils.java Added: magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/LockUtils.java =================================================================== --- magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/LockUtils.java (rev 0) +++ magnoliamodules/branches/magnolia44/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/LockUtils.java 2012-03-16 10:58:18 UTC (rev 3809) @@ -0,0 +1,74 @@ +/** + * + * SimpleMedia Module for Magnolia CMS (http://www.openmindlab.com/lab/products/media.html) + * Copyright(C) 2008-2012, 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.mgnlmedia.media.utils; + +import java.util.ArrayList; +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * @author molaschi + * @version $Id: LockUtils.java 7734 2012-01-25 22:02:24Z manuel $ + */ +public class LockUtils +{ + + private Logger log = LoggerFactory.getLogger(LockUtils.class); + + private Object synchObject = new Object(); + + private List<Object> locks = null; + + private int actualLock = 0; + + public LockUtils(int maxThreads) + { + locks = new ArrayList<Object>(maxThreads); + for (int t = 0; t < maxThreads; t++) + { + locks.add(new Object()); + } + } + + public Object nextLock() + { + synchronized (synchObject) + { + if (locks != null && locks.size() > 0) + { + Object ret = locks.get(actualLock); + if (log.isDebugEnabled()) + { + log.debug("Returning lock n. {}, id {}", actualLock, ret.toString()); + } + actualLock++; + if (actualLock >= locks.size()) + { + actualLock = 0; + } + return ret; + } + return new Object(); + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-16 10:41:47
|
Revision: 3808 http://openutils.svn.sourceforge.net/openutils/?rev=3808&view=rev Author: diego_schivo Date: 2012-03-16 10:41:38 +0000 (Fri, 16 Mar 2012) Log Message: ----------- pom.xml Added Paths: ----------- magnoliamodules/branches/magnolia44/pom.xml Copied: magnoliamodules/branches/magnolia44/pom.xml (from rev 3784, magnoliamodules/trunk/pom.xml) =================================================================== --- magnoliamodules/branches/magnolia44/pom.xml (rev 0) +++ magnoliamodules/branches/magnolia44/pom.xml 2012-03-16 10:41:38 UTC (rev 3808) @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd "> + <modelVersion>4.0.0</modelVersion> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <packaging>pom</packaging> + <version>12-SNAPSHOT</version> + <name>openutils</name> + <description>Reactor pom, only to do an eclipse:eclipse for all the projects. Not to be released</description> + <build> + <plugins> + <plugin> + <artifactId>maven-eclipse-plugin</artifactId> + <version>2.9</version> + </plugin> + </plugins> + </build> + <modules> + <module>openutils-mgnlstripes</module> + <module>openutils-mgnltasks</module> + <module>openutils-mgnlbootstrapsync</module> + <module>openutils-mgnlext</module> + <module>openutils-mgnlcontrols</module> + <module>openutils-mgnlmessages</module> + <module>openutils-mgnlcache</module> + <module>openutils-mgnlcas</module> + <module>openutils-mgnlgroovy</module> + <module>openutils-mgnlstruts11</module> + <module>openutils-mgnlmedia</module> + <module>openutils-mgnlcriteria</module> + <module>openutils-mgnlrepoutils</module> + <module>openutils-mgnlutils</module> + <module>openutils-mgnltagcloud</module> + <module>openutils-mgnlrules</module> + <module>openutils-mgnlcontextmenu</module> + <module>openutils-mgnllms</module> + <module>openutils-mgnlmobile</module> + <module>openutils-mgnlmail</module> + <module>magnolia-test-webapp</module> + </modules> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-15 11:21:30
|
Revision: 3807 http://openutils.svn.sourceforge.net/openutils/?rev=3807&view=rev Author: diego_schivo Date: 2012-03-15 11:21:19 +0000 (Thu, 15 Mar 2012) Log Message: ----------- MgnlActionResolver Modified Paths: -------------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java Modified: magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java 2012-03-15 11:07:59 UTC (rev 3806) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java 2012-03-15 11:21:19 UTC (rev 3807) @@ -19,6 +19,12 @@ package it.openutils.magnoliastripes; +import info.magnolia.objectfactory.Components; +import info.magnolia.registry.RegistrationException; +import info.magnolia.rendering.template.TemplateDefinition; +import info.magnolia.rendering.template.configured.ConfiguredTemplateDefinition; +import info.magnolia.rendering.template.registry.TemplateDefinitionProvider; +import info.magnolia.rendering.template.registry.TemplateDefinitionRegistry; import it.openutils.magnoliastripes.annotations.Dialog; import java.util.HashSet; @@ -49,7 +55,7 @@ /** * Configured Stripes paragraphs. */ - private static Set<Paragraph> paragraphs = new HashSet<Paragraph>(); + private static Set<TemplateDefinition> paragraphs = new HashSet<TemplateDefinition>(); /** * {@inheritDoc} @@ -120,31 +126,57 @@ */ private void collectStripesParagraphs(String paragraphName, String dialogName, String binding) { - Paragraph paragraph = new Paragraph(); + final ConfiguredTemplateDefinition paragraph = new ConfiguredTemplateDefinition(); paragraph.setName(paragraphName); paragraph.setTitle("paragraph." + paragraphName + ".title"); paragraph.setDescription("paragraph." + paragraphName + ".description"); paragraph.setDialog(dialogName); - paragraph.setTemplatePath(binding); - paragraph.setType("stripes"); + paragraph.setTemplateScript(binding); + paragraph.setRenderType("stripes"); paragraph.setI18nBasename(StripesModule.getInstance().getI18nbasename()); paragraphs.add(paragraph); log.info("Registering stripes paragraph {} with dialog {}", paragraph.getName(), paragraph.getDialog()); //$NON-NLS-1$ /$NON-NLS-2$ - ParagraphManager.getInstance().getParagraphs().put(paragraph.getName(), paragraph); + // ParagraphManager.getInstance().getParagraphs().put(paragraph.getName(), paragraph); + Components.getComponent(TemplateDefinitionRegistry.class).register(new TemplateDefinitionProvider() + { + + public TemplateDefinition getTemplateDefinition() throws RegistrationException + { + return paragraph; + } + + public String getId() + { + return paragraph.getName(); + } + }); } public static void registerParagraphs() { - for (Paragraph paragraph : paragraphs) + for (final TemplateDefinition paragraph : paragraphs) { log.info("Registering stripes paragraph {}", paragraph.getName()); //$NON-NLS-1$ - ParagraphManager.getInstance().getParagraphs().put(paragraph.getName(), paragraph); + // ParagraphManager.getInstance().getParagraphs().put(paragraph.getName(), paragraph); + Components.getComponent(TemplateDefinitionRegistry.class).register(new TemplateDefinitionProvider() + { + + public TemplateDefinition getTemplateDefinition() throws RegistrationException + { + return paragraph; + } + + public String getId() + { + return paragraph.getName(); + } + }); } } - public static Set<Paragraph> getParagraphs() + public static Set<TemplateDefinition> getParagraphs() { return paragraphs; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-15 11:08:09
|
Revision: 3806 http://openutils.svn.sourceforge.net/openutils/?rev=3806&view=rev Author: diego_schivo Date: 2012-03-15 11:07:59 +0000 (Thu, 15 Mar 2012) Log Message: ----------- StripesMagnoliaFilter: JCRSessionStrategy Modified Paths: -------------- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesMagnoliaFilter.java Modified: magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesMagnoliaFilter.java =================================================================== --- magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesMagnoliaFilter.java 2012-03-15 11:05:45 UTC (rev 3805) +++ magnoliamodules/trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesMagnoliaFilter.java 2012-03-15 11:07:59 UTC (rev 3806) @@ -26,6 +26,7 @@ import info.magnolia.cms.filters.WebContainerResources; import info.magnolia.cms.util.RequestHeaderUtil; import info.magnolia.cms.util.ServletUtils; +import info.magnolia.context.JCRSessionStrategy; import info.magnolia.context.MgnlContext; import info.magnolia.context.WebContext; import info.magnolia.context.WebContextImpl; @@ -126,7 +127,7 @@ { // be sure that the request wrapper gets setted in mgnlcontext too WebContext webContext = (WebContext) MgnlContext.getInstance(); - RepositoryAcquiringStrategy strategy = ((WebContextImpl) webContext).getRepositoryStrategy(); + JCRSessionStrategy strategy = ((WebContextImpl) webContext).getRepositoryStrategy(); webContext.init(servletRequest, webContext.getResponse(), webContext.getServletContext()); ((WebContextImpl) webContext).setRepositoryStrategy(strategy); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <die...@us...> - 2012-03-15 11:05:56
|
Revision: 3805 http://openutils.svn.sourceforge.net/openutils/?rev=3805&view=rev Author: diego_schivo Date: 2012-03-15 11:05:45 +0000 (Thu, 15 Mar 2012) Log Message: ----------- openutils-mgnlrules: magnolia-templating-compatibility dependency Modified Paths: -------------- magnoliamodules/trunk/openutils-mgnlrules/pom.xml magnoliamodules/trunk/openutils-mgnlrules/src/main/java/net/sourceforge/openutils/mgnlrules/samples/render/ConditionalRenderer.java Modified: magnoliamodules/trunk/openutils-mgnlrules/pom.xml =================================================================== --- magnoliamodules/trunk/openutils-mgnlrules/pom.xml 2012-03-15 10:48:02 UTC (rev 3804) +++ magnoliamodules/trunk/openutils-mgnlrules/pom.xml 2012-03-15 11:05:45 UTC (rev 3805) @@ -98,6 +98,11 @@ </exclusions> </dependency> <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-templating-compatibility</artifactId> + <version>${magnolia.version}</version> + </dependency> + <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-mgnlcontrols</artifactId> <version>5.0.0-SNAPSHOT</version> Modified: magnoliamodules/trunk/openutils-mgnlrules/src/main/java/net/sourceforge/openutils/mgnlrules/samples/render/ConditionalRenderer.java =================================================================== --- magnoliamodules/trunk/openutils-mgnlrules/src/main/java/net/sourceforge/openutils/mgnlrules/samples/render/ConditionalRenderer.java 2012-03-15 10:48:02 UTC (rev 3804) +++ magnoliamodules/trunk/openutils-mgnlrules/src/main/java/net/sourceforge/openutils/mgnlrules/samples/render/ConditionalRenderer.java 2012-03-15 11:05:45 UTC (rev 3805) @@ -21,8 +21,9 @@ import info.magnolia.cms.core.Content; import info.magnolia.cms.util.NodeDataUtil; -import info.magnolia.rendering.engine.RenderException; -import info.magnolia.rendering.template.RenderableDefinition; +import info.magnolia.module.templating.RenderException; +import info.magnolia.module.templating.RenderableDefinition; +import info.magnolia.module.templating.paragraphs.JspParagraphRenderer; import java.io.Writer; import java.util.Map; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 3804 http://openutils.svn.sourceforge.net/openutils/?rev=3804&view=rev Author: diego_schivo Date: 2012-03-15 10:48:02 +0000 (Thu, 15 Mar 2012) Log Message: ----------- RenderingServingZipFilter Modified Paths: -------------- magnoliamodules/trunk/openutils-mgnllms/src/main/java/net/sourceforge/openutils/mgnllms/filters/RenderingServingZipFilter.java Modified: magnoliamodules/trunk/openutils-mgnllms/src/main/java/net/sourceforge/openutils/mgnllms/filters/RenderingServingZipFilter.java =================================================================== --- magnoliamodules/trunk/openutils-mgnllms/src/main/java/net/sourceforge/openutils/mgnllms/filters/RenderingServingZipFilter.java 2012-03-15 10:46:43 UTC (rev 3803) +++ magnoliamodules/trunk/openutils-mgnllms/src/main/java/net/sourceforge/openutils/mgnllms/filters/RenderingServingZipFilter.java 2012-03-15 10:48:02 UTC (rev 3804) @@ -23,7 +23,9 @@ import info.magnolia.cms.core.HierarchyManager; import info.magnolia.cms.core.NodeData; import info.magnolia.context.MgnlContext; +import info.magnolia.rendering.engine.RenderingEngine; import info.magnolia.rendering.engine.RenderingFilter; +import info.magnolia.rendering.template.registry.TemplateDefinitionRegistry; import java.io.File; import java.io.FileOutputStream; @@ -61,6 +63,11 @@ */ private Logger log = LoggerFactory.getLogger(RenderingServingZipFilter.class); + public RenderingServingZipFilter(RenderingEngine renderingEngine, TemplateDefinitionRegistry templateDefinitionRegistry) + { + super(renderingEngine, templateDefinitionRegistry); + } + /** * {@inheritDoc} */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |