You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(39) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(19) |
Feb
(150) |
Mar
(10) |
Apr
|
May
(8) |
Jun
(11) |
Jul
(27) |
Aug
(52) |
Sep
(35) |
Oct
(30) |
Nov
(18) |
Dec
(4) |
2008 |
Jan
(76) |
Feb
(121) |
Mar
(39) |
Apr
(55) |
May
(18) |
Jun
(49) |
Jul
(32) |
Aug
(4) |
Sep
(10) |
Oct
|
Nov
(3) |
Dec
(33) |
2009 |
Jan
(19) |
Feb
(87) |
Mar
(69) |
Apr
(38) |
May
(47) |
Jun
(20) |
Jul
(5) |
Aug
(76) |
Sep
(145) |
Oct
(34) |
Nov
(8) |
Dec
(68) |
2010 |
Jan
(150) |
Feb
(379) |
Mar
(191) |
Apr
(100) |
May
(525) |
Jun
(269) |
Jul
(127) |
Aug
(190) |
Sep
(190) |
Oct
(29) |
Nov
(147) |
Dec
(83) |
2011 |
Jan
(188) |
Feb
(81) |
Mar
(43) |
Apr
(97) |
May
(63) |
Jun
(129) |
Jul
(17) |
Aug
(124) |
Sep
(6) |
Oct
(20) |
Nov
(67) |
Dec
(23) |
2012 |
Jan
(6) |
Feb
(14) |
Mar
(181) |
Apr
(64) |
May
(102) |
Jun
(47) |
Jul
(26) |
Aug
(3) |
Sep
(1) |
Oct
(14) |
Nov
(13) |
Dec
(23) |
2013 |
Jan
(4) |
Feb
(14) |
Mar
(18) |
Apr
(14) |
May
(27) |
Jun
(27) |
Jul
(5) |
Aug
(2) |
Sep
(74) |
Oct
(79) |
Nov
(21) |
Dec
(97) |
2014 |
Jan
(6) |
Feb
(3) |
Mar
(8) |
Apr
|
May
(5) |
Jun
|
Jul
(9) |
Aug
(6) |
Sep
(3) |
Oct
(10) |
Nov
(6) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(25) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <fg...@us...> - 2008-12-11 17:29:24
|
Revision: 952 http://openutils.svn.sourceforge.net/openutils/?rev=952&view=rev Author: fgiust Date: 2008-12-11 17:29:20 +0000 (Thu, 11 Dec 2008) Log Message: ----------- 1.0-SNAPSHOT Modified Paths: -------------- trunk/openutils-elfunctions/pom.xml Modified: trunk/openutils-elfunctions/pom.xml =================================================================== --- trunk/openutils-elfunctions/pom.xml 2008-12-11 16:37:40 UTC (rev 951) +++ trunk/openutils-elfunctions/pom.xml 2008-12-11 17:29:20 UTC (rev 952) @@ -10,6 +10,7 @@ <packaging>jar</packaging> <artifactId>openutils-elfunctions</artifactId> <name>openutils-elfunctions</name> + <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>commons-lang</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-12-11 16:37:45
|
Revision: 951 http://openutils.svn.sourceforge.net/openutils/?rev=951&view=rev Author: fgiust Date: 2008-12-11 16:37:40 +0000 (Thu, 11 Dec 2008) Log Message: ----------- docs Modified Paths: -------------- trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld Modified: trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java =================================================================== --- trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java 2008-12-11 16:28:22 UTC (rev 950) +++ trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java 2008-12-11 16:37:40 UTC (rev 951) @@ -100,4 +100,15 @@ return StringUtils.splitPreserveAllTokens(string, '\t'); } + /** + * Tests if this string ends with the specified suffix. + * @param string + * @param suffix + * @return true if the string ends with the suffix, false otherwise + */ + public static boolean endsWith(String string, String suffix) + { + return string.endsWith(suffix); + } + } Modified: trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld =================================================================== --- trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld 2008-12-11 16:28:22 UTC (rev 950) +++ trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld 2008-12-11 16:37:40 UTC (rev 951) @@ -1,73 +1,84 @@ <taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" - version="2.0"> - <description>Openutils EL functions: stringutils</description> - <display-name>Openutils EL functions: stringutils</display-name> - <tlib-version>1.0</tlib-version> - <short-name>su</short-name> - <uri>http://openutils.sf.net/openutils-stringutils</uri> - <function> - <name>capitaliseAllWords</name> - <function-class>org.apache.commons.lang.StringUtils</function-class> - <function-signature>java.lang.String capitaliseAllWords(java.lang.String)</function-signature> - </function> - <function> - <name>substringAfterLast</name> - <function-class>org.apache.commons.lang.StringUtils</function-class> - <function-signature>java.lang.String substringAfterLast(java.lang.String, java.lang.String)</function-signature> - </function> - <function> - <name>substringBeforeLast</name> - <function-class>org.apache.commons.lang.StringUtils</function-class> - <function-signature>java.lang.String substringBeforeLast(java.lang.String, java.lang.String)</function-signature> + version="2.0"> + <description>Openutils EL functions: stringutils</description> + <display-name>Openutils EL functions: stringutils</display-name> + <tlib-version>1.0</tlib-version> + <short-name>su</short-name> + <uri>http://openutils.sf.net/openutils-stringutils</uri> + <function> + <description>Capitalizes all the whitespace separated words in a String. Only the first letter of each word is changed.</description> + <name>capitaliseAllWords</name> + <function-class>org.apache.commons.lang.StringUtils</function-class> + <function-signature>java.lang.String capitaliseAllWords(java.lang.String)</function-signature> </function> <function> + <description>Gets the substring after the last occurrence of a separator. The separator is not returned.</description> + <name>substringAfterLast</name> + <function-class>org.apache.commons.lang.StringUtils</function-class> + <function-signature>java.lang.String substringAfterLast(java.lang.String, java.lang.String)</function-signature> + </function> + <function> + <description>Gets the substring before the last occurrence of a separator. The separator is not returned.</description> + <name>substringBeforeLast</name> + <function-class>org.apache.commons.lang.StringUtils</function-class> + <function-signature>java.lang.String substringBeforeLast(java.lang.String, java.lang.String)</function-signature> + </function> + <function> + <description>Checks if a String is whitespace, empty ("") or null.</description> <name>isBlank</name> <function-class>org.apache.commons.lang.StringUtils</function-class> <function-signature>boolean isBlank(java.lang.String )</function-signature> </function> <function> + <description>Creates a random string whose length is the number of characters specified.</description> <name>randomAlphanumeric</name> <function-class>org.apache.commons.lang.RandomStringUtils</function-class> <function-signature>java.lang.String randomAlphanumeric(int)</function-signature> - </function> + </function> <function> <description>Unescapes a String</description> <name>unescapeXml</name> <function-class>org.apache.commons.lang.StringEscapeUtils</function-class> <function-signature>java.lang.String unescapeXml(java.lang.String)</function-signature> - </function> - <function> - <name>space</name> - <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> - <function-signature>java.lang.String space()</function-signature> - </function> - <function> - <name>tab</name> - <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> - <function-signature>java.lang.String tab()</function-signature> - </function> - <function> - <name>newline</name> - <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> - <function-signature>java.lang.String newline()</function-signature> </function> - <function> - <name>escJsTxt</name> - <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> - <function-signature>java.lang.String escapeJsText(java.lang.String, boolean)</function-signature> - </function> - <function> - <name>adaptStringLength</name> - <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> - <function-signature>java.lang.String adaptStringLength(java.lang.String, int, java.lang.String)</function-signature> - </function> - <function> - <name>stripHtmlTags</name> - <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> - <function-signature>java.lang.String stripHtmlTags(java.lang.String)</function-signature> + <function> + <description>Output a white space.</description> + <name>space</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String space()</function-signature> </function> <function> + <description>Output a tab character.</description> + <name>tab</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String tab()</function-signature> + </function> + <function> + <description>Output a newline character.</description> + <name>newline</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String newline()</function-signature> + </function> + <function> + <description>Escapes a javascript string.</description> + <name>escJsTxt</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String escapeJsText(java.lang.String, boolean)</function-signature> + </function> + <function> + <description>Crops a String to a given length, adding a suffix (for example "...") if needed.</description> + <name>adaptStringLength</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String adaptStringLength(java.lang.String, int, java.lang.String)</function-signature> + </function> + <function> + <description>Strip any html tag from a String.</description> + <name>stripHtmlTags</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String stripHtmlTags(java.lang.String)</function-signature> + </function> + <function> <description>Splits the given strings on newlines</description> <name>splitNewlines</name> <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> @@ -90,5 +101,11 @@ <name>defaultIfEmpty</name> <function-class>org.apache.commons.lang.StringUtils</function-class> <function-signature>java.lang.String defaultIfEmpty(java.lang.String, java.lang.String)</function-signature> - </function> + </function> + <function> + <description>A wrapper around java.lang.String#endsWith(..). Tests if this string ends with the specified suffix.</description> + <name>endsWith</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>boolean endsWith(java.lang.String, java.lang.String)</function-signature> + </function> </taglib> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-12-11 16:28:26
|
Revision: 950 http://openutils.svn.sourceforge.net/openutils/?rev=950&view=rev Author: fgiust Date: 2008-12-11 16:28:22 +0000 (Thu, 11 Dec 2008) Log Message: ----------- basic documentation Modified Paths: -------------- trunk/openutils-elfunctions/pom.xml trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld Added Paths: ----------- trunk/openutils-elfunctions/src/site/ trunk/openutils-elfunctions/src/site/apt/ trunk/openutils-elfunctions/src/site/apt/index.apt trunk/openutils-elfunctions/src/site/changes/ trunk/openutils-elfunctions/src/site/changes/changes.xml trunk/openutils-elfunctions/src/site/site.xml Modified: trunk/openutils-elfunctions/pom.xml =================================================================== --- trunk/openutils-elfunctions/pom.xml 2008-12-11 16:15:12 UTC (rev 949) +++ trunk/openutils-elfunctions/pom.xml 2008-12-11 16:28:22 UTC (rev 950) @@ -1,4 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> @@ -29,4 +30,12 @@ </exclusions> </dependency> </dependencies> -</project> + <reporting> + <plugins> + <plugin> + <groupId>net.sourceforge.maven-taglib</groupId> + <artifactId>maven-taglib-plugin</artifactId> + </plugin> + </plugins> + </reporting> +</project> \ No newline at end of file Modified: trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java =================================================================== --- trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java 2008-12-11 16:15:12 UTC (rev 949) +++ trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java 2008-12-11 16:28:22 UTC (rev 950) @@ -15,7 +15,6 @@ */ package net.sourceforge.openutils.elfunctions; -import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; @@ -27,12 +26,6 @@ public class ElStringUtils { - public static String escapeXml(String value) - { - String esc = StringEscapeUtils.escapeXml(value); - return StringUtils.replace(esc, "'", "'"); - } - /** * The space character. * @return the space character Modified: trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld =================================================================== --- trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld 2008-12-11 16:15:12 UTC (rev 949) +++ trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld 2008-12-11 16:28:22 UTC (rev 950) @@ -30,11 +30,6 @@ <name>randomAlphanumeric</name> <function-class>org.apache.commons.lang.RandomStringUtils</function-class> <function-signature>java.lang.String randomAlphanumeric(int)</function-signature> - </function> - <function> - <name>escapeXml</name> - <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> - <function-signature>java.lang.String escapeXml(java.lang.String)</function-signature> </function> <function> <description>Unescapes a String</description> Added: trunk/openutils-elfunctions/src/site/apt/index.apt =================================================================== --- trunk/openutils-elfunctions/src/site/apt/index.apt (rev 0) +++ trunk/openutils-elfunctions/src/site/apt/index.apt 2008-12-11 16:28:22 UTC (rev 950) @@ -0,0 +1,19 @@ + -------------------------- + openutils-elfunctions + -------------------------- + Fabrizio Giustina + -------------------------- + +About openutils-elfunctions + + Openutils-elfunctions is a set of EL functions that can be used in jsp pages, mainly related to string manipulation. + +Usage + + The tld uri you have to declare in your jsps is "http://openutils.sf.net/openutils-stringutils". + + Look at the {{{tlddoc/index.html}taglibdoc documentation}} for details on the available functions. + +Released versions + + Check it at {{{http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-elfunctions}http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-elfunctions}} Property changes on: trunk/openutils-elfunctions/src/site/apt/index.apt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-elfunctions/src/site/changes/changes.xml =================================================================== --- trunk/openutils-elfunctions/src/site/changes/changes.xml (rev 0) +++ trunk/openutils-elfunctions/src/site/changes/changes.xml 2008-12-11 16:28:22 UTC (rev 950) @@ -0,0 +1,15 @@ +<?xml version="1.0"?> + <!-- + "type" attribute can be: add, remove, update or fix. +--> +<document> + <properties> + <title>Changes</title> + <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> + </properties> + <body> + <release version="1.0" date="2008-12-11" description=""> + <action type="add" dev="fgiust">first release</action> + </release> + </body> +</document> \ No newline at end of file Property changes on: trunk/openutils-elfunctions/src/site/changes/changes.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-elfunctions/src/site/site.xml =================================================================== --- trunk/openutils-elfunctions/src/site/site.xml (rev 0) +++ trunk/openutils-elfunctions/src/site/site.xml 2008-12-11 16:28:22 UTC (rev 950) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils mgnlmedia"> + <publishDate position="navigation-bottom" format="yyyy-MM-dd" /> + <version position="navigation-bottom" /> + <bannerRight> + <name>Openutils</name> + <src>http://openutils.sourceforge.net/images/openutils-logo.png + </src> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://www.sourceforge.net/projects/openutils</href> + </bannerLeft> + <body> + <head> + <link rel="icon" href="images/favicon.ico" /> + </head> + <breadcrumbs> + <item name="openutils" href="http://openutils.sourceforge.net/" /> + <item name="openutils-elfunctions" href="http://openutils.sourceforge.net/openutils-elfunctions" /> + </breadcrumbs> + <menu name="openutils mgnlmedia"> + <item name="About" href="index.html"></item> + </menu> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + </body> + <skin> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-maven-skin</artifactId> + <version>1.1</version> + </skin> +</project> Property changes on: trunk/openutils-elfunctions/src/site/site.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-12-11 16:15:25
|
Revision: 949 http://openutils.svn.sourceforge.net/openutils/?rev=949&view=rev Author: fgiust Date: 2008-12-11 16:15:12 +0000 (Thu, 11 Dec 2008) Log Message: ----------- new projects Added Paths: ----------- trunk/openutils-elfunctions/ trunk/openutils-elfunctions/pom.xml trunk/openutils-elfunctions/src/ trunk/openutils-elfunctions/src/main/ trunk/openutils-elfunctions/src/main/java/ trunk/openutils-elfunctions/src/main/java/net/ trunk/openutils-elfunctions/src/main/java/net/sourceforge/ trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/ trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java trunk/openutils-elfunctions/src/main/resources/ trunk/openutils-elfunctions/src/main/resources/META-INF/ trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld trunk/openutils-mgnlstruts11/ trunk/openutils-mgnlstruts11/pom.xml trunk/openutils-mgnlstruts11/src/ trunk/openutils-mgnlstruts11/src/main/ trunk/openutils-mgnlstruts11/src/main/java/ trunk/openutils-mgnlstruts11/src/main/java/it/ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/pages/ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/pages/StrutsConfigurationPage.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlFormFile.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlMultipartRequestHandler.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlRequestProcessor.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlRequestProcessorHelper.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlStrutsUtils.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/render/ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/render/MgnlStrutsServlet.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/render/StrutsParagraph.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/render/StrutsParagraphRegister.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/render/StrutsProcessingException.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/render/StrutsRenderer.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/setup/ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/setup/MgnlStrutsModuleVersionHandler.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/taglib/ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/taglib/MgnlFormTag.java trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/taglib/MgnlLinkTag.java trunk/openutils-mgnlstruts11/src/main/resources/ trunk/openutils-mgnlstruts11/src/main/resources/META-INF/ trunk/openutils-mgnlstruts11/src/main/resources/META-INF/magnolia/ trunk/openutils-mgnlstruts11/src/main/resources/META-INF/magnolia/struts11.xml trunk/openutils-mgnlstruts11/src/main/resources/META-INF/mgnlstruts-html.tld trunk/openutils-mgnlstruts11/src/main/resources/it/ trunk/openutils-mgnlstruts11/src/main/resources/it/openutils/ trunk/openutils-mgnlstruts11/src/main/resources/it/openutils/mgnlstruts11/ trunk/openutils-mgnlstruts11/src/main/resources/it/openutils/mgnlstruts11/pages/ trunk/openutils-mgnlstruts11/src/main/resources/it/openutils/mgnlstruts11/pages/StrutsConfigurationPage.html trunk/openutils-mgnlstruts11/src/main/resources/mgnl-bootstrap/ trunk/openutils-mgnlstruts11/src/main/resources/mgnl-bootstrap/struts11/ trunk/openutils-mgnlstruts11/src/main/resources/mgnl-bootstrap/struts11/config.modules.adminInterface.config.menu.tools.struts.xml trunk/openutils-mgnlstruts11/src/main/resources/mgnl-bootstrap/struts11/config.modules.adminInterface.config.menu.tools.strutsjcr.xml trunk/openutils-mgnlstruts11/src/main/resources/mgnl-bootstrap/struts11/config.modules.struts11.pages.struts.xml trunk/openutils-mgnlstruts11/src/main/resources/mgnl-bootstrap/struts11/config.modules.struts11.paragraph-renderers.struts.xml trunk/openutils-mgnlstruts11/src/main/resources/mgnl-bootstrap/struts11/config.server.filters.cms.bypasses.struts.xml trunk/openutils-mgnlstruts11/src/main/resources/mgnl-bootstrap/struts11/config.server.filters.gzip.bypasses.struts.xml trunk/openutils-mgnlstruts11/src/main/resources/mgnl-resources/ trunk/openutils-mgnlstruts11/src/main/resources/mgnl-resources/struts/ trunk/openutils-mgnlstruts11/src/main/resources/mgnl-resources/struts/struts-ico.png trunk/openutils-mgnlstruts11/src/main/resources/mgnl-resources/struts/struts.png trunk/openutils-mgnlstruts11/src/test/ trunk/openutils-mgnlstruts11/src/test/java/ trunk/openutils-mgnlstruts11/src/test/resources/ Property changes on: trunk/openutils-elfunctions ___________________________________________________________________ Added: svn:ignore + .settings target .checkstyle .classpath .project Added: trunk/openutils-elfunctions/pom.xml =================================================================== --- trunk/openutils-elfunctions/pom.xml (rev 0) +++ trunk/openutils-elfunctions/pom.xml 2008-12-11 16:15:12 UTC (rev 949) @@ -0,0 +1,32 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>10</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + <packaging>jar</packaging> + <artifactId>openutils-elfunctions</artifactId> + <name>openutils-elfunctions</name> + <dependencies> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.4</version> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.1</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> +</project> Property changes on: trunk/openutils-elfunctions/pom.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java =================================================================== --- trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java (rev 0) +++ trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java 2008-12-11 16:15:12 UTC (rev 949) @@ -0,0 +1,110 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sourceforge.openutils.elfunctions; + +import org.apache.commons.lang.StringEscapeUtils; +import org.apache.commons.lang.StringUtils; + + +/** + * Utility methods mapped to EL functions to allow usage in jsp pages. + * @author fgiust + * @version $Id$ + */ +public class ElStringUtils +{ + + public static String escapeXml(String value) + { + String esc = StringEscapeUtils.escapeXml(value); + return StringUtils.replace(esc, "'", "'"); + } + + /** + * The space character. + * @return the space character + */ + public static String space() + { + return " "; + } + + /** + * The tab character. + * @return the tab character + */ + public static String tab() + { + return "\t"; + } + + /** + * The newline (<code>\n</code>) character. + * @return the newline (<code>\n</code>) character + */ + public static String newline() + { + return "\n"; + } + + public static String escapeJsText(String text, boolean dbl) + { + String repl = dbl ? "\"" : "'"; + String with = "\\" + repl; + return repl + (text != null ? StringUtils.replace(text, repl, with) : "") + repl; + } + + public static String adaptStringLength(String value, int maxLength, String ellipses) + { + if (value != null && value.length() > maxLength) + { + return value.substring(0, maxLength) + ellipses; + } + + return value; + } + + public static String stripHtmlTags(String string) + { + if (StringUtils.isNotBlank(string)) + { + return StringUtils.remove(StringUtils.remove(string.replaceAll("<(.|\n)+?>", ""), '\r'), '\n').trim(); + + } + return null; + } + + /** + * Splits the given strings on newlines (<code>\n</code>) + * @param string string to be splitted + * @return splitted string + */ + public static String[] splitNewlines(String string) + { + return StringUtils.splitPreserveAllTokens(string, '\n'); + } + + /** + * Splits the given strings on tabs (<code>\t</code>) + * @param string string to be splitted + * @return splitted string + */ + public static String[] splitOnTabs(String string) + { + return StringUtils.splitPreserveAllTokens(string, '\t'); + } + +} Property changes on: trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld =================================================================== --- trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld (rev 0) +++ trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld 2008-12-11 16:15:12 UTC (rev 949) @@ -0,0 +1,99 @@ +<taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" + version="2.0"> + <description>Openutils EL functions: stringutils</description> + <display-name>Openutils EL functions: stringutils</display-name> + <tlib-version>1.0</tlib-version> + <short-name>su</short-name> + <uri>http://openutils.sf.net/openutils-stringutils</uri> + <function> + <name>capitaliseAllWords</name> + <function-class>org.apache.commons.lang.StringUtils</function-class> + <function-signature>java.lang.String capitaliseAllWords(java.lang.String)</function-signature> + </function> + <function> + <name>substringAfterLast</name> + <function-class>org.apache.commons.lang.StringUtils</function-class> + <function-signature>java.lang.String substringAfterLast(java.lang.String, java.lang.String)</function-signature> + </function> + <function> + <name>substringBeforeLast</name> + <function-class>org.apache.commons.lang.StringUtils</function-class> + <function-signature>java.lang.String substringBeforeLast(java.lang.String, java.lang.String)</function-signature> + </function> + <function> + <name>isBlank</name> + <function-class>org.apache.commons.lang.StringUtils</function-class> + <function-signature>boolean isBlank(java.lang.String )</function-signature> + </function> + <function> + <name>randomAlphanumeric</name> + <function-class>org.apache.commons.lang.RandomStringUtils</function-class> + <function-signature>java.lang.String randomAlphanumeric(int)</function-signature> + </function> + <function> + <name>escapeXml</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String escapeXml(java.lang.String)</function-signature> + </function> + <function> + <description>Unescapes a String</description> + <name>unescapeXml</name> + <function-class>org.apache.commons.lang.StringEscapeUtils</function-class> + <function-signature>java.lang.String unescapeXml(java.lang.String)</function-signature> + </function> + <function> + <name>space</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String space()</function-signature> + </function> + <function> + <name>tab</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String tab()</function-signature> + </function> + <function> + <name>newline</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String newline()</function-signature> + </function> + <function> + <name>escJsTxt</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String escapeJsText(java.lang.String, boolean)</function-signature> + </function> + <function> + <name>adaptStringLength</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String adaptStringLength(java.lang.String, int, java.lang.String)</function-signature> + </function> + <function> + <name>stripHtmlTags</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String stripHtmlTags(java.lang.String)</function-signature> + </function> + <function> + <description>Splits the given strings on newlines</description> + <name>splitNewlines</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String[] splitNewlines(java.lang.String)</function-signature> + </function> + <function> + <description>Splits the given string on tab characters</description> + <name>splitOnTabs</name> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String[] splitOnTabs(java.lang.String)</function-signature> + </function> + <function> + <description>Strips whitespaces from the start and the end of a String</description> + <name>strip</name> + <function-class>org.apache.commons.lang.StringUtils</function-class> + <function-signature>java.lang.String strip(java.lang.String)</function-signature> + </function> + <function> + <description>Returns either the passed in String, or if the String is empty or null, the value of defaultStr</description> + <name>defaultIfEmpty</name> + <function-class>org.apache.commons.lang.StringUtils</function-class> + <function-signature>java.lang.String defaultIfEmpty(java.lang.String, java.lang.String)</function-signature> + </function> +</taglib> \ No newline at end of file Property changes on: trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld ___________________________________________________________________ Added: svn:mime-type + text/xml Added: svn:keywords + Author Date Id Revision Property changes on: trunk/openutils-mgnlstruts11 ___________________________________________________________________ Added: svn:ignore + .settings .checkstyle .classpath .project target Added: trunk/openutils-mgnlstruts11/pom.xml =================================================================== --- trunk/openutils-mgnlstruts11/pom.xml (rev 0) +++ trunk/openutils-mgnlstruts11/pom.xml 2008-12-11 16:15:12 UTC (rev 949) @@ -0,0 +1,82 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>10</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-mgnlstruts11</artifactId> + <packaging>jar</packaging> + <name>openutils-mgnlstruts11</name> + <version>1.0-SNAPSHOT</version> + <licenses> + <license> + <name>GPLv3</name> + <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> + </license> + </licenses> + <build> + <resources> + <resource> + <filtering>false</filtering> + <directory>src/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + <resource> + <filtering>true</filtering> + <directory>src/main/resources</directory> + <includes> + <include>META-INF/magnolia/*</include> + </includes> + </resource> + </resources> + </build> + <dependencies> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-core</artifactId> + <version>3.6.3</version> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-module-admininterface</artifactId> + <version>3.6.3</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.4</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + <version>2.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnltasks</artifactId> + <version>3.5.5</version> + </dependency> + <dependency> + <groupId>struts</groupId> + <artifactId>struts</artifactId> + <version>1.1</version> + <exclusions> + <exclusion> + <groupId>javax.sql</groupId> + <artifactId>jdbc-stdext</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> +</project> \ No newline at end of file Property changes on: trunk/openutils-mgnlstruts11/pom.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/pages/StrutsConfigurationPage.java =================================================================== --- trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/pages/StrutsConfigurationPage.java (rev 0) +++ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/pages/StrutsConfigurationPage.java 2008-12-11 16:15:12 UTC (rev 949) @@ -0,0 +1,101 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package it.openutils.mgnlstruts11.pages; + +import info.magnolia.cms.beans.config.ParagraphManager; +import info.magnolia.cms.i18n.Messages; +import info.magnolia.cms.i18n.TemplateMessagesUtil; +import info.magnolia.module.admininterface.DialogHandlerManager; +import info.magnolia.module.admininterface.DialogMVCHandler; +import info.magnolia.module.admininterface.InvalidDialogHandlerException; +import info.magnolia.module.admininterface.TemplatedMVCHandler; +import it.openutils.mgnlstruts11.render.StrutsParagraph; +import it.openutils.mgnlstruts11.render.StrutsParagraphRegister; + +import java.util.Set; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; + + +/** + * A magnolia page that lists all the Struts paragraphs. + * @author fgiust + * @version $Id$ + */ +public class StrutsConfigurationPage extends TemplatedMVCHandler +{ + + /** + * Required constructor. + * @param name page name + * @param request HttpServletRequest + * @param response HttpServletResponse + */ + public StrutsConfigurationPage(String name, HttpServletRequest request, HttpServletResponse response) + { + super(name, request, response); + } + + public Set<StrutsParagraph> getStrutsParagraphs() + { + return StrutsParagraphRegister.getParagraphs(); + } + + public Messages getMessages() + { + return TemplateMessagesUtil.getMessages(); + } + + public ParagraphManager getParagraphManager() + { + return ParagraphManager.getInstance(); + } + + public boolean isDialogConfigured(String dialogName) + { + DialogMVCHandler handler = null; + try + { + handler = DialogHandlerManager.getInstance().getDialogHandler(dialogName, request, response); + } + catch (InvalidDialogHandlerException e) + { + return false; + } + + return handler != null; + } + + public String getDialogPath(String dialogName) + { + DialogMVCHandler handler = null; + try + { + handler = DialogHandlerManager.getInstance().getDialogHandler(dialogName, request, response); + } + catch (InvalidDialogHandlerException e) + { + return StringUtils.EMPTY; + } + + return handler.getConfigNode().getHandle(); + } +} Property changes on: trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/pages/StrutsConfigurationPage.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlFormFile.java =================================================================== --- trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlFormFile.java (rev 0) +++ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlFormFile.java 2008-12-11 16:15:12 UTC (rev 949) @@ -0,0 +1,181 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package it.openutils.mgnlstruts11.process; + +import info.magnolia.cms.beans.runtime.Document; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; + +import org.apache.commons.io.FileUtils; +import org.apache.struts.upload.FormFile; + + +/** + * A FormFile implementation that wraps a Magnolia Multipart Document. + * @author fgiust + * @version $Id$ + */ +class MgnlFormFile implements FormFile +{ + + /** + * The <code>document</code> instance wrapped by this object. + */ + private Document mgnlDocument; + + public MgnlFormFile(Document fileItem) + { + this.mgnlDocument = fileItem; + } + + /** + * Returns the content type for this file. + * @return A String representing content type. + */ + public String getContentType() + { + return mgnlDocument.getExtension(); + } + + /** + * Sets the content type for this file. + * <p> + * NOTE: This method is not supported in this implementation. + * @param contentType A string representing the content type. + */ + public void setContentType(String contentType) + { + throw new UnsupportedOperationException("The setContentType() method is not supported."); + } + + /** + * Returns the size, in bytes, of this file. + * @return The size of the file, in bytes. + */ + public int getFileSize() + { + return (int) mgnlDocument.getFile().length(); + } + + /** + * Sets the size, in bytes, for this file. + * <p> + * NOTE: This method is not supported in this implementation. + * @param filesize The size of the file, in bytes. + */ + public void setFileSize(int filesize) + { + throw new UnsupportedOperationException("The setFileSize() method is not supported."); + } + + /** + * Returns the (client-side) file name for this file. + * @return The client-size file name. + */ + public String getFileName() + { + return getBaseFileName(mgnlDocument.getFileName()); + } + + /** + * Sets the (client-side) file name for this file. + * <p> + * NOTE: This method is not supported in this implementation. + * @param fileName The client-side name for the file. + */ + public void setFileName(String fileName) + { + throw new UnsupportedOperationException("The setFileName() method is not supported."); + } + + /** + * Returns the data for this file as a byte array. Note that this may result in excessive memory usage for large + * uploads. The use of the {@link #getInputStream() getInputStream} method is encouraged as an alternative. + * @return An array of bytes representing the data contained in this form file. + * @exception FileNotFoundException If some sort of file representation cannot be found for the FormFile + * @exception IOException If there is some sort of IOException + */ + public byte[] getFileData() throws FileNotFoundException, IOException + { + return FileUtils.readFileToByteArray(mgnlDocument.getFile()); + } + + /** + * Get an InputStream that represents this file. This is the preferred method of getting file data. + * @exception FileNotFoundException If some sort of file representation cannot be found for the FormFile + * @exception IOException If there is some sort of IOException + */ + public InputStream getInputStream() throws FileNotFoundException, IOException + { + return mgnlDocument.getStream(); + } + + /** + * Destroy all content for this form file. Implementations should remove any temporary files or any temporary file + * data stored somewhere + */ + public void destroy() + { + mgnlDocument.delete(); + } + + /** + * Returns the base file name from the supplied file path. On the surface, this would appear to be a trivial task. + * Apparently, however, some Linux JDKs do not implement <code>File.getName()</code> correctly for Windows paths, so + * we attempt to take care of that here. + * @param filePath The full path to the file. + * @return The base file name, from the end of the path. + */ + protected String getBaseFileName(String filePath) + { + + // First, ask the JDK for the base file name. + String fileName = new File(filePath).getName(); + + // Now check for a Windows file name parsed incorrectly. + int colonIndex = fileName.indexOf(":"); + if (colonIndex == -1) + { + // Check for a Windows SMB file path. + colonIndex = fileName.indexOf("\\\\"); + } + int backslashIndex = fileName.lastIndexOf("\\"); + + if (colonIndex > -1 && backslashIndex > -1) + { + // Consider this filename to be a full Windows path, and parse it + // accordingly to retrieve just the base file name. + fileName = fileName.substring(backslashIndex + 1); + } + + return fileName; + } + + /** + * Returns the (client-side) file name for this file. + * @return The client-size file name. + */ + @Override + public String toString() + { + return getFileName(); + } +} \ No newline at end of file Property changes on: trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlFormFile.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlMultipartRequestHandler.java =================================================================== --- trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlMultipartRequestHandler.java (rev 0) +++ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlMultipartRequestHandler.java 2008-12-11 16:15:12 UTC (rev 949) @@ -0,0 +1,200 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package it.openutils.mgnlstruts11.process; + +import info.magnolia.cms.beans.runtime.Document; +import info.magnolia.cms.beans.runtime.MultipartForm; + +import java.util.Hashtable; +import java.util.Map; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.struts.Globals; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionServlet; +import org.apache.struts.config.ModuleConfig; +import org.apache.struts.upload.FormFile; +import org.apache.struts.upload.MultipartRequestHandler; + + +/** + * A <code>MultipartRequestHandler</code> implementation that delegates to the stadard Magnolia Multipart parser. + * @author fgiust + * @version $Id$ + */ +public class MgnlMultipartRequestHandler implements MultipartRequestHandler +{ + + /** + * Commons Logging instance. + */ + protected static Log log = LogFactory.getLog(MgnlMultipartRequestHandler.class); + + /** + * The combined text and file request parameters. + */ + private Hashtable elementsAll; + + /** + * The file request parameters. + */ + private Hashtable<String, FormFile> elementsFile; + + /** + * The action mapping with which this handler is associated. + */ + private ActionMapping mapping; + + /** + * The servlet with which this handler is associated. + */ + private ActionServlet servlet; + + /** + * Magnolia multipart form + */ + private MultipartForm mpf; + + /** + * Retrieves the servlet with which this handler is associated. + * @return The associated servlet. + */ + public ActionServlet getServlet() + { + return this.servlet; + } + + /** + * Sets the servlet with which this handler is associated. + * @param servlet The associated servlet. + */ + public void setServlet(ActionServlet servlet) + { + this.servlet = servlet; + } + + /** + * Retrieves the action mapping with which this handler is associated. + * @return The associated action mapping. + */ + public ActionMapping getMapping() + { + return this.mapping; + } + + /** + * Sets the action mapping with which this handler is associated. + * @param mapping The associated action mapping. + */ + public void setMapping(ActionMapping mapping) + { + this.mapping = mapping; + } + + /** + * Parses the input stream and partitions the parsed items into a set of form fields and a set of file items. In the + * process, the parsed items are translated from Commons FileUpload <code>FileItem</code> instances to Struts + * <code>FormFile</code> instances. + * @param request The multipart request to be processed. + * @throws ServletException if an unrecoverable error occurs. + */ + @SuppressWarnings("unchecked") + public void handleRequest(HttpServletRequest request) throws ServletException + { + + // always made available by the renderer + mpf = (MultipartForm) request.getAttribute(MultipartForm.REQUEST_ATTRIBUTE_NAME); + + // Create the hash tables to be populated. + elementsFile = new Hashtable<String, FormFile>(); + elementsAll = new Hashtable(); + + Map<String, Document> docs = mpf.getDocuments(); + for (Map.Entry<String, Document> doc : docs.entrySet()) + { + addFileParameter(doc.getKey(), doc.getValue()); + } + + elementsAll.putAll(getTextElements()); + elementsAll.putAll(elementsFile); + + } + + /** + * Returns a hash table containing the text (that is, non-file) request parameters. + * @return The text request parameters. + */ + @SuppressWarnings("unchecked") + public Hashtable<String, String[]> getTextElements() + { + // not really safe, but internally mpf uses hashtables instances + return ((Hashtable<String, String[]>) mpf.getParameters()); + } + + /** + * Returns a hash table containing the file (that is, non-text) request parameters. + * @return The file request parameters. + */ + @SuppressWarnings("unchecked") + public Hashtable getFileElements() + { + return this.elementsFile; + } + + /** + * Returns a hash table containing both text and file request parameters. + * @return The text and file request parameters. + */ + @SuppressWarnings("unchecked") + public Hashtable getAllElements() + { + + return this.elementsAll; + } + + /** + * Cleans up when a problem occurs during request processing. + */ + public void rollback() + { + // nothing to do + } + + /** + * Cleans up at the end of a request. + */ + public void finish() + { + // nothing to do + } + + /** + * Adds a file parameter to the set of file parameters for this request and also to the list of all parameters. + * @param item The file item for the parameter to add. + */ + protected void addFileParameter(String name, Document item) + { + FormFile formFile = new MgnlFormFile(item); + elementsFile.put(name, formFile); + } + +} Property changes on: trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlMultipartRequestHandler.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlRequestProcessor.java =================================================================== --- trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlRequestProcessor.java (rev 0) +++ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlRequestProcessor.java 2008-12-11 16:15:12 UTC (rev 949) @@ -0,0 +1,98 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package it.openutils.mgnlstruts11.process; + +import it.openutils.mgnlstruts11.render.StrutsRenderer; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.RequestProcessor; +import org.apache.struts.config.ForwardConfig; + + +/** + * A request processor implementation that makes struts dispatching work inside magnolia. + * @author fgiust + * @version $Id$ + */ +public class MgnlRequestProcessor extends RequestProcessor +{ + + /** + * {@inheritDoc} + */ + @Override + protected String processPath(HttpServletRequest request, HttpServletResponse response) throws IOException + { + + String path = (String) request.getAttribute(StrutsRenderer.PARAGRAPH_PATH); + if (path != null) + { + log.debug("Processing path " + path); + return (path); + } + + return super.processPath(request, response); + } + + /** + * {@inheritDoc} + */ + @Override + protected void processForwardConfig(HttpServletRequest request, HttpServletResponse response, ForwardConfig forward) + throws IOException, ServletException + { + MgnlRequestProcessorHelper.doProcessForwardConfig(request, response, forward); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doForward(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, + ServletException + { + // forwards are translated to include when running inside magnolia + doInclude(uri, request, response); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doInclude(String uri, HttpServletRequest request, HttpServletResponse response) throws IOException, + ServletException + { + MgnlRequestProcessorHelper.doInclude(uri, request, response); + } + + /** + * {@inheritDoc} + */ + @Override + protected ActionMapping processMapping(HttpServletRequest request, HttpServletResponse response, String path) + throws IOException + { + return MgnlRequestProcessorHelper.doProcessMapping(request, response, path, moduleConfig); + } +} Property changes on: trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlRequestProcessor.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlRequestProcessorHelper.java =================================================================== --- trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlRequestProcessorHelper.java (rev 0) +++ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlRequestProcessorHelper.java 2008-12-11 16:15:12 UTC (rev 949) @@ -0,0 +1,180 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package it.openutils.mgnlstruts11.process; + +import info.magnolia.cms.beans.config.ServerConfiguration; +import info.magnolia.context.MgnlContext; +import info.magnolia.context.WebContext; +import it.openutils.mgnlstruts11.render.StrutsRenderer; + +import java.io.IOException; +import java.io.Writer; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.jsp.PageContext; + +import org.apache.commons.lang.StringUtils; +import org.apache.struts.Globals; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.config.ActionConfig; +import org.apache.struts.config.ForwardConfig; +import org.apache.struts.config.ModuleConfig; +import org.apache.struts.upload.MultipartRequestWrapper; +import org.apache.struts.util.RequestUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author fgiust + * @version $Id: MgnlRequestProcessorHelper.java 86 2008-11-04 08:37:44Z fgiust + * $ + */ +public class MgnlRequestProcessorHelper { + + /** + * Logger. + */ + private static Logger log = LoggerFactory + .getLogger(MgnlRequestProcessorHelper.class); + + public static void doProcessForwardConfig(HttpServletRequest request, + HttpServletResponse response, ForwardConfig forward) + throws IOException, ServletException { + + log.info("processForwardConfig " + forward); + if (forward == null) { + return; + } + + if (log.isDebugEnabled()) { + log.debug("processForwardConfig(" + forward + ")"); + } + + String forwardPath = forward.getPath(); + String uri = null; + + // paths not starting with / should be passed through without any + // processing + // (ie. they're absolute) + if (forwardPath.startsWith("/")) { + uri = RequestUtils.forwardURL(request, forward); // get module + // relative uri + } else { + uri = forwardPath; + } + + if (forward.getRedirect() && !uri.endsWith(".jsp")) { + // @todo redirect in templates + // only prepend context path for relative uri + if (uri.startsWith("/")) { + uri = request.getContextPath() + uri; + } + response.sendRedirect(response.encodeRedirectURL(uri)); + + } else { + doInclude(uri, request, response); + } + + } + + public static void doInclude(String uri, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + + // needed for chained forwards, avoid loops! + request.setAttribute(StrutsRenderer.PARAGRAPH_PATH, uri); + + // Unwrap the multipart request, if there is one. + if (request instanceof MultipartRequestWrapper) { + request = ((MultipartRequestWrapper) request).getRequest(); + } + + RequestDispatcher rd = getWebContext().getServletContext() + .getRequestDispatcher(uri); + + getWebContext().include(uri, getOut()); + } + + public static ActionMapping doProcessMapping(HttpServletRequest request, + HttpServletResponse response, String path, ModuleConfig moduleConfig) + throws IOException { + + log.info("Process mapping " + path); + + // Is there a directly defined mapping for this path? + ActionMapping mapping = (ActionMapping) moduleConfig.findActionConfig(path); + + if (mapping == null) { + // @todo This is almost a copy-paste of the end of RequestProcessor.processPath method, it should be refactored in a "simplify path" somewhere else. + // This is a temporary patch to handle forwards correctly. + String retryPath = StringUtils.defaultString(StringUtils.substringAfterLast(StringUtils.substringBeforeLast(path, "."), "/")); + retryPath = retryPath.startsWith("/") ? retryPath : ("/" + retryPath); + mapping = (ActionMapping) moduleConfig.findActionConfig(retryPath); + } + + if (mapping != null) { + request.setAttribute(Globals.MAPPING_KEY, mapping); + return (mapping); + } + + // Locate the mapping for unknown paths (if any) + ActionConfig configs[] = moduleConfig.findActionConfigs(); + for (int i = 0; i < configs.length; i++) { + if (configs[i].getUnknown()) { + mapping = (ActionMapping) configs[i]; + request.setAttribute(Globals.MAPPING_KEY, mapping); + return (mapping); + } + } + + // No mapping can be found to process this request + log.error("Invalid path: " + path); + + // debug only on admin instances + if (ServerConfiguration.getInstance().isAdmin()) { + getOut().write("Invalid path: " + path); + } + + return (null); + + } + + private static WebContext getWebContext() { + return ((WebContext) MgnlContext.getInstance()); + } + + /** + * @return + * @throws IOException + */ + private static Writer getOut() throws IOException { + Writer out = null; + + PageContext pageContext = getWebContext().getPageContext(); + + if (pageContext != null) { + out = pageContext.getOut(); + } else { + out = getWebContext().getResponse().getWriter(); + } + return out; + } + +} Property changes on: trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlRequestProcessorHelper.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlStrutsUtils.java =================================================================== --- trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlStrutsUtils.java (rev 0) +++ trunk/openutils-mgnlstruts11/src/main/java/it/openutils/mgnlstruts11/process/MgnlStrutsUtils.java 2008-12-11 16:15:12 UTC (rev 949) @@ -0,0 +1,457 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package it.openutils.mgnlstruts11.process; + +import java.io.UnsupportedEncodingException; +import java.net.MalformedURLException; +import java.net.URLEncoder; +import java.util.Iterator; +import java.util.Map; + +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.UnavailableException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.jsp.PageContext; + +import org.apache.commons.lang.StringUtils; +import org.apache.struts.Globals; +import org.apache.struts.action.ActionServlet; +import org.apache.struts.action.RequestProcessor; +import org.apache.struts.config.ForwardConfig; +import org.apache.struts.config.ModuleConfig; +import org.apache.struts.util.MessageResources; +import org.apache.struts.util.RequestUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * Magnolia-Struts utility methods. + * @author fgiust + * @version $Id$ + */ +public final class MgnlStrutsUtils +{ + + /** + * Request parameter containing the current magnolia action. + */ + public static final String PARAMETER_MGNLACTION = "_mgnlaction"; + + /** + * + */ + public static final String ATTRIBUTE_ORIGINALURI = "_originaluri"; + + /** + * Logger. + */ + private static Logger log = LoggerFactory.getLogger(MgnlStrutsUtils.class); + + /** + * The message resources for this package. + */ + private static MessageResources messages = MessageResources + .getMessageResources("org.apache.struts.util.LocalStrings"); + + /** + * Look up and return the {@link RequestProcessor} responsible for the specified module, creating a new one if + * necessary. + * @param config The module configuration for which to acquire and return a RequestProcessor. + * @exception ServletException if we cannot instantiate a RequestProcessor instance + * @since Struts 1.1 + */ + public static RequestProcessor getRequestProcessor(ModuleConfig config, ServletContext servletContext, + ActionServlet dispatcher, Class mgnlProcessorClass) throws ServletException + { + + String key = Globals.REQUEST_PROCESSOR_KEY + config.getPrefix(); + RequestProcessor processor = (RequestProcessor) servletContext.getAttribute(key); + + if (processor == null) + { + String processorClass = config.getControllerConfig().getProcessorClass(); + try + { + processor = (RequestProcessor) RequestUtils.applicationInstance(StringUtils.isNotBlank(processorClass) + ? processorClass + : mgnlProcessorClass.getName()); + + if (!processor.getClass().isAssignableFrom(mgnlProcessorClass)) + { + if (StringUtils.equalsIgnoreCase( + org.apache.struts.action.RequestProcessor.class.getName(), + processorClass)) + { + // It's safe to replace the default processor + log.warn("The default processor class (" + + processorClass + + ") has been specified for struts module, this will be replaced by " + + mgnlProcessorClass.getName() + + " to enable the magnolia integration"); + } + else + { + // It's NOT safe to replace a custom class, should stop the application... + log.error("A custom processor class (" + + processorClass + + ") has been specified for struts module, this will be replaced by " + + mgnlProcessorClass.getName() + + " to enable the magnolia integration"); + } + processor = (RequestProcessor) RequestUtils.applicationInstance(mgnlProcessorClass.getName()); + } + } + catch (Exception e) + { + throw new UnavailableException("Cannot initialize RequestProcessor of class " + + config.getControllerConfig().getProcessorClass() + + ": " + + e); + } + + processor.init(dispatcher, config); + servletContext.setAttribute(key, processor); + + } + return (processor); + + } + + /** + * Compute a hyperlink URL based on the <code>forward</code>, <code>href</code>, <code>action</code> or + * <code>page</code> parameter that is not null. The returned URL will have already been passed to + * <code>response.encodeURL()</code> for adding a session identifier. + * @param pageContext PageContext for the tag making this call + * @param forward Logical forward name for which to look up the context-relative URI (if specified) + * @param href URL to be utilized unmodified (if specified) + * @param page Module-relative page for which a URL should be created (if specified) + * @param action Logical action name for which to look up the context-relative URI (if specified) + * @param params Map of parameters to be dynamically included (if any) + * @param anchor Anchor to be dynamically included (if any) + * @param redirect Is this URL for a <code>response.sendRedirect()</code>? + * @param encodeSeparator This is only checked if redirect is set to false (never encoded for a redirect). If true, + * query string parameter separators are encoded as >amp;, else & is used. + * @return URL with session identifier + * @exception MalformedURLException if a URL cannot be created for the specified parameters + */ + public static String computeURL(PageContext pageContext, String forward, String href, String page, String action, + Map<String, String> params, String anchor, boolean redirect, boolean encodeSeparator, String destinationPage) + throws MalformedURLException + { + + // TODO All the computeURL() methods need refactoring! + + // Validate that exactly one specifier was included + int n = 0; + if (forward != null) + { + n++; + } + if (href != null) + { + n++; + } + if (page != null) + { + n++; + } + if (action != null) + { + n++; + } + if (n != 1) + { + throw new MalformedURLException(messages.getMessage("computeURL.specifier")); + } + + // Look up the module configuration for this request + ModuleConfig config = (ModuleConfig) pageContext.getRequest().getAttribute(Globals.MODULE_KEY); + if (config == null) + { // Backwards compatibility hack + config = (ModuleConfig) pageContext.getServletContext().getAttribute(Globals.MODULE_KEY); + pageContext.getRequest().setAttribute(Globals.MODULE_KEY, config); + } + + // Calculate the appropriate URL + StringBuffer url = new StringBuffer(); + HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); + + String mgnlaction = null; + + if (destinationPage != null && href == null) + { + url.append(destinationPage); + } + + if (forward != null) + { + ForwardConfig fc = config.findForwardConfig(forward); + if (fc == null) + { + throw new MalformedURLException(messages.getMessage("computeURL.forward", forward)); + } + if (fc.getRedirect()) + { + redirect = true; + } + + mgnlaction = forward; + + } + else if (href != null) + { + url.append(href); + } + else if (action != null) + { + mgnlaction = RequestUtils.getActionMappingURL(action, pageContext); + // url.append(RequestUtils.getActionMappingURL(action, pageContext)); + + } + else + /* if (page != null) */{ + + mgnlaction = RequestUtils.pageURL(request, page); + // url.append(request.getContextPath()); + // url.append(RequestUtils.pageURL(request, page)); + } + + if (mgnlaction != null) + { + // remove parameters (how ugly is struts 1 :( ) + if (mgnlaction.contains("?")) + { + String actionparams = StringUtils.substringAfter(mgnlaction, "?"); + + String[] paramz = StringUtils.split(actionparams, "&"); + for (String string : paramz) + { + if (StringUtils.contains(string, "=")) + { + params.put(StringUtils.substringBefore(string, "="), StringUtils.substringAfter(string, "=")); + } + + } + mgnlaction = StringUtils.substringBefore(mgnlaction, "?"); + } + + if (mgnlaction.endsWith(".do")) + { + mgnlaction = StringUtils.substringBeforeLast(mgnlaction, ".do"); + } + + params.put(PARAMETER_MGNLACTION, mgnlaction); + } + + // Add anchor if requested (replacing any existing anchor) + if (anchor != null) + { + String temp = url.toString(); + int hash = temp.indexOf('#'); + if (hash >= 0) + { + url.setLength(hash); + } + url.append('#'); + url.append(encode(anchor)); + } + + // Add dynamic parameters if requested + if ((params != null) && (params.size() > 0)) + { + + // Save any existing anchor + String temp = url.toString(); + int hash = temp.indexOf('#'); + if (hash >= 0) + { + anchor = temp.substring(hash + 1); + url.setLength(hash); + temp = url.toString(); + } + else + { + anchor = null; + } + + // Define the parameter separator + String separator = null; + if (redirect) + { + separator = "&"; + } + else if (encodeSeparator) + { + separator = "&"; + } + else + { + separator = "&"; + } + + // Add the required request parameters + boolean question = temp.indexOf('?') >= 0; + Iterator keys = params.keySet().iterator(); + while (keys.hasNext()) + { + String key = (String) keys.next(); + Object value = params.get(key); + ... [truncated message content] |
From: <ku...@us...> - 2008-12-05 10:40:27
|
Revision: 948 http://openutils.svn.sourceforge.net/openutils/?rev=948&view=rev Author: kurto80 Date: 2008-12-05 10:40:23 +0000 (Fri, 05 Dec 2008) Log Message: ----------- cancellato dal menu search Added Paths: ----------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml Added: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml (rev 0) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml 2008-12-05 10:40:23 UTC (rev 948) @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="media" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" + xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" xmlns:fn="http://www.w3.org/2005/xpath-functions" + xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:jcr="http://www.jcp.org/jcr/1.0" + xmlns:mgnl="http://www.magnolia.info/jcr/mgnl" xmlns:jcrfn="http://www.jcp.org/jcr/xpath-functions/1.0" + xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:rep="internal" xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:stringutils="xalan://org.apache.commons.lang.StringUtils" + xmlns:_pre="urn:schemas-microsoft-com:office:spreadsheet" + xmlns:jcrutils="xalan://it.openmindonline.urmetdomus.assembler.utils.Path" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" + xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" + xmlns:o="urn:schemas-microsoft-com:office:office" 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>79878b5f-acc8-4ebf-8a11-fb7e64a83348</sv:value> + </sv:property> + <sv:property sv:name="i18nBasename" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.lang.messages</sv:value> + </sv:property> + <sv:property sv:name="icon" sv:type="String"> + <sv:value>/.resources/media/icons/icon24.gif</sv:value> + </sv:property> + <sv:property sv:name="label" sv:type="String"> + <sv:value>media.menu.title</sv:value> + </sv:property> + <sv:property sv:name="onclick" sv:type="String"> + <sv:value>-</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="mgnl: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="Date"> + <sv:value>2005-05-16T20:45:54.530+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastaction" sv:type="Date"> + <sv:value>2008-06-17T14:32:32.595Z</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2008-06-17T14:45:43.728Z</sv:value> + </sv:property> + </sv:node> + <sv:node sv:name="browse"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> + <sv:value>mix:lockable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>359b6b3f-42a9-41fb-b3bf-1eb93d44f0aa</sv:value> + </sv:property> + <sv:property sv:name="icon" sv:type="String"> + <sv:value>/.resources/media/icons/browse16.gif</sv:value> + </sv:property> + <sv:property sv:name="label" sv:type="String"> + <sv:value>media.menu.browse</sv:value> + </sv:property> + <sv:property sv:name="onclick" sv:type="String"> + <sv:value>MgnlAdminCentral.showContent('/.magnolia/pages/mediaBrowser.html');</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="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>2008-06-17T14:45:51.521Z</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastaction" sv:type="Date"> + <sv:value>2008-06-17T14:45:58.283Z</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2008-06-18T15:49:55.693Z</sv:value> + </sv:property> + </sv:node> + </sv:node> +</sv:node> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-12-05 10:39:25
|
Revision: 947 http://openutils.svn.sourceforge.net/openutils/?rev=947&view=rev Author: kurto80 Date: 2008-12-05 10:39:14 +0000 (Fri, 05 Dec 2008) Log Message: ----------- delete Removed Paths: ------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml Deleted: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml 2008-12-05 09:40:40 UTC (rev 946) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml 2008-12-05 10:39:14 UTC (rev 947) @@ -1,99 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<sv:node sv:name="media" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" - xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" xmlns:fn="http://www.w3.org/2005/xpath-functions" - xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:jcr="http://www.jcp.org/jcr/1.0" - xmlns:mgnl="http://www.magnolia.info/jcr/mgnl" xmlns:jcrfn="http://www.jcp.org/jcr/xpath-functions/1.0" - xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:rep="internal" xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:stringutils="xalan://org.apache.commons.lang.StringUtils" - xmlns:_pre="urn:schemas-microsoft-com:office:spreadsheet" - xmlns:jcrutils="xalan://it.openmindonline.urmetdomus.assembler.utils.Path" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" - xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" - xmlns:o="urn:schemas-microsoft-com:office:office" 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>79878b5f-acc8-4ebf-8a11-fb7e64a83348</sv:value> - </sv:property> - <sv:property sv:name="i18nBasename" sv:type="String"> - <sv:value>net.sourceforge.openutils.mgnlmedia.media.lang.messages</sv:value> - </sv:property> - <sv:property sv:name="icon" sv:type="String"> - <sv:value>/.resources/media/icons/icon24.gif</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.menu.title</sv:value> - </sv:property> - <sv:property sv:name="onclick" sv:type="String"> - <sv:value>-</sv:value> - </sv:property> - <sv:node sv:name="MetaData"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:metaData</sv:value> - </sv:property> - <sv:property sv:name="mgnl: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="Date"> - <sv:value>2005-05-16T20:45:54.530+02:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-06-17T14:32:32.595Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-06-17T14:45:43.728Z</sv:value> - </sv:property> - </sv:node> - <sv:node sv:name="browse"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:contentNode</sv:value> - </sv:property> - <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> - <sv:value>mix:lockable</sv:value> - </sv:property> - <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>359b6b3f-42a9-41fb-b3bf-1eb93d44f0aa</sv:value> - </sv:property> - <sv:property sv:name="icon" sv:type="String"> - <sv:value>/.resources/media/icons/browse16.gif</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.menu.browse</sv:value> - </sv:property> - <sv:property sv:name="onclick" sv:type="String"> - <sv:value>MgnlAdminCentral.showContent('/.magnolia/pages/mediaBrowser.html');</sv:value> - </sv:property> - <sv:node sv:name="MetaData"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:metaData</sv:value> - </sv:property> - <sv:property sv:name="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>2008-06-17T14:45:51.521Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-06-17T14:45:58.283Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-06-18T15:49:55.693Z</sv:value> - </sv:property> - </sv:node> - </sv:node> -</sv:node> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-12-05 09:40:44
|
Revision: 946 http://openutils.svn.sourceforge.net/openutils/?rev=946&view=rev Author: kurto80 Date: 2008-12-05 09:40:40 +0000 (Fri, 05 Dec 2008) Log Message: ----------- openutils-mgnlmedia spostati messaggi in resources Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml Added Paths: ----------- trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang/ Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml 2008-12-04 18:40:50 UTC (rev 945) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml 2008-12-05 09:40:40 UTC (rev 946) @@ -1,22 +1,26 @@ <?xml version="1.0" encoding="UTF-8"?> -<sv:node sv:name="media" xmlns:jcrutils="xalan://it.openmindonline.urmetdomus.assembler.utils.Path" - xmlns:stringutils="xalan://org.apache.commons.lang.StringUtils" xmlns:jcr="http://www.jcp.org/jcr/1.0" - xmlns:mgnl="http://www.magnolia.info/jcr/mgnl" xmlns:rep="internal" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" - xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" xmlns:jcrfn="http://www.jcp.org/jcr/xpath-functions/1.0"> +<sv:node sv:name="media" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" + xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" xmlns:fn="http://www.w3.org/2005/xpath-functions" + xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:jcr="http://www.jcp.org/jcr/1.0" + xmlns:mgnl="http://www.magnolia.info/jcr/mgnl" xmlns:jcrfn="http://www.jcp.org/jcr/xpath-functions/1.0" + xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:rep="internal" xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:stringutils="xalan://org.apache.commons.lang.StringUtils" + xmlns:_pre="urn:schemas-microsoft-com:office:spreadsheet" + xmlns:jcrutils="xalan://it.openmindonline.urmetdomus.assembler.utils.Path" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" + xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" + xmlns:o="urn:schemas-microsoft-com:office:office" 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>79878b5f-acc8-4ebf-8a11-fb7e64a83348</sv:value> </sv:property> - <sv:property sv:name="icon" sv:type="String"> - <sv:value>/.resources/media/icons/icon24.gif</sv:value> - </sv:property> <sv:property sv:name="i18nBasename" sv:type="String"> <sv:value>net.sourceforge.openutils.mgnlmedia.media.lang.messages</sv:value> </sv:property> + <sv:property sv:name="icon" sv:type="String"> + <sv:value>/.resources/media/icons/icon24.gif</sv:value> + </sv:property> <sv:property sv:name="label" sv:type="String"> <sv:value>media.menu.title</sv:value> </sv:property> @@ -55,7 +59,6 @@ </sv:property> <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> <sv:value>mix:lockable</sv:value> - <sv:value>mix:versionable</sv:value> </sv:property> <sv:property sv:name="jcr:uuid" sv:type="String"> <sv:value>359b6b3f-42a9-41fb-b3bf-1eb93d44f0aa</sv:value> @@ -93,51 +96,4 @@ </sv:property> </sv:node> </sv:node> - - <!-- - <sv:node sv:name="search"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:contentNode</sv:value> - </sv:property> - <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> - <sv:value>mix:lockable</sv:value> - <sv:value>mix:versionable</sv:value> - </sv:property> - <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>382c97bf-686c-482b-857f-139d4f721a32</sv:value> - </sv:property> - <sv:property sv:name="icon" sv:type="String"> - <sv:value>/.resources/media/icons/search16.gif</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.menu.search</sv:value> - </sv:property> - <sv:property sv:name="onclick" sv:type="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="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>2008-06-17T14:45:51.521Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-06-17T14:57:32.725Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-06-17T14:57:42.575Z</sv:value> - </sv:property> - </sv:node> - </sv:node> - --> </sv:node> Property changes on: trunk/openutils-mgnlmedia/src/main/resources/net/sourceforge/openutils/mgnlmedia/media/lang ___________________________________________________________________ Added: svn:mergeinfo + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-12-04 18:40:54
|
Revision: 945 http://openutils.svn.sourceforge.net/openutils/?rev=945&view=rev Author: kurto80 Date: 2008-12-04 18:40:50 +0000 (Thu, 04 Dec 2008) Log Message: ----------- openutils-mgnlmedia code cleaning fix Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml Removed Paths: ------------- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lang/ Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml 2008-12-04 11:40:51 UTC (rev 944) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml 2008-12-04 18:40:50 UTC (rev 945) @@ -93,6 +93,8 @@ </sv:property> </sv:node> </sv:node> + + <!-- <sv:node sv:name="search"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:contentNode</sv:value> @@ -137,4 +139,5 @@ </sv:property> </sv:node> </sv:node> + --> </sv:node> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-12-04 11:42:10
|
Revision: 940 http://openutils.svn.sourceforge.net/openutils/?rev=940&view=rev Author: fgiust Date: 2008-12-04 11:35:26 +0000 (Thu, 04 Dec 2008) Log Message: ----------- basic docs Added Paths: ----------- trunk/openutils-mgnlmedia/src/site/ trunk/openutils-mgnlmedia/src/site/apt/ trunk/openutils-mgnlmedia/src/site/apt/index.apt trunk/openutils-mgnlmedia/src/site/changes/ trunk/openutils-mgnlmedia/src/site/changes/changes.xml trunk/openutils-mgnlmedia/src/site/site.xml Added: trunk/openutils-mgnlmedia/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlmedia/src/site/apt/index.apt (rev 0) +++ trunk/openutils-mgnlmedia/src/site/apt/index.apt 2008-12-04 11:35:26 UTC (rev 940) @@ -0,0 +1,28 @@ + -------------------------- + openutils-mgnlmedia + -------------------------- + Fabrizio Giustina + -------------------------- + +About openutils-mgnlmedia + + openutils-mgnlmedia is a custom {{{http://www.magnolia.info}magnolia}} module for the management of multimedia assets + like images and videos. + + <<This module requires magnolia 3.6.x, and will not work on any earlier version!>> + + + +Configuration + + First of all drop the openutils-mgnlstripes jar and the stripes jar into WEB-INF/lib, or (better) if you are using maven + just declare the following dependency: + ++----------------------------------------------+ + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnlmedia</artifactId> + <version>0.1</version> + </dependency> ++----------------------------------------------+ + Property changes on: trunk/openutils-mgnlmedia/src/site/apt/index.apt ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-mgnlmedia/src/site/changes/changes.xml =================================================================== --- trunk/openutils-mgnlmedia/src/site/changes/changes.xml (rev 0) +++ trunk/openutils-mgnlmedia/src/site/changes/changes.xml 2008-12-04 11:35:26 UTC (rev 940) @@ -0,0 +1,15 @@ +<?xml version="1.0"?> + <!-- + "type" attribute can be: add, remove, update or fix. +--> +<document> + <properties> + <title>Changes</title> + <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> + </properties> + <body> + <release version="0.1" date="2008-12-04" description=""> + <action type="add" dev="fgiust">first alpha release</action> + </release> + </body> +</document> \ No newline at end of file Property changes on: trunk/openutils-mgnlmedia/src/site/changes/changes.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Added: trunk/openutils-mgnlmedia/src/site/site.xml =================================================================== --- trunk/openutils-mgnlmedia/src/site/site.xml (rev 0) +++ trunk/openutils-mgnlmedia/src/site/site.xml 2008-12-04 11:35:26 UTC (rev 940) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils mgnlmedia"> + <publishDate position="navigation-bottom" format="yyyy-MM-dd" /> + <version position="navigation-bottom" /> + <bannerRight> + <name>Openutils</name> + <src>http://openutils.sourceforge.net/images/openutils-logo.png + </src> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://www.sourceforge.net/projects/openutils</href> + </bannerLeft> + <body> + <head> + <link rel="icon" href="images/favicon.ico" /> + </head> + <breadcrumbs> + <item name="openutils" href="http://openutils.sourceforge.net/" /> + <item name="openutils-mgnlstripes" href="http://openutils.sourceforge.net/openutils-mgnlmedia" /> + </breadcrumbs> + <menu name="openutils mgnlmedia"> + <item name="About" href="index.html"></item> + </menu> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + </body> + <skin> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-maven-skin</artifactId> + <version>1.1</version> + </skin> +</project> Property changes on: trunk/openutils-mgnlmedia/src/site/site.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-12-04 11:42:07
|
Revision: 943 http://openutils.svn.sourceforge.net/openutils/?rev=943&view=rev Author: fgiust Date: 2008-12-04 11:40:42 +0000 (Thu, 04 Dec 2008) Log Message: ----------- [maven-release-plugin] copy for tag openutils-mgnlmedia-0.1 Added Paths: ----------- tags/openutils-mgnlmedia-0.1/ tags/openutils-mgnlmedia-0.1/pom.xml tags/openutils-mgnlmedia-0.1/src/site/ Removed Paths: ------------- tags/openutils-mgnlmedia-0.1/pom.xml Deleted: tags/openutils-mgnlmedia-0.1/pom.xml =================================================================== --- trunk/openutils-mgnlmedia/pom.xml 2008-12-04 10:26:51 UTC (rev 939) +++ tags/openutils-mgnlmedia-0.1/pom.xml 2008-12-04 11:40:42 UTC (rev 943) @@ -1,72 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>10</version> - <relativePath>..</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - <packaging>jar</packaging> - <artifactId>openutils-mgnlmedia</artifactId> - <name>openutils-mgnlmedia</name> - <version>1.0-SNAPSHOT</version> - <licenses> - <license> - <name>GPLv3</name> - <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> - </license> - </licenses> - <build> - <resources> - <resource> - <filtering>false</filtering> - <directory>src/main/resources</directory> - <includes> - <include>**/*</include> - </includes> - </resource> - <resource> - <filtering>true</filtering> - <directory>src/main/resources</directory> - <includes> - <include>META-INF/magnolia/*</include> - </includes> - </resource> - </resources> - </build> - <dependencies> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-core</artifactId> - <version>3.6.3</version> - </dependency> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-module-admininterface</artifactId> - <version>3.6.3</version> - </dependency> - <dependency> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils-mgnltasks</artifactId> - <version>3.5.5</version> - </dependency> - <dependency> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils-mgnlext</artifactId> - <version>2.1</version> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <classifier>jdk15</classifier> - <version>5.1</version> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> -</project> \ No newline at end of file Copied: tags/openutils-mgnlmedia-0.1/pom.xml (from rev 942, trunk/openutils-mgnlmedia/pom.xml) =================================================================== --- tags/openutils-mgnlmedia-0.1/pom.xml (rev 0) +++ tags/openutils-mgnlmedia-0.1/pom.xml 2008-12-04 11:40:42 UTC (rev 943) @@ -0,0 +1,78 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>10</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + <packaging>jar</packaging> + <artifactId>openutils-mgnlmedia</artifactId> + <name>openutils-mgnlmedia</name> + <version>0.1</version> + <licenses> + <license> + <name>GPLv3</name> + <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> + </license> + </licenses> + <build> + <resources> + <resource> + <filtering>false</filtering> + <directory>src/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + <resource> + <filtering>true</filtering> + <directory>src/main/resources</directory> + <includes> + <include>META-INF/magnolia/*</include> + </includes> + </resource> + </resources> + </build> + <dependencies> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-core</artifactId> + <version>3.6.3</version> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-module-admininterface</artifactId> + <version>3.6.3</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnltasks</artifactId> + <version>3.5.5</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnlext</artifactId> + <version>2.1</version> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.1</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlmedia-0.1</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlmedia-0.1</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlmedia-0.1</url> + </scm> +</project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-12-04 11:42:06
|
Revision: 942 http://openutils.svn.sourceforge.net/openutils/?rev=942&view=rev Author: fgiust Date: 2008-12-04 11:40:23 +0000 (Thu, 04 Dec 2008) Log Message: ----------- [maven-release-plugin] prepare release openutils-mgnlmedia-0.1 Modified Paths: -------------- trunk/openutils-mgnlmedia/pom.xml Modified: trunk/openutils-mgnlmedia/pom.xml =================================================================== --- trunk/openutils-mgnlmedia/pom.xml 2008-12-04 11:37:50 UTC (rev 941) +++ trunk/openutils-mgnlmedia/pom.xml 2008-12-04 11:40:23 UTC (rev 942) @@ -9,7 +9,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlmedia</artifactId> <name>openutils-mgnlmedia</name> - <version>0.1-SNAPSHOT</version> + <version>0.1</version> <licenses> <license> <name>GPLv3</name> @@ -69,4 +69,10 @@ </exclusions> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlmedia-0.1</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlmedia-0.1</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlmedia-0.1</url> + </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-12-04 11:42:03
|
Revision: 941 http://openutils.svn.sourceforge.net/openutils/?rev=941&view=rev Author: fgiust Date: 2008-12-04 11:37:50 +0000 (Thu, 04 Dec 2008) Log Message: ----------- change version Modified Paths: -------------- trunk/openutils-mgnlmedia/pom.xml Modified: trunk/openutils-mgnlmedia/pom.xml =================================================================== --- trunk/openutils-mgnlmedia/pom.xml 2008-12-04 11:35:26 UTC (rev 940) +++ trunk/openutils-mgnlmedia/pom.xml 2008-12-04 11:37:50 UTC (rev 941) @@ -9,7 +9,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlmedia</artifactId> <name>openutils-mgnlmedia</name> - <version>1.0-SNAPSHOT</version> + <version>0.1-SNAPSHOT</version> <licenses> <license> <name>GPLv3</name> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2008-12-04 11:42:03
|
Revision: 944 http://openutils.svn.sourceforge.net/openutils/?rev=944&view=rev Author: fgiust Date: 2008-12-04 11:40:51 +0000 (Thu, 04 Dec 2008) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-mgnlmedia/pom.xml Modified: trunk/openutils-mgnlmedia/pom.xml =================================================================== --- trunk/openutils-mgnlmedia/pom.xml 2008-12-04 11:40:42 UTC (rev 943) +++ trunk/openutils-mgnlmedia/pom.xml 2008-12-04 11:40:51 UTC (rev 944) @@ -9,7 +9,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlmedia</artifactId> <name>openutils-mgnlmedia</name> - <version>0.1</version> + <version>0.2-SNAPSHOT</version> <licenses> <license> <name>GPLv3</name> @@ -69,10 +69,4 @@ </exclusions> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlmedia-0.1</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlmedia-0.1</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlmedia-0.1</url> - </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-12-04 10:26:58
|
Revision: 939 http://openutils.svn.sourceforge.net/openutils/?rev=939&view=rev Author: kurto80 Date: 2008-12-04 10:26:51 +0000 (Thu, 04 Dec 2008) Log Message: ----------- openutils-mgnlmedia code cleaning Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.commands.default.activateMedia.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.tools.mediaJCR.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.fileAudio.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.fileImage.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.fileVideo.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.mediaSelection.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.mediaAudioDlg.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.mediaImageDlg.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.mediaVideoDlg.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.mediaYoutubeDlg.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.mediatypes.audio.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.mediatypes.image.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.mediatypes.video.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.mediatypes.youtube.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.pages.mediaBrowser.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.pages.mediaFolderSelection.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.pages.mediaFolderView.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.trees.media-jcr.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.trees.media.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.server.URI2RepositoryMapping.mappings.media.xml trunk/openutils-mgnlmedia/src/main/resources/mgnl-messages/media/messages_en.properties trunk/openutils-mgnlmedia/src/main/resources/mgnl-messages/media/messages_it.properties Added Paths: ----------- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lang/ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lang/messages_en.properties trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties Added: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lang/messages_en.properties =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lang/messages_en.properties (rev 0) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lang/messages_en.properties 2008-12-04 10:26:51 UTC (rev 939) @@ -0,0 +1,96 @@ +media.dialogs.tabTitle.title.label=Title + +media.dialogs.tabDescription.description.label=Description + +media.dialogs.tabAbstract.abstract.label=Abstract + +media.dialogs.tabTags.tags.label=Tags + +media.dialogs.tabImage.label=Image +media.dialogs.tabImage.image.label=Image +media.dialogs.tabImage.colors.label=Colors / BW +media.dialogs.tabImage.colors.options.0.label=Colors +media.dialogs.tabImage.colors.options.1.label=Black & White + +media.dialogs.tabAudio.label=Audio +media.dialogs.tabAudio.audio.label=Audio + +media.dialogs.tabVideo.label=Video +media.dialogs.tabVideo.video.label=Video +media.dialogs.tabVideo.image.label=Image +media.dialogs.tabVideo.colors.label=Colors / BW +media.dialogs.tabVideo.colors.options.0.label=Colors +media.dialogs.tabVideo.colors.options.1.label=Black & White + +media.dialogs.tabVideo.videoUrl.label=Youtube video url + +media.dialogs.tabWallpaper.label=Wallpaper +media.dialogs.tabWallpaper.wallpaper-1280x800.label=1280x800 resolution +media.dialogs.tabWallpaper.wallpaper-1024x768.label=1024x768 resolution +media.dialogs.tabWallpaper.wallpaper-1080x1050.label=1680x1050 resolution +media.dialogs.tabWallpaper.image.label=Preview + +media.dialogs.tabScreensaver.label=Screensaver +media.dialogs.tabScreensaver.winScreensaver.label=Screensaver for Windows +media.dialogs.tabScreensaver.macScreensaver.label=Screensaver for Mac +media.dialogs.tabScreensaver.image.label=Preview + +media.dialogs.tabOther.label=Other +media.dialogs.tabOther.other.label=Other + +media.dialogs.tabDocument.label=Document +media.dialogs.tabDocument.document.label=Document +media.dialogs.tabDocument.docType.label=Type +media.dialogs.tabDocument.docType.options.0.label=Manual +media.dialogs.tabDocument.docType.options.1.label=Brochure +media.dialogs.tabDocument.classOrModel.label=Class or model +media.dialogs.tabDocument.docYear.label=Year + +media.dialogs.tabTitle.label=Title +media.dialogs.tabAbstract.label=Abstract +media.dialogs.tabDescription.label=Description +media.dialogs.tabTags.label=Tags +media.dialogs.tabAttributes.label=Attributes +media.dialogs.tabAttributes.copyright.label=Copyright +media.dialogs.tabAttributes.source.label=Source +media.dialogs.tabAttributes.creator.label=Created by +media.dialogs.tabAttributes.creationDate.label=Created on +media.dialogs.tabAttributes.modificationDate.label=Modified on + +tree.media.folders=Media folders tree +media.loadzip=Load zip archive +media.select=Select media... +media.remove=Remove media + +media.types.image=Images +media.types.audio=Mp3s +media.types.youtube=YouTube +media.types.video=Flvs +media.types.wallpaper=Wallpapers +media.types.screensaver=Screensavers +media.types.other=Other +media.types.document=Document + +media.types.image.load=Upload new image +media.types.audio.load=Upload new mp3 +media.types.youtube.load=Link YouTube video +media.types.video.load=Upload new flv +media.types.wallpaper.load=Upload new wallpapers +media.types.screensaver.load=Upload new screensavers +media.types.other.load=Upload new other +media.types.document.load=Upload new document + +media.edit=Edit +media.delete=Delete +media.copy=Copy +media.move=Move +media.activate=Activate +media.deactivate=Deactivate +media.pages=Pages +media.nopages=Not used +media.notpublished=Not activated +media.select=Select + +media.menu.title=Media +media.menu.browse=Browse +media.menu.search=Search \ No newline at end of file Added: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties (rev 0) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/lang/messages_it.properties 2008-12-04 10:26:51 UTC (rev 939) @@ -0,0 +1,97 @@ +media.dialogs.tabTitle.title.label=Titolo + +media.dialogs.tabDescription.description.label=Descrizione + +media.dialogs.tabAbstract.abstract.label=Abstract + +media.dialogs.tabTags.tags.label=Tags + +media.dialogs.tabImage.label=Immagine +media.dialogs.tabImage.image.label=Immagine +media.dialogs.tabImage.colors.label=Colori / BN +media.dialogs.tabImage.colors.options.0.label=Colori +media.dialogs.tabImage.colors.options.1.label=Bianco e nero + +media.dialogs.tabAudio.label=Audio +media.dialogs.tabAudio.audio.label=Audio + +media.dialogs.tabVideo.label=Video +media.dialogs.tabVideo.video.label=Video +media.dialogs.tabVideo.image.label=Immagine +media.dialogs.tabVideo.colors.label=Colori / BN +media.dialogs.tabVideo.colors.options.0.label=Colori +media.dialogs.tabVideo.colors.options.1.label=Bianco e nero + +media.dialogs.tabVideo.videoUrl.label=Youtube video url + +media.dialogs.tabWallpaper.label=Wallpaper +media.dialogs.tabWallpaper.wallpaper-1280x800.label=Risoluzione 1280x800 +media.dialogs.tabWallpaper.wallpaper-1024x768.label=Risoluzione 1024x768 +media.dialogs.tabWallpaper.wallpaper-1080x1050.label=Risoluzione 1680x1050 +media.dialogs.tabWallpaper.image.label=Preview + +media.dialogs.tabScreensaver.label=Screensaver +media.dialogs.tabScreensaver.winScreensaver.label=Screensaver per Windows +media.dialogs.tabScreensaver.macScreensaver.label=Screensaver per Mac +media.dialogs.tabScreensaver.image.label=Preview + +media.dialogs.tabOther.label=Other +media.dialogs.tabOther.other.label=Other + +media.dialogs.tabDocument.label=Documento +media.dialogs.tabDocument.document.label=Documento +media.dialogs.tabDocument.docType.label=Tipo +media.dialogs.tabDocument.docType.options.0.label=Manuale +media.dialogs.tabDocument.docType.options.1.label=Brochure +media.dialogs.tabDocument.classOrModel.label=Classe o modello +media.dialogs.tabDocument.docYear.label=Anno + +media.dialogs.tabTitle.label=Titolo +media.dialogs.tabAbstract.label=Abstract +media.dialogs.tabDescription.label=Descrizione +media.dialogs.tabTags.label=Tags +media.dialogs.tabAttributes.label=Attributi +media.dialogs.tabAttributes.copyright.label=Copyright +media.dialogs.tabAttributes.source.label=Sorgente +media.dialogs.tabAttributes.creator.label=Creato da +media.dialogs.tabAttributes.creationDate.label=Creato il +media.dialogs.tabAttributes.modificationDate.label=Modificato il + +tree.media.folders=Alberatura media +media.loadzip=Carica archivio zip +media.select=Seleziona media... +media.remove=Rimuovi media + + +media.types.image=Immagini +media.types.audio=Mp3 +media.types.youtube=YouTube +media.types.video=Flv +media.types.wallpaper=Wallpaper +media.types.screensaver=Screensaver +media.types.other=Altro +media.types.document=Documento + +media.types.image.load=Carica immagine +media.types.audio.load=Carica file mp3 +media.types.youtube.load=Collega video YouTube +media.types.video.load=Carica video flv +media.types.wallpaper.load=Carica wallpaper +media.types.screensaver.load=Carica screensaver +media.types.other.load=Carica altro +media.types.document.load=Carica documento + +media.edit=Modifica +media.delete=Elimina +media.copy=Copia +media.move=Sposta +media.activate=Attiva +media.deactivate=Deattiva +media.pages=Pagine +media.nopages=Non utilizzato +media.notpublished=Non attivato +media.select=Seleziona + +media.menu.title=Media +media.menu.browse=Naviga +media.menu.search=Cerca \ No newline at end of file Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.commands.default.activateMedia.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.commands.default.activateMedia.xml 2008-12-03 16:44:10 UTC (rev 938) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.commands.default.activateMedia.xml 2008-12-04 10:26:51 UTC (rev 939) @@ -14,6 +14,9 @@ <sv:property sv:name="class" sv:type="String"> <sv:value>net.sourceforge.openutils.mgnlmedia.media.commands.MediaActivationCommand</sv:value> </sv:property> + <sv:property sv:name="i18nBasename" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.lang.messages</sv:value> + </sv:property> <sv:node sv:name="MetaData"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:metaData</sv:value> Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml 2008-12-03 16:44:10 UTC (rev 938) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.media.xml 2008-12-04 10:26:51 UTC (rev 939) @@ -14,6 +14,9 @@ <sv:property sv:name="icon" sv:type="String"> <sv:value>/.resources/media/icons/icon24.gif</sv:value> </sv:property> + <sv:property sv:name="i18nBasename" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.lang.messages</sv:value> + </sv:property> <sv:property sv:name="label" sv:type="String"> <sv:value>media.menu.title</sv:value> </sv:property> Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.tools.mediaJCR.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.tools.mediaJCR.xml 2008-12-03 16:44:10 UTC (rev 938) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.adminInterface.config.menu.tools.mediaJCR.xml 2008-12-04 10:26:51 UTC (rev 939) @@ -11,6 +11,9 @@ <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> <sv:value>mix:versionable</sv:value> </sv:property> + <sv:property sv:name="i18nBasename" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.lang.messages</sv:value> + </sv:property> <sv:property sv:name="jcr:uuid" sv:type="String"> <sv:value>8dba574e-63dd-4de3-a610-ef1a2ebca264</sv:value> </sv:property> Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.fileAudio.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.fileAudio.xml 2008-12-03 16:44:10 UTC (rev 938) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.fileAudio.xml 2008-12-04 10:26:51 UTC (rev 939) @@ -18,6 +18,9 @@ <sv:property sv:name="class" sv:type="String"> <sv:value>net.sourceforge.openutils.mgnlmedia.media.dialog.DialogFileAudio</sv:value> </sv:property> + <sv:property sv:name="i18nBasename" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.lang.messages</sv:value> + </sv:property> <sv:node sv:name="MetaData"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:metaData</sv:value> Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.fileImage.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.fileImage.xml 2008-12-03 16:44:10 UTC (rev 938) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.fileImage.xml 2008-12-04 10:26:51 UTC (rev 939) @@ -18,6 +18,9 @@ <sv:property sv:name="class" sv:type="String"> <sv:value>net.sourceforge.openutils.mgnlmedia.media.dialog.DialogFileImage</sv:value> </sv:property> + <sv:property sv:name="i18nBasename" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.lang.messages</sv:value> + </sv:property> <sv:node sv:name="MetaData"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:metaData</sv:value> Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.fileVideo.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.fileVideo.xml 2008-12-03 16:44:10 UTC (rev 938) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.fileVideo.xml 2008-12-04 10:26:51 UTC (rev 939) @@ -18,6 +18,9 @@ <sv:property sv:name="class" sv:type="String"> <sv:value>net.sourceforge.openutils.mgnlmedia.media.dialog.DialogFileVideo</sv:value> </sv:property> + <sv:property sv:name="i18nBasename" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.lang.messages</sv:value> + </sv:property> <sv:node sv:name="MetaData"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:metaData</sv:value> Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.mediaSelection.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.mediaSelection.xml 2008-12-03 16:44:10 UTC (rev 938) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.controls.mediaSelection.xml 2008-12-04 10:26:51 UTC (rev 939) @@ -17,6 +17,9 @@ <sv:property sv:name="class" sv:type="String"> <sv:value>net.sourceforge.openutils.mgnlmedia.media.dialog.DialogSelectMedia</sv:value> </sv:property> + <sv:property sv:name="i18nBasename" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.lang.messages</sv:value> + </sv:property> <sv:node sv:name="MetaData"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:metaData</sv:value> Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.mediaAudioDlg.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.mediaAudioDlg.xml 2008-12-03 16:44:10 UTC (rev 938) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.mediaAudioDlg.xml 2008-12-04 10:26:51 UTC (rev 939) @@ -18,6 +18,9 @@ <sv:property sv:name="class" sv:type="String"> <sv:value>net.sourceforge.openutils.mgnlmedia.media.dialog.LayerDialogMVC</sv:value> </sv:property> + <sv:property sv:name="i18nBasename" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.lang.messages</sv:value> + </sv:property> <sv:property sv:name="height" sv:type="String"> <sv:value>450</sv:value> </sv:property> @@ -178,7 +181,7 @@ <sv:value>2008-08-13T15:37:07.580+02:00</sv:value> </sv:property> </sv:node> - <sv:node sv:name="title-en"> + <sv:node sv:name="title"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:contentNode</sv:value> </sv:property> @@ -189,7 +192,7 @@ <sv:value>edit</sv:value> </sv:property> <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTitle.title-en.label</sv:value> + <sv:value>media.dialogs.tabTitle.title.label</sv:value> </sv:property> <sv:property sv:name="type" sv:type="String"> <sv:value>String</sv:value> @@ -221,221 +224,6 @@ </sv:property> </sv:node> </sv:node> - <sv:node sv:name="title-en_us"> - <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>317b1583-9299-4a2e-9534-a77ccc8464fc</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTitle.title-en_us.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T15:10:45.788Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-08-25T17:43:35.351+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="title-de"> - <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>62759a96-6286-4129-a1db-7e4da5919f98</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTitle.title-de.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T15:10:45.789Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-08-13T15:36:31.090+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="title-fr"> - <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>df05ef00-8613-4568-8554-0092d968aee4</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTitle.title-fr.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T15:10:45.789Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-08-13T15:36:41.690+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="title-it"> - <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>b0670e2c-7996-446d-bb5b-4b326038fe98</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTitle.title-it.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T15:10:45.790Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-08-13T15:36:53.858+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="title-es"> - <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>0b7faf78-1053-4c4f-8689-d3c5b49c4295</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTitle.title-es.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T15:10:45.790Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-09-08T11:04:33.743+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> </sv:node> <sv:node sv:name="tabDescription"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> @@ -476,7 +264,7 @@ <sv:value>2008-06-21T10:33:31.031Z</sv:value> </sv:property> </sv:node> - <sv:node sv:name="description-en"> + <sv:node sv:name="description"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:contentNode</sv:value> </sv:property> @@ -487,7 +275,7 @@ <sv:value>edit</sv:value> </sv:property> <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabDescription.description-en.label</sv:value> + <sv:value>media.dialogs.tabDescription.description.label</sv:value> </sv:property> <sv:property sv:name="type" sv:type="String"> <sv:value>String</sv:value> @@ -519,221 +307,6 @@ </sv:property> </sv:node> </sv:node> - <sv:node sv:name="description-en_us"> - <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>3bee1b3f-3a09-4c5a-9d15-2b9152a495da</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabDescription.description-en_us.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T15:10:45.788Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-08-25T18:13:56.261+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="description-de"> - <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>bf18ea59-2250-4814-941c-b9072dbec21d</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabDescription.description-de.label</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="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-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T16:35:26.532Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-06-21T10:48:16.360Z</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="description-fr"> - <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>7b2820c1-e856-4135-870b-365893b94b5e</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabDescription.description-fr.label</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="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-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T16:35:26.533Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-06-21T10:48:36.286Z</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="description-it"> - <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>64f454fe-55c3-4377-92fb-f913dd339a77</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabDescription.description-it.label</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="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-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T16:35:26.536Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-06-21T10:48:56.742Z</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="description-es"> - <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>695465c6-304f-4055-a237-a7f85d33f431</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabDescription.description-es.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T16:35:26.536Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-09-08T11:04:21.602+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> </sv:node> <sv:node sv:name="tabTags"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> @@ -774,7 +347,7 @@ <sv:value>2008-06-21T10:52:35.199Z</sv:value> </sv:property> </sv:node> - <sv:node sv:name="tags-en"> + <sv:node sv:name="tags"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:contentNode</sv:value> </sv:property> @@ -785,7 +358,7 @@ <sv:value>edit</sv:value> </sv:property> <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTags.tags-en.label</sv:value> + <sv:value>media.dialogs.tabTags.tags.label</sv:value> </sv:property> <sv:property sv:name="type" sv:type="String"> <sv:value>String</sv:value> @@ -817,221 +390,6 @@ </sv:property> </sv:node> </sv:node> - <sv:node sv:name="tags-en_us"> - <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>2c1a48bf-9945-4d00-b059-732cb3bf63dd</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTags.tags-en_us.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T15:10:45.791Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-08-25T18:15:47.620+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="tags-de"> - <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>38c8750e-50dc-4123-a3bd-99c6bb04f139</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTags.tags-de.label</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="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-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T16:35:26.538Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-06-21T10:49:55.190Z</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="tags-fr"> - <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>e1643b17-6317-4cf7-8663-d00c27b945e1</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTags.tags-fr.label</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="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-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T16:35:26.539Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-06-21T10:50:03.816Z</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="tags-it"> - <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>7444c826-3d3c-432f-888f-5e9f8015f6d2</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTags.tags-it.label</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="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-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T16:35:26.539Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-06-21T10:50:13.630Z</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="tags-es"> - <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>3e70c1ca-7237-46ca-aa3d-98998685a528</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTags.tags-es.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T16:35:26.539Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-09-08T11:04:12.076+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> </sv:node> <sv:node sv:name="tabAttributes"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> Modified: trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.mediaImageDlg.xml =================================================================== --- trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.mediaImageDlg.xml 2008-12-03 16:44:10 UTC (rev 938) +++ trunk/openutils-mgnlmedia/src/main/resources/mgnl-bootstrap/media/config.modules.media.dialogs.mediaImageDlg.xml 2008-12-04 10:26:51 UTC (rev 939) @@ -18,6 +18,9 @@ <sv:property sv:name="class" sv:type="String"> <sv:value>net.sourceforge.openutils.mgnlmedia.media.dialog.LayerDialogMVC</sv:value> </sv:property> + <sv:property sv:name="i18nBasename" sv:type="String"> + <sv:value>net.sourceforge.openutils.mgnlmedia.media.lang.messages</sv:value> + </sv:property> <sv:property sv:name="height" sv:type="String"> <sv:value>450</sv:value> </sv:property> @@ -341,7 +344,7 @@ <sv:value>2008-08-13T15:37:22.494+02:00</sv:value> </sv:property> </sv:node> - <sv:node sv:name="title-en"> + <sv:node sv:name="title"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:contentNode</sv:value> </sv:property> @@ -352,7 +355,7 @@ <sv:value>edit</sv:value> </sv:property> <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTitle.title-en.label</sv:value> + <sv:value>media.dialogs.tabTitle.title.label</sv:value> </sv:property> <sv:property sv:name="type" sv:type="String"> <sv:value>String</sv:value> @@ -384,221 +387,6 @@ </sv:property> </sv:node> </sv:node> - <sv:node sv:name="title-en_us"> - <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>cf4cb5cc-ef66-435a-a6a1-3385a19e512d</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTitle.title-en_us.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T15:10:45.788Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-08-25T17:43:56.527+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="title-de"> - <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>0efab464-6c61-4cc5-972c-645327335908</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTitle.title-de.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T15:10:45.789Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-08-13T15:36:31.090+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="title-fr"> - <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>0e9a3fa8-297b-4436-b0d6-6daa0535d206</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTitle.title-fr.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T15:10:45.789Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-08-13T15:36:41.690+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="title-it"> - <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>5df3135d-5109-4550-90af-dae28ca9cae3</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTitle.title-it.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T15:10:45.790Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-08-13T15:36:53.858+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> - <sv:node sv:name="title-es"> - <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>992b48a0-1f2e-428f-b3da-d0a61c28c5a4</sv:value> - </sv:property> - <sv:property sv:name="controlType" sv:type="String"> - <sv:value>edit</sv:value> - </sv:property> - <sv:property sv:name="label" sv:type="String"> - <sv:value>media.dialogs.tabTitle.title-es.label</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="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>admin</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T17:20:40.266+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastaction" sv:type="Date"> - <sv:value>2008-07-02T15:10:45.790Z</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2008-09-08T11:05:05.381+02:00</sv:value> - </sv:property> - </sv:node> - </sv:node> </sv:node> <sv:node sv:name="tabDescription"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> @@ -639,7 +427,7 @@ <sv:value>2008-06-21T10:33:31.031Z</sv:value> </sv:property> </sv:node> - <sv:node sv:name="description-en"> + <sv:node sv:name="description"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>mgnl:contentNode</sv:value> </sv:property> @@ -650,7 +438,7 @@ <sv:value>edit</sv:value>... [truncated message content] |
From: <mol...@us...> - 2008-12-03 16:44:11
|
Revision: 938 http://openutils.svn.sourceforge.net/openutils/?rev=938&view=rev Author: molaschi Date: 2008-12-03 16:44:10 +0000 (Wed, 03 Dec 2008) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-mgnlgroovy/pom.xml Modified: trunk/openutils-mgnlgroovy/pom.xml =================================================================== --- trunk/openutils-mgnlgroovy/pom.xml 2008-12-03 16:44:01 UTC (rev 937) +++ trunk/openutils-mgnlgroovy/pom.xml 2008-12-03 16:44:10 UTC (rev 938) @@ -9,7 +9,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlgroovy</artifactId> <name>openutils-mgnlmgnlgroovy</name> - <version>1.0</version> + <version>1.1-SNAPSHOT</version> <licenses> <license> <name>GPLv3</name> @@ -75,10 +75,4 @@ </snapshots> </repository> </repositories> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlgroovy-1.0</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlgroovy-1.0</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlgroovy-1.0</url> - </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2008-12-03 16:44:03
|
Revision: 937 http://openutils.svn.sourceforge.net/openutils/?rev=937&view=rev Author: molaschi Date: 2008-12-03 16:44:01 +0000 (Wed, 03 Dec 2008) Log Message: ----------- [maven-release-plugin] copy for tag openutils-mgnlgroovy-1.0 Added Paths: ----------- tags/openutils-mgnlgroovy-1.0/ tags/openutils-mgnlgroovy-1.0/pom.xml Removed Paths: ------------- tags/openutils-mgnlgroovy-1.0/pom.xml Deleted: tags/openutils-mgnlgroovy-1.0/pom.xml =================================================================== --- trunk/openutils-mgnlgroovy/pom.xml 2008-12-03 16:41:21 UTC (rev 935) +++ tags/openutils-mgnlgroovy-1.0/pom.xml 2008-12-03 16:44:01 UTC (rev 937) @@ -1,78 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd "> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>10</version> - <relativePath>..</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - <packaging>jar</packaging> - <artifactId>openutils-mgnlgroovy</artifactId> - <name>openutils-mgnlmgnlgroovy</name> - <version>1.0-SNAPSHOT</version> - <licenses> - <license> - <name>GPLv3</name> - <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> - </license> - </licenses> - <build> - <resources> - <resource> - <filtering>false</filtering> - <directory>src/main/resources</directory> - <includes> - <include>**/*</include> - </includes> - </resource> - <resource> - <filtering>true</filtering> - <directory>src/main/resources</directory> - <includes> - <include>META-INF/magnolia/*</include> - </includes> - </resource> - </resources> - </build> - <dependencies> - <dependency> - <groupId>org.codehaus.groovy</groupId> - <artifactId>groovy-all</artifactId> - <version>1.5.6</version> - <exclusions> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-core</artifactId> - <version>3.6.3</version> - </dependency> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-module-admininterface</artifactId> - <version>3.6.3</version> - </dependency> - <dependency> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils-mgnltasks</artifactId> - <version>3.5.5</version> - </dependency> - </dependencies> - <repositories> - <repository> - <id>repository.magnolia.info</id> - <name>magnolia repository</name> - <url>http://svn.magnolia.info/maven/m2</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> -</project> Copied: tags/openutils-mgnlgroovy-1.0/pom.xml (from rev 936, trunk/openutils-mgnlgroovy/pom.xml) =================================================================== --- tags/openutils-mgnlgroovy-1.0/pom.xml (rev 0) +++ tags/openutils-mgnlgroovy-1.0/pom.xml 2008-12-03 16:44:01 UTC (rev 937) @@ -0,0 +1,84 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd "> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>10</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + <packaging>jar</packaging> + <artifactId>openutils-mgnlgroovy</artifactId> + <name>openutils-mgnlmgnlgroovy</name> + <version>1.0</version> + <licenses> + <license> + <name>GPLv3</name> + <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> + </license> + </licenses> + <build> + <resources> + <resource> + <filtering>false</filtering> + <directory>src/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + <resource> + <filtering>true</filtering> + <directory>src/main/resources</directory> + <includes> + <include>META-INF/magnolia/*</include> + </includes> + </resource> + </resources> + </build> + <dependencies> + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy-all</artifactId> + <version>1.5.6</version> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-core</artifactId> + <version>3.6.3</version> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-module-admininterface</artifactId> + <version>3.6.3</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnltasks</artifactId> + <version>3.5.5</version> + </dependency> + </dependencies> + <repositories> + <repository> + <id>repository.magnolia.info</id> + <name>magnolia repository</name> + <url>http://svn.magnolia.info/maven/m2</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlgroovy-1.0</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlgroovy-1.0</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlgroovy-1.0</url> + </scm> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2008-12-03 16:43:37
|
Revision: 936 http://openutils.svn.sourceforge.net/openutils/?rev=936&view=rev Author: molaschi Date: 2008-12-03 16:43:27 +0000 (Wed, 03 Dec 2008) Log Message: ----------- [maven-release-plugin] prepare release openutils-mgnlgroovy-1.0 Modified Paths: -------------- trunk/openutils-mgnlgroovy/pom.xml Modified: trunk/openutils-mgnlgroovy/pom.xml =================================================================== --- trunk/openutils-mgnlgroovy/pom.xml 2008-12-03 16:41:21 UTC (rev 935) +++ trunk/openutils-mgnlgroovy/pom.xml 2008-12-03 16:43:27 UTC (rev 936) @@ -9,7 +9,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlgroovy</artifactId> <name>openutils-mgnlmgnlgroovy</name> - <version>1.0-SNAPSHOT</version> + <version>1.0</version> <licenses> <license> <name>GPLv3</name> @@ -75,4 +75,10 @@ </snapshots> </repository> </repositories> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlgroovy-1.0</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlgroovy-1.0</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlgroovy-1.0</url> + </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2008-12-03 16:10:04
|
Revision: 934 http://openutils.svn.sourceforge.net/openutils/?rev=934&view=rev Author: molaschi Date: 2008-12-03 16:09:59 +0000 (Wed, 03 Dec 2008) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-mgnlcas/pom.xml Modified: trunk/openutils-mgnlcas/pom.xml =================================================================== --- trunk/openutils-mgnlcas/pom.xml 2008-12-03 16:09:51 UTC (rev 933) +++ trunk/openutils-mgnlcas/pom.xml 2008-12-03 16:09:59 UTC (rev 934) @@ -9,7 +9,7 @@ <packaging>jar</packaging> <artifactId>openutils-cas</artifactId> <name>openutils-cas</name> - <version>1.0</version> + <version>1.1-SNAPSHOT</version> <licenses> <license> <name>GPLv3</name> @@ -76,10 +76,4 @@ </snapshots> </repository> </repositories> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-cas-1.0</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-cas-1.0</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-cas-1.0</url> - </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2008-12-03 16:09:55
|
Revision: 933 http://openutils.svn.sourceforge.net/openutils/?rev=933&view=rev Author: molaschi Date: 2008-12-03 16:09:51 +0000 (Wed, 03 Dec 2008) Log Message: ----------- [maven-release-plugin] copy for tag openutils-cas-1.0 Added Paths: ----------- tags/openutils-cas-1.0/ tags/openutils-cas-1.0/pom.xml Removed Paths: ------------- tags/openutils-cas-1.0/pom.xml Deleted: tags/openutils-cas-1.0/pom.xml =================================================================== --- trunk/openutils-mgnlcas/pom.xml 2008-12-03 16:06:59 UTC (rev 931) +++ tags/openutils-cas-1.0/pom.xml 2008-12-03 16:09:51 UTC (rev 933) @@ -1,79 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>10</version> - <relativePath>..</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - <packaging>jar</packaging> - <artifactId>openutils-cas</artifactId> - <name>openutils-cas</name> - <version>1.0-SNAPSHOT</version> - <licenses> - <license> - <name>GPLv3</name> - <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> - </license> - </licenses> - <build> - <resources> - <resource> - <filtering>false</filtering> - <directory>src/main/resources</directory> - <includes> - <include>**/*</include> - </includes> - </resource> - <resource> - <filtering>true</filtering> - <directory>src/main/resources</directory> - <includes> - <include>META-INF/magnolia/*</include> - </includes> - </resource> - </resources> - </build> - <dependencies> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-jaas</artifactId> - <version>3.6.3</version> - </dependency> - <dependency> - <groupId>org.jasig.cas</groupId> - <artifactId>cas-client-core</artifactId> - <version>3.1.3</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - <repositories> - <repository> - <id>repository.magnolia.info</id> - <name>magnolia repository</name> - <url>http://svn.magnolia.info/maven/m2</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>jasig-repository</id> - <name>JA-SIG Maven2 Repository</name> - <url>http://developer.ja-sig.org/maven2</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> -</project> Copied: tags/openutils-cas-1.0/pom.xml (from rev 932, trunk/openutils-mgnlcas/pom.xml) =================================================================== --- tags/openutils-cas-1.0/pom.xml (rev 0) +++ tags/openutils-cas-1.0/pom.xml 2008-12-03 16:09:51 UTC (rev 933) @@ -0,0 +1,85 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>10</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + <packaging>jar</packaging> + <artifactId>openutils-cas</artifactId> + <name>openutils-cas</name> + <version>1.0</version> + <licenses> + <license> + <name>GPLv3</name> + <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> + </license> + </licenses> + <build> + <resources> + <resource> + <filtering>false</filtering> + <directory>src/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + <resource> + <filtering>true</filtering> + <directory>src/main/resources</directory> + <includes> + <include>META-INF/magnolia/*</include> + </includes> + </resource> + </resources> + </build> + <dependencies> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-jaas</artifactId> + <version>3.6.3</version> + </dependency> + <dependency> + <groupId>org.jasig.cas</groupId> + <artifactId>cas-client-core</artifactId> + <version>3.1.3</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + <repositories> + <repository> + <id>repository.magnolia.info</id> + <name>magnolia repository</name> + <url>http://svn.magnolia.info/maven/m2</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>jasig-repository</id> + <name>JA-SIG Maven2 Repository</name> + <url>http://developer.ja-sig.org/maven2</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-cas-1.0</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-cas-1.0</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-cas-1.0</url> + </scm> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2008-12-03 16:09:31
|
Revision: 932 http://openutils.svn.sourceforge.net/openutils/?rev=932&view=rev Author: molaschi Date: 2008-12-03 16:09:28 +0000 (Wed, 03 Dec 2008) Log Message: ----------- [maven-release-plugin] prepare release openutils-cas-1.0 Modified Paths: -------------- trunk/openutils-mgnlcas/pom.xml Modified: trunk/openutils-mgnlcas/pom.xml =================================================================== --- trunk/openutils-mgnlcas/pom.xml 2008-12-03 16:06:59 UTC (rev 931) +++ trunk/openutils-mgnlcas/pom.xml 2008-12-03 16:09:28 UTC (rev 932) @@ -9,7 +9,7 @@ <packaging>jar</packaging> <artifactId>openutils-cas</artifactId> <name>openutils-cas</name> - <version>1.0-SNAPSHOT</version> + <version>1.0</version> <licenses> <license> <name>GPLv3</name> @@ -76,4 +76,10 @@ </snapshots> </repository> </repositories> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-cas-1.0</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-cas-1.0</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-cas-1.0</url> + </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2008-12-03 16:07:10
|
Revision: 931 http://openutils.svn.sourceforge.net/openutils/?rev=931&view=rev Author: molaschi Date: 2008-12-03 16:06:59 +0000 (Wed, 03 Dec 2008) Log Message: ----------- add openutils mgnlcas module Modified Paths: -------------- trunk/pom.xml Added Paths: ----------- trunk/openutils-mgnlcas/ trunk/openutils-mgnlcas/pom.xml trunk/openutils-mgnlcas/src/ trunk/openutils-mgnlcas/src/main/ trunk/openutils-mgnlcas/src/main/java/ trunk/openutils-mgnlcas/src/main/java/info/ trunk/openutils-mgnlcas/src/main/java/info/magnolia/ trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/ trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/security/ trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/security/auth/ trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/security/auth/callback/ trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/security/auth/callback/CompositeCallback.java trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/util/ trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/util/PatternDelegate.java trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/util/UrlPatternDelegate.java trunk/openutils-mgnlcas/src/main/java/net/ trunk/openutils-mgnlcas/src/main/java/net/sourceforge/ trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/ trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/ trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CASAuthenticationModule.java trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CasClientCallback.java trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CasLogin.java trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CasMagnoliaUser.java trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/RequestUtils.java trunk/openutils-mgnlcas/src/main/resources/ trunk/openutils-mgnlcas/src/site/ Added: trunk/openutils-mgnlcas/pom.xml =================================================================== --- trunk/openutils-mgnlcas/pom.xml (rev 0) +++ trunk/openutils-mgnlcas/pom.xml 2008-12-03 16:06:59 UTC (rev 931) @@ -0,0 +1,79 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>10</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + <packaging>jar</packaging> + <artifactId>openutils-cas</artifactId> + <name>openutils-cas</name> + <version>1.0-SNAPSHOT</version> + <licenses> + <license> + <name>GPLv3</name> + <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> + </license> + </licenses> + <build> + <resources> + <resource> + <filtering>false</filtering> + <directory>src/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + <resource> + <filtering>true</filtering> + <directory>src/main/resources</directory> + <includes> + <include>META-INF/magnolia/*</include> + </includes> + </resource> + </resources> + </build> + <dependencies> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-jaas</artifactId> + <version>3.6.3</version> + </dependency> + <dependency> + <groupId>org.jasig.cas</groupId> + <artifactId>cas-client-core</artifactId> + <version>3.1.3</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + <repositories> + <repository> + <id>repository.magnolia.info</id> + <name>magnolia repository</name> + <url>http://svn.magnolia.info/maven/m2</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>jasig-repository</id> + <name>JA-SIG Maven2 Repository</name> + <url>http://developer.ja-sig.org/maven2</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> +</project> Added: trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/security/auth/callback/CompositeCallback.java =================================================================== --- trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/security/auth/callback/CompositeCallback.java (rev 0) +++ trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/security/auth/callback/CompositeCallback.java 2008-12-03 16:06:59 UTC (rev 931) @@ -0,0 +1,115 @@ +// DONE in magnolia 3.6.2 +/** + * This file Copyright (c) 2003-2008 Magnolia International + * Ltd. (http://www.magnolia.info). All rights reserved. + * + * + * This file is dual-licensed under both the Magnolia + * Network Agreement and the GNU General Public License. + * You may elect to use one or the other of these licenses. + * + * This file is distributed in the hope that it will be + * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT. + * Redistribution, except as permitted by whichever of the GPL + * or MNA you select, is prohibited. + * + * 1. For the GPL license (GPL), you can redistribute and/or + * modify this file under the terms of the GNU General + * Public License, Version 3, as published by the Free Software + * Foundation. You should have received a copy of the GNU + * General Public License, Version 3 along with this program; + * if not, write to the Free Software Foundation, Inc., 51 + * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * 2. For the Magnolia Network Agreement (MNA), this file + * and the accompanying materials are made available under the + * terms of the MNA which accompanies this distribution, and + * is available at http://www.magnolia.info/mna.html + * + * Any modifications to this file must keep this entire header + * intact. + * + */ +package info.magnolia.cms.security.auth.callback; + +import info.magnolia.cms.util.PatternDelegate; +import info.magnolia.cms.util.UrlPatternDelegate; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.ArrayUtils; + + +/** + * <p> + * A simple "composite" callback that delegates to other callbacks based on rules (a list of {@link PatternDelegate}). + * </p> + * <p> + * It can be used to configured different callbacks for different urls, see this sample configuration for an example: + * </p> + * + * <pre> + * + clientCallback + * + patterns + * + admin + * + delegate + * - class info.magnolia.cms.security.auth.callback.FormClientCallback + * - loginForm /mgnl-resources/loginForm/login.html + * - realmName Magnolia + * - class info.magnolia.cms.util.UrlPatternDelegate + * - url ./magnolia* + * + public + * + delegate + * - class info.magnolia.cms.security.auth.callback.FormClientCallback + * - loginForm /mgnl-resources/public-login.html + * - realmName Magnolia + * - class info.magnolia.cms.util.UrlPatternDelegate + * - url /* + * - class info.magnolia.cms.security.auth.callback.CompositeCallback + * </pre> + * @author fgiust + * @version $Id: CompositeCallback.java 4124 2008-09-22 14:56:46Z fgiust $ + */ +public class CompositeCallback implements HttpClientCallback +{ + + private PatternDelegate[] patterns = new UrlPatternDelegate[0]; + + /** + * Delegates the processing to the first matching Callback in patterns. + * @param request HttpServletRequest + * @param response HttpServletResponse + */ + public void handle(HttpServletRequest request, HttpServletResponse response) + { + for (int i = 0; i < patterns.length; i++) + { + PatternDelegate currentPattern = patterns[i]; + if (currentPattern.match(request)) + { + ((HttpClientCallback) currentPattern.getDelegate()).handle(request, response); + break; + } + } + } + + /** + * @return array of configured PatternDelegate. + */ + public PatternDelegate[] getPatterns() + { + return this.patterns; + } + + /** + * Adds a new PatternDelegate. Used by Content2Bean . + * @param pattern PatternDelegate instance + */ + public void addPattern(PatternDelegate pattern) + { + this.patterns = (PatternDelegate[]) ArrayUtils.add(this.patterns, pattern); + } +} \ No newline at end of file Added: trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/util/PatternDelegate.java =================================================================== --- trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/util/PatternDelegate.java (rev 0) +++ trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/util/PatternDelegate.java 2008-12-03 16:06:59 UTC (rev 931) @@ -0,0 +1,62 @@ +// DONE in magnolia 3.6.2 +/** + * This file Copyright (c) 2003-2008 Magnolia International + * Ltd. (http://www.magnolia.info). All rights reserved. + * + * + * This file is dual-licensed under both the Magnolia + * Network Agreement and the GNU General Public License. + * You may elect to use one or the other of these licenses. + * + * This file is distributed in the hope that it will be + * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT. + * Redistribution, except as permitted by whichever of the GPL + * or MNA you select, is prohibited. + * + * 1. For the GPL license (GPL), you can redistribute and/or + * modify this file under the terms of the GNU General + * Public License, Version 3, as published by the Free Software + * Foundation. You should have received a copy of the GNU + * General Public License, Version 3 along with this program; + * if not, write to the Free Software Foundation, Inc., 51 + * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * 2. For the Magnolia Network Agreement (MNA), this file + * and the accompanying materials are made available under the + * terms of the MNA which accompanies this distribution, and + * is available at http://www.magnolia.info/mna.html + * + * Any modifications to this file must keep this entire header + * intact. + * + */ +package info.magnolia.cms.util; + +import javax.servlet.http.HttpServletRequest; + + +/** + * A simple generic interface that can be used to configure anything that can be selected based on some conditions (i.e. + * a different login page based on the request URI or host). + * @author fgiust + * @version $Id: PatternDelegate.java 4124 2008-09-22 14:56:46Z fgiust $ + */ +public interface PatternDelegate +{ + + /** + * Does the current request match the expected condition? + * @param request HttpServletRequest + * @return <code>true</code> if the current request matches the expected conditions + */ + boolean match(HttpServletRequest request); + + /** + * Returns the delegate that this bean holds. This method is usually called to retrieve the delegate object after + * match() returns true. + * @return delegate object + */ + Object getDelegate(); +} Added: trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/util/UrlPatternDelegate.java =================================================================== --- trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/util/UrlPatternDelegate.java (rev 0) +++ trunk/openutils-mgnlcas/src/main/java/info/magnolia/cms/util/UrlPatternDelegate.java 2008-12-03 16:06:59 UTC (rev 931) @@ -0,0 +1,153 @@ +// DONE in magnolia 3.6.2 +/** + * This file Copyright (c) 2003-2008 Magnolia International + * Ltd. (http://www.magnolia.info). All rights reserved. + * + * + * This file is dual-licensed under both the Magnolia + * Network Agreement and the GNU General Public License. + * You may elect to use one or the other of these licenses. + * + * This file is distributed in the hope that it will be + * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT. + * Redistribution, except as permitted by whichever of the GPL + * or MNA you select, is prohibited. + * + * 1. For the GPL license (GPL), you can redistribute and/or + * modify this file under the terms of the GNU General + * Public License, Version 3, as published by the Free Software + * Foundation. You should have received a copy of the GNU + * General Public License, Version 3 along with this program; + * if not, write to the Free Software Foundation, Inc., 51 + * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * 2. For the Magnolia Network Agreement (MNA), this file + * and the accompanying materials are made available under the + * terms of the MNA which accompanies this distribution, and + * is available at http://www.magnolia.info/mna.html + * + * Any modifications to this file must keep this entire header + * intact. + * + */ +package info.magnolia.cms.util; + +import info.magnolia.context.MgnlContext; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang.builder.ToStringStyle; + + +/** + * An implementation of {@link PatternDelegate} that evaluates as condition a request uri patter or a hostname pattern. + * @author fgiust + * @version $Id: UrlPatternDelegate.java 4124 2008-09-22 14:56:46Z fgiust $ + */ +public class UrlPatternDelegate implements PatternDelegate +{ + + private String url; + + private SimpleUrlPattern urlPattern; + + private String host; + + private SimpleUrlPattern hostPattern; + + private Object delegate; + + /** + * The configured Url + * @return the configured Url + */ + public String getUrl() + { + return url; + } + + /** + * Sets the Url pattern (using {@link SimpleUrlPattern} internally) + * @param pattern url pattern + */ + public void setUrl(String pattern) + { + this.url = pattern; + this.urlPattern = new SimpleUrlPattern(pattern); + } + + /** + * The configured host + * @return the configured host + */ + public String getHost() + { + return host; + } + + /** + * Sets the host pattern (using {@link SimpleUrlPattern} internally) + * @param host host pattern + */ + public void setHost(String host) + { + this.host = host; + this.hostPattern = new SimpleUrlPattern(host); + } + + /** + * Compares the reques with the url and host patterns + * @param request HttpServletRequest + * @return <code>true</code> if the pattern matches the configured host (if set) and url (if set) + */ + public boolean match(HttpServletRequest request) + { + + boolean match = true; + + if (hostPattern != null) + { + match = hostPattern.match(request.getServerName()); + } + + if (urlPattern != null) + { + match = urlPattern.match(MgnlContext.getAggregationState().getCurrentURI()); + } + + return match; + } + + /** + * Sets the delegate. + * @param delegate the delegate to set + */ + public void setDelegate(Object delegate) + { + this.delegate = delegate; + } + + /** + * Returns the delegate. + * @return the delegate + */ + public Object getDelegate() + { + return delegate; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() + { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("url", this.url).append( + "host", + this.host).toString(); + } + +} \ No newline at end of file Added: trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CASAuthenticationModule.java =================================================================== --- trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CASAuthenticationModule.java (rev 0) +++ trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CASAuthenticationModule.java 2008-12-03 16:06:59 UTC (rev 931) @@ -0,0 +1,412 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package net.sourceforge.openutils.mgnlcas; + +import info.magnolia.cms.security.User; +import info.magnolia.cms.security.auth.Entity; +import info.magnolia.cms.security.auth.GroupList; +import info.magnolia.cms.security.auth.RoleList; +import info.magnolia.cms.security.auth.callback.RealmCallback; +import info.magnolia.cms.util.BooleanUtil; +import info.magnolia.jaas.principal.EntityImpl; +import info.magnolia.jaas.principal.GroupListImpl; +import info.magnolia.jaas.principal.RoleListImpl; +import info.magnolia.jaas.sp.AbstractLoginModule; +import info.magnolia.jaas.sp.UserAwareLoginModule; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.security.auth.Subject; +import javax.security.auth.callback.Callback; +import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.callback.TextInputCallback; +import javax.security.auth.callback.UnsupportedCallbackException; +import javax.security.auth.login.LoginException; +import javax.security.auth.spi.LoginModule; + +import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang.StringUtils; +import org.jasig.cas.client.authentication.AttributePrincipal; +import org.jasig.cas.client.validation.Assertion; +import org.jasig.cas.client.validation.Cas20ProxyTicketValidator; +import org.jasig.cas.client.validation.TicketValidationException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * This class implements a JAAS <code>LoginModule</code> that defers authentication to CAS. See the <a + * href="http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/JAASRefGuide.html"> JAAS documentation</a> for details + * about configuration and architecture. + * <p> + * The calling application's <code>CallbackHandler</code> MUST return the <strong>ticket</strong> for a + * <code>TextInputCallback</code> whose prompt is "ticket". + * <p> + * The CAS <strong>service</strong> MAY be hard-coded into the configuration; if it is not, the calling application's + * <code>CallbackHandler</code> MAY return the <strong>service</strong> in a <code>TextInputCallback</code> whose prompt + * is "service". + * <p> + * The <strong>cas_validate_url</strong> MUST be hard-coded in the configuration + * <p> + * Sample jaas.config configuration: + * </p> + * + * <pre> + * magnolia { + * net.sourceforge.openutils.mgnlcas.CASAuthenticationModule + * requisite + * realm=cas; + * info.magnolia.jaas.sp.jcr.JCRAuthenticationModule + * requisite + * skip_on_previous_success=true; + * info.magnolia.jaas.sp.jcr.JCRAuthorizationModule required; + * }; + * + * + * </pre> + * @author fgiust + * @version $Id: CASAuthenticationModule.java 4124 2008-09-22 14:56:46Z fgiust $ + */ +public class CASAuthenticationModule extends AbstractLoginModule implements LoginModule, UserAwareLoginModule +{ + + protected Subject subject; + + protected CallbackHandler callbackHandler; + + protected String casValidateUrl; + + protected String service; + + protected AttributePrincipal principal; + + protected User user; + + private boolean skipOnPreviousSuccess; + + private String defaultGroup; + + private String defaultRole; + + private String rolesAttribute = "roles"; + + private String groupsAttribute = "groups"; + + protected Logger log = LoggerFactory.getLogger(getClass()); + + /** + * @param subject + * @param callbackHandler + * @param sharedState + * @param options can contain + * <ul> + * <li><strong>cas_validate_url</strong> (required)</li> + * <li><strong>service</strong> (optional)</li> + * </ul> + */ + @Override + public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) + { + super.initialize(subject, callbackHandler, sharedState, options); + this.subject = subject; + this.callbackHandler = callbackHandler; + this.casValidateUrl = (String) options.get("cas_validate_url"); + this.service = (String) options.get("service"); + this.defaultGroup = (String) options.get("default_group"); + this.defaultRole = (String) options.get("default_role"); + + if (options.get("roles_attribute") != null) + { + rolesAttribute = (String) options.get("roles_attribute"); + } + + if (options.get("groups_attribute") != null) + { + groupsAttribute = (String) options.get("groups_attribute"); + } + + // private on AbstractLoginModule + this.skipOnPreviousSuccess = BooleanUtil + .toBoolean((String) options.get(OPTION_SKIP_ON_PREVIOUS_SUCCESS), false); + } + + @Override + public boolean login() throws LoginException + { + if (skipOnPreviousSuccess && this.getSharedStatus() == STATUS_SUCCEEDED) + { + return true; + } + + if (this.callbackHandler == null) + { + throw new LoginException("Error: no CallbackHandler available"); + } + + List<Callback> callbacksList = new ArrayList<Callback>(); + + TextInputCallback ticketCallback = new TextInputCallback("ticket"); + TextInputCallback serviceCallback = null; + TextInputCallback casValidateUrlCallback = null; + RealmCallback realmCallback = null; + + callbacksList.add(ticketCallback); + + if (StringUtils.isBlank(service)) + { + // the service has not been hardcoded, so give the application + // a callback which can be used to specify it + serviceCallback = new TextInputCallback("service"); + callbacksList.add(serviceCallback); + } + + if (StringUtils.isBlank(service)) + { + // the casValidateUrl has not been hardcoded, so give the application + // a callback which can be used to specify it + casValidateUrlCallback = new TextInputCallback("casValidateUrl"); + callbacksList.add(casValidateUrlCallback); + } + + // if the realm is not defined in the jaas configuration + // we ask use a callback to get the value + if (this.useRealmCallback) + { + realmCallback = new RealmCallback(); + callbacksList.add(realmCallback); + } + + this.success = false; + + Callback[] callbacks = callbacksList.toArray(new Callback[callbacksList.size()]); + + try + { + this.callbackHandler.handle(callbacks); + + } + catch (IOException e) + { + if (log.isDebugEnabled()) + { + log.debug("Exception caught", e); + } + throw new LoginException(e.toString()); + } + catch (UnsupportedCallbackException e) + { + if (log.isDebugEnabled()) + { + log.debug(e.getMessage(), e); + } + throw new LoginException(e.getCallback().toString() + " not available"); + } + + // this.name = ((NameCallback) callbacks[0]).getName(); + // this.pswd = ((PasswordCallback) callbacks[1]).getPassword(); + if (this.useRealmCallback) + { + this.realm = StringUtils.defaultIfEmpty(realmCallback.getRealm(), this.realm); + } + + String ticket = ticketCallback.getText(); + if (StringUtils.isNotEmpty(ticket)) + { + if (serviceCallback != null) + { + service = serviceCallback.getText(); + } + + if (casValidateUrlCallback != null) + { + casValidateUrl = casValidateUrlCallback.getText(); + } + + Cas20ProxyTicketValidator pv = new Cas20ProxyTicketValidator(casValidateUrl); + + Assertion assertion; + try + { + assertion = pv.validate(ticket, service); + } + catch (TicketValidationException e) + { + throw new LoginException(e.getMessage()); + } + + if (assertion.getPrincipal() != null) + { + + principal = assertion.getPrincipal(); + subject.getPrincipals().add(principal); + + setEntity(); + + user = new CasMagnoliaUser(subject); + + this.success = true; + this.setSharedStatus(STATUS_SUCCEEDED); + } + + } + + return this.success; + } + + /** + * {@inheritDoc} + */ + @Override + public void validateUser() throws LoginException + { + + } + + @Override + public boolean commit() throws LoginException + { + if (principal != null) + { + subject.getPrincipals().add(principal); + return true; + } + return false; + } + + /** + * {@inheritDoc} + */ + @Override + public User getUser() + { + return user; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean release() + { + if (principal != null) + { + principal = null; + user = null; + return true; + } + return false; + } + + /** + * {@inheritDoc} + */ + @Override + public void setACL() + { + // delegate to the Authorization module + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + public void setEntity() + { + EntityImpl entity = new EntityImpl(); + entity.addProperty(Entity.NAME, this.principal.getName()); + + Map<String, String> attributes = this.principal.getAttributes(); + + String fullName = attributes.get("title"); + if (fullName != null) + { + entity.addProperty(Entity.FULL_NAME, fullName); + } + + entity.addProperty(Entity.LANGUAGE, "en"); + + this.subject.getPrincipals().add(entity); + + String[] roles = StringUtils.split(attributes.get(rolesAttribute)); + String[] groups = StringUtils.split(attributes.get(groupsAttribute)); + + if (roles == null) + { + roles = new String[0]; + } + if (groups == null) + { + groups = new String[0]; + } + + if (defaultGroup != null) + { + groups = (String[]) ArrayUtils.add(groups, defaultGroup); + } + + if (defaultRole != null) + { + roles = (String[]) ArrayUtils.add(roles, defaultRole); + } + + addGroups(groups); + addRoles(roles); + + } + + /** + * Set the list of groups, info.magnolia.jaas.principal.GroupList. + * @param groups array of group names + */ + protected void addGroups(String[] groups) + { + GroupList groupList = new GroupListImpl(); + + for (int j = 0; j < groups.length; j++) + { + String group = groups[j]; + groupList.add(group); + addGroupName(group); + } + + this.subject.getPrincipals().add(groupList); + } + + /** + * Set the list of roles, info.magnolia.jaas.principal.RoleList. + * @param roles array of role names + */ + protected void addRoles(String[] roles) + { + RoleList roleList = new RoleListImpl(); + + for (int j = 0; j < roles.length; j++) + { + String role = roles[j]; + roleList.add(role); + addRoleName(role); + } + + this.subject.getPrincipals().add(roleList); + } + +} \ No newline at end of file Added: trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CasClientCallback.java =================================================================== --- trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CasClientCallback.java (rev 0) +++ trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CasClientCallback.java 2008-12-03 16:06:59 UTC (rev 931) @@ -0,0 +1,216 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package net.sourceforge.openutils.mgnlcas; + +import info.magnolia.cms.security.auth.callback.AbstractHttpClientCallback; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.jasig.cas.client.util.CommonUtils; +import org.jasig.cas.client.validation.Assertion; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * Magnolia CAS Callback, based on CAS org.jasig.cas.client.authentication.AuthenticationFilter + * @author fgiust + * @version $Id: CasClientCallback.java 4896 2008-10-08 16:23:10Z manuel $ + */ +public class CasClientCallback extends AbstractHttpClientCallback +{ + + /** + * Represents the constant for where the gateway flag will be located in session. + */ + public static final String CONST_CAS_GATEWAY = "_const_cas_gateway_"; + + /** + * Represents the constant for where the assertion will be located in session. + */ + public static final String CONST_CAS_ASSERTION = "_const_cas_assertion_"; + + private Logger log = LoggerFactory.getLogger(CasClientCallback.class); + + /** + * Defines the parameter to look for for the artifact. + */ + private String artifactParameterName = "ticket"; + + /** + * Defines the parameter to look for for the service. + */ + private String serviceParameterName = "service"; + + /** + * Sets where response.encodeUrl should be called on service urls when constructed. + */ + private boolean encodeServiceUrl = true; + + /** + * The URL to the CAS Server login. + */ + private String casServerLoginUrl; + + /** + * Whether to send the renew request or not. + */ + private boolean renew; + + /** + * Whether to send the gateway request or not. + */ + private boolean gateway; + + public final void setRenew(final boolean renew) + { + this.renew = renew; + } + + public final void setGateway(final boolean gateway) + { + this.gateway = gateway; + } + + public final void setCasServerLoginUrl(final String casServerLoginUrl) + { + this.casServerLoginUrl = casServerLoginUrl; + } + + /** + * Sets the artifactParameterName. + * @param artifactParameterName the artifactParameterName to set + */ + public void setArtifactParameterName(String artifactParameterName) + { + this.artifactParameterName = artifactParameterName; + } + + /** + * Sets the serviceParameterName. + * @param serviceParameterName the serviceParameterName to set + */ + public void setServiceParameterName(String serviceParameterName) + { + this.serviceParameterName = serviceParameterName; + } + + /** + * Sets the encodeServiceUrl. + * @param encodeServiceUrl the encodeServiceUrl to set + */ + public void setEncodeServiceUrl(boolean encodeServiceUrl) + { + this.encodeServiceUrl = encodeServiceUrl; + } + + /** + * {@inheritDoc} + */ + @Override + public void doCallback(HttpServletRequest request, HttpServletResponse response) + { + + final HttpSession session = request.getSession(false); + + if (session != null) + { + // don't redirect to cas if user is already logged in + if (session.getAttribute("info.magnolia.context.UserContextImpl.user") != null) + { + try + { + request.getRequestDispatcher("/errors/401.html").forward(request, response); + } + catch (ServletException e) + { + // ignore + } + catch (IOException e) + { + // ignore + } + return; + } + } + final String ticket = request.getParameter(this.artifactParameterName); + final Assertion assertion = session != null ? (Assertion) session.getAttribute(CONST_CAS_ASSERTION) : null; + final boolean wasGatewayed = session != null && session.getAttribute(CONST_CAS_GATEWAY) != null; + + if (CommonUtils.isBlank(ticket) && assertion == null && !wasGatewayed) + { + + String service = RequestUtils.absoluteUrl(request); + log.debug("no ticket and no assertion found"); + if (this.gateway) + { + log.debug("setting gateway attribute in session"); + request.getSession(true).setAttribute(CONST_CAS_GATEWAY, "yes"); + } + + final String serviceUrl = CommonUtils.constructServiceUrl( + request, + response, + service, + null, + this.artifactParameterName, + this.encodeServiceUrl); + + if (log.isDebugEnabled()) + { + log.debug("Constructed service url: " + serviceUrl); + } + + String urlToRedirectTo = CommonUtils.constructRedirectUrl( + this.casServerLoginUrl, + this.serviceParameterName, + serviceUrl, + this.renew, + this.gateway); + + urlToRedirectTo = urlToRedirectTo + "&locale=" + request.getLocale().toString(); + + if (log.isDebugEnabled()) + { + log.debug("redirecting to \"" + urlToRedirectTo + "\""); + } + + try + { + response.sendRedirect(urlToRedirectTo); + } + catch (IOException e) + { + log.error(e.getMessage(), e); + } + return; + } + + if (session != null) + { + log.debug("removing gateway attribute from session"); + session.setAttribute(CONST_CAS_GATEWAY, null); + } + } + +} Added: trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CasLogin.java =================================================================== --- trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CasLogin.java (rev 0) +++ trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CasLogin.java 2008-12-03 16:06:59 UTC (rev 931) @@ -0,0 +1,242 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package net.sourceforge.openutils.mgnlcas; + +import info.magnolia.cms.security.SecuritySupport; +import info.magnolia.cms.security.User; +import info.magnolia.cms.security.auth.callback.RealmCallback; +import info.magnolia.cms.security.auth.login.LoginHandler; +import info.magnolia.cms.security.auth.login.LoginHandlerBase; +import info.magnolia.cms.security.auth.login.LoginResult; + +import java.io.IOException; + +import javax.security.auth.Subject; +import javax.security.auth.callback.Callback; +import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.callback.TextInputCallback; +import javax.security.auth.callback.UnsupportedCallbackException; +import javax.security.auth.login.LoginContext; +import javax.security.auth.login.LoginException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * @author fgiust + * @version $Id: CasLogin.java 4266 2008-09-25 08:18:30Z daniela $ + */ +public class CasLogin extends LoginHandlerBase implements LoginHandler +{ + + private static final Logger log = LoggerFactory.getLogger(CasLogin.class); + + /** + * Defines the parameter to look for for the artifact. + */ + private String artifactParameterName = "ticket"; + + /** + * The JAAS chain/module to use. + */ + private String jaasChain = "magnolia"; + + private String realm; + + private String casValidateUrl; + + /** + * Sets the artifactParameterName. + * @param artifactParameterName the artifactParameterName to set + */ + public void setArtifactParameterName(String artifactParameterName) + { + this.artifactParameterName = artifactParameterName; + } + + public String getJaasChain() + { + return this.jaasChain; + } + + public void setJaasChain(String jaasChain) + { + this.jaasChain = jaasChain; + } + + /** + * Returns the realm. + * @return the realm + */ + public String getRealm() + { + return realm; + } + + /** + * Sets the realm. + * @param realm the realm to set + */ + public void setRealm(String realm) + { + this.realm = realm; + } + + /** + * Returns the casValidateUrl. + * @return the casValidateUrl + */ + public String getCasValidateUrl() + { + return casValidateUrl; + } + + /** + * Sets the casValidateUrl. + * @param casValidateUrl the casValidateUrl to set + */ + public void setCasValidateUrl(String casValidateUrl) + { + this.casValidateUrl = casValidateUrl; + } + + public LoginResult handle(HttpServletRequest request, HttpServletResponse response) + { + + final String ticket = request.getParameter(this.artifactParameterName); + + if (StringUtils.isNotEmpty(ticket)) + { + String service = RequestUtils.absoluteUrl(request); + // solo se è l'ultimo carattere + if (service.lastIndexOf("/") == (service.length() - 1)) + { + service = service.substring(0, service.lastIndexOf("/")); + } + CasCallBackHandler handler = new CasCallBackHandler(service, ticket, realm); + + return authenticateCas(handler, getJaasChain()); + } + + return LoginResult.NOT_HANDLED; + } + + protected LoginResult authenticateCas(CasCallBackHandler callbackHandler, String customLoginModule) + { + Subject subject; + try + { + LoginContext loginContext = new LoginContext( + StringUtils.defaultString(customLoginModule, "magnolia"), + callbackHandler); + + loginContext.login(); + subject = loginContext.getSubject(); + User user = SecuritySupport.Factory.getInstance().getUserManager().getUser(subject); + + if (user != null) + { + user.setSubject(subject); + } + else + { + log + .error("Unable to obtain a user from userManager, maybe the external user manager is not configured for the cas realm?"); + } + + return new LoginResult(LoginResult.STATUS_SUCCEEDED, user); + } + catch (LoginException e) + { + log.info("Can't login due to:", e); + return new LoginResult(LoginResult.STATUS_FAILED, e); + } + } + + public class CasCallBackHandler implements CallbackHandler + { + + private String service; + + private String ticket; + + private String realm; + + public CasCallBackHandler(String service, String ticket, String realm) + { + this.service = service; + this.ticket = ticket; + this.realm = realm; + } + + public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException + { + for (int i = 0; i < callbacks.length; i++) + { + if (callbacks[i] instanceof TextInputCallback) + { + TextInputCallback text = (TextInputCallback) callbacks[i]; + if ("ticket".equals(text.getPrompt())) + { + log.info(getTicket()); + text.setText(getTicket()); + } + else if ("service".equals(text.getPrompt())) + { + log.info(getService()); + text.setText(getService()); + } + else if ("casValidateUrl".equals(text.getPrompt())) + { + log.info(casValidateUrl); + text.setText(casValidateUrl); + } + } + else if (callbacks[i] instanceof RealmCallback) + { + log.info(this.realm); + ((RealmCallback) callbacks[i]).setRealm(this.realm); + } + else + { + throw (new UnsupportedCallbackException(callbacks[i], "Callback class not supported")); + } + } + } + + public String getTicket() + { + return ticket; + } + + public String getService() + { + return service; + } + + public String getRealm() + { + return realm; + } + + } +} Added: trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CasMagnoliaUser.java =================================================================== --- trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CasMagnoliaUser.java (rev 0) +++ trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/CasMagnoliaUser.java 2008-12-03 16:06:59 UTC (rev 931) @@ -0,0 +1,45 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package net.sourceforge.openutils.mgnlcas; + +import info.magnolia.cms.security.ExternalUser; + +import javax.security.auth.Subject; + + +/** + * @author fgiust + * @version $Id: CasMagnoliaUser.java 2244 2008-08-11 19:31:53Z fgiust $ + */ +public class CasMagnoliaUser extends ExternalUser +{ + + /** + * Stable serialVersionUID. + */ + private static final long serialVersionUID = 42L; + + /** + * @param subject + */ + protected CasMagnoliaUser(Subject subject) + { + super(subject); + } + +} Added: trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/RequestUtils.java =================================================================== --- trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/RequestUtils.java (rev 0) +++ trunk/openutils-mgnlcas/src/main/java/net/sourceforge/openutils/mgnlcas/RequestUtils.java 2008-12-03 16:06:59 UTC (rev 931) @@ -0,0 +1,55 @@ +/** + * Copyright Openmind http://www.openmindonline.it + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package net.sourceforge.openutils.mgnlcas; + +import javax.servlet.http.HttpServletRequest; + + +/** + * @author fgiust + * @version $Id: RequestUtils.java 4124 2008-09-22 14:56:46Z fgiust $ + */ +public final class RequestUtils +{ + + private RequestUtils() + { + // don't instantiate + } + + public static String absoluteUrl(HttpServletRequest request) + { + + String host = request.getServerName(); + int port = request.getServerPort(); + String scheme = request.getScheme(); + StringBuilder sb = new StringBuilder(); + sb.append(scheme); + sb.append("://"); + sb.append(host); + if (port != 0 && port != 80 && port != 443) + { + sb.append(":"); + sb.append(port); + } + sb.append(request.getRequestURI()); + + return sb.toString(); + + } +} Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2008-12-03 15:14:24 UTC (rev 930) +++ trunk/pom.xml 2008-12-03 16:06:59 UTC (rev 931) @@ -242,6 +242,7 @@ <module>openutils-mgnlcontrols</module> <module>openutils-spring-rmibernate</module> <module>openutils-mgnlmessages</module> + <module>openutils-mgnlcas</module> <!-- <module>openutils-elfunctions</module> <module>openutils-mgnlmessages</module> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2008-12-03 15:14:27
|
Revision: 930 http://openutils.svn.sourceforge.net/openutils/?rev=930&view=rev Author: molaschi Date: 2008-12-03 15:14:24 +0000 (Wed, 03 Dec 2008) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-mgnlmessages/pom.xml Modified: trunk/openutils-mgnlmessages/pom.xml =================================================================== --- trunk/openutils-mgnlmessages/pom.xml 2008-12-03 15:14:17 UTC (rev 929) +++ trunk/openutils-mgnlmessages/pom.xml 2008-12-03 15:14:24 UTC (rev 930) @@ -9,7 +9,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlmessages</artifactId> <name>openutils-mgnlmessages</name> - <version>1.0</version> + <version>1.1-SNAPSHOT</version> <licenses> <license> <name>GPLv3</name> @@ -82,10 +82,4 @@ </snapshots> </repository> </repositories> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlmessages-1.0</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlmessages-1.0</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlmessages-1.0</url> - </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2008-12-03 15:14:20
|
Revision: 929 http://openutils.svn.sourceforge.net/openutils/?rev=929&view=rev Author: molaschi Date: 2008-12-03 15:14:17 +0000 (Wed, 03 Dec 2008) Log Message: ----------- [maven-release-plugin] copy for tag openutils-mgnlmessages-1.0 Added Paths: ----------- tags/openutils-mgnlmessages-1.0/ tags/openutils-mgnlmessages-1.0/pom.xml Removed Paths: ------------- tags/openutils-mgnlmessages-1.0/pom.xml Deleted: tags/openutils-mgnlmessages-1.0/pom.xml =================================================================== --- trunk/openutils-mgnlmessages/pom.xml 2008-12-03 15:10:19 UTC (rev 927) +++ tags/openutils-mgnlmessages-1.0/pom.xml 2008-12-03 15:14:17 UTC (rev 929) @@ -1,85 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>10</version> - <relativePath>..</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - <packaging>jar</packaging> - <artifactId>openutils-mgnlmessages</artifactId> - <name>openutils-mgnlmessages</name> - <version>1.0-SNAPSHOT</version> - <licenses> - <license> - <name>GPLv3</name> - <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> - </license> - </licenses> - <build> - <resources> - <resource> - <filtering>false</filtering> - <directory>src/main/resources</directory> - <includes> - <include>**/*</include> - </includes> - </resource> - <resource> - <filtering>true</filtering> - <directory>src/main/resources</directory> - <includes> - <include>META-INF/magnolia/*</include> - </includes> - </resource> - </resources> - </build> - <dependencies> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-core</artifactId> - <version>3.6.3</version> - </dependency> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-module-admininterface</artifactId> - <version>3.6.3</version> - </dependency> - <dependency> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils-mgnltasks</artifactId> - <version>3.5.5</version> - </dependency> - <dependency> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils-mgnlext</artifactId> - <version>2.1</version> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <classifier>jdk15</classifier> - <version>5.1</version> - <scope>test</scope> - <exclusions> - <exclusion> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - <repositories> - <repository> - <id>repository.magnolia.info</id> - <name>magnolia repository</name> - <url>http://svn.magnolia.info/maven/m2</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> -</project> Copied: tags/openutils-mgnlmessages-1.0/pom.xml (from rev 928, trunk/openutils-mgnlmessages/pom.xml) =================================================================== --- tags/openutils-mgnlmessages-1.0/pom.xml (rev 0) +++ tags/openutils-mgnlmessages-1.0/pom.xml 2008-12-03 15:14:17 UTC (rev 929) @@ -0,0 +1,91 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>10</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + <packaging>jar</packaging> + <artifactId>openutils-mgnlmessages</artifactId> + <name>openutils-mgnlmessages</name> + <version>1.0</version> + <licenses> + <license> + <name>GPLv3</name> + <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> + </license> + </licenses> + <build> + <resources> + <resource> + <filtering>false</filtering> + <directory>src/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + <resource> + <filtering>true</filtering> + <directory>src/main/resources</directory> + <includes> + <include>META-INF/magnolia/*</include> + </includes> + </resource> + </resources> + </build> + <dependencies> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-core</artifactId> + <version>3.6.3</version> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-module-admininterface</artifactId> + <version>3.6.3</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnltasks</artifactId> + <version>3.5.5</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnlext</artifactId> + <version>2.1</version> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.1</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + <repositories> + <repository> + <id>repository.magnolia.info</id> + <name>magnolia repository</name> + <url>http://svn.magnolia.info/maven/m2</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlmessages-1.0</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlmessages-1.0</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlmessages-1.0</url> + </scm> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2008-12-03 15:14:04
|
Revision: 928 http://openutils.svn.sourceforge.net/openutils/?rev=928&view=rev Author: molaschi Date: 2008-12-03 15:14:01 +0000 (Wed, 03 Dec 2008) Log Message: ----------- [maven-release-plugin] prepare release openutils-mgnlmessages-1.0 Modified Paths: -------------- trunk/openutils-mgnlmessages/pom.xml Modified: trunk/openutils-mgnlmessages/pom.xml =================================================================== --- trunk/openutils-mgnlmessages/pom.xml 2008-12-03 15:10:19 UTC (rev 927) +++ trunk/openutils-mgnlmessages/pom.xml 2008-12-03 15:14:01 UTC (rev 928) @@ -9,7 +9,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlmessages</artifactId> <name>openutils-mgnlmessages</name> - <version>1.0-SNAPSHOT</version> + <version>1.0</version> <licenses> <license> <name>GPLv3</name> @@ -82,4 +82,10 @@ </snapshots> </repository> </repositories> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlmessages-1.0</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlmessages-1.0</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlmessages-1.0</url> + </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2008-12-03 15:10:24
|
Revision: 927 http://openutils.svn.sourceforge.net/openutils/?rev=927&view=rev Author: molaschi Date: 2008-12-03 15:10:19 +0000 (Wed, 03 Dec 2008) Log Message: ----------- add openutils mgnlmessages module Modified Paths: -------------- trunk/pom.xml Added Paths: ----------- trunk/openutils-mgnlmessages/ trunk/openutils-mgnlmessages/pom.xml trunk/openutils-mgnlmessages/src/ trunk/openutils-mgnlmessages/src/main/ trunk/openutils-mgnlmessages/src/main/java/ trunk/openutils-mgnlmessages/src/main/java/info/ trunk/openutils-mgnlmessages/src/main/java/info/magnolia/ trunk/openutils-mgnlmessages/src/main/java/info/magnolia/cms/ trunk/openutils-mgnlmessages/src/main/java/info/magnolia/cms/i18n/ trunk/openutils-mgnlmessages/src/main/java/info/magnolia/cms/i18n/MessagesManager.java trunk/openutils-mgnlmessages/src/main/java/net/ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/configuration/ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/configuration/MessagesConfigurationManager.java trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/EmptyResourceBundle.java trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/ModulePropertyMessagesImpl.java trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/RepositoryMessagesImpl.java trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/SimpleMessagesImpl.java trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/lifecycle/ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/lifecycle/MessagesModuleLifecycle.java trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/DefaultMessagesImpl.java trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/ExtractMessagesFromDialogsPage.java trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/MessagesEditPage.java trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/MessagesImpExpPage.java trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/setup/ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/setup/MessagesModuleVersionHandler.java trunk/openutils-mgnlmessages/src/main/resources/ trunk/openutils-mgnlmessages/src/main/resources/META-INF/ trunk/openutils-mgnlmessages/src/main/resources/META-INF/magnolia/ trunk/openutils-mgnlmessages/src/main/resources/META-INF/magnolia/messages.xml trunk/openutils-mgnlmessages/src/main/resources/mgnl-bootstrap/ trunk/openutils-mgnlmessages/src/main/resources/mgnl-bootstrap/messages/ trunk/openutils-mgnlmessages/src/main/resources/mgnl-bootstrap/messages/config.modules.adminInterface.config.menu.messages.xml trunk/openutils-mgnlmessages/src/main/resources/mgnl-bootstrap/messages/config.modules.adminInterface.config.menu.tools.messagesExtract.xml trunk/openutils-mgnlmessages/src/main/resources/mgnl-bootstrap/messages/config.modules.adminInterface.config.menu.tools.messagesJCR.xml trunk/openutils-mgnlmessages/src/main/resources/mgnl-bootstrap/messages/config.modules.messages.basenames.xml trunk/openutils-mgnlmessages/src/main/resources/mgnl-bootstrap/messages/config.modules.messages.locales.xml trunk/openutils-mgnlmessages/src/main/resources/mgnl-bootstrap/messages/config.modules.messages.pages.messagesEdit.xml trunk/openutils-mgnlmessages/src/main/resources/mgnl-bootstrap/messages/config.modules.messages.pages.messagesExtract.xml trunk/openutils-mgnlmessages/src/main/resources/mgnl-bootstrap/messages/config.modules.messages.pages.messagesImportExport.xml trunk/openutils-mgnlmessages/src/main/resources/mgnl-bootstrap/messages/config.modules.messages.trees.xml trunk/openutils-mgnlmessages/src/main/resources/mgnl-messages/ trunk/openutils-mgnlmessages/src/main/resources/mgnl-messages/messages/ trunk/openutils-mgnlmessages/src/main/resources/mgnl-messages/messages/messages_en.properties trunk/openutils-mgnlmessages/src/main/resources/mgnl-messages/messages/messages_it.properties trunk/openutils-mgnlmessages/src/main/resources/mgnl-resources/ trunk/openutils-mgnlmessages/src/main/resources/mgnl-resources/messages/ trunk/openutils-mgnlmessages/src/main/resources/mgnl-resources/messages/css/ trunk/openutils-mgnlmessages/src/main/resources/mgnl-resources/messages/css/messagespanel.css trunk/openutils-mgnlmessages/src/main/resources/mgnl-resources/messages/icons/ trunk/openutils-mgnlmessages/src/main/resources/mgnl-resources/messages/icons/delete.gif trunk/openutils-mgnlmessages/src/main/resources/mgnl-resources/messages/js/ trunk/openutils-mgnlmessages/src/main/resources/mgnl-resources/messages/js/MainPanel.js trunk/openutils-mgnlmessages/src/main/resources/mgnl-resources/messages/js/MessagesPanel.js trunk/openutils-mgnlmessages/src/main/resources/mgnl-resources/messages/js/MessagesViewer.js trunk/openutils-mgnlmessages/src/main/resources/mgnl-resources/messages/js/TabCloseMenu.js trunk/openutils-mgnlmessages/src/main/resources/net/ trunk/openutils-mgnlmessages/src/main/resources/net/sourceforge/ trunk/openutils-mgnlmessages/src/main/resources/net/sourceforge/openutils/ trunk/openutils-mgnlmessages/src/main/resources/net/sourceforge/openutils/mgnlmessages/ trunk/openutils-mgnlmessages/src/main/resources/net/sourceforge/openutils/mgnlmessages/pages/ trunk/openutils-mgnlmessages/src/main/resources/net/sourceforge/openutils/mgnlmessages/pages/ExtractMessagesFromDialogsPage.html trunk/openutils-mgnlmessages/src/main/resources/net/sourceforge/openutils/mgnlmessages/pages/MessagesEditPage.html trunk/openutils-mgnlmessages/src/main/resources/net/sourceforge/openutils/mgnlmessages/pages/MessagesImpExpPage.html trunk/openutils-mgnlmessages/src/test/ trunk/openutils-mgnlmessages/src/test/java/ trunk/openutils-mgnlmessages/src/test/resources/ Added: trunk/openutils-mgnlmessages/pom.xml =================================================================== --- trunk/openutils-mgnlmessages/pom.xml (rev 0) +++ trunk/openutils-mgnlmessages/pom.xml 2008-12-03 15:10:19 UTC (rev 927) @@ -0,0 +1,85 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>10</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + <packaging>jar</packaging> + <artifactId>openutils-mgnlmessages</artifactId> + <name>openutils-mgnlmessages</name> + <version>1.0-SNAPSHOT</version> + <licenses> + <license> + <name>GPLv3</name> + <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> + </license> + </licenses> + <build> + <resources> + <resource> + <filtering>false</filtering> + <directory>src/main/resources</directory> + <includes> + <include>**/*</include> + </includes> + </resource> + <resource> + <filtering>true</filtering> + <directory>src/main/resources</directory> + <includes> + <include>META-INF/magnolia/*</include> + </includes> + </resource> + </resources> + </build> + <dependencies> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-core</artifactId> + <version>3.6.3</version> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-module-admininterface</artifactId> + <version>3.6.3</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnltasks</artifactId> + <version>3.5.5</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnlext</artifactId> + <version>2.1</version> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.1</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + <repositories> + <repository> + <id>repository.magnolia.info</id> + <name>magnolia repository</name> + <url>http://svn.magnolia.info/maven/m2</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> +</project> Added: trunk/openutils-mgnlmessages/src/main/java/info/magnolia/cms/i18n/MessagesManager.java =================================================================== --- trunk/openutils-mgnlmessages/src/main/java/info/magnolia/cms/i18n/MessagesManager.java (rev 0) +++ trunk/openutils-mgnlmessages/src/main/java/info/magnolia/cms/i18n/MessagesManager.java 2008-12-03 15:10:19 UTC (rev 927) @@ -0,0 +1,456 @@ +/** + * This file Copyright (c) 2003-2008 Magnolia International + * Ltd. (http://www.magnolia.info). All rights reserved. + * + * + * This file is dual-licensed under both the Magnolia + * Network Agreement and the GNU General Public License. + * You may elect to use one or the other of these licenses. + * + * This file is distributed in the hope that it will be + * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT. + * Redistribution, except as permitted by whichever of the GPL + * or MNA you select, is prohibited. + * + * 1. For the GPL license (GPL), you can redistribute and/or + * modify this file under the terms of the GNU General + * Public License, Version 3, as published by the Free Software + * Foundation. You should have received a copy of the GNU + * General Public License, Version 3 along with this program; + * if not, write to the Free Software Foundation, Inc., 51 + * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * 2. For the Magnolia Network Agreement (MNA), this file + * and the accompanying materials are made available under the + * terms of the MNA which accompanies this distribution, and + * is available at http://www.magnolia.info/mna.html + * + * Any modifications to this file must keep this entire header + * intact. + * + */ +package info.magnolia.cms.i18n; + +import info.magnolia.cms.core.HierarchyManager; +import info.magnolia.cms.beans.config.ContentRepository; +import info.magnolia.cms.core.Content; +import info.magnolia.cms.core.ItemType; +import info.magnolia.cms.util.NodeDataUtil; +import info.magnolia.cms.util.ObservationUtil; +import info.magnolia.content2bean.Content2BeanUtil; +import info.magnolia.context.Context; +import info.magnolia.context.MgnlContext; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Locale; +import java.util.Map; + +import javax.jcr.observation.EventIterator; +import javax.jcr.observation.EventListener; +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; +import javax.servlet.jsp.jstl.core.Config; + +import net.sourceforge.openutils.mgnlmessages.i18n.RepositoryMessagesImpl; + +import org.apache.commons.collections.Transformer; +import org.apache.commons.collections.map.LazyMap; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * From this class you get the i18n messages. You should pass a a request, but if you can't the getMessages method will + * handle it properly. The get() methods are easy to use. + * @author philipp + */ +public final class MessagesManager +{ + + /** + * Use this locale if no other provided + */ + public static final String FALLBACK_LOCALE = "en"; //$NON-NLS-1$ + + /** + * Use this basename if no other is provided + */ + public static final String DEFAULT_BASENAME = "info.magnolia.module.admininterface.messages"; //$NON-NLS-1$ + + /** + * Logger. + */ + protected static Logger log = LoggerFactory.getLogger(AbstractMessagesImpl.class); + + /** + * The node name where the configuration for i18n is stored + */ + private static final String I18N_CONFIG_PATH = "/server/i18n/system"; //$NON-NLS-1$ + + /** + * The name of the property to store the current system language + */ + private static final String FALLBACK_NODEDATA = "fallbackLanguage"; //$NON-NLS-1$ + + /** + * Under this node all the available languages are stored. They are showed in the user dialog. + */ + private static final String LANGUAGES_NODE_NAME = "languages"; //$NON-NLS-1$ + + /** + * The current locale of the application + */ + private static Locale applicationLocale; + + /** + * List of the available locales + */ + private static Collection availableLocales = new ArrayList(); + + /** + * The context used for the messages + */ + private static ServletContext context; + + /** + * LRU Map for the messages + */ + private static Map messages; + + /** + * Util has no public constructor + */ + private MessagesManager() + { + } + + static + { + // setting default language (en) + MessagesManager.setDefaultLocale(FALLBACK_LOCALE); + + initLRUMap(); + } + + /** + * Called through the initialization process (startup of the container) + * @param context servlet context + */ + public static void init(ServletContext context) + { + MessagesManager.context = context; + + // setting fallback + context.setAttribute(Config.FMT_FALLBACK_LOCALE + ".application", FALLBACK_LOCALE); //$NON-NLS-1$ + // setting basename + context.setAttribute(Config.FMT_LOCALIZATION_CONTEXT + ".application", MessagesManager.DEFAULT_BASENAME); //$NON-NLS-1$ + // for Resin and other J2EE Containers + context.setAttribute(Config.FMT_LOCALIZATION_CONTEXT, MessagesManager.DEFAULT_BASENAME); + + load(); + registerEventListener(); + } + + /** + * The lazzy LRU Map creates messages objects with a faul back to the default locale. + */ + private static void initLRUMap() + { + // FIXME use LRU + // Map map = new LRUMap(20); + Map map = new HashMap(); + map = LazyMap.decorate(map, new Transformer() + { + + public Object transform(Object input) + { + MessagesID id = (MessagesID) input; + // check http://jira.magnolia.info/browse/MAGNOLIA-1060 + // We are now chaining current user (LOCALE) messages with system default messages + // so that it fallsback to default locale if string is not found instead of displaying broken + // ???LABELS??? + Messages msgs = new MessagesChain(new RepositoryMessagesImpl(id.basename, id.locale)) + .chain(new DefaultMessagesImpl(id.basename, id.locale)); + if (!MessagesManager.getDefaultLocale().equals(id.locale)) + { + msgs = new MessagesChain(msgs).chain(MessagesManager.getMessages(id.basename, MessagesManager + .getDefaultLocale())); + } + return msgs; + } + }); + messages = Collections.synchronizedMap(map); + } + + /** + * Load i18n configuration. + */ + public static void load() + { + + // reading the configuration from the repository, no need for context + HierarchyManager hm = ContentRepository.getHierarchyManager(ContentRepository.CONFIG); + + try + { + log.info("Config : loading i18n configuration - " + I18N_CONFIG_PATH); //$NON-NLS-1$ + + // checks if node exists + if (!hm.isExist(I18N_CONFIG_PATH)) + { + // configNode = ContentUtil.createPath(hm, I18N_CONFIG_PATH, ItemType.CONTENT, true); + log.warn(I18N_CONFIG_PATH + " does not exist yet; skipping."); + return; + } + + final Content configNode = hm.getContent(I18N_CONFIG_PATH); //$NON-NLS-1$ + + MessagesManager.setDefaultLocale(NodeDataUtil.getString(configNode, FALLBACK_NODEDATA, FALLBACK_LOCALE)); + + // get the available languages - creates it if it does not exist - necessary to update to 3.5 + final Content languagesNode; + if (configNode.hasContent(LANGUAGES_NODE_NAME)) + { + languagesNode = configNode.getContent(LANGUAGES_NODE_NAME); + } + else + { + languagesNode = configNode.createContent(LANGUAGES_NODE_NAME, ItemType.CONTENT); + } + + Map languageDefinitions = Content2BeanUtil.toMap(languagesNode, true, LocaleDefinition.class); + + // clear collection for reload + MessagesManager.availableLocales.clear(); + + for (Iterator iter = languageDefinitions.values().iterator(); iter.hasNext();) + { + LocaleDefinition ld = (LocaleDefinition) iter.next(); + if (ld.isEnabled()) + { + availableLocales.add(ld.getLocale()); + } + } + } + catch (Exception e) + { + log.error("Config : Failed to load i18n configuration - " + I18N_CONFIG_PATH, e); //$NON-NLS-1$ + } + } + + /** + * Register an event listener: reload configuration when something changes. + */ + private static void registerEventListener() + { + + log.info("Registering event listener for i18n"); //$NON-NLS-1$ + ObservationUtil.registerChangeListener(ContentRepository.CONFIG, I18N_CONFIG_PATH, new EventListener() + { + + public void onEvent(EventIterator iterator) + { + // reload everything + reload(); + } + }); + } + + /** + * Reload i18n configuration. + */ + public static void reload() + { + try + { + reloadBundles(); + } + catch (Exception e) + { + log.error("can't reload i18n messages", e); + } + initLRUMap(); + load(); + } + + public static Messages getMessages() + { + return getMessages(MessagesManager.DEFAULT_BASENAME, MgnlContext.getLocale()); + } + + public static Messages getMessages(String basename) + { + return getMessages(basename, MgnlContext.getLocale()); + } + + public static Messages getMessages(Locale locale) + { + return getMessages(MessagesManager.DEFAULT_BASENAME, locale); + } + + public static Messages getMessages(String basename, Locale locale) + { + if (StringUtils.isEmpty(basename)) + { + basename = MessagesManager.DEFAULT_BASENAME; + } + return (Messages) messages.get(new MessagesID(basename, locale)); + } + + public static String get(String key) + { + return MgnlContext.getMessages().get(key); + } + + /** + * Get a message with parameters inside: the value {0} must be a number + * @param key key to find + * @param args replacement strings + * @return message + */ + + public static String get(String key, Object[] args) + { + return MgnlContext.getMessages().get(key, args); + } + + /** + * Use a default string. + * @param key key to find + * @param defaultMsg default message + * @return message + */ + + public static String getWithDefault(String key, String defaultMsg) + { + return MgnlContext.getMessages().getWithDefault(key, defaultMsg); + } + + /** + * Get a message with parameters inside: the value {0} must be a number. Use a default message. + * @param key key to find + * @param args replacement strings + * @param defaultMsg default message + * @return message + */ + public static String getWithDefault(String key, Object[] args, String defaultMsg) + { + return MgnlContext.getMessages().getWithDefault(key, args, defaultMsg); + } + + /** + * @return Returns the defaultLocale. + */ + public static Locale getDefaultLocale() + { + return applicationLocale; + } + + /** + * Deprectated! Use MgnlContext + * @return Returns the current locale for the current user + * @deprecated + */ + public static Locale getCurrentLocale(HttpServletRequest request) + { + try + { + return MgnlContext.getLocale(); + } + catch (Exception e) + { + return getDefaultLocale(); + } + } + + /** + * @param defaultLocale The defaultLocale to set. + */ + public static void setDefaultLocale(String defaultLocale) + { + MessagesManager.applicationLocale = new Locale(defaultLocale); + MgnlContext.getSystemContext().setLocale(applicationLocale); + + if (context != null) + { + context.setAttribute(Config.FMT_LOCALE + ".application", defaultLocale); //$NON-NLS-1$ + } + } + + /** + * @return Returns the availableLocals. + */ + public static Collection getAvailableLocales() + { + return availableLocales; + } + + /** + * Set the user language in the session + * @param language lagnguage to ste + * @param session current session + * @deprecated since 3.5, use MgnlContext instead (this is not used - can be safely removed) + */ + public static void setUserLanguage(String language, HttpSession session) + { + MgnlContext.setAttribute(Config.FMT_LOCALE + ".session", language, Context.SESSION_SCOPE); //$NON-NLS-1$ + } + + public static void reloadBundles() throws Exception + { + // reload all present + for (Iterator iter = messages.values().iterator(); iter.hasNext();) + { + Messages msgs = (Messages) iter.next(); + msgs.reload(); + } + } + + /** + * Getter for <code>context</code>. + * @return Returns the context. + */ + public static ServletContext getContext() + { + return context; + } + + /** + * Used as the key in the LRUMap + * @author Philipp Bracher + * @version $Revision: 878 $ ($Author: manuel $) + */ + static private class MessagesID + { + + String basename; + + Locale locale; + + public MessagesID(String basename, Locale locale) + { + this.basename = basename; + this.locale = locale; + } + + @Override + public int hashCode() + { + return basename.hashCode(); + } + + @Override + public boolean equals(Object id) + { + return ((MessagesID) id).basename.equals(basename) && ((MessagesID) id).locale.equals(locale); + } + } +} Added: trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/configuration/MessagesConfigurationManager.java =================================================================== --- trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/configuration/MessagesConfigurationManager.java (rev 0) +++ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/configuration/MessagesConfigurationManager.java 2008-12-03 15:10:19 UTC (rev 927) @@ -0,0 +1,193 @@ +package net.sourceforge.openutils.mgnlmessages.configuration; + +import info.magnolia.api.MgnlException; +import info.magnolia.cms.beans.config.ContentRepository; +import info.magnolia.cms.beans.config.ObservedManager; +import info.magnolia.cms.core.Content; +import info.magnolia.cms.core.HierarchyManager; +import info.magnolia.cms.core.ItemType; +import info.magnolia.cms.core.NodeData; +import info.magnolia.cms.util.ContentUtil; +import info.magnolia.cms.util.FactoryUtil; +import info.magnolia.cms.util.NodeDataUtil; +import info.magnolia.context.MgnlContext; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; + +import javax.jcr.RepositoryException; + +import net.sourceforge.openutils.mgnlmessages.lifecycle.MessagesModuleLifecycle; + +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * @author molaschi + */ +public class MessagesConfigurationManager extends ObservedManager +{ + + /** + * Folder type + */ + public static final ItemType FOLDER = ItemType.CONTENT; + + private Logger log = LoggerFactory.getLogger(MessagesConfigurationManager.class); + + private List<Locale> locales = new ArrayList<Locale>(); + + /** + * {@inheritDoc} + */ + @Override + protected void onClear() + { + locales.clear(); + } + + /** + * {@inheritDoc} + */ + @Override + @SuppressWarnings("unchecked") + protected void onRegister(Content node) + { + if (node.getNodeDataCollection() != null) + { + locales.clear(); + + for (Iterator iter = ContentUtil.getAllChildren(node).iterator(); iter.hasNext();) + { + Content langNode = (Content) iter.next(); + locales.add(new Locale(NodeDataUtil.getString(langNode, "language"), NodeDataUtil.getString( + langNode, + "country"))); + } + + Collections.sort(locales, new Comparator<Locale>() + { + + /** + * {@inheritDoc} + */ + @Override + public int compare(Locale o1, Locale o2) + { + if (o1.getLanguage().equals(o2.getLanguage())) + { + return o1.getCountry().compareTo(o2.getCountry()); + } + + return o1.getLanguage().compareTo(o2.getLanguage()); + } + + }); + } + } + + public static MessagesConfigurationManager getInstance() + { + return (MessagesConfigurationManager) FactoryUtil.getSingleton(MessagesConfigurationManager.class); + } + + public static List<Locale> getAvaiableLocales() + { + return getInstance().getLocales(); + } + + @SuppressWarnings("unchecked") + public static List<String> getBaseNames() + { + HierarchyManager mgr = MgnlContext.getSystemContext().getHierarchyManager(ContentRepository.CONFIG); + try + { + Content basenamesNode = mgr.getContent("/modules/messages/basenames"); + if (basenamesNode == null || !basenamesNode.hasChildren(ItemType.CONTENTNODE.getSystemName())) + { + return new ArrayList<String>(); + } + List<String> basenames = new ArrayList<String>(); + for (Iterator it = basenamesNode.getChildren(ItemType.CONTENTNODE.getSystemName()).iterator(); it.hasNext();) + { + Content bn = (Content) it.next(); + basenames.add(NodeDataUtil.getString(bn, "basename")); + } + return basenames; + } + catch (RepositoryException e) + { + return new ArrayList<String>(); + } + } + + public static void saveKeyValue(String key, String value, String locale) throws RepositoryException + { + HierarchyManager mgr = MgnlContext.getSystemContext().getHierarchyManager(MessagesModuleLifecycle.REPO); + String path = "/" + StringUtils.replace(key, ".", "/"); + Content content = getOrCreateFullPath(mgr, path); + + if (!StringUtils.isEmpty(locale)) + { + NodeData nd = NodeDataUtil.getOrCreate(content, locale); + if (!StringUtils.isEmpty(value)) + { + nd.setValue(value); + } + else + { + nd.delete(); + } + } + + mgr.save(); + } + + private static Content getOrCreateFullPath(HierarchyManager mgr, String path) throws RepositoryException + { + try + { + return mgr.getContent(path); + } + catch (RepositoryException ex) + { + String parent = StringUtils.substringBeforeLast(path, "/"); + String label = StringUtils.substringAfterLast(path, "/"); + if (!StringUtils.isEmpty(parent)) + { + getOrCreateFullPath(mgr, parent); + } + else + { + parent = "/"; + } + + return mgr.createContent(parent, label, ItemType.CONTENTNODE.getSystemName()); + } + } + + /** + * Returns the locales. + * @return the locales + */ + public List<Locale> getLocales() + { + return locales; + } + + /** + * Sets the languages. + * @param languages the languages to set + */ + public void setLocales(List<Locale> locales) + { + this.locales = locales; + } + +} Added: trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/EmptyResourceBundle.java =================================================================== --- trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/EmptyResourceBundle.java (rev 0) +++ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/EmptyResourceBundle.java 2008-12-03 15:10:19 UTC (rev 927) @@ -0,0 +1,63 @@ +package net.sourceforge.openutils.mgnlmessages.i18n; + +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.ResourceBundle; + + +/** + * @author molaschi + * @version $Id: $ + */ +public class EmptyResourceBundle extends ResourceBundle +{ + + /** + * + */ + public EmptyResourceBundle() + { + super(); + } + + /** + * {@inheritDoc} + */ + @Override + public Enumeration<String> getKeys() + { + + return new Enumeration<String>() + { + + /** + * {@inheritDoc} + */ + @Override + public boolean hasMoreElements() + { + return false; + } + + /** + * {@inheritDoc} + */ + @Override + public String nextElement() + { + return null; + } + + }; + } + + /** + * {@inheritDoc} + */ + @Override + protected Object handleGetObject(String arg0) + { + return null; + } + +} Added: trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/ModulePropertyMessagesImpl.java =================================================================== --- trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/ModulePropertyMessagesImpl.java (rev 0) +++ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/ModulePropertyMessagesImpl.java 2008-12-03 15:10:19 UTC (rev 927) @@ -0,0 +1,91 @@ +package net.sourceforge.openutils.mgnlmessages.i18n; + +import info.magnolia.cms.i18n.AbstractMessagesImpl; +import info.magnolia.cms.i18n.Messages; +import info.magnolia.module.ModuleRegistry; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Set; + + +/** + * @author molaschi + * @version $Id: $ + */ +public class ModulePropertyMessagesImpl extends AbstractMessagesImpl +{ + + List<Messages> messages = new ArrayList<Messages>(); + + /** + * @param basename + * @param locale + */ + @SuppressWarnings("unchecked") + public ModulePropertyMessagesImpl(Locale locale) + { + super("", locale); + ModuleRegistry reg = ModuleRegistry.Factory.getInstance(); + for (String name : (Set<String>) reg.getModuleNames()) + { + messages.add(new SimpleMessagesImpl("mgnl-messages." + name + ".messages", locale)); + } + } + + /** + * {@inheritDoc} + */ + @Override + public String get(String key) + { + String value; + for (Messages m : messages) + { + value = m.get(key); + if (value != null) + { + return value; + } + } + if (key == null) + { + return "??????"; + } + return "???" + key + "???"; + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + public Iterator keys() + { + List<String> keys = new ArrayList<String>(); + for (Messages m : messages) + { + Iterator it = m.keys(); + while (it.hasNext()) + { + keys.add((String) it.next()); + } + } + return keys.iterator(); + } + + /** + * {@inheritDoc} + */ + @Override + public void reload() throws Exception + { + for (Messages m : messages) + { + m.reload(); + } + } + +} Added: trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/RepositoryMessagesImpl.java =================================================================== --- trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/RepositoryMessagesImpl.java (rev 0) +++ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/RepositoryMessagesImpl.java 2008-12-03 15:10:19 UTC (rev 927) @@ -0,0 +1,134 @@ +package net.sourceforge.openutils.mgnlmessages.i18n; + +import info.magnolia.cms.core.Content; +import info.magnolia.cms.core.HierarchyManager; +import info.magnolia.cms.core.ItemType; +import info.magnolia.cms.core.search.Query; +import info.magnolia.cms.core.search.QueryManager; +import info.magnolia.cms.core.search.QueryResult; +import info.magnolia.cms.i18n.AbstractMessagesImpl; +import info.magnolia.cms.util.NodeDataUtil; +import info.magnolia.context.MgnlContext; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.MissingResourceException; + +import javax.jcr.RepositoryException; + +import org.apache.commons.lang.StringUtils; + + +/** + * @author molaschi + * @version $Id: RepositoryMessagesImpl.java 4465 2008-09-28 10:59:58Z fgiust $ + */ +public class RepositoryMessagesImpl extends AbstractMessagesImpl +{ + + private static final String MESS_REPO = "messages"; + + private List<String> keys; + + /** + * @param basename + * @param locale + */ + public RepositoryMessagesImpl(String basename, Locale locale) + { + super(basename, locale); + } + + /** + * Get the message from the bundle + * @param key the key + * @return message + */ + public String get(String key) + { + if (key == null) + { + return "??????"; + } + try + { + String handle = StringUtils.replace(key, ".", "/"); + HierarchyManager hm = MgnlContext.getSystemContext().getHierarchyManager(MESS_REPO); + Content c = hm.getContent(handle); + String locale1 = this.locale.getLanguage() + "_" + this.locale.getCountry(); + String locale2 = this.locale.getLanguage(); + if (c == null || (!c.hasNodeData(locale1) && !c.hasNodeData(locale2))) + { + return "???" + key + "???"; + } + if (c.hasNodeData(locale1)) + { + return NodeDataUtil.getString(c, locale1); + } + else + { + return NodeDataUtil.getString(c, locale2); + } + } + catch (MissingResourceException e) + { + return "???" + key + "???"; + } + catch (RepositoryException e) + { + return "???" + key + "???"; + } + } + + /** + * {@inheritDoc} + */ + @Override + public void reload() throws Exception + { + keys = null; + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + public Iterator keys() + { + + long ms = System.currentTimeMillis(); + + if (keys == null) + { + + keys = new ArrayList<String>(); + + try + { + QueryManager qm = MgnlContext.getSystemContext().getQueryManager(MESS_REPO); + Query q = qm.createQuery("//*", Query.XPATH); + QueryResult qr = q.execute(); + for (Content c : (Collection<Content>) qr.getContent(ItemType.CONTENTNODE.getSystemName())) + { + if (c.getNodeDataCollection().size() > 0) + { + keys.add(StringUtils.replace(c.getHandle(), "/", ".").substring(1)); + } + } + } + catch (RepositoryException e) + { + + } + } + + log.debug("Messages loaded in {} ms", System.currentTimeMillis() - ms); + + return keys.iterator(); + } + +} Added: trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/SimpleMessagesImpl.java =================================================================== --- trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/SimpleMessagesImpl.java (rev 0) +++ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/i18n/SimpleMessagesImpl.java 2008-12-03 15:10:19 UTC (rev 927) @@ -0,0 +1,132 @@ +package net.sourceforge.openutils.mgnlmessages.i18n; + +import info.magnolia.cms.i18n.AbstractMessagesImpl; +import info.magnolia.cms.i18n.MessagesManager; +import info.magnolia.cms.util.ClasspathResourcesUtil; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Iterator; +import java.util.Locale; +import java.util.MissingResourceException; +import java.util.PropertyResourceBundle; +import java.util.ResourceBundle; + +import org.apache.commons.collections.IteratorUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.io.IOUtils; + + +/** + * @author Philipp Bracher + * @version $Revision: 14052 $ ($Author: gjoseph $) + */ +public class SimpleMessagesImpl extends AbstractMessagesImpl +{ + + /** + * @param basename + * @param locale + */ + protected SimpleMessagesImpl(String basename, Locale locale) + { + super(basename, locale); + } + + /** + * Get the message from the bundle + * @param key the key + * @return message + */ + public String get(String key) + { + if (key == null) + { + return null; + } + try + { + return getBundle().getString(key); + } + catch (MissingResourceException e) + { + return null; + } + } + + /** + * @return Returns the bundle for the current basename + */ + protected ResourceBundle getBundle() + { + if (bundle == null) + { + InputStream stream = null; + try + { + stream = ClasspathResourcesUtil.getStream("/" + + StringUtils.replace(basename, ".", "/") + + "_" + + getLocale().getLanguage() + + "_" + + getLocale().getCountry() + + ".properties", false); + if (stream == null) + { + stream = ClasspathResourcesUtil.getStream("/" + + StringUtils.replace(basename, ".", "/") + + "_" + + getLocale().getLanguage() + + ".properties", false); + } + if (stream == null) + { + stream = ClasspathResourcesUtil.getStream("/" + + StringUtils.replace(basename, ".", "/") + + "_" + + MessagesManager.getDefaultLocale().getLanguage() + + ".properties", false); + } + if (stream == null) + { + stream = ClasspathResourcesUtil.getStream("/" + + StringUtils.replace(basename, ".", "/") + + ".properties", false); + } + + if (stream != null) + { + bundle = new PropertyResourceBundle(stream); + } + else + { + bundle = new EmptyResourceBundle(); + } + } + catch (IOException e) + { + log.error("can't load messages for " + basename); + } + finally + { + IOUtils.closeQuietly(stream); + } + } + return bundle; + } + + public void reload() throws Exception + { + this.bundle = null; + } + + /** + * Iterate over the keys + */ + @SuppressWarnings("unchecked") + public Iterator keys() + { + return IteratorUtils.asIterator(this.getBundle().getKeys()); + } + +} Added: trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/lifecycle/MessagesModuleLifecycle.java =================================================================== --- trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/lifecycle/MessagesModuleLifecycle.java (rev 0) +++ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/lifecycle/MessagesModuleLifecycle.java 2008-12-03 15:10:19 UTC (rev 927) @@ -0,0 +1,43 @@ +package net.sourceforge.openutils.mgnlmessages.lifecycle; + +import info.magnolia.module.ModuleLifecycle; +import info.magnolia.module.ModuleLifecycleContext; +import net.sourceforge.openutils.mgnlmessages.configuration.MessagesConfigurationManager; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * @author molaschi + */ +public class MessagesModuleLifecycle implements ModuleLifecycle +{ + + /** + * + */ + public static final String REPO = "messages"; + + private Logger log = LoggerFactory.getLogger(MessagesModuleLifecycle.class); + + /** + * {@inheritDoc} + */ + @Override + public void start(ModuleLifecycleContext ctx) + { + log.info("Starting module messages"); + ctx.registerModuleObservingComponent("locales", MessagesConfigurationManager.getInstance()); + } + + /** + * {@inheritDoc} + */ + @Override + public void stop(ModuleLifecycleContext ctx) + { + log.info("Stopping module messages"); + } + +} Added: trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/DefaultMessagesImpl.java =================================================================== --- trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/DefaultMessagesImpl.java (rev 0) +++ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/DefaultMessagesImpl.java 2008-12-03 15:10:19 UTC (rev 927) @@ -0,0 +1,95 @@ +package net.sourceforge.openutils.mgnlmessages.pages; + +import info.magnolia.cms.util.ClasspathResourcesUtil; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Locale; +import java.util.PropertyResourceBundle; +import java.util.ResourceBundle; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; + + +/** + * @author molaschi + * @version $Id: DefaultMessagesImpl.java 4124 2008-09-22 14:56:46Z fgiust $ + */ +public class DefaultMessagesImpl extends info.magnolia.cms.i18n.DefaultMessagesImpl +{ + + /** + * @param basename + * @param locale + */ + public DefaultMessagesImpl(String basename, Locale locale) + { + super(basename, locale); + } + + /** + * {@inheritDoc} + */ + @Override + public String get(String key) + { + if (this.getBundle() == null) + { + return "??????"; + } + return super.get(key); + } + + /** + * {@inheritDoc} + */ + @Override + protected ResourceBundle getBundle() + { + if (bundle == null) + { + InputStream stream = null; + try + { + if (StringUtils.isEmpty(getLocale().getCountry())) + { + stream = ClasspathResourcesUtil.getStream("/" + + StringUtils.replace(basename, ".", "/") + + "_" + + getLocale().getLanguage() + + ".properties", false); + } + else + { + stream = ClasspathResourcesUtil.getStream("/" + + StringUtils.replace(basename, ".", "/") + + "_" + + getLocale().getLanguage() + + "_" + + getLocale().getCountry() + + ".properties", false); + } + + if (stream != null) + { + bundle = new PropertyResourceBundle(stream); + } + else + { + bundle = null; + } + } + catch (IOException e) + { + log.error("can't load messages for " + basename); + } + finally + { + IOUtils.closeQuietly(stream); + } + } + return bundle; + } + +} Added: trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/ExtractMessagesFromDialogsPage.java =================================================================== --- trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/ExtractMessagesFromDialogsPage.java (rev 0) +++ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/ExtractMessagesFromDialogsPage.java 2008-12-03 15:10:19 UTC (rev 927) @@ -0,0 +1,207 @@ +package net.sourceforge.openutils.mgnlmessages.pages; + +import info.magnolia.cms.beans.config.ContentRepository; +import info.magnolia.cms.core.Content; +import info.magnolia.cms.core.HierarchyManager; +import info.magnolia.cms.core.ItemType; +import info.magnolia.cms.core.NodeData; +import info.magnolia.cms.core.search.Query; +import info.magnolia.cms.core.search.QueryManager; +import info.magnolia.cms.core.search.QueryResult; +import info.magnolia.cms.util.ContentUtil; +import info.magnolia.cms.util.NodeDataUtil; +import info.magnolia.context.MgnlContext; +import info.magnolia.module.admininterface.TemplatedMVCHandler; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import javax.jcr.RepositoryException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import net.sourceforge.openutils.mgnlmessages.lifecycle.MessagesModuleLifecycle; + +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * @author molaschi + * @version $Id: $ + */ +public class ExtractMessagesFromDialogsPage extends TemplatedMVCHandler +{ + + private List<String> dialogsRoot; + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(ExtractMessagesFromDialogsPage.class); + + /** + * @param name + * @param request + * @param response + */ + public ExtractMessagesFromDialogsPage(String name, HttpServletRequest request, HttpServletResponse response) + { + super(name, request, response); + } + + /** + * {@inheritDoc} + */ + @Override + public String show() + { + dialogsRoot = new ArrayList<String>(); + QueryManager qm = MgnlContext.getQueryManager(ContentRepository.CONFIG); + Query q; + try + { + q = qm.createQuery("//dialogs", Query.XPATH); + + QueryResult qr = q.execute(); + Collection<Content> dialogs = qr.getContent(); + for (Content dialog : dialogs) + { + dialogsRoot.add(dialog.getHandle()); + } + + q = qm.createQuery("//paragraphs", Query.XPATH); + + qr = q.execute(); + dialogs = qr.getContent(); + for (Content dialog : dialogs) + { + dialogsRoot.add(dialog.getHandle()); + } + } + catch (RepositoryException e) + { + + } + + return super.show(); + } + + public String extract() + { + HierarchyManager hmConfig = MgnlContext.getHierarchyManager(ContentRepository.CONFIG); + QueryManager qm = hmConfig.getQueryManager(); + HierarchyManager hm = MgnlContext.getHierarchyManager(MessagesModuleLifecycle.REPO); + for (String dialogRoot : this.request.getParameterValues("dialogsRoots")) + { + Query q; + try + { + doExtraction(dialogRoot, "label", qm, hm, hmConfig); + } + catch (RepositoryException e) + { + log.error("Error extracting labels from dialogs and paragraphs", e); + } + + try + { + doExtraction(dialogRoot, "description", qm, hm, hmConfig); + } + catch (RepositoryException e) + { + log.error("Error extracting description from dialogs and paragraphs", e); + } + + try + { + doExtraction(dialogRoot, "title", qm, hm, hmConfig); + } + catch (RepositoryException e) + { + log.error("Error extracting description from dialogs and paragraphs", e); + } + } + + return this.show(); + } + + private void doExtraction(String root, String property, QueryManager qm, HierarchyManager hmMessages, + HierarchyManager hmConfig) throws RepositoryException + { + Query q = qm.createQuery(root.substring(1) + "//*[@" + property + "]", Query.XPATH); + + QueryResult qr = q.execute(); + Collection<Content> labelParents = new ArrayList<Content>(); + labelParents.addAll(qr.getContent(ItemType.CONTENTNODE.getSystemName())); + labelParents.addAll(qr.getContent(ItemType.CONTENT.getSystemName())); + for (Content labelParent : labelParents) + { + NodeData labelNd = labelParent.getNodeData(property); + String label = labelNd.getString(); + if (!StringUtils.isEmpty(label) && MgnlContext.getMessages().get(label).startsWith("???")) + { + String parentPath = labelParent.getHandle(); + parentPath = StringUtils.replace(parentPath, "/modules", ""); + Content parent = getOrCreateFullPath(hmMessages, parentPath); + Content message = ContentUtil.getOrCreateContent(parent, property, ItemType.CONTENTNODE); + NodeData nd = NodeDataUtil.getOrCreate(message, "en"); + nd.setValue(label); + nd = NodeDataUtil.getOrCreate(message, "it"); + nd.setValue(label); + + String messageKey = message.getHandle().substring(1); + messageKey = StringUtils.replace(messageKey, "/", "."); + labelNd.setValue(messageKey); + } + } + hmMessages.save(); + hmConfig.save(); + } + + private Content getOrCreateFullPath(HierarchyManager mgr, String path) throws RepositoryException + { + try + { + return mgr.getContent(path); + } + catch (RepositoryException ex) + { + String parent = StringUtils.substringBeforeLast(path, "/"); + String label = StringUtils.substringAfterLast(path, "/"); + if (!StringUtils.isEmpty(parent)) + { + getOrCreateFullPath(mgr, parent); + } + else + { + parent = "/"; + } + + Content c = mgr.createContent(parent, label, ItemType.CONTENTNODE.getSystemName()); + mgr.save(); + return c; + } + } + + /** + * Returns the dialogsRoot. + * @return the dialogsRoot + */ + public List<String> getDialogsRoot() + { + return dialogsRoot; + } + + /** + * Sets the dialogsRoot. + * @param dialogsRoot the dialogsRoot to set + */ + public void setDialogsRoot(List<String> dialogsRoot) + { + this.dialogsRoot = dialogsRoot; + } + +} Added: trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/MessagesEditPage.java =================================================================== --- trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/MessagesEditPage.java (rev 0) +++ trunk/openutils-mgnlmessages/src/main/java/net/sourceforge/openutils/mgnlmessages/pages/MessagesEditPage.java 2008-12-03 15:10:19 UTC (rev 927) @@ -0,0 +1,387 @@ +package net.sourceforge.openutils.mgnlmessages.pages; + +import info.magnolia.cms.core.Content; +import info.magnolia.cms.core.HierarchyManager; +import info.magnolia.cms.core.ItemType; +import info.magnolia.cms.core.Path; +import info.magnolia.cms.exchange.ExchangeException; +import info.magnolia.context.MgnlContext; +import info.magnolia.module.admininterface.TemplatedMVCHandler; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; + +import javax.jcr.PathNotFoundException; +import javax.jcr.RepositoryException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import net.sourceforge.openutils.mgnlmessages.configuration.MessagesConfigurationManager; +import net.sourceforge.openutils.mgnlmessages.lifecycle.MessagesModuleLifecycle; + +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * @author manuel + * @version $Id + */ +public class MessagesEditPage extends TemplatedMVCHandler +{ + + private static final String JSON_VIEW = "js"; + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(MessagesEditPage.class); + + private List<String> keys; + + private List<Locale> locales; + + private String currentLanguage; + + private String json; + + private String key; + + private String locale; + + private String text; + + private String newkey; + + /** + * @param name + * @param request + * @param response + */ + public MessagesEditPage(String name, HttpServletRequest request, HttpServletResponse response) + { + super(name, request, response); + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + public void init() + { + + super.init(); + } + + /** + * {@inheritDoc} + */ + @Override + public void renderHtml(String view) throws IOException + { + if (JSON_VIEW.equals(view)) + { + this.response.setContentType("text/json"); + this.response.getWriter().write(json); + } + else + { + + keys = new ArrayList<String>(); + Iterator<String> it = MgnlContext.getMessages().keys(); + while (it.hasNext()) + { + keys.add(it.next()); + } + Collections.sort(keys); + + locales = MessagesConfigurationManager.getAvaiableLocales(); + + Locale loc = this.request.getLocale(); + currentLanguage = loc.getLanguage(); + if (loc.getCountry() != null && loc.getCountry().length() > 0) + { + currentLanguage += "_" + loc.getCountry(); + } + + super.renderHtml(view); + } + } + + public String loadkey() + { + Locale locBk = MgnlContext.getLocale(); + Locale newLoc = null; + if (locale.indexOf('_') > 0) + { + newLoc = new Locale(StringUtils.substringBefore(locale, "_"), StringUtils.substringAfter(locale, "_")); + } + else + { + newLoc = new Locale(locale); + } + MgnlContext.setLocale(newLoc); + + json = "rootObj = {value: '" + + ((MgnlContext.getMessages().get(key) != null) ? StringUtils.replace( + MgnlContext.getMessages().get(key), + "'", + "\'") : "") + + "'}"; + + MgnlContext.setLocale(locBk); + + return JSON_VIEW; + } + + public String savekey() + { + try + { + MessagesConfigurationManager.saveKeyValue(key, text, locale); + json = "rootObj = {value: 'OK'}"; + } + catch (RepositoryException e) + { + log.error("Error saving key", e); + json = "rootObj = {value: 'KO'}"; + } + + return JSON_VIEW; + } + + public String removekey() + { + try + { + HierarchyManager mgr = MgnlContext.getSystemContext().getHierarchyManager(MessagesModuleLifecycle.REPO); + String path = "/" + StringUtils.replace(key, ".", "/"); + mgr.delete(path); + + mgr.save(); + + String parent = StringUtils.substringBeforeLast(path, "/"); + if (!StringUtils.isEmpty(parent)) + { + if (!mgr.getContent(parent).hasChildren(ItemType.CONTENTNODE.getSystemName())) + { + key = StringUtils.replace(parent.substring(1), "/", "."); + removekey(); + } + } + json = "rootObj = {value: 'OK'}"; + } + catch (PathNotFoundException e) + { + json = "rootObj = {value: 'NOTFOUND'}"; + } + catch (RepositoryException e) + { + log.error("Error removing key", e); + json = "rootObj = {value: 'KO'}"; + } + + return JSON_VIEW; + } + + public String renamekey() + { + try + { + moveNode("/" + StringUtils.replace(key, ".", "/"), "/" + StringUtils.replace(newkey, ".", "/")); + json = "rootObj = {value: 'OK'}"; + } + catch (RepositoryException e) + { + log.error("Error removing ke... [truncated message content] |