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...> - 2009-03-05 14:48:34
|
Revision: 1077 http://openutils.svn.sourceforge.net/openutils/?rev=1077&view=rev Author: fgrilli Date: 2009-03-05 14:48:26 +0000 (Thu, 05 Mar 2009) Log Message: ----------- changed signature of unimplemented criteria in and used InExpression implementation Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/criterion/Restrictions.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/criterion/Restrictions.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/criterion/Restrictions.java 2009-03-05 14:46:37 UTC (rev 1076) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/criterion/Restrictions.java 2009-03-05 14:48:26 UTC (rev 1077) @@ -206,25 +206,25 @@ * Apply an "in" constraint to the named node * @param nodeName - String a qualified (eg. nt:somenode) or unqualified (eg. somenode) node name. When a node is an * attribute it must be preceded by the '@'character (eg. @nt:somenode) - * @param values - must be instances of either {@link String} or {@link Number} or {@link Calendar}. + * @param values - a String[] * @return Criterion */ - public static Criterion in(String nodeName, Object[] values) + public static Criterion in(String nodeName, String[] values) { - throw new UnsupportedOperationException(); + return new InExpression(nodeName, values); } /** * Apply an "in" constraint to the named node * @param nodeName - String a qualified (eg. nt:somenode) or unqualified (eg. somenode) node name. When a node is an * attribute it must be preceded by the '@'character (eg. @nt:somenode) - * @param values - must be instances of either {@link String} or {@link Number} or {@link Calendar}. + * @param values - a collection of {@link String} * @return Criterion */ - public static Criterion in(String nodeName, Collection values) + public static Criterion in(String nodeName, Collection<String> values) { - throw new UnsupportedOperationException(); + return new InExpression(nodeName, values.toArray(new String[values.size()])); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-03-05 14:46:43
|
Revision: 1076 http://openutils.svn.sourceforge.net/openutils/?rev=1076&view=rev Author: fgrilli Date: 2009-03-05 14:46:37 +0000 (Thu, 05 Mar 2009) Log Message: ----------- implemented InExpression Added Paths: ----------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/criterion/InExpression.java Added: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/criterion/InExpression.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/criterion/InExpression.java (rev 0) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/criterion/InExpression.java 2009-03-05 14:46:37 UTC (rev 1076) @@ -0,0 +1,47 @@ +package net.sourceforge.openutils.mgnlcriteria.jcr.query.criterion; + +import net.sourceforge.openutils.mgnlcriteria.jcr.query.Criteria; +import net.sourceforge.openutils.mgnlcriteria.jcr.query.JCRQueryException; + + +/** + * @author fgrilli + * @version $Id$ + */ +public class InExpression implements Criterion +{ + + private static final long serialVersionUID = -8445602953808764036L; + + private String nodeName; + + private String[] values; + + public InExpression(String nodeName, String[] values) + { + this.nodeName = nodeName; + if (!(values instanceof String[])) + { + String msg = "values must be of type String[]"; + log.error(msg); + throw new IllegalArgumentException(msg); + } + this.values = values; + } + + public String toXPathString(Criteria criteria) throws JCRQueryException + { + StringBuilder inClause = new StringBuilder("( "); + + for (int i = 0; i < values.length; i++) + { + String containsPredicate = Restrictions.contains(nodeName, values[i]).toXPathString(criteria); + inClause.append(containsPredicate); + // if this is not the last value, append an 'or' + if ((i + 1) != values.length) + inClause.append(" or "); + } + inClause.append(") "); + return inClause.toString(); + } +} Property changes on: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/criterion/InExpression.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 1075 http://openutils.svn.sourceforge.net/openutils/?rev=1075&view=rev Author: fgrilli Date: 2009-03-01 18:17:40 +0000 (Sun, 01 Mar 2009) Log Message: ----------- fixed log Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java 2009-03-01 18:08:06 UTC (rev 1074) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java 2009-03-01 18:17:40 UTC (rev 1075) @@ -109,7 +109,7 @@ encodedPath.append(ch); } } - log.debug("returning encoded path", encodedPath); + log.debug("returning encoded path {}", encodedPath); return encodedPath.toString(); } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 1074 http://openutils.svn.sourceforge.net/openutils/?rev=1074&view=rev Author: fgrilli Date: 2009-03-01 18:08:06 +0000 (Sun, 01 Mar 2009) Log Message: ----------- javadoc Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java 2009-03-01 18:03:42 UTC (rev 1073) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java 2009-03-01 18:08:06 UTC (rev 1074) @@ -80,6 +80,10 @@ .replaceAll("'", "\\\\'"))); } + /** + * @param String path to encode eg //my//path/2009//* + * @return String encoded path eg //my//path/_x32_009//* + */ public static String encodeDigitsInPath(String path) { log.debug("path to encode is {}", path); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 1073 http://openutils.svn.sourceforge.net/openutils/?rev=1073&view=rev Author: fgrilli Date: 2009-03-01 18:03:42 +0000 (Sun, 01 Mar 2009) Log Message: ----------- encode path Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/AbstractMagnoliaCriteriaImpl.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/AbstractMagnoliaCriteriaImpl.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/AbstractMagnoliaCriteriaImpl.java 2009-03-01 18:01:50 UTC (rev 1072) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/AbstractMagnoliaCriteriaImpl.java 2009-03-01 18:03:42 UTC (rev 1073) @@ -1,5 +1,6 @@ package net.sourceforge.openutils.mgnlcriteria.jcr.query.xpath.impl; +import net.sourceforge.openutils.mgnlcriteria.jcr.query.xpath.utils.XPathTextUtils; import info.magnolia.cms.core.Content; import info.magnolia.cms.core.search.QueryManager; @@ -15,7 +16,7 @@ /** * Constructor to be used by subclasses - * @param path String - the path preceeding the predicate in the jcr query statement + * @param path String - the path preceeding the predicate in the jcr query statement (you dont need to do escaping yourself) * @param queryManager - an instance of {@link QueryManager} * @param itemType - String the itemType. Defaults to {@link ItemType#getSystemName#toString()} * @param classType Class<?> - defaults to {@link Content} @@ -24,7 +25,7 @@ { super(); this.itemType = itemType; - this.path = path; + this.path = XPathTextUtils.encodeDigitsInPath(path); this.queryManager = queryManager; // defaults to info.magnolia.cms.core.Content this.classType = classType == null ? Content.class : classType; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 1072 http://openutils.svn.sourceforge.net/openutils/?rev=1072&view=rev Author: fgrilli Date: 2009-03-01 18:01:50 +0000 (Sun, 01 Mar 2009) Log Message: ----------- encode path tokens starting with a digit Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java 2009-03-01 12:45:46 UTC (rev 1071) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java 2009-03-01 18:01:50 UTC (rev 1072) @@ -1,5 +1,10 @@ package net.sourceforge.openutils.mgnlcriteria.jcr.query.xpath.utils; +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + /** * A utility class to escape xpath strings * @author fgrilli @@ -8,6 +13,8 @@ public class XPathTextUtils { + private static final Logger log = LoggerFactory.getLogger(XPathTextUtils.class); + private XPathTextUtils() { } @@ -72,4 +79,33 @@ .replaceAll("\\\\(?![-\"])", "\\\\\\\\") .replaceAll("'", "\\\\'"))); } -} + + public static String encodeDigitsInPath(String path) + { + log.debug("path to encode is {}", path); + if (StringUtils.isBlank(path)) + { + String msg = "path cannot be a null or empty string"; + log.error(msg); + throw new IllegalArgumentException(msg); + } + + StringBuilder encodedPath = new StringBuilder(path.length()); + // TODO maybe a more robust check is needed + for (int i = 0; i < path.length(); ++i) + { + char ch = path.charAt(i); + + if (i > 0 && path.charAt(i - 1) == '/' && Character.isDigit(ch)) + { + encodedPath.append("_x" + Integer.toHexString(ch) + "_"); + } + else + { + encodedPath.append(ch); + } + } + log.debug("returning encoded path", encodedPath); + return encodedPath.toString(); + } +} \ 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...> - 2009-03-01 12:45:48
|
Revision: 1071 http://openutils.svn.sourceforge.net/openutils/?rev=1071&view=rev Author: fgrilli Date: 2009-03-01 12:45:46 +0000 (Sun, 01 Mar 2009) Log Message: ----------- improved javadoc Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/Criteria.java trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/Criteria.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/Criteria.java 2009-03-01 12:34:32 UTC (rev 1070) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/Criteria.java 2009-03-01 12:45:46 UTC (rev 1071) @@ -38,7 +38,8 @@ * <br> * @see JCRCriteriaFactory#createMgnlCriteria(String, info.magnolia.cms.core.search.QueryManager, String) * @see JCRCriteriaFactory#createMgnlCriteria(String, info.magnolia.cms.core.search.QueryManager, String, Class) - * @see JCRCriteriaFactory#createJCRCriteria(String, javax.jcr.query.QueryManager, String) + * @see JCRCriteriaFactory#createMgnlCriteriaWithLimit(String, info.magnolia.cms.core.search.QueryManager, String) + * @see JCRCriteriaFactory#createMgnlCriteriaWithLimit(String, info.magnolia.cms.core.search.QueryManager, String, Class) * @see Restrictions * @see Order * @author Federico Grilli Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java 2009-03-01 12:34:32 UTC (rev 1070) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java 2009-03-01 12:45:46 UTC (rev 1071) @@ -1,6 +1,5 @@ package net.sourceforge.openutils.mgnlcriteria.jcr.query; -import net.sourceforge.openutils.mgnlcriteria.jcr.query.xpath.impl.AbstractMagnoliaCriteriaImpl; import net.sourceforge.openutils.mgnlcriteria.jcr.query.xpath.impl.MagnoliaCriteriaImpl; import net.sourceforge.openutils.mgnlcriteria.jcr.query.xpath.impl.MagnoliaCriteriaWithLimitImpl; @@ -22,8 +21,7 @@ * predicate * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager * @param itemType String - if not specified defaults to "mgnl:content" - * @return an instance of a concrete subclass of {@link AbstractMagnoliaCriteriaImpl} - * @see MagnoliaCriteriaImpl + * @return a factory for Magnolia CMS specific Criteria implementation */ public static Criteria createMgnlCriteria(String path, info.magnolia.cms.core.search.QueryManager queryManager, String itemType) @@ -38,8 +36,7 @@ * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager * @param itemType String - if not specified defaults to "mgnl:content" * @param classType Class<?> - the list method of this implementation must return instances of this type - * @return an instance of a concrete subclass of {@link AbstractMagnoliaCriteriaImpl} - * @see MagnoliaCriteriaImpl + * @return a factory for Magnolia CMS specific Criteria implementation */ public static Criteria createMgnlCriteria(String path, info.magnolia.cms.core.search.QueryManager queryManager, String itemType, Class< ? > classType) @@ -60,8 +57,7 @@ * predicate * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager * @param itemType String - if not specified defaults to "mgnl:content" - * @return an instance of a concrete subclass of {@link AbstractMagnoliaCriteriaImpl} - * @see MagnoliaCriteriaWithLimitImpl + * @return a factory for Magnolia CMS specific Criteria implementation */ public static Criteria createMgnlCriteriaWithLimit(String path, info.magnolia.cms.core.search.QueryManager queryManager, String itemType) @@ -83,8 +79,7 @@ * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager * @param itemType String - if not specified defaults to "mgnl:content" * @param classType Class<?> - the list method of this implementation must return instances of this type - * @return an instance of a concrete subclass of {@link AbstractMagnoliaCriteriaImpl} - * @see MagnoliaCriteriaWithLimitImpl + * @return a factory for Magnolia CMS specific Criteria implementation */ public static Criteria createMgnlCriteriaWithLimit(String path, info.magnolia.cms.core.search.QueryManager queryManager, String itemType, Class< ? > classType) @@ -92,16 +87,14 @@ return new MagnoliaCriteriaWithLimitImpl(path, queryManager, itemType, classType); } - /** + /* * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the * predicate * @param queryManager - an instance of javax.jcr.query.QueryManager * @param itemType String - depends on the implementation * @return an instance of a JCR-specific implementation of {@link Criteria} - * @throws UnsupportedOperationException as it is not implemented yet + * @throws UnsupportedOperationException as it is not implemented yet public static Criteria + * createJCRCriteria(String path, javax.jcr.query.QueryManager queryManager, String itemType) { throw new + * UnsupportedOperationException(); } */ - public static Criteria createJCRCriteria(String path, javax.jcr.query.QueryManager queryManager, String itemType) - { - throw new UnsupportedOperationException(); - } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-03-01 12:34:36
|
Revision: 1070 http://openutils.svn.sourceforge.net/openutils/?rev=1070&view=rev Author: fgrilli Date: 2009-03-01 12:34:32 +0000 (Sun, 01 Mar 2009) Log Message: ----------- minor fix Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/site/apt/index.apt Modified: trunk/openutils-mgnlcriteria/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlcriteria/src/site/apt/index.apt 2009-03-01 11:51:05 UTC (rev 1069) +++ trunk/openutils-mgnlcriteria/src/site/apt/index.apt 2009-03-01 12:34:32 UTC (rev 1070) @@ -73,10 +73,10 @@ <<<Content>>> nodes returned by the above query will be automatically converted to and populate instances of the <<<Pet>>> type. Furthermore, you may want to have only a subset of the whole resultset returned, much like in a MySQL limit clause. - In this case, you will use the <<<JCRCriteriaFactory.createMgnlCriteriaWithLimit>>> factory method + In this case, you will use the <<<JCRCriteriaFactory.createMgnlCriteriaWithLimit>>> factory method. For this to work, the underlying JCR repository implementation must support this feature (Jackrabbit 1.4+ does). - Here is a example. + Here is an example. +----------------------------------------------+ Collection<Pet> pets = JCRCriteriaFactory.createMgnlCriteriaWithLimit("//dogs//*", MgnlContext.getQueryManager("website"), "mgnl:content", Pet.class).add( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-03-01 11:51:08
|
Revision: 1069 http://openutils.svn.sourceforge.net/openutils/?rev=1069&view=rev Author: fgrilli Date: 2009-03-01 11:51:05 +0000 (Sun, 01 Mar 2009) Log Message: ----------- minor change Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/site/site.xml Modified: trunk/openutils-mgnlcriteria/src/site/site.xml =================================================================== --- trunk/openutils-mgnlcriteria/src/site/site.xml 2009-03-01 11:49:19 UTC (rev 1068) +++ trunk/openutils-mgnlcriteria/src/site/site.xml 2009-03-01 11:51:05 UTC (rev 1069) @@ -21,7 +21,7 @@ <item name="openutils-mgnlcriteria" href="http://openutils.sourceforge.net/openutils-mgnlcriteria" /> </breadcrumbs> <menu name="openutils-mgnlcriteria"> - <item name="Intro" href="index.html"/> + <item name="Usage" href="index.html"/> </menu> <menu ref="modules" inherit="bottom" /> <menu ref="reports" inherit="bottom" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-03-01 11:49:29
|
Revision: 1068 http://openutils.svn.sourceforge.net/openutils/?rev=1068&view=rev Author: fgrilli Date: 2009-03-01 11:49:19 +0000 (Sun, 01 Mar 2009) Log Message: ----------- doc for createMgnlCriteriaWithLimit Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/site/apt/index.apt Modified: trunk/openutils-mgnlcriteria/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlcriteria/src/site/apt/index.apt 2009-03-01 11:44:17 UTC (rev 1067) +++ trunk/openutils-mgnlcriteria/src/site/apt/index.apt 2009-03-01 11:49:19 UTC (rev 1068) @@ -44,7 +44,7 @@ Anyone writing xpath queries by hand knows how painful and error-prone this can be. - Another handy feature is the possibility to specify a different type to be returned in the results Collection. eg. + You can also specify a different type to be returned in the Collection of results. eg. +----------------------------------------------+ @@ -71,8 +71,26 @@ +----------------------------------------------+ <<<Content>>> nodes returned by the above query will be automatically converted to and populate instances of the <<<Pet>>> type. - + Furthermore, you may want to have only a subset of the whole resultset returned, much like in a MySQL limit clause. + In this case, you will use the <<<JCRCriteriaFactory.createMgnlCriteriaWithLimit>>> factory method + For this to work, the underlying JCR repository implementation must support this feature (Jackrabbit 1.4+ does). + + Here is a example. + ++----------------------------------------------+ + Collection<Pet> pets = JCRCriteriaFactory.createMgnlCriteriaWithLimit("//dogs//*", MgnlContext.getQueryManager("website"), "mgnl:content", Pet.class).add( + Restrictions.contains("@name", "Nana")).add( + Restrictions.gt("@weight", new Float(10))).add( + Restrictions.between("@birthDate", begin, end). + setFirstResult(5). + setMaxResults(10). + addOrder(Order.desc("@jcr:score()")).list(); ++----------------------------------------------+ + + Notice the <<<setFirstResult(int)>>> and <<<setMaxResults(int)>>> methods. + Now calling <<<list()>>> will cause to return a subset of only ten <<<Pet>>> objects, starting from the 6th item (counting starts from 0) returned by query. + Finally, it is good to know that openutils-mgnlcriteria API catches all checked exceptions thrown by JCR and Magnolia and wraps them into its own runtime <<<net.sourceforge.openutils.mgnlcriteria.jcr.query.JCRQueryException>>>, leaving to the API user the choice whether to catch it or not and, when needed, get to the original cause of error. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-03-01 11:44:20
|
Revision: 1067 http://openutils.svn.sourceforge.net/openutils/?rev=1067&view=rev Author: fgrilli Date: 2009-03-01 11:44:17 +0000 (Sun, 01 Mar 2009) Log Message: ----------- fixed small typo Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java 2009-02-28 20:36:57 UTC (rev 1066) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java 2009-03-01 11:44:17 UTC (rev 1067) @@ -49,7 +49,7 @@ /** * A factory for Magnolia CMS specific Criteria implementation which can return a subset of results instead of the - * whole resultset, much like a mySQL limit clause. For this to work, the underlying JCR repository implementation + * whole resultset, much like a MySQL limit clause. For this to work, the underlying JCR repository implementation * must support this feature (Jackrabbit 1.4+ does).<br> * To set the maximum number of returned items you must call {@link Criteria#setMaxResults(int)} (by default * {@link Criteria#setFirstResult(int)} is set to 0).<br> @@ -71,7 +71,7 @@ /** * A factory for Magnolia CMS specific Criteria implementation which can return a subset of results instead of the - * whole resultset, much like a mySQL limit clause. For this to work, the underlying JCR repository implementation + * whole resultset, much like a MySQL limit clause. For this to work, the underlying JCR repository implementation * must support this feature (Jackrabbit 1.4+ does).<br> * To set the maximum number of returned items you must call {@link Criteria#setMaxResults(int)} (by default * {@link Criteria#setFirstResult(int)} is set to 0).<br> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-02-28 20:37:00
|
Revision: 1066 http://openutils.svn.sourceforge.net/openutils/?rev=1066&view=rev Author: fgrilli Date: 2009-02-28 20:36:57 +0000 (Sat, 28 Feb 2009) Log Message: ----------- improved javadoc Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java 2009-02-28 20:23:13 UTC (rev 1065) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java 2009-02-28 20:36:57 UTC (rev 1066) @@ -53,10 +53,11 @@ * must support this feature (Jackrabbit 1.4+ does).<br> * To set the maximum number of returned items you must call {@link Criteria#setMaxResults(int)} (by default * {@link Criteria#setFirstResult(int)} is set to 0).<br> - * Please notice that if these methods are not explicitly called before the {@link Criteria#list()} method, the - * latter will return the entire resultset as in + * Please notice that if {@link Criteria#setMaxResults(int)} is not explicitly called before the + * {@link Criteria#list()} method, the latter will return the entire resultset as in * {@link JCRCriteriaFactory#createMgnlCriteria(String, info.magnolia.cms.core.search.QueryManager, String)} - * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the predicate + * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the + * predicate * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager * @param itemType String - if not specified defaults to "mgnl:content" * @return an instance of a concrete subclass of {@link AbstractMagnoliaCriteriaImpl} @@ -74,10 +75,11 @@ * must support this feature (Jackrabbit 1.4+ does).<br> * To set the maximum number of returned items you must call {@link Criteria#setMaxResults(int)} (by default * {@link Criteria#setFirstResult(int)} is set to 0).<br> - * Please notice that if these methods are not explicitly called before the {@link Criteria#list()} method, the - * latter will return the entire resultset as in + * Please notice that if {@link Criteria#setMaxResults(int)} is not explicitly called before the + * {@link Criteria#list()} method, the latter will return the entire resultset as in * {@link JCRCriteriaFactory#createMgnlCriteria(String, info.magnolia.cms.core.search.QueryManager, String, Class)} - * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the predicate + * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the + * predicate * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager * @param itemType String - if not specified defaults to "mgnl:content" * @param classType Class<?> - the list method of this implementation must return instances of this type This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-02-28 20:23:23
|
Revision: 1065 http://openutils.svn.sourceforge.net/openutils/?rev=1065&view=rev Author: fgrilli Date: 2009-02-28 20:23:13 +0000 (Sat, 28 Feb 2009) Log Message: ----------- made constructor private. Added factory methods for getting MagnoliaCriteriaWithLimitImpl. Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java 2009-02-28 20:20:59 UTC (rev 1064) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/JCRCriteriaFactory.java 2009-02-28 20:23:13 UTC (rev 1065) @@ -12,14 +12,18 @@ public class JCRCriteriaFactory { + private JCRCriteriaFactory() + { + } + /** * A factory for Magnolia CMS specific Criteria implementation - * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the predicate + * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the + * predicate * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager * @param itemType String - if not specified defaults to "mgnl:content" * @return an instance of a concrete subclass of {@link AbstractMagnoliaCriteriaImpl} * @see MagnoliaCriteriaImpl - * @see MagnoliaCriteriaWithLimitImpl */ public static Criteria createMgnlCriteria(String path, info.magnolia.cms.core.search.QueryManager queryManager, String itemType) @@ -29,13 +33,13 @@ /** * A factory for Magnolia CMS specific Criteria implementation - * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the predicate + * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the + * predicate * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager * @param itemType String - if not specified defaults to "mgnl:content" * @param classType Class<?> - the list method of this implementation must return instances of this type * @return an instance of a concrete subclass of {@link AbstractMagnoliaCriteriaImpl} * @see MagnoliaCriteriaImpl - * @see MagnoliaCriteriaWithLimitImpl */ public static Criteria createMgnlCriteria(String path, info.magnolia.cms.core.search.QueryManager queryManager, String itemType, Class< ? > classType) @@ -44,6 +48,49 @@ } /** + * A factory for Magnolia CMS specific Criteria implementation which can return a subset of results instead of the + * whole resultset, much like a mySQL limit clause. For this to work, the underlying JCR repository implementation + * must support this feature (Jackrabbit 1.4+ does).<br> + * To set the maximum number of returned items you must call {@link Criteria#setMaxResults(int)} (by default + * {@link Criteria#setFirstResult(int)} is set to 0).<br> + * Please notice that if these methods are not explicitly called before the {@link Criteria#list()} method, the + * latter will return the entire resultset as in + * {@link JCRCriteriaFactory#createMgnlCriteria(String, info.magnolia.cms.core.search.QueryManager, String)} + * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the predicate + * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager + * @param itemType String - if not specified defaults to "mgnl:content" + * @return an instance of a concrete subclass of {@link AbstractMagnoliaCriteriaImpl} + * @see MagnoliaCriteriaWithLimitImpl + */ + public static Criteria createMgnlCriteriaWithLimit(String path, + info.magnolia.cms.core.search.QueryManager queryManager, String itemType) + { + return new MagnoliaCriteriaWithLimitImpl(path, queryManager, itemType); + } + + /** + * A factory for Magnolia CMS specific Criteria implementation which can return a subset of results instead of the + * whole resultset, much like a mySQL limit clause. For this to work, the underlying JCR repository implementation + * must support this feature (Jackrabbit 1.4+ does).<br> + * To set the maximum number of returned items you must call {@link Criteria#setMaxResults(int)} (by default + * {@link Criteria#setFirstResult(int)} is set to 0).<br> + * Please notice that if these methods are not explicitly called before the {@link Criteria#list()} method, the + * latter will return the entire resultset as in + * {@link JCRCriteriaFactory#createMgnlCriteria(String, info.magnolia.cms.core.search.QueryManager, String, Class)} + * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the predicate + * @param queryManager - an instance of info.magnolia.cms.core.search.QueryManager + * @param itemType String - if not specified defaults to "mgnl:content" + * @param classType Class<?> - the list method of this implementation must return instances of this type + * @return an instance of a concrete subclass of {@link AbstractMagnoliaCriteriaImpl} + * @see MagnoliaCriteriaWithLimitImpl + */ + public static Criteria createMgnlCriteriaWithLimit(String path, + info.magnolia.cms.core.search.QueryManager queryManager, String itemType, Class< ? > classType) + { + return new MagnoliaCriteriaWithLimitImpl(path, queryManager, itemType, classType); + } + + /** * @param path String - the path in JCR repository to search for Nodes. This is the path which precedes the * predicate * @param queryManager - an instance of javax.jcr.query.QueryManager This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 1064 http://openutils.svn.sourceforge.net/openutils/?rev=1064&view=rev Author: fgrilli Date: 2009-02-28 20:20:59 +0000 (Sat, 28 Feb 2009) Log Message: ----------- implemented querying Magnolia with limit Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/MagnoliaCriteriaWithLimitImpl.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/MagnoliaCriteriaWithLimitImpl.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/MagnoliaCriteriaWithLimitImpl.java 2009-02-25 21:38:20 UTC (rev 1063) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/impl/MagnoliaCriteriaWithLimitImpl.java 2009-02-28 20:20:59 UTC (rev 1064) @@ -1,15 +1,26 @@ package net.sourceforge.openutils.mgnlcriteria.jcr.query.xpath.impl; import info.magnolia.cms.core.Content; +import info.magnolia.cms.core.DefaultContent; import info.magnolia.cms.core.ItemType; +import info.magnolia.cms.core.Path; 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.security.AccessManager; +import info.magnolia.cms.security.Permission; +import info.magnolia.content2bean.Content2BeanException; +import info.magnolia.content2bean.Content2BeanUtil; import java.util.ArrayList; import java.util.Collection; -import java.util.HashMap; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.List; import java.util.Map; +import javax.jcr.Node; +import javax.jcr.NodeIterator; import javax.jcr.RepositoryException; import javax.jcr.query.InvalidQueryException; @@ -22,9 +33,7 @@ /** * Magnolia XPATH implementation of the <tt>Criteria</tt> interface which supports limiting the result set according to - * the underlying JCR implementation (e.g. Jackrabbit 1.4+) XXX Cannot be used now! FIXME Something is wrong with - * subsetting the result set. Strange things happens eg offset = 0 && limit = 20 on a resultset which is 30+ nodes - * returns only 2 nodes + * the underlying JCR implementation (e.g. Jackrabbit 1.4+) * @author Federico Grilli * @version $Id$ */ @@ -45,6 +54,16 @@ this.itemType = itemType; } + public MagnoliaCriteriaWithLimitImpl(String path, QueryManager queryManager, String itemType, Class< ? > classType) + { + super(path, queryManager, itemType, classType); + + if (StringUtils.isBlank(this.itemType)) + this.itemType = ItemType.CONTENT.getSystemName(); + else + this.itemType = itemType; + } + @SuppressWarnings("unchecked") @Override public Collection< ? > list() throws JCRQueryException @@ -67,7 +86,7 @@ try { - Class managerClass = queryManager.getClass(); + Class< ? extends QueryManager> managerClass = queryManager.getClass(); java.lang.reflect.Field field = managerClass.getDeclaredField(QUERY_MANAGER); field.setAccessible(true); @@ -99,8 +118,6 @@ stop = System.currentTimeMillis(); log.debug("Query executed in {} milliseconds", stop - start); - Map<String, Collection<Content>> objectStore = new HashMap<String, Collection<Content>>(); - Map<String, String> dirtyHandles = new HashMap<String, String>(); Collection retVal = new ArrayList(); field = managerClass.getDeclaredField(ACCESS_MANAGER); field.setAccessible(true); @@ -110,22 +127,40 @@ log.debug("getting content..."); start = System.currentTimeMillis(); - try + QueryResultImpl filteredResult = new QueryResultImpl(result, accessManager); + retVal = filteredResult.getContent(itemType); + + stop = System.currentTimeMillis(); + + if (Content.class.isAssignableFrom(classType)) { - build(itemType, retVal, objectStore, result, dirtyHandles, accessManager); + log.debug("returning a Collection holding objects of type {} ", Content.class.getName()); + retVal = retVal == null ? new ArrayList<Content>() : retVal; + log.debug("got {} node(s) in {} ms", new Object[]{retVal.size(), stop - start }); + + return retVal; } - catch (RepositoryException re) + else { - log.error(re.getMessage()); - throw new JCRQueryException(re); + log.debug("returning a Collection holding objects of type {} ", classType.getName()); + Iterator iter = retVal.iterator(); + List list = new ArrayList(); + while (iter.hasNext()) + { + Content node = (Content) iter.next(); + try + { + list.add(classType.cast(Content2BeanUtil.toBean(node, true, classType))); + } + catch (Content2BeanException e) + { + log.error(e.getMessage()); + throw new JCRQueryException(e); + } + } + log.debug("got {} node(s) in {} ms", new Object[]{list.size(), stop - start }); + return list; } - - stop = System.currentTimeMillis(); - retVal = retVal == null ? new ArrayList() : retVal; - log.debug("got {} node(s) in {} milliseconds", new Object[]{retVal.size(), stop - start }); - - return retVal; - } catch (InvalidQueryException e) { @@ -159,50 +194,117 @@ } } - private void build(String nodeType, Collection<Content> collection, Map<String, Collection<Content>> objectStore, - javax.jcr.query.QueryResult result, Map<String, String> dirtyHandles, - info.magnolia.cms.security.AccessManager accessManager) throws RepositoryException + /** + * This is {@link QueryResultImpl} slightly modified + */ + protected static final class QueryResultImpl implements QueryResult { - objectStore.put(nodeType, collection); - javax.jcr.NodeIterator nodeIterator = result.getNodes(); - while (nodeIterator.hasNext()) + + /** + * Unfiltered result object + */ + private javax.jcr.query.QueryResult result; + + private AccessManager accessManager; + + private Map<String, String> dirtyHandles = new Hashtable<String, String>(); + + protected QueryResultImpl(javax.jcr.query.QueryResult result, AccessManager accessManager) { - javax.jcr.Node node = nodeIterator.nextNode(); - try + this.result = result; + this.accessManager = accessManager; + } + + public AccessManager getAccessManager() + { + return accessManager; + } + + public javax.jcr.query.QueryResult getJcrResult() + { + return result; + } + + /** + * Build required result objects + */ + private void build(String nodeType, Collection<DefaultContent> collection) throws RepositoryException + { + NodeIterator nodeIterator = this.result.getNodes(); + while (nodeIterator.hasNext()) { - build(node, nodeType, collection, dirtyHandles, accessManager); + Node node = nodeIterator.nextNode(); + try + { + build(node, nodeType, collection); + } + catch (RepositoryException re) + { + log.error("{} caught while iterating on query results: {}", re.getClass().getName(), re + .getMessage()); + if (log.isDebugEnabled()) + { + log.debug(re.getClass().getName() + + " caught while iterating on query results: " + + re.getMessage(), re); + } + } } - catch (RepositoryException re) - { - log.error("{} caught while iterating on query results: {}", re.getClass().getName(), re.getMessage()); - throw new JCRQueryException(re); - } } - } - private void build(javax.jcr.Node node, String nodeType, Collection<Content> collection, - Map<String, String> dirtyHandles, info.magnolia.cms.security.AccessManager accessManager) - throws RepositoryException - { - if ((node.isNodeType(nodeType) || StringUtils.isEmpty(nodeType)) - && !node.isNodeType(info.magnolia.cms.core.ItemType.NT_RESOURCE)) + /** + * Build required result objects + */ + private void build(Node node, String nodeType, Collection<DefaultContent> collection) + throws RepositoryException { - if (dirtyHandles.get(node.getPath()) == null) + /** + * All custom node types + */ + if ((node.isNodeType(nodeType) || StringUtils.isEmpty(nodeType)) && !node.isNodeType(ItemType.NT_RESOURCE)) { - boolean isAllowed = accessManager.isGranted( - info.magnolia.cms.core.Path.getAbsolutePath(node.getPath()), - info.magnolia.cms.security.Permission.READ); - if (isAllowed) + if (this.dirtyHandles.get(node.getPath()) == null) { - collection.add(new info.magnolia.cms.core.DefaultContent(node, accessManager)); - dirtyHandles.put(node.getPath(), StringUtils.EMPTY); + boolean isAllowed = this.accessManager.isGranted( + Path.getAbsolutePath(node.getPath()), + Permission.READ); + if (isAllowed) + { + collection.add(new DefaultContent(node, this.accessManager)); + this.dirtyHandles.put(node.getPath(), StringUtils.EMPTY); + } } + return; } - return; + if (node.getDepth() > 0) + { + this.build(node.getParent(), nodeType, collection); + } } - if (node.getDepth() > 0) + + /** + * @see info.magnolia.cms.core.search.QueryResult#getContent() + */ + public Collection<DefaultContent> getContent() { - build(node.getParent(), nodeType, collection, dirtyHandles, accessManager); + return getContent(ItemType.CONTENT.getSystemName()); } + + /** + * @see info.magnolia.cms.core.search.QueryResult#getContent(java.lang.String) + */ + public Collection<DefaultContent> getContent(String nodeType) + { + Collection<DefaultContent> resultSet = new ArrayList<DefaultContent>(); + try + { + this.build(nodeType, resultSet); + } + catch (RepositoryException re) + { + log.error(re.getMessage()); + } + return resultSet; + } } } \ 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...> - 2009-02-25 23:26:25
|
Revision: 1063 http://openutils.svn.sourceforge.net/openutils/?rev=1063&view=rev Author: fgrilli Date: 2009-02-25 21:38:20 +0000 (Wed, 25 Feb 2009) Log Message: ----------- updated groovy to latest version (1.6.0) Modified Paths: -------------- trunk/openutils-mgnlgroovy/pom.xml Modified: trunk/openutils-mgnlgroovy/pom.xml =================================================================== --- trunk/openutils-mgnlgroovy/pom.xml 2009-02-23 18:03:48 UTC (rev 1062) +++ trunk/openutils-mgnlgroovy/pom.xml 2009-02-25 21:38:20 UTC (rev 1063) @@ -38,7 +38,7 @@ <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> - <version>1.5.6</version> + <version>1.6.0</version> <exclusions> <exclusion> <groupId>junit</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-02-23 18:03:51
|
Revision: 1062 http://openutils.svn.sourceforge.net/openutils/?rev=1062&view=rev Author: fgrilli Date: 2009-02-23 18:03:48 +0000 (Mon, 23 Feb 2009) Log Message: ----------- more intro Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/site/apt/index.apt Modified: trunk/openutils-mgnlcriteria/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlcriteria/src/site/apt/index.apt 2009-02-23 12:48:05 UTC (rev 1061) +++ trunk/openutils-mgnlcriteria/src/site/apt/index.apt 2009-02-23 18:03:48 UTC (rev 1062) @@ -38,9 +38,11 @@ +----------------------------------------------+ - will be translated into the following xpath statement + All this will be translated into the following xpath statement <<<//dogs//*[((jcr:contains(@name, 'Nana')) and (@weight>10.0) and (@birthDate >=xs:dateTime('2004-01-01T00:00:00.000+00:00') and @birthDate <=xs:dateTime('2008-12-01T23:59:59.000+00:00')))] order by @jcr:score() descending>>> + + Anyone writing xpath queries by hand knows how painful and error-prone this can be. Another handy feature is the possibility to specify a different type to be returned in the results Collection. eg. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-02-23 12:48:08
|
Revision: 1061 http://openutils.svn.sourceforge.net/openutils/?rev=1061&view=rev Author: fgrilli Date: 2009-02-23 12:48:05 +0000 (Mon, 23 Feb 2009) Log Message: ----------- improved doc Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/site/apt/index.apt Modified: trunk/openutils-mgnlcriteria/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlcriteria/src/site/apt/index.apt 2009-02-22 20:27:29 UTC (rev 1060) +++ trunk/openutils-mgnlcriteria/src/site/apt/index.apt 2009-02-23 12:48:05 UTC (rev 1061) @@ -21,7 +21,7 @@ People already familiar with Hibernate's Criteria will find almost no difference (type names and methods have been kept the same on purpose, whenever possible): you create a <<<Criteria>>> object with one of the static methods in <<<JCRCriteriaFactory>>> and start adding <<<Restrictions>>> and a final optional <<<Order>>>. - Then you call the <<<list()>>> method to get your <<<Collection>>> of results (basically instances of <<<info.magnolia.cms.core.Content>>>). As in Hibernate's Criteria, method chaining is supported. + Then you call the <<<list()>>> method to get your <<<Collection>>> of results (that is instances of <<<info.magnolia.cms.core.Content>>>). As in Hibernate's Criteria, method chaining is supported. Here is an example: +----------------------------------------------+ @@ -30,7 +30,7 @@ Calendar end = Calendar.getInstance(); end.set(2008, 11, 1); - Collection pets = JCRCriteriaFactory.createMgnlCriteria("//dogs//*", MgnlContext.getQueryManager("website"), "mgnl:content").add( + Collection<Content> pets = JCRCriteriaFactory.createMgnlCriteria("//dogs//*", MgnlContext.getQueryManager("website"), "mgnl:content").add( Restrictions.contains("@name", "Nana")).add( Restrictions.gt("@weight", new Float(10))).add( Restrictions.between("@birthDate", begin, end).addOrder( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-02-22 20:27:35
|
Revision: 1060 http://openutils.svn.sourceforge.net/openutils/?rev=1060&view=rev Author: fgiust Date: 2009-02-22 20:27:29 +0000 (Sun, 22 Feb 2009) Log Message: ----------- fix configuration Modified Paths: -------------- trunk/openutils-configuration-services/src/test/resources/spring-managers.xml Modified: trunk/openutils-configuration-services/src/test/resources/spring-managers.xml =================================================================== --- trunk/openutils-configuration-services/src/test/resources/spring-managers.xml 2009-02-22 20:26:46 UTC (rev 1059) +++ trunk/openutils-configuration-services/src/test/resources/spring-managers.xml 2009-02-22 20:27:29 UTC (rev 1060) @@ -1,27 +1,6 @@ <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> - <bean id="configurationManager" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" - autowire="byType"> - <property name="transactionManager" ref="transactionManager" /> - <property name="transactionAttributes"> - <props> - <prop key="*">PROPAGATION_REQUIRED</prop> - </props> - </property> - <property name="target"> - <bean class="it.openutils.configuration.services.ConfigurationManagerImpl" autowire="byType"></bean> - </property> + <bean id="configurationManager" class="it.openutils.configuration.services.ConfigurationManagerImpl" autowire="byType"></bean> + <bean id="referenceManager" class="it.openutils.configuration.services.ReferenceManagerImpl" autowire="byType"> </bean> - <bean id="referenceManager" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" - autowire="byType"> - <property name="transactionManager" ref="transactionManager" /> - <property name="transactionAttributes"> - <props> - <prop key="*">PROPAGATION_REQUIRED</prop> - </props> - </property> - <property name="target"> - <bean class="it.openutils.configuration.services.ReferenceManagerImpl" autowire="byType"></bean> - </property> - </bean> </beans> \ 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...> - 2009-02-22 20:26:49
|
Revision: 1059 http://openutils.svn.sourceforge.net/openutils/?rev=1059&view=rev Author: fgiust Date: 2009-02-22 20:26:46 +0000 (Sun, 22 Feb 2009) Log Message: ----------- set file encoding Modified Paths: -------------- trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2009-02-22 20:19:40 UTC (rev 1058) +++ trunk/pom.xml 2009-02-22 20:26:46 UTC (rev 1059) @@ -95,6 +95,13 @@ <build> <plugins> <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>2.3</version> + <configuration> + <encoding>UTF-8</encoding> + </configuration> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>2.0-beta-7</version> @@ -118,6 +125,7 @@ <configuration> <source>1.5</source> <target>1.5</target> + <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-02-22 20:19:45
|
Revision: 1058 http://openutils.svn.sourceforge.net/openutils/?rev=1058&view=rev Author: fgrilli Date: 2009-02-22 20:19:40 +0000 (Sun, 22 Feb 2009) Log Message: ----------- changed menu item name Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/site/site.xml Modified: trunk/openutils-mgnlcriteria/src/site/site.xml =================================================================== --- trunk/openutils-mgnlcriteria/src/site/site.xml 2009-02-22 20:14:15 UTC (rev 1057) +++ trunk/openutils-mgnlcriteria/src/site/site.xml 2009-02-22 20:19:40 UTC (rev 1058) @@ -21,7 +21,7 @@ <item name="openutils-mgnlcriteria" href="http://openutils.sourceforge.net/openutils-mgnlcriteria" /> </breadcrumbs> <menu name="openutils-mgnlcriteria"> - <item name="Usage" href="index.html"/> + <item name="Intro" href="index.html"/> </menu> <menu ref="modules" inherit="bottom" /> <menu ref="reports" inherit="bottom" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-02-22 20:14:18
|
Revision: 1057 http://openutils.svn.sourceforge.net/openutils/?rev=1057&view=rev Author: fgrilli Date: 2009-02-22 20:14:15 +0000 (Sun, 22 Feb 2009) Log Message: ----------- fixed wrong apt formatting Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/site/apt/index.apt Modified: trunk/openutils-mgnlcriteria/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlcriteria/src/site/apt/index.apt 2009-02-22 19:13:45 UTC (rev 1056) +++ trunk/openutils-mgnlcriteria/src/site/apt/index.apt 2009-02-22 20:14:15 UTC (rev 1057) @@ -13,7 +13,7 @@ The <<<JCRCriteriaFactory>>> is a factory for <<<Criteria>>>. <<<Criterion>>> instances are usually obtained via the factory methods on <<<Restrictions>>>. eg. - openutils-mgnlcriteria API is blatantly inspired by {{{http://www.hibernate.org/hib_docs/reference/en/html/querycriteria.html}} Hibernate's Criteria API}. + openutils-mgnlcriteria API is blatantly inspired by {{{http://www.hibernate.org/hib_docs/reference/en/html/querycriteria.html} Hibernate's Criteria API}}. <<openutils-mgnlcriteria requires JDK 1.5.x or superior>> @@ -21,7 +21,7 @@ People already familiar with Hibernate's Criteria will find almost no difference (type names and methods have been kept the same on purpose, whenever possible): you create a <<<Criteria>>> object with one of the static methods in <<<JCRCriteriaFactory>>> and start adding <<<Restrictions>>> and a final optional <<<Order>>>. - Then you call the <<<list()>>> method to get your <<<Collection>>> of results (basically instances of info.magnolia.cms.core.Content). As in Hibernate's Criteria, method chaining is supported. + Then you call the <<<list()>>> method to get your <<<Collection>>> of results (basically instances of <<<info.magnolia.cms.core.Content>>>). As in Hibernate's Criteria, method chaining is supported. Here is an example: +----------------------------------------------+ @@ -36,13 +36,14 @@ Restrictions.between("@birthDate", begin, end).addOrder( Order.desc("@jcr:score()")).list(); - will be translated into the following xpath statement - - <<<//dogs//*[((jcr:contains(@name, 'Nana')) and (@weight>10.0) and (@birthDate >=xs:dateTime('2004-01-01T00:00:00.000+00:00') and @birthDate <=xs:dateTime('2008-12-01T23:59:59.000+00:00')))] order by @jcr:score() descending>>> +----------------------------------------------+ - Another handy feature is the possibility to specify a different type to be returned in the results Collection. eg. + will be translated into the following xpath statement + <<<//dogs//*[((jcr:contains(@name, 'Nana')) and (@weight>10.0) and (@birthDate >=xs:dateTime('2004-01-01T00:00:00.000+00:00') and @birthDate <=xs:dateTime('2008-12-01T23:59:59.000+00:00')))] order by @jcr:score() descending>>> + + Another handy feature is the possibility to specify a different type to be returned in the results Collection. eg. + +----------------------------------------------+ Collection<Pet> pets = JCRCriteriaFactory.createMgnlCriteria("//dogs//*", MgnlContext.getQueryManager("website"), "mgnl:content", Pet.class).add( @@ -50,11 +51,13 @@ Restrictions.gt("@weight", new Float(10))).add( Restrictions.between("@birthDate", begin, end).addOrder( Order.desc("@jcr:score()")).list(); ++----------------------------------------------+ Internally, this will use <<<info.magnolia.content2bean.Content2BeanUtil.toBean()>>> to transform nodes into beans. So, for example, if you have a domain <<<Pet>>> class like this - + ++----------------------------------------------+ public class Pet { private String name; @@ -63,10 +66,10 @@ [getters and setters here...] } ++----------------------------------------------+ -<<<Content>>> nodes returned by the above query will be automatically converted to and populate instances of the <<<Pet>>> type. + <<<Content>>> nodes returned by the above query will be automatically converted to and populate instances of the <<<Pet>>> type. -+----------------------------------------------+ Finally, it is good to know that openutils-mgnlcriteria API catches all checked exceptions thrown by JCR and Magnolia and wraps them into its own runtime <<<net.sourceforge.openutils.mgnlcriteria.jcr.query.JCRQueryException>>>, leaving to This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-02-22 19:13:48
|
Revision: 1056 http://openutils.svn.sourceforge.net/openutils/?rev=1056&view=rev Author: fgrilli Date: 2009-02-22 19:13:45 +0000 (Sun, 22 Feb 2009) Log Message: ----------- added repositories Modified Paths: -------------- trunk/openutils-mgnlcriteria/pom.xml Modified: trunk/openutils-mgnlcriteria/pom.xml =================================================================== --- trunk/openutils-mgnlcriteria/pom.xml 2009-02-22 19:11:23 UTC (rev 1055) +++ trunk/openutils-mgnlcriteria/pom.xml 2009-02-22 19:13:45 UTC (rev 1056) @@ -32,4 +32,17 @@ <version>2.4</version> </dependency> </dependencies> + <repositories> + <repository> + <id>repository.magnolia.info</id> + <name>magnolia repository</name> + <url>http://repo.magnolia.info/m2</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> </project> \ 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...> - 2009-02-22 19:11:28
|
Revision: 1055 http://openutils.svn.sourceforge.net/openutils/?rev=1055&view=rev Author: fgrilli Date: 2009-02-22 19:11:23 +0000 (Sun, 22 Feb 2009) Log Message: ----------- usage doc Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/site/apt/index.apt trunk/openutils-mgnlcriteria/src/site/site.xml Added Paths: ----------- trunk/openutils-mgnlcriteria/src/site/changes/changes.xml Removed Paths: ------------- trunk/openutils-mgnlcriteria/src/site/apt/usage.apt Modified: trunk/openutils-mgnlcriteria/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlcriteria/src/site/apt/index.apt 2009-02-21 17:53:48 UTC (rev 1054) +++ trunk/openutils-mgnlcriteria/src/site/apt/index.apt 2009-02-22 19:11:23 UTC (rev 1055) @@ -4,15 +4,75 @@ Fabrizio Giustina -------------------------- -openutils-mgnlcriteria +About openutils-mgnlcriteria -TODO write usage + <<<Criteria>>> is a simplified API for retrieving JCR Nodes by composing <<<Criterion>>> objects. This is a + very convenient approach for functionality like "search" screens where there is a variable number of conditions to be + placed upon the result set. + + The <<<JCRCriteriaFactory>>> is a factory for <<<Criteria>>>. <<<Criterion>>> instances are usually obtained + via the factory methods on <<<Restrictions>>>. eg. + + openutils-mgnlcriteria API is blatantly inspired by {{{http://www.hibernate.org/hib_docs/reference/en/html/querycriteria.html}} Hibernate's Criteria API}. + + <<openutils-mgnlcriteria requires JDK 1.5.x or superior>> - See {{{usage.html}usage}} for how to setup your DAOs and look at {{{apidocs/index.html}javadocs}} for - more details. +Usage + People already familiar with Hibernate's Criteria will find almost no difference (type names and methods have been kept the same on purpose, whenever possible): + you create a <<<Criteria>>> object with one of the static methods in <<<JCRCriteriaFactory>>> and start adding <<<Restrictions>>> and a final optional <<<Order>>>. + Then you call the <<<list()>>> method to get your <<<Collection>>> of results (basically instances of info.magnolia.cms.core.Content). As in Hibernate's Criteria, method chaining is supported. + Here is an example: + ++----------------------------------------------+ + Calendar begin = Calendar.getInstance(); + begin.set(2004, 0, 1); + Calendar end = Calendar.getInstance(); + end.set(2008, 11, 1); + + Collection pets = JCRCriteriaFactory.createMgnlCriteria("//dogs//*", MgnlContext.getQueryManager("website"), "mgnl:content").add( + Restrictions.contains("@name", "Nana")).add( + Restrictions.gt("@weight", new Float(10))).add( + Restrictions.between("@birthDate", begin, end).addOrder( + Order.desc("@jcr:score()")).list(); + + will be translated into the following xpath statement + + <<<//dogs//*[((jcr:contains(@name, 'Nana')) and (@weight>10.0) and (@birthDate >=xs:dateTime('2004-01-01T00:00:00.000+00:00') and @birthDate <=xs:dateTime('2008-12-01T23:59:59.000+00:00')))] order by @jcr:score() descending>>> ++----------------------------------------------+ + Another handy feature is the possibility to specify a different type to be returned in the results Collection. eg. + ++----------------------------------------------+ + +Collection<Pet> pets = JCRCriteriaFactory.createMgnlCriteria("//dogs//*", MgnlContext.getQueryManager("website"), "mgnl:content", Pet.class).add( + Restrictions.contains("@name", "Nana")).add( + Restrictions.gt("@weight", new Float(10))).add( + Restrictions.between("@birthDate", begin, end).addOrder( + Order.desc("@jcr:score()")).list(); + + Internally, this will use <<<info.magnolia.content2bean.Content2BeanUtil.toBean()>>> to transform nodes into beans. + + So, for example, if you have a domain <<<Pet>>> class like this + + public class Pet +{ + private String name; + private Float weight; + private Calendar birthDate; + + [getters and setters here...] +} + +<<<Content>>> nodes returned by the above query will be automatically converted to and populate instances of the <<<Pet>>> type. + ++----------------------------------------------+ + + Finally, it is good to know that openutils-mgnlcriteria API catches all checked exceptions thrown by JCR and Magnolia and + wraps them into its own runtime <<<net.sourceforge.openutils.mgnlcriteria.jcr.query.JCRQueryException>>>, leaving to + the API user the choice whether to catch it or not and, when needed, get to the original cause of error. + + Released versions Check it at {{{http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-mgnlcriteria}http://www.mvnrepository.com/artifact/net.sourceforge.openutils/openutils-mgnlcriteria}} - Deleted: trunk/openutils-mgnlcriteria/src/site/apt/usage.apt =================================================================== --- trunk/openutils-mgnlcriteria/src/site/apt/usage.apt 2009-02-21 17:53:48 UTC (rev 1054) +++ trunk/openutils-mgnlcriteria/src/site/apt/usage.apt 2009-02-22 19:11:23 UTC (rev 1055) @@ -1,67 +0,0 @@ - -------------------------- - O p e n u t i l s - -------------------------- - Fabrizio Giustina - -------------------------- - -Using annotations - - This is the preferred way of creating and configuring a new DAO using Spring 2.5 and annotations: - -+-----------------------------------------------+ - -public interface SampleDAO extends HibernateDAO<Sample, Integer> -{ - - @Repository(value = "sampleDAO") - public static class SampleDAOImpl extends HibernateDAOImpl<Sample, Integer> implements SampleDAO - { - - @Autowired - public SampleDAOImpl(SessionFactory factory) - { - setSessionFactory(factory); - setReferenceClass(Sample.class); - } - } -} - -+-----------------------------------------------+ - - Simple, isn't it? With those few lines you are: - - * Creating youd DAO interface, which allow you to manage <<<Sample>>> objects with a key of type <<<Integer>>> - - * Implementing your interface and setup your DAO - - * Registing you DAO in the Spring context using the <<<@Repository>>> annotation - - [] - - - -Using xml - - You need to write at least the DAO interface; the DAO implementation can be a subclass of HibernateDAOImpl or can - be created by Spring you you do not need to alter or add any method. - -+-----------------------------------------------+ - -public interface SampleDAO extends HibernateDAO<Sample, Integer> -{ - -} - <bean id="sampleDAO" class="org.springframework.aop.framework.ProxyFactoryBean"> - <property name="proxyInterfaces" value="com.myapp.SampleDAO"/> - <property name="target"> - <bean - class="it.openutils.dao.hibernate.HibernateDAOImpl"> - <property name="sessionFactory" ref="sessionFactory"/> - <property name="referenceClass" value="com.myapp.Sample"/> - </bean> - </property> - </bean> - -+-----------------------------------------------+ - - Added: trunk/openutils-mgnlcriteria/src/site/changes/changes.xml =================================================================== --- trunk/openutils-mgnlcriteria/src/site/changes/changes.xml (rev 0) +++ trunk/openutils-mgnlcriteria/src/site/changes/changes.xml 2009-02-22 19:11:23 UTC (rev 1055) @@ -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="2009-02-28" description="first release"> + <action type="new" dev="fgiust">Initial public release.</action> + </release> + </body> +</document> \ No newline at end of file Property changes on: trunk/openutils-mgnlcriteria/src/site/changes/changes.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/openutils-mgnlcriteria/src/site/site.xml =================================================================== --- trunk/openutils-mgnlcriteria/src/site/site.xml 2009-02-21 17:53:48 UTC (rev 1054) +++ trunk/openutils-mgnlcriteria/src/site/site.xml 2009-02-22 19:11:23 UTC (rev 1055) @@ -18,7 +18,7 @@ </head> <breadcrumbs> <item name="openutils" href="http://openutils.sourceforge.net/" /> - <item name="openutils-bshd5" href="http://openutils.sourceforge.net/openutils-mgnlcriteria" /> + <item name="openutils-mgnlcriteria" href="http://openutils.sourceforge.net/openutils-mgnlcriteria" /> </breadcrumbs> <menu name="openutils-mgnlcriteria"> <item name="Usage" href="index.html"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-02-21 17:53:57
|
Revision: 1054 http://openutils.svn.sourceforge.net/openutils/?rev=1054&view=rev Author: fgiust Date: 2009-02-21 17:53:48 +0000 (Sat, 21 Feb 2009) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-log4j/pom.xml Modified: trunk/openutils-log4j/pom.xml =================================================================== --- trunk/openutils-log4j/pom.xml 2009-02-21 17:53:39 UTC (rev 1053) +++ trunk/openutils-log4j/pom.xml 2009-02-21 17:53:48 UTC (rev 1054) @@ -9,7 +9,7 @@ </parent> <artifactId>openutils-log4j</artifactId> <packaging>jar</packaging> - <version>2.0.4</version> + <version>2.0.5-SNAPSHOT</version> <name>openutils for Log4j</name> <description>openutils log4j extensions</description> <build> @@ -72,10 +72,4 @@ <scope>test</scope> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-log4j-2.0.4</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-log4j-2.0.4</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-log4j-2.0.4</url> - </scm> </project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2009-02-21 17:53:48
|
Revision: 1053 http://openutils.svn.sourceforge.net/openutils/?rev=1053&view=rev Author: fgiust Date: 2009-02-21 17:53:39 +0000 (Sat, 21 Feb 2009) Log Message: ----------- [maven-release-plugin] copy for tag openutils-log4j-2.0.4 Added Paths: ----------- tags/openutils-log4j-2.0.4/ tags/openutils-log4j-2.0.4/pom.xml Removed Paths: ------------- tags/openutils-log4j-2.0.4/pom.xml Deleted: tags/openutils-log4j-2.0.4/pom.xml =================================================================== --- trunk/openutils-log4j/pom.xml 2009-02-21 17:49:38 UTC (rev 1051) +++ tags/openutils-log4j-2.0.4/pom.xml 2009-02-21 17:53:39 UTC (rev 1053) @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd "> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>10</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-log4j</artifactId> - <packaging>jar</packaging> - <version>2.0.4-SNAPSHOT</version> - <name>openutils for Log4j</name> - <description>openutils log4j extensions</description> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - </plugins> - </build> - <dependencies> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.15</version> - <exclusions> - <exclusion> - <groupId>javax.mail</groupId> - <artifactId>mail</artifactId> - </exclusion> - <exclusion> - <groupId>javax.jms</groupId> - <artifactId>jms</artifactId> - </exclusion> - <exclusion> - <groupId>com.sun.jdmk</groupId> - <artifactId>jmxtools</artifactId> - </exclusion> - <exclusion> - <groupId>com.sun.jmx</groupId> - <artifactId>jmxri</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.4</version> - </dependency> - <dependency> - <groupId>javax.mail</groupId> - <artifactId>mail</artifactId> - <version>1.4</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.4</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.0</version> - <scope>test</scope> - </dependency> - </dependencies> -</project> \ No newline at end of file Copied: tags/openutils-log4j-2.0.4/pom.xml (from rev 1052, trunk/openutils-log4j/pom.xml) =================================================================== --- tags/openutils-log4j-2.0.4/pom.xml (rev 0) +++ tags/openutils-log4j-2.0.4/pom.xml 2009-02-21 17:53:39 UTC (rev 1053) @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd "> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>10</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-log4j</artifactId> + <packaging>jar</packaging> + <version>2.0.4</version> + <name>openutils for Log4j</name> + <description>openutils log4j extensions</description> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + </plugins> + </build> + <dependencies> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.15</version> + <exclusions> + <exclusion> + <groupId>javax.mail</groupId> + <artifactId>mail</artifactId> + </exclusion> + <exclusion> + <groupId>javax.jms</groupId> + <artifactId>jms</artifactId> + </exclusion> + <exclusion> + <groupId>com.sun.jdmk</groupId> + <artifactId>jmxtools</artifactId> + </exclusion> + <exclusion> + <groupId>com.sun.jmx</groupId> + <artifactId>jmxri</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.4</version> + </dependency> + <dependency> + <groupId>javax.mail</groupId> + <artifactId>mail</artifactId> + <version>1.4</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.4</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.0</version> + <scope>test</scope> + </dependency> + </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-log4j-2.0.4</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-log4j-2.0.4</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-log4j-2.0.4</url> + </scm> +</project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |