portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r745085 - in /portals/pluto/trunk: pluto-container-api/src/main/java/org/apache/pluto/spi/ pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/ pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url...
Date Tue, 17 Feb 2009 14:08:30 GMT
Author: cziegeler
Date: Tue Feb 17 14:08:30 2009
New Revision: 745085

URL: http://svn.apache.org/viewvc?rev=745085&view=rev
Log:
Use generics.

Modified:
    portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/spi/PortletURLProvider.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java
    portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/RelativePortalURLImpl.java
    portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java

Modified: portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/spi/PortletURLProvider.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/spi/PortletURLProvider.java?rev=745085&r1=745084&r2=745085&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/spi/PortletURLProvider.java
(original)
+++ portals/pluto/trunk/pluto-container-api/src/main/java/org/apache/pluto/spi/PortletURLProvider.java
Tue Feb 17 14:08:30 2009
@@ -28,7 +28,7 @@
  * Defines the interface used by the portlet container to create Portal URLs.
  * This provider must be implemented by the Portal and provided via the
  * container services upon initialization of the container.
- * 
+ *
  * @version 1.0
  */
 public interface PortletURLProvider {
@@ -57,18 +57,18 @@
 
     /**
      * Specifies whether or not this request should be considered an resource Serving
-     * request. 
+     * request.
      * @since 2.0
      */
     public void setResourceServing(boolean resource);
-    
+
     /**
      * Shows you if the lifecycle is serveResource
      * @return true if ResourceServing else false
      * @since 2.0
      */
     public boolean isResourceServing();
-    
+
     /**
      * By calling this method the URL is defined as a secure URL.
      */
@@ -77,12 +77,11 @@
     /**
      * Determine whether or not this url provider
      * supports secure urls.
-     * 
-     * @return
-     * @throws PortletSecurityException
+     *
+     * @return <code>true</code> if secure urls are supported.
      */
     public boolean isSecureSupported();
-    
+
     /**
      * Removes all pre-existing parameters in this URL
      */
@@ -94,14 +93,14 @@
      * @param parameters a map containing the name [java.lang.String] and value
      *                   [java.lang.String[]] of the parameters.
      */
-    public void setParameters(Map parameters);
+    public void setParameters(Map<String, String[]> parameters);
 
     /**
      * Sets the given public-render-parameters as parameters into the URL.
      * @param parameters a map containing the name [java.lang.String] and value
      *                   [java.lang.String[]] of the parameters.
      */
-    public void setPublicRenderParameters(Map parameters);
+    public void setPublicRenderParameters(Map<String, String[]> parameters);
 
     /**
      * Returns the URL in string format. This method should only be called
@@ -109,16 +108,16 @@
      * @return the URL
      */
     public String toString();
-    
+
     public void savePortalURL(HttpServletRequest request);
-    
+
     /**
      * Gets the values from the current public-render-parameters from this request.
      * @param name Parametername
      * @return the values for the Parameter, can be null, if there is no Parameter with this
name.
      */
     public String[] getPublicRenderParameters(String name);
-    
+
     /**
      * Gets the values from the parameters from this request. This is only used for ServeResource.
      * @param name Parametername
@@ -127,15 +126,15 @@
     public String[] getPrivateRenderParameters(String name);
 
     public Map<String, String[]> parseRenderParameters(Map<String, String[]>
parentMap, String queryString);
-    
+
     public Map<String, String[]> getRenderParameters();
-    
+
     /**
      * Provides the BaseURL vendor-specific properties
-     * @param parameters a map containing the name and value(s) of the properties.
+     * @param properties a map containing the name and value(s) of the properties.
      */
     public void setProperties(Map<String, List<String>> properties);
-    
+
     /**
      * Gets the vendor-specific properties as set on the BaseURL
      * @return parameters a map containing the name and value(s) of the properties (may return
null)

Modified: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java?rev=745085&r1=745084&r2=745085&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
(original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletURLProviderImpl.java
Tue Feb 17 14:08:30 2009
@@ -35,14 +35,14 @@
 import org.apache.pluto.spi.PortletURLProvider;
 
 /**
- * 
+ *
  */
 public class PortletURLProviderImpl implements PortletURLProvider {
 
     private PortalURL url;
     private String window;
     /** The parameters including parameters appended to the dispatching URI. */
-    protected Map<String, String[]> parameters = null;    
+    protected Map<String, String[]> parameters = null;
 
     public PortletURLProviderImpl(HttpServletRequest request,
                                   PortletWindow portletWindow) {
@@ -60,7 +60,7 @@
     public void setWindowState(WindowState state) {
         url.setWindowState(window, state);
     }
-    
+
     public void setResourceServing(boolean resourceServing) {
         if (resourceServing) {
             url.setResourceWindow(window);
@@ -70,12 +70,9 @@
     }
 
     public boolean isResourceServing(){
-    	if (url.getResourceWindow() != null)
-    		return true;
-    	else
-    		return false;
+    	return (url.getResourceWindow() != null);
     }
-    
+
     public void setAction(boolean action) {
         if (action) {
             url.setActionWindow(window);
@@ -96,29 +93,32 @@
         url.clearParameters(window);
     }
 
-    
-    public void setParameters(Map parameters) {
-        Iterator it = parameters.entrySet().iterator();
+
+    /**
+     * @see org.apache.pluto.spi.PortletURLProvider#setParameters(java.util.Map)
+     */
+    public void setParameters(Map<String, String[]> parameters) {
+        Iterator<Map.Entry<String, String[]>> it = parameters.entrySet().iterator();
         while (it.hasNext()) {
-            Map.Entry entry = (Map.Entry) it.next();
+            Map.Entry<String, String[]> entry = it.next();
             PortalURLParameter param = new PortalURLParameter(
             		window,
-            		(String) entry.getKey(),
-            		(String[]) entry.getValue());
+            		entry.getKey(),
+            		entry.getValue());
             url.addParameter(param);
         }
     }
-    
+
     public String[] getPrivateRenderParameters(String name){
     	String[] values = null;
-    	for (Iterator it=url.getParameters().iterator();it.hasNext();){
-    		PortalURLParameter param = (PortalURLParameter)it.next();
+    	for (Iterator<PortalURLParameter> it=url.getParameters().iterator();it.hasNext();){
+    		PortalURLParameter param = it.next();
     		if (param.getName().equals(name))
     			values = param.getValues();
     	}
     	return values;
     }
-    
+
     public String[] getPublicRenderParameters(String name){
     	Map publicRenderParaMap = url.getPublicParameters();
     	String[] values = null;
@@ -130,7 +130,7 @@
     	}
     	return values;
     }
-    
+
     public void setPublicRenderParameters(Map parameters) {
 		url.addPublicRenderParametersNew(parameters);
 	}
@@ -142,7 +142,7 @@
 	public void savePortalURL(HttpServletRequest request) {
 		PortalRequestContext ctx = (PortalRequestContext)
 			request.getAttribute(PortalRequestContext.REQUEST_KEY);
-		ctx.setPortalURL(url);		
+		ctx.setPortalURL(url);
 	}
 
     public Map<String, String[]> getRenderParameters()
@@ -159,7 +159,7 @@
         else
         {
             // Copy all the original render parameters.
-            parameters = new HashMap<String, String[]>(parentMap);        
+            parameters = new HashMap<String, String[]>(parentMap);
             if (queryString != null && queryString.trim().length() > 0)
             {
                 // Merge the appended parameters to the render parameter map.
@@ -169,12 +169,12 @@
         }
         return parameters;
     }
-    
+
     /**
      * Parses the appended query string and merges the appended parameters to
      * the original parameters. Query parameters are name-value pairs separated
      * by the '<code>&amp;</code>' character.
-     * 
+     *
      * @param parameters
      *            the original parameters map.
      * @param queryString

Modified: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java?rev=745085&r1=745084&r2=745085&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java
(original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/PortalURLImpl.java
Tue Feb 17 14:08:30 2009
@@ -40,36 +40,34 @@
  * @since 1.0
  * @deprecated replaced by {@link RelativePortalURLImpl}
  */
+@Deprecated
 public class PortalURLImpl implements PortalURL {
-	
+
 	/** Server URI contains protocol, host name, and (optional) port. */
     private String serverURI = null;
-    
+
     private String servletPath = null;
     private String renderPath = null;
     private String actionWindow = null;
     private String resourceWindow = null;
-    
+
     /** The window states: key is the window ID, value is WindowState. */
-    private Map windowStates = new HashMap();
-    
-    private Map portletModes = new HashMap();
-    
+    private Map<String, WindowState> windowStates = new HashMap<String, WindowState>();
+
+    private Map<String, PortletMode> portletModes = new HashMap<String, PortletMode>();
+
     /** Parameters of the portlet windows. */
-    private Map parameters = new HashMap();
-    
+    private Map<String, PortalURLParameter> parameters = new HashMap<String, PortalURLParameter>();
+
     private Map<String, String[]> publicParameterCurrent = new HashMap<String, String[]>();
-    
+
     private Map<String, String[]> publicParameterNew = new HashMap<String, String[]>();
-    
+
     /** Logger. */
     private static final Log LOG = LogFactory.getLog(PortalURLImpl.class);
 
-	private static final String KEY = PortalURL.class.getName();
-    
-    
     // Constructors ------------------------------------------------------------
-    
+
     /**
      * Constructs a PortalURLImpl instance using default port.
      * @param protocol  the protocol.
@@ -83,7 +81,7 @@
                          String servletName) {
     	this(protocol, hostName, -1, contextPath, servletName);
     }
-    
+
     /**
      * Constructs a PortalURLImpl instance using customized port.
      * @param protocol  the protocol.
@@ -104,13 +102,13 @@
     		buffer.append(":").append(port);
     	}
     	serverURI = buffer.toString();
-    	
+
     	buffer = new StringBuffer();
     	buffer.append(contextPath);
     	buffer.append(servletName);
         servletPath = buffer.toString();
     }
-    
+
     /**
      * Internal private constructor used by method <code>clone()</code>.
      * @see #clone()
@@ -118,9 +116,9 @@
     private PortalURLImpl() {
     	// Do nothing.
     }
-    
+
     // Public Methods ----------------------------------------------------------
-    
+
     public void setRenderPath(String renderPath) {
         this.renderPath = renderPath;
     }
@@ -132,33 +130,33 @@
     public void addParameter(PortalURLParameter param) {
         parameters.put(param.getWindowId() + param.getName(), param);
     }
-    
-    public void addPublicRenderParametersNew(Map parameters){
-    	for (Iterator iter=parameters.keySet().iterator(); iter.hasNext();) {
-			String key = (String) iter.next();
+
+    public void addPublicRenderParametersNew(Map<String, String[]> parameters){
+    	for (Iterator<String> iter=parameters.keySet().iterator(); iter.hasNext();) {
+			String key = iter.next();
 			if (publicParameterNew.containsKey(key)){
 				publicParameterNew.remove(key);
 			}
-			String[] values = (String[])parameters.get(key);
+			String[] values = parameters.get(key);
 			if (values[0]!= null){
 				publicParameterNew.put(key, values);
 			}
 		}
     }
 
-    public Collection getParameters() {
+    public Collection<PortalURLParameter> getParameters() {
         return parameters.values();
     }
-    
+
     public void addPublicParameterCurrent(String name, String[] values){
     	publicParameterCurrent.put(name, values);
     }
-    
+
     public void addPublicParameterActionResourceParameter(String parameterName, String value)
{
     	//add at the first position
 		if (publicParameterCurrent.containsKey(parameterName)){
 			String[] tmp = publicParameterCurrent.get(parameterName);
-			
+
 			String[] values = new String[tmp.length + 1];
 			values[0] = value;
 			for (int i = 0; i < tmp.length; i++) {
@@ -170,19 +168,19 @@
 		else
 			publicParameterCurrent.put(parameterName, new String[]{value});
 	}
-    
+
     public Map<String, String[]> getPublicParameters() {
     	Map<String,String[]> tmp = new HashMap<String, String[]>();
-		
-		for (Iterator iter = publicParameterCurrent.keySet().iterator(); iter.hasNext();) {
-           String paramname = (String) iter.next();
+
+		for (Iterator<String> iter = publicParameterCurrent.keySet().iterator(); iter.hasNext();)
{
+           String paramname = iter.next();
            if (!publicParameterNew.containsKey(paramname)){
                String[] paramvalue = publicParameterCurrent.get(paramname);
                tmp.put(paramname, paramvalue);
            }
         }
-		for (Iterator iter = publicParameterNew.keySet().iterator();iter.hasNext();){
-			String paramname = (String) iter.next();
+		for (Iterator<String> iter = publicParameterNew.keySet().iterator();iter.hasNext();){
+			String paramname = iter.next();
 			String[] paramvalue = publicParameterNew.get(paramname);
 			if (paramvalue[0]!=null){
 				tmp.put(paramname, paramvalue);
@@ -198,7 +196,7 @@
     public String getActionWindow() {
         return actionWindow;
     }
-    
+
     public String getResourceWindow() {
 		return resourceWindow;
 	}
@@ -207,12 +205,12 @@
 		this.resourceWindow = resourceWindow;
 	}
 
-    public Map getPortletModes() {
+    public Map<String, PortletMode> getPortletModes() {
         return Collections.unmodifiableMap(portletModes);
     }
 
     public PortletMode getPortletMode(String windowId) {
-        PortletMode mode = (PortletMode) portletModes.get(windowId);
+        PortletMode mode = portletModes.get(windowId);
         if (mode == null) {
             mode = PortletMode.VIEW;
         }
@@ -223,17 +221,17 @@
         portletModes.put(windowId, portletMode);
     }
 
-    public Map getWindowStates() {
+    public Map<String, WindowState> 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);
+        WindowState state = windowStates.get(windowId);
         if (state == null) {
             state = WindowState.NORMAL;
         }
@@ -248,28 +246,28 @@
     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();
+    	for (Iterator<Map.Entry<String, PortalURLParameter>> it = parameters.entrySet().iterator();
it.hasNext(); ) {
+            Map.Entry<String, PortalURLParameter> entry = it.next();
+            PortalURLParameter param = 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 PortalURLParserImpl.getParser().toString(this); 
+    	return PortalURLParserImpl.getParser().toString(this);
     }
 
 
@@ -280,7 +278,7 @@
     public String getServerURI() {
         return serverURI;
     }
-    
+
     /**
      * Returns the servlet path (context path + servlet name).
      * @return the servlet path.
@@ -288,7 +286,7 @@
     public String getServletPath() {
         return servletPath;
     }
-    
+
     /**
      * Clone a copy of itself.
      * @return a copy of itself.
@@ -297,9 +295,9 @@
     	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.parameters = new HashMap<String, PortalURLParameter>(parameters);
+    	portalURL.portletModes = new HashMap<String, PortletMode>(portletModes);
+    	portalURL.windowStates = new HashMap<String, WindowState>(windowStates);
     	portalURL.renderPath = renderPath;
     	portalURL.actionWindow = actionWindow;
     	portalURL.resourceWindow = resourceWindow;

Modified: portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/RelativePortalURLImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/RelativePortalURLImpl.java?rev=745085&r1=745084&r2=745085&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/RelativePortalURLImpl.java
(original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/url/impl/RelativePortalURLImpl.java
Tue Feb 17 14:08:30 2009
@@ -46,26 +46,26 @@
 
     private String servletPath;
     private String renderPath;
-    private String actionWindow;    
+    private String actionWindow;
     private String resourceWindow;
 
     private Map<String, String[]> publicParameterCurrent = new HashMap<String, String[]>();
-    
+
     private Map<String, String[]> publicParameterNew = new HashMap<String, String[]>();
-    
-    /** 
+
+    /**
      * 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<String, WindowState> windowStates = new HashMap<String, WindowState>();
 
-    private Map portletModes = new HashMap();
+    private Map<String, PortletMode> portletModes = new HashMap<String, PortletMode>();
 
     /** Parameters of the portlet windows. */
-    private Map parameters = new HashMap();
+    private Map<String, PortalURLParameter> parameters = new HashMap<String, PortalURLParameter>();
 
     /**
      * Constructs a PortalURLImpl instance using customized port.
@@ -103,7 +103,7 @@
         parameters.put(param.getWindowId() + param.getName(), param);
     }
 
-    public Collection getParameters() {
+    public Collection<PortalURLParameter> getParameters() {
         return parameters.values();
     }
 
@@ -115,12 +115,12 @@
         return actionWindow;
     }
 
-    public Map getPortletModes() {
+    public Map<String, PortletMode> getPortletModes() {
         return Collections.unmodifiableMap(portletModes);
     }
 
     public PortletMode getPortletMode(String windowId) {
-        PortletMode mode = (PortletMode) portletModes.get(windowId);
+        PortletMode mode = portletModes.get(windowId);
         if (mode == null) {
             mode = PortletMode.VIEW;
         }
@@ -131,7 +131,7 @@
         portletModes.put(windowId, portletMode);
     }
 
-    public Map getWindowStates() {
+    public Map<String, WindowState> getWindowStates() {
         return Collections.unmodifiableMap(windowStates);
     }
 
@@ -141,7 +141,7 @@
      * @return the window state. Default to NORMAL.
      */
     public WindowState getWindowState(String windowId) {
-        WindowState state = (WindowState) windowStates.get(windowId);
+        WindowState state = windowStates.get(windowId);
         if (state == null) {
             state = WindowState.NORMAL;
         }
@@ -162,9 +162,9 @@
      * @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();
+    	for (Iterator<Map.Entry<String, PortalURLParameter>> it = parameters.entrySet().iterator();
it.hasNext(); ) {
+            Map.Entry<String, PortalURLParameter> entry = it.next();
+            PortalURLParameter param = entry.getValue();
             if (param.getWindowId()!=null){
             	if (param.getWindowId().equals(windowId)) {
                 	it.remove();
@@ -186,8 +186,9 @@
     /**
      * Returns the server URI (protocol, name, port).
      * @return the server URI portion of the portal URL.
-     * @deprecated 
+     * @deprecated
      */
+    @Deprecated
     public String getServerURI() {
         return null;
     }
@@ -207,9 +208,9 @@
     public Object clone() {
     	RelativePortalURLImpl portalURL = new RelativePortalURLImpl();
     	portalURL.servletPath = this.servletPath;
-    	portalURL.parameters = new HashMap(parameters);
-    	portalURL.portletModes = new HashMap(portletModes);
-    	portalURL.windowStates = new HashMap(windowStates);
+    	portalURL.parameters = new HashMap<String, PortalURLParameter>(parameters);
+    	portalURL.portletModes = new HashMap<String, PortletMode>(portletModes);
+    	portalURL.windowStates = new HashMap<String, WindowState>(windowStates);
     	portalURL.renderPath = renderPath;
     	portalURL.actionWindow = actionWindow;
         portalURL.urlParser = urlParser;
@@ -218,30 +219,30 @@
         return portalURL;
     }
 //JSR-286 methods
-    
-    public void addPublicRenderParametersNew(Map parameters){
-    	for (Iterator iter=parameters.keySet().iterator(); iter.hasNext();) {
-			String key = (String) iter.next();
+
+    public void addPublicRenderParametersNew(Map<String, String[]> parameters){
+    	for (Iterator<String> iter=parameters.keySet().iterator(); iter.hasNext();) {
+			String key = iter.next();
 			if (publicParameterNew.containsKey(key)){
 				publicParameterNew.remove(key);
 			}
-			String[] values = (String[])parameters.get(key);
+			String[] values = parameters.get(key);
 			if (values[0]!= null){
 				publicParameterNew.put(key, values);
 			}
 		}
     }
-    
-    
+
+
     public void addPublicParameterCurrent(String name, String[] values){
     	publicParameterCurrent.put(name, values);
     }
-    
+
     public void addPublicParameterActionResourceParameter(String parameterName, String value)
{
     	//add at the first position
 		if (publicParameterCurrent.containsKey(parameterName)){
 			String[] tmp = publicParameterCurrent.get(parameterName);
-			
+
 			String[] values = new String[tmp.length + 1];
 			values[0] = value;
 			for (int i = 0; i < tmp.length; i++) {
@@ -253,19 +254,19 @@
 		else
 			publicParameterCurrent.put(parameterName, new String[]{value});
 	}
-    
+
     public Map<String, String[]> getPublicParameters() {
     	Map<String,String[]> tmp = new HashMap<String, String[]>();
-		
-		for (Iterator iter = publicParameterCurrent.keySet().iterator(); iter.hasNext();) {
-           String paramname = (String) iter.next();
+
+		for (Iterator<String> iter = publicParameterCurrent.keySet().iterator(); iter.hasNext();)
{
+           String paramname = iter.next();
            if (!publicParameterNew.containsKey(paramname)){
                String[] paramvalue = publicParameterCurrent.get(paramname);
                tmp.put(paramname, paramvalue);
            }
         }
-		for (Iterator iter = publicParameterNew.keySet().iterator();iter.hasNext();){
-			String paramname = (String) iter.next();
+		for (Iterator<String> iter = publicParameterNew.keySet().iterator();iter.hasNext();){
+			String paramname = iter.next();
 			String[] paramvalue = publicParameterNew.get(paramname);
 			if (paramvalue[0]!=null){
 				tmp.put(paramname, paramvalue);
@@ -283,7 +284,7 @@
         return ((DriverConfiguration) servletContext.getAttribute(
         		AttributeKeys.DRIVER_CONFIG)).getPageConfig(requestedPageId);
 	}
-    
+
     public String getResourceWindow() {
 		return resourceWindow;
 	}
@@ -292,5 +293,5 @@
 		this.resourceWindow = resourceWindow;
 	}
 
-	
+
 }

Modified: portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java?rev=745085&r1=745084&r2=745085&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java
(original)
+++ portals/pluto/trunk/pluto-portal-driver/src/main/java/org/apache/pluto/driver/url/PortalURL.java
Tue Feb 17 14:08:30 2009
@@ -40,33 +40,33 @@
     String getRenderPath();
 
     void addParameter(PortalURLParameter param);
-    
-    void addPublicRenderParametersNew(Map parameters);
 
-    Collection getParameters();
-    
+    void addPublicRenderParametersNew(Map<String, String[]> parameters);
+
+    Collection<PortalURLParameter> getParameters();
+
     public void addPublicParameterCurrent(String name, String[] values);
-    
+
     public Map<String, String[]> getPublicParameters();
-    
+
     void setActionWindow(String actionWindow);
 
     String getActionWindow();
 
-    Map getPortletModes();
+    Map<String, PortletMode> getPortletModes();
 
     PortletMode getPortletMode(String windowId);
 
     void setPortletMode(String windowId, PortletMode portletMode);
 
-    Map getWindowStates();
+    Map<String, WindowState> getWindowStates();
 
     WindowState getWindowState(String windowId);
 
     void setWindowState(String windowId, WindowState windowState);
 
     void clearParameters(String windowId);
-    
+
     String toString();
 
     String getServerURI();
@@ -76,9 +76,9 @@
     Object clone();
 
     String getResourceWindow();
-    
+
 	void setResourceWindow(String window);
-	
+
 	PageConfig getPageConfig(ServletContext servletContext);
 
 	void addPublicParameterActionResourceParameter(String parameterName, String value);



Mime
View raw message