portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r607448 [20/36] - in /portals/pluto/branches/pluto-1.1.x: ./ assembly/src/main/assembly/ assembly/src/main/resources/ maven-pluto-plugin/ maven-pluto-plugin/src/main/java/org/apache/pluto/maven/ pluto-ant-tasks/ pluto-ant-tasks/src/assemble...
Date Sat, 29 Dec 2007 17:20:42 GMT
Modified: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ResourceURLProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ResourceURLProviderImpl.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ResourceURLProviderImpl.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ResourceURLProviderImpl.java Sat Dec 29 09:20:23 2007
@@ -1,51 +1,51 @@
-/*
- * 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.
- */
-package org.apache.pluto.driver.services.container;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.pluto.PortletWindow;
-import org.apache.pluto.driver.core.PortalRequestContext;
-import org.apache.pluto.spi.ResourceURLProvider;
-
-public class ResourceURLProviderImpl implements ResourceURLProvider {
-
-    private String stringUrl = "";
-    private String base = "";
-
-    public ResourceURLProviderImpl(HttpServletRequest req,
-                                   PortletWindow internalPortletWindow) {
-    }
-
-    public void setAbsoluteURL(String path) {
-        stringUrl = path;
-    }
-
-    public void setFullPath(String path) {
-        stringUrl = base + path;
-    }
-
-    public String toString() {
-        return (stringUrl == null) ? "" : stringUrl;
-
-    }
-}
+/*
+ * 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.
+ */
+package org.apache.pluto.driver.services.container;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.pluto.PortletWindow;
+import org.apache.pluto.driver.core.PortalRequestContext;
+import org.apache.pluto.spi.ResourceURLProvider;
+
+public class ResourceURLProviderImpl implements ResourceURLProvider {
+
+    private String stringUrl = "";
+    private String base = "";
+
+    public ResourceURLProviderImpl(HttpServletRequest req,
+                                   PortletWindow internalPortletWindow) {
+    }
+
+    public void setAbsoluteURL(String path) {
+        stringUrl = path;
+    }
+
+    public void setFullPath(String path) {
+        stringUrl = base + path;
+    }
+
+    public String toString() {
+        return (stringUrl == null) ? "" : stringUrl;
+
+    }
+}

