01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: /*
18: * Created on May 26, 2004
19: *
20: * TODO To change the template for this generated file go to
21: * Window - Preferences - Java - Code Generation - Code and Comments
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
39: AbstractPrefsSupportedTestCase {
40:
41: protected PortletRegistry portletRegistry;
42: protected PortletEntityAccessComponent entityAccess;
43:
44: /* (non-Javadoc)
45: * @see junit.framework.TestCase#setUp()
46: */
47: protected void setUp() throws Exception {
48: super .setUp();
49: portletRegistry = (PortletRegistry) ctx
50: .getBean("portletRegistry");
51: entityAccess = (PortletEntityAccessComponent) ctx
52: .getBean("portletEntityAccess");
53: }
54:
55: protected String[] getConfigurations() {
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: Properties p = super .getPostProcessProperties();
66: p.setProperty("supported.portletmode.autoswitch.config",
67: "false");
68: p.setProperty("supported.portletmode.autoswitch.edit_defaults",
69: "false");
70: p
71: .setProperty(
72: "supported.portletmode.autoswitch.config.surrogate.portlet",
73: "j2-admin::CustomConfigModePortlet");
74: return p;
75: }
76: }
|