You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-commits@incubator.apache.org by cl...@apache.org on 2005/07/28 05:47:57 UTC
svn commit: r225710 - in /incubator/graffito/trunk: engine/src/conf/
engine/src/test/org/apache/portals/graffito/engine/ jetspeed2-deploy/
jetspeed2-deploy/src/assembly/
Author: clombart
Date: Wed Jul 27 22:47:49 2005
New Revision: 225710
URL: http://svn.apache.org/viewcvs?rev=225710&view=rev
Log:
Add Graffito object model
Modified:
incubator/graffito/trunk/engine/src/conf/graffito.xml
incubator/graffito/trunk/engine/src/test/org/apache/portals/graffito/engine/TestSpringEngine.java
incubator/graffito/trunk/engine/src/test/org/apache/portals/graffito/engine/TestTransactionImpl.java
incubator/graffito/trunk/jetspeed2-deploy/.classpath
incubator/graffito/trunk/jetspeed2-deploy/src/assembly/graffito.xml
incubator/graffito/trunk/jetspeed2-deploy/src/assembly/jetspeed-spring.xml
incubator/graffito/trunk/jetspeed2-deploy/src/assembly/security-managers.xml
Modified: incubator/graffito/trunk/engine/src/conf/graffito.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/engine/src/conf/graffito.xml?rev=225710&r1=225709&r2=225710&view=diff
==============================================================================
--- incubator/graffito/trunk/engine/src/conf/graffito.xml (original)
+++ incubator/graffito/trunk/engine/src/conf/graffito.xml Wed Jul 27 22:47:49 2005
@@ -1,6 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<!--
Copyright 2004 The Apache Software Foundation
@@ -15,180 +14,256 @@
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.
--->
-
+-->
<!--
- Application context definition for Graffito.
- -->
-<beans>
-
- <bean id="transactionManager" class="org.springframework.orm.ojb.PersistenceBrokerTransactionManager"/>
-<!--
- TRANSACTION SETTING : currently, this setting is set into the J2 security dependencies.
- If Graffito is used without the J2 security stuff, you need to uncomment this tx setting
--->
-
- <!-- Transaction manager that delegates to JTA (for a transactional JNDI DataSource) -->
+ -->
+<beans>
+ <!-- Transaction manager for a single OJB PersistenceBroker (alternative to JTA) -->
+ <bean id="transactionManager" class="org.springframework.orm.ojb.PersistenceBrokerTransactionManager" />
+ <!-- Transaction manager that delegates to JTA (for a transactional JNDI DataSource) -->
<!--
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"/>
- -->
-
- <bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
- abstract="true">
- <property name="transactionManager"><ref bean="transactionManager"/></property>
- <property name="transactionAttributes">
- <props>
- <prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
- </props>
- </property>
- </bean>
-
-
-<!--
- Graffito MASTER STORE
- The Graffito master store is the mandatory content store in Graffito. It contains all other content store references and if needed some cms objects.
--->
-
- <!--The Graffito Master Store -->
- <bean id="graffitoMasterStore" class="org.apache.portals.graffito.model.impl.GraffitoServerImpl" >
- <!-- Either Alias property has to match datasource component & set into the OJB repository.xml
- OR Uses the other GraffitoServer attributes to init the connection -->
- <property name = "alias"><value>graffitoMasterStoreDB</value></property>
- <property name = "description"><value>The Graffito Master Server contains information about all server references. It may also contains some CMS content like documents or folder. </value></property>
- <property name = "scope"><value>/graffitotest</value></property>
- <property name = "title"><value>Graffito Master Server</value></property>
- <property name = "storeClassName"><value>org.apache.portals.graffito.store.impl.ojb.GraffitoOJBStore</value></property>
- </bean>
-
- <!--
+ -->
+ <bean id="baseTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
+ abstract="true">
+ <property name="transactionManager">
+ <ref bean="transactionManager"/>
+ </property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="*">PROPAGATION_REQUIRED, -ContentManagementException</prop>
+ </props>
+ </property>
+ </bean>
+ <!--
+ Graffito MASTER STORE
+ The graffito master store is the mandatory content store in graffito. It contains all other content store references and if needed some cms objects.
+-->
+ <!--The graffito Master Store -->
+ <bean id="graffitoMasterStore" class="org.apache.portals.graffito.model.server.impl.GraffitoServerImpl" >
+ <!-- Either Alias property has to match datasource component & set into the OJB repository.xml
+ OR Uses the other graffitoServerImpl attributes to init the connection -->
+ <property name = "alias">
+ <value>graffitoMasterStoreDB</value>
+ </property>
+ <property name = "description">
+ <value>The Graffito Master Server contains information about all server references. It may also contains some CMS
+ content like documents or folder. </value>
+ </property>
+ <property name = "scope">
+ <value>/graffitotest</value>
+ </property>
+ <property name = "title">
+ <value>graffito Master Server</value>
+ </property>
+ <property name = "storeClassName">
+ <value>org.apache.portals.graffito.store.impl.ojb.GraffitoOJBStore</value>
+ </property>
+ </bean>
+ <!--
CORE Graffito SERVICES
The main services used by the Graffito engine
- -->
-
- <!-- Cms Request Context manager -->
- <bean id="org.apache.portals.graffito.context.CmsRequestContextManager" class="org.apache.portals.graffito.context.impl.CmsRequestContextManagerImpl" />
-
- <!-- Access Controller -->
-
- <!-- Use the following access controller for JAAS & Jetspeed security components support-->
- <!--bean id="org.apache.portals.graffito.security.CmsAccessController" class="org.apache.portals.graffito.security.impl.CmsAccessControllerImpl" >
- <constructor-arg ><ref bean="org.apache.portals.graffito.context.CmsRequestContextManager"/></constructor-arg>
- </bean -->
-
- <bean id="org.apache.portals.graffito.security.CmsAccessController" class="org.apache.portals.graffito.security.impl.EmptyCmsAccessControllerImpl" />
-
- <!--Ojb Factory : used to access to the OJB Persistence Broker -->
- <bean id="org.apache.portals.graffito.store.impl.ojb.OjbFactory" class="org.apache.portals.graffito.store.impl.ojb.SpringOjbFactory" />
-
- <!-- Store service : manage the content stores plugged into Graffito -->
- <bean id="org.apache.portals.graffito.persistence.impl.ContentStoreServiceImpl" class="org.apache.portals.graffito.persistence.impl.ContentStoreServiceImpl" >
- <constructor-arg ><ref bean="org.apache.portals.graffito.security.CmsAccessController"/></constructor-arg>
- <constructor-arg ><ref bean="org.apache.portals.graffito.store.impl.ojb.OjbFactory"/></constructor-arg>
- </bean>
-
- <!-- Persistence Service -->
- <bean id="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl" class="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl" >
- <constructor-arg ><ref bean="graffitoMasterStore"/></constructor-arg>
- <constructor-arg ><ref bean="org.apache.portals.graffito.persistence.impl.ContentStoreServiceImpl"/></constructor-arg>
- </bean>
-
- <!-- Content Version Service -->
- <bean id="org.apache.portals.graffito.impl.ContentVersionServiceImpl" class="org.apache.portals.graffito.impl.ContentVersionServiceImpl" >
- <constructor-arg ><ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
- </bean>
-
- <!-- Content Model Service -->
- <bean id="org.apache.portals.graffito.impl.ContentModelServiceImpl" class="org.apache.portals.graffito.impl.ContentModelServiceImpl" >
- <constructor-arg ><ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
- <constructor-arg ><ref bean="org.apache.portals.graffito.impl.ContentVersionServiceImpl"/></constructor-arg>
- </bean>
-
-
- <!-- Content Search Service -->
- <bean id="org.apache.portals.graffito.impl.ContentSearchServiceImpl"
- class="org.apache.portals.graffito.impl.ContentSearchServiceImpl" >
- <constructor-arg ><ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
- <constructor-arg><value>./index</value></constructor-arg>
- </bean>
-
- <!-- Content Server Service -->
- <bean id="org.apache.portals.graffito.impl.ContentServerServiceImpl"
- class="org.apache.portals.graffito.impl.ContentServerServiceImpl" >
- <constructor-arg ><ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
- </bean>
-
-
-
- <!--
+ -->
+
+ <bean id="org.apache.portals.graffito.security.CmsAccessController" class="org.apache.portals.graffito.security.impl.EmptyCmsAccessControllerImpl" />
+
+
+ <!-- Cms Request Context manager -->
+ <bean id="org.apache.portals.graffito.context.CmsRequestContextManager"
+ class="org.apache.portals.graffito.context.impl.CmsRequestContextManagerImpl" />
+ <!--Ojb Factory : used to access to the OJB Persistence Broker -->
+ <bean id="org.apache.portals.graffito.store.impl.ojb.OjbFactory"
+ class="org.apache.portals.graffito.store.impl.ojb.SpringOjbFactory" />
+ <!-- Store service : manage the content stores plugged into Graffito -->
+ <bean id="org.apache.portals.graffito.persistence.impl.ContentStoreServiceImpl"
+ class="org.apache.portals.graffito.persistence.impl.ContentStoreServiceImpl" >
+ <constructor-arg >
+ <ref bean="org.apache.portals.graffito.security.CmsAccessController"/>
+ </constructor-arg>
+ <constructor-arg >
+ <ref bean="org.apache.portals.graffito.store.impl.ojb.OjbFactory"/>
+ </constructor-arg>
+ </bean>
+ <!-- Persistence Service -->
+ <bean id="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"
+ class="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl" >
+ <constructor-arg >
+ <ref bean="graffitoMasterStore"/>
+ </constructor-arg>
+ <constructor-arg >
+ <ref bean="org.apache.portals.graffito.persistence.impl.ContentStoreServiceImpl"/>
+ </constructor-arg>
+ </bean>
+ <!-- Content Version Service -->
+ <bean id="org.apache.portals.graffito.services.core.impl.ContentVersionServiceImpl"
+ class="org.apache.portals.graffito.services.core.impl.ContentVersionServiceImpl" >
+ <constructor-arg >
+ <ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/>
+ </constructor-arg>
+ </bean>
+ <!-- Content Model Service -->
+ <bean id="org.apache.portals.graffito.services.core.impl.ContentModelServiceImpl"
+ class="org.apache.portals.graffito.services.core.impl.ContentModelServiceImpl" >
+ <constructor-arg >
+ <ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/>
+ </constructor-arg>
+ <constructor-arg >
+ <ref bean="org.apache.portals.graffito.services.core.impl.ContentVersionServiceImpl"/>
+ </constructor-arg>
+ </bean>
+ <!-- Document Model Service -->
+ <bean id="org.apache.portals.graffito.services.dm.impl.DocumentModelServiceImpl"
+ class="org.apache.portals.graffito.services.dm.impl.DocumentModelServiceImpl" >
+ <constructor-arg >
+ <ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/>
+ </constructor-arg>
+ <constructor-arg >
+ <ref bean="org.apache.portals.graffito.services.core.impl.ContentVersionServiceImpl"/>
+ </constructor-arg>
+ </bean>
+ <!-- Content Search Service -->
+ <bean id="org.apache.portals.graffito.services.search.impl.ContentSearchServiceImpl"
+ class="org.apache.portals.graffito.services.search.impl.ContentSearchServiceImpl" >
+ <constructor-arg >
+ <ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/>
+ </constructor-arg>
+ <constructor-arg>
+ <value>./index</value>
+ </constructor-arg>
+ </bean>
+ <!-- Content Server Service -->
+ <bean id="org.apache.portals.graffito.services.core.impl.ContentServerServiceImpl"
+ class="org.apache.portals.graffito.services.core.impl.ContentServerServiceImpl" >
+ <constructor-arg >
+ <ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/>
+ </constructor-arg>
+ </bean>
+ <!--
SPRING TRANSACTIONNAL PROXIES
Thoses spring proxies contains the declarative transaction management setting
- -->
-
- <bean id="org.apache.portals.graffito.persistence.ContentPersistenceService" parent="baseTransactionProxy" name="contentPersistence" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
- <property name="proxyInterfaces"><value>org.apache.portals.graffito.persistence.ContentPersistenceService</value></property>
- <property name="target"><ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl" /></property>
- <property name="transactionAttributes">
- <props>
- <prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
- </props>
- </property>
- </bean>
-
-
- <bean id="org.apache.portals.graffito.ContentVersionService" parent="baseTransactionProxy" name="contentVersion" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
- <property name="proxyInterfaces"><value>org.apache.portals.graffito.ContentVersionService</value></property>
- <property name="target"><ref bean="org.apache.portals.graffito.impl.ContentVersionServiceImpl" /></property>
- <property name="transactionAttributes">
- <props>
- <prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
- </props>
- </property>
- </bean>
-
- <bean id="org.apache.portals.graffito.ContentModelService" parent="baseTransactionProxy" name="contentModel" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
- <property name="proxyInterfaces"><value>org.apache.portals.graffito.ContentModelService</value></property>
- <property name="target"><ref bean="org.apache.portals.graffito.impl.ContentModelServiceImpl" /></property>
- <property name="transactionAttributes">
- <props>
- <prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
- </props>
- </property>
- </bean>
-
- <bean id="org.apache.portals.graffito.ContentSearchService" parent="baseTransactionProxy" name="contentSearch" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
- <property name="proxyInterfaces"><value>org.apache.portals.graffito.ContentSearchService</value></property>
- <property name="target"><ref bean="org.apache.portals.graffito.impl.ContentSearchServiceImpl" /></property>
- <property name="transactionAttributes">
- <props>
- <prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
- </props>
- </property>
- </bean>
-
-
- <bean id="org.apache.portals.graffito.ContentServerService" parent="baseTransactionProxy" name="contentServer" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
- <property name="proxyInterfaces"><value>org.apache.portals.graffito.ContentServerService</value></property>
- <property name="target"><ref bean="org.apache.portals.graffito.impl.ContentServerServiceImpl" /></property>
- <property name="transactionAttributes">
- <props>
- <prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
- </props>
- </property>
- </bean>
-
- <bean id="TestTransaction" class="org.apache.portals.graffito.engine.TestTransactionImpl" >
- <constructor-arg ><ref bean="org.apache.portals.graffito.ContentModelService"/></constructor-arg>
- </bean>
-
-
- <bean id="TxUnitTest" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
- <property name="transactionManager"><ref local="transactionManager"/></property>
- <property name="target"><ref local="TestTransaction"/></property>
- <property name="transactionAttributes">
- <props>
- <prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
- </props>
- </property>
- </bean>
-
+ -->
+ <bean id="org.apache.portals.graffito.persistence.ContentPersistenceService" parent="baseTransactionProxy"
+ name="contentPersistence" abstract="false" singleton="true" lazy-init="default" autowire="default"
+ dependency-check="default">
+ <property name="proxyInterfaces">
+ <value>org.apache.portals.graffito.persistence.ContentPersistenceService</value>
+ </property>
+ <property name="target">
+ <ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl" />
+ </property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="*">PROPAGATION_REQUIRED</prop>
+ </props>
+ </property>
+ </bean>
+ <bean id="org.apache.portals.graffito.services.core.ContentVersionService" parent="baseTransactionProxy"
+ name="contentVersion" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
+ <property name="proxyInterfaces">
+ <value>org.apache.portals.graffito.services.core.ContentVersionService</value>
+ </property>
+ <property name="target">
+ <ref bean="org.apache.portals.graffito.services.core.impl.ContentVersionServiceImpl" />
+ </property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="*">PROPAGATION_REQUIRED</prop>
+ </props>
+ </property>
+ </bean>
+ <bean id="org.apache.portals.graffito.services.core.ContentModelService" parent="baseTransactionProxy" name="contentModel"
+ abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
+ <property name="proxyInterfaces">
+ <value>org.apache.portals.graffito.services.core.ContentModelService</value>
+ </property>
+ <property name="target">
+ <ref bean="org.apache.portals.graffito.services.core.impl.ContentModelServiceImpl" />
+ </property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="*">PROPAGATION_REQUIRED</prop>
+ </props>
+ </property>
+ </bean>
+ <bean id="org.apache.portals.graffito.services.dm.DocumentModelService" parent="baseTransactionProxy" name="documentModel"
+ abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
+ <property name="proxyInterfaces">
+ <value>org.apache.portals.graffito.services.dm.DocumentModelService</value>
+ </property>
+ <property name="target">
+ <ref bean="org.apache.portals.graffito.services.dm.impl.DocumentModelServiceImpl" />
+ </property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="*">PROPAGATION_REQUIRED</prop>
+ </props>
+ </property>
+ </bean>
+ <bean id="org.apache.portals.graffito.services.search.ContentSearchService" parent="baseTransactionProxy" name="contentSearch"
+ abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
+ <property name="proxyInterfaces">
+ <value>org.apache.portals.graffito.services.search.ContentSearchService</value>
+ </property>
+ <property name="target">
+ <ref bean="org.apache.portals.graffito.services.search.impl.ContentSearchServiceImpl" />
+ </property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="*">PROPAGATION_REQUIRED</prop>
+ </props>
+ </property>
+ </bean>
+ <bean id="org.apache.portals.graffito.services.core.ContentServerService" parent="baseTransactionProxy" name="contentServer"
+ abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
+ <property name="proxyInterfaces">
+ <value>org.apache.portals.graffito.services.core.ContentServerService</value>
+ </property>
+ <property name="target">
+ <ref bean="org.apache.portals.graffito.services.core.impl.ContentServerServiceImpl" />
+ </property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="*">PROPAGATION_REQUIRED</prop>
+ </props>
+ </property>
+ </bean>
+ <!-- USED ONLY FOR THE UNIT TEST / This bean is not necessary if Graffito is running in a Jetspeed 2 application -->
+ <!-- Security: Permission Service -->
+ <bean id="org.apache.portals.graffito.services.core.impl.ContentPermissionServiceImpl"
+ class="org.apache.portals.graffito.services.core.impl.ContentPermissionServiceImpl" />
+ <bean id="org.apache.portals.graffito.services.core.ContentPermissionService" parent="baseTransactionProxy"
+ name="graffitoPermissionService" >
+ <property name="proxyInterfaces">
+ <value>org.apache.portals.graffito.services.core.ContentPermissionService</value>
+ </property>
+ <property name="target">
+ <ref bean="org.apache.portals.graffito.services.core.impl.ContentPermissionServiceImpl"/>
+ </property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="remove*">PROPAGATION_REQUIRED</prop>
+ <prop key="grant*">PROPAGATION_REQUIRED</prop>
+ <prop key="revoke*">PROPAGATION_REQUIRED</prop>
+ <prop key="grant*">PROPAGATION_REQUIRED</prop>
+ <prop key="add*">PROPAGATION_REQUIRED</prop>
+ <prop key="*">PROPAGATION_SUPPORTS</prop>
+ </props>
+ </property>
+ </bean>
+
+ <bean id="TestTransaction" class="org.apache.portals.graffito.engine.TestTransactionImpl" >
+ <constructor-arg ><ref bean="org.apache.portals.graffito.services.core.ContentModelService"/></constructor-arg>
+ </bean>
+
+
+ <bean id="TxUnitTest" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
+ <property name="transactionManager"><ref local="transactionManager"/></property>
+ <property name="target"><ref local="TestTransaction"/></property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
+ </props>
+ </property>
+ </bean>
</beans>
Modified: incubator/graffito/trunk/engine/src/test/org/apache/portals/graffito/engine/TestSpringEngine.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/engine/src/test/org/apache/portals/graffito/engine/TestSpringEngine.java?rev=225710&r1=225709&r2=225710&view=diff
==============================================================================
--- incubator/graffito/trunk/engine/src/test/org/apache/portals/graffito/engine/TestSpringEngine.java (original)
+++ incubator/graffito/trunk/engine/src/test/org/apache/portals/graffito/engine/TestSpringEngine.java Wed Jul 27 22:47:49 2005
@@ -18,20 +18,17 @@
import java.io.FileInputStream;
import junit.framework.TestCase;
+
import org.apache.commons.configuration.PropertiesConfiguration;
import org.apache.commons.pool.impl.GenericObjectPool;
-
-
import org.apache.jetspeed.components.ComponentManager;
import org.apache.jetspeed.components.datasource.BoundDBCPDatasourceComponent;
import org.apache.jetspeed.components.jndi.JNDIComponent;
import org.apache.jetspeed.components.jndi.TyrexJNDIComponent;
import org.apache.portals.graffito.Graffito;
-import org.apache.portals.graffito.engine.Engine;
-import org.apache.portals.graffito.engine.SpringEngine;
-import org.apache.portals.graffito.ContentModelService;
import org.apache.portals.graffito.exception.ContentManagementException;
-import org.apache.portals.graffito.model.Folder;
+import org.apache.portals.graffito.model.core.Folder;
+import org.apache.portals.graffito.services.core.ContentModelService;
/**
* @author <a href="mailto:christophe.lombart@sword-technologies.com">Christophe Lombart</a>
@@ -99,7 +96,7 @@
System.out.println("Graffito Engine test : Get the content model service");
- ContentModelService contentModelService = (ContentModelService) cm.getComponent("org.apache.portals.graffito.ContentModelService");
+ ContentModelService contentModelService = (ContentModelService) cm.getComponent("org.apache.portals.graffito.services.core.ContentModelService");
assertTrue("Invalid number of children", contentModelService.getChildren("/graffitotest").size() == 0 );
// Create 2 folders in the same tx
Modified: incubator/graffito/trunk/engine/src/test/org/apache/portals/graffito/engine/TestTransactionImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/engine/src/test/org/apache/portals/graffito/engine/TestTransactionImpl.java?rev=225710&r1=225709&r2=225710&view=diff
==============================================================================
--- incubator/graffito/trunk/engine/src/test/org/apache/portals/graffito/engine/TestTransactionImpl.java (original)
+++ incubator/graffito/trunk/engine/src/test/org/apache/portals/graffito/engine/TestTransactionImpl.java Wed Jul 27 22:47:49 2005
@@ -20,9 +20,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.portals.graffito.ContentModelService;
import org.apache.portals.graffito.exception.ContentManagementException;
-import org.apache.portals.graffito.model.Folder;
+import org.apache.portals.graffito.model.core.Folder;
+import org.apache.portals.graffito.services.core.ContentModelService;
@@ -58,9 +58,7 @@
folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
folder.setLastModified(new Timestamp(System.currentTimeMillis()));
- folder.setDescription("Folder 1");
folder.setName("folder1");
- folder.setTitle("Folder 1 Title");
folder.setUri("/graffitotest/folder1");
log.info("Add folder 1");
@@ -70,9 +68,7 @@
folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
folder.setLastModified(new Timestamp(System.currentTimeMillis()));
- folder.setDescription("Folder 2");
folder.setName("folder2");
- folder.setTitle("Folder 2 Title");
folder.setUri("/graffitotest/folder2");
log.info("Add folder 2");
@@ -90,9 +86,7 @@
folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
folder.setLastModified(new Timestamp(System.currentTimeMillis()));
- folder.setDescription("Folder 1");
folder.setName("folder1");
- folder.setTitle("Folder 1 Title");
folder.setUri("/graffitotest/folder1");
log.info("Add folder 1");
@@ -102,9 +96,7 @@
folder.setCreationDate(new Timestamp(System.currentTimeMillis()));
folder.setLastModified(new Timestamp(System.currentTimeMillis()));
- folder.setDescription("Folder 2");
folder.setName("folder2");
- folder.setTitle("Folder 2 Title");
folder.setUri("/graffitotest/folder2");
log.info("Add folder 2");
Modified: incubator/graffito/trunk/jetspeed2-deploy/.classpath
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jetspeed2-deploy/.classpath?rev=225710&r1=225709&r2=225710&view=diff
==============================================================================
--- incubator/graffito/trunk/jetspeed2-deploy/.classpath (original)
+++ incubator/graffito/trunk/jetspeed2-deploy/.classpath Wed Jul 27 22:47:49 2005
@@ -5,11 +5,11 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
</classpathentry>
- <classpathentry kind="var" path="MAVEN_REPO/jetspeed2/jars/jetspeed-2.0-M3-dev.jar">
+ <classpathentry kind="var" path="MAVEN_REPO/jetspeed2/jars/jetspeed-2.0-M3.jar">
</classpathentry>
- <classpathentry kind="var" path="MAVEN_REPO/jetspeed2/jars/jetspeed-api-2.0-M3-dev.jar">
+ <classpathentry kind="var" path="MAVEN_REPO/jetspeed2/jars/jetspeed-api-2.0-M3.jar">
</classpathentry>
- <classpathentry kind="var" path="MAVEN_REPO/jetspeed2/jars/jetspeed-components-2.0-M3-dev.jar">
+ <classpathentry kind="var" path="MAVEN_REPO/jetspeed2/jars/jetspeed-components-2.0-M3.jar">
</classpathentry>
<classpathentry kind="var" path="MAVEN_REPO/graffito/jars/graffito-commons-1.0-a1-dev.jar">
</classpathentry>
Modified: incubator/graffito/trunk/jetspeed2-deploy/src/assembly/graffito.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jetspeed2-deploy/src/assembly/graffito.xml?rev=225710&r1=225709&r2=225710&view=diff
==============================================================================
--- incubator/graffito/trunk/jetspeed2-deploy/src/assembly/graffito.xml (original)
+++ incubator/graffito/trunk/jetspeed2-deploy/src/assembly/graffito.xml Wed Jul 27 22:47:49 2005
@@ -30,7 +30,7 @@
-->
<!--The Graffito Master Store -->
- <bean id="graffitoMasterStore" class="org.apache.portals.graffito.model.impl.GraffitoServerImpl" >
+ <bean id="graffitoMasterStore" class="org.apache.portals.graffito.model.server.impl.GraffitoServerImpl" >
<!-- Either Alias property has to match datasource component & set into the OJB repository.xml
OR Uses the other Server attributes to init the connection -->
<property name = "alias"><value>jetspeed</value></property>
@@ -74,27 +74,32 @@
</bean>
<!-- Content Version Service -->
- <bean id="org.apache.portals.graffito.impl.ContentVersionServiceImpl" class="org.apache.portals.graffito.impl.ContentVersionServiceImpl" >
+ <bean id="org.apache.portals.graffito.services.core.impl.ContentVersionServiceImpl" class="org.apache.portals.graffito.services.core.impl.ContentVersionServiceImpl" >
<constructor-arg ><ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
</bean>
<!-- Content Model Service -->
- <bean id="org.apache.portals.graffito.impl.ContentModelServiceImpl" class="org.apache.portals.graffito.impl.ContentModelServiceImpl" >
+ <bean id="org.apache.portals.graffito.services.core.impl.ContentModelServiceImpl" class="org.apache.portals.graffito.services.core.impl.ContentModelServiceImpl" >
<constructor-arg ><ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
- <constructor-arg ><ref bean="org.apache.portals.graffito.impl.ContentVersionServiceImpl"/></constructor-arg>
+ <constructor-arg ><ref bean="org.apache.portals.graffito.services.core.impl.ContentVersionServiceImpl"/></constructor-arg>
</bean>
+ <!-- Content Model Service -->
+ <bean id="org.apache.portals.graffito.services.dm.impl.DocumentModelServiceImpl" class="org.apache.portals.graffito.services.dm.impl.DocumentModelServiceImpl" >
+ <constructor-arg ><ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
+ <constructor-arg ><ref bean="org.apache.portals.graffito.services.core.impl.ContentVersionServiceImpl"/></constructor-arg>
+ </bean>
<!-- Content Search Service -->
- <bean id="org.apache.portals.graffito.impl.ContentSearchServiceImpl"
- class="org.apache.portals.graffito.impl.ContentSearchServiceImpl" >
+ <bean id="org.apache.portals.graffito.services.search.impl.ContentSearchServiceImpl"
+ class="org.apache.portals.graffito.services.search.impl.ContentSearchServiceImpl" >
<constructor-arg ><ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
<constructor-arg><value>./index</value></constructor-arg>
</bean>
<!-- Content Server Service -->
- <bean id="org.apache.portals.graffito.impl.ContentServerServiceImpl"
- class="org.apache.portals.graffito.impl.ContentServerServiceImpl" >
+ <bean id="org.apache.portals.graffito.services.core.impl.ContentServerServiceImpl"
+ class="org.apache.portals.graffito.services.core.impl.ContentServerServiceImpl" >
<constructor-arg ><ref bean="org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl"/></constructor-arg>
</bean>
@@ -116,9 +121,9 @@
</bean>
- <bean id="org.apache.portals.graffito.ContentVersionService" parent="baseTransactionProxy" name="contentVersion" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
- <property name="proxyInterfaces"><value>org.apache.portals.graffito.ContentVersionService</value></property>
- <property name="target"><ref bean="org.apache.portals.graffito.impl.ContentVersionServiceImpl" /></property>
+ <bean id="org.apache.portals.graffito.services.core.ContentVersionService" parent="baseTransactionProxy" name="contentVersion" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
+ <property name="proxyInterfaces"><value>org.apache.portals.graffito.services.core.ContentVersionService</value></property>
+ <property name="target"><ref bean="org.apache.portals.graffito.services.core.impl.ContentVersionServiceImpl" /></property>
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
@@ -126,9 +131,9 @@
</property>
</bean>
- <bean id="org.apache.portals.graffito.ContentModelService" parent="baseTransactionProxy" name="contentModel" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
- <property name="proxyInterfaces"><value>org.apache.portals.graffito.ContentModelService</value></property>
- <property name="target"><ref bean="org.apache.portals.graffito.impl.ContentModelServiceImpl" /></property>
+ <bean id="org.apache.portals.graffito.services.core.ContentModelService" parent="baseTransactionProxy" name="contentModel" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
+ <property name="proxyInterfaces"><value>org.apache.portals.graffito.services.core.ContentModelService</value></property>
+ <property name="target"><ref bean="org.apache.portals.graffito.services.core.impl.ContentModelServiceImpl" /></property>
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
@@ -136,9 +141,19 @@
</property>
</bean>
- <bean id="org.apache.portals.graffito.ContentSearchService" parent="baseTransactionProxy" name="contentSearch" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
- <property name="proxyInterfaces"><value>org.apache.portals.graffito.ContentSearchService</value></property>
- <property name="target"><ref bean="org.apache.portals.graffito.impl.ContentSearchServiceImpl" /></property>
+ <bean id="org.apache.portals.graffito.services.dm.DocumentModelService" parent="baseTransactionProxy" name="documentModel" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
+ <property name="proxyInterfaces"><value>org.apache.portals.graffito.services.dm.DocumentModelService</value></property>
+ <property name="target"><ref bean="org.apache.portals.graffito.services.dm.impl.DocumentModelServiceImpl" /></property>
+ <property name="transactionAttributes">
+ <props>
+ <prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
+ </props>
+ </property>
+ </bean>
+
+ <bean id="org.apache.portals.graffito.services.search.ContentSearchService" parent="baseTransactionProxy" name="contentSearch" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
+ <property name="proxyInterfaces"><value>org.apache.portals.graffito.services.search.ContentSearchService</value></property>
+ <property name="target"><ref bean="org.apache.portals.graffito.services.search.impl.ContentSearchServiceImpl" /></property>
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
@@ -147,9 +162,9 @@
</bean>
- <bean id="org.apache.portals.graffito.ContentServerService" parent="baseTransactionProxy" name="contentServer" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
- <property name="proxyInterfaces"><value>org.apache.portals.graffito.ContentServerService</value></property>
- <property name="target"><ref bean="org.apache.portals.graffito.impl.ContentServerServiceImpl" /></property>
+ <bean id="org.apache.portals.graffito.services.core.ContentServerService" parent="baseTransactionProxy" name="contentServer" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
+ <property name="proxyInterfaces"><value>org.apache.portals.graffito.services.core.ContentServerService</value></property>
+ <property name="target"><ref bean="org.apache.portals.graffito.services.core.impl.ContentServerServiceImpl" /></property>
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED,-ContentManagementException</prop>
Modified: incubator/graffito/trunk/jetspeed2-deploy/src/assembly/jetspeed-spring.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jetspeed2-deploy/src/assembly/jetspeed-spring.xml?rev=225710&r1=225709&r2=225710&view=diff
==============================================================================
--- incubator/graffito/trunk/jetspeed2-deploy/src/assembly/jetspeed-spring.xml (original)
+++ incubator/graffito/trunk/jetspeed2-deploy/src/assembly/jetspeed-spring.xml Wed Jul 27 22:47:49 2005
@@ -84,13 +84,16 @@
<ref bean='IdGenerator'/>
</entry>
<entry key='ContentModel'>
- <ref bean='org.apache.portals.graffito.ContentModelService'/>
+ <ref bean='org.apache.portals.graffito.services.core.ContentModelService'/>
</entry>
+ <entry key='DocumentModel'>
+ <ref bean='org.apache.portals.graffito.services.dm.DocumentModelService'/>
+ </entry>
<entry key='ContentServer'>
- <ref bean='org.apache.portals.graffito.ContentServerService'/>
+ <ref bean='org.apache.portals.graffito.services.core.ContentServerService'/>
</entry>
<entry key='ContentSearch'>
- <ref bean='org.apache.portals.graffito.ContentSearchService'/>
+ <ref bean='org.apache.portals.graffito.services.search.ContentSearchService'/>
</entry>
</map>
</constructor-arg>
Modified: incubator/graffito/trunk/jetspeed2-deploy/src/assembly/security-managers.xml
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jetspeed2-deploy/src/assembly/security-managers.xml?rev=225710&r1=225709&r2=225710&view=diff
==============================================================================
--- incubator/graffito/trunk/jetspeed2-deploy/src/assembly/security-managers.xml (original)
+++ incubator/graffito/trunk/jetspeed2-deploy/src/assembly/security-managers.xml Wed Jul 27 22:47:49 2005
@@ -40,12 +40,12 @@
<!-- Security: Permission Manager -->
<bean id="org.apache.jetspeed.security.impl.PermissionManagerImpl"
- class="org.apache.portals.graffito.impl.ContentPermissionServiceImpl" />
+ class="org.apache.portals.graffito.services.core.impl.ContentPermissionServiceImpl" />
<bean id="org.apache.jetspeed.security.PermissionManager" parent="baseTransactionProxy"
name="permissionManager" >
<property name="proxyInterfaces">
- <value>org.apache.portals.graffito.ContentPermissionService</value>
+ <value>org.apache.portals.graffito.services.core.ContentPermissionService</value>
</property>
<property name="target">
<ref bean="org.apache.jetspeed.security.impl.PermissionManagerImpl"/>