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: <fc...@us...> - 2007-08-31 12:27:20
|
Revision: 420 http://openutils.svn.sourceforge.net/openutils/?rev=420&view=rev Author: fcarone Date: 2007-08-31 05:27:18 -0700 (Fri, 31 Aug 2007) Log Message: ----------- [maven-release-plugin] copy for tag openutils-testing-junit-1.1.2 Added Paths: ----------- tags/openutils-testing-junit-1.1.2/ tags/openutils-testing-junit-1.1.2/pom.xml tags/openutils-testing-junit-1.1.2/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java Removed Paths: ------------- tags/openutils-testing-junit-1.1.2/pom.xml tags/openutils-testing-junit-1.1.2/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java Copied: tags/openutils-testing-junit-1.1.2 (from rev 412, trunk/openutils-testing-junit) Deleted: tags/openutils-testing-junit-1.1.2/pom.xml =================================================================== --- trunk/openutils-testing-junit/pom.xml 2007-08-30 15:40:19 UTC (rev 412) +++ tags/openutils-testing-junit-1.1.2/pom.xml 2007-08-31 12:27:18 UTC (rev 420) @@ -1,62 +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-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 Copied: tags/openutils-testing-junit-1.1.2/pom.xml (from rev 419, trunk/openutils-testing-junit/pom.xml) =================================================================== --- tags/openutils-testing-junit-1.1.2/pom.xml (rev 0) +++ tags/openutils-testing-junit-1.1.2/pom.xml 2007-08-31 12:27:18 UTC (rev 420) @@ -0,0 +1,67 @@ +<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</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> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-junit-1.1.2</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-junit-1.1.2</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-junit-1.1.2</url> + </scm> +</project> \ No newline at end of file Deleted: tags/openutils-testing-junit-1.1.2/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java =================================================================== --- trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2007-08-30 15:40:19 UTC (rev 412) +++ tags/openutils-testing-junit-1.1.2/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2007-08-31 12:27:18 UTC (rev 420) @@ -1,257 +0,0 @@ -/* - * Copyright 2005 Fabrizio Giustina. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package it.openutils.testing.junit; - -import java.io.InputStream; -import java.util.Map; - -import javax.sql.DataSource; - -import org.apache.commons.lang.ClassUtils; -import org.apache.commons.lang.StringUtils; -import org.dbunit.database.DatabaseConnection; -import org.dbunit.database.DatabaseSequenceFilter; -import org.dbunit.database.IDatabaseConnection; -import org.dbunit.dataset.DataSetException; -import org.dbunit.dataset.FilteredDataSet; -import org.dbunit.dataset.IDataSet; -import org.dbunit.dataset.excel.XlsDataSet; -import org.dbunit.dataset.filter.AbstractTableFilter; -import org.dbunit.dataset.filter.ITableFilter; -import org.dbunit.dataset.filter.SequenceTableFilter; -import org.dbunit.dataset.xml.XmlDataSet; -import org.dbunit.ext.mssql.InsertIdentityOperation; -import org.dbunit.operation.DatabaseOperation; -import org.hibernate.SessionFactory; -import org.springframework.orm.hibernate3.SessionHolder; -import org.springframework.transaction.support.TransactionSynchronizationManager; - - -/** - * Base class for running DAO tests. - * @author fgiust - * @version $Revision $ ($Author $) - */ -public abstract class DbUnitTestCase extends SpringTestCase -{ - - /** - * Hibernate session factory. - */ - private SessionFactory sessionFactory; - - private static final String BASETEST_DELETE = "/_BaseDAOTest-delete.xml"; - - protected static IDataSet truncateDataSet; - - /** - * Should use deferred close emulating the spring OpenSessionInView filter? Default is <code>true</code> - * @return <code>true</code> if deferred close should be used - */ - protected boolean mimicSessionFilter() - { - return true; - } - - /** - * Returns the table filter that will be used to exclude certain tables from sort/deletion. This may be overridden - * by subclasses, and is needed when tables have circular references (not handled by dbunit DatabaseSequenceFilter) - * @return an <code>ITableFilter</code> - */ - protected ITableFilter getTableFilter() - { - return new AbstractTableFilter() - { - - @Override - public boolean isValidName(String tableName) throws DataSetException - { - // default excludes: - // $ = oracle recycle bin tables - // JBPM = jbpm tables, with circular references - return !StringUtils.contains(tableName, "$") && !StringUtils.contains(tableName, "JBPM"); - } - }; - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - @Override - protected void setUp() throws Exception - { - super.setUp(); - - // insert values - IDataSet dataSet = null; - - String datesetFileName = "/" + ClassUtils.getShortClassName(getClass()) + "-load.xml"; - InputStream testData = getClass().getResourceAsStream(datesetFileName); - - if (testData != null) - { - if (log.isDebugEnabled()) - { - log.debug("loading dataset {}", datesetFileName); - } - - dataSet = new XmlDataSet(testData); - } - else - { - // check for excel - datesetFileName = "/" + ClassUtils.getShortClassName(getClass()) + "-load.xls"; - testData = getClass().getResourceAsStream(datesetFileName); - - if (testData != null) - { - if (log.isDebugEnabled()) - { - log.debug("loading dataset {}", datesetFileName); - } - - dataSet = new XlsDataSet(testData); - } - } - - if (dataSet == null) - { - log.debug("No test data found with name [{}]", datesetFileName); - } - else - { - - DataSource dataSource = (DataSource) ctx.getBean("dataSource"); - IDatabaseConnection connection = new DatabaseConnection(dataSource.getConnection()); - - // truncate common tables - if (truncateDataSet == null) - { - log.debug("Generating sorted dataset for initial cleanup"); - IDataSet unsortedTruncateDataSet = connection.createDataSet(); - - ITableFilter filter = new DatabaseSequenceFilter(connection, new FilteredDataSet( - getTableFilter(), - unsortedTruncateDataSet).getTableNames()); - truncateDataSet = new FilteredDataSet(filter, unsortedTruncateDataSet); - truncateDataSet = new FilteredDataSet(getTableFilter(), truncateDataSet); - log.debug("Sorted dataset generated"); - } - - IDataSet orderedDataset = dataSet; - - // if a sorted dataset is available, use table sequence for sorting - if (truncateDataSet != null) - { - ITableFilter filter = new SequenceTableFilter(truncateDataSet.getTableNames()); - orderedDataset = new FilteredDataSet(filter, dataSet); - } - - try - { - if (truncateDataSet != null) - { - DatabaseOperation.DELETE_ALL.execute(connection, truncateDataSet); - } - if (dataSet != null) - { - InsertIdentityOperation.INSERT.execute(connection, orderedDataset); - } - } - finally - { - connection.close(); - } - } - - // mimic the Spring OpenSessionInViewFilter - if (mimicSessionFilter()) - { - Map<String, SessionFactory> sfbeans = ctx.getBeansOfType(SessionFactory.class); - if (sfbeans.isEmpty()) - { - fail("No bean of type org.hibernate.SessionFactory found in spring context"); - } - this.sessionFactory = sfbeans.get(sfbeans.keySet().iterator().next()); - - TransactionSynchronizationManager.bindResource(this.getSessionFactory(), new SessionHolder(this - .getSessionFactory() - .openSession())); - } - - } - - /** - * {@inheritDoc} - */ - @Override - protected void tearDown() throws Exception - { - if (mimicSessionFilter()) - { - // close open hibernate sessions, mimic the OpenSessionInViewFilter - if (TransactionSynchronizationManager.hasResource(this.getSessionFactory())) - { - TransactionSynchronizationManager.unbindResource(this.getSessionFactory()); - } - } - - // regenerate db initial state - String datesetFileName = "/initial-load.xml"; - InputStream testData = getClass().getResourceAsStream(datesetFileName); - - if (testData != null) - { - log.debug("Restoring db state"); - - IDataSet dataSet = new XmlDataSet(testData); - - DataSource dataSource = (DataSource) ctx.getBean("dataSource"); - IDatabaseConnection connection = new DatabaseConnection(dataSource.getConnection()); - - try - { - DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet); - } - finally - { - connection.close(); - } - } - - super.tearDown(); - } - - /** - * Returns the full test name. - * @see junit.framework.TestCase#getName() - */ - @Override - public String getName() - { - return ClassUtils.getShortClassName(this.getClass()) + "::" + super.getName(); - } - - /** - * return the current Hibernate SessionFactory - * @return SessionFactory object - */ - protected SessionFactory getSessionFactory() - { - return sessionFactory; - } -} \ No newline at end of file Copied: tags/openutils-testing-junit-1.1.2/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java (from rev 418, trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java) =================================================================== --- tags/openutils-testing-junit-1.1.2/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java (rev 0) +++ tags/openutils-testing-junit-1.1.2/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2007-08-31 12:27:18 UTC (rev 420) @@ -0,0 +1,267 @@ +/* + * Copyright 2005 Fabrizio Giustina. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package it.openutils.testing.junit; + +import java.io.InputStream; +import java.sql.SQLException; +import java.util.Map; + +import javax.sql.DataSource; + +import org.apache.commons.lang.ClassUtils; +import org.apache.commons.lang.StringUtils; +import org.dbunit.database.DatabaseConnection; +import org.dbunit.database.DatabaseSequenceFilter; +import org.dbunit.database.IDatabaseConnection; +import org.dbunit.dataset.DataSetException; +import org.dbunit.dataset.FilteredDataSet; +import org.dbunit.dataset.IDataSet; +import org.dbunit.dataset.excel.XlsDataSet; +import org.dbunit.dataset.filter.AbstractTableFilter; +import org.dbunit.dataset.filter.ITableFilter; +import org.dbunit.dataset.filter.SequenceTableFilter; +import org.dbunit.dataset.xml.XmlDataSet; +import org.dbunit.ext.mssql.InsertIdentityOperation; +import org.dbunit.operation.DatabaseOperation; +import org.hibernate.SessionFactory; +import org.springframework.orm.hibernate3.SessionHolder; +import org.springframework.transaction.support.TransactionSynchronizationManager; + + +/** + * Base class for running DAO tests. + * @author fgiust + * @version $Revision $ ($Author $) + */ +public abstract class DbUnitTestCase extends SpringTestCase +{ + + /** + * Hibernate session factory. + */ + private SessionFactory sessionFactory; + + private static final String BASETEST_DELETE = "/_BaseDAOTest-delete.xml"; + + protected static IDataSet truncateDataSet; + + /** + * Should use deferred close emulating the spring OpenSessionInView filter? Default is <code>true</code> + * @return <code>true</code> if deferred close should be used + */ + protected boolean mimicSessionFilter() + { + return true; + } + + /** + * Returns the table filter that will be used to exclude certain tables from sort/deletion. This may be overridden + * by subclasses, and is needed when tables have circular references (not handled by dbunit DatabaseSequenceFilter) + * @return an <code>ITableFilter</code> + */ + protected ITableFilter getTableFilter() + { + return new AbstractTableFilter() + { + + @Override + public boolean isValidName(String tableName) throws DataSetException + { + // default excludes: + // $ = oracle recycle bin tables + // JBPM = jbpm tables, with circular references + return !StringUtils.contains(tableName, "$") && !StringUtils.contains(tableName, "JBPM"); + } + }; + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + protected void setUp() throws Exception + { + super.setUp(); + + // insert values + IDataSet dataSet = null; + + String datesetFileName = "/" + ClassUtils.getShortClassName(getClass()) + "-load.xml"; + InputStream testData = getClass().getResourceAsStream(datesetFileName); + + if (testData != null) + { + if (log.isDebugEnabled()) + { + log.debug("loading dataset {}", datesetFileName); + } + + dataSet = new XmlDataSet(testData); + } + else + { + // check for excel + datesetFileName = "/" + ClassUtils.getShortClassName(getClass()) + "-load.xls"; + testData = getClass().getResourceAsStream(datesetFileName); + + if (testData != null) + { + if (log.isDebugEnabled()) + { + log.debug("loading dataset {}", datesetFileName); + } + + dataSet = new XlsDataSet(testData); + } + } + + if (dataSet == null) + { + log.debug("No test data found with name [{}]", datesetFileName); + } + else + { + + IDatabaseConnection connection = createConnection(); + + // truncate common tables + if (truncateDataSet == null) + { + log.debug("Generating sorted dataset for initial cleanup"); + IDataSet unsortedTruncateDataSet = connection.createDataSet(); + + ITableFilter filter = new DatabaseSequenceFilter(connection, new FilteredDataSet( + getTableFilter(), + unsortedTruncateDataSet).getTableNames()); + truncateDataSet = new FilteredDataSet(filter, unsortedTruncateDataSet); + truncateDataSet = new FilteredDataSet(getTableFilter(), truncateDataSet); + log.debug("Sorted dataset generated"); + } + + IDataSet orderedDataset = dataSet; + + // if a sorted dataset is available, use table sequence for sorting + if (truncateDataSet != null) + { + ITableFilter filter = new SequenceTableFilter(truncateDataSet.getTableNames()); + orderedDataset = new FilteredDataSet(filter, dataSet); + } + + try + { + if (truncateDataSet != null) + { + DatabaseOperation.DELETE_ALL.execute(connection, truncateDataSet); + } + if (dataSet != null) + { + InsertIdentityOperation.INSERT.execute(connection, orderedDataset); + } + } + finally + { + connection.close(); + } + } + + // mimic the Spring OpenSessionInViewFilter + if (mimicSessionFilter()) + { + Map<String, SessionFactory> sfbeans = ctx.getBeansOfType(SessionFactory.class); + if (sfbeans.isEmpty()) + { + fail("No bean of type org.hibernate.SessionFactory found in spring context"); + } + this.sessionFactory = sfbeans.get(sfbeans.keySet().iterator().next()); + + TransactionSynchronizationManager.bindResource(this.getSessionFactory(), new SessionHolder(this + .getSessionFactory() + .openSession())); + } + + } + + /** + * {@inheritDoc} + */ + @Override + protected void tearDown() throws Exception + { + if (mimicSessionFilter()) + { + // close open hibernate sessions, mimic the OpenSessionInViewFilter + if (TransactionSynchronizationManager.hasResource(this.getSessionFactory())) + { + TransactionSynchronizationManager.unbindResource(this.getSessionFactory()); + } + } + + // regenerate db initial state + String datesetFileName = "/initial-load.xml"; + InputStream testData = getClass().getResourceAsStream(datesetFileName); + + if (testData != null) + { + log.debug("Restoring db state"); + + IDataSet dataSet = new XmlDataSet(testData); + + DataSource dataSource = (DataSource) ctx.getBean("dataSource"); + IDatabaseConnection connection = new DatabaseConnection(dataSource.getConnection()); + + try + { + DatabaseOperation.CLEAN_INSERT.execute(connection, dataSet); + } + finally + { + connection.close(); + } + } + + super.tearDown(); + } + + /** + * Returns the full test name. + * @see junit.framework.TestCase#getName() + */ + @Override + public String getName() + { + return ClassUtils.getShortClassName(this.getClass()) + "::" + super.getName(); + } + + /** + * @return The IDatabase connection to use to insert data + * @throws SQLException Thrown on any database connection error + */ + protected IDatabaseConnection createConnection() throws SQLException + { + DataSource dataSource = (DataSource) ctx.getBean("dataSource"); + return new DatabaseConnection(dataSource.getConnection()); + } + + /** + * return the current Hibernate SessionFactory + * @return SessionFactory object + */ + protected SessionFactory getSessionFactory() + { + return sessionFactory; + } +} \ 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-31 12:27:10
|
Revision: 419 http://openutils.svn.sourceforge.net/openutils/?rev=419&view=rev Author: fcarone Date: 2007-08-31 05:27:06 -0700 (Fri, 31 Aug 2007) Log Message: ----------- [maven-release-plugin] prepare release openutils-testing-junit-1.1.2 Modified Paths: -------------- trunk/openutils-testing-junit/pom.xml Modified: trunk/openutils-testing-junit/pom.xml =================================================================== --- trunk/openutils-testing-junit/pom.xml 2007-08-31 12:26:10 UTC (rev 418) +++ trunk/openutils-testing-junit/pom.xml 2007-08-31 12:27:06 UTC (rev 419) @@ -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-testing-junit</artifactId> <name>openutils test utils (junit)</name> - <version>1.1.2-SNAPSHOT</version> + <version>1.1.2</version> <description>openutils test utils</description> <properties> <spring.version>2.0.6</spring.version> @@ -59,4 +58,10 @@ <version>3.8.1</version> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-junit-1.1.2</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-testing-junit-1.1.2</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-testing-junit-1.1.2</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: <fc...@us...> - 2007-08-31 12:26:14
|
Revision: 418 http://openutils.svn.sourceforge.net/openutils/?rev=418&view=rev Author: fcarone Date: 2007-08-31 05:26:10 -0700 (Fri, 31 Aug 2007) Log Message: ----------- getConnection method added to allow user connection configuration Modified Paths: -------------- trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java Modified: trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java =================================================================== --- trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2007-08-31 12:25:26 UTC (rev 417) +++ trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2007-08-31 12:26:10 UTC (rev 418) @@ -16,6 +16,7 @@ package it.openutils.testing.junit; import java.io.InputStream; +import java.sql.SQLException; import java.util.Map; import javax.sql.DataSource; @@ -135,8 +136,7 @@ else { - DataSource dataSource = (DataSource) ctx.getBean("dataSource"); - IDatabaseConnection connection = new DatabaseConnection(dataSource.getConnection()); + IDatabaseConnection connection = createConnection(); // truncate common tables if (truncateDataSet == null) @@ -204,7 +204,7 @@ if (mimicSessionFilter()) { // close open hibernate sessions, mimic the OpenSessionInViewFilter - if (TransactionSynchronizationManager.hasResource(this.getSessionFactory())) + if (TransactionSynchronizationManager.hasResource(this.getSessionFactory())) { TransactionSynchronizationManager.unbindResource(this.getSessionFactory()); } @@ -247,6 +247,16 @@ } /** + * @return The IDatabase connection to use to insert data + * @throws SQLException Thrown on any database connection error + */ + protected IDatabaseConnection createConnection() throws SQLException + { + DataSource dataSource = (DataSource) ctx.getBean("dataSource"); + return new DatabaseConnection(dataSource.getConnection()); + } + + /** * return the current Hibernate SessionFactory * @return SessionFactory object */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-31 12:25:25
|
Revision: 417 http://openutils.svn.sourceforge.net/openutils/?rev=417&view=rev Author: fcarone Date: 2007-08-31 05:25:26 -0700 (Fri, 31 Aug 2007) Log Message: ----------- minor fix Modified Paths: -------------- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java Modified: trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java =================================================================== --- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2007-08-31 09:44:29 UTC (rev 416) +++ trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2007-08-31 12:25:26 UTC (rev 417) @@ -435,7 +435,6 @@ { return (List< ? >) getHibernateTemplate().execute(new HibernateCallback() { - public Object doInHibernate(Session ses) throws HibernateException { Query q = ses.getNamedQuery(name); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-31 09:44:32
|
Revision: 416 http://openutils.svn.sourceforge.net/openutils/?rev=416&view=rev Author: fcarone Date: 2007-08-31 02:44:29 -0700 (Fri, 31 Aug 2007) Log Message: ----------- missing methods added Modified Paths: -------------- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java Modified: trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java =================================================================== --- trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2007-08-31 09:18:39 UTC (rev 415) +++ trunk/openutils-bshd5/src/main/java/it/openutils/dao/hibernate/HibernateDAOImpl.java 2007-08-31 09:44:29 UTC (rev 416) @@ -168,6 +168,37 @@ /** * {@inheritDoc} */ + @SuppressWarnings("unchecked") + public List<T> findAll(final Order[] orderProperties, final List<Criterion> criteria) + { + return (List<T>) getHibernateTemplate().execute(new HibernateCallback() + { + + public Object doInHibernate(Session ses) throws HibernateException + { + Criteria crit = ses.createCriteria(getReferenceClass()); + if (null != orderProperties) + { + for (int j = 0; j < orderProperties.length; j++) + { + crit.addOrder(orderProperties[j]); + } + + } + if (criteria != null) + { + for (Criterion criterion : criteria) + { + crit.add(criterion); + } + } + return crit.list(); + } + }); + } + /** + * {@inheritDoc} + */ public List<T> find(String query, Object obj, Type type) { return find(query, new Object[]{obj }, new Type[]{type }); @@ -309,6 +340,14 @@ /** * {@inheritDoc} */ + public T findFilteredFirst(final T filter, List<Criterion> criteria) + { + return getFirstInCollection(findFiltered(filter, null, getDefaultFilterMetadata(), 1, 0, criteria)); + } + + /** + * {@inheritDoc} + */ public List<T> findFiltered(final T filter) { return findFiltered(filter, getDefaultFilterMetadata()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fc...@us...> - 2007-08-31 09:18:41
|
Revision: 415 http://openutils.svn.sourceforge.net/openutils/?rev=415&view=rev Author: fcarone Date: 2007-08-31 02:18:39 -0700 (Fri, 31 Aug 2007) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-bshd5/pom.xml Modified: trunk/openutils-bshd5/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2007-08-31 09:18:28 UTC (rev 414) +++ trunk/openutils-bshd5/pom.xml 2007-08-31 09:18:39 UTC (rev 415) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-bshd5</artifactId> <name>openutils base Spring-Hibernate DAO for java 5.0</name> - <version>1.0.6</version> + <version>1.0.7-SNAPSHOT</version> <description>openutils base Spring-Hibernate DAO for java 5.0</description> <properties> <spring.version>2.0.6</spring.version> @@ -51,10 +51,4 @@ <optional>true</optional> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-1.0.6</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-1.0.6</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-bshd5-1.0.6</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: <fc...@us...> - 2007-08-31 09:18:30
|
Revision: 414 http://openutils.svn.sourceforge.net/openutils/?rev=414&view=rev Author: fcarone Date: 2007-08-31 02:18:28 -0700 (Fri, 31 Aug 2007) Log Message: ----------- [maven-release-plugin] copy for tag openutils-bshd5-1.0.6 Added Paths: ----------- tags/openutils-bshd5-1.0.6/ tags/openutils-bshd5-1.0.6/pom.xml Removed Paths: ------------- tags/openutils-bshd5-1.0.6/pom.xml Copied: tags/openutils-bshd5-1.0.6 (from rev 412, trunk/openutils-bshd5) Deleted: tags/openutils-bshd5-1.0.6/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2007-08-30 15:40:19 UTC (rev 412) +++ tags/openutils-bshd5-1.0.6/pom.xml 2007-08-31 09:18:28 UTC (rev 414) @@ -1,55 +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-bshd5</artifactId> - <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>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-aop</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate</artifactId> - <version>3.2.1.ga</version> - </dependency> - <dependency> - <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> - <version>1.7.0</version> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.3</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>1.2</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <optional>true</optional> - </dependency> - </dependencies> -</project> \ No newline at end of file Copied: tags/openutils-bshd5-1.0.6/pom.xml (from rev 413, trunk/openutils-bshd5/pom.xml) =================================================================== --- tags/openutils-bshd5-1.0.6/pom.xml (rev 0) +++ tags/openutils-bshd5-1.0.6/pom.xml 2007-08-31 09:18:28 UTC (rev 414) @@ -0,0 +1,60 @@ +<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-bshd5</artifactId> + <name>openutils base Spring-Hibernate DAO for java 5.0</name> + <version>1.0.6</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>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-aop</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate</artifactId> + <version>3.2.1.ga</version> + </dependency> + <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + <version>1.7.0</version> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.3</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.2</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <optional>true</optional> + </dependency> + </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-1.0.6</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-1.0.6</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-bshd5-1.0.6</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: <fc...@us...> - 2007-08-31 09:18:13
|
Revision: 413 http://openutils.svn.sourceforge.net/openutils/?rev=413&view=rev Author: fcarone Date: 2007-08-31 02:18:12 -0700 (Fri, 31 Aug 2007) Log Message: ----------- [maven-release-plugin] prepare release openutils-bshd5-1.0.6 Modified Paths: -------------- trunk/openutils-bshd5/pom.xml Modified: trunk/openutils-bshd5/pom.xml =================================================================== --- trunk/openutils-bshd5/pom.xml 2007-08-30 15:40:19 UTC (rev 412) +++ trunk/openutils-bshd5/pom.xml 2007-08-31 09:18:12 UTC (rev 413) @@ -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-bshd5</artifactId> <name>openutils base Spring-Hibernate DAO for java 5.0</name> - <version>1.0.6-SNAPSHOT</version> + <version>1.0.6</version> <description>openutils base Spring-Hibernate DAO for java 5.0</description> <properties> <spring.version>2.0.6</spring.version> @@ -52,4 +51,10 @@ <optional>true</optional> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-1.0.6</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-bshd5-1.0.6</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-bshd5-1.0.6</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: <fc...@us...> - 2007-08-30 15:40:20
|
Revision: 412 http://openutils.svn.sourceforge.net/openutils/?rev=412&view=rev Author: fcarone Date: 2007-08-30 08:40:19 -0700 (Thu, 30 Aug 2007) Log Message: ----------- Test app added, but everything is in progress Modified Paths: -------------- trunk/openutils-hibernate-security/pom.xml trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java trunk/openutils-hibernate-security/src/test/resources/hibernate.cfg.xml trunk/openutils-hibernate-security/src/test/resources/spring-dao.xml trunk/openutils-hibernate-security/src/test/resources/spring-tests.xml Added Paths: ----------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateDAOSecurityInterceptor.java trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/SecurityIntegrationTest.java trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/DummyDAO.java trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/DummyDaoImpl.java trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/DummyDataobject.java trunk/openutils-hibernate-security/src/test/resources/spring-security.xml Removed Paths: ------------- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateRUDSecurityInterceptor.java Modified: trunk/openutils-hibernate-security/pom.xml =================================================================== --- trunk/openutils-hibernate-security/pom.xml 2007-08-14 12:55:10 UTC (rev 411) +++ trunk/openutils-hibernate-security/pom.xml 2007-08-30 15:40:19 UTC (rev 412) @@ -13,8 +13,31 @@ <name>openutils-hibernate-security</name> <version>0.0.1-SNAPSHOT</version> <description>Hibernate Security classes</description> + <properties> + <spring.version>2.0.6</spring.version> + </properties> <dependencies> <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-dao</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-aop</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-usermanagement</artifactId> <version>1.1.1</version> @@ -69,7 +92,7 @@ <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> - <version>2.3</version> + <version>2.2</version> </dependency> <dependency> <groupId>org.acegisecurity</groupId> Copied: trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateDAOSecurityInterceptor.java (from rev 393, 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/HibernateDAOSecurityInterceptor.java (rev 0) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateDAOSecurityInterceptor.java 2007-08-30 15:40:19 UTC (rev 412) @@ -0,0 +1,132 @@ +/* + * 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.ArrayList; +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.hibernate.criterion.Criterion; +import org.hibernate.criterion.Restrictions; +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 HibernateDAOSecurityInterceptor implements MethodInterceptor +{ + + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(HibernateDAOSecurityInterceptor.class); + + private SecurityRuleManager securityRuleManager; + + private SessionFactory sessionFactory; + + public HibernateDAOSecurityInterceptor() + { + super(); + } + + /** + * {@inheritDoc} + */ + public Object invoke(MethodInvocation invocation) throws Throwable + { + Object[] arguments = invocation.getArguments(); + Object checkArgument = arguments[arguments.length - 1]; + if (!StringUtils.equals(invocation.getMethod().getName(), "findFiltered")) + { + return invocation.proceed(); + } + if (!(checkArgument instanceof List)) + { + return invocation.proceed(); + } + + 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<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 grantedRoles = StringUtils.EMPTY; + for (int i = 0; i < authorities.length; i++) + { + grantedRoles += authorities[i].getAuthority() + " "; + } + log.error("Access is denied for entity {}, and roles {}", entity, grantedRoles); + throw new SecurityException("Access denied"); + } + + Filter filter = securityRuleManager.getEntityFilterFromRules(entity, rules); + + Criterion sqlCriterion = Restrictions.sqlRestriction(filter.getFilterDefinition().getDefaultFilterCondition()); + + if (StringUtils.equals(invocation.getMethod().getName(), "findFiltered")) + { + Object argument = arguments[arguments.length - 1]; + ((List) argument).add(sqlCriterion); + } + + Object result = invocation.proceed(); + + 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/HibernateRUDSecurityInterceptor.java =================================================================== --- trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateRUDSecurityInterceptor.java 2007-08-14 12:55:10 UTC (rev 411) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/aop/HibernateRUDSecurityInterceptor.java 2007-08-30 15:40:19 UTC (rev 412) @@ -1,109 +0,0 @@ -/* - * 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.ArrayList; -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<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 grantedRoles = StringUtils.EMPTY; - for (int i = 0; i < authorities.length; i++) - { - grantedRoles += authorities[i].getAuthority() + " "; - } - 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()); - 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; - } - -} 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-14 12:55:10 UTC (rev 411) +++ trunk/openutils-hibernate-security/src/main/java/it/openutils/hibernate/security/filter/JavaBeanFilter.java 2007-08-30 15:40:19 UTC (rev 412) @@ -41,6 +41,7 @@ * @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 */ + @SuppressWarnings("unchecked") public JavaBeanFilter(String bean, List<SecurityRule> securityRules) throws ClassNotFoundException, InstantiationException, @@ -165,6 +166,7 @@ /** * {@inheritDoc} */ + @SuppressWarnings("unchecked") public Filter setParameterList(String name, Collection values) { return this; Added: trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/SecurityIntegrationTest.java =================================================================== --- trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/SecurityIntegrationTest.java (rev 0) +++ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/SecurityIntegrationTest.java 2007-08-30 15:40:19 UTC (rev 412) @@ -0,0 +1,37 @@ +package it.openutils.hibernate.security; + +import it.openutils.hibernate.security.apptest.DummyDAO; +import it.openutils.hibernate.security.apptest.DummyDataobject; +import it.openutils.testing.junit.SpringTestCase; + +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 SecurityIntegrationTest extends SpringTestCase +{ + + private DummyDAO securedObject; + + /** + * @throws Exception Any exception + */ + @Test + public void testRulesApplication() throws Exception + { + securedObject = (DummyDAO) ctx.getBean("dummyDAO"); + DummyDataobject filter = new DummyDataobject(); + List<DummyDataobject> dummyObjects = securedObject.findFiltered(filter); + Assert.assertNotNull(dummyObjects); + } + +} Added: trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/DummyDAO.java =================================================================== --- trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/DummyDAO.java (rev 0) +++ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/DummyDAO.java 2007-08-30 15:40:19 UTC (rev 412) @@ -0,0 +1,16 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.apptest; + +import it.openutils.dao.hibernate.HibernateDAO; + + +/** + * @author fcarone + * @version $Id: $ + */ +public interface DummyDAO extends HibernateDAO<DummyDataobject, Long> +{ + +} Added: trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/DummyDaoImpl.java =================================================================== --- trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/DummyDaoImpl.java (rev 0) +++ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/DummyDaoImpl.java 2007-08-30 15:40:19 UTC (rev 412) @@ -0,0 +1,25 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.apptest; + +import it.openutils.dao.hibernate.HibernateDAOImpl; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class DummyDaoImpl extends HibernateDAOImpl<DummyDataobject, Long> implements DummyDAO +{ + + /** + * {@inheritDoc} + */ + @Override + protected Class<DummyDataobject> getReferenceClass() + { + return DummyDataobject.class; + } + +} Added: trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/DummyDataobject.java =================================================================== --- trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/DummyDataobject.java (rev 0) +++ trunk/openutils-hibernate-security/src/test/java/it/openutils/hibernate/security/apptest/DummyDataobject.java 2007-08-30 15:40:19 UTC (rev 412) @@ -0,0 +1,98 @@ +/* + * Copyright (c) Openmind. All rights reserved. http://www.openmindonline.it + */ +package it.openutils.hibernate.security.apptest; + +import javax.persistence.Column; +import javax.persistence.Id; + + +/** + * @author fcarone + * @version $Id: $ + */ +public class DummyDataobject +{ + + /** + * serial version UID + */ + private static final long serialVersionUID = 1867418705382284287L; + + @Id + @Column(name = "ID", precision = 18) + private Long id; + + @Column(name = "INTVALUE", precision = 10) + private Integer intValue; + + @Column(name = "STRINGVALUE", length = 16) + private String stringValue; + + + /** + * Returns the stringValue. + * @return the stringValue + */ + public String getStringValue() + { + return stringValue; + } + + + /** + * Sets the stringValue. + * @param stringValue the stringValue to set + */ + public void setStringValue(String stringValue) + { + this.stringValue = stringValue; + } + + + + /** + * 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 intValue. + * @return the intValue + */ + public Integer getIntValue() + { + return intValue; + } + + + + /** + * Sets the intValue. + * @param intValue the intValue to set + */ + public void setIntValue(Integer intValue) + { + this.intValue = intValue; + } + + + +} Modified: trunk/openutils-hibernate-security/src/test/resources/hibernate.cfg.xml =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/hibernate.cfg.xml 2007-08-14 12:55:10 UTC (rev 411) +++ trunk/openutils-hibernate-security/src/test/resources/hibernate.cfg.xml 2007-08-30 15:40:19 UTC (rev 412) @@ -3,6 +3,7 @@ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> - <mapping class="it.openutils.hibernate.security.dataobject.SecurityRule" /> + <mapping class="it.openutils.hibernate.security.dataobject.SecurityRule" /> + <mapping class="it.openutils.hibernate.security.apptest.DummyDataobject" /> </session-factory> </hibernate-configuration> \ No newline at end of file Modified: trunk/openutils-hibernate-security/src/test/resources/spring-dao.xml =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/spring-dao.xml 2007-08-14 12:55:10 UTC (rev 411) +++ trunk/openutils-hibernate-security/src/test/resources/spring-dao.xml 2007-08-30 15:40:19 UTC (rev 412) @@ -4,9 +4,16 @@ <beans> <bean id="securityRuleDAO" parent="txProxyTemplate"> <property name="target"> - <bean class="it.openutils.hibernate.security.dao.SecurityRuleDAOImpl"> + <bean class="it.openutils.hibernate.security.dao.impl.SecurityRuleDAOImpl"> <property name="sessionFactory" ref="sessionFactory" /> </bean> </property> + </bean> + <bean id="dummyDAO" parent="txProxyTemplate"> + <property name="target"> + <bean class="it.openutils.hibernate.security.apptest.DummyDaoImpl"> + <property name="sessionFactory" ref="sessionFactory" /> + </bean> + </property> </bean> </beans> \ No newline at end of file Added: trunk/openutils-hibernate-security/src/test/resources/spring-security.xml =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/spring-security.xml (rev 0) +++ trunk/openutils-hibernate-security/src/test/resources/spring-security.xml 2007-08-30 15:40:19 UTC (rev 412) @@ -0,0 +1,21 @@ +<?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="securityInterceptor" class="it.openutils.hibernate.security.aop.HibernateDAOSecurityInterceptor"> + <property name="securityRuleManager" ref="securityRuleManager" /> + <property name="sessionFactory" ref="sessionFactory" /> + </bean> + <bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> + <property name="beanNames"> + <list> + <idref bean="dummyDAO" /> + </list> + </property> + <property name="interceptorNames"> + <list> + <value>securityInterceptor</value> + </list> + </property> + </bean> +</beans> Modified: trunk/openutils-hibernate-security/src/test/resources/spring-tests.xml =================================================================== --- trunk/openutils-hibernate-security/src/test/resources/spring-tests.xml 2007-08-14 12:55:10 UTC (rev 411) +++ trunk/openutils-hibernate-security/src/test/resources/spring-tests.xml 2007-08-30 15:40:19 UTC (rev 412) @@ -4,5 +4,8 @@ <import resource="classpath:spring-database.xml" /> <import resource="classpath:spring-hibernate.xml" /> <import resource="classpath:spring-dao.xml" /> - <import resource="classpath:spring-managers.xml" /> + <import resource="classpath:spring-managers.xml" /> + <import resource="classpath:spring-security.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: <fg...@us...> - 2007-08-14 12:55:08
|
Revision: 411 http://openutils.svn.sourceforge.net/openutils/?rev=411&view=rev Author: fgiust Date: 2007-08-14 05:55:10 -0700 (Tue, 14 Aug 2007) Log Message: ----------- fixed link format Modified Paths: -------------- trunk/openutils-mgnlstripes/src/site/apt/index.apt Modified: trunk/openutils-mgnlstripes/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-14 12:37:13 UTC (rev 410) +++ trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-14 12:55:10 UTC (rev 411) @@ -28,7 +28,7 @@ </dependency> +----------------------------------------------+ - Then configure stripes in your web.xml as usual (see {{{http://mc4j.org/confluence/display/stripes/Quick+Start+Guide}}} for this. + Then configure stripes in your web.xml as usual (see {{{http://mc4j.org/confluence/display/stripes/Quick+Start+Guide}http://mc4j.org/confluence/display/stripes/Quick+Start+Guide}} for this). You only need to change the configuration for the stripes <<<ActionResolver.Class>>> in order to use <<<it.openutils.magnoliastripes.MgnlActionResolver>>>. You can do that by adding/modifying the following init parameter This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-14 12:37:17
|
Revision: 410 http://openutils.svn.sourceforge.net/openutils/?rev=410&view=rev Author: fgiust Date: 2007-08-14 05:37:13 -0700 (Tue, 14 Aug 2007) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-mgnlstripes/pom.xml Modified: trunk/openutils-mgnlstripes/pom.xml =================================================================== --- trunk/openutils-mgnlstripes/pom.xml 2007-08-14 12:37:04 UTC (rev 409) +++ trunk/openutils-mgnlstripes/pom.xml 2007-08-14 12:37:13 UTC (rev 410) @@ -10,7 +10,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlstripes</artifactId> <name>openutils-mgnlstripes</name> - <version>0.2</version> + <version>0.3-SNAPSHOT</version> <build> <resources> <resource> @@ -77,10 +77,4 @@ </exclusions> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-0.2</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-0.2</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlstripes-0.2</url> - </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-14 12:37:14
|
Revision: 409 http://openutils.svn.sourceforge.net/openutils/?rev=409&view=rev Author: fgiust Date: 2007-08-14 05:37:04 -0700 (Tue, 14 Aug 2007) Log Message: ----------- [maven-release-plugin] copy for tag openutils-mgnlstripes-0.2 Added Paths: ----------- tags/openutils-mgnlstripes-0.2/ tags/openutils-mgnlstripes-0.2/pom.xml tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesModule.java tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java tags/openutils-mgnlstripes-0.2/src/site/ tags/openutils-mgnlstripes-0.2/src/site/apt/ tags/openutils-mgnlstripes-0.2/src/site/apt/index.apt tags/openutils-mgnlstripes-0.2/src/site/changes/changes.xml Removed Paths: ------------- tags/openutils-mgnlstripes-0.2/pom.xml tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesModule.java tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java tags/openutils-mgnlstripes-0.2/src/site/ tags/openutils-mgnlstripes-0.2/src/site/apt/ tags/openutils-mgnlstripes-0.2/src/site/apt/index.apt Copied: tags/openutils-mgnlstripes-0.2 (from rev 403, trunk/openutils-mgnlstripes) Deleted: tags/openutils-mgnlstripes-0.2/pom.xml =================================================================== --- trunk/openutils-mgnlstripes/pom.xml 2007-08-14 07:35:54 UTC (rev 403) +++ tags/openutils-mgnlstripes-0.2/pom.xml 2007-08-14 12:37:04 UTC (rev 409) @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <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.2-SNAPSHOT</version> - <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> - <artifactId>stripes</artifactId> - <version>1.4.3</version> - <exclusions> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-core</artifactId> - <version>3.1-m3</version> - </dependency> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-module-admininterface</artifactId> - <version>3.1-m3</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> Copied: tags/openutils-mgnlstripes-0.2/pom.xml (from rev 408, trunk/openutils-mgnlstripes/pom.xml) =================================================================== --- tags/openutils-mgnlstripes-0.2/pom.xml (rev 0) +++ tags/openutils-mgnlstripes-0.2/pom.xml 2007-08-14 12:37:04 UTC (rev 409) @@ -0,0 +1,86 @@ +<?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>4</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> + <packaging>jar</packaging> + <artifactId>openutils-mgnlstripes</artifactId> + <name>openutils-mgnlstripes</name> + <version>0.2</version> + <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> + <artifactId>stripes</artifactId> + <version>1.4.3</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-core</artifactId> + <version>3.1-m3</version> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-module-admininterface</artifactId> + <version>3.1-m3</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> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-0.2</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-0.2</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlstripes-0.2</url> + </scm> +</project> Deleted: tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesModule.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java 2007-08-14 07:35:54 UTC (rev 403) +++ tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesModule.java 2007-08-14 12:37:04 UTC (rev 409) @@ -1,24 +0,0 @@ -package it.openutils.magnoliastripes; - -import info.magnolia.module.ModuleLifecycle; -import info.magnolia.module.ModuleLifecycleContext; - - -/** - * Stripes module. - * @author fgiust - * @version $Id: $ - */ -public class StripesModule implements ModuleLifecycle -{ - - /** - * {@inheritDoc} - */ - @Override - public void start(ModuleLifecycleContext moduleLifecycleContext) - { - // anything to do? - } - -} \ No newline at end of file Copied: tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesModule.java (from rev 404, trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java) =================================================================== --- tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesModule.java (rev 0) +++ tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesModule.java 2007-08-14 12:37:04 UTC (rev 409) @@ -0,0 +1,23 @@ +package it.openutils.magnoliastripes; + +import info.magnolia.module.ModuleLifecycle; +import info.magnolia.module.ModuleLifecycleContext; + + +/** + * Stripes module. + * @author fgiust + * @version $Id: $ + */ +public class StripesModule implements ModuleLifecycle +{ + + /** + * {@inheritDoc} + */ + public void start(ModuleLifecycleContext moduleLifecycleContext) + { + // anything to do? + } + +} \ No newline at end of file Deleted: tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java 2007-08-14 07:35:54 UTC (rev 403) +++ tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java 2007-08-14 12:37:04 UTC (rev 409) @@ -1,174 +0,0 @@ -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 Copied: tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java (from rev 404, trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java) =================================================================== --- tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java (rev 0) +++ tags/openutils-mgnlstripes-0.2/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java 2007-08-14 12:37:04 UTC (rev 409) @@ -0,0 +1,172 @@ +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} + */ + public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException + { + ((WebContext) MgnlContext.getInstance()).include(url, response.getWriter()); + } + + /** + * {@inheritDoc} + */ + public void include(ServletRequest request, ServletResponse response) throws ServletException, IOException + { + ((WebContext) MgnlContext.getInstance()).include(url, response.getWriter()); + } + } +} \ No newline at end of file Copied: tags/openutils-mgnlstripes-0.2/src/site (from rev 405, trunk/openutils-mgnlstripes/src/site) Copied: tags/openutils-mgnlstripes-0.2/src/site/apt (from rev 403, trunk/openutils-mgnlstripes/src/site/apt) Deleted: tags/openutils-mgnlstripes-0.2/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-14 07:35:54 UTC (rev 403) +++ tags/openutils-mgnlstripes-0.2/src/site/apt/index.apt 2007-08-14 12:37:04 UTC (rev 409) @@ -1,149 +0,0 @@ - -------------------------- - openutils-mgnlstripes - -------------------------- - Fabrizio Giustina - -------------------------- - -About openutils-mgnlstripes - - openutils-mgnlstripes is a custom {{{http://www.magnolia.info}magnolia}} module which integrates the - {{{http://mc4j.org/confluence/display/stripes/Home}Stripes}} MVC framework. - - After installed into magnolia, this module will allow you to use any available Stripes action as a Magnolia paragraph, - Any magically-converted Stripes action will still be able to use any standard Stripes feature, plus it will enjoy the - automatic injection of any paragraph property. - - <<This module requires magnolia 3.1-m3, and will not work on any earlier version!>> - -Configuration - - First of all drop the openutils-mgnlstripes jar and the stripes jar into WEB-INF/lib, or (better) if you are using maven - just declare the following dependency: - -+----------------------------------------------+ - <dependency> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils-mgnlstripes</artifactId> - <version>0.1</version> - </dependency> -+----------------------------------------------+ - - Then configure stripes in your web.xml as usual (see {{{http://mc4j.org/confluence/display/stripes/Quick+Start+Guide}}} for this. - - You only need to change the configuration for the stripes <<<ActionResolver.Class>>> in order to use - <<<it.openutils.magnoliastripes.MgnlActionResolver>>>. You can do that by adding/modifying the following init parameter - in WEB.xml: - - -+----------------------------------------------+ - <init-param> - <param-name>ActionResolver.Class</param-name> - <param-value>it.openutils.magnoliastripes.MgnlActionResolver</param-value> - </init-param> -+----------------------------------------------+ - -Usage - - When magnolia and stripes will startup now any auto-discovered stripes action will be configured in order to be used as - a magnolia paragraph. This means that paragraphs will be auto-generated, and they don't need to be configured into jcr. - - You should see a few <<<info>>> logs that enumerates the list of stripes paragraphs configured. By convention the name of - the paragraph is the same name of the Stripes action class minus action and lowercase. - - So <<<it.myapp.web.MyStripesAction >>> will be available as a paragraph named <<<mystripes>>>. - - Before being able to use any paragraph you will need to create a dialog for that. By convention the dialog should have - the same name of the paragraph so, following the previous example, you will need to configure a dialog called <<<mystripes>>>. - - Try to put a property called <<<title>>> in such dialog for a test. - - You are ready to use your paragraph into any magnolia template as usual: - -+----------------------------------------------+ - - <cms:contentNodeIterator contentNodeCollectionName="column"> - <cms:editBar adminOnly="true" /> - <cms:includeTemplate /> - </cms:contentNodeIterator> - <cms:newBar contentNodeCollectionName="column" paragraph="mystripes" adminOnly="true" /> - -+----------------------------------------------+ - - Try to add an instance of the <<<mystripes>>> paragraph. Set the title property to whatever you want, you - will be able to use it in your Stripes action bean. - - The following example show the code for the simple <<<MyStripesAction>>> that prints out the configured title to the log: - -+----------------------------------------------+ -package it.myapp.web; - -import net.sourceforge.stripes.action.ActionBean; -import net.sourceforge.stripes.action.ActionBeanContext; -import net.sourceforge.stripes.action.DefaultHandler; -import net.sourceforge.stripes.action.ForwardResolution; -import net.sourceforge.stripes.action.Resolution; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -public class MyStripesAction implements ActionBean -{ - - private Logger log = LoggerFactory.getLogger(MyStripesAction.class); - - private String title; - - @Override - public ActionBeanContext getContext() - { - // TODO - return null; - } - - @Override - public void setContext(ActionBeanContext context) - { - // TODO - } - - public void setTitle(String title) - { - this.title = title; - } - - @DefaultHandler - public Resolution show() - { - - log.info("My title is: {}!", title); - - return new ForwardResolution("/templates/paragraphs/anyjsp.jsp"); - } -} -+----------------------------------------------+ - - As you can see, you will be able to mix parameters that you can use in Stripes action with pure content. Note that you - will not need to configure and use any magnolia paragraph property into your action since you can still use also the - standard magnolia tags in the jsp that is rendered by stripes! - - -Todo/improvements - - Warning! This is a preliminary technology-preview release! - - What does this means? Well, that it should work fine, but the integration is not yet complete and there are still some - missing features... be careful for what is know to not to work. - - - This is a list of know todos: - - * Important! reload stripes paragraph when the configuration of other paragraphs in magnolia is changed! At this moment - stripes paragraphs disappear after any change in paragraphs configured into jcr. - - * Handle multipart forms in request wrapper (should be easy to do) - - * A better way of handling multivalued properties in paragraph - - * Handle binary properties in paragraph - Copied: tags/openutils-mgnlstripes-0.2/src/site/apt/index.apt (from rev 407, trunk/openutils-mgnlstripes/src/site/apt/index.apt) =================================================================== --- tags/openutils-mgnlstripes-0.2/src/site/apt/index.apt (rev 0) +++ tags/openutils-mgnlstripes-0.2/src/site/apt/index.apt 2007-08-14 12:37:04 UTC (rev 409) @@ -0,0 +1,152 @@ + -------------------------- + openutils-mgnlstripes + -------------------------- + Fabrizio Giustina + -------------------------- + +About openutils-mgnlstripes + + openutils-mgnlstripes is a custom {{{http://www.magnolia.info}magnolia}} module which integrates the + {{{http://mc4j.org/confluence/display/stripes/Home}Stripes}} MVC framework. + + After installed into magnolia, this module will allow you to use any available Stripes action as a Magnolia paragraph, + Any magically-converted Stripes action will still be able to use any standard Stripes feature, plus it will enjoy the + automatic injection of any paragraph property. + + <<This module requires magnolia 3.1-m3, and will not work on any earlier version!>> + +Configuration + + First of all drop the openutils-mgnlstripes jar and the stripes jar into WEB-INF/lib, or (better) if you are using maven + just declare the following dependency: + ++----------------------------------------------+ + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnlstripes</artifactId> + <version>0.2</version> + </dependency> ++----------------------------------------------+ + + Then configure stripes in your web.xml as usual (see {{{http://mc4j.org/confluence/display/stripes/Quick+Start+Guide}}} for this. + + You only need to change the configuration for the stripes <<<ActionResolver.Class>>> in order to use + <<<it.openutils.magnoliastripes.MgnlActionResolver>>>. You can do that by adding/modifying the following init parameter + in WEB.xml: + + ++----------------------------------------------+ + <init-param> + <param-name>ActionResolver.Class</param-name> + <param-value>it.openutils.magnoliastripes.MgnlActionResolver</param-value> + </init-param> ++----------------------------------------------+ + +Usage + + When magnolia and stripes will startup now any auto-discovered stripes action will be configured in order to be used as + a magnolia paragraph. This means that paragraphs will be auto-generated, and they don't need to be configured into jcr. + + You should see a few <<<info>>> logs that enumerates the list of stripes paragraphs configured. By convention the name of + the paragraph is the same name of the Stripes action class minus action and lowercase. + + So <<<it.myapp.web.MyStripesAction >>> will be available as a paragraph named <<<mystripes>>>. + + Before being able to use any paragraph you will need to create a dialog for that. By convention the dialog should have + the same name of the paragraph so, following the previous example, you will need to configure a dialog called <<<mystripes>>>. + + Try to put a property called <<<title>>> in such dialog for a test. + + You are ready to use your paragraph into any magnolia template as usual: + ++----------------------------------------------+ + + <cms:contentNodeIterator contentNodeCollectionName="column"> + <cms:editBar adminOnly="true" /> + <cms:includeTemplate /> + </cms:contentNodeIterator> + <cms:newBar contentNodeCollectionName="column" paragraph="mystripes" adminOnly="true" /> + ++----------------------------------------------+ + + Try to add an instance of the <<<mystripes>>> paragraph. Set the title property to whatever you want, you + will be able to use it in your Stripes action bean. + + The following example show the code for the simple <<<MyStripesAction>>> that prints out the configured title to the log: + ++----------------------------------------------+ +package it.myapp.web; + +import net.sourceforge.stripes.action.ActionBean; +import net.sourceforge.stripes.action.ActionBeanContext; +import net.sourceforge.stripes.action.DefaultHandler; +import net.sourceforge.stripes.action.ForwardResolution; +import net.sourceforge.stripes.action.Resolution; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class MyStripesAction implements ActionBean +{ + + private Logger log = LoggerFactory.getLogger(MyStripesAction.class); + + private String title; + + @Override + public ActionBeanContext getContext() + { + // TODO + return null; + } + + @Override + public void setContext(ActionBeanContext context) + { + // TODO + } + + public void setTitle(String title) + { + this.title = title; + } + + @DefaultHandler + public Resolution show() + { + + log.info("My title is: {}!", title); + + return new ForwardResolution("/templates/paragraphs/anyjsp.jsp"); + } +} ++----------------------------------------------+ + + As you can see, you will be able to mix parameters that you can use in Stripes action with pure content. Note that you + will not need to configure and use any magnolia paragraph property into your action since you can still use also the + standard magnolia tags in the jsp that is rendered by stripes! + + +Todo/improvements + + Warning! This is a preliminary technology-preview release! + + What does this means? Well, that it should work fine, but the integration is not yet complete and there are still some + missing features... be careful for what is know to not to work. + + + This is a list of know todos: + + * Important! reload stripes paragraph when the configuration of other paragraphs in magnolia is changed! At this moment + stripes paragraphs disappear after any change in paragraphs configured into jcr. + + * Handle multipart forms in request wrapper (should be easy to do) + + * A better way of handling multivalued properties in paragraph + + * Handle binary properties in paragraph + + * Use spring binding/validation for validation of fields in dialogs + + Copied: tags/openutils-mgnlstripes-0.2/src/site/changes/changes.xml (from rev 406, trunk/openutils-mgnlstripes/src/site/changes/changes.xml) =================================================================== --- tags/openutils-mgnlstripes-0.2/src/site/changes/changes.xml (rev 0) +++ tags/openutils-mgnlstripes-0.2/src/site/changes/changes.xml 2007-08-14 12:37:04 UTC (rev 409) @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<!-- + "type" attribute can be: add, remove, update or fix. +--> +<document> + <properties> + <title>Changes</title> + <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> + </properties> + <body> + <release version="0.2" date="2007-08-14" description=""> + <action type="update" dev="fgiust"> + Added support for indexed parameters by replacing "{}" with "[]" in parameter names (hack). With Stripes you can + use indexed parameters, but square brakets are not allowed in jcr node names and can't be used in paragraph + attributes. You can now use "list{1}" in attribute names for that. + </action> + <action type="fix" dev="fgiust"> + Excluded commons-logging dependency from stripes in pom.xml. Magnolia already imports jcl104-over-slf4j, which + is a replacement over the standard commons-logging jar. + </action> + </release> + <release version="0.1" date="2007-08-13" description="Initial release"> + <action type="add" dev="fgiust" due-to="">Initial release with support for stripes paragraphs.</action> + </release> + </body> +</document> \ 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-08-14 12:36:53
|
Revision: 408 http://openutils.svn.sourceforge.net/openutils/?rev=408&view=rev Author: fgiust Date: 2007-08-14 05:36:52 -0700 (Tue, 14 Aug 2007) Log Message: ----------- [maven-release-plugin] prepare release openutils-mgnlstripes-0.2 Modified Paths: -------------- trunk/openutils-mgnlstripes/pom.xml Modified: trunk/openutils-mgnlstripes/pom.xml =================================================================== --- trunk/openutils-mgnlstripes/pom.xml 2007-08-14 12:36:27 UTC (rev 407) +++ trunk/openutils-mgnlstripes/pom.xml 2007-08-14 12:36:52 UTC (rev 408) @@ -1,6 +1,5 @@ <?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,7 +10,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlstripes</artifactId> <name>openutils-mgnlstripes</name> - <version>0.2-SNAPSHOT</version> + <version>0.2</version> <build> <resources> <resource> @@ -78,4 +77,10 @@ </exclusions> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-0.2</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-0.2</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlstripes-0.2</url> + </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-14 12:36:26
|
Revision: 407 http://openutils.svn.sourceforge.net/openutils/?rev=407&view=rev Author: fgiust Date: 2007-08-14 05:36:27 -0700 (Tue, 14 Aug 2007) Log Message: ----------- added a todo Modified Paths: -------------- trunk/openutils-mgnlstripes/src/site/apt/index.apt Modified: trunk/openutils-mgnlstripes/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-14 12:35:15 UTC (rev 406) +++ trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-14 12:36:27 UTC (rev 407) @@ -147,3 +147,6 @@ * Handle binary properties in paragraph + * Use spring binding/validation for validation of fields in dialogs + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-14 12:35:13
|
Revision: 406 http://openutils.svn.sourceforge.net/openutils/?rev=406&view=rev Author: fgiust Date: 2007-08-14 05:35:15 -0700 (Tue, 14 Aug 2007) Log Message: ----------- adding site.xml for subprojects Added Paths: ----------- trunk/openutils-backup/src/site/site.xml trunk/openutils-configuration-dataobjects/src/site/site.xml trunk/openutils-configuration-services/src/site/site.xml trunk/openutils-dbmigration/src/site/site.xml trunk/openutils-hibernate-security/src/site/site.xml trunk/openutils-mgnlspring/src/site/site.xml trunk/openutils-mgnlstripes/src/site/changes/changes.xml trunk/openutils-tags-spring/src/site/site.xml trunk/openutils-testing-junit/src/site/site.xml trunk/openutils-testing-junit-dwr/src/site/site.xml trunk/openutils-testing-testng/src/site/site.xml trunk/openutils-testing-testng-dwr/src/site/site.xml trunk/openutils-usermanagement/src/site/site.xml trunk/openutils-usermanagement-dataobjects/src/site/site.xml trunk/openutils-web/src/site/site.xml Added: trunk/openutils-backup/src/site/site.xml =================================================================== --- trunk/openutils-backup/src/site/site.xml (rev 0) +++ trunk/openutils-backup/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-configuration-dataobjects/src/site/site.xml =================================================================== --- trunk/openutils-configuration-dataobjects/src/site/site.xml (rev 0) +++ trunk/openutils-configuration-dataobjects/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-configuration-services/src/site/site.xml =================================================================== --- trunk/openutils-configuration-services/src/site/site.xml (rev 0) +++ trunk/openutils-configuration-services/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-dbmigration/src/site/site.xml =================================================================== --- trunk/openutils-dbmigration/src/site/site.xml (rev 0) +++ trunk/openutils-dbmigration/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-hibernate-security/src/site/site.xml =================================================================== --- trunk/openutils-hibernate-security/src/site/site.xml (rev 0) +++ trunk/openutils-hibernate-security/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-mgnlspring/src/site/site.xml =================================================================== --- trunk/openutils-mgnlspring/src/site/site.xml (rev 0) +++ trunk/openutils-mgnlspring/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-mgnlstripes/src/site/changes/changes.xml =================================================================== --- trunk/openutils-mgnlstripes/src/site/changes/changes.xml (rev 0) +++ trunk/openutils-mgnlstripes/src/site/changes/changes.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,26 @@ +<?xml version="1.0"?> +<!-- + "type" attribute can be: add, remove, update or fix. +--> +<document> + <properties> + <title>Changes</title> + <author email="fgiust(at)users.sourceforge.net">Fabrizio Giustina</author> + </properties> + <body> + <release version="0.2" date="2007-08-14" description=""> + <action type="update" dev="fgiust"> + Added support for indexed parameters by replacing "{}" with "[]" in parameter names (hack). With Stripes you can + use indexed parameters, but square brakets are not allowed in jcr node names and can't be used in paragraph + attributes. You can now use "list{1}" in attribute names for that. + </action> + <action type="fix" dev="fgiust"> + Excluded commons-logging dependency from stripes in pom.xml. Magnolia already imports jcl104-over-slf4j, which + is a replacement over the standard commons-logging jar. + </action> + </release> + <release version="0.1" date="2007-08-13" description="Initial release"> + <action type="add" dev="fgiust" due-to="">Initial release with support for stripes paragraphs.</action> + </release> + </body> +</document> \ No newline at end of file Added: trunk/openutils-tags-spring/src/site/site.xml =================================================================== --- trunk/openutils-tags-spring/src/site/site.xml (rev 0) +++ trunk/openutils-tags-spring/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-testing-junit/src/site/site.xml =================================================================== --- trunk/openutils-testing-junit/src/site/site.xml (rev 0) +++ trunk/openutils-testing-junit/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-testing-junit-dwr/src/site/site.xml =================================================================== --- trunk/openutils-testing-junit-dwr/src/site/site.xml (rev 0) +++ trunk/openutils-testing-junit-dwr/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-testing-testng/src/site/site.xml =================================================================== --- trunk/openutils-testing-testng/src/site/site.xml (rev 0) +++ trunk/openutils-testing-testng/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-testing-testng-dwr/src/site/site.xml =================================================================== --- trunk/openutils-testing-testng-dwr/src/site/site.xml (rev 0) +++ trunk/openutils-testing-testng-dwr/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-usermanagement/src/site/site.xml =================================================================== --- trunk/openutils-usermanagement/src/site/site.xml (rev 0) +++ trunk/openutils-usermanagement/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-usermanagement-dataobjects/src/site/site.xml =================================================================== --- trunk/openutils-usermanagement-dataobjects/src/site/site.xml (rev 0) +++ trunk/openutils-usermanagement-dataobjects/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> Added: trunk/openutils-web/src/site/site.xml =================================================================== --- trunk/openutils-web/src/site/site.xml (rev 0) +++ trunk/openutils-web/src/site/site.xml 2007-08-14 12:35:15 UTC (rev 406) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="Openutils"> + <bannerRight> + <name>Openutils</name> + <href>http://openutils.sourceforge.net</href> + </bannerRight> + <bannerLeft> + <name>Sourceforge</name> + <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> + <href>http://openutils.sourceforge.net</href> + </bannerLeft> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-14 12:33:42
|
Revision: 405 http://openutils.svn.sourceforge.net/openutils/?rev=405&view=rev Author: fgiust Date: 2007-08-14 05:33:10 -0700 (Tue, 14 Aug 2007) Log Message: ----------- cleaning up site and reports Modified Paths: -------------- trunk/openutils-bshd5/src/site/site.xml trunk/openutils-deployment/src/site/site.xml trunk/openutils-mgnlstripes/pom.xml trunk/openutils-mgnlstripes/src/site/apt/index.apt trunk/openutils-spring/src/site/site.xml trunk/pom.xml trunk/src/site/apt/index.apt Added Paths: ----------- trunk/openutils-backup/src/site/ trunk/openutils-configuration-dataobjects/src/site/ trunk/openutils-configuration-services/src/site/ trunk/openutils-dbmigration/src/site/ trunk/openutils-hibernate-security/src/site/ trunk/openutils-mgnlspring/src/site/ trunk/openutils-mgnlstripes/src/site/changes/ trunk/openutils-tags-spring/src/site/ trunk/openutils-testing-junit/src/site/ trunk/openutils-testing-junit-dwr/src/site/ trunk/openutils-testing-testng/src/site/ trunk/openutils-testing-testng-dwr/src/site/ trunk/openutils-usermanagement/src/site/ trunk/openutils-usermanagement-dataobjects/src/site/ trunk/openutils-web/src/site/ Property Changed: ---------------- trunk/openutils-mgnlstripes/src/site/ Modified: trunk/openutils-bshd5/src/site/site.xml =================================================================== --- trunk/openutils-bshd5/src/site/site.xml 2007-08-14 07:52:25 UTC (rev 404) +++ trunk/openutils-bshd5/src/site/site.xml 2007-08-14 12:33:10 UTC (rev 405) @@ -7,7 +7,13 @@ <bannerLeft> <name>Sourceforge</name> <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> - <href>http://www.sourceforge.net/projects/openutils</href> + <href>http://openutils.sourceforge.net</href> </bannerLeft> - <body>${reports}</body> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> </project> Modified: trunk/openutils-deployment/src/site/site.xml =================================================================== --- trunk/openutils-deployment/src/site/site.xml 2007-08-14 07:52:25 UTC (rev 404) +++ trunk/openutils-deployment/src/site/site.xml 2007-08-14 12:33:10 UTC (rev 405) @@ -7,7 +7,13 @@ <bannerLeft> <name>Sourceforge</name> <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> - <href>http://www.sourceforge.net/projects/openutils</href> + <href>http://openutils.sourceforge.net</href> </bannerLeft> - <body>${reports}</body> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> </project> Modified: trunk/openutils-mgnlstripes/pom.xml =================================================================== --- trunk/openutils-mgnlstripes/pom.xml 2007-08-14 07:52:25 UTC (rev 404) +++ trunk/openutils-mgnlstripes/pom.xml 2007-08-14 12:33:10 UTC (rev 405) @@ -4,7 +4,7 @@ <parent> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> - <version>3</version> + <version>4</version> <relativePath>..</relativePath> </parent> <modelVersion>4.0.0</modelVersion> Property changes on: trunk/openutils-mgnlstripes/src/site ___________________________________________________________________ Name: svn:ignore + site.xml Modified: trunk/openutils-mgnlstripes/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-14 07:52:25 UTC (rev 404) +++ trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-14 12:33:10 UTC (rev 405) @@ -24,7 +24,7 @@ <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-mgnlstripes</artifactId> - <version>0.1</version> + <version>0.2</version> </dependency> +----------------------------------------------+ Modified: trunk/openutils-spring/src/site/site.xml =================================================================== --- trunk/openutils-spring/src/site/site.xml 2007-08-14 07:52:25 UTC (rev 404) +++ trunk/openutils-spring/src/site/site.xml 2007-08-14 12:33:10 UTC (rev 405) @@ -7,7 +7,13 @@ <bannerLeft> <name>Sourceforge</name> <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> - <href>http://www.sourceforge.net/projects/openutils</href> + <href>http://openutils.sourceforge.net</href> </bannerLeft> - <body>${reports}</body> + <body> + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> + </body> </project> Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-08-14 07:52:25 UTC (rev 404) +++ trunk/pom.xml 2007-08-14 12:33:10 UTC (rev 405) @@ -5,7 +5,7 @@ <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils</artifactId> <packaging>pom</packaging> - <version>3</version> + <version>4</version> <name>openutils</name> <description>openutils parent POM</description> <url>http://openutils.sourceforge.net</url> @@ -156,6 +156,16 @@ </plugin> <plugin> <artifactId>maven-changes-plugin</artifactId> + <configuration> + <xmlPath>${basedir}/src/site/changes/changes.xml</xmlPath> + </configuration> + <reportSets> + <reportSet> + <reports> + <report>changes-report</report> + </reports> + </reportSet> + </reportSets> </plugin> <plugin> <artifactId>maven-surefire-report-plugin</artifactId> Modified: trunk/src/site/apt/index.apt =================================================================== --- trunk/src/site/apt/index.apt 2007-08-14 07:52:25 UTC (rev 404) +++ trunk/src/site/apt/index.apt 2007-08-14 12:33:10 UTC (rev 405) @@ -11,7 +11,7 @@ Most of the code comes from projects developed at - [images/openmind-logo.png] openmind +[images/openmind-logo.png] openmind {{{http://www.openmindonline.it}http://www.openmindonline.it}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-14 07:52:22
|
Revision: 404 http://openutils.svn.sourceforge.net/openutils/?rev=404&view=rev Author: fgiust Date: 2007-08-14 00:52:25 -0700 (Tue, 14 Aug 2007) Log Message: ----------- minor cleanups Modified Paths: -------------- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java 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-14 07:35:54 UTC (rev 403) +++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java 2007-08-14 07:52:25 UTC (rev 404) @@ -15,7 +15,6 @@ /** * {@inheritDoc} */ - @Override public void start(ModuleLifecycleContext moduleLifecycleContext) { // anything to do? Modified: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java 2007-08-14 07:35:54 UTC (rev 403) +++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java 2007-08-14 07:52:25 UTC (rev 404) @@ -156,7 +156,6 @@ /** * {@inheritDoc} */ - @Override public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException { ((WebContext) MgnlContext.getInstance()).include(url, response.getWriter()); @@ -165,7 +164,6 @@ /** * {@inheritDoc} */ - @Override public void include(ServletRequest request, ServletResponse response) throws ServletException, IOException { ((WebContext) MgnlContext.getInstance()).include(url, response.getWriter()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-14 07:35:52
|
Revision: 403 http://openutils.svn.sourceforge.net/openutils/?rev=403&view=rev Author: fgiust Date: 2007-08-14 00:35:54 -0700 (Tue, 14 Aug 2007) Log Message: ----------- replace {} with [] (hack for allowing indexed parameters) Modified Paths: -------------- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRenderer.java Modified: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRenderer.java =================================================================== --- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRenderer.java 2007-08-14 07:35:16 UTC (rev 402) +++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRenderer.java 2007-08-14 07:35:54 UTC (rev 403) @@ -238,9 +238,9 @@ Map<String, String[]> nodeDataMap = new HashMap<String, String[]>(); for (NodeData nodeData : paragraphsData) { - String name = nodeData.getName(); + String name = StringUtils.replaceChars(nodeData.getName(), "{}", "[]"); String value = nodeData.getString(); - if (name.startsWith("multiple")) + if (StringUtils.contains(name, "multiple")) { nodeDataMap.put(name, StringUtils.split(value, "\n")); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-14 07:35:14
|
Revision: 402 http://openutils.svn.sourceforge.net/openutils/?rev=402&view=rev Author: fgiust Date: 2007-08-14 00:35:16 -0700 (Tue, 14 Aug 2007) Log Message: ----------- commons-logging exclusions Modified Paths: -------------- trunk/openutils-mgnlstripes/pom.xml Modified: trunk/openutils-mgnlstripes/pom.xml =================================================================== --- trunk/openutils-mgnlstripes/pom.xml 2007-08-13 10:33:14 UTC (rev 401) +++ trunk/openutils-mgnlstripes/pom.xml 2007-08-14 07:35:16 UTC (rev 402) @@ -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> @@ -34,6 +35,12 @@ <groupId>net.sourceforge.stripes</groupId> <artifactId>stripes</artifactId> <version>1.4.3</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>info.magnolia</groupId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-13 10:33:10
|
Revision: 401 http://openutils.svn.sourceforge.net/openutils/?rev=401&view=rev Author: fgiust Date: 2007-08-13 03:33:14 -0700 (Mon, 13 Aug 2007) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-mgnlstripes/pom.xml Modified: trunk/openutils-mgnlstripes/pom.xml =================================================================== --- trunk/openutils-mgnlstripes/pom.xml 2007-08-13 10:33:07 UTC (rev 400) +++ trunk/openutils-mgnlstripes/pom.xml 2007-08-13 10:33:14 UTC (rev 401) @@ -10,7 +10,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlstripes</artifactId> <name>openutils-mgnlstripes</name> - <version>0.1</version> + <version>0.2-SNAPSHOT</version> <build> <resources> <resource> @@ -71,10 +71,4 @@ </exclusions> </dependency> </dependencies> - - <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-0.1</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-0.1</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlstripes-0.1</url> - </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-13 10:33:05
|
Revision: 400 http://openutils.svn.sourceforge.net/openutils/?rev=400&view=rev Author: fgiust Date: 2007-08-13 03:33:07 -0700 (Mon, 13 Aug 2007) Log Message: ----------- [maven-release-plugin] copy for tag openutils-mgnlstripes-0.1 Added Paths: ----------- tags/openutils-mgnlstripes-0.1/ tags/openutils-mgnlstripes-0.1/pom.xml tags/openutils-mgnlstripes-0.1/src/site/ tags/openutils-mgnlstripes-0.1/src/site/apt/index.apt Removed Paths: ------------- tags/openutils-mgnlstripes-0.1/pom.xml tags/openutils-mgnlstripes-0.1/src/site/apt/index.apt Copied: tags/openutils-mgnlstripes-0.1 (from rev 395, trunk/openutils-mgnlstripes) Deleted: tags/openutils-mgnlstripes-0.1/pom.xml =================================================================== --- trunk/openutils-mgnlstripes/pom.xml 2007-08-13 09:12:49 UTC (rev 395) +++ tags/openutils-mgnlstripes-0.1/pom.xml 2007-08-13 10:33:07 UTC (rev 400) @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <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> - <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> - <artifactId>stripes</artifactId> - <version>1.4.3</version> - </dependency> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-core</artifactId> - <version>3.1-m3</version> - </dependency> - <dependency> - <groupId>info.magnolia</groupId> - <artifactId>magnolia-module-admininterface</artifactId> - <version>3.1-m3</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> Copied: tags/openutils-mgnlstripes-0.1/pom.xml (from rev 399, trunk/openutils-mgnlstripes/pom.xml) =================================================================== --- tags/openutils-mgnlstripes-0.1/pom.xml (rev 0) +++ tags/openutils-mgnlstripes-0.1/pom.xml 2007-08-13 10:33:07 UTC (rev 400) @@ -0,0 +1,80 @@ +<?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</version> + <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> + <artifactId>stripes</artifactId> + <version>1.4.3</version> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-core</artifactId> + <version>3.1-m3</version> + </dependency> + <dependency> + <groupId>info.magnolia</groupId> + <artifactId>magnolia-module-admininterface</artifactId> + <version>3.1-m3</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> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-0.1</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-0.1</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlstripes-0.1</url> + </scm> +</project> Copied: tags/openutils-mgnlstripes-0.1/src/site (from rev 397, trunk/openutils-mgnlstripes/src/site) Deleted: tags/openutils-mgnlstripes-0.1/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-13 10:04:10 UTC (rev 397) +++ tags/openutils-mgnlstripes-0.1/src/site/apt/index.apt 2007-08-13 10:33:07 UTC (rev 400) @@ -1,149 +0,0 @@ - -------------------------- - openutils-mgnlstripes - -------------------------- - Fabrizio Giustina - -------------------------- - -About - - openutils-mgnlstripes is a custom {{{http://www.magnolia.info}magnolia}} module which integrates the - {{{http://mc4j.org/confluence/display/stripes/Home}Stripes}} MVC framework. - - After installed into magnolia, this module will allow you to use any available Stripes action as a Magnolia paragraph, - Any magically-converted Stripes action will still be able to use any standard Stripes feature, plus it will enjoy the - automatic injection of any paragraph property. - - <<This module requires magnolia 3.1-m3, and will not work on any earlier version!>> - -Configuration - - First of all drop the openutils-mgnlstripes jar and the stripes jar into WEB-INF/lib, or (better) if you are using maven - just declare the following dependency: - -+----------------------------------------------+ - <dependency> - <groupId>net.sourceforge.openutils</groupId> - <artifactId>openutils-mgnlstripes</artifactId> - <version>0.1</version> - </dependency> -+----------------------------------------------+ - - Then configure stripes in your web.xml as usual (see {{{http://mc4j.org/confluence/display/stripes/Quick+Start+Guide}}} for this. - - You only need to change the configuration for the stripes <<<ActionResolver.Class>>> in order to use - <<<it.openutils.magnoliastripes.MgnlActionResolver>>>. You can do that by adding/modifying the following init parameter - in WEB.xml: - - -+----------------------------------------------+ - <init-param> - <param-name>ActionResolver.Class</param-name> - <param-value>it.openutils.magnoliastripes.MgnlActionResolver</param-value> - </init-param> -+----------------------------------------------+ - -Usage - - When magnolia and stripes will startup now any auto-discovered stripes action will be configured in order to be used as - a magnolia paragraph. This means that paragraphs will be auto-generated, and they don't need to be configured into jcr. - - You should see a few <<<info>>> logs that enumerates the list of stripes paragraphs configured. By convention the name of - the paragraph is the same name of the Stripes action class minus action and lowercase. - - So <<<it.myapp.web.MyStripesAction >>> will be available as a paragraph named <<<mystripes>>>. - - Before being able to use any paragraph you will need to create a dialog for that. By convention the dialog should have - the same name of the paragraph so, following the previous example, you will need to configure a dialog called <<<mystripes>>>. - - Try to put a property called <<<title>>> in such dialog for a test. - - You are ready to use your paragraph into any magnolia template as usual: - -+----------------------------------------------+ - - <cms:contentNodeIterator contentNodeCollectionName="column"> - <cms:editBar adminOnly="true" /> - <cms:includeTemplate /> - </cms:contentNodeIterator> - <cms:newBar contentNodeCollectionName="column" paragraph="mystripes" adminOnly="true" /> - -+----------------------------------------------+ - - Try to add an instance of the <<<mystripes>>> paragraph. Set the title property to whatever you want, you - will be able to use it in your Stripes action bean. - - The following example show the code for the simple <<<MyStripesAction>>> that prints out the configured title to the log: - -+----------------------------------------------+ -package it.myapp.web; - -import net.sourceforge.stripes.action.ActionBean; -import net.sourceforge.stripes.action.ActionBeanContext; -import net.sourceforge.stripes.action.DefaultHandler; -import net.sourceforge.stripes.action.ForwardResolution; -import net.sourceforge.stripes.action.Resolution; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - -public class MyStripesAction implements ActionBean -{ - - private Logger log = LoggerFactory.getLogger(MyStripesAction.class); - - private String title; - - @Override - public ActionBeanContext getContext() - { - // TODO - return null; - } - - @Override - public void setContext(ActionBeanContext context) - { - // TODO - } - - public void setTitle(String title) - { - this.title = title; - } - - @DefaultHandler - public Resolution show() - { - - log.info("My title is: {}!", title); - - return new ForwardResolution("/templates/paragraphs/anyjsp.jsp"); - } -} -+----------------------------------------------+ - - As you can see, you will be able to mix parameters that you can use in Stripes action with pure content. Note that you - will not need to configure and use any magnolia paragraph property into your action since you can still use also the - standard magnolia tags in the jsp that is rendered by stripes! - - -Todo/improvements - - Warning! This is a preliminary technology-preview release! - - What does this means? Well, that it should work fine, but the integration is not yet complete and there are still some - missing features... be careful for what is know to not to work. - - - This is a list of know todos: - - * Important! reload stripes paragraph when the configuration of other paragraphs in magnolia is changed! At this moment - stripes paragraphs disappear after any change in paragraphs configured into jcr. - - * Handle multipart forms in request wrapper (should be easy to do) - - * A better way of handling multivalued properties in paragraph - - * Handle binary properties in paragraph - Copied: tags/openutils-mgnlstripes-0.1/src/site/apt/index.apt (from rev 398, trunk/openutils-mgnlstripes/src/site/apt/index.apt) =================================================================== --- tags/openutils-mgnlstripes-0.1/src/site/apt/index.apt (rev 0) +++ tags/openutils-mgnlstripes-0.1/src/site/apt/index.apt 2007-08-13 10:33:07 UTC (rev 400) @@ -0,0 +1,149 @@ + -------------------------- + openutils-mgnlstripes + -------------------------- + Fabrizio Giustina + -------------------------- + +About openutils-mgnlstripes + + openutils-mgnlstripes is a custom {{{http://www.magnolia.info}magnolia}} module which integrates the + {{{http://mc4j.org/confluence/display/stripes/Home}Stripes}} MVC framework. + + After installed into magnolia, this module will allow you to use any available Stripes action as a Magnolia paragraph, + Any magically-converted Stripes action will still be able to use any standard Stripes feature, plus it will enjoy the + automatic injection of any paragraph property. + + <<This module requires magnolia 3.1-m3, and will not work on any earlier version!>> + +Configuration + + First of all drop the openutils-mgnlstripes jar and the stripes jar into WEB-INF/lib, or (better) if you are using maven + just declare the following dependency: + ++----------------------------------------------+ + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnlstripes</artifactId> + <version>0.1</version> + </dependency> ++----------------------------------------------+ + + Then configure stripes in your web.xml as usual (see {{{http://mc4j.org/confluence/display/stripes/Quick+Start+Guide}}} for this. + + You only need to change the configuration for the stripes <<<ActionResolver.Class>>> in order to use + <<<it.openutils.magnoliastripes.MgnlActionResolver>>>. You can do that by adding/modifying the following init parameter + in WEB.xml: + + ++----------------------------------------------+ + <init-param> + <param-name>ActionResolver.Class</param-name> + <param-value>it.openutils.magnoliastripes.MgnlActionResolver</param-value> + </init-param> ++----------------------------------------------+ + +Usage + + When magnolia and stripes will startup now any auto-discovered stripes action will be configured in order to be used as + a magnolia paragraph. This means that paragraphs will be auto-generated, and they don't need to be configured into jcr. + + You should see a few <<<info>>> logs that enumerates the list of stripes paragraphs configured. By convention the name of + the paragraph is the same name of the Stripes action class minus action and lowercase. + + So <<<it.myapp.web.MyStripesAction >>> will be available as a paragraph named <<<mystripes>>>. + + Before being able to use any paragraph you will need to create a dialog for that. By convention the dialog should have + the same name of the paragraph so, following the previous example, you will need to configure a dialog called <<<mystripes>>>. + + Try to put a property called <<<title>>> in such dialog for a test. + + You are ready to use your paragraph into any magnolia template as usual: + ++----------------------------------------------+ + + <cms:contentNodeIterator contentNodeCollectionName="column"> + <cms:editBar adminOnly="true" /> + <cms:includeTemplate /> + </cms:contentNodeIterator> + <cms:newBar contentNodeCollectionName="column" paragraph="mystripes" adminOnly="true" /> + ++----------------------------------------------+ + + Try to add an instance of the <<<mystripes>>> paragraph. Set the title property to whatever you want, you + will be able to use it in your Stripes action bean. + + The following example show the code for the simple <<<MyStripesAction>>> that prints out the configured title to the log: + ++----------------------------------------------+ +package it.myapp.web; + +import net.sourceforge.stripes.action.ActionBean; +import net.sourceforge.stripes.action.ActionBeanContext; +import net.sourceforge.stripes.action.DefaultHandler; +import net.sourceforge.stripes.action.ForwardResolution; +import net.sourceforge.stripes.action.Resolution; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class MyStripesAction implements ActionBean +{ + + private Logger log = LoggerFactory.getLogger(MyStripesAction.class); + + private String title; + + @Override + public ActionBeanContext getContext() + { + // TODO + return null; + } + + @Override + public void setContext(ActionBeanContext context) + { + // TODO + } + + public void setTitle(String title) + { + this.title = title; + } + + @DefaultHandler + public Resolution show() + { + + log.info("My title is: {}!", title); + + return new ForwardResolution("/templates/paragraphs/anyjsp.jsp"); + } +} ++----------------------------------------------+ + + As you can see, you will be able to mix parameters that you can use in Stripes action with pure content. Note that you + will not need to configure and use any magnolia paragraph property into your action since you can still use also the + standard magnolia tags in the jsp that is rendered by stripes! + + +Todo/improvements + + Warning! This is a preliminary technology-preview release! + + What does this means? Well, that it should work fine, but the integration is not yet complete and there are still some + missing features... be careful for what is know to not to work. + + + This is a list of know todos: + + * Important! reload stripes paragraph when the configuration of other paragraphs in magnolia is changed! At this moment + stripes paragraphs disappear after any change in paragraphs configured into jcr. + + * Handle multipart forms in request wrapper (should be easy to do) + + * A better way of handling multivalued properties in paragraph + + * Handle binary properties in paragraph + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-13 10:32:54
|
Revision: 399 http://openutils.svn.sourceforge.net/openutils/?rev=399&view=rev Author: fgiust Date: 2007-08-13 03:32:56 -0700 (Mon, 13 Aug 2007) Log Message: ----------- [maven-release-plugin] prepare release openutils-mgnlstripes-0.1 Modified Paths: -------------- trunk/openutils-mgnlstripes/pom.xml Modified: trunk/openutils-mgnlstripes/pom.xml =================================================================== --- trunk/openutils-mgnlstripes/pom.xml 2007-08-13 10:25:18 UTC (rev 398) +++ trunk/openutils-mgnlstripes/pom.xml 2007-08-13 10:32:56 UTC (rev 399) @@ -1,6 +1,5 @@ <?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,7 +10,7 @@ <packaging>jar</packaging> <artifactId>openutils-mgnlstripes</artifactId> <name>openutils-mgnlstripes</name> - <version>0.1-SNAPSHOT</version> + <version>0.1</version> <build> <resources> <resource> @@ -72,4 +71,10 @@ </exclusions> </dependency> </dependencies> + + <scm> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-0.1</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlstripes-0.1</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlstripes-0.1</url> + </scm> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-13 10:25:20
|
Revision: 398 http://openutils.svn.sourceforge.net/openutils/?rev=398&view=rev Author: fgiust Date: 2007-08-13 03:25:18 -0700 (Mon, 13 Aug 2007) Log Message: ----------- fix website (still pretty ugly, but updated) Modified Paths: -------------- trunk/openutils-log4j/src/site/site.xml trunk/openutils-mgnlstripes/src/site/apt/index.apt trunk/pom.xml trunk/src/site/apt/index.apt trunk/src/site/site.xml Property Changed: ---------------- trunk/openutils-hibernate-security/ Property changes on: trunk/openutils-hibernate-security ___________________________________________________________________ Name: svn:ignore - target .settings .checkstyle .classpath .project + target .settings .checkstyle .classpath .project derby.log Modified: trunk/openutils-log4j/src/site/site.xml =================================================================== --- trunk/openutils-log4j/src/site/site.xml 2007-08-13 10:04:10 UTC (rev 397) +++ trunk/openutils-log4j/src/site/site.xml 2007-08-13 10:25:18 UTC (rev 398) @@ -15,6 +15,9 @@ <item name="filtered layout" href="filteredlayout.html" /> <item name="configuration servlet" href="servlet.html" /> </menu> - ${reports} + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> </body> </project> Modified: trunk/openutils-mgnlstripes/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-13 10:04:10 UTC (rev 397) +++ trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-13 10:25:18 UTC (rev 398) @@ -4,7 +4,7 @@ Fabrizio Giustina -------------------------- -About +About openutils-mgnlstripes openutils-mgnlstripes is a custom {{{http://www.magnolia.info}magnolia}} module which integrates the {{{http://mc4j.org/confluence/display/stripes/Home}Stripes}} MVC framework. Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-08-13 10:04:10 UTC (rev 397) +++ trunk/pom.xml 2007-08-13 10:25:18 UTC (rev 398) @@ -126,6 +126,27 @@ </additionalConfig> </configuration> </plugin> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>site-build</id> + <phase>site</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <copy overwrite="false" todir="src/site" flatten="true"> + <fileset dir=".."> + <include name="src/site/site.xml"></include> + </fileset> + </copy> + </tasks> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> <reporting> Modified: trunk/src/site/apt/index.apt =================================================================== --- trunk/src/site/apt/index.apt 2007-08-13 10:04:10 UTC (rev 397) +++ trunk/src/site/apt/index.apt 2007-08-13 10:25:18 UTC (rev 398) @@ -1,22 +1,19 @@ - -------------------------- - O p e n u t i l s - -------------------------- - Fabrizio Giustina - -------------------------- + -------------------------- + O p e n u t i l s + -------------------------- + Fabrizio Giustina + -------------------------- Openutils - Openutils is a collection of small java libraries, utilities and extensions for common frameworks and tools used in - j2ee projects. + Openutils is a collection of small java libraries, utilities and extensions for common frameworks and tools used in + j2ee projects. - Most of the code comes from projects developed at + Most of the code comes from projects developed at -[images/openmind-logo.png] openmind + [images/openmind-logo.png] openmind - {{{http://www.openmindonline.it}http://www.openmindonline.it}} + {{{http://www.openmindonline.it}http://www.openmindonline.it}} -* News - - * <November 14, 2005> {{{openutils-log4j/index.html}openutils-log4j}} 1.0 released! \ No newline at end of file Modified: trunk/src/site/site.xml =================================================================== --- trunk/src/site/site.xml 2007-08-13 10:04:10 UTC (rev 397) +++ trunk/src/site/site.xml 2007-08-13 10:25:18 UTC (rev 398) @@ -7,17 +7,13 @@ <bannerLeft> <name>Sourceforge</name> <src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src> - <href>http://www.sourceforge.net/projects/openutils</href> + <href>http://openutils.sourceforge.net</href> </bannerLeft> <body> - <menu name="Projects"> - <item name="openutils-log4j" href="openutils-log4j" /> - </menu> - <menu name="Sandbox"> - <item name="openutils-deployment" href="openutils-deployment" /> - <item name="openutils-bshd5" href="openutils-bshd5" /> - <item name="openutils-spring" href="openutils-spring" /> - </menu> - ${reports} + <menu ref="modules" inherit="bottom" /> + <menu ref="reports" inherit="bottom" /> + <head> + <style type="text/css" media="all">@import url(../css/site.css);</style> + </head> </body> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-13 10:04:09
|
Revision: 397 http://openutils.svn.sourceforge.net/openutils/?rev=397&view=rev Author: fgiust Date: 2007-08-13 03:04:10 -0700 (Mon, 13 Aug 2007) Log Message: ----------- basic documentation Added Paths: ----------- trunk/openutils-mgnlstripes/src/site/ trunk/openutils-mgnlstripes/src/site/apt/ trunk/openutils-mgnlstripes/src/site/apt/index.apt Added: trunk/openutils-mgnlstripes/src/site/apt/index.apt =================================================================== --- trunk/openutils-mgnlstripes/src/site/apt/index.apt (rev 0) +++ trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-13 10:04:10 UTC (rev 397) @@ -0,0 +1,149 @@ + -------------------------- + openutils-mgnlstripes + -------------------------- + Fabrizio Giustina + -------------------------- + +About + + openutils-mgnlstripes is a custom {{{http://www.magnolia.info}magnolia}} module which integrates the + {{{http://mc4j.org/confluence/display/stripes/Home}Stripes}} MVC framework. + + After installed into magnolia, this module will allow you to use any available Stripes action as a Magnolia paragraph, + Any magically-converted Stripes action will still be able to use any standard Stripes feature, plus it will enjoy the + automatic injection of any paragraph property. + + <<This module requires magnolia 3.1-m3, and will not work on any earlier version!>> + +Configuration + + First of all drop the openutils-mgnlstripes jar and the stripes jar into WEB-INF/lib, or (better) if you are using maven + just declare the following dependency: + ++----------------------------------------------+ + <dependency> + <groupId>net.sourceforge.openutils</groupId> + <artifactId>openutils-mgnlstripes</artifactId> + <version>0.1</version> + </dependency> ++----------------------------------------------+ + + Then configure stripes in your web.xml as usual (see {{{http://mc4j.org/confluence/display/stripes/Quick+Start+Guide}}} for this. + + You only need to change the configuration for the stripes <<<ActionResolver.Class>>> in order to use + <<<it.openutils.magnoliastripes.MgnlActionResolver>>>. You can do that by adding/modifying the following init parameter + in WEB.xml: + + ++----------------------------------------------+ + <init-param> + <param-name>ActionResolver.Class</param-name> + <param-value>it.openutils.magnoliastripes.MgnlActionResolver</param-value> + </init-param> ++----------------------------------------------+ + +Usage + + When magnolia and stripes will startup now any auto-discovered stripes action will be configured in order to be used as + a magnolia paragraph. This means that paragraphs will be auto-generated, and they don't need to be configured into jcr. + + You should see a few <<<info>>> logs that enumerates the list of stripes paragraphs configured. By convention the name of + the paragraph is the same name of the Stripes action class minus action and lowercase. + + So <<<it.myapp.web.MyStripesAction >>> will be available as a paragraph named <<<mystripes>>>. + + Before being able to use any paragraph you will need to create a dialog for that. By convention the dialog should have + the same name of the paragraph so, following the previous example, you will need to configure a dialog called <<<mystripes>>>. + + Try to put a property called <<<title>>> in such dialog for a test. + + You are ready to use your paragraph into any magnolia template as usual: + ++----------------------------------------------+ + + <cms:contentNodeIterator contentNodeCollectionName="column"> + <cms:editBar adminOnly="true" /> + <cms:includeTemplate /> + </cms:contentNodeIterator> + <cms:newBar contentNodeCollectionName="column" paragraph="mystripes" adminOnly="true" /> + ++----------------------------------------------+ + + Try to add an instance of the <<<mystripes>>> paragraph. Set the title property to whatever you want, you + will be able to use it in your Stripes action bean. + + The following example show the code for the simple <<<MyStripesAction>>> that prints out the configured title to the log: + ++----------------------------------------------+ +package it.myapp.web; + +import net.sourceforge.stripes.action.ActionBean; +import net.sourceforge.stripes.action.ActionBeanContext; +import net.sourceforge.stripes.action.DefaultHandler; +import net.sourceforge.stripes.action.ForwardResolution; +import net.sourceforge.stripes.action.Resolution; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class MyStripesAction implements ActionBean +{ + + private Logger log = LoggerFactory.getLogger(MyStripesAction.class); + + private String title; + + @Override + public ActionBeanContext getContext() + { + // TODO + return null; + } + + @Override + public void setContext(ActionBeanContext context) + { + // TODO + } + + public void setTitle(String title) + { + this.title = title; + } + + @DefaultHandler + public Resolution show() + { + + log.info("My title is: {}!", title); + + return new ForwardResolution("/templates/paragraphs/anyjsp.jsp"); + } +} ++----------------------------------------------+ + + As you can see, you will be able to mix parameters that you can use in Stripes action with pure content. Note that you + will not need to configure and use any magnolia paragraph property into your action since you can still use also the + standard magnolia tags in the jsp that is rendered by stripes! + + +Todo/improvements + + Warning! This is a preliminary technology-preview release! + + What does this means? Well, that it should work fine, but the integration is not yet complete and there are still some + missing features... be careful for what is know to not to work. + + + This is a list of know todos: + + * Important! reload stripes paragraph when the configuration of other paragraphs in magnolia is changed! At this moment + stripes paragraphs disappear after any change in paragraphs configured into jcr. + + * Handle multipart forms in request wrapper (should be easy to do) + + * A better way of handling multivalued properties in paragraph + + * Handle binary properties in paragraph + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2007-08-13 09:14:48
|
Revision: 396 http://openutils.svn.sourceforge.net/openutils/?rev=396&view=rev Author: fgiust Date: 2007-08-13 02:14:52 -0700 (Mon, 13 Aug 2007) Log Message: ----------- re-enabling magnolia modules Modified Paths: -------------- trunk/pom.xml Modified: trunk/pom.xml =================================================================== --- trunk/pom.xml 2007-08-13 09:12:49 UTC (rev 395) +++ trunk/pom.xml 2007-08-13 09:14:52 UTC (rev 396) @@ -181,9 +181,7 @@ <module>openutils-configuration-dataobjects</module> <module>openutils-configuration-services</module> <module>openutils-hibernate-security</module> - <!-- - <module>openutils-mgnlspring</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. |