Propchange: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ResourceURLProviderImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/UserInfoAttributesServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/UserInfoAttributesServiceImpl.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/UserInfoAttributesServiceImpl.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/UserInfoAttributesServiceImpl.java Sat Dec 29 09:20:23 2007
@@ -1,128 +1,128 @@
-/*
- * 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.
- */
-package org.apache.pluto.driver.services.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.portlet.PortletRequest;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.pluto.PortletContainerException;
-import org.apache.pluto.PortletWindow;
-import org.apache.pluto.spi.optional.UserInfoAttributesService;
-import org.apache.pluto.spi.optional.P3PAttributes;
-
-/**
- * FIXME: Only include attributes that are defined in portlet.xml
- *
- * This is a default implementation of that gets user information attributes
- * from a properties file where the user information attribute name (as defined
- * in PLT.D of the JSR-168 spec) is prefixed by the user name (e.g. craig.user.name.given=Craig).
- *
- */
-public class UserInfoAttributesServiceImpl implements UserInfoAttributesService {
-
-	private static UserInfoAttributesServiceImpl instance = new UserInfoAttributesServiceImpl();
-
-	private static final String USER_INFO_ATTR_FILE = "/user-info-attributes.properties";
-	/** Logger. */
-	private static final Log LOG = LogFactory.getLog(
-			UserInfoAttributesServiceImpl.class);
-	private static Properties props = new Properties();
-	private static Map cache = new HashMap();
-
-	private UserInfoAttributesServiceImpl(){
-
-	}
-
-	public static UserInfoAttributesServiceImpl getInstance() throws IOException {
-		loadProperties();
-		return instance;
-	}
-
-	public static UserInfoAttributesServiceImpl getInstance(Properties inprops) throws IOException {
-		props = inprops;
-		return instance;
-	}
-
-	/**
-	 * Implementation of PLT.17.2 used to access user information attributes.
-	 *
-	 * @see UserInfoAttributesService#getUserInfo(javax.portlet.PortletRequest)
-	 * @return As per the spec, return null if the user is not authenticated or an empty Map if there are
-	 * no attributes in the properties file or a Map containing only those attributes found in the attribute
-	 * data store (properties file).
-	 */
-	public Map getUserInfo(PortletRequest request)
-			throws PortletContainerException {
-		Map map = null;
-		String user = request.getRemoteUser();
-		if (user == null) {
-			return null;
-		}
-		map = (Map)cache.get(user);
-		if (map == null) {
-			map = new HashMap();
-			int len = P3PAttributes.ATTRIBUTE_ARRAY.length;
-			StringBuffer prefix = new StringBuffer();
-			prefix.append(user);
-			prefix.append('.');
-			StringBuffer name = null;
-			for (int i = 0; i < len ; i++) {
-				name = new StringBuffer();
-				name.append(prefix);
-				String attr = P3PAttributes.ATTRIBUTE_ARRAY[i];
-				name.append(attr);
-				String prop = props.getProperty(name.toString());
-				//spec says that Map only attributes that have data
-				if ( prop != null) {
-					//TODO: convert user.bdate to milliseconds since January 1, 1970, 00:00:00 GMT.
-					map.put(attr, prop);
-				}
-			}
-			cache.put(user, map);
-		}
-		return map;
-	}
-
-
-    public Map getUserInfo(PortletRequest request, PortletWindow window) throws PortletContainerException {
-        return getUserInfo(request);
-    }
-
-    private static void loadProperties() throws IOException {
-	    //get the properties from prop file
-		if (props.isEmpty()) {
-		    InputStream stream = UserInfoAttributesServiceImpl.class.getResourceAsStream(USER_INFO_ATTR_FILE);
-		    if (stream == null) {
-		    	String msg = "The properties file '" + USER_INFO_ATTR_FILE +"' cannot be found." +
-		    	" Please make sure this file exists and is in the classpath (i.e. WEB-INF/classes).";
-		    	LOG.error(msg);
-					throw new IOException(msg);
-			}
-			props.load(stream);
-		}
-	}
-
-
-
-}
+/*
+ * 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.
+ */
+package org.apache.pluto.driver.services.impl;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.portlet.PortletRequest;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.pluto.PortletContainerException;
+import org.apache.pluto.PortletWindow;
+import org.apache.pluto.spi.optional.UserInfoAttributesService;
+import org.apache.pluto.spi.optional.P3PAttributes;
+
+/**
+ * FIXME: Only include attributes that are defined in portlet.xml
+ *
+ * This is a default implementation of that gets user information attributes
+ * from a properties file where the user information attribute name (as defined
+ * in PLT.D of the JSR-168 spec) is prefixed by the user name (e.g. craig.user.name.given=Craig).
+ *
+ */
+public class UserInfoAttributesServiceImpl implements UserInfoAttributesService {
+
+	private static UserInfoAttributesServiceImpl instance = new UserInfoAttributesServiceImpl();
+
+	private static final String USER_INFO_ATTR_FILE = "/user-info-attributes.properties";
+	/** Logger. */
+	private static final Log LOG = LogFactory.getLog(
+			UserInfoAttributesServiceImpl.class);
+	private static Properties props = new Properties();
+	private static Map cache = new HashMap();
+
+	private UserInfoAttributesServiceImpl(){
+
+	}
+
+	public static UserInfoAttributesServiceImpl getInstance() throws IOException {
+		loadProperties();
+		return instance;
+	}
+
+	public static UserInfoAttributesServiceImpl getInstance(Properties inprops) throws IOException {
+		props = inprops;
+		return instance;
+	}
+
+	/**
+	 * Implementation of PLT.17.2 used to access user information attributes.
+	 *
+	 * @see UserInfoAttributesService#getUserInfo(javax.portlet.PortletRequest)
+	 * @return As per the spec, return null if the user is not authenticated or an empty Map if there are
+	 * no attributes in the properties file or a Map containing only those attributes found in the attribute
+	 * data store (properties file).
+	 */
+	public Map getUserInfo(PortletRequest request)
+			throws PortletContainerException {
+		Map map = null;
+		String user = request.getRemoteUser();
+		if (user == null) {
+			return null;
+		}
+		map = (Map)cache.get(user);
+		if (map == null) {
+			map = new HashMap();
+			int len = P3PAttributes.ATTRIBUTE_ARRAY.length;
+			StringBuffer prefix = new StringBuffer();
+			prefix.append(user);
+			prefix.append('.');
+			StringBuffer name = null;
+			for (int i = 0; i < len ; i++) {
+				name = new StringBuffer();
+				name.append(prefix);
+				String attr = P3PAttributes.ATTRIBUTE_ARRAY[i];
+				name.append(attr);
+				String prop = props.getProperty(name.toString());
+				//spec says that Map only attributes that have data
+				if ( prop != null) {
+					//TODO: convert user.bdate to milliseconds since January 1, 1970, 00:00:00 GMT.
+					map.put(attr, prop);
+				}
+			}
+			cache.put(user, map);
+		}
+		return map;
+	}
+
+
+    public Map getUserInfo(PortletRequest request, PortletWindow window) throws PortletContainerException {
+        return getUserInfo(request);
+    }
+
+    private static void loadProperties() throws IOException {
+	    //get the properties from prop file
+		if (props.isEmpty()) {
+		    InputStream stream = UserInfoAttributesServiceImpl.class.getResourceAsStream(USER_INFO_ATTR_FILE);
+		    if (stream == null) {
+		    	String msg = "The properties file '" + USER_INFO_ATTR_FILE +"' cannot be found." +
+		    	" Please make sure this file exists and is in the classpath (i.e. WEB-INF/classes).";
+		    	LOG.error(msg);
+					throw new IOException(msg);
+			}
+			props.load(stream);
+		}
+	}
+
+
+
+}

