cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r123291 - in cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal: impl layout
Date Fri, 24 Dec 2004 13:30:18 GMT
Author: cziegeler
Date: Fri Dec 24 05:30:17 2004
New Revision: 123291

URL: http://svn.apache.org/viewcvs?view=rev&rev=123291
Log:
Cleanup imports
If only one portal is configured, use it as default

Modified:
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java?view=diff&rev=123291&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java&r1=123290&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java&r2=123291
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
Fri Dec 24 05:30:17 2004
@@ -84,48 +84,78 @@
         return info;
     }
     
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.portal.PortalService#getPortalName()
+     */
     public String getPortalName() {
         return this.getInfo().getPortalName();
     }
 
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.portal.PortalService#setPortalName(java.lang.String)
+     */
     public void setPortalName(String value) {
         this.getInfo().setPortalName(value);
     }
 
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.portal.PortalService#getAttribute(java.lang.String)
+     */
     public Object getAttribute(String key) {
         return this.getInfo().getAttribute(key);
     }
 
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.portal.PortalService#setAttribute(java.lang.String, java.lang.Object)
+     */
     public void setAttribute(String key, Object value) {
         this.getInfo().setAttribute(key, value);
     }
 
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.portal.PortalService#removeAttribute(java.lang.String)
+     */
     public void removeAttribute(String key) {
         this.getInfo().removeAttribute(key);
     }
 
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.portal.PortalService#getAttributeNames()
+     */
     public Iterator getAttributeNames() {
         return this.getInfo().getAttributeNames();
     }
 
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.portal.PortalService#getTemporaryAttribute(java.lang.String)
+     */
     public Object getTemporaryAttribute(String key) {
         return this.getInfo().getTemporaryAttribute(key);
     }
     
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.portal.PortalService#setTemporaryAttribute(java.lang.String,
java.lang.Object)
+     */
     public void setTemporaryAttribute(String key, Object value) {
         this.getInfo().setTemporaryAttribute(key, value);
     }
     
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.portal.PortalService#removeTemporaryAttribute(java.lang.String)
+     */
     public void removeTemporaryAttribute(String key) {
         this.getInfo().removeTemporaryAttribute(key);
     }
     
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.portal.PortalService#getTemporaryAttributeNames()
+     */
     public Iterator getTemporaryAttributeNames() {
         return this.getInfo().getTemporaryAttributeNames();
     }
 
-    /**
-     * Return the component manager for the current portal
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.portal.PortalService#getComponentManager()
      */
     public PortalComponentManager getComponentManager() {
         return this.getInfo().getComponentManager();
@@ -224,6 +254,5 @@
         }
         return key;
     }
-
-    
-}
+   
+}
\ No newline at end of file

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java?view=diff&rev=123291&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java&r1=123290&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java&r2=123291
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java
Fri Dec 24 05:30:17 2004
@@ -33,7 +33,7 @@
  * 
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * 
- * @version CVS $Id: PortalServiceInfo.java,v 1.3 2004/03/05 13:02:13 bdelacretaz Exp $
+ * @version CVS $Id$
  */
 public class PortalServiceInfo {
     
@@ -57,7 +57,11 @@
 			String portalName = (String)context.get(Constants.PORTAL_NAME_KEY);
 			if (portalName != null) {
                 this.setPortalName(portalName);
-			}
+			} else if ( this.portalComponentManagers.size() == 1 ) {
+                // if we only have one portal, just use it
+                portalName = this.portalComponentManagers.keySet().iterator().next().toString();
+                this.setPortalName(portalName);
+            }
 		}
     }
 

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java?view=diff&rev=123291&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java&r1=123290&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java&r2=123291
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java
Fri Dec 24 05:30:17 2004
@@ -16,7 +16,6 @@
 package org.apache.cocoon.portal.layout;
 
 import java.util.Map;
-import java.util.Collection;
 import java.util.Set;
 import java.util.HashSet;
 import java.util.Iterator;

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java?view=diff&rev=123291&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java&r1=123290&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java&r2=123291
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java
(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java
Fri Dec 24 05:30:17 2004
@@ -17,7 +17,6 @@
 
 import java.util.Map;
 import java.util.Iterator;
-import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
 

Mime
View raw message