001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.pluto.driver.services.impl.resource;
018:
019: import java.util.HashSet;
020: import java.util.Map;
021: import java.util.Set;
022:
023: import org.apache.commons.logging.Log;
024: import org.apache.commons.logging.LogFactory;
025: import org.apache.pluto.driver.services.portal.RenderConfig;
026:
027: /**
028: * Encapsulation of the Pluto Driver ResourceConfig Info.
029: *
030: * @version 1.0
031: * @since Sep 23, 2004
032: */
033: public class ResourceConfig {
034:
035: /** Internal Logger. */
036: private static final Log LOG = LogFactory
037: .getLog(ResourceConfig.class);
038:
039: /** The name of the portal. */
040: private String portalName;
041:
042: /** The Version of the Portal. */
043: private String portalVersion;
044:
045: /** The name of the container wrapped by this portal. */
046: private String containerName;
047:
048: /** The portlet modes we will support. */
049: private Set supportedPortletModes;
050:
051: /** The window states we will support. */
052: private Set supportedWindowStates;
053:
054: /** The portlet applications registered with us. */
055: private Map portletApplications;
056:
057: /** Encapsulation of render configuration data. */
058: private RenderConfig renderConfig;
059:
060: /**
061: * Default Constructor.
062: */
063: public ResourceConfig() {
064: this .supportedWindowStates = new HashSet();
065: this .supportedPortletModes = new HashSet();
066: this .portletApplications = new java.util.HashMap();
067: }
068:
069: /**
070: * Standard Getter.
071: * @return the name of the portal.
072: */
073: public String getPortalName() {
074: return portalName;
075: }
076:
077: /**
078: * Standard Getter.
079: * @param portalName the name of the portal.
080: */
081: public void setPortalName(String portalName) {
082: this .portalName = portalName;
083: }
084:
085: /**
086: * Standard Getter.
087: * @return the portal version.
088: */
089: public String getPortalVersion() {
090: return portalVersion;
091: }
092:
093: /**
094: * Standard Setter.
095: * @param portalVersion the portal version.
096: */
097: public void setPortalVersion(String portalVersion) {
098: this .portalVersion = portalVersion;
099: }
100:
101: /**
102: * Standard Getter.
103: * @return the name of the container.
104: */
105: public String getContainerName() {
106: return containerName;
107: }
108:
109: /**
110: * Standard Setter.
111: * @param containerName the name of the container.
112: */
113: public void setContainerName(String containerName) {
114: this .containerName = containerName;
115: }
116:
117: /**
118: * Standard Getter.
119: * @return the names of the supported portlet modes.
120: */
121: public Set getSupportedPortletModes() {
122: return supportedPortletModes;
123: }
124:
125: /**
126: * Standard Setter.
127: * @param supportedPortletModes the names of the supported portlet modes.
128: */
129: public void setSupportedPortletModes(Set supportedPortletModes) {
130: this .supportedPortletModes = supportedPortletModes;
131: }
132:
133: /**
134: * Add the named supported portlet mode to the list of supported modes.
135: * @param mode a supported mode.
136: */
137: public void addSupportedPortletMode(String mode) {
138: supportedPortletModes.add(mode);
139: }
140:
141: /**
142: * Standard Getter.
143: * @return the names of the supported window states.
144: */
145: public Set getSupportedWindowStates() {
146: return supportedWindowStates;
147: }
148:
149: /**
150: * Standard Setter.
151: * @param supportedWindowStates the names of the supported window states.
152: */
153: public void setSupportedWindowStates(Set supportedWindowStates) {
154: this .supportedWindowStates = supportedWindowStates;
155: }
156:
157: /**
158: * Add the named supported window state to the list of supported states.
159: * @param state the name of the supported state.
160: */
161: public void addSupportedWindowState(String state) {
162: this .supportedWindowStates.add(state);
163: }
164:
165: /**
166: * Standard Getter.
167: * @return the render configuration.
168: */
169: public RenderConfig getRenderConfig() {
170: return renderConfig;
171: }
172:
173: /**
174: * Standard Setter.
175: * @param renderConfig the render configuration.
176: */
177: public void setRenderConfig(RenderConfig renderConfig) {
178: this.renderConfig = renderConfig;
179: }
180:
181: }
|