portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r722842 - in /portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security: ./ src/test/java/org/apache/jetspeed/security/ src/test/resources/
Date Wed, 03 Dec 2008 11:42:19 GMT
Author: woonsan
Date: Wed Dec  3 03:42:18 2008
New Revision: 722842

URL: http://svn.apache.org/viewvc?rev=722842&view=rev
Log:
fixed test cases on security components.

Added:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/resources/cache-test.xml
  (with props)
Modified:
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/pom.xml
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/AbstractSecurityTestcase.java
    portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestUserManager.java

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/pom.xml?rev=722842&r1=722841&r2=722842&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/pom.xml
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/pom.xml
Wed Dec  3 03:42:18 2008
@@ -58,6 +58,10 @@
             <groupId>${pom.groupId}</groupId>
             <artifactId>jetspeed-serializer</artifactId>
         </dependency>
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>jetspeed-file-cache</artifactId>
+        </dependency>
         <dependency>        
             <groupId>commons-codec</groupId>
             <artifactId>commons-codec</artifactId>
@@ -156,7 +160,7 @@
                                 <resources>
                                     <resource>
                                         <path>assembly</path>
-                                        <include>transaction.xml,cache.xml,security-*.xml,static-bean-references.xml,boot/datasource.xml</include>
+                                        <include>transaction.xml,security-*.xml,static-bean-references.xml,boot/datasource.xml</include>
                                     </resource>
                                     <resource>
                                         <path>db-ojb</path>

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/AbstractSecurityTestcase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/AbstractSecurityTestcase.java?rev=722842&r1=722841&r2=722842&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/AbstractSecurityTestcase.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/AbstractSecurityTestcase.java
Wed Dec  3 03:42:18 2008
@@ -128,7 +128,7 @@
         confList.add("security-spi.xml");
         confList.add("security-spi-atn.xml");
         confList.add("transaction.xml");
-        confList.add("cache.xml");
+        confList.add("cache-test.xml");
         confList.add("static-bean-references.xml");
         return (String[]) confList.toArray(new String[1]);
     }

