weaver      2004/10/29 07:05:00

  Modified:    components/registry/src/java/org/apache/jetspeed/components/util
                        RegistrySupportedTestCase.java
  Log:
  see: http://nagoya.apache.org/jira/browse/JS2-144
  - refactor of registry and entity DAO
  
  Revision  Changes    Path
  1.3       +19 -24    
jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/components/util/RegistrySupportedTestCase.java
  
  Index: RegistrySupportedTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/components/util/RegistrySupportedTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RegistrySupportedTestCase.java    10 Jun 2004 20:06:19 -0000      1.2
  +++ RegistrySupportedTestCase.java    29 Oct 2004 14:05:00 -0000      1.3
  @@ -6,45 +6,40 @@
    */
   package org.apache.jetspeed.components.util;
   
  -import 
org.apache.jetspeed.components.persistence.store.util.PersistenceSupportedTestCase;
  +import java.util.ArrayList;
  +import java.util.Arrays;
  +import java.util.List;
  +
   import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
  -import 
org.apache.jetspeed.components.portletentity.PortletEntityAccessComponentImpl;
  -import org.apache.jetspeed.components.portletregistry.PortletRegistryComponent;
  -import org.apache.jetspeed.components.portletregistry.PortletRegistryComponentImpl;
  +import org.apache.jetspeed.components.portletregistry.PortletRegistry;
  +import org.apache.jetspeed.prefs.util.test.AbstractPrefsSupportedTestCase;
   
   /**
    * @author <a href="mailto:[EMAIL PROTECTED]">Scott T. Weaver</a>
    *
    */
  -public class RegistrySupportedTestCase extends PersistenceSupportedTestCase
  +public abstract class RegistrySupportedTestCase extends 
AbstractPrefsSupportedTestCase
   {
   
  -    protected PortletRegistryComponent portletRegistry;
  +    protected PortletRegistry portletRegistry;
       protected PortletEntityAccessComponent entityAccess;
   
  -    /**
  -     * 
  -     */
  -    public RegistrySupportedTestCase()
  -    {
  -        super();
  -    }
  -
  -    /**
  -     * @param arg0
  -     */
  -    public RegistrySupportedTestCase( String arg0 )
  -    {
  -        super(arg0);
  -    }
  -
       /* (non-Javadoc)
        * @see junit.framework.TestCase#setUp()
        */
       protected void setUp() throws Exception
       {       
           super.setUp();
  -        portletRegistry = new PortletRegistryComponentImpl(persistenceStore);
  -        entityAccess = new PortletEntityAccessComponentImpl(persistenceStore, 
portletRegistry);
  +        portletRegistry = (PortletRegistry) ctx.getBean("portletRegistry");
  +        entityAccess = (PortletEntityAccessComponent) 
ctx.getBean("portletEntityAccess");
  +    }   
  +    
  +    protected String[] getConfigurations()
  +    {
  +        String[] confs = super.getConfigurations();
  +        List confList = new ArrayList(Arrays.asList(confs));
  +        confList.add("META-INF/registry-dao.xml");
  +        confList.add("META-INF/entity-dao.xml");
  +        return (String[]) confList.toArray(new String[1]);
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to