cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r123289 - in cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal: impl layout
Date Fri, 24 Dec 2004 10:47:50 GMT
Author: cziegeler
Date: Fri Dec 24 02:47:49 2004
New Revision: 123289

URL: http://svn.apache.org/viewcvs?view=rev&rev=123289
Log:
Cleanup imports
If only one portal is configured, use it as default
Modified:
   cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java
   cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java?view=diff&rev=123289&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java&r1=123288&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java&r2=123289
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
Fri Dec 24 02:47:49 2004
@@ -47,6 +47,12 @@
  * 
  * @version CVS $Id$
  */
+/**
+ * @author Carsten
+ *
+ * To change this generated comment go to 
+ * Window>Preferences>Java>Code Generation>Code Template
+ */
 public class PortalServiceImpl
     extends AbstractLogEnabled
     implements Serviceable,
@@ -84,14 +90,23 @@
         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);
     }
@@ -100,32 +115,50 @@
         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 +257,5 @@
         }
         return key;
     }
-
-    
-}
+   
+}
\ No newline at end of file

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java?view=diff&rev=123289&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java&r1=123288&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java&r2=123289
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalServiceInfo.java
Fri Dec 24 02:47:49 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/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java?view=diff&rev=123289&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java&r1=123288&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java&r2=123289
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractLayout.java
Fri Dec 24 02:47:49 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/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java?view=diff&rev=123289&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java&r1=123288&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java&r2=123289
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/AbstractParameters.java
Fri Dec 24 02:47:49 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