Propchange: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/UserInfoAttributesServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java Sat Dec 29 09:20:23 2007
@@ -1,91 +1,91 @@
-/*
+/*
  * 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.
- */
-package org.apache.pluto.driver.services.impl.resource;
-
-import java.io.InputStream;
-import java.util.Set;
-
-import javax.servlet.ServletContext;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.pluto.driver.config.DriverConfigurationException;
-import org.apache.pluto.driver.services.portal.PropertyConfigService;
-
-/**
- * Default implementation of all of the portal Services.
- * Utilizes resource configuration from
- * <code>pluto-portal-driver-config.xml</code>
- *
- * @since Aug 10, 2005
- */
-public class PropertyConfigServiceImpl implements
-    PropertyConfigService {
-
-    private static final Log LOG =
-        LogFactory.getLog(PropertyConfigServiceImpl.class);
-
-    private ResourceConfig config;
-
-    public PropertyConfigServiceImpl() {
-
-    }
-
-    /**
-     * Initialization Lifecycle Method
-     * @param ctx
-     */
-    public void init(ServletContext ctx) {
-        try {
-            InputStream in = ctx.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);
-            config = ResourceConfigReader.getFactory().parse(in);
-        }
-        catch(Exception e) {
-            LOG.error("Unable to parse resource config "+e.getMessage(), e);
-            throw new DriverConfigurationException(e);
-        }
-    }
-
-    /**
-     * Shutdown the ResourceService.
-     */
-    public void destroy() {
-        config = null;
-    }
-
-
-    public String getPortalName() {
-        return config.getPortalName();
-    }
-
-    public String getPortalVersion() {
-        return config.getPortalVersion();
-    }
-
-    public String getContainerName() {
-        return config.getContainerName();
-    }
-
-    public Set getSupportedPortletModes() {
-        return config.getSupportedPortletModes();
-    }
-
-    public Set getSupportedWindowStates() {
-        return config.getSupportedWindowStates();
-    }
-
-}
+ * 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.
+ */
+package org.apache.pluto.driver.services.impl.resource;
+
+import java.io.InputStream;
+import java.util.Set;
+
+import javax.servlet.ServletContext;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.pluto.driver.config.DriverConfigurationException;
+import org.apache.pluto.driver.services.portal.PropertyConfigService;
+
+/**
+ * Default implementation of all of the portal Services.
+ * Utilizes resource configuration from
+ * <code>pluto-portal-driver-config.xml</code>
+ *
+ * @since Aug 10, 2005
+ */
+public class PropertyConfigServiceImpl implements
+    PropertyConfigService {
+
+    private static final Log LOG =
+        LogFactory.getLog(PropertyConfigServiceImpl.class);
+
+    private ResourceConfig config;
+
+    public PropertyConfigServiceImpl() {
+
+    }
+
+    /**
+     * Initialization Lifecycle Method
+     * @param ctx
+     */
+    public void init(ServletContext ctx) {
+        try {
+            InputStream in = ctx.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);
+            config = ResourceConfigReader.getFactory().parse(in);
+        }
+        catch(Exception e) {
+            LOG.error("Unable to parse resource config "+e.getMessage(), e);
+            throw new DriverConfigurationException(e);
+        }
+    }
+
+    /**
+     * Shutdown the ResourceService.
+     */
+    public void destroy() {
+        config = null;
+    }
+
+
+    public String getPortalName() {
+        return config.getPortalName();
+    }
+
+    public String getPortalVersion() {
+        return config.getPortalVersion();
+    }
+
+    public String getContainerName() {
+        return config.getContainerName();
+    }
+
+    public Set getSupportedPortletModes() {
+        return config.getSupportedPortletModes();
+    }
+
+    public Set getSupportedWindowStates() {
+        return config.getSupportedWindowStates();
+    }
+
+}

Propchange: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/PropertyConfigServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java Sat Dec 29 09:20:23 2007
@@ -1,107 +1,107 @@
-/*
- * 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.
- */
-package org.apache.pluto.driver.services.impl.resource;
-
-import java.io.InputStream;
-import java.util.List;
-import java.util.Set;
-
-import javax.servlet.ServletContext;
-
-import org.apache.pluto.driver.config.DriverConfigurationException;
-import org.apache.pluto.driver.services.portal.PageConfig;
-import org.apache.pluto.driver.services.portal.RenderConfigService;
-import org.apache.pluto.driver.services.portal.admin.RenderConfigAdminService;
-
-/**
- * Default implementation of all of the portal Services.
- * Utilizes resource configuration from
- * <code>pluto-portal-driver-config.xml</code>
- *
- * @since Aug 10, 2005
- */
-public class RenderConfigServiceImpl
-    implements RenderConfigService, RenderConfigAdminService {
-
-
-    private ResourceConfig config;
-
-//
-// Lifecycle Methods
-//
-    /**
-     * Initialization Lifecycle Method
-     * @param ctx
-     */
-    public void init(ServletContext ctx) {
-        try {
-            InputStream in = ctx.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);
-            config = ResourceConfigReader.getFactory().parse(in);
-        }
-        catch(Exception e) {
-            throw new DriverConfigurationException(e);
-        }
-    }
-
-    /**
-     * Shutdown the ResourceService.
-     */
-    public void destroy() {
-        config = null;
-    }
-
-
-    public String getPortalName() {
-        return config.getPortalName();
-    }
-
-    public String getPortalVersion() {
-        return config.getPortalVersion();
-    }
-
-    public String getContainerName() {
-        return config.getContainerName();
-    }
-
-    public Set getSupportedPortletModes() {
-        return config.getSupportedPortletModes();
-    }
-
-    public Set getSupportedWindowStates() {
-        return config.getSupportedWindowStates();
-    }
-
-    public List getPages() {
-        return config.getRenderConfig().getPages();
-    }
-
-    public PageConfig getDefaultPage() {
-        return config.getRenderConfig().getPageConfig(null);
-    }
-
-    public PageConfig getPage(String id) {
-        return config.getRenderConfig().getPageConfig(id);
-    }
-
-    public void addPage(PageConfig pageConfig) {
-        config.getRenderConfig().addPage(pageConfig);
-    }
-    
-    public void removePage(PageConfig pageConfig){
-        config.getRenderConfig().removePage(pageConfig);
-    }
-}
+/*
+ * 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.
+ */
+package org.apache.pluto.driver.services.impl.resource;
+
+import java.io.InputStream;
+import java.util.List;
+import java.util.Set;
+
+import javax.servlet.ServletContext;
+
+import org.apache.pluto.driver.config.DriverConfigurationException;
+import org.apache.pluto.driver.services.portal.PageConfig;
+import org.apache.pluto.driver.services.portal.RenderConfigService;
+import org.apache.pluto.driver.services.portal.admin.RenderConfigAdminService;
+
+/**
+ * Default implementation of all of the portal Services.
+ * Utilizes resource configuration from
+ * <code>pluto-portal-driver-config.xml</code>
+ *
+ * @since Aug 10, 2005
+ */
+public class RenderConfigServiceImpl
+    implements RenderConfigService, RenderConfigAdminService {
+
+
+    private ResourceConfig config;
+
+//
+// Lifecycle Methods
+//
+    /**
+     * Initialization Lifecycle Method
+     * @param ctx
+     */
+    public void init(ServletContext ctx) {
+        try {
+            InputStream in = ctx.getResourceAsStream(ResourceConfigReader.CONFIG_FILE);
+            config = ResourceConfigReader.getFactory().parse(in);
+        }
+        catch(Exception e) {
+            throw new DriverConfigurationException(e);
+        }
+    }
+
+    /**
+     * Shutdown the ResourceService.
+     */
+    public void destroy() {
+        config = null;
+    }
+
+
+    public String getPortalName() {
+        return config.getPortalName();
+    }
+
+    public String getPortalVersion() {
+        return config.getPortalVersion();
+    }
+
+    public String getContainerName() {
+        return config.getContainerName();
+    }
+
+    public Set getSupportedPortletModes() {
+        return config.getSupportedPortletModes();
+    }
+
+    public Set getSupportedWindowStates() {
+        return config.getSupportedWindowStates();
+    }
+
+    public List getPages() {
+        return config.getRenderConfig().getPages();
+    }
+
+    public PageConfig getDefaultPage() {
+        return config.getRenderConfig().getPageConfig(null);
+    }
+
+    public PageConfig getPage(String id) {
+        return config.getRenderConfig().getPageConfig(id);
+    }
+
+    public void addPage(PageConfig pageConfig) {
+        config.getRenderConfig().addPage(pageConfig);
+    }
+    
+    public void removePage(PageConfig pageConfig){
+        config.getRenderConfig().removePage(pageConfig);
+    }
+}

