portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r434090 - in /portals/jetspeed-2/trunk/components/registry: ./ etc/ etc/assembly/ src/java/org/apache/jetspeed/components/portletentity/ src/test/org/apache/jetspeed/components/portletentity/ src/test/org/apache/jetspeed/components/portletr...
Date Wed, 23 Aug 2006 17:26:45 GMT
Author: taylor
Date: Wed Aug 23 10:26:44 2006
New Revision: 434090

URL: http://svn.apache.org/viewvc?rev=434090&view=rev
Log:
maven-1 tests now passing
not sure how to configure resources with maven-2 yet...

Added:
    portals/jetspeed-2/trunk/components/registry/etc/
    portals/jetspeed-2/trunk/components/registry/etc/assembly/
    portals/jetspeed-2/trunk/components/registry/etc/assembly/registry-test.xml
Modified:
    portals/jetspeed-2/trunk/components/registry/project.xml
    portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java
    portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java
    portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java
    portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java

Added: portals/jetspeed-2/trunk/components/registry/etc/assembly/registry-test.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/registry/etc/assembly/registry-test.xml?rev=434090&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/etc/assembly/registry-test.xml (added)
+++ portals/jetspeed-2/trunk/components/registry/etc/assembly/registry-test.xml Wed Aug 23
10:26:44 2006
@@ -0,0 +1,140 @@
+<?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
+    
+    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.
+-->
+<beans>
+
+    <!-- Portlet Factory -->
+    <bean id="portletFactory" class="org.apache.jetspeed.factory.JetspeedPortletFactory"></bean>
+
+    <!-- Portlet Registry DAO-->
+    <bean id="portletRegistryImpl" class="org.apache.jetspeed.components.portletregistry.PersistenceBrokerPortletRegistry"
init-method="init">
+
+        <constructor-arg index="0">
+            <value>JETSPEED-INF/ojb/registry_repository.xml</value>
+        </constructor-arg>
+        <constructor-arg index="1">
+            <ref bean="portletFactory" />
+        </constructor-arg>
+    </bean>
+
+    <bean id="org.apache.jetspeed.components.portletregistry.PortletRegistry" name="portletRegistry"
parent="baseTransactionProxy">
+        <property name="proxyInterfaces">
+            <value>org.apache.jetspeed.components.portletregistry.PortletRegistry</value>
+        </property>
+
+        <property name="target">
+            <ref bean="portletRegistryImpl" />
+        </property>
+        <property name="transactionAttributes">
+            <props>
+                <prop key="register*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop>
+                <prop key="remove*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop>
+                <prop key="update*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop>
+                <prop key="save*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletregistry.RegistryException</prop>
+                <prop key="*">PROPAGATION_SUPPORTS</prop>
+            </props>
+        </property>
+    </bean>
+
+    <!-- Portlet Entity Access DAO-->
+    <!--
+        <bean id="systemCache" class="org.apache.jetspeed.cache.general.SimpleHashMapCache"
/>
+        
+        <bean id="systemCachingInterceptor" class="org.apache.jetspeed.components.interceptors.CachingInterceptor"
>
+        <constructor-arg>
+        <ref bean="systemCache"/>
+        </constructor-arg>
+        </bean>
+        
+        <bean id="systemRemoveFromCacheInterceptor" class="org.apache.jetspeed.components.interceptors.RemoveFromCacheInterceptor"
>
+        <constructor-arg>
+        <ref bean="systemCache"/>
+        </constructor-arg>
+        </bean>   	
+        
+        <bean id="portletEntityCachingAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
+        <property name="advice">
+        <ref bean="systemCachingInterceptor"/>
+        </property>
+        <property name="patterns">
+        <list>
+        <value>.*getPortletEntity.*</value>
+        </list>
+        </property>
+        </bean>
+        
+        <bean id="portletEntityRemoveFromCacheAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
+        <property name="advice">
+        <ref bean="systemRemoveFromCacheInterceptor"/>
+        </property>
+        <property name="patterns">
+        <list>
+        <value>.*removePortletEntity.*</value>
+        </list>
+        </property>
+        </bean>
+        
+    -->
+    <!--
+        - PortletEntity business object: OJB implementation, as an inner bean wrapped
+        - by an outer transactional proxy. The two bean definitions could have been separate,
+        - but this is cleaner as there is no need to ever access the unwrapped object.
+    -->
+
+    <bean id="portletEntityAccessImpl" class="org.apache.jetspeed.components.portletentity.PersistenceBrokerPortletEntityAccess"
+        name="portletEntityAccessImpl">
+        <constructor-arg>
+            <ref bean="portletRegistry" />
+        </constructor-arg>
+    </bean>
+
+    <bean id="org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent"
parent="baseTransactionProxy" name="portletEntityAccess">
+        <property name="proxyInterfaces">
+            <value>org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent</value>
+        </property>
+        <property name="target">
+            <ref bean="portletEntityAccessImpl" />
+        </property>
+        <!--
+            <property name="preInterceptors">
+            <list>
+            <ref bean="portletEntityCachingAdvisor"/>
+            <ref bean="portletEntityRemoveFromCacheAdvisor"/>
+            </list>
+            </property>
+        -->
+        <property name="transactionAttributes">
+            <props>
+                <prop key="remove*">PROPAGATION_REQUIRED</prop>
+                <prop key="store*">PROPAGATION_REQUIRED,-org.apache.jetspeed.components.portletentity.PortletEntityNotStoredException</prop>
+                <prop key="*">PROPAGATION_SUPPORTS</prop>
+            </props>
+        </property>
+    </bean>
+    
+  <!-- Inject Portlet Entity Proxy into Portlet Entity impl -->
+  <bean id="injectEntityAccessProxy" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+      <property name="targetObject"><ref bean="portletEntityAccessImpl"/></property>
+      <property name="targetMethod"><value>setEntityAccessProxy</value></property>
+      <property name="arguments">
+          <list>
+              <ref bean="org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent"/>
+          </list>
+      </property>
+  </bean>
+    
+</beans>