Modified: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestUserManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestUserManager.java?rev=722842&r1=722841&r2=722842&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestUserManager.java
(original)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/java/org/apache/jetspeed/security/TestUserManager.java
Wed Dec  3 03:42:18 2008
@@ -180,7 +180,7 @@
             // Test that the user can log in.
             try
             {
-                PassiveCallbackHandler pch = new PassiveCallbackHandler("anon", "newpassword");
+                PassiveCallbackHandler pch = new PassiveCallbackHandler("anon", "password");
                 loginContext = new LoginContext("Jetspeed", pch);
                 loginContext.login();
                 loginContext.logout();

Added: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/resources/cache-test.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/resources/cache-test.xml?rev=722842&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/resources/cache-test.xml
(added)
+++ portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/resources/cache-test.xml
Wed Dec  3 03:42:18 2008
@@ -0,0 +1,276 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You 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 xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+    
+    <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <!--  get it through the class path
+            <property name="configLocation" value="${applicationRoot}/WEB-INF/conf/ehcache.xml"/>
+        -->
+    </bean>
+    
+    <!-- Page File Cache -->
+    <bean id="PageFileCache" class="org.apache.jetspeed.cache.file.FileCache" init-method="startFileScanner"
+        destroy-method="stopFileScanner">
+        <meta key="j2:cat" value="default,cache" />
+        <!-- Internal cache -->
+        <constructor-arg index="0">
+            <ref bean="internalPageFileCache" />
+        </constructor-arg>
+        <!-- Scan rate for changes in cached files on the file system -->
+        <constructor-arg index="1">
+            <value>10</value>
+        </constructor-arg>
+    </bean>
+    
+    <!-- Factory bean used to instantiate a EHCache with the specified name (and corresponding
+        configuration in cacheManager.xml -->
+    <bean id="ehPortletContentCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="portletContentCache" />
+    </bean>
+    
+    <bean id="ContentCacheKeyGenerator" class="org.apache.jetspeed.cache.impl.JetspeedCacheKeyGenerator">
+        <meta key="j2:cat" value="default,cache" />
+        <!-- Keys are order specific in the list:
+            where username  == the user principal name of the current user
+            pipeline  == the name of the active pipeline for the current request (portal
| desktop)
+            windowid  == the window id (fragment id) of the portlet
+            sessionid == the current session id 
+            request.{param.name} == request parameter name, such "request.myparam"
+            session.{attribute-name} == session attribute name, such "session.myattribute"
+            
+            username|sessionid AND windowid are required
+        -->
+        <constructor-arg index='0'>
+            <list>
+                <value>sessionid</value>
+                <value>pipeline</value>
+                <value>windowid</value>
+            </list>
+        </constructor-arg>
+    </bean>
+    
+    <bean id="portletContentCache" class="org.apache.jetspeed.cache.impl.EhPortletContentCacheImpl">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg index="0">
+            <ref bean="ehPortletContentCache" />
+        </constructor-arg>
+        <constructor-arg index="1">
+            <ref bean="preferencesCache" />
+        </constructor-arg>
+        <constructor-arg index="2">
+            <ref bean="ContentCacheKeyGenerator" />
+        </constructor-arg>
+    </bean>
+    
+    <bean id="ehDecorationContentCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="decorationContentCache" />
+    </bean>
+    
+    <bean id="decorationContentCache" class="org.apache.jetspeed.cache.impl.EhDecorationContentCacheImpl">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg index="0">
+            <ref bean="ehDecorationContentCache" />
+        </constructor-arg>
+        <constructor-arg index="1">
+            <ref bean="preferencesCache" />
+        </constructor-arg>
+        <constructor-arg index="2">
+            <ref bean="ContentCacheKeyGenerator" />
+        </constructor-arg>
+    </bean>
+    
+    <bean id="ehDecorationConfigurationCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="decorationConfigurationCache" />
+    </bean>
+    
+    <bean id="decorationConfigurationCache" class="org.apache.jetspeed.cache.impl.EhCacheImpl">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg>
+            <ref bean="ehDesktopContentCache" />
+        </constructor-arg>
+    </bean>
+    
+    <bean id="ehPreferencesCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="preferencesCache" />
+    </bean>
+    
+    <bean id="preferencesCache" class="org.apache.jetspeed.cache.impl.EhCacheDistributedImpl">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg>
+            <ref bean="ehPreferencesCache" />
+        </constructor-arg>
+    </bean>
+    
+    <bean id="ehPortletApplicationOidCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="portletApplicationOidCache" />
+    </bean>
+    
+    <bean id="ehPortletApplicationNameCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="portletApplicationNameCache" />
+    </bean>
+    
+    <bean id="ehDesktopContentCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="desktopContentCache" />
+    </bean>
+    
+    <bean id="portletApplicationOidCache" class="org.apache.jetspeed.cache.impl.EhCacheImpl">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg>
+            <ref bean="ehPortletApplicationOidCache" />
+        </constructor-arg>
+    </bean>
+    
+    <bean id="portletApplicationNameCache" class="org.apache.jetspeed.cache.impl.EhCacheDistributedImpl">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg>
+            <ref bean="ehPortletApplicationNameCache" />
+        </constructor-arg>
+    </bean>
+    
+    <bean id="desktopContentCache" class="org.apache.jetspeed.cache.impl.EhCacheImpl">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg>
+            <ref bean="ehDesktopContentCache" />
+        </constructor-arg>
+    </bean>
+    
+    <bean id="ehPortletDefinitionOidCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="portletDefinitionOidCache" />
+    </bean>
+    
+    <bean id="ehPortletDefinitionNameCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="portletDefinitionNameCache" />
+    </bean>
+    
+    
+    <bean id="portletDefinitionOidCache" class="org.apache.jetspeed.cache.impl.EhCacheImpl">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg>
+            <ref bean="ehPortletDefinitionOidCache" />
+        </constructor-arg>
+    </bean>
+    
+    <bean id="portletDefinitionNameCache" class="org.apache.jetspeed.cache.impl.EhCacheDistributedImpl">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg>
+            <ref bean="ehPortletDefinitionNameCache" />
+        </constructor-arg>
+    </bean>
+    
+    <!--  Active Authentication Cache: only use with Active Authentication -->
+    <!-- Factory bean used to instantiate a EHCache with the specified name (and corresponding
+        configuration in cacheManager.xml -->
+    <bean id="ehActiveAuthenticationCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="activeAuthenticationCache" />
+    </bean>
+    
+    <bean id="activeAuthenticationCache" class="org.apache.jetspeed.cache.impl.EhCacheImpl">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg index="0">
+            <ref bean="ehActiveAuthenticationCache" />
+        </constructor-arg>
+    </bean>
+    
+    <bean id="ehPortletWindowCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="portletWindowCache" />
+    </bean>
+    
+    <bean id="portletWindowCache" class="org.apache.jetspeed.cache.impl.EhPortletWindowCache">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg index="0">
+            <ref bean="ehPortletWindowCache" />
+        </constructor-arg>
+    </bean>
+    
+    <bean id="ehInternalPageFileCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="pageFileCache" />
+    </bean>
+    
+    <bean id="internalPageFileCache" class="org.apache.jetspeed.cache.impl.EhCacheImpl">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg>
+            <ref bean="ehInternalPageFileCache" />
+        </constructor-arg>
+    </bean>
+    
+    <bean id="ehInternalImportPageFileCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
+        <meta key="j2:cat" value="default,cache" />
+        <property name="cacheManager">
+            <ref local="cacheManager" />
+        </property>
+        <property name="cacheName" value="importPageFileCache" />
+    </bean>
+    
+    <bean id="internalImportPageFileCache" class="org.apache.jetspeed.cache.impl.EhCacheImpl">
+        <meta key="j2:cat" value="default,cache" />
+        <constructor-arg>
+            <ref bean="ehInternalImportPageFileCache" />
+        </constructor-arg>
+    </bean>
+    
+</beans>

Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/resources/cache-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/branches/JS2-871-pluto-2.0-upgrade/components/jetspeed-security/src/test/resources/cache-test.xml
------------------------------------------------------------------------------
    svn:keywords = Id



---------------------------------------------------------------------
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