Propchange: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/RenderConfigServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java Sat Dec 29 09:20:23 2007
@@ -1,182 +1,182 @@
-/*
+/*
  * 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.
- */
-package org.apache.pluto.driver.services.impl.resource;
-
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.pluto.driver.services.portal.RenderConfig;
-
-/**
- * Encapsulation of the Pluto Driver ResourceConfig Info.
- *
- * @version 1.0
- * @since Sep 23, 2004
- */
-public class ResourceConfig {
-
-    /** Internal Logger. */
-    private static final Log LOG =
-        LogFactory.getLog(ResourceConfig.class);
-
-    /** The name of the portal. */
-    private String portalName;
-
-    /** The Version of the Portal. */
-    private String portalVersion;
-
-    /** The name of the container wrapped by this portal. */
-    private String containerName;
-
-    /** The portlet modes we will support. */
-    private Set supportedPortletModes;
-
-    /** The window states we will support. */
-    private Set supportedWindowStates;
-
-    /** The portlet applications registered with us. */
-    private Map portletApplications;
-
-    /** Encapsulation of render configuration data. */
-    private RenderConfig renderConfig;
-
-    /**
-     * Default Constructor.
-     */
-    public ResourceConfig() {
-        this.supportedWindowStates = new HashSet();
-        this.supportedPortletModes = new HashSet();
-        this.portletApplications = new java.util.HashMap();
-    }
-
-    /**
-     * Standard Getter.
-     * @return the name of the portal.
-     */
-    public String getPortalName() {
-        return portalName;
-    }
-
-    /**
-     * Standard Getter.
-     * @param portalName the name of the portal.
-     */
-    public void setPortalName(String portalName) {
-        this.portalName = portalName;
-    }
-
-    /**
-     * Standard Getter.
-     * @return the portal version.
-     */
-    public String getPortalVersion() {
-        return portalVersion;
-    }
-
-    /**
-     * Standard Setter.
-     * @param portalVersion the portal version.
-     */
-    public void setPortalVersion(String portalVersion) {
-        this.portalVersion = portalVersion;
-    }
-
-    /**
-     * Standard Getter.
-     * @return the name of the container.
-     */
-    public String getContainerName() {
-        return containerName;
-    }
-
-    /**
-     * Standard Setter.
-     * @param containerName the name of the container.
-     */
-    public void setContainerName(String containerName) {
-        this.containerName = containerName;
-    }
-
-    /**
-     * Standard Getter.
-     * @return the names of the supported portlet modes.
-     */
-    public Set getSupportedPortletModes() {
-        return supportedPortletModes;
-    }
-
-    /**
-     * Standard Setter.
-     * @param supportedPortletModes the names of the supported portlet modes.
-     */
-    public void setSupportedPortletModes(Set supportedPortletModes) {
-        this.supportedPortletModes = supportedPortletModes;
-    }
-
-    /**
-     * Add the named supported portlet mode to the list of supported modes.
-     * @param mode a supported mode.
-     */
-    public void addSupportedPortletMode(String mode) {
-        supportedPortletModes.add(mode);
-    }
-
-    /**
-     * Standard Getter.
-     * @return the names of the supported window states.
-     */
-    public Set getSupportedWindowStates() {
-        return supportedWindowStates;
-    }
-
-    /**
-     * Standard Setter.
-     * @param supportedWindowStates the names of the supported window states.
-     */
-    public void setSupportedWindowStates(Set supportedWindowStates) {
-        this.supportedWindowStates = supportedWindowStates;
-    }
-
-    /**
-     * Add the named supported window state to the list of supported states.
-     * @param state the name of the supported state.
-     */
-    public void addSupportedWindowState(String state) {
-        this.supportedWindowStates.add(state);
-    }
-
-    /**
-     * Standard Getter.
-     * @return the render configuration.
-     */
-    public RenderConfig getRenderConfig() {
-        return renderConfig;
-    }
-
-    /**
-     * Standard Setter.
-     * @param renderConfig the render configuration.
-     */
-    public void setRenderConfig(RenderConfig renderConfig) {
-        this.renderConfig = renderConfig;
-    }
-
-}
-
+ * 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.
+ */
+package org.apache.pluto.driver.services.impl.resource;
+
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.pluto.driver.services.portal.RenderConfig;
+
+/**
+ * Encapsulation of the Pluto Driver ResourceConfig Info.
+ *
+ * @version 1.0
+ * @since Sep 23, 2004
+ */
+public class ResourceConfig {
+
+    /** Internal Logger. */
+    private static final Log LOG =
+        LogFactory.getLog(ResourceConfig.class);
+
+    /** The name of the portal. */
+    private String portalName;
+
+    /** The Version of the Portal. */
+    private String portalVersion;
+
+    /** The name of the container wrapped by this portal. */
+    private String containerName;
+
+    /** The portlet modes we will support. */
+    private Set supportedPortletModes;
+
+    /** The window states we will support. */
+    private Set supportedWindowStates;
+
+    /** The portlet applications registered with us. */
+    private Map portletApplications;
+
+    /** Encapsulation of render configuration data. */
+    private RenderConfig renderConfig;
+
+    /**
+     * Default Constructor.
+     */
+    public ResourceConfig() {
+        this.supportedWindowStates = new HashSet();
+        this.supportedPortletModes = new HashSet();
+        this.portletApplications = new java.util.HashMap();
+    }
+
+    /**
+     * Standard Getter.
+     * @return the name of the portal.
+     */
+    public String getPortalName() {
+        return portalName;
+    }
+
+    /**
+     * Standard Getter.
+     * @param portalName the name of the portal.
+     */
+    public void setPortalName(String portalName) {
+        this.portalName = portalName;
+    }
+
+    /**
+     * Standard Getter.
+     * @return the portal version.
+     */
+    public String getPortalVersion() {
+        return portalVersion;
+    }
+
+    /**
+     * Standard Setter.
+     * @param portalVersion the portal version.
+     */
+    public void setPortalVersion(String portalVersion) {
+        this.portalVersion = portalVersion;
+    }
+
+    /**
+     * Standard Getter.
+     * @return the name of the container.
+     */
+    public String getContainerName() {
+        return containerName;
+    }
+
+    /**
+     * Standard Setter.
+     * @param containerName the name of the container.
+     */
+    public void setContainerName(String containerName) {
+        this.containerName = containerName;
+    }
+
+    /**
+     * Standard Getter.
+     * @return the names of the supported portlet modes.
+     */
+    public Set getSupportedPortletModes() {
+        return supportedPortletModes;
+    }
+
+    /**
+     * Standard Setter.
+     * @param supportedPortletModes the names of the supported portlet modes.
+     */
+    public void setSupportedPortletModes(Set supportedPortletModes) {
+        this.supportedPortletModes = supportedPortletModes;
+    }
+
+    /**
+     * Add the named supported portlet mode to the list of supported modes.
+     * @param mode a supported mode.
+     */
+    public void addSupportedPortletMode(String mode) {
+        supportedPortletModes.add(mode);
+    }
+
+    /**
+     * Standard Getter.
+     * @return the names of the supported window states.
+     */
+    public Set getSupportedWindowStates() {
+        return supportedWindowStates;
+    }
+
+    /**
+     * Standard Setter.
+     * @param supportedWindowStates the names of the supported window states.
+     */
+    public void setSupportedWindowStates(Set supportedWindowStates) {
+        this.supportedWindowStates = supportedWindowStates;
+    }
+
+    /**
+     * Add the named supported window state to the list of supported states.
+     * @param state the name of the supported state.
+     */
+    public void addSupportedWindowState(String state) {
+        this.supportedWindowStates.add(state);
+    }
+
+    /**
+     * Standard Getter.
+     * @return the render configuration.
+     */
+    public RenderConfig getRenderConfig() {
+        return renderConfig;
+    }
+
+    /**
+     * Standard Setter.
+     * @param renderConfig the render configuration.
+     */
+    public void setRenderConfig(RenderConfig renderConfig) {
+        this.renderConfig = renderConfig;
+    }
+
+}
+

