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...> - 2007-08-13 09:12:49
|
Revision: 395 http://openutils.svn.sourceforge.net/openutils/?rev=395&view=rev Author: fgiust Date: 2007-08-13 02:12:49 -0700 (Mon, 13 Aug 2007) Log Message: ----------- update to magnolia 3.1-m1 Modified Paths: -------------- trunk/openutils-mgnlstripes/pom.xml trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/stripes.xml Added Paths: ----------- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/AddMimeMappingTask.java trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/StripesModuleVersionHandler.java Removed Paths: ------------- trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.server.MIMEMapping.action.xml Property Changed: ---------------- trunk/openutils-mgnlstripes/ Property changes on: trunk/openutils-mgnlstripes ___________________________________________________________________ Name: svn:ignore - .checkstyle + target .settings .checkstyle .classpath .project Modified: trunk/openutils-mgnlstripes/pom.xml =================================================================== --- trunk/openutils-mgnlstripes/pom.xml 2007-08-10 07:01:44 UTC (rev 394) +++ trunk/openutils-mgnlstripes/pom.xml 2007-08-13 09:12:49 UTC (rev 395) @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> @@ -11,12 +12,24 @@ <artifactId>openutils-mgnlstripes</artifactId> <name>openutils-mgnlstripes</name> <version>0.1-SNAPSHOT</version> - <licenses> - <license> - <name>GPL v3</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>net.sourceforge.stripes</groupId> @@ -26,12 +39,12 @@ <dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-core</artifactId> - <version>3.1-SNAPSHOT</version> + <version>3.1-m3</version> </dependency> <dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-module-admininterface</artifactId> - <version>3.1-SNAPSHOT</version> + <version>3.1-m3</version> </dependency> <dependency> <groupId>javax.servlet</groupId> Modified: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java 2007-08-10 07:01:44 UTC (rev 394) +++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java 2007-08-13 09:12:49 UTC (rev 395) @@ -35,26 +35,40 @@ // Only process the class if it's properly annotated if (binding != null) { - registerSpringParagraph(binding); + String dialogName = actionNameToParagraphName(binding); + registerSpringParagraph(dialogName, binding); super.addActionBean(clazz); } } /** + * Generate a paragraph name from a Stripes binding. This method will take the last token after "/", strip any + * extension and convert everything to lowercase. + * @param binding Stripe action binding + * @return paragraph name + */ + protected String actionNameToParagraphName(String binding) + { + String dialogName = StringUtils.lowerCase(StringUtils.substringBeforeLast(StringUtils.substringAfterLast( + binding, + "/"), ".")); + return dialogName; + } + + /** * Registers a Magnolia paragraph which will delegate to a Stripe action. + * @param name dialog name * @param binding Stripes action binding */ @SuppressWarnings("unchecked") - private void registerSpringParagraph(String binding) + private void registerSpringParagraph(String name, String binding) { Paragraph paragraph = new Paragraph(); - String dialogName = actionNameToParagraphName(binding); - - paragraph.setName(dialogName); - paragraph.setTitle("paragraph." + dialogName + ".title"); - paragraph.setDescription("paragraph." + dialogName + ".description"); - paragraph.setDialog(dialogName); + paragraph.setName(name); + paragraph.setTitle("paragraph." + name + ".title"); + paragraph.setDescription("paragraph." + name + ".description"); + paragraph.setDialog(name); paragraph.setTemplatePath(binding); paragraph.setType("stripes"); @@ -62,18 +76,4 @@ ParagraphManager.getInstance().getParagraphs().put(paragraph.getName(), paragraph); } - /** - * Generate a paragraph name from a Stripes binding. This method will take the last token after "/", strip any - * extension and convert everything to lowercase. - * @param binding Stripe action binding - * @return paragraph name - */ - protected String actionNameToParagraphName(String binding) - { - String dialogName = StringUtils.lowerCase(StringUtils.substringBeforeLast(StringUtils.substringAfterLast( - binding, - "/"), ".")); - return dialogName; - } - } Modified: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java 2007-08-10 07:01:44 UTC (rev 394) +++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java 2007-08-13 09:12:49 UTC (rev 395) @@ -1,31 +1,24 @@ package it.openutils.magnoliastripes; -import info.magnolia.cms.module.RegisterException; -import info.magnolia.module.admininterface.AbstractAdminModule; +import info.magnolia.module.ModuleLifecycle; +import info.magnolia.module.ModuleLifecycleContext; /** - * Stripes module. Extends AbstractAdminModule which will take care of registering the Stripes paragraph renderer. + * Stripes module. * @author fgiust * @version $Id: $ */ -public class StripesModule extends AbstractAdminModule +public class StripesModule implements ModuleLifecycle { /** * {@inheritDoc} */ @Override - public void onInit() + public void start(ModuleLifecycleContext moduleLifecycleContext) { + // anything to do? } - /** - * {@inheritDoc} - */ - @Override - protected void onRegister(int registerState) throws RegisterException - { - // nothing to do - } } \ No newline at end of file Added: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/AddMimeMappingTask.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/AddMimeMappingTask.java (rev 0) +++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/AddMimeMappingTask.java 2007-08-13 09:12:49 UTC (rev 395) @@ -0,0 +1,67 @@ +package it.openutils.magnoliastripes.setup; + +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.module.InstallContext; +import info.magnolia.module.delta.AbstractRepositoryTask; +import info.magnolia.module.delta.TaskExecutionException; + +import javax.jcr.RepositoryException; + + +/** + * Task that adds a mime mapping to <code>server/MIMIMapping</code>. + * @author fgiust + * @version $Revision: $ ($Author: $) + */ +public class AddMimeMappingTask extends AbstractRepositoryTask +{ + + /** + * Extension (without the <code>.</code>) + */ + private String extension; + + /** + * mime type. + */ + private String mime; + + /** + * Icon path. + */ + private String icon; + + /** + * @param extension Extension (without the <code>.</code>) + * @param mime mime type. + * @param icon Icon path. + */ + public AddMimeMappingTask(String extension, String mime, String icon) + { + super("Add mime mapping task", "Adds a MIME mapping for the " + extension + " extension"); + this.extension = extension; + this.mime = mime; + this.icon = icon; + } + + /** + * {@inheritDoc} + */ + @Override + protected void doExecute(InstallContext ctx) throws RepositoryException, TaskExecutionException + { + HierarchyManager hm = ctx.getHierarchyManager(ContentRepository.CONFIG); + Content mimeNode = hm.getContent("/server/MIMEMapping"); + + if (!mimeNode.hasContent(extension)) + { + Content m = mimeNode.createContent(extension, ItemType.CONTENTNODE); + m.createNodeData("mime-type").setValue(mime); + m.createNodeData("icon").setValue(icon); + } + } + +} Added: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/StripesModuleVersionHandler.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/StripesModuleVersionHandler.java (rev 0) +++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/setup/StripesModuleVersionHandler.java 2007-08-13 09:12:49 UTC (rev 395) @@ -0,0 +1,30 @@ +package it.openutils.magnoliastripes.setup; + +import info.magnolia.module.DefaultModuleVersionHandler; +import info.magnolia.module.InstallContext; +import info.magnolia.module.delta.Task; + +import java.util.List; + + +/** + * @author fgiust + * @version $Id: $ + */ +public class StripesModuleVersionHandler extends DefaultModuleVersionHandler +{ + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + protected List<Task> getBasicInstallTasks(InstallContext installContext) + { + List<Task> installTasks = super.getBasicInstallTasks(installContext); + + installTasks.add(new AddMimeMappingTask("action", "text/plain", "/.resources/file-icons/htm.png")); + + return installTasks; + } +} Modified: trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/stripes.xml =================================================================== --- trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/stripes.xml 2007-08-10 07:01:44 UTC (rev 394) +++ trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/stripes.xml 2007-08-13 09:12:49 UTC (rev 395) @@ -4,6 +4,6 @@ <name>stripes</name> <displayName>stripes</displayName> <description>Stripes integration module</description> - <class>it.openutils.magnoliastripes.StripesModule</class> - <version>0.1</version> + <versionHandler>it.openutils.magnoliastripes.setup.StripesModuleVersionHandler</versionHandler> + <version>${project.version}</version> </module> Deleted: trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.server.MIMEMapping.action.xml =================================================================== --- trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.server.MIMEMapping.action.xml 2007-08-10 07:01:44 UTC (rev 394) +++ trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.server.MIMEMapping.action.xml 2007-08-13 09:12:49 UTC (rev 395) @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<sv:node sv:name="action" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mgnl="http://www.magnolia.info/jcr/mgnl" - xmlns:rep="internal" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" - xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:jcrfn="http://www.jcp.org/jcr/xpath-functions/1.0"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:contentNode</sv:value> - </sv:property> - <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> - <sv:value>mix:versionable</sv:value> - </sv:property> - <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>c0a3cfb0-2f94-4924-8da2-0f152c825891</sv:value> - </sv:property> - <sv:property sv:name="icon" sv:type="String"> - <sv:value>/.resources/file-icons/htm.png</sv:value> - </sv:property> - <sv:property sv:name="mime-type" sv:type="String"> - <sv:value>text/html</sv:value> - </sv:property> - <sv:node sv:name="MetaData"> - <sv:property sv:name="jcr:primaryType" sv:type="Name"> - <sv:value>mgnl:metaData</sv:value> - </sv:property> - <sv:property sv:name="jcr:uuid" sv:type="String"> - <sv:value>11cf3c7b-3a09-4983-8761-867a1a8cdd14</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:lastaction" sv:type="Date"> - <sv:value>2007-07-29T20:52:47.861+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:creationdate" sv:type="String"> - <sv:value>2004-11-02T15:34:17.212+01:00</sv:value> - </sv:property> - <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> - <sv:value>2007-07-29T20:52:47.928+01:00</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: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:node> -</sv:node> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-10 07:01:43
|
Revision: 394 http://openutils.svn.sourceforge.net/openutils/?rev=394&view=rev Author: fcarone Date: 2007-08-10 00:01:44 -0700 (Fri, 10 Aug 2007) Log Message: ----------- List<Criterion> added to all needed locations Modified Paths: -------------- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java Modified: trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java =================================================================== --- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java 2007-08-09 08:52:43 UTC (rev 393) +++ trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAO.java 2007-08-10 07:01:44 UTC (rev 394) @@ -6,6 +6,7 @@ import java.util.List; import java.util.Map; +import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Order; import org.hibernate.type.Type; @@ -14,7 +15,7 @@ * @author Fabrizio Giustina * @version $Id$ * @param <T> Persistence class - * @param <K> Object Key + * @param <K> Object Key */ public interface HibernateDAO<T extends Object, K extends Serializable> { @@ -40,6 +41,14 @@ List<T> findAll(final Order[] orderProperties); /** + * Return all objects related to the implementation of this DAO with no filter. + * @param orderProperties <code>desc</code> or <code>asc</code> + * @param criteria Additional Criterion conditions + * @return a list of all instances + */ + List<T> findAll(final Order[] orderProperties, List<Criterion> criteria); + + /** * Execute a query. * @param query a query expressed in Hibernate's query language * @param obj filter value @@ -93,7 +102,7 @@ List<T> findFiltered(final T filter, final int maxResults, final int page); /** - * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. + * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. * @param filter an instance of the object with the properties you whish to filter on. * @param metadata filter metadata * @param maxResults maximum number of results @@ -106,7 +115,7 @@ * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. * @param filter an instance of the object with the properties you whish to filter on. * @param customOrder order criterias - * @param metadata filter metadata + * @param metadata filter metadata * @param maxResults maximum number of results * @param page result page (first result is maxResults * page) * @return list of objects @@ -117,8 +126,21 @@ /** * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. * @param filter an instance of the object with the properties you whish to filter on. + * @param customOrder order criterias + * @param metadata filter metadata + * @param maxResults maximum number of results + * @param page result page (first result is maxResults * page) + * @param additionalCriteria additional criteria * @return list of objects */ + List<T> findFiltered(final T filter, final Order[] customOrder, final Map<String, FilterMetadata> metadata, + final int maxResults, final int page, List<Criterion> additionalCriteria); + + /** + * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @return list of objects + */ List<T> findFiltered(final T filter); /** @@ -132,7 +154,7 @@ /** * Return all objects related to the implementation of this DAO filtered using properties of the provided instance. * @param filter an instance of the object with the properties you whish to filter on. - * @param metadata filter metadata + * @param metadata filter metadata * @return list of objects */ List<T> findFiltered(final T filter, Map<String, FilterMetadata> metadata); @@ -146,6 +168,15 @@ T findFilteredFirst(final T filter); /** + * Return the first object related to the implementation of this DAO filtered using properties of the provided + * instance. + * @param filter an instance of the object with the properties you whish to filter on. + * @param criteria additional criterion + * @return first object in the collection + */ + T findFilteredFirst(final T filter, final List<Criterion> criteria); + + /** * Used by the base DAO classes but here for your modification Remove a persistent instance from the datastore. The * argument may be an instance associated with the receiving Session or a transient instance with an identifier * associated with existing persistent state. Modified: trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java =================================================================== --- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2007-08-09 08:52:43 UTC (rev 393) +++ trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2007-08-10 07:01:44 UTC (rev 394) @@ -16,6 +16,7 @@ import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.criterion.CriteriaSpecification; +import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Order; import org.hibernate.type.Type; import org.springframework.orm.hibernate3.HibernateCallback; @@ -43,30 +44,32 @@ { /** - * + * */ private final T filter; /** - * + * */ private final int page; /** - * + * */ private final int maxResults; /** - * + * */ private final Map<String, FilterMetadata> metadata; /** - * + * */ private final Order[] orderProperties; + private List<Criterion> additionalCriteria; + /** * @param filter * @param page @@ -79,13 +82,15 @@ int page, int maxResults, Map<String, FilterMetadata> metadata, - Order[] orderProperties) + Order[] orderProperties, + List<Criterion> additionalCriteria) { this.filter = filter; this.page = page; this.maxResults = maxResults; this.metadata = metadata; this.orderProperties = orderProperties; + this.additionalCriteria = additionalCriteria; } public Object doInHibernate(Session ses) throws HibernateException @@ -106,6 +111,13 @@ } } EnhancedExample.create(crit, filter, metadata); + if (additionalCriteria != null && !additionalCriteria.isEmpty()) + { + for (Criterion criterion : additionalCriteria) + { + crit.add(criterion); + } + } return crit.list(); } } @@ -342,11 +354,21 @@ public List<T> findFiltered(final T filter, final Order[] customOrder, final Map<String, FilterMetadata> metadata, final int maxResults, final int page) { + return findFiltered(filter, customOrder, metadata, maxResults, page, null); + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public List<T> findFiltered(T filter, Order[] customOrder, Map<String, FilterMetadata> metadata, int maxResults, + int page, List<Criterion> additionalCriteria) + { final Order[] orderProperties = customOrder != null && customOrder.length > 0 ? customOrder : this .getDefaultOrder(); return (List<T>) getHibernateTemplate().execute( - new HibernateCallbackForExecution(filter, page, maxResults, metadata, orderProperties)); + new HibernateCallbackForExecution(filter, page, maxResults, metadata, orderProperties, additionalCriteria)); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-09 08:52:41
|
Revision: 393 http://openutils.svn.sourceforge.net/openutils/?rev=393&view=rev Author: fcarone Date: 2007-08-09 01:52:43 -0700 (Thu, 09 Aug 2007) Log Message: ----------- detach the security manager from acegi Modified Paths: -------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateRUDSecurityInterceptor.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateRUDSecurityInterceptor.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateRUDSecurityInterceptor.java 2007-08-09 08:47:26 UTC (rev 392) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateRUDSecurityInterceptor.java 2007-08-09 08:52:43 UTC (rev 393) @@ -6,6 +6,7 @@ import it.openutils.hibernate.security.dataobject.SecurityRule; import it.openutils.hibernate.security.services.SecurityRuleManager; +import java.util.ArrayList; import java.util.List; import org.acegisecurity.GrantedAuthority; @@ -61,17 +62,24 @@ } GrantedAuthority[] authorities = SecurityContextHolder.getContext().getAuthentication().getAuthorities(); - List<SecurityRule> rules = securityRuleManager.getRulesForRoles(entity, authorities); + List<String> roles = new ArrayList<String>(); + for (int i = 0; i < authorities.length; i++) + { + roles.add(authorities[i].getAuthority()); + } + List<SecurityRule> rules = securityRuleManager.getRulesForRoles(entity, roles); + if (rules.isEmpty()) { - String roles = StringUtils.EMPTY; + String grantedRoles = StringUtils.EMPTY; for (int i = 0; i < authorities.length; i++) { - roles += authorities[i].getAuthority() + " "; + grantedRoles += authorities[i].getAuthority() + " "; } - log.error("Access is denied for entity {}, and roles {}", entity, roles); + log.error("Access is denied for entity {}, and roles {}", entity, grantedRoles); throw new SecurityException("Access is denied"); } + Filter filter = securityRuleManager.getEntityFilterFromRules(entity, rules); sessionFactory.getCurrentSession().enableFilter(filter.getName()); Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java 2007-08-09 08:47:26 UTC (rev 392) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java 2007-08-09 08:52:43 UTC (rev 393) @@ -7,7 +7,6 @@ import java.util.List; -import org.acegisecurity.GrantedAuthority; import org.hibernate.Filter; @@ -77,9 +76,9 @@ ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchFieldException; /** - * @param entity - * @param authorities - * @return + * @param entity The entity we want rules for + * @param roles The list of roles + * @return The list of security rules matching entity - roles */ - List<SecurityRule> getRulesForRoles(String entity, GrantedAuthority[] authorities); + List<SecurityRule> getRulesForRoles(String entity, List<String> roles); } Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java 2007-08-09 08:47:26 UTC (rev 392) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java 2007-08-09 08:52:43 UTC (rev 393) @@ -11,7 +11,6 @@ import java.util.ArrayList; import java.util.List; -import org.acegisecurity.GrantedAuthority; import org.hibernate.Filter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -117,15 +116,14 @@ /** * {@inheritDoc} */ - public List<SecurityRule> getRulesForRoles(String entity, GrantedAuthority[] authorities) + public List<SecurityRule> getRulesForRoles(String entity, List<String> roles) { List<SecurityRule> rules = new ArrayList<SecurityRule>(); - for (int i = 0; i < authorities.length; i++) + for (String role : roles) { - GrantedAuthority authority = authorities[i]; SecurityRule filter = new SecurityRule(); filter.setEntity(entity); - filter.setRole(authority.getAuthority()); + filter.setRole(role); rules.addAll(findFiltered(filter)); } return rules; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-09 08:47:25
|
Revision: 392 http://openutils.svn.sourceforge.net/openutils/?rev=392&view=rev Author: fcarone Date: 2007-08-09 01:47:26 -0700 (Thu, 09 Aug 2007) Log Message: ----------- The interceptor has been basically implemented. manager tests infrastructure started. Modified Paths: -------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java Added Paths: ----------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateRUDSecurityInterceptor.java trunk/openutils-hibernate-security/src/main/resources/docs/ trunk/openutils-hibernate-security/src/main/resources/docs/TODO trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/services/ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/services/impl/ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/services/impl/SecurityManagerImplTest.java trunk/openutils-hibernate-security/src/test/resources/database.properties trunk/openutils-hibernate-security/src/test/resources/dataset.dtd trunk/openutils-hibernate-security/src/test/resources/hibernate.cfg.xml trunk/openutils-hibernate-security/src/test/resources/log4j.dtd trunk/openutils-hibernate-security/src/test/resources/log4j.xml trunk/openutils-hibernate-security/src/test/resources/spring-dao.xml trunk/openutils-hibernate-security/src/test/resources/spring-database.xml trunk/openutils-hibernate-security/src/test/resources/spring-hibernate.xml trunk/openutils-hibernate-security/src/test/resources/spring-managers.xml trunk/openutils-hibernate-security/src/test/resources/spring-tests.xml Removed Paths: ------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateSecurityInterceptor.java Added: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateRUDSecurityInterceptor.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateRUDSecurityInterceptor.java (rev 0) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateRUDSecurityInterceptor.java 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,101 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.aop; + +import it.openutils.hibernate.security.dataobject.SecurityRule; +import it.openutils.hibernate.security.services.SecurityRuleManager; + +import java.util.List; + +import org.acegisecurity.GrantedAuthority; +import org.acegisecurity.context.SecurityContextHolder; +import org.aopalliance.intercept.MethodInterceptor; +import org.aopalliance.intercept.MethodInvocation; +import org.apache.commons.lang.StringUtils; +import org.hibernate.Filter; +import org.hibernate.SessionFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * This is a Hibernate Read-Update-Delete security interceptor. This enforces a DENY_ALL default policy. + * @author fcarone + * @version $Id: $ + */ +public class HibernateRUDSecurityInterceptor implements MethodInterceptor +{ + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(HibernateRUDSecurityInterceptor.class); + + private SecurityRuleManager securityRuleManager; + + private SessionFactory sessionFactory; + + /** + * {@inheritDoc} + */ + public Object invoke(MethodInvocation invocation) throws Throwable + { + Object[] arguments = invocation.getArguments(); + + String entity = StringUtils.EMPTY; + for (int i = 0; i < arguments.length; i++) + { + Object argument = arguments[i]; + if (sessionFactory.getClassMetadata(argument.getClass()) != null) + { + entity = argument.getClass().getCanonicalName(); + break; + } + } + + // the current invocation is not about any session managed entity + if (StringUtils.isEmpty(entity)) + { + return invocation.proceed(); + } + + GrantedAuthority[] authorities = SecurityContextHolder.getContext().getAuthentication().getAuthorities(); + List<SecurityRule> rules = securityRuleManager.getRulesForRoles(entity, authorities); + if (rules.isEmpty()) + { + String roles = StringUtils.EMPTY; + for (int i = 0; i < authorities.length; i++) + { + roles += authorities[i].getAuthority() + " "; + } + log.error("Access is denied for entity {}, and roles {}", entity, roles); + throw new SecurityException("Access is denied"); + } + Filter filter = securityRuleManager.getEntityFilterFromRules(entity, rules); + + sessionFactory.getCurrentSession().enableFilter(filter.getName()); + Object result = invocation.proceed(); + sessionFactory.getCurrentSession().disableFilter(filter.getName()); + return result; + } + + /** + * Sets the securityRuleManager. + * @param securityRuleManager the securityRuleManager to set + */ + public void setSecurityRuleManager(SecurityRuleManager securityRuleManager) + { + this.securityRuleManager = securityRuleManager; + } + + /** + * Sets the sessionFactory. + * @param sessionFactory the sessionFactory to set + */ + public void setSessionFactory(SessionFactory sessionFactory) + { + this.sessionFactory = sessionFactory; + } + +} Deleted: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateSecurityInterceptor.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateSecurityInterceptor.java 2007-08-08 15:38:52 UTC (rev 391) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateSecurityInterceptor.java 2007-08-09 08:47:26 UTC (rev 392) @@ -1,26 +0,0 @@ -/* - * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it - */ -package it.openutils.hibernate.security.aop; - -import org.aopalliance.intercept.MethodInterceptor; -import org.aopalliance.intercept.MethodInvocation; - - -/** - * @author fcarone - * @version $Id: $ - */ -public class HibernateSecurityInterceptor implements MethodInterceptor -{ - - /** - * {@inheritDoc} - */ - public Object invoke(MethodInvocation invocation) throws Throwable - { - // TODO Auto-generated method stub - return null; - } - -} Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java 2007-08-08 15:38:52 UTC (rev 391) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java 2007-08-09 08:47:26 UTC (rev 392) @@ -35,11 +35,11 @@ /** * @param bean The bean to set rules for * @param securityRules The list of {@link SecurityRule}s to apply. - * @throws ClassNotFoundException - * @throws InstantiationException - * @throws IllegalAccessException - * @throws SecurityException - * @throws NoSuchFieldException + * @throws ClassNotFoundException If the bean class has not been found + * @throws InstantiationException If the bean doesn't contain the no-arg constructor + * @throws IllegalAccessException If the bean properties cannot be accessed + * @throws SecurityException If the bean class cannot be accessed + * @throws NoSuchFieldException If the property contained in the security rule refers to a bean non-existent field */ public JavaBeanFilter(String bean, List<SecurityRule> securityRules) throws ClassNotFoundException, @@ -120,10 +120,10 @@ throw new IllegalArgumentException("Modifier " + securityRule.getModifier() + "not recognized"); } subFilterCond += field.getAnnotation(Column.class).name() - + modifier - + startQuote - + securityRule.getValue() - + endQuote; + + modifier + + startQuote + + securityRule.getValue() + + endQuote; filterName += securityRule.getValue(); } @@ -132,7 +132,10 @@ } // filtername is unique, but untraceable - this.filterDefinition = new FilterDefinition(Integer.toString(filterName.hashCode()), filterDefCondition, new HashMap()); + this.filterDefinition = new FilterDefinition( + Integer.toString(filterName.hashCode()), + filterDefCondition, + new HashMap()); } /** Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java 2007-08-08 15:38:52 UTC (rev 391) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java 2007-08-09 08:47:26 UTC (rev 392) @@ -5,9 +5,9 @@ import it.openutils.hibernate.security.dataobject.SecurityRule; -import java.lang.reflect.InvocationTargetException; import java.util.List; +import org.acegisecurity.GrantedAuthority; import org.hibernate.Filter; @@ -75,4 +75,11 @@ */ public Filter getEntityFilterFromRules(String entity, List<SecurityRule> rules) throws SecurityException, ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchFieldException; + + /** + * @param entity + * @param authorities + * @return + */ + List<SecurityRule> getRulesForRoles(String entity, GrantedAuthority[] authorities); } Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java 2007-08-08 15:38:52 UTC (rev 391) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java 2007-08-09 08:47:26 UTC (rev 392) @@ -8,16 +8,10 @@ import it.openutils.hibernate.security.filter.JavaBeanFilter; import it.openutils.hibernate.security.services.SecurityRuleManager; -import java.beans.PropertyDescriptor; -import java.lang.reflect.InvocationTargetException; -import java.util.HashMap; +import java.util.ArrayList; import java.util.List; -import java.util.Map; -import javax.persistence.Entity; -import javax.persistence.Table; - -import org.apache.commons.beanutils.PropertyUtils; +import org.acegisecurity.GrantedAuthority; import org.hibernate.Filter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -68,7 +62,7 @@ public Filter getEntityFilterFromRules(String entity, List<SecurityRule> rules) throws SecurityException, ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchFieldException { - // @todo: check rules consistency with the given entity + // @todo: check rules consistency with the gentity return new JavaBeanFilter(entity, rules); } @@ -119,4 +113,21 @@ { securityRuleDAO.update(securityRule); } + + /** + * {@inheritDoc} + */ + public List<SecurityRule> getRulesForRoles(String entity, GrantedAuthority[] authorities) + { + List<SecurityRule> rules = new ArrayList<SecurityRule>(); + for (int i = 0; i < authorities.length; i++) + { + GrantedAuthority authority = authorities[i]; + SecurityRule filter = new SecurityRule(); + filter.setEntity(entity); + filter.setRole(authority.getAuthority()); + rules.addAll(findFiltered(filter)); + } + return rules; + } } Added: trunk/openutils-hibernate-security/src/main/resources/docs/TODO =================================================================== --- trunk/openutils-hibernate-security/src/main/resources/docs/TODO (rev 0) +++ trunk/openutils-hibernate-security/src/main/resources/docs/TODO 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,4 @@ +TODO (in sparse order) + +1. Evaluate the use of hibernate ClassMetadata, instead of using reflection. This could enable the + java bean filter to work on non-annotated but configured classes. Added: trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/services/impl/SecurityManagerImplTest.java =================================================================== --- trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/services/impl/SecurityManagerImplTest.java (rev 0) +++ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/services/impl/SecurityManagerImplTest.java 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,22 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.services.impl; + +import it.openutils.hibernate.security.services.SecurityRuleManager; +import it.openutils.testing.junit.GenericsDbUnitTestCase; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class SecurityManagerImplTest extends GenericsDbUnitTestCase<SecurityRuleManager> +{ + + public void testManagerApplyRules() throws Exception + { + + } + +} Added: trunk/openutils-hibernate-security/src/test/resources/database.properties =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/database.properties (rev 0) +++ trunk/openutils-hibernate-security/src/test/resources/database.properties 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,11 @@ +# ATTENZIONE: queste propriet\xE0 sono utilizzate solo per gli unit tests +# i file per la configurazione del db utilizzati dall'applicazione web sono in +# src/main/web-app/WEB-INF + +hibernate.connection.driver=org.apache.derby.jdbc.EmbeddedDriver +hibernate.dialect=org.hibernate.dialect.DerbyDialect +hibernate.connection.username=ikam +hibernate.connection.password= +hibernate.connection.url=jdbc:derby:target/db/openutils-usermanagement-db-test;create=true +hibernate.hbm2ddl.auto=update + Added: trunk/openutils-hibernate-security/src/test/resources/dataset.dtd =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/dataset.dtd (rev 0) +++ trunk/openutils-hibernate-security/src/test/resources/dataset.dtd 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,13 @@ +<!ELEMENT dataset (table*)> +<!ELEMENT table (column+,row+)> +<!ATTLIST table + name CDATA #REQUIRED +> +<!ELEMENT row (value|null)+> +<!ELEMENT column (#PCDATA)> +<!ELEMENT value (#PCDATA)> +<!ELEMENT null EMPTY> +<!-- +nb una tabella senza righe sarebbe valida (per cancellare tutto il contenuto), +ma NON DEVE ESISTERE NEI NOSTRI TEST IN QUANTO TUTTE LE TABELLE VENGONO SVUOTATE PRIMA DEL CARICAMENTO +--> \ No newline at end of file Added: trunk/openutils-hibernate-security/src/test/resources/hibernate.cfg.xml =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/hibernate.cfg.xml (rev 0) +++ trunk/openutils-hibernate-security/src/test/resources/hibernate.cfg.xml 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,8 @@ +<!DOCTYPE hibernate-configuration PUBLIC + "-//Hibernate/Hibernate Configuration DTD 3.0//EN" + "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> +<hibernate-configuration> + <session-factory> + <mapping class="it.openutils.hibernate.security.dataobject.SecurityRule" /> + </session-factory> +</hibernate-configuration> \ No newline at end of file Added: trunk/openutils-hibernate-security/src/test/resources/log4j.dtd =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/log4j.dtd (rev 0) +++ trunk/openutils-hibernate-security/src/test/resources/log4j.dtd 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<!-- Authors: Chris Taylor, Ceki Gulcu. --> + +<!-- Version: 1.2 --> + +<!-- A configuration element consists of optional renderer +elements,appender elements, categories and an optional root +element. --> + +<!ELEMENT log4j:configuration (renderer*, appender*,(category|logger)*,root?, + categoryFactory?)> + +<!-- The "threshold" attribute takes a level value such that all --> +<!-- logging statements with a level equal or below this value are --> +<!-- disabled. --> + +<!-- Setting the "debug" enable the printing of internal log4j logging --> +<!-- statements. --> + +<!-- By default, debug attribute is "null", meaning that we not do touch --> +<!-- internal log4j logging settings. The "null" value for the threshold --> +<!-- attribute can be misleading. The threshold field of a repository --> +<!-- cannot be set to null. The "null" value for the threshold attribute --> +<!-- simply means don't touch the threshold field, the threshold field --> +<!-- keeps its old value. --> + +<!ATTLIST log4j:configuration + xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" + threshold (all|debug|info|warn|error|fatal|off|null) "null" + debug (true|false|null) "null" +> + +<!-- renderer elements allow the user to customize the conversion of --> +<!-- message objects to String. --> + +<!ELEMENT renderer EMPTY> +<!ATTLIST renderer + renderedClass CDATA #REQUIRED + renderingClass CDATA #REQUIRED +> + +<!-- Appenders must have a name and a class. --> +<!-- Appenders may contain an error handler, a layout, optional parameters --> +<!-- and filters. They may also reference (or include) other appenders. --> +<!ELEMENT appender (errorHandler?, param*, layout?, filter*, appender-ref*)> +<!ATTLIST appender + name ID #REQUIRED + class CDATA #REQUIRED +> + +<!ELEMENT layout (param*)> +<!ATTLIST layout + class CDATA #REQUIRED +> + +<!ELEMENT filter (param*)> +<!ATTLIST filter + class CDATA #REQUIRED +> + +<!-- ErrorHandlers can be of any class. They can admit any number of --> +<!-- parameters. --> + +<!ELEMENT errorHandler (param*, root-ref?, logger-ref*, appender-ref?)> +<!ATTLIST errorHandler + class CDATA #REQUIRED +> + +<!ELEMENT root-ref EMPTY> + +<!ELEMENT logger-ref EMPTY> +<!ATTLIST logger-ref + ref IDREF #REQUIRED +> + +<!ELEMENT param EMPTY> +<!ATTLIST param + name CDATA #REQUIRED + value CDATA #REQUIRED +> + + +<!-- The priority class is org.apache.log4j.Level by default --> +<!ELEMENT priority (param*)> +<!ATTLIST priority + class CDATA #IMPLIED + value CDATA #REQUIRED +> + +<!-- The level class is org.apache.log4j.Level by default --> +<!ELEMENT level (param*)> +<!ATTLIST level + class CDATA #IMPLIED + value CDATA #REQUIRED +> + + +<!-- If no level element is specified, then the configurator MUST not --> +<!-- touch the level of the named category. --> +<!ELEMENT category (param*,(priority|level)?,appender-ref*)> +<!ATTLIST category + class CDATA #IMPLIED + name CDATA #REQUIRED + additivity (true|false) "true" +> + +<!-- If no level element is specified, then the configurator MUST not --> +<!-- touch the level of the named logger. --> +<!ELEMENT logger (level?,appender-ref*)> +<!ATTLIST logger + name ID #REQUIRED + additivity (true|false) "true" +> + + +<!ELEMENT categoryFactory (param*)> +<!ATTLIST categoryFactory + class CDATA #REQUIRED> + +<!ELEMENT appender-ref EMPTY> +<!ATTLIST appender-ref + ref IDREF #REQUIRED +> + +<!-- If no priority element is specified, then the configurator MUST not --> +<!-- touch the priority of root. --> +<!-- The root category always exists and cannot be subclassed. --> +<!ELEMENT root (param*, (priority|level)?, appender-ref*)> + + +<!-- ==================================================================== --> +<!-- A logging event --> +<!-- ==================================================================== --> +<!ELEMENT log4j:eventSet (log4j:event*)> +<!ATTLIST log4j:eventSet + xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/" + version (1.1|1.2) "1.2" + includesLocationInfo (true|false) "true" +> + + + +<!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?, + log4j:locationInfo?) > + +<!-- The timestamp format is application dependent. --> +<!ATTLIST log4j:event + logger CDATA #REQUIRED + level CDATA #REQUIRED + thread CDATA #REQUIRED + timestamp CDATA #REQUIRED +> + +<!ELEMENT log4j:message (#PCDATA)> +<!ELEMENT log4j:NDC (#PCDATA)> + +<!ELEMENT log4j:throwable (#PCDATA)> + +<!ELEMENT log4j:locationInfo EMPTY> +<!ATTLIST log4j:locationInfo + class CDATA #REQUIRED + method CDATA #REQUIRED + file CDATA #REQUIRED + line CDATA #REQUIRED +> Added: trunk/openutils-hibernate-security/src/test/resources/log4j.xml =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/log4j.xml (rev 0) +++ trunk/openutils-hibernate-security/src/test/resources/log4j.xml 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> +<log4j:configuration> + <!-- log4j test configuration --> + <appender name="test-appender" class="org.apache.log4j.ConsoleAppender"> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%-5p %c.%M(%C{1}.java:%L) %m%n" /> + <!-- <param name="ConversionPattern" value="%-5p %m%n" />--> + </layout> + </appender> + <category name="it"> + <priority value="debug" /> + </category> + <category name="org"> + <priority value="warn" /> + </category> + <category name="com"> + <priority value="warn" /> + </category> + <category name="net"> + <priority value="warn" /> + </category> + <category name="org.hibernate"> + <priority value="warn" /> + </category> + <category name="it.openutils.test.ApplicationContextHolder"> + <priority value="info" /> + </category> + <category name="it.openutils.test.BaseDAOTestCase"> + <priority value="INFO" /> + </category> + <category name="it.openutils"> + <priority value="INFO" /> + </category> + <category name="it.openutils.test"> + <priority value="INFO" /> + </category> + <category name="it.openutils.dbupdate.DbSetupManagerImpl"> + <priority value="INFO" /> + </category> + <root> + <priority value="debug" /> + <appender-ref ref="test-appender" /> + </root> +</log4j:configuration> \ No newline at end of file Added: trunk/openutils-hibernate-security/src/test/resources/spring-dao.xml =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/spring-dao.xml (rev 0) +++ trunk/openutils-hibernate-security/src/test/resources/spring-dao.xml 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" +"http://www.springframework.org/dtd/spring-beans.dtd"> +<beans> + <bean id="securityRuleDAO" parent="txProxyTemplate"> + <property name="target"> + <bean class="it.openutils.hibernate.security.dao.SecurityRuleDAOImpl"> + <property name="sessionFactory" ref="sessionFactory" /> + </bean> + </property> + </bean> +</beans> \ No newline at end of file Added: trunk/openutils-hibernate-security/src/test/resources/spring-database.xml =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/spring-database.xml (rev 0) +++ trunk/openutils-hibernate-security/src/test/resources/spring-database.xml 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> +<!-- + # ATTENZIONE: queste proprietà sono utilizzate solo per gli unit tests + # i file per la configurazione del db utilizzati dall'applicazione web sono in + # src/main/web-app/WEB-INF +--> +<beans> + <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="location"> + <value>classpath:database.properties</value> + </property> + </bean> + <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> + <property name="driverClassName"> + <value>${hibernate.connection.driver}</value> + </property> + <property name="url"> + <value>${hibernate.connection.url}</value> + </property> + <property name="username"> + <value>${hibernate.connection.username}</value> + </property> + <property name="password"> + <value>${hibernate.connection.password}</value> + </property> + </bean> +</beans> Added: trunk/openutils-hibernate-security/src/test/resources/spring-hibernate.xml =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/spring-hibernate.xml (rev 0) +++ trunk/openutils-hibernate-security/src/test/resources/spring-hibernate.xml 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" +"http://www.springframework.org/dtd/spring-beans.dtd"> +<beans> + + <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> + <property name="dataSource"> + <ref bean="dataSource" /> + </property> + <property name="configLocation"> + <value>classpath:hibernate.cfg.xml</value> + </property> + <property name="configurationClass"> + <value>org.hibernate.cfg.AnnotationConfiguration</value> + </property> + <property name="hibernateProperties"> + <props> + <prop key="hibernate.dialect">${hibernate.dialect}</prop> + <prop key="hibernate.generate_statistics">false</prop> + <prop key="hibernate.bytecode.use_reflection_optimizer">true</prop> + <prop key="hibernate.show_sql">false</prop> + <prop key="hibernate.use_sql_comments">false</prop> + <prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop> + </props> + </property> + </bean> + <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> + <property name="sessionFactory"> + <ref local="sessionFactory" /> + </property> + </bean> + <bean id="txProxyTemplate" abstract="true" + class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> + <property name="transactionManager"> + <ref bean="transactionManager" /> + </property> + <property name="transactionAttributes"> + <props> + <prop key="save*">PROPAGATION_REQUIRED</prop> + <prop key="delete*">PROPAGATION_REQUIRED</prop> + <prop key="update*">PROPAGATION_REQUIRED</prop> + <prop key="clean*">PROPAGATION_REQUIRED</prop> + <prop key="*">PROPAGATION_REQUIRED,readOnly</prop> + </props> + </property> + </bean> +</beans> \ No newline at end of file Added: trunk/openutils-hibernate-security/src/test/resources/spring-managers.xml =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/spring-managers.xml (rev 0) +++ trunk/openutils-hibernate-security/src/test/resources/spring-managers.xml 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,17 @@ +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> +<beans> + <bean id="securityRuleManager" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" + autowire="byType"> + <property name="transactionManager"> + <ref bean="transactionManager" /> + </property> + <property name="transactionAttributes"> + <props> + <prop key="*">PROPAGATION_REQUIRED</prop> + </props> + </property> + <property name="target"> + <bean class="it.openutils.hibernate.security.services.impl.SecurityRuleManagerImpl" autowire="byType"></bean> + </property> + </bean> +</beans> \ No newline at end of file Added: trunk/openutils-hibernate-security/src/test/resources/spring-tests.xml =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/spring-tests.xml (rev 0) +++ trunk/openutils-hibernate-security/src/test/resources/spring-tests.xml 2007-08-09 08:47:26 UTC (rev 392) @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> +<beans> + <import resource="classpath:spring-database.xml" /> + <import resource="classpath:spring-hibernate.xml" /> + <import resource="classpath:spring-dao.xml" /> + <import resource="classpath:spring-managers.xml" /> +</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: <fc...@us...> - 2007-08-08 15:38:58
|
Revision: 391 http://openutils.svn.sourceforge.net/openutils/?rev=391&view=rev Author: fcarone Date: 2007-08-08 08:38:52 -0700 (Wed, 08 Aug 2007) Log Message: ----------- Initial implementation for java bean security filter Modified Paths: -------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java Added Paths: ----------- trunk/openutils-hibernate-security/src/test/java/it/ trunk/openutils-hibernate-security/src/test/java/it/openutils/ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/filter/ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/filter/JavaBeanFilterTest.java Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java 2007-08-08 11:14:09 UTC (rev 390) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java 2007-08-08 15:38:52 UTC (rev 391) @@ -21,6 +21,7 @@ import org.hibernate.annotations.CollectionOfElements; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; +import org.apache.commons.lang.builder.ToStringBuilder; /** @@ -173,7 +174,6 @@ this.permissions = permissions; } - /** * Returns the id. * @return the id @@ -183,7 +183,6 @@ return id; } - /** * Sets the id. * @param id the id to set @@ -193,4 +192,21 @@ this.id = id; } + /** + * {@inheritDoc} + */ + @Override + public String toString() + { + return new ToStringBuilder(this) + .append("id", this.id) + .append("role", this.role) + .append("entity", this.entity) + .append("property", this.property) + .append("value", this.value) + .append("modifier", this.modifier) + .append("permissions", this.permissions) + .toString(); + } + } Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java 2007-08-08 11:14:09 UTC (rev 390) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java 2007-08-08 15:38:52 UTC (rev 391) @@ -3,8 +3,21 @@ */ package it.openutils.hibernate.security.filter; +import it.openutils.hibernate.security.dataobject.SecurityRule; + +import java.lang.reflect.Field; +import java.util.ArrayList; import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +import org.apache.commons.lang.StringUtils; import org.hibernate.Filter; import org.hibernate.HibernateException; import org.hibernate.engine.FilterDefinition; @@ -17,13 +30,117 @@ public class JavaBeanFilter implements Filter { + private FilterDefinition filterDefinition; + /** + * @param bean The bean to set rules for + * @param securityRules The list of {@link SecurityRule}s to apply. + * @throws ClassNotFoundException + * @throws InstantiationException + * @throws IllegalAccessException + * @throws SecurityException + * @throws NoSuchFieldException + */ + public JavaBeanFilter(String bean, List<SecurityRule> securityRules) + throws ClassNotFoundException, + InstantiationException, + IllegalAccessException, + SecurityException, + NoSuchFieldException + { + Class< ? extends Object> beanClass = Class.forName(bean, true, this.getClass().getClassLoader()); + + if (!beanClass.isAnnotationPresent(Entity.class)) + { + throw new IllegalArgumentException(); + } + if (!(beanClass.isAnnotationPresent(Table.class) || beanClass + .isAnnotationPresent(org.hibernate.annotations.Table.class))) + { + throw new IllegalArgumentException(); + } + + Map<String, String> propertyColumnMap = new HashMap<String, String>(); + + String filterDefCondition = StringUtils.EMPTY; + String filterName = StringUtils.EMPTY; + + Map<String, List<SecurityRule>> roleRuleMap = new LinkedHashMap<String, List<SecurityRule>>(); + for (SecurityRule securityRule : securityRules) + { + if (!roleRuleMap.containsKey(securityRule.getRole())) + { + roleRuleMap.put(securityRule.getRole(), new ArrayList<SecurityRule>()); + } + roleRuleMap.get(securityRule.getRole()).add(securityRule); + } + + for (Map.Entry<String, List<SecurityRule>> entry : roleRuleMap.entrySet()) + { + filterName += entry.getKey(); + + List<SecurityRule> rules = entry.getValue(); + if (!StringUtils.isEmpty(filterDefCondition)) + { + filterDefCondition += " OR "; + } + filterDefCondition += "("; + String subFilterCond = StringUtils.EMPTY; + for (SecurityRule securityRule : rules) + { + String property = securityRule.getProperty(); + filterName += property; + + Field field = beanClass.getDeclaredField(property); + + // @todo: annotations may also be defined on getters/setters... + propertyColumnMap.put(property, field.getAnnotation(Column.class).name()); + if (!StringUtils.isEmpty(subFilterCond)) + { + subFilterCond += " AND "; + } + String modifier = null; + String startQuote = null; + String endQuote = null; + switch (securityRule.getModifier()) + { + case EQUALS : + modifier = " = "; + startQuote = "\'"; + endQuote = startQuote; + break; + + case NOT : + modifier = " != "; + startQuote = "\'"; + endQuote = startQuote; + break; + + default : + throw new IllegalArgumentException("Modifier " + securityRule.getModifier() + "not recognized"); + } + subFilterCond += field.getAnnotation(Column.class).name() + + modifier + + startQuote + + securityRule.getValue() + + endQuote; + + filterName += securityRule.getValue(); + } + filterDefCondition += subFilterCond; + filterDefCondition += ")"; + } + + // filtername is unique, but untraceable + this.filterDefinition = new FilterDefinition(Integer.toString(filterName.hashCode()), filterDefCondition, new HashMap()); + } + + /** * {@inheritDoc} */ public FilterDefinition getFilterDefinition() { - // TODO Auto-generated method stub - return null; + return this.filterDefinition; } /** @@ -31,8 +148,7 @@ */ public String getName() { - // TODO Auto-generated method stub - return null; + return this.filterDefinition.getFilterName(); } /** @@ -40,8 +156,7 @@ */ public Filter setParameter(String name, Object value) { - // TODO Auto-generated method stub - return null; + return this; } /** @@ -49,8 +164,7 @@ */ public Filter setParameterList(String name, Collection values) { - // TODO Auto-generated method stub - return null; + return this; } /** @@ -58,8 +172,7 @@ */ public Filter setParameterList(String name, Object[] values) { - // TODO Auto-generated method stub - return null; + return this; } /** @@ -67,8 +180,7 @@ */ public void validate() throws HibernateException { - // TODO Auto-generated method stub - + // } } Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java 2007-08-08 11:14:09 UTC (rev 390) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java 2007-08-08 15:38:52 UTC (rev 391) @@ -5,9 +5,9 @@ import it.openutils.hibernate.security.dataobject.SecurityRule; +import java.lang.reflect.InvocationTargetException; import java.util.List; -import org.acegisecurity.Authentication; import org.hibernate.Filter; @@ -64,12 +64,15 @@ void update(SecurityRule securityRule); /** - * @param entity The hibernate entity bean name - * @param authentication The current {@link Authentication} object - * @return A Hibernate {@link Filter} encapsulating all the rules that can be applied for the given authentication + * @param entity The entity to apply rules for + * @param rules The list of rules to apply + * @return + * @throws SecurityException + * @throws ClassNotFoundException + * @throws InstantiationException + * @throws IllegalAccessException + * @throws NoSuchFieldException */ - Filter getEntityFilterForAuthentication(String entity, Authentication authentication); - - - + public Filter getEntityFilterFromRules(String entity, List<SecurityRule> rules) throws SecurityException, + ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchFieldException; } Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java 2007-08-08 11:14:09 UTC (rev 390) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java 2007-08-08 15:38:52 UTC (rev 391) @@ -5,24 +5,38 @@ import it.openutils.hibernate.security.dao.SecurityRuleDAO; import it.openutils.hibernate.security.dataobject.SecurityRule; +import it.openutils.hibernate.security.filter.JavaBeanFilter; import it.openutils.hibernate.security.services.SecurityRuleManager; +import java.beans.PropertyDescriptor; +import java.lang.reflect.InvocationTargetException; +import java.util.HashMap; import java.util.List; +import java.util.Map; -import org.acegisecurity.Authentication; +import javax.persistence.Entity; +import javax.persistence.Table; + +import org.apache.commons.beanutils.PropertyUtils; import org.hibernate.Filter; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; - /** * @author fcarone * @version $Id: $ */ public class SecurityRuleManagerImpl implements SecurityRuleManager { - SecurityRuleDAO securityRuleDAO; + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(SecurityRuleManagerImpl.class); + private SecurityRuleDAO securityRuleDAO; + /** * Sets the securityRuleDAO. * @param securityRuleDAO the securityRuleDAO to set @@ -32,7 +46,6 @@ this.securityRuleDAO = securityRuleDAO; } - /** * {@inheritDoc} */ @@ -41,7 +54,6 @@ return securityRuleDAO.findAll(); } - /** * {@inheritDoc} */ @@ -50,14 +62,14 @@ return securityRuleDAO.findFiltered(filter); } - /** * {@inheritDoc} */ - public Filter getEntityFilterForAuthentication(String entity, Authentication authentication) + public Filter getEntityFilterFromRules(String entity, List<SecurityRule> rules) throws SecurityException, + ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchFieldException { - // TODO Auto-generated method stub - return null; + // @todo: check rules consistency with the given entity + return new JavaBeanFilter(entity, rules); } /** @@ -68,7 +80,6 @@ return securityRuleDAO.load(id); } - /** * {@inheritDoc} */ @@ -77,7 +88,6 @@ return securityRuleDAO.loadIfAvailable(id); } - /** * {@inheritDoc} */ @@ -86,7 +96,6 @@ return securityRuleDAO.delete(id); } - /** * {@inheritDoc} */ @@ -95,7 +104,6 @@ return securityRuleDAO.save(securityRule); } - /** * {@inheritDoc} */ @@ -104,7 +112,6 @@ securityRuleDAO.saveOrUpdate(securityRule); } - /** * {@inheritDoc} */ Added: trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/filter/JavaBeanFilterTest.java =================================================================== --- trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/filter/JavaBeanFilterTest.java (rev 0) +++ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/filter/JavaBeanFilterTest.java 2007-08-08 15:38:52 UTC (rev 391) @@ -0,0 +1,70 @@ +package it.openutils.hibernate.security.filter; + +import it.openutils.hibernate.security.dataobject.ModifierEnum; +import it.openutils.hibernate.security.dataobject.PermissionEnum; +import it.openutils.hibernate.security.dataobject.SecurityRule; + +import java.util.ArrayList; +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; + + +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ + +/** + * @author fcarone + * @version $Id: $ + */ +public class JavaBeanFilterTest +{ + + /** + * @throws Exception Any exception + */ + @Test + public void testFilterConstrutor() throws Exception + { + List<SecurityRule> rules = new ArrayList<SecurityRule>(); + + SecurityRule rule = new SecurityRule(); + rule.setEntity("it.openutils.hibernate.security.dataobject.SecurityRule"); + rule.setModifier(ModifierEnum.EQUALS); + List<PermissionEnum> permissions = new ArrayList<PermissionEnum>(); + permissions.add(PermissionEnum.CREATE); + rule.setPermissions(permissions); + rule.setProperty("entity"); + rule.setRole("ROLE_1"); + rule.setValue("VALUE"); + + SecurityRule rule2 = new SecurityRule(); + rule2.setEntity("it.openutils.hibernate.security.dataobject.SecurityRule"); + rule2.setModifier(ModifierEnum.NOT); + rule2.setPermissions(permissions); + rule2.setProperty("value"); + rule2.setRole("ROLE_1"); + rule2.setValue("VALUE2"); + + SecurityRule rule3 = new SecurityRule(); + rule3.setEntity("it.openutils.hibernate.security.dataobject.SecurityRule"); + rule3.setModifier(ModifierEnum.NOT); + rule3.setPermissions(permissions); + rule3.setProperty("value"); + rule3.setRole("ROLE_2"); + rule3.setValue("VALUE3"); + + rules.add(rule); + rules.add(rule2); + rules.add(rule3); + + JavaBeanFilter filter = new JavaBeanFilter("it.openutils.hibernate.security.dataobject.SecurityRule", rules); + Assert.assertNotNull(filter); + Assert.assertEquals("(ENTITY = 'VALUE' AND VALUE != 'VALUE2') OR (VALUE != 'VALUE3')", filter + .getFilterDefinition() + .getDefaultFilterCondition()); + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-08 11:14:08
|
Revision: 390 http://openutils.svn.sourceforge.net/openutils/?rev=390&view=rev Author: fcarone Date: 2007-08-08 04:14:09 -0700 (Wed, 08 Aug 2007) Log Message: ----------- Initial manager impl Modified Paths: -------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java 2007-08-08 10:38:12 UTC (rev 389) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java 2007-08-08 11:14:09 UTC (rev 390) @@ -19,18 +19,57 @@ { /** - * @param role A role - * @return The list of {@link SecurityRule}s for the given role + * @return All the defined {@link SecurityRule}s. */ - List<SecurityRule> getSecurityRulesForRole(String role); + List<SecurityRule> findAll(); /** + * @param filter The {@link SecurityRule} to use as search filter + * @return The list of matching {@link SecurityRule}s. + */ + List<SecurityRule> findFiltered(SecurityRule filter); + + /** + * @param id The id of the {@link SecurityRule} to load + * @return The {@link SecurityRule} with the given id + */ + SecurityRule load(Long id); + + /** + * @param id The id of the {@link SecurityRule} to load + * @return The {@link SecurityRule} with the given id, or null if it is not found + */ + SecurityRule loadIfAvailable(Long id); + + /** + * @param id The security rule id + * @return The removed {@link SecurityRule} + */ + boolean delete(Long id); + + /** + * @param securityRule The {@link SecurityRule} to save or update + */ + void saveOrUpdate(SecurityRule securityRule); + + /** + * @param securityRule The {@link SecurityRule} to save + * @return The id of the saved {@link SecurityRule} + */ + Long save(SecurityRule securityRule); + + /** + * @param securityRule The {@link SecurityRule} to update + */ + void update(SecurityRule securityRule); + + /** * @param entity The hibernate entity bean name * @param authentication The current {@link Authentication} object * @return A Hibernate {@link Filter} encapsulating all the rules that can be applied for the given authentication */ Filter getEntityFilterForAuthentication(String entity, Authentication authentication); - - + + } Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java 2007-08-08 10:38:12 UTC (rev 389) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java 2007-08-08 11:14:09 UTC (rev 390) @@ -3,13 +3,113 @@ */ package it.openutils.hibernate.security.services.impl; +import it.openutils.hibernate.security.dao.SecurityRuleDAO; +import it.openutils.hibernate.security.dataobject.SecurityRule; +import it.openutils.hibernate.security.services.SecurityRuleManager; +import java.util.List; +import org.acegisecurity.Authentication; +import org.hibernate.Filter; + + + /** * @author fcarone * @version $Id: $ */ -public class SecurityRuleManagerImpl +public class SecurityRuleManagerImpl implements SecurityRuleManager { + SecurityRuleDAO securityRuleDAO; + + /** + * Sets the securityRuleDAO. + * @param securityRuleDAO the securityRuleDAO to set + */ + public void setSecurityRuleDAO(SecurityRuleDAO securityRuleDAO) + { + this.securityRuleDAO = securityRuleDAO; + } + + + /** + * {@inheritDoc} + */ + public List<SecurityRule> findAll() + { + return securityRuleDAO.findAll(); + } + + + /** + * {@inheritDoc} + */ + public List<SecurityRule> findFiltered(SecurityRule filter) + { + return securityRuleDAO.findFiltered(filter); + } + + + /** + * {@inheritDoc} + */ + public Filter getEntityFilterForAuthentication(String entity, Authentication authentication) + { + // TODO Auto-generated method stub + return null; + } + + /** + * {@inheritDoc} + */ + public SecurityRule load(Long id) + { + return securityRuleDAO.load(id); + } + + + /** + * {@inheritDoc} + */ + public SecurityRule loadIfAvailable(Long id) + { + return securityRuleDAO.loadIfAvailable(id); + } + + + /** + * {@inheritDoc} + */ + public boolean delete(Long id) + { + return securityRuleDAO.delete(id); + } + + + /** + * {@inheritDoc} + */ + public Long save(SecurityRule securityRule) + { + return securityRuleDAO.save(securityRule); + } + + + /** + * {@inheritDoc} + */ + public void saveOrUpdate(SecurityRule securityRule) + { + securityRuleDAO.saveOrUpdate(securityRule); + } + + + /** + * {@inheritDoc} + */ + public void update(SecurityRule securityRule) + { + securityRuleDAO.update(securityRule); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-08 10:38:10
|
Revision: 389 http://openutils.svn.sourceforge.net/openutils/?rev=389&view=rev Author: fcarone Date: 2007-08-08 03:38:12 -0700 (Wed, 08 Aug 2007) Log Message: ----------- DAOs implemented Modified Paths: -------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/SecurityRuleDAO.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/impl/SecurityRuleDAOImpl.java Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/SecurityRuleDAO.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/SecurityRuleDAO.java 2007-08-08 10:35:30 UTC (rev 388) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/SecurityRuleDAO.java 2007-08-08 10:38:12 UTC (rev 389) @@ -3,12 +3,15 @@ */ package it.openutils.hibernate.security.dao; +import it.openutils.dao.hibernate.HibernateDAO; +import it.openutils.hibernate.security.dataobject.SecurityRule; + /** * @author fcarone * @version $Id: $ */ -public interface SecurityRuleDAO +public interface SecurityRuleDAO extends HibernateDAO<SecurityRule, Long> { } Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/impl/SecurityRuleDAOImpl.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/impl/SecurityRuleDAOImpl.java 2007-08-08 10:35:30 UTC (rev 388) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/impl/SecurityRuleDAOImpl.java 2007-08-08 10:38:12 UTC (rev 389) @@ -3,12 +3,25 @@ */ package it.openutils.hibernate.security.dao.impl; +import it.openutils.dao.hibernate.HibernateDAOImpl; +import it.openutils.hibernate.security.dao.SecurityRuleDAO; +import it.openutils.hibernate.security.dataobject.SecurityRule; + /** * @author fcarone * @version $Id: $ */ -public class SecurityRuleDAOImpl +public class SecurityRuleDAOImpl extends HibernateDAOImpl<SecurityRule, Long> implements SecurityRuleDAO { + /** + * {@inheritDoc} + */ + @Override + protected Class<SecurityRule> getReferenceClass() + { + return SecurityRule.class; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-08 10:35:29
|
Revision: 388 http://openutils.svn.sourceforge.net/openutils/?rev=388&view=rev Author: fcarone Date: 2007-08-08 03:35:30 -0700 (Wed, 08 Aug 2007) Log Message: ----------- minor changes Modified Paths: -------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java 2007-08-03 16:49:18 UTC (rev 387) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java 2007-08-08 10:35:30 UTC (rev 388) @@ -4,7 +4,6 @@ package it.openutils.hibernate.security.dataobject; import java.io.Serializable; -import java.security.Permissions; import java.util.List; import javax.persistence.Column; @@ -174,4 +173,24 @@ this.permissions = permissions; } + + /** + * Returns the id. + * @return the id + */ + public Long getId() + { + return id; + } + + + /** + * Sets the id. + * @param id the id to set + */ + public void setId(Long id) + { + this.id = id; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-03 16:49:17
|
Revision: 387 http://openutils.svn.sourceforge.net/openutils/?rev=387&view=rev Author: fcarone Date: 2007-08-03 09:49:18 -0700 (Fri, 03 Aug 2007) Log Message: ----------- Initial manager interface methods Modified Paths: -------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java 2007-08-03 16:48:53 UTC (rev 386) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java 2007-08-03 16:49:18 UTC (rev 387) @@ -3,7 +3,14 @@ */ package it.openutils.hibernate.security.services; +import it.openutils.hibernate.security.dataobject.SecurityRule; +import java.util.List; + +import org.acegisecurity.Authentication; +import org.hibernate.Filter; + + /** * @author fcarone * @version $Id: $ @@ -11,4 +18,19 @@ public interface SecurityRuleManager { + /** + * @param role A role + * @return The list of {@link SecurityRule}s for the given role + */ + List<SecurityRule> getSecurityRulesForRole(String role); + + /** + * @param entity The hibernate entity bean name + * @param authentication The current {@link Authentication} object + * @return A Hibernate {@link Filter} encapsulating all the rules that can be applied for the given authentication + */ + Filter getEntityFilterForAuthentication(String entity, Authentication authentication); + + + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-03 16:48:51
|
Revision: 386 http://openutils.svn.sourceforge.net/openutils/?rev=386&view=rev Author: fcarone Date: 2007-08-03 09:48:53 -0700 (Fri, 03 Aug 2007) Log Message: ----------- Use the getter not the setter Modified Paths: -------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/PermissionEnum.java Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/PermissionEnum.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/PermissionEnum.java 2007-08-03 16:39:33 UTC (rev 385) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/PermissionEnum.java 2007-08-03 16:48:53 UTC (rev 386) @@ -9,10 +9,16 @@ */ public enum PermissionEnum { + /** + * Load, Create, Modify, Delete permissions + */ LOAD("LOAD"), CREATE("CREATE"), MODIFY("MODIFY"), DELETE("DELETE"); private String value; + /** + * @param value The literal value for the needed enumeration object + */ PermissionEnum(String value) { this.value = value; @@ -20,11 +26,12 @@ /** - * Sets the value. - * @param value the value to set + * Returns the value. + * @return the value */ - public void setValue(String value) + public String getValue() { - this.value = value; + return value; } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 385 http://openutils.svn.sourceforge.net/openutils/?rev=385&view=rev Author: fcarone Date: 2007-08-03 09:39:33 -0700 (Fri, 03 Aug 2007) Log Message: ----------- let's relax for a while Modified Paths: -------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java 2007-08-03 16:36:24 UTC (rev 384) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java 2007-08-03 16:39:33 UTC (rev 385) @@ -3,14 +3,13 @@ */ package it.openutils.hibernate.security.services.impl; -import it.openutils.hibernate.security.services.SecurityRuleManager; /** * @author fcarone * @version $Id: $ */ -public class SecurityRuleManagerImpl implements SecurityRuleManager +public class SecurityRuleManagerImpl { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-03 16:36:25
|
Revision: 384 http://openutils.svn.sourceforge.net/openutils/?rev=384&view=rev Author: fcarone Date: 2007-08-03 09:36:24 -0700 (Fri, 03 Aug 2007) Log Message: ----------- Let's use an id and a better permissions def Modified Paths: -------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java Added Paths: ----------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/PermissionEnum.java Added: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/PermissionEnum.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/PermissionEnum.java (rev 0) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/PermissionEnum.java 2007-08-03 16:36:24 UTC (rev 384) @@ -0,0 +1,30 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.dataobject; + +/** + * @author fcarone + * @version $Id: $ + */ +public enum PermissionEnum { + + LOAD("LOAD"), CREATE("CREATE"), MODIFY("MODIFY"), DELETE("DELETE"); + + private String value; + + PermissionEnum(String value) + { + this.value = value; + } + + + /** + * Sets the value. + * @param value the value to set + */ + public void setValue(String value) + { + this.value = value; + } +} Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java 2007-08-03 16:22:36 UTC (rev 383) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java 2007-08-03 16:36:24 UTC (rev 384) @@ -4,22 +4,29 @@ package it.openutils.hibernate.security.dataobject; import java.io.Serializable; +import java.security.Permissions; +import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.JoinTable; import javax.persistence.Table; +import org.hibernate.annotations.CollectionOfElements; +import org.hibernate.annotations.Fetch; +import org.hibernate.annotations.FetchMode; /** * @author fcarone - * @version $Id: $ - * - * A security rule - * + * @version $Id: $ A security rule */ @Entity @Table(name = "SECURITY_RULE") @@ -32,28 +39,33 @@ private static final long serialVersionUID = -4820683448073404349L; @Id + @GeneratedValue(strategy = GenerationType.AUTO) + @Column(name = "ID_SECURITY_RULE") + private Long id; + @Column(name = "ROLE", length = 64, nullable = false) private String role; - @Id @Column(name = "ENTITY", length = 512, nullable = false) private String entity; - - @Id + @Column(name = "PROPERTY", length = 512, nullable = false) private String property; - + @Column(name = "VALUE", nullable = false) private String value; - + @Enumerated(EnumType.STRING) @Column(name = "MODIFIER", nullable = false) private ModifierEnum modifier; - - @Column(name = "PERMISSIONS", length = 64, nullable = false) - private String permissions; - + @CollectionOfElements(fetch = FetchType.EAGER) + @JoinTable(name = "SECRULE_PERMISSION", joinColumns = {@JoinColumn(name = "ID_SECURITY_RULE") }) + @Column(name = "PERMISSION", nullable = false) + @Enumerated(EnumType.STRING) + @Fetch(FetchMode.SUBSELECT) + private List<PermissionEnum> permissions; + /** * Returns the role. * @return the role @@ -63,7 +75,6 @@ return role; } - /** * Sets the role. * @param role the role to set @@ -73,7 +84,6 @@ this.role = role; } - /** * Returns the entity. * @return the entity @@ -83,7 +93,6 @@ return entity; } - /** * Sets the entity. * @param entity the entity to set @@ -93,7 +102,6 @@ this.entity = entity; } - /** * Returns the property. * @return the property @@ -103,7 +111,6 @@ return property; } - /** * Sets the property. * @param property the property to set @@ -113,7 +120,6 @@ this.property = property; } - /** * Returns the value. * @return the value @@ -123,7 +129,6 @@ return value; } - /** * Sets the value. * @param value the value to set @@ -133,7 +138,6 @@ this.value = value; } - /** * Returns the modifier. * @return the modifier @@ -143,7 +147,6 @@ return modifier; } - /** * Sets the modifier. * @param modifier the modifier to set @@ -153,24 +156,22 @@ this.modifier = modifier; } - /** * Returns the permissions. * @return the permissions */ - public String getPermissions() + public List<PermissionEnum> getPermissions() { return permissions; } - /** * Sets the permissions. * @param permissions the permissions to set */ - public void setPermissions(String permissions) + public void setPermissions(List<PermissionEnum> permissions) { this.permissions = permissions; } - + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-03 16:22:41
|
Revision: 383 http://openutils.svn.sourceforge.net/openutils/?rev=383&view=rev Author: fcarone Date: 2007-08-03 09:22:36 -0700 (Fri, 03 Aug 2007) Log Message: ----------- Security rule JPA annotated Modified Paths: -------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java Modified: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java 2007-08-03 15:37:27 UTC (rev 382) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java 2007-08-03 16:22:36 UTC (rev 383) @@ -3,50 +3,58 @@ */ package it.openutils.hibernate.security.dataobject; +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Table; + + /** * @author fcarone * @version $Id: $ + * + * A security rule + * */ - -public class SecurityRule +@Entity +@Table(name = "SECURITY_RULE") +public class SecurityRule implements Serializable { - private Long id; - + /** + * Generated serial version UID + */ + private static final long serialVersionUID = -4820683448073404349L; + + @Id + @Column(name = "ROLE", length = 64, nullable = false) private String role; - + + @Id + @Column(name = "ENTITY", length = 512, nullable = false) private String entity; + @Id + @Column(name = "PROPERTY", length = 512, nullable = false) private String property; + @Column(name = "VALUE", nullable = false) private String value; + @Enumerated(EnumType.STRING) + @Column(name = "MODIFIER", nullable = false) private ModifierEnum modifier; - - /** - * Returns the id. - * @return the id - */ - public Long getId() - { - return id; - } + @Column(name = "PERMISSIONS", length = 64, nullable = false) + private String permissions; /** - * Sets the id. - * @param id the id to set - */ - public void setId(Long id) - { - this.id = id; - } - - - /** * Returns the role. * @return the role */ @@ -144,5 +152,25 @@ { this.modifier = modifier; } + + /** + * Returns the permissions. + * @return the permissions + */ + public String getPermissions() + { + return permissions; + } + + + /** + * Sets the permissions. + * @param permissions the permissions to set + */ + public void setPermissions(String permissions) + { + this.permissions = permissions; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-03 15:37:26
|
Revision: 382 http://openutils.svn.sourceforge.net/openutils/?rev=382&view=rev Author: fcarone Date: 2007-08-03 08:37:27 -0700 (Fri, 03 Aug 2007) Log Message: ----------- Security rule bean added Added Paths: ----------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/ModifierEnum.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java Added: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/ModifierEnum.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/ModifierEnum.java (rev 0) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/ModifierEnum.java 2007-08-03 15:37:27 UTC (rev 382) @@ -0,0 +1,37 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.dataobject; + +/** + * @author fcarone + * @version $Id: $ + */ +public enum ModifierEnum { + + /** + * Equals + */ + EQUALS("equals"), + + /** + * Not + */ + NOT("not"); + + private String value; + + /** + * @param value The literal value of the modifier + */ + ModifierEnum(String value) + { + this.value = value; + } + + public String getValue() + { + return value; + } + +} Added: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java (rev 0) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dataobject/SecurityRule.java 2007-08-03 15:37:27 UTC (rev 382) @@ -0,0 +1,148 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.dataobject; + + + +/** + * @author fcarone + * @version $Id: $ + */ + +public class SecurityRule +{ + + private Long id; + + private String role; + + private String entity; + + private String property; + + private String value; + + private ModifierEnum modifier; + + + /** + * Returns the id. + * @return the id + */ + public Long getId() + { + return id; + } + + + /** + * Sets the id. + * @param id the id to set + */ + public void setId(Long id) + { + this.id = id; + } + + + /** + * Returns the role. + * @return the role + */ + public String getRole() + { + return role; + } + + + /** + * Sets the role. + * @param role the role to set + */ + public void setRole(String role) + { + this.role = role; + } + + + /** + * Returns the entity. + * @return the entity + */ + public String getEntity() + { + return entity; + } + + + /** + * Sets the entity. + * @param entity the entity to set + */ + public void setEntity(String entity) + { + this.entity = entity; + } + + + /** + * Returns the property. + * @return the property + */ + public String getProperty() + { + return property; + } + + + /** + * Sets the property. + * @param property the property to set + */ + public void setProperty(String property) + { + this.property = property; + } + + + /** + * Returns the value. + * @return the value + */ + public String getValue() + { + return value; + } + + + /** + * Sets the value. + * @param value the value to set + */ + public void setValue(String value) + { + this.value = value; + } + + + /** + * Returns the modifier. + * @return the modifier + */ + public ModifierEnum getModifier() + { + return modifier; + } + + + /** + * Sets the modifier. + * @param modifier the modifier to set + */ + public void setModifier(ModifierEnum modifier) + { + this.modifier = modifier; + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-03 15:01:35
|
Revision: 381 http://openutils.svn.sourceforge.net/openutils/?rev=381&view=rev Author: fcarone Date: 2007-08-03 08:01:35 -0700 (Fri, 03 Aug 2007) Log Message: ----------- initial classes layout Added Paths: ----------- trunk/openutils-hibernate-security/src/main/java/it/ trunk/openutils-hibernate-security/src/main/java/it/openutils/ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateSecurityInterceptor.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/SecurityRuleDAO.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/impl/ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/impl/SecurityRuleDAOImpl.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java Added: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateSecurityInterceptor.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateSecurityInterceptor.java (rev 0) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateSecurityInterceptor.java 2007-08-03 15:01:35 UTC (rev 381) @@ -0,0 +1,26 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.aop; + +import org.aopalliance.intercept.MethodInterceptor; +import org.aopalliance.intercept.MethodInvocation; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class HibernateSecurityInterceptor implements MethodInterceptor +{ + + /** + * {@inheritDoc} + */ + public Object invoke(MethodInvocation invocation) throws Throwable + { + // TODO Auto-generated method stub + return null; + } + +} Added: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/SecurityRuleDAO.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/SecurityRuleDAO.java (rev 0) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/SecurityRuleDAO.java 2007-08-03 15:01:35 UTC (rev 381) @@ -0,0 +1,14 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.dao; + + +/** + * @author fcarone + * @version $Id: $ + */ +public interface SecurityRuleDAO +{ + +} Added: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/impl/SecurityRuleDAOImpl.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/impl/SecurityRuleDAOImpl.java (rev 0) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/dao/impl/SecurityRuleDAOImpl.java 2007-08-03 15:01:35 UTC (rev 381) @@ -0,0 +1,14 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.dao.impl; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class SecurityRuleDAOImpl +{ + +} Added: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java (rev 0) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java 2007-08-03 15:01:35 UTC (rev 381) @@ -0,0 +1,74 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.filter; + +import java.util.Collection; + +import org.hibernate.Filter; +import org.hibernate.HibernateException; +import org.hibernate.engine.FilterDefinition; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class JavaBeanFilter implements Filter +{ + + /** + * {@inheritDoc} + */ + public FilterDefinition getFilterDefinition() + { + // TODO Auto-generated method stub + return null; + } + + /** + * {@inheritDoc} + */ + public String getName() + { + // TODO Auto-generated method stub + return null; + } + + /** + * {@inheritDoc} + */ + public Filter setParameter(String name, Object value) + { + // TODO Auto-generated method stub + return null; + } + + /** + * {@inheritDoc} + */ + public Filter setParameterList(String name, Collection values) + { + // TODO Auto-generated method stub + return null; + } + + /** + * {@inheritDoc} + */ + public Filter setParameterList(String name, Object[] values) + { + // TODO Auto-generated method stub + return null; + } + + /** + * {@inheritDoc} + */ + public void validate() throws HibernateException + { + // TODO Auto-generated method stub + + } + +} Added: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java (rev 0) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/SecurityRuleManager.java 2007-08-03 15:01:35 UTC (rev 381) @@ -0,0 +1,14 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.services; + + +/** + * @author fcarone + * @version $Id: $ + */ +public interface SecurityRuleManager +{ + +} Added: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java (rev 0) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/services/impl/SecurityRuleManagerImpl.java 2007-08-03 15:01:35 UTC (rev 381) @@ -0,0 +1,16 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.services.impl; + +import it.openutils.hibernate.security.services.SecurityRuleManager; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class SecurityRuleManagerImpl implements SecurityRuleManager +{ + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-03 14:56:06
|
Revision: 380 http://openutils.svn.sourceforge.net/openutils/?rev=380&view=rev Author: fcarone Date: 2007-08-03 07:56:07 -0700 (Fri, 03 Aug 2007) Log Message: ----------- use latest bshd5 version Modified Paths: -------------- trunk/openutils-hibernate-security/pom.xml Modified: trunk/openutils-hibernate-security/pom.xml =================================================================== --- trunk/openutils-hibernate-security/pom.xml 2007-08-03 14:36:17 UTC (rev 379) +++ trunk/openutils-hibernate-security/pom.xml 2007-08-03 14:56:07 UTC (rev 380) @@ -27,7 +27,7 @@ <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-bshd5</artifactId> - <version>1.0.2</version> + <version>1.0.5</version> </dependency> <dependency> <groupId>net.sourceforge.openutils</groupId> @@ -42,6 +42,11 @@ </dependency> <dependency> <groupId>org.hibernate</groupId> + <artifactId>hibernate</artifactId> + <version>3.2.3.ga</version> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> <artifactId>hibernate-annotations</artifactId> <version>3.2.1.ga</version> </dependency> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-03 14:55:28
|
Revision: 375 http://openutils.svn.sourceforge.net/openutils/?rev=375&view=rev Author: fcarone Date: 2007-08-03 06:36:47 -0700 (Fri, 03 Aug 2007) Log Message: ----------- Use the same derby version throughout openutils Modified Paths: -------------- trunk/openutils-usermanagement/pom.xml Modified: trunk/openutils-usermanagement/pom.xml =================================================================== --- trunk/openutils-usermanagement/pom.xml 2007-07-30 10:41:55 UTC (rev 374) +++ trunk/openutils-usermanagement/pom.xml 2007-08-03 13:36:47 UTC (rev 375) @@ -97,7 +97,7 @@ <dependency> <groupId>org.apache.derby</groupId> <artifactId>derby</artifactId> - <version>10.1.2.1</version> + <version>10.2.2.0</version> <scope>test</scope> </dependency> <dependency> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-03 14:36:16
|
Revision: 379 http://openutils.svn.sourceforge.net/openutils/?rev=379&view=rev Author: fcarone Date: 2007-08-03 07:36:17 -0700 (Fri, 03 Aug 2007) Log Message: ----------- some pom refactoring and intermodule version updates Modified Paths: -------------- trunk/openutils-bshd5/pom.xml trunk/openutils-configuration-services/pom.xml trunk/openutils-dbmigration/pom.xml trunk/openutils-deployment/pom.xml trunk/openutils-spring/pom.xml trunk/openutils-tags-spring/pom.xml trunk/openutils-testing-junit/pom.xml trunk/openutils-testing-testng/pom.xml trunk/openutils-usermanagement/pom.xml trunk/pom.xml Modified: trunk/openutils-bshd5/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2007-08-03 14:02:40 UTC (rev 378) +++ trunk/openutils-bshd5/pom.xml 2007-08-03 14:36:17 UTC (rev 379) @@ -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"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.sourceforge.openutils</groupId> @@ -10,16 +11,19 @@ <name>openutils base Spring-Hibernate DAO for java 5.0</name> <version>1.0.6-SNAPSHOT</version> <description>openutils base Spring-Hibernate DAO for java 5.0</description> + <properties> + <spring.version>2.0.6</spring.version> + </properties> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-hibernate3</artifactId> - <version>2.0.1</version> + <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> - <version>2.0.1</version> + <version>${spring.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> Modified: trunk/openutils-configuration-services/pom.xml =================================================================== --- trunk/openutils-configuration-services/pom.xml 2007-08-03 14:02:40 UTC (rev 378) +++ trunk/openutils-configuration-services/pom.xml 2007-08-03 14:36:17 UTC (rev 379) @@ -75,7 +75,7 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> - <version>2.0.1</version> + <version>2.0.6</version> <scope>test</scope> </dependency> <dependency> Modified: trunk/openutils-dbmigration/pom.xml =================================================================== --- trunk/openutils-dbmigration/pom.xml 2007-08-03 14:02:40 UTC (rev 378) +++ trunk/openutils-dbmigration/pom.xml 2007-08-03 14:36:17 UTC (rev 379) @@ -10,6 +10,9 @@ <name>openutils db migration framework</name> <version>0.7.2-SNAPSHOT</version> <description /> + <properties> + <spring.version>2.0.6</spring.version> + </properties> <dependencies> <dependency> <groupId>commons-lang</groupId> @@ -24,7 +27,7 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> - <version>2.0.1</version> + <version>${spring.version}</version> <exclusions> <exclusion> <groupId>avalon-framework</groupId> @@ -39,7 +42,7 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-beans</artifactId> - <version>2.0.1</version> + <version>${spring.version}</version> <exclusions> <exclusion> <groupId>avalon-framework</groupId> @@ -54,7 +57,7 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> - <version>2.0.1</version> + <version>${spring.version}</version> <exclusions> <exclusion> <groupId>avalon-framework</groupId> Modified: trunk/openutils-deployment/pom.xml =================================================================== --- trunk/openutils-deployment/pom.xml 2007-08-03 14:02:40 UTC (rev 378) +++ trunk/openutils-deployment/pom.xml 2007-08-03 14:36:17 UTC (rev 379) @@ -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"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.sourceforge.openutils</groupId> @@ -10,6 +11,9 @@ <name>openutils deployment tools</name> <version>1.0.9-SNAPSHOT</version> <description /> + <properties> + <spring.version>2.0.6</spring.version> + </properties> <dependencies> <dependency> <groupId>commons-lang</groupId> @@ -19,7 +23,7 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> - <version>2.0.1</version> + <version>${spring.version}</version> <optional>true</optional> <exclusions> <exclusion> @@ -35,7 +39,7 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> - <version>2.0.1</version> + <version>${spring.version}</version> <optional>true</optional> <exclusions> <exclusion> Modified: trunk/openutils-spring/pom.xml =================================================================== --- trunk/openutils-spring/pom.xml 2007-08-03 14:02:40 UTC (rev 378) +++ trunk/openutils-spring/pom.xml 2007-08-03 14:36:17 UTC (rev 379) @@ -11,11 +11,14 @@ <name>openutils spring tools</name> <version>1.0.3-SNAPSHOT</version> <description /> + <properties> + <spring.version>2.0.6</spring.version> + </properties> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> - <version>2.0.1</version> + <version>${spring.version}</version> <optional>true</optional> <exclusions> <exclusion> @@ -47,7 +50,7 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-remoting</artifactId> - <version>2.0.1</version> + <version>${spring.version}</version> </dependency> <dependency> <groupId>net.sf.json-lib</groupId> Modified: trunk/openutils-tags-spring/pom.xml =================================================================== --- trunk/openutils-tags-spring/pom.xml 2007-08-03 14:02:40 UTC (rev 378) +++ trunk/openutils-tags-spring/pom.xml 2007-08-03 14:36:17 UTC (rev 379) @@ -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"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.sourceforge.openutils</groupId> @@ -10,6 +11,9 @@ <name>openutils tags for spring MVC</name> <version>0.5-SNAPSHOT</version> <description /> + <properties> + <spring.version>2.0.6</spring.version> + </properties> <dependencies> <dependency> <groupId>javax.servlet</groupId> @@ -46,7 +50,7 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> - <version>2.0.1</version> + <version>${spring.version}</version> <optional>true</optional> <exclusions> <exclusion> Modified: trunk/openutils-testing-junit/pom.xml =================================================================== --- trunk/openutils-testing-junit/pom.xml 2007-08-03 14:02:40 UTC (rev 378) +++ trunk/openutils-testing-junit/pom.xml 2007-08-03 14:36:17 UTC (rev 379) @@ -1,58 +1,62 @@ -<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>3</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-testing-junit</artifactId> - <name>openutils test utils (junit)</name> - <version>1.1.2-SNAPSHOT</version> - <description>openutils test utils</description> - <dependencies> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.2</version> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.13</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>2.0.1</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>2.0.1</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-hibernate3</artifactId> - <version>2.0.1</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.3</version> - </dependency> - <dependency> - <groupId>org.dbunit</groupId> - <artifactId>dbunit</artifactId> - <version>2.2</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - </dependency> - </dependencies> +<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>3</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-testing-junit</artifactId> + <name>openutils test utils (junit)</name> + <version>1.1.2-SNAPSHOT</version> + <description>openutils test utils</description> + <properties> + <spring.version>2.0.6</spring.version> + </properties> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.2</version> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.13</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-hibernate3</artifactId> + <version>${spring.version}</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>org.dbunit</groupId> + <artifactId>dbunit</artifactId> + <version>2.2</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + </dependency> + </dependencies> </project> \ No newline at end of file Modified: trunk/openutils-testing-testng/pom.xml =================================================================== --- trunk/openutils-testing-testng/pom.xml 2007-08-03 14:02:40 UTC (rev 378) +++ trunk/openutils-testing-testng/pom.xml 2007-08-03 14:36:17 UTC (rev 379) @@ -1,59 +1,63 @@ -<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>3</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-testing-testng</artifactId> - <name>openutils test utils (testng)</name> - <version>1.1.3-SNAPSHOT</version> - <description>openutils test utils</description> - <dependencies> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.2</version> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.13</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>2.0.1</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>2.0.1</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-hibernate3</artifactId> - <version>2.0.1</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.3</version> - </dependency> - <dependency> - <groupId>org.dbunit</groupId> - <artifactId>dbunit</artifactId> - <version>2.2</version> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <classifier>jdk15</classifier> - <version>5.1</version> - </dependency> - </dependencies> +<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>3</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-testing-testng</artifactId> + <name>openutils test utils (testng)</name> + <version>1.1.3-SNAPSHOT</version> + <description>openutils test utils</description> + <properties> + <spring.version>2.0.6</spring.version> + </properties> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.2</version> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.13</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-hibernate3</artifactId> + <version>${spring.version}</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>org.dbunit</groupId> + <artifactId>dbunit</artifactId> + <version>2.2</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.1</version> + </dependency> + </dependencies> </project> \ No newline at end of file Modified: trunk/openutils-usermanagement/pom.xml =================================================================== --- trunk/openutils-usermanagement/pom.xml 2007-08-03 14:02:40 UTC (rev 378) +++ trunk/openutils-usermanagement/pom.xml 2007-08-03 14:36:17 UTC (rev 379) @@ -32,8 +32,8 @@ </dependency> <dependency> <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils-testing</artifactId> - <version>1.0</version> + <artifactId>openutils-testing-junit</artifactId> + <version>1.1.1</version> <scope>test</scope> </dependency> <dependency> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-08-03 14:02:40 UTC (rev 378) +++ trunk/pom.xml 2007-08-03 14:36:17 UTC (rev 379) @@ -60,6 +60,16 @@ <timezone>+1</timezone> </developer> <developer> + <id>fcarone</id> + <name>Filippo Carone</name> + <email>fil...@op...</email> + <organization>openmind</organization> + <roles> + <role>developer</role> + </roles> + <timezone>+1</timezone> + </developer> + <developer> <id>fberar</id> <name>Fabrizio Berardi</name> <email>fab...@op...</email> @@ -170,7 +180,10 @@ <module>openutils-backup</module> <module>openutils-configuration-dataobjects</module> <module>openutils-configuration-services</module> - <module>openutils-mgnlspring</module> + <module>openutils-hibernate-security</module> + <!-- + <module>openutils-mgnlspring</module> <module>openutils-mgnlstripes</module> + --> </modules> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-03 14:02:42
|
Revision: 378 http://openutils.svn.sourceforge.net/openutils/?rev=378&view=rev Author: fcarone Date: 2007-08-03 07:02:40 -0700 (Fri, 03 Aug 2007) Log Message: ----------- ignore eclipse created properties Property Changed: ---------------- trunk/openutils-mgnlstripes/ Property changes on: trunk/openutils-mgnlstripes ___________________________________________________________________ Name: svn:ignore - target + .checkstyle This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-03 13:58:06
|
Revision: 377 http://openutils.svn.sourceforge.net/openutils/?rev=377&view=rev Author: fcarone Date: 2007-08-03 06:58:07 -0700 (Fri, 03 Aug 2007) Log Message: ----------- use latest bshd5 package in usermanagement Modified Paths: -------------- trunk/openutils-usermanagement/pom.xml Modified: trunk/openutils-usermanagement/pom.xml =================================================================== --- trunk/openutils-usermanagement/pom.xml 2007-08-03 13:55:17 UTC (rev 376) +++ trunk/openutils-usermanagement/pom.xml 2007-08-03 13:58:07 UTC (rev 377) @@ -28,7 +28,7 @@ <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-bshd5</artifactId> - <version>1.0.2</version> + <version>1.0.5</version> </dependency> <dependency> <groupId>net.sourceforge.openutils</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-03 13:55:24
|
Revision: 376 http://openutils.svn.sourceforge.net/openutils/?rev=376&view=rev Author: fcarone Date: 2007-08-03 06:55:17 -0700 (Fri, 03 Aug 2007) Log Message: ----------- Initial project layout Added Paths: ----------- trunk/openutils-hibernate-security/ trunk/openutils-hibernate-security/pom.xml trunk/openutils-hibernate-security/src/ trunk/openutils-hibernate-security/src/main/ trunk/openutils-hibernate-security/src/main/java/ trunk/openutils-hibernate-security/src/main/resources/ trunk/openutils-hibernate-security/src/test/ trunk/openutils-hibernate-security/src/test/java/ trunk/openutils-hibernate-security/src/test/resources/ Property changes on: trunk/openutils-hibernate-security ___________________________________________________________________ Name: svn:ignore + target .settings .checkstyle .classpath .project Added: trunk/openutils-hibernate-security/pom.xml =================================================================== --- trunk/openutils-hibernate-security/pom.xml (rev 0) +++ trunk/openutils-hibernate-security/pom.xml 2007-08-03 13:55:17 UTC (rev 376) @@ -0,0 +1,115 @@ +<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>3</version> + <relativePath>..</relativePath> + </parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-hibernate-security</artifactId> + <packaging>jar</packaging> + <name>openutils-hibernate-security</name> + <version>0.0.1-SNAPSHOT</version> + <description>Hibernate Security classes</description> + <dependencies> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-usermanagement</artifactId> + <version>1.1.1</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-usermanagement-dataobjects</artifactId> + <version>1.1.1</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-bshd5</artifactId> + <version>1.0.2</version> + </dependency> + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-testing</artifactId> + <version>1.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.2</version> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-annotations</artifactId> + <version>3.2.1.ga</version> + </dependency> + <dependency> + <groupId>commons-dbcp</groupId> + <artifactId>commons-dbcp</artifactId> + <version>1.2.1</version> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>xerces</artifactId> + <groupId>xerces</groupId> + </exclusion> + <exclusion> + <artifactId>xml-apis</artifactId> + <groupId>xml-apis</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>org.acegisecurity</groupId> + <artifactId>acegi-security</artifactId> + <version>1.0.3</version> + <exclusions> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-remoting</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-jdbc</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-support</artifactId> + </exclusion> + <exclusion> + <groupId>logkit</groupId> + <artifactId>logkit</artifactId> + </exclusion> + <exclusion> + <groupId>avalon-framework</groupId> + <artifactId>avalon-framework</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.derby</groupId> + <artifactId>derby</artifactId> + <version>10.2.2.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>dbunit</groupId> + <artifactId>dbunit</artifactId> + <version>2.1</version> + <scope>test</scope> + </dependency> + </dependencies> +</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...> - 2007-07-30 10:41:53
|
Revision: 374 http://openutils.svn.sourceforge.net/openutils/?rev=374&view=rev Author: fgiust Date: 2007-07-30 03:41:55 -0700 (Mon, 30 Jul 2007) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-deployment/pom.xml Modified: trunk/openutils-deployment/pom.xml =================================================================== --- trunk/openutils-deployment/pom.xml 2007-07-30 10:41:50 UTC (rev 373) +++ trunk/openutils-deployment/pom.xml 2007-07-30 10:41:55 UTC (rev 374) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-deployment</artifactId> <name>openutils deployment tools</name> - <version>1.0.8</version> + <version>1.0.9-SNAPSHOT</version> <description /> <dependencies> <dependency> @@ -67,10 +67,4 @@ <scope>test</scope> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-deployment-1.0.8</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-deployment-1.0.8</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-deployment-1.0.8</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...> - 2007-07-30 10:41:47
|
Revision: 373 http://openutils.svn.sourceforge.net/openutils/?rev=373&view=rev Author: fgiust Date: 2007-07-30 03:41:50 -0700 (Mon, 30 Jul 2007) Log Message: ----------- [maven-release-plugin] copy for tag openutils-deployment-1.0.8 Added Paths: ----------- tags/openutils-deployment-1.0.8/ tags/openutils-deployment-1.0.8/pom.xml Removed Paths: ------------- tags/openutils-deployment-1.0.8/pom.xml Copied: tags/openutils-deployment-1.0.8 (from rev 370, trunk/openutils-deployment) Deleted: tags/openutils-deployment-1.0.8/pom.xml =================================================================== --- trunk/openutils-deployment/pom.xml 2007-07-24 10:17:23 UTC (rev 370) +++ tags/openutils-deployment-1.0.8/pom.xml 2007-07-30 10:41:50 UTC (rev 373) @@ -1,71 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils</artifactId> - <version>3</version> - <relativePath>..</relativePath> - </parent> - <artifactId>openutils-deployment</artifactId> - <name>openutils deployment tools</name> - <version>1.0.8-SNAPSHOT</version> - <description /> - <dependencies> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.3</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>2.0.1</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> - <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-jdbc</artifactId> - <version>2.0.1</version> - <optional>true</optional> - <exclusions> - <exclusion> - <groupId>logkit</groupId> - <artifactId>logkit</artifactId> - </exclusion> - <exclusion> - <groupId>avalon-framework</groupId> - <artifactId>avalon-framework</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.2</version> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.4</version> - <scope>provided</scope> - <optional>true</optional> - </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-deployment-1.0.8/pom.xml (from rev 372, trunk/openutils-deployment/pom.xml) =================================================================== --- tags/openutils-deployment-1.0.8/pom.xml (rev 0) +++ tags/openutils-deployment-1.0.8/pom.xml 2007-07-30 10:41:50 UTC (rev 373) @@ -0,0 +1,76 @@ +<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>3</version> + <relativePath>..</relativePath> + </parent> + <artifactId>openutils-deployment</artifactId> + <name>openutils deployment tools</name> + <version>1.0.8</version> + <description /> + <dependencies> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + <version>2.0.1</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>logkit</groupId> + <artifactId>logkit</artifactId> + </exclusion> + <exclusion> + <groupId>avalon-framework</groupId> + <artifactId>avalon-framework</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-jdbc</artifactId> + <version>2.0.1</version> + <optional>true</optional> + <exclusions> + <exclusion> + <groupId>logkit</groupId> + <artifactId>logkit</artifactId> + </exclusion> + <exclusion> + <groupId>avalon-framework</groupId> + <artifactId>avalon-framework</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.2</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.4</version> + <scope>provided</scope> + <optional>true</optional> + </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-deployment-1.0.8</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-deployment-1.0.8</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-deployment-1.0.8</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...> - 2007-07-30 10:41:38
|
Revision: 372 http://openutils.svn.sourceforge.net/openutils/?rev=372&view=rev Author: fgiust Date: 2007-07-30 03:41:39 -0700 (Mon, 30 Jul 2007) Log Message: ----------- [maven-release-plugin] prepare release openutils-deployment-1.0.8 Modified Paths: -------------- trunk/openutils-deployment/pom.xml Modified: trunk/openutils-deployment/pom.xml =================================================================== --- trunk/openutils-deployment/pom.xml 2007-07-30 10:16:00 UTC (rev 371) +++ trunk/openutils-deployment/pom.xml 2007-07-30 10:41:39 UTC (rev 372) @@ -1,5 +1,4 @@ -<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"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>net.sourceforge.openutils</groupId> @@ -9,7 +8,7 @@ </parent> <artifactId>openutils-deployment</artifactId> <name>openutils deployment tools</name> - <version>1.0.8-SNAPSHOT</version> + <version>1.0.8</version> <description /> <dependencies> <dependency> @@ -68,4 +67,10 @@ <scope>test</scope> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-deployment-1.0.8</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-deployment-1.0.8</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-deployment-1.0.8</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...> - 2007-07-30 10:16:00
|
Revision: 371 http://openutils.svn.sourceforge.net/openutils/?rev=371&view=rev Author: fgiust Date: 2007-07-30 03:16:00 -0700 (Mon, 30 Jul 2007) Log Message: ----------- new module: magnolia/stripes integration Modified Paths: -------------- trunk/pom.xml Added Paths: ----------- trunk/openutils-mgnlstripes/ trunk/openutils-mgnlstripes/pom.xml trunk/openutils-mgnlstripes/src/ trunk/openutils-mgnlstripes/src/main/ trunk/openutils-mgnlstripes/src/main/java/ trunk/openutils-mgnlstripes/src/main/java/it/ trunk/openutils-mgnlstripes/src/main/java/it/openutils/ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRenderer.java trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphResponseWrapper.java trunk/openutils-mgnlstripes/src/main/resources/ trunk/openutils-mgnlstripes/src/main/resources/META-INF/ trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/ trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/stripes.xml trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/ trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/ trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.paragraph-renderers.stripes.xml trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.server.MIMEMapping.action.xml Property Changed: ---------------- trunk/openutils-parent/ trunk/openutils-testing-testng-dwr/ Property changes on: trunk/openutils-mgnlstripes ___________________________________________________________________ Name: svn:ignore + target Added: trunk/openutils-mgnlstripes/pom.xml =================================================================== --- trunk/openutils-mgnlstripes/pom.xml (rev 0) +++ trunk/openutils-mgnlstripes/pom.xml 2007-07-30 10:16:00 UTC (rev 371) @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils</artifactId> + <version>3</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + <packaging>jar</packaging> + <artifactId>openutils-mgnlstripes</artifactId> + <name>openutils-mgnlstripes</name> + <version>0.1-SNAPSHOT</version> + <licenses> + <license> + <name>GPL v3</name> + <url>http://www.gnu.org/licenses/gpl-3.0.txt</url> + </license> + </licenses> + <dependencies> + <dependency> + <groupId>net.sourceforge.stripes</groupId> + <artifactId>stripes</artifactId> + <version>1.4.3</version> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-core</artifactId> + <version>3.1-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-module-admininterface</artifactId> + <version>3.1-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.4</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + <version>2.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.testng</groupId> + <artifactId>testng</artifactId> + <classifier>jdk15</classifier> + <version>5.1</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> +</project> Property changes on: trunk/openutils-mgnlstripes/pom.xml ___________________________________________________________________ Name: svn:executable + * Added: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java (rev 0) +++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java 2007-07-30 10:16:00 UTC (rev 371) @@ -0,0 +1,79 @@ +package it.openutils.magnoliastripes; + +import info.magnolia.cms.beans.config.Paragraph; +import info.magnolia.cms.beans.config.ParagraphManager; +import net.sourceforge.stripes.action.ActionBean; +import net.sourceforge.stripes.controller.NameBasedActionResolver; + +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * ActionResolver that extends <code>NameBasedActionResolver</code>, registering any found Stripe action as a + * Magnolia paragraph. + * @author fgiust + * @version $Id: $ + */ +public class MgnlActionResolver extends NameBasedActionResolver +{ + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(MgnlActionResolver.class); + + /** + * {@inheritDoc} + */ + @Override + protected void addActionBean(Class< ? extends ActionBean> clazz) + { + String binding = getUrlBinding(clazz); + + // Only process the class if it's properly annotated + if (binding != null) + { + registerSpringParagraph(binding); + super.addActionBean(clazz); + } + } + + /** + * Registers a Magnolia paragraph which will delegate to a Stripe action. + * @param binding Stripes action binding + */ + @SuppressWarnings("unchecked") + private void registerSpringParagraph(String binding) + { + Paragraph paragraph = new Paragraph(); + + String dialogName = actionNameToParagraphName(binding); + + paragraph.setName(dialogName); + paragraph.setTitle("paragraph." + dialogName + ".title"); + paragraph.setDescription("paragraph." + dialogName + ".description"); + paragraph.setDialog(dialogName); + paragraph.setTemplatePath(binding); + paragraph.setType("stripes"); + + log.info("Registering stripes paragraph {}", paragraph.getName()); //$NON-NLS-1$ + ParagraphManager.getInstance().getParagraphs().put(paragraph.getName(), paragraph); + } + + /** + * Generate a paragraph name from a Stripes binding. This method will take the last token after "/", strip any + * extension and convert everything to lowercase. + * @param binding Stripe action binding + * @return paragraph name + */ + protected String actionNameToParagraphName(String binding) + { + String dialogName = StringUtils.lowerCase(StringUtils.substringBeforeLast(StringUtils.substringAfterLast( + binding, + "/"), ".")); + return dialogName; + } + +} Added: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java (rev 0) +++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java 2007-07-30 10:16:00 UTC (rev 371) @@ -0,0 +1,31 @@ +package it.openutils.magnoliastripes; + +import info.magnolia.cms.module.RegisterException; +import info.magnolia.module.admininterface.AbstractAdminModule; + + +/** + * Stripes module. Extends AbstractAdminModule which will take care of registering the Stripes paragraph renderer. + * @author fgiust + * @version $Id: $ + */ +public class StripesModule extends AbstractAdminModule +{ + + /** + * {@inheritDoc} + */ + @Override + public void onInit() + { + } + + /** + * {@inheritDoc} + */ + @Override + protected void onRegister(int registerState) throws RegisterException + { + // nothing to do + } +} \ No newline at end of file Added: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRenderer.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRenderer.java (rev 0) +++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRenderer.java 2007-07-30 10:16:00 UTC (rev 371) @@ -0,0 +1,333 @@ +package it.openutils.magnoliastripes; + +import info.magnolia.cms.beans.config.Paragraph; +import info.magnolia.cms.beans.runtime.ParagraphRenderer; +import info.magnolia.cms.core.Content; +import info.magnolia.cms.core.NodeData; +import info.magnolia.context.MgnlContext; +import info.magnolia.context.WebContext; + +import java.io.IOException; +import java.io.Writer; +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.Stack; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.jsp.PageContext; + +import net.sourceforge.stripes.action.ActionBeanContext; +import net.sourceforge.stripes.action.Resolution; +import net.sourceforge.stripes.config.Configuration; +import net.sourceforge.stripes.controller.DispatcherHelper; +import net.sourceforge.stripes.controller.DispatcherServlet; +import net.sourceforge.stripes.controller.ExecutionContext; +import net.sourceforge.stripes.controller.LifecycleStage; +import net.sourceforge.stripes.controller.StripesConstants; +import net.sourceforge.stripes.controller.StripesFilter; +import net.sourceforge.stripes.exception.StripesServletException; +import net.sourceforge.stripes.validation.BooleanTypeConverter; + +import org.apache.commons.lang.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * <p> + * A Magnolia paragraph renderer that delegates to Stripes actions. Most of the code is just a cut and paste from + * Stripes' {@link DispatcherServlet}, adapted to work withing magnolia by: + * </p> + * <ul> + * <li>wrap the request in order to modify the request path and provide a custom requestDispatcher</li> + * <li>wrap the response in order to provide a custom Writer</li> + * <li>use a fake servlet instance/context to setup a Stripe context (there is no servlet here)</li> + * <li>injiect any paragraph property as a parameter</li> + * </ul> + * <p> + * <strong>Todo:</strong> + * </p> + * <ul> + * <li>Handle multipart forms in request wrapper (should be easy to do)</li> + * <li>A better way of handling multivalued properties in paragraph</li> + * <li>Handle binary properties in paragraph</li> + * </ul> + * @author fgiust + * @version $Id: $ + */ +public class StripesParagraphRenderer implements ParagraphRenderer +{ + + private Boolean alwaysInvokeValidate; + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(StripesParagraphRenderer.class); + + /** + * <p> + * Invokes the following instance level methods in order to coordinate the processing of requests: + * </p> + * <ul> + * <li>{@link #resolveActionBean(ExecutionContext)}</li> + * <li>{@link #resolveHandler(ExecutionContext)}</li> + * <li>{@link #doBindingAndValidation(ExecutionContext)}</li> + * <li>{@link #doCustomValidation(ExecutionContext)}</li> + * <li>{@link #handleValidationErrors(ExecutionContext)}</li> + * <li>{@link #invokeEventHandler(ExecutionContext)}</li> + * </ul> + * <p> + * If any of the above methods return a {@link Resolution} the rest of the request processing is aborted and the + * resolution is executed. + * </p> + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + public void render(Content content, Paragraph paragraph, Writer out) throws IOException + { + // @fgiust start custom magnolia setup + + WebContext webContext = (WebContext) MgnlContext.getInstance(); + HttpServletResponse response = new StripesParagraphResponseWrapper(webContext.getResponse(), out); + + final String templatePath = paragraph.getTemplatePath(); + Map<String, String[]> nodeDataMap = contentToMap(content); + + HttpServletRequest request; + try + { + request = new StripesParagraphRequestWrapper( + ((WebContext) MgnlContext.getInstance()).getRequest(), + templatePath, + nodeDataMap); + + ((StripesParagraphRequestWrapper) request).setLocale(MgnlContext.getLocale()); + } + catch (StripesServletException e) + { + throw new RuntimeException(e); + } + + // @todo fgiust force include instead of forwarding. Not needed anymore since we are wrapping requestDispatcher? + request.setAttribute(StripesConstants.REQ_ATTR_INCLUDE_PATH, templatePath); + + PageContext pageContext = webContext.getPageContext(); + ServletContext servletContext = null; + + if (pageContext != null) + { + pageContext.getServletContext(); + } + // @fgiust end custom magnolia setup + + // It sucks that we have to do this here (in the request cycle), but there doesn't + // seem to be a good way to get at the Configuration from the Filter in init() + doOneTimeConfiguration(); + + log.debug("Dispatching request to URL: ", request.getRequestURI()); + + try + { + final Configuration config = StripesFilter.getConfiguration(); + + // First manufacture an ActionBeanContext + final ActionBeanContext context = config + .getActionBeanContextFactory() + .getContextInstance(request, response); + context.setServletContext(servletContext); + + // Then setup the ExecutionContext that we'll use to process this request + final ExecutionContext ctx = new ExecutionContext(); + ctx.setInterceptors(config.getInterceptors(LifecycleStage.ActionBeanResolution)); + ctx.setLifecycleStage(LifecycleStage.ActionBeanResolution); + ctx.setActionBeanContext(context); + + ActionBeanContext abc = ctx.getActionBeanContext(); + if (pageContext != null) + { + DispatcherHelper.setPageContext(pageContext); + } + + // Resolve the ActionBean, and if an interceptor returns a resolution, bail now + saveActionBean(request); + Resolution resolution = DispatcherHelper.resolveActionBean(ctx); + + if (resolution == null) + { + resolution = DispatcherHelper.resolveHandler(ctx); + + if (resolution == null) + { + // Then run binding and validation + resolution = DispatcherHelper.doBindingAndValidation(ctx, true); + + if (resolution == null) + { + // Then continue on to custom validation + resolution = DispatcherHelper.doCustomValidation(ctx, alwaysInvokeValidate); + + if (resolution == null) + { + // And then validation error handling + resolution = DispatcherHelper.handleValidationErrors(ctx); + + if (resolution == null) + { + // And finally(ish) invoking of the event handler + resolution = DispatcherHelper.invokeEventHandler(ctx); + + // If the event produced errors, fill them in + DispatcherHelper.fillInValidationErrors(ctx); + } + } + } + } + } + + // Whatever stage it came from, execute the resolution + if (resolution != null) + { + DispatcherHelper.executeResolution(ctx, resolution); + } + } + catch (RuntimeException re) + { + throw re; + } + catch (InvocationTargetException ite) + { + if (ite.getTargetException() instanceof RuntimeException) + { + throw (RuntimeException) ite.getTargetException(); + } + else + { + throw new RuntimeException("ActionBean execution threw an exception.", ite.getTargetException()); + } + } + catch (Exception e) + { + throw new RuntimeException("Exception encountered processing request.", e); + } + finally + { + + if (pageContext != null) + { + // *Don't* release the page context, if set it will be closed by the main magnolia template + // JspFactory.getDefaultFactory().releasePageContext(pageContext); + DispatcherHelper.setPageContext(null); + } + restoreActionBean(request); + } + } + + /** + * @param content paragraph node + * @return a map of Strings (converted nodedata) + */ + @SuppressWarnings("unchecked") + protected Map<String, String[]> contentToMap(Content content) + { + Collection<NodeData> paragraphsData = content.getNodeDataCollection(); + Map<String, String[]> nodeDataMap = new HashMap<String, String[]>(); + for (NodeData nodeData : paragraphsData) + { + String name = nodeData.getName(); + String value = nodeData.getString(); + if (name.startsWith("multiple")) + { + nodeDataMap.put(name, StringUtils.split(value, "\n")); + } + else + { + nodeDataMap.put(name, new String[]{value }); + } + } + return nodeDataMap; + } + + /** + * Performs a simple piece of one time configuration that requires access to the Configuration object delivered + * through the Stripes Filter. + */ + private void doOneTimeConfiguration() + { + if (alwaysInvokeValidate == null) + { + // Check to see if, in this application, validate() methods should always be run + // even when validation errors already exist + String callValidateWhenErrorsExist = StripesFilter + .getConfiguration() + .getBootstrapPropertyResolver() + .getProperty(DispatcherServlet.RUN_CUSTOM_VALIDATION_WHEN_ERRORS); + + if (callValidateWhenErrorsExist != null) + { + BooleanTypeConverter c = new BooleanTypeConverter(); + this.alwaysInvokeValidate = c.convert(callValidateWhenErrorsExist, Boolean.class, null); + } + else + { + this.alwaysInvokeValidate = false; // Default behaviour + } + } + } + + /** + * Fetches, and lazily creates if required, a Stack in the request to store ActionBeans should the current request + * involve forwards or includes to other ActionBeans. + * @param request the current HttpServletRequest + * @param create create a Stack if not already set + * @return the Stack if present, or if creation is requested + */ + @SuppressWarnings("unchecked") + protected Stack getActionBeanStack(HttpServletRequest request, boolean create) + { + Stack stack = (Stack) request.getAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN_STACK); + if (stack == null && create) + { + stack = new Stack(); + request.setAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN_STACK, stack); + } + + return stack; + } + + /** + * Saves the current value of the 'actionBean' attribute in the request so that it can be restored at a later date + * by calling {@link #restoreActionBean(HttpServletRequest)}. If no ActionBean is currently stored in the request, + * nothing is changed. + * @param request the current HttpServletRequest + */ + @SuppressWarnings("unchecked") + protected void saveActionBean(HttpServletRequest request) + { + if (request.getAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN) != null) + { + Stack stack = getActionBeanStack(request, true); + stack.push(request.getAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN)); + } + } + + /** + * Restores the previous value of the 'actionBean' attribute in the request. If no ActionBeans have been saved using + * {@link #saveActionBean(HttpServletRequest)} then this method has no effect. + * @param request the current HttpServletRequest + */ + @SuppressWarnings("unchecked") + protected void restoreActionBean(HttpServletRequest request) + { + Stack stack = getActionBeanStack(request, false); + if (stack != null && !stack.empty()) + { + request.setAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN, stack.pop()); + } + } + +} Added: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java (rev 0) +++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java 2007-07-30 10:16:00 UTC (rev 371) @@ -0,0 +1,174 @@ +package it.openutils.magnoliastripes; + +import info.magnolia.context.MgnlContext; +import info.magnolia.context.WebContext; + +import java.io.IOException; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.Locale; +import java.util.Map; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; + +import net.sourceforge.stripes.controller.StripesRequestWrapper; +import net.sourceforge.stripes.exception.StripesServletException; + + +/** + * Magnolia request wrapper for Stripes actions. + * @author fgiust + * @version $Id: $ + */ +class StripesParagraphRequestWrapper extends StripesRequestWrapper +{ + + /** + * Hacked servlet path. + */ + private String servletPath; + + /** + * Parameter map. + */ + private Map<String, String[]> parameterMap; + + /** + * Instantiate a new request wrapper. + * @param request original HttpServletRequest + * @param servletPath modified servlet path (matches Stripes binding) + * @param paragraphsData map containing paragraph attributes + * @throws StripesServletException if any other error occurs constructing the wrapper + */ + @SuppressWarnings("unchecked") + public StripesParagraphRequestWrapper( + HttpServletRequest request, + String servletPath, + Map<String, String[]> paragraphsData) throws StripesServletException + { + super(request); + this.servletPath = servletPath; + + parameterMap = new Hashtable<String, String[]>(); + parameterMap.putAll(request.getParameterMap()); + parameterMap.putAll(paragraphsData); + } + + /** + * {@inheritDoc} + */ + @Override + public String getServletPath() + { + return servletPath; + } + + /** + * {@inheritDoc} + */ + @Override + protected void setLocale(Locale locale) + { + super.setLocale(locale); + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + public Enumeration<String> getParameterNames() + { + return ((Hashtable) parameterMap).keys(); + } + + /** + * {@inheritDoc} + */ + @Override + public String[] getParameterValues(String name) + { + return parameterMap.get(name); + } + + /** + * {@inheritDoc} + */ + @Override + public Map<String, String[]> getParameterMap() + { + + return parameterMap; + } + + /** + * {@inheritDoc} + */ + @Override + public String getParameter(String name) + { + String[] values = getParameterValues(name); + if (values != null && values.length > 0) + { + return values[0]; + } + else + { + return null; + } + } + + /** + * {@inheritDoc} + */ + @Override + public RequestDispatcher getRequestDispatcher(String path) + { + return new MagnoliaRequestDispatcher(path); + } + + /** + * A {@link RequestDispatcher} that uses {@link WebContext} for including a resource. + * @author fgiust + * @version $Id: $ + */ + private static class MagnoliaRequestDispatcher implements RequestDispatcher + { + + /** + * The url this RequestDispatcher is bound to. + */ + private String url; + + /** + * Created a new MagnoliaRequestDispatcher for the given url. + * @param url url passed to {@link HttpServletRequest#getRequestDispatcher()} + */ + public MagnoliaRequestDispatcher(String url) + { + this.url = url; + } + + /** + * {@inheritDoc} + */ + @Override + public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException + { + ((WebContext) MgnlContext.getInstance()).include(url, response.getWriter()); + } + + /** + * {@inheritDoc} + */ + @Override + public void include(ServletRequest request, ServletResponse response) throws ServletException, IOException + { + ((WebContext) MgnlContext.getInstance()).include(url, response.getWriter()); + } + } +} \ No newline at end of file Added: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphResponseWrapper.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphResponseWrapper.java (rev 0) +++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphResponseWrapper.java 2007-07-30 10:16:00 UTC (rev 371) @@ -0,0 +1,43 @@ +package it.openutils.magnoliastripes; + +import java.io.IOException; +import java.io.PrintWriter; +import java.io.Writer; + +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpServletResponseWrapper; + + +/** + * A response wrapper for the Stripes paragraph (replace the standard writer with the Magnolia one). + * @author fgiust + * @version $Id: $ + */ +class StripesParagraphResponseWrapper extends HttpServletResponseWrapper +{ + + /** + * Writer that should be used for output. + */ + private PrintWriter out; + + /** + * @param response HttpServletResponse + * @param out writer guven by Magnolia. + */ + public StripesParagraphResponseWrapper(HttpServletResponse response, Writer out) + { + super(response); + this.out = new PrintWriter(out); + } + + /** + * {@inheritDoc} + */ + @Override + public PrintWriter getWriter() throws IOException + { + return out; + } + +} \ No newline at end of file Added: trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/stripes.xml =================================================================== --- trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/stripes.xml (rev 0) +++ trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/stripes.xml 2007-07-30 10:16:00 UTC (rev 371) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE module SYSTEM "module.dtd"> +<module> + <name>stripes</name> + <displayName>stripes</displayName> + <description>Stripes integration module</description> + <class>it.openutils.magnoliastripes.StripesModule</class> + <version>0.1</version> +</module> Added: trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.paragraph-renderers.stripes.xml =================================================================== --- trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.paragraph-renderers.stripes.xml (rev 0) +++ trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.paragraph-renderers.stripes.xml 2007-07-30 10:16:00 UTC (rev 371) @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="stripes" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mgnl="http://www.magnolia.info/jcr/mgnl" + xmlns:rep="internal" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" + xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:jcrfn="http://www.jcp.org/jcr/xpath-functions/1.0"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> + <sv:value>mix:versionable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>42369a0d-1d6c-469b-b17d-dc5171435db9</sv:value> + </sv:property> + <sv:property sv:name="name" sv:type="String"> + <sv:value>stripes</sv:value> + </sv:property> + <sv:property sv:name="class" sv:type="String"> + <sv:value>it.openutils.magnoliastripes.StripesParagraphRenderer</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>fd0eff1b-ba74-4c6e-ab93-b8a344175495</sv:value> + </sv:property> + <sv:property sv:name="mgnl:authorid" sv:type="String"> + <sv:value>superuser</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="Date"> + <sv:value>2007-04-12T03:58:33.504+02:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastaction" sv:type="Date"> + <sv:value>2007-07-23T22:39:14.178+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2007-07-23T22:39:40.986+01:00</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:activated" sv:type="Boolean"> + <sv:value>false</sv:value> + </sv:property> + </sv:node> +</sv:node> Added: trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.server.MIMEMapping.action.xml =================================================================== --- trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.server.MIMEMapping.action.xml (rev 0) +++ trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.server.MIMEMapping.action.xml 2007-07-30 10:16:00 UTC (rev 371) @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sv:node sv:name="action" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mgnl="http://www.magnolia.info/jcr/mgnl" + xmlns:rep="internal" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" + xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:jcrfn="http://www.jcp.org/jcr/xpath-functions/1.0"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:contentNode</sv:value> + </sv:property> + <sv:property sv:name="jcr:mixinTypes" sv:type="Name"> + <sv:value>mix:versionable</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>c0a3cfb0-2f94-4924-8da2-0f152c825891</sv:value> + </sv:property> + <sv:property sv:name="icon" sv:type="String"> + <sv:value>/.resources/file-icons/htm.png</sv:value> + </sv:property> + <sv:property sv:name="mime-type" sv:type="String"> + <sv:value>text/html</sv:value> + </sv:property> + <sv:node sv:name="MetaData"> + <sv:property sv:name="jcr:primaryType" sv:type="Name"> + <sv:value>mgnl:metaData</sv:value> + </sv:property> + <sv:property sv:name="jcr:uuid" sv:type="String"> + <sv:value>11cf3c7b-3a09-4983-8761-867a1a8cdd14</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:lastaction" sv:type="Date"> + <sv:value>2007-07-29T20:52:47.861+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:creationdate" sv:type="String"> + <sv:value>2004-11-02T15:34:17.212+01:00</sv:value> + </sv:property> + <sv:property sv:name="mgnl:lastmodified" sv:type="Date"> + <sv:value>2007-07-29T20:52:47.928+01:00</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: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:node> +</sv:node> Property changes on: trunk/openutils-parent ___________________________________________________________________ Name: svn:ignore - target .project + target .project .settings Property changes on: trunk/openutils-testing-testng-dwr ___________________________________________________________________ Name: svn:ignore + .settings target .checkstyle .classpath .project Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-07-24 10:17:23 UTC (rev 370) +++ trunk/pom.xml 2007-07-30 10:16:00 UTC (rev 371) @@ -170,5 +170,7 @@ <module>openutils-backup</module> <module>openutils-configuration-dataobjects</module> <module>openutils-configuration-services</module> + <module>openutils-mgnlspring</module> + <module>openutils-mgnlstripes</module> </modules> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |