1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.apache.jetspeed.components.util;
24
25 import java.util.ArrayList;
26 import java.util.Arrays;
27 import java.util.List;
28 import java.util.Properties;
29
30 import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
31 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
32 import org.apache.jetspeed.prefs.util.test.AbstractPrefsSupportedTestCase;
33
34 /***
35 * @author <a href="mailto:sweaver@einnovation.com">Scott T. Weaver</a>
36 *
37 */
38 public abstract class RegistrySupportedTestCase extends AbstractPrefsSupportedTestCase
39 {
40
41 protected PortletRegistry portletRegistry;
42 protected PortletEntityAccessComponent entityAccess;
43
44
45
46
47 protected void setUp() throws Exception
48 {
49 super.setUp();
50 portletRegistry = (PortletRegistry) ctx.getBean("portletRegistry");
51 entityAccess = (PortletEntityAccessComponent) ctx.getBean("portletEntityAccess");
52 }
53
54 protected String[] getConfigurations()
55 {
56 String[] confs = super.getConfigurations();
57 List confList = new ArrayList(Arrays.asList(confs));
58 confList.add("jetspeed-base.xml");
59 confList.add("page-manager.xml");
60 confList.add("registry.xml");
61 return (String[]) confList.toArray(new String[1]);
62 }
63
64 protected Properties getPostProcessProperties()
65 {
66 Properties p = super.getPostProcessProperties();
67 p.setProperty("supported.portletmode.autoswitch.config", "false");
68 p.setProperty("supported.portletmode.autoswitch.edit_defaults", "false");
69 p.setProperty("supported.portletmode.autoswitch.config.surrogate.portlet", "j2-admin::CustomConfigModePortlet");
70 return p;
71 }
72 }