Propchange: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java Sat Dec 29 09:20:23 2007
@@ -1,133 +1,133 @@
-/*
+/*
  * 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.
- */
-package org.apache.pluto.driver.services.impl.resource;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.commons.digester.Digester;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.pluto.driver.services.portal.PageConfig;
-import org.apache.pluto.driver.services.portal.RenderConfig;
-import org.xml.sax.SAXException;
-
-/**
- * @version 1.0
- * @since Sep 23, 2004
- */
-public class ResourceConfigReader {
-
-    private static final Log LOG = LogFactory.getLog(
-        ResourceConfigReader.class
-    );
-
-    public static final String CONFIG_FILE =
-        "/WEB-INF/pluto-portal-driver-config.xml";
-
-
-    private static ResourceConfigReader factory;
-
-    public static ResourceConfigReader getFactory() {
-        if (factory == null) {
-            factory = new ResourceConfigReader();
-        }
-        return factory;
-    }
-
-    private Digester digester;
-
-    private ResourceConfigReader() {
-        digester = new Digester();
-        // digester.setLogger(LOG);  // Too many log messages.
-        digester.setClassLoader(Thread.currentThread().getContextClassLoader());
-        init();
-    }
-
-    public ResourceConfig parse(InputStream in)
-        throws IOException, SAXException {
-        return (ResourceConfig) digester.parse(in);
-    }
-
-// Digester Setup
-
-    private void init() {
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Setting up digester...");
-        }
-        digester.addObjectCreate(
-            "pluto-portal-driver",
-            ResourceConfig.class
-        );
-        digester.addBeanPropertySetter(
-            "pluto-portal-driver/portal-name",
-            "portalName"
-        );
-        digester.addBeanPropertySetter(
-            "pluto-portal-driver/portal-version",
-            "portalVersion"
-        );
-        digester.addBeanPropertySetter(
-            "pluto-portal-driver/container-name",
-            "containerName"
-        );
-
-        digester.addCallMethod(
-            "pluto-portal-driver/supports/portlet-mode",
-            "addSupportedPortletMode", 0
-        );
-        digester.addCallMethod(
-            "pluto-portal-driver/supports/window-state",
-            "addSupportedWindowState", 0
-        );
-
-        digester.addObjectCreate(
-            "pluto-portal-driver/render-config",
-            RenderConfig.class
-        );
-        digester.addSetProperties(
-            "pluto-portal-driver/render-config",
-            "default", "defaultPageId"
-        );
-        digester.addObjectCreate(
-            "pluto-portal-driver/render-config/page",
-            PageConfig.class
-        );
-        digester.addSetProperties("pluto-portal-driver/render-config/page");
-        digester.addCallMethod(
-            "pluto-portal-driver/render-config/page/portlet", "addPortlet", 2
-        );
-        digester.addCallParam(
-            "pluto-portal-driver/render-config/page/portlet",
-            0, "context"
-        );
-        digester.addCallParam(
-            "pluto-portal-driver/render-config/page/portlet",
-            1, "name"
-        );
-        digester.addSetNext(
-            "pluto-portal-driver/render-config/page",
-            "addPage"
-        );
-        digester.addSetNext(
-            "pluto-portal-driver/render-config",
-            "setRenderConfig"
-        );
-    }
-
-}
-
+ * 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.
+ */
+package org.apache.pluto.driver.services.impl.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.commons.digester.Digester;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.pluto.driver.services.portal.PageConfig;
+import org.apache.pluto.driver.services.portal.RenderConfig;
+import org.xml.sax.SAXException;
+
+/**
+ * @version 1.0
+ * @since Sep 23, 2004
+ */
+public class ResourceConfigReader {
+
+    private static final Log LOG = LogFactory.getLog(
+        ResourceConfigReader.class
+    );
+
+    public static final String CONFIG_FILE =
+        "/WEB-INF/pluto-portal-driver-config.xml";
+
+
+    private static ResourceConfigReader factory;
+
+    public static ResourceConfigReader getFactory() {
+        if (factory == null) {
+            factory = new ResourceConfigReader();
+        }
+        return factory;
+    }
+
+    private Digester digester;
+
+    private ResourceConfigReader() {
+        digester = new Digester();
+        // digester.setLogger(LOG);  // Too many log messages.
+        digester.setClassLoader(Thread.currentThread().getContextClassLoader());
+        init();
+    }
+
+    public ResourceConfig parse(InputStream in)
+        throws IOException, SAXException {
+        return (ResourceConfig) digester.parse(in);
+    }
+
+// Digester Setup
+
+    private void init() {
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Setting up digester...");
+        }
+        digester.addObjectCreate(
+            "pluto-portal-driver",
+            ResourceConfig.class
+        );
+        digester.addBeanPropertySetter(
+            "pluto-portal-driver/portal-name",
+            "portalName"
+        );
+        digester.addBeanPropertySetter(
+            "pluto-portal-driver/portal-version",
+            "portalVersion"
+        );
+        digester.addBeanPropertySetter(
+            "pluto-portal-driver/container-name",
+            "containerName"
+        );
+
+        digester.addCallMethod(
+            "pluto-portal-driver/supports/portlet-mode",
+            "addSupportedPortletMode", 0
+        );
+        digester.addCallMethod(
+            "pluto-portal-driver/supports/window-state",
+            "addSupportedWindowState", 0
+        );
+
+        digester.addObjectCreate(
+            "pluto-portal-driver/render-config",
+            RenderConfig.class
+        );
+        digester.addSetProperties(
+            "pluto-portal-driver/render-config",
+            "default", "defaultPageId"
+        );
+        digester.addObjectCreate(
+            "pluto-portal-driver/render-config/page",
+            PageConfig.class
+        );
+        digester.addSetProperties("pluto-portal-driver/render-config/page");
+        digester.addCallMethod(
+            "pluto-portal-driver/render-config/page/portlet", "addPortlet", 2
+        );
+        digester.addCallParam(
+            "pluto-portal-driver/render-config/page/portlet",
+            0, "context"
+        );
+        digester.addCallParam(
+            "pluto-portal-driver/render-config/page/portlet",
+            1, "name"
+        );
+        digester.addSetNext(
+            "pluto-portal-driver/render-config/page",
+            "addPage"
+        );
+        digester.addSetNext(
+            "pluto-portal-driver/render-config",
+            "setRenderConfig"
+        );
+    }
+
+}
+