Modified: portals/jetspeed-2/trunk/components/registry/project.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/registry/project.xml?rev=434090&r1=434089&r2=434090&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/project.xml (original)
+++ portals/jetspeed-2/trunk/components/registry/project.xml Wed Aug 23 10:26:44 2006
@@ -127,6 +127,9 @@
                 <resource>
                     <directory>${basedir}/../../src/webapp/WEB-INF/assembly</directory>
                 </resource>
+                <resource>
+                    <directory>etc/assembly</directory>
+                </resource>
             </resources>
         </unitTest>
 

Modified: portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java?rev=434090&r1=434089&r2=434090&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java
Wed Aug 23 10:26:44 2006
@@ -421,6 +421,10 @@
      */
     public Principal getPrincipal()
     {
+        if (rcc == null)
+        {
+            return new PortletEntityUserPrincipal(NO_PRINCIPAL);
+        }            
         RequestContext rc = rcc.getRequestContext();
         Principal principal = rc.getUserPrincipal();
         if (principal == null)

Modified: portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java?rev=434090&r1=434089&r2=434090&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java
(original)
+++ portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletentity/TestPortletEntityDAO.java
Wed Aug 23 10:26:44 2006
@@ -292,6 +292,6 @@
     protected String[] getConfigurations()
     {
         return new String[]
-        { "transaction.xml", "registry.xml", "prefs.xml" };
+        { "transaction.xml", "registry-test.xml", "prefs.xml" };
     }
 }

Modified: portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java?rev=434090&r1=434089&r2=434090&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java
(original)
+++ portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/AbstractRegistryTest.java
Wed Aug 23 10:26:44 2006
@@ -202,7 +202,7 @@
     protected String[] getConfigurations()
     {
         return new String[]
-        { "transaction.xml", "prefs.xml", "registry.xml" };
+        { "transaction.xml", "prefs.xml", "registry-test.xml" };
     }
 
 }

Modified: portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java?rev=434090&r1=434089&r2=434090&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
(original)
+++ portals/jetspeed-2/trunk/components/registry/src/test/org/apache/jetspeed/components/portletregistry/TestPortletRegistryDAO.java
Wed Aug 23 10:26:44 2006
@@ -320,6 +320,6 @@
     protected String[] getConfigurations()
     {
         return new String[]
-        { "transaction.xml", "registry.xml", "prefs.xml" };
+        { "transaction.xml", "registry-test.xml", "prefs.xml" };
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message