Propchange: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/ResourceConfigReader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html Sat Dec 29 09:20:23 2007
@@ -1,24 +1,24 @@
-<!--
+<!--
 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.
--->
-<html>
-<body>
-Service implementations which utilizing context resources
-to perform their work.
-</body>
+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.
+-->
+<html>
+<body>
+Service implementations which utilizing context resources
+to perform their work.
+</body>
 </html>

Propchange: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/impl/resource/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java?rev=607448&r1=607447&r2=607448&view=diff
==============================================================================
--- portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java (original)
+++ portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java Sat Dec 29 09:20:23 2007
@@ -1,238 +1,238 @@
-/*
- * 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.
- */
-package org.apache.pluto.driver.url.impl;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.portlet.PortletMode;
-import javax.portlet.WindowState;
-
-import org.apache.pluto.driver.url.PortalURL;
-import org.apache.pluto.driver.url.PortalURLParameter;
-import org.apache.pluto.driver.url.PortalURLParser;
-
-/**
- * The portal URL.
- * @since 1.0
- * @deprecated replaced by {@link RelativePortalURLImpl}
- */
-public class PortalURLImpl implements PortalURL {
-
-	/** Server URI contains protocol, host name, and (optional) port. */
-    private String serverURI;
-
-    private String servletPath;
-    private String renderPath;
-    private String actionWindow;
-    
-    /**
-     * PortalURLParser used to construct the string
-     * representation of this portal url.
-     */
-    private PortalURLParser urlParser;
-
-    /** The window states: key is the window ID, value is WindowState. */
-    private Map windowStates = new HashMap();
-
-    private Map portletModes = new HashMap();
-
-    /** Parameters of the portlet windows. */
-    private Map parameters = new HashMap();
-
-
-    // Constructors ------------------------------------------------------------
-
-    /**
-     * Constructs a PortalURLImpl instance using default port.
-     * @param protocol  the protocol.
-     * @param hostName  the host name.
-     * @param contextPath  the servlet context path.
-     * @param servletName  the servlet name.
-     */
-    public PortalURLImpl(String protocol,
-                         String hostName,
-                         String contextPath,
-                         String servletName,
-                         PortalURLParser urlParser) {
-    	this(protocol, hostName, -1, contextPath, servletName, urlParser);
-    }
-
-    /**
-     * Constructs a PortalURLImpl instance using customized port.
-     * @param protocol  the protocol.
-     * @param hostName  the host name.
-     * @param port  the port number: 0 or negative means using default port.
-     * @param contextPath  the servlet context path.
-     * @param servletName  the servlet name.
-     */
-    public PortalURLImpl(String protocol,
-                         String hostName,
-                         int port,
-                         String contextPath,
-                         String servletName,
-                         PortalURLParser urlParser) {
-    	StringBuffer buffer = new StringBuffer();
-    	buffer.append(protocol);
-    	buffer.append(hostName);
-    	if (port > 0) {
-    		buffer.append(":").append(port);
-    	}
-    	serverURI = buffer.toString();
-
-    	buffer = new StringBuffer();
-    	buffer.append(contextPath);
-    	buffer.append(servletName);
-        servletPath = buffer.toString();
-        this.urlParser = urlParser;
-    }
-
-    /**
-     * Internal private constructor used by method <code>clone()</code>.
-     * @see #clone()
-     */
-    private PortalURLImpl() {
-    	// Do nothing.
-    }
-
-    // Public Methods ----------------------------------------------------------
-
-    public void setRenderPath(String renderPath) {
-        this.renderPath = renderPath;
-    }
-
-    public String getRenderPath() {
-        return renderPath;
-    }
-
-    public void addParameter(PortalURLParameter param) {
-        parameters.put(param.getWindowId() + param.getName(), param);
-    }
-
-    public Collection getParameters() {
-        return parameters.values();
-    }
-
-    public void setActionWindow(String actionWindow) {
-        this.actionWindow = actionWindow;
-    }
-
-    public String getActionWindow() {
-        return actionWindow;
-    }
-
-    public Map getPortletModes() {
-        return Collections.unmodifiableMap(portletModes);
-    }
-
-    public PortletMode getPortletMode(String windowId) {
-        PortletMode mode = (PortletMode) portletModes.get(windowId);
-        if (mode == null) {
-            mode = PortletMode.VIEW;
-        }
-        return mode;
-    }
-
-    public void setPortletMode(String windowId, PortletMode portletMode) {
-        portletModes.put(windowId, portletMode);
-    }
-
-    public Map getWindowStates() {
-        return Collections.unmodifiableMap(windowStates);
-    }
-
-    /**
-     * Returns the window state of the specified window.
-     * @param windowId  the window ID.
-     * @return the window state. Default to NORMAL.
-     */
-    public WindowState getWindowState(String windowId) {
-        WindowState state = (WindowState) windowStates.get(windowId);
-        if (state == null) {
-            state = WindowState.NORMAL;
-        }
-        return state;
-    }
-
-    /**
-     * Sets the window state of the specified window.
-     * @param windowId  the window ID.
-     * @param windowState  the window state.
-     */
-    public void setWindowState(String windowId, WindowState windowState) {
-        this.windowStates.put(windowId, windowState);
-    }
-
-    /**
-     * Clear parameters of the specified window.
-     * @param windowId  the window ID.
-     */
-    public void clearParameters(String windowId) {
-    	for (Iterator it = parameters.entrySet().iterator(); it.hasNext(); ) {
-            Map.Entry entry = (Map.Entry) it.next();
-            PortalURLParameter param = (PortalURLParameter) entry.getValue();
-            if (param.getWindowId().equals(windowId)) {
-            	it.remove();
-            }
-        }
-    }
-
-    /**
-     * Converts to a string representing the portal URL.
-     * @return a string representing the portal URL.
-     * @see org.apache.pluto.driver.url.impl.PortalURLParserImpl#toString(PortalURL)
-     */
-    public String toString() {
-        return urlParser.toString(this);
-    }
-
-
-    /**
-     * Returns the server URI (protocol, name, port).
-     * @return the server URI portion of the portal URL.
-     */
-    public String getServerURI() {
-        return serverURI;
-    }
-
-    /**
-     * Returns the servlet path (context path + servlet name).
-     * @return the servlet path.
-     */
-    public String getServletPath() {
-        return servletPath;
-    }
-
-    /**
-     * Clone a copy of itself.
-     * @return a copy of itself.
-     */
-    public Object clone() {
-    	PortalURLImpl portalURL = new PortalURLImpl();
-    	portalURL.serverURI = this.serverURI;
-    	portalURL.servletPath = this.servletPath;
-    	portalURL.parameters = new HashMap(parameters);
-    	portalURL.portletModes = new HashMap(portletModes);
-    	portalURL.windowStates = new HashMap(windowStates);
-    	portalURL.renderPath = renderPath;
-    	portalURL.actionWindow = actionWindow;
-        return portalURL;
-    }
-}
+/*
+ * 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.
+ */
+package org.apache.pluto.driver.url.impl;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+
+import org.apache.pluto.driver.url.PortalURL;
+import org.apache.pluto.driver.url.PortalURLParameter;
+import org.apache.pluto.driver.url.PortalURLParser;
+
+/**
+ * The portal URL.
+ * @since 1.0
+ * @deprecated replaced by {@link RelativePortalURLImpl}
+ */
+public class PortalURLImpl implements PortalURL {
+
+	/** Server URI contains protocol, host name, and (optional) port. */
+    private String serverURI;
+
+    private String servletPath;
+    private String renderPath;
+    private String actionWindow;
+    
+    /**
+     * PortalURLParser used to construct the string
+     * representation of this portal url.
+     */
+    private PortalURLParser urlParser;
+
+    /** The window states: key is the window ID, value is WindowState. */
+    private Map windowStates = new HashMap();
+
+    private Map portletModes = new HashMap();
+
+    /** Parameters of the portlet windows. */
+    private Map parameters = new HashMap();
+
+
+    // Constructors ------------------------------------------------------------
+
+    /**
+     * Constructs a PortalURLImpl instance using default port.
+     * @param protocol  the protocol.
+     * @param hostName  the host name.
+     * @param contextPath  the servlet context path.
+     * @param servletName  the servlet name.
+     */
+    public PortalURLImpl(String protocol,
+                         String hostName,
+                         String contextPath,
+                         String servletName,
+                         PortalURLParser urlParser) {
+    	this(protocol, hostName, -1, contextPath, servletName, urlParser);
+    }
+
+    /**
+     * Constructs a PortalURLImpl instance using customized port.
+     * @param protocol  the protocol.
+     * @param hostName  the host name.
+     * @param port  the port number: 0 or negative means using default port.
+     * @param contextPath  the servlet context path.
+     * @param servletName  the servlet name.
+     */
+    public PortalURLImpl(String protocol,
+                         String hostName,
+                         int port,
+                         String contextPath,
+                         String servletName,
+                         PortalURLParser urlParser) {
+    	StringBuffer buffer = new StringBuffer();
+    	buffer.append(protocol);
+    	buffer.append(hostName);
+    	if (port > 0) {
+    		buffer.append(":").append(port);
+    	}
+    	serverURI = buffer.toString();
+
+    	buffer = new StringBuffer();
+    	buffer.append(contextPath);
+    	buffer.append(servletName);
+        servletPath = buffer.toString();
+        this.urlParser = urlParser;
+    }
+
+    /**
+     * Internal private constructor used by method <code>clone()</code>.
+     * @see #clone()
+     */
+    private PortalURLImpl() {
+    	// Do nothing.
+    }
+
+    // Public Methods ----------------------------------------------------------
+
+    public void setRenderPath(String renderPath) {
+        this.renderPath = renderPath;
+    }
+
+    public String getRenderPath() {
+        return renderPath;
+    }
+
+    public void addParameter(PortalURLParameter param) {
+        parameters.put(param.getWindowId() + param.getName(), param);
+    }
+
+    public Collection getParameters() {
+        return parameters.values();
+    }
+
+    public void setActionWindow(String actionWindow) {
+        this.actionWindow = actionWindow;
+    }
+
+    public String getActionWindow() {
+        return actionWindow;
+    }
+
+    public Map getPortletModes() {
+        return Collections.unmodifiableMap(portletModes);
+    }
+
+    public PortletMode getPortletMode(String windowId) {
+        PortletMode mode = (PortletMode) portletModes.get(windowId);
+        if (mode == null) {
+            mode = PortletMode.VIEW;
+        }
+        return mode;
+    }
+
+    public void setPortletMode(String windowId, PortletMode portletMode) {
+        portletModes.put(windowId, portletMode);
+    }
+
+    public Map getWindowStates() {
+        return Collections.unmodifiableMap(windowStates);
+    }
+
+    /**
+     * Returns the window state of the specified window.
+     * @param windowId  the window ID.
+     * @return the window state. Default to NORMAL.
+     */
+    public WindowState getWindowState(String windowId) {
+        WindowState state = (WindowState) windowStates.get(windowId);
+        if (state == null) {
+            state = WindowState.NORMAL;
+        }
+        return state;
+    }
+
+    /**
+     * Sets the window state of the specified window.
+     * @param windowId  the window ID.
+     * @param windowState  the window state.
+     */
+    public void setWindowState(String windowId, WindowState windowState) {
+        this.windowStates.put(windowId, windowState);
+    }
+
+    /**
+     * Clear parameters of the specified window.
+     * @param windowId  the window ID.
+     */
+    public void clearParameters(String windowId) {
+    	for (Iterator it = parameters.entrySet().iterator(); it.hasNext(); ) {
+            Map.Entry entry = (Map.Entry) it.next();
+            PortalURLParameter param = (PortalURLParameter) entry.getValue();
+            if (param.getWindowId().equals(windowId)) {
+            	it.remove();
+            }
+        }
+    }
+
+    /**
+     * Converts to a string representing the portal URL.
+     * @return a string representing the portal URL.
+     * @see org.apache.pluto.driver.url.impl.PortalURLParserImpl#toString(PortalURL)
+     */
+    public String toString() {
+        return urlParser.toString(this);
+    }
+
+
+    /**
+     * Returns the server URI (protocol, name, port).
+     * @return the server URI portion of the portal URL.
+     */
+    public String getServerURI() {
+        return serverURI;
+    }
+
+    /**
+     * Returns the servlet path (context path + servlet name).
+     * @return the servlet path.
+     */
+    public String getServletPath() {
+        return servletPath;
+    }
+
+    /**
+     * Clone a copy of itself.
+     * @return a copy of itself.
+     */
+    public Object clone() {
+    	PortalURLImpl portalURL = new PortalURLImpl();
+    	portalURL.serverURI = this.serverURI;
+    	portalURL.servletPath = this.servletPath;
+    	portalURL.parameters = new HashMap(parameters);
+    	portalURL.portletModes = new HashMap(portletModes);
+    	portalURL.windowStates = new HashMap(windowStates);
+    	portalURL.renderPath = renderPath;
+    	portalURL.actionWindow = actionWindow;
+        return portalURL;
+    }
+}

Propchange: portals/pluto/branches/pluto-1.1.x/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message