cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r321068 - in /cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools: ./ acting/ copletManagement/ copletManagement/generation/ generation/ helper/ service/ transformation/ userManagement/
Date Fri, 14 Oct 2005 10:37:11 GMT
Author: cziegeler
Date: Fri Oct 14 03:36:50 2005
New Revision: 321068

URL: http://svn.apache.org/viewcvs?rev=321068&view=rev
Log:
JavaDoc

Modified:
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalTool.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolBuilder.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolCatalogue.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolComponent.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolFunction.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolManager.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/acting/CheckAccessAction.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/generation/I18nCatalogueGenerator.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/MultipleRoleMatcher.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/RoleMatcher.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/SingleRoleMatcher.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/service/UserRightsService.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/CheckAccessTransformer.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/PortalToolsI18nTransformer.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/PortalToolsLayoutTransformer.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextItem.java
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalTool.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalTool.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalTool.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalTool.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -22,101 +22,92 @@
 import java.util.List;
 
 /**
- * Represents a PortalTool
- * 
- * @version CVS $Id$
+ * Represents a PortalTool.
+ *
+ * @version $Id$
  */
 public class PortalTool {
-	
+
     protected final HashMap functions;
-	
-	protected final String toolName;
-	protected final String toolId;
-	protected final ArrayList i18n;
-	
-	/**
-	 * Creates a new Portal Tool
-	 * @param toolName
-	 * @param toolId
-	 * @param functions
-	 * @param i18n
-	 */
-	public PortalTool(String toolName, String toolId, HashMap functions, ArrayList i18n) {
-	    this.toolName = toolName;
-	    this.toolId = toolId;
-	    this.functions = functions;
-	    this.i18n = i18n;
-	}
-	
-	/**
-	 * returns a collection of available function
-	 * @return
-	 */
-	public Collection getFunctions() {
-	    return functions.values();
-	}
-	
-	/**
-	 * returns the function with the id id
-	 * @param id
-	 * @return
-	 */
-	public PortalToolFunction getFunction(String id) {
-	    return (PortalToolFunction) functions.get(id); 
-	}
-	
-	/**
-	 * not in use!
-	 * @return
-	 */
-	public Collection getInternalFunctions() {
-	    ArrayList internal = new ArrayList();
-	    Collection funs = functions.values();
-	    for(Iterator it = funs.iterator(); it.hasNext(); ) {
-	        PortalToolFunction ptf = (PortalToolFunction) it.next();
-	        if (ptf.isInternal()) {
-	            internal.add(ptf);
-	        }
-	    }
-	    return internal;
-	}
-	
-	/**
-	 * return all public functions
-	 */
-	public Collection getPublicFunctions() {
-	    ArrayList publik = new ArrayList();
-	    Collection funs = functions.values();
-	    for(Iterator it = funs.iterator(); it.hasNext(); ) {
-	        PortalToolFunction ptf = (PortalToolFunction) it.next();
-	        if (!ptf.isInternal()) {
-	            publik.add(ptf);
-	        }
-	    }
-	    return publik;	    
-	}
+
+    protected final String toolName;
+    protected final String toolId;
+    protected final ArrayList i18n;
+
+    /**
+     * Creates a new Portal Tool
+     * @param toolName
+     * @param toolId
+     * @param functions
+     * @param i18n
+     */
+    public PortalTool(String toolName, String toolId, HashMap functions, ArrayList i18n) {
+        this.toolName = toolName;
+        this.toolId = toolId;
+        this.functions = functions;
+        this.i18n = i18n;
+    }
+
+    /**
+     * Returns a collection of available function.
+     */
+    public Collection getFunctions() {
+        return functions.values();
+    }
+
+    /**
+     * Returns the function with the id id.
+     * @param id
+     */
+    public PortalToolFunction getFunction(String id) {
+        return (PortalToolFunction) functions.get(id); 
+    }
 
     /**
-     * returns the id of the tools
-     * @return
+     * not in use!
+     */
+    public Collection getInternalFunctions() {
+        ArrayList internal = new ArrayList();
+        Collection funs = functions.values();
+        for(Iterator it = funs.iterator(); it.hasNext(); ) {
+            PortalToolFunction ptf = (PortalToolFunction) it.next();
+            if (ptf.isInternal()) {
+                internal.add(ptf);
+            }
+        }
+        return internal;
+    }
+
+    /**
+     * return all public functions
+     */
+    public Collection getPublicFunctions() {
+        ArrayList publik = new ArrayList();
+        Collection funs = functions.values();
+        for(Iterator it = funs.iterator(); it.hasNext(); ) {
+            PortalToolFunction ptf = (PortalToolFunction) it.next();
+            if (!ptf.isInternal()) {
+                publik.add(ptf);
+            }
+        }
+        return publik;	    
+    }
+
+    /**
+     * Returns the id of the tools.
      */
     public String getId() {
         return toolId;
     }
-    
+
     /**
-     * returns the name of the tool
-     * @return
+     * Returns the name of the tool.
      */
     public String getName() {
         return toolName;
     }
-    
-    /**
-     * @return
-     */
+
     public List getI18n() {
         return i18n;
     }
-    
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolBuilder.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolBuilder.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolBuilder.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -26,11 +26,11 @@
 import org.xml.sax.SAXException;
 
 /**
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class PortalToolBuilder {
-    
+
     public PortalTool buildTool(File confFile, String rootDir, String pluginDir, String i18nDir) {
         PortalTool pTool = null;
         try {
@@ -40,7 +40,7 @@
 	        String toolId = conf.getAttribute("id");
 	        HashMap functions = new HashMap();
 			ArrayList i18n = new ArrayList();
-			 
+
 			Configuration[] funcs = conf.getChild("functions").getChildren();
 			for(int i = 0; i < funcs.length; i++) {
 			    PortalToolFunction ptf = new PortalToolFunction();
@@ -68,5 +68,4 @@
         }
 		return pTool;
     }
-   
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolCatalogue.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolCatalogue.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolCatalogue.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolCatalogue.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -16,19 +16,16 @@
 package org.apache.cocoon.portal.tools;
 
 /**
- * Represents a i18n Catalogue for a tool
- * 
- * @version CVS $Id$
+ * Represents a i18n Catalogue for a tool.
+ *
+ * @version $Id$
  */
 public class PortalToolCatalogue {
-    
+
     private String id = "";
     private String name = "";
     private String location = "";
 
-    /**
-     * @return
-     */
     public String getId() {
         return id;
     }
@@ -40,9 +37,6 @@
         this.id = id;
     }
 
-    /**
-     * @return
-     */
     public String getLocation() {
         return location;
     }
@@ -54,9 +48,6 @@
         this.location = location;
     }
 
-    /**
-     * @return
-     */
     public String getName() {
         return name;
     }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolComponent.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolComponent.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolComponent.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolComponent.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -17,8 +17,8 @@
 
 
 /**
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public interface PortalToolComponent {
 
@@ -27,21 +27,20 @@
      * @param id
      */
     void setId(String id);
-    
+
     /**
      * Returns the id of the component
-     * @return
      */
     String getId();
-    
+
     /**
      * Sets the name of the component
      * @param name
      */
     void setName(String name);
+
     /**
      * Returns the name of the component
-     * @return
      */
     String getName();
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolFunction.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolFunction.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolFunction.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolFunction.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -16,25 +16,28 @@
 package org.apache.cocoon.portal.tools;
 
 /**
- * Represents a function the user can call via the ui or the ToolManager
- * 
- * @version CVS $Id$
+ * Represents a function the user can call via the ui or the ToolManager.
+ *
+ * @version $Id$
  */
 public class PortalToolFunction implements PortalToolComponent {
-	
+
     // Function name (displayed to the user, maybe an i18n-key)
     private String name ="";
     // id to access the function
 	private String id ="";
 	// corresponding flow function
 	private String function="";
-	
+
 	private boolean internal = false;
+
 	/**
 	 * Constructor
 	 */
-	public PortalToolFunction() {}
-	
+	public PortalToolFunction() {
+        // nothing to do
+    }
+
 	/**
 	 * Constructor
 	 * @param name Function-Name
@@ -46,39 +49,42 @@
 		this.id = id;
 		this.function = function;
 	}
-	
-	/* (non-Javadoc)
+
+	/**
 	 * @see org.apache.cocoon.portal.tools.PortalToolComponent#getId()
 	 */
 	public String getId() {
 		return id;
 	}
-	/* (non-Javadoc)
+
+	/**
 	 * @see org.apache.cocoon.portal.tools.PortalToolComponent#setId(java.lang.String)
 	 */
 	public void setId(String id) {
 		this.id = id;
 	}
-	/* (non-Javadoc)
+
+	/**
 	 * @see org.apache.cocoon.portal.tools.PortalToolComponent#getName()
 	 */
 	public String getName() {
 		return name;
 	}
-	/* (non-Javadoc)
+
+	/**
 	 * @see org.apache.cocoon.portal.tools.PortalToolComponent#setName(java.lang.String)
 	 */
 	public void setName(String name) {
 		this.name = name;
 	}
+
 	/**
-	 * Returns the Functionname
-	 * @return
+	 * Returns the Functionname.
 	 */
 	public String getFunction() {
 		return function;
-	}
-	
+    }
+
 	/**
 	 * Sets the Functionname
 	 * @param path
@@ -86,16 +92,14 @@
 	public void setFunction(String path) {
 		this.function = path;
 	}
-	
-	
+
 	/**
 	 * not in use!
-	 * @return
 	 */
     public boolean isInternal() {
         return internal;
     }
-    
+
     /**
      * not in use!
      * @param internal

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolManager.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolManager.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolManager.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -52,27 +52,26 @@
 import org.xml.sax.SAXException;
 
 /**
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class PortalToolManager implements ThreadSafe, Parameterizable, Serviceable, Disposable {
-	
+
 	public static final String ROLE = PortalToolManager.class.getName();
-		
+
 	private HashMap tools = new HashMap();
 
 	private ServiceManager manager;
-	
+
 	private List i18n = new ArrayList();
-	
-	
+
 	private String rootDir;
 	private String confFile;
 	private String authFile;
 	private static final String pluginDir = "plugins/";
 	private static final String pluginConfFile = "tool.xml";
 	private static final String i18nDir = "i18n/";
-	
+
 	private Configuration configuration;
 	private UserRightsService userRightsService;
 
@@ -80,15 +79,15 @@
 
     /** The source resolver */
     protected SourceResolver resolver;
-    
-	/* (non-Javadoc)
+
+	/**
 	 * @see org.apache.avalon.framework.parameters.Parameterizable#parameterize(org.apache.avalon.framework.parameters.Parameters)
 	 */
 	public void parameterize(Parameters para) throws ParameterException {
 		this.rootDir = para.getParameter("root", "/");
 		this.confFile = para.getParameter("conf", "conf.xml");
 		this.authFile = para.getParameter("auth", "auth.xml");
-        
+
         Source fSource = null;
 		try {
 		    fSource = this.resolver.resolveURI(rootDir + confFile);
@@ -111,8 +110,7 @@
             this.resolver.release(fSource);
         }
 	}
-	
-	
+
 	/**
 	 * Initializes the PortalToolManager. Reads the configuration of all plugins etc.
 	 * @throws ProcessingException
@@ -123,9 +121,9 @@
         PortalToolBuilder builder = new PortalToolBuilder();
         try {
             toolsDir = this.resolver.resolveURI(rootDir + pluginDir);
-            
+
             final File td = SourceUtil.getFile(toolsDir);
-            
+
             if( td == null || !td.isDirectory() ) {
                 throw new ProcessingException("PortalToolManager: tool-dir must be a directory: " + toolsDir.getURI());
             }
@@ -148,19 +146,17 @@
             this.resolver.release(toolsDir);
         }
 	}
-	
+
 	/**
 	 * Returns a Collection of all Tools
-	 * @return
 	 */
 	public Collection getTools() {
 		return tools.values();
 	}
-	
+
 	/**
 	 * Returns the tool with the id.
 	 * @param id Tool-Id
-	 * @return
 	 */
 	public PortalTool getTool(String id) {
 		return (PortalTool) tools.get(id);
@@ -168,7 +164,6 @@
 
 	/**
 	 * Returns a Collection of tools which offers functions
-	 * @return
 	 */
 	public Collection getToolsWithFunctions() {
 		ArrayList tmp = new ArrayList();
@@ -183,8 +178,8 @@
 	public List getI18n() {
 	    return i18n;
 	}
-	
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
      */
     public void service(ServiceManager manager) throws ServiceException {
@@ -192,15 +187,14 @@
         this.resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE);
         this.contextManager = (ContextManager)this.manager.lookup(ContextManager.ROLE);
     }
-    
+
     /**
      * Returns the Configuration for the plugins
-     * @return
      */
     public Configuration getConfiguration() {
         return configuration;
     }
-    
+
     /**
      * Saves the configuration
      */
@@ -208,7 +202,6 @@
         DefaultConfigurationSerializer confSer = new DefaultConfigurationSerializer();
         Source confSource = null;
         try {
-        
 	        confSource = this.resolver.resolveURI(rootDir + confFile);
             if (confSource instanceof ModifiableSource) {
                 confSer.serialize(((ModifiableSource) confSource).getOutputStream(), configuration);
@@ -227,15 +220,14 @@
             this.resolver.release(confSource);
         }
     }
-    
+
     public UserRightsService getUserRightsService() {
     	return this.userRightsService;
     }
-    
+
     /**
      * Returns a value from the auth context 
      * @param key Path (e.g. /foo/bar)
-     * @return
      */
     public String sGet(String key) {
         SessionContext ctx;
@@ -255,7 +247,7 @@
         }
         return org.apache.cocoon.xml.dom.DOMUtil.getValueOfNode(node);
     }
-    
+
     /**
      * Sets a value in the auth context
      * @param key Path (e.g. /foo/bar)
@@ -280,10 +272,11 @@
             newFrag.appendChild(txt);
             ctx.setXML("/portalTools" + key, newFrag);
         } catch (ProcessingException e) {
+            // TODO
         }
     }
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.avalon.framework.activity.Disposable#dispose()
      */
     public void dispose() {
@@ -295,7 +288,7 @@
             this.manager = null;
         }
     }
-    
+
     public PortalObjects getPortalObjects() {
     	try {
 			return new PortalObjects((PortalService) this.manager.lookup(org.apache.cocoon.portal.PortalService.ROLE));
@@ -304,9 +297,8 @@
 		}
     
     }
-    
+
     public void releasePortalObjects(PortalObjects pObj) {
     	this.manager.release(pObj.getPortalService());
     }
-    
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/acting/CheckAccessAction.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/acting/CheckAccessAction.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/acting/CheckAccessAction.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/acting/CheckAccessAction.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -28,14 +28,14 @@
 
 /**
  * Check whether the current user is allowed to access the given page.
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class CheckAccessAction
 extends ServiceableAction
 implements ThreadSafe {
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
      */
     public Map act(Redirector redirector,
@@ -58,5 +58,4 @@
         }
         return EMPTY_MAP;
     }
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -37,52 +37,51 @@
 import org.apache.cocoon.portal.profile.ProfileManager;
 
 /**
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class LayoutActions {
-    
+
     private final Layout layout;
     private final LayoutFactory lf;
     private final ProfileManager pm;
     private final CopletFactory cf;
-    
+
     public LayoutActions(Layout layout, LayoutFactory lf, CopletFactory cf, ProfileManager pm) {
         this.layout = layout;
         this.lf = lf;
         this.pm = pm;
         this.cf = cf;
     }
-    
+
     // FIXME - where is this used?
     public static int line = 1;
-    
+
     /**
      * Delets the Object with the id in the layout
      * @param id 
      * @return true if the object could be deleted.
      */
 	public boolean del(String id) {
-		
 		// get layout element:
 		Object layoutObj = getLayoutElement (layout, id, "", 1);
 		if (layoutObj == null) return false;
-		
+
 		// do the job:
 		Layout lay;
 		if (layoutObj instanceof NamedItem)
 			lay =  ((NamedItem)layoutObj).getLayout();
 		else
 			lay = (Layout) layoutObj;
-		
+
 		try {
 			// an empty item can not be handled by the LayoutFactory, do the job manual:
 			if (lay == null) {
 				List items = ((NamedItem)layoutObj).getParent().getItems(); 
 				for (ListIterator iter = items.listIterator(); iter.hasNext(); ) {
-					
+
 					Item itemElem = (Item) iter.next();
-					
+
 					if (itemElem.equals(layoutObj)) {
 						items.remove (iter.nextIndex()-1);
 						return true;
@@ -95,15 +94,12 @@
 			} else { 
 				lf.remove(lay);
 			}
-			
 		} catch (ProcessingException e) {
 			e.printStackTrace();
 		}
-		
 		return true;
 	}
-	
-	
+
 	/**
 	 * Moves the object one position up or down
 	 * @param id id of the element
@@ -111,11 +107,10 @@
 	 * @return true if the object could be moved.
 	 */
 	public boolean move(String id, boolean moveUp) {
-		
 		// get layout element:
 		Object layoutObj = getLayoutElement (layout, id, "", 1);
 		if (layoutObj == null) return false;
-		
+
 		// do the job:
 		Layout lay;
 		Item item;
@@ -130,136 +125,123 @@
 			lay = (Layout) layoutObj;
 			item = lay.getParent();
 		}
-		
+
 		// find element in the list and move it:
 		List items = item.getParent().getItems();
 		for (ListIterator iter = items.listIterator(); iter.hasNext(); ) {
-			
+
 			Item itemElem = (Item) iter.next();
-			
+
 			if(itemElem.equals(item)) {
-				
+
 				int pos = iter.nextIndex()-1;
 				int newpos = pos;
 				if (moveUp)
 					newpos --;
 				else
 					newpos ++;
-				
+
 				if (newpos >= items.size()) newpos = 0;
 				if (newpos < 0) newpos = items.size()-1;
-				
+
 				Object obj = items.remove (pos);
 				items.add(newpos,obj);
-				
+
 				return true;
 			}
 		}
 		return false;
 	}
-    
+
     /**
      * Adds the object to the layout
      * @param parent Object to which the new Object should be added
      * @param type Type of the Object (row, col ...)
      */
     public void add(String parent, String type) {
-		
 		Object layoutObj = getLayoutElement (layout, parent, "", 1);
 		if (layoutObj == null) return;
-		
+
 		Layout lay;
 		if (layoutObj instanceof NamedItem)
 			lay =  ((NamedItem)layoutObj).getLayout();
-		
 		else
 			lay = (Layout) layoutObj;
-		
+
 		try {
 			Layout nObj = lf.newInstance(type);
 			pm.register(nObj);
-			
+
 			Item e = new Item();
 			nObj.setParent(e);
 			e.setLayout(nObj);
-			
-			if (lay != null)
+
+			if (lay != null) {
 				((CompositeLayout) lay).addItem(e);
-			else
-			{
+            } else {
 				NamedItem ni = (NamedItem)layoutObj;
 				nObj.setParent(ni);
 				ni.setLayout(nObj);
 			}
-			
 		} catch (ProcessingException e) {
 			e.printStackTrace();
 		}
     }
-    
+
     /**
      * Adds a new Tab
      * @param parent Parent Object
      * @param name Name of the Tab
      */
     public void addTab(String parent, String name) {
-    	
     	// get layout element:
 		Object layoutObj = getLayoutElement (layout, parent, "", 1);
 		if (layoutObj == null) return;
-		
+
 		Layout lay;
-		
+
 		if (layoutObj instanceof NamedItem)
 			lay =  ((NamedItem)layoutObj).getLayout();
 		else
 			lay = (Layout) layoutObj;
-		
+
 		// add tab:
 		if(lay != null && lay.getName().equals("tab")) {
-			
 			NamedItem tab = new NamedItem();
 			tab.setName(name);
 			((CompositeLayout) lay).addItem(tab);
-			
 		} else {
-			
 			try {
-				
 				Layout tab = lf.newInstance("tab");
 				pm.register(tab);
-				
+
 				NamedItem e = new NamedItem();
 				e.setName(name);
-				
+
 				((CompositeLayout) tab).addItem(e);
-				
+
 				if (lay == null) {
-					
 					((NamedItem)layoutObj).setLayout(tab);
-				}
-				else {
+				} else {
 					Item m = new Item();
 					m.setParent((CompositeLayout) lay);
 					((CompositeLayout) lay).addItem(m);
 					m.setLayout(tab);
 				}
-				
 			} catch (ProcessingException e) {
 				e.printStackTrace();
 			}
 		}
     }
-    
+
     public Collection getSelectedCoplets(Repeater r, Collection lets, String parent) {
-    	
 		// get layout element:
 		Object obj = getLayoutElement (layout, parent, "", 1);
 		if (obj == null) return null;
-		
+
 		ArrayList coplets = new ArrayList();
 		ArrayList copletDatas = new ArrayList();
-        
+
 		int size = r.getSize();
 		for(int i = 0; i < size; i++) {
 			RepeaterRow row = r.getRow(i);
@@ -278,34 +260,32 @@
 					copletDatas.add(cd);
 			}
 		}
-		
+
 		for(Iterator it = copletDatas.iterator(); it.hasNext();) {
 			CopletData cd = (CopletData) it.next();
-			
+
 			try {
 				CopletInstanceData cinst = cf.newInstance(cd);
 				CopletLayout lay = (CopletLayout) lf.newInstance("coplet");
 				lay.setCopletInstanceData(cinst);
-				
-			   if(obj instanceof Item) {
-				   Item item = (Item) obj;
-				   item.setLayout(lay);
-				   lay.setParent(item);
-			   } else if(obj instanceof CompositeLayout) {
-				   CompositeLayout cl = (CompositeLayout) obj;
-				   Item item = new Item();
-				   item.setLayout(lay);
-				   lay.setParent(item);
-				   cl.addItem(item);
-			   }
-			   
+			    if(obj instanceof Item) {
+				    Item item = (Item) obj;
+				    item.setLayout(lay);
+				    lay.setParent(item);
+			    } else if(obj instanceof CompositeLayout) {
+				    CompositeLayout cl = (CompositeLayout) obj;
+				    Item item = new Item();
+				    item.setLayout(lay);
+				    lay.setParent(item);
+				    cl.addItem(item);
+			    }
 			} catch (ProcessingException e) {
                 // ignore it
             }
 		}
 		return copletDatas;
     }
-    
+
     public CopletInstanceData getCopletInstanceData(String id) {
         Object obj = getLayoutElement(layout, id, "", 1);
         if(obj instanceof CopletLayout) {
@@ -313,33 +293,30 @@
         }
         return null;    
     }
-    
+
     /**
      * interal method; search for a Layout or an Item Object
      */
 	private Object getLayoutElement (Layout layout, String id, String prefix, int pos) {
-		
 		if (layout != null) {
-			
 			if (id.equals((prefix+pos)))
 				return layout;
-			
 			if (layout instanceof CompositeLayout) {
 				Iterator i = ((CompositeLayout) layout).getItems().iterator();
-				
+
 				int currentpos = pos;
 				pos = 1;
 				while (i.hasNext()) {
-					
+
 					Item current = (Item) i.next();
-					
+
 					if (id.equals((prefix+currentpos+"."+pos)))
 						return current;
-					
+
 					Object lay = getLayoutElement(current.getLayout(), id, prefix+currentpos+"."+pos+".",1);
 					if(lay != null)
 						return lay;
-					
+
 					pos ++;
 				}
 			}

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -38,18 +38,17 @@
 
 
 /**
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class XMLProfileGenerator 
 extends ServiceableGenerator {
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.generation.Generator#generate()
      */
     public void generate()
     throws IOException, SAXException, ProcessingException {
-        
         SAXParser parser = null;
         CastorSourceConverter converter = null;
         final Object context = FlowHelper.getContextObject(this.objectModel);
@@ -80,7 +79,7 @@
             this.manager.release(converter);
         }
     }
-    
+
     // FIXME: Copy from JXTemplateGenerator
     private void fillContext(Object contextObject, Map map) {
         if (contextObject != null) {
@@ -120,4 +119,3 @@
         }
     }
 }
-

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/generation/I18nCatalogueGenerator.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/generation/I18nCatalogueGenerator.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/generation/I18nCatalogueGenerator.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/generation/I18nCatalogueGenerator.java Fri Oct 14 03:36:50 2005
@@ -49,7 +49,7 @@
     private final String CATALOGUE_TAG = "catalogue";
     private String lang = ".xml";
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.generation.Generator#generate()
      */
     public void generate()
@@ -75,7 +75,7 @@
         this.xmlConsumer.endDocument();
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.sitemap.SitemapModelComponent#setup(org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
      */
     public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par)
@@ -88,21 +88,25 @@
 
     }
 
-    /* (non-Javadoc)
+    /**
 	 * @see org.apache.cocoon.generation.ServiceableGenerator#service(org.apache.avalon.framework.service.ServiceManager)
 	 */
 	public void service(ServiceManager manager) throws ServiceException {
 		super.service(manager);
 		this.parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
-		ptm = (PortalToolManager) this.manager.lookup(PortalToolManager.ROLE);
+		this.ptm = (PortalToolManager) this.manager.lookup(PortalToolManager.ROLE);
 	}
 
-	/* (non-Javadoc)
+	/**
 	 * @see org.apache.cocoon.generation.ServiceableGenerator#dispose()
 	 */
 	public void dispose() {
-		super.dispose();
-		this.manager.release(this.parser);
-		this.manager.release(this.ptm);
+        if ( this.manager != null ) {
+		    this.manager.release(this.parser);
+            this.manager.release(this.ptm);
+            this.ptm = null;
+            this.parser = null;
+        }
+        super.dispose();
 	}
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/MultipleRoleMatcher.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/MultipleRoleMatcher.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/MultipleRoleMatcher.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/MultipleRoleMatcher.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -22,11 +22,11 @@
 /**
  * A role matcher matching against several role.
  * 
- * @version CVS $Id$
+ * @version $Id$
  */
 public class MultipleRoleMatcher
 implements RoleMatcher {
-    
+
     /**
      * The character used to seperate multiple roles.
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -21,17 +21,16 @@
 import org.apache.cocoon.portal.profile.ProfileManager;
 
 /**
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class PortalObjects {
-	
+
 	private PortalService portalService;
 	private PortalComponentManager componentManager;
 	private ProfileManager profileManager;
 	private Layout portalLayout;
-	
-	
+
 	public PortalObjects(PortalService portalService) {
 		this.portalService = portalService;
 		this.componentManager = portalService.getComponentManager();
@@ -39,19 +38,18 @@
 		this.portalLayout = profileManager.getPortalLayout(null, null);
 	}
 
-
 	public PortalComponentManager getComponentManager() {
 		return componentManager;
 	}
-    
+
 	public Layout getPortalLayout() {
 		return portalLayout;
 	}
-    
+
 	public PortalService getPortalService() {
 		return portalService;
 	}
-    
+
 	public ProfileManager getProfileManager() {
 		return profileManager;
 	}

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/RoleMatcher.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/RoleMatcher.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/RoleMatcher.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/RoleMatcher.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -19,11 +19,11 @@
 
 /**
  * Defines the interface for role matchers.
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public interface RoleMatcher {
-    
+
     /**
      * @return Whether the user matches this role.
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/SingleRoleMatcher.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/SingleRoleMatcher.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/SingleRoleMatcher.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/helper/SingleRoleMatcher.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -19,12 +19,12 @@
 
 /**
  * A role matcher matching against a single role.
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class SingleRoleMatcher
 implements RoleMatcher {
-    
+
     /**
      * The role.
      */

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/service/UserRightsService.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/service/UserRightsService.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/service/UserRightsService.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/service/UserRightsService.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -31,11 +31,11 @@
 
 /**
  * Service, that provides access to the user rights configuration.
- * 
- * @version CVS $Id: UserRightsService.java 151233 2005-02-03 21:28:27Z cziegeler $
+ *
+ * @version $Id: UserRightsService.java 151233 2005-02-03 21:28:27Z cziegeler $
  */
 public class UserRightsService {
-    
+
     /** 
      * The properties' location.
      */
@@ -64,7 +64,7 @@
     /**
      * @return The location
      */
-    
+
     public Source getLocation() {
         return this.location;
     }
@@ -188,7 +188,6 @@
                 }
             }
         }
-
         return isAllowed;
     }
 

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/CheckAccessTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/CheckAccessTransformer.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/CheckAccessTransformer.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/CheckAccessTransformer.java Fri Oct 14 03:36:50 2005
@@ -42,7 +42,7 @@
     private UserRightsService urs;
     private PortalToolManager ptm;
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.transformation.AbstractSAXTransformer#service(org.apache.avalon.framework.service.ServiceManager)
      */
     public void service(ServiceManager manager) throws ServiceException {
@@ -51,7 +51,7 @@
         urs = ptm.getUserRightsService();
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.transformation.AbstractSAXTransformer#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
      */
     public void startElement(String uri, String name, String raw, Attributes attr)
@@ -67,7 +67,7 @@
         }
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.cocoon.transformation.AbstractSAXTransformer#endElement(java.lang.String, java.lang.String, java.lang.String)
      */
     public void endElement(String uri, String name, String raw)
@@ -82,14 +82,13 @@
         }
     }
 
-    /* (non-Javadoc)
+    /**
      * @see org.apache.avalon.framework.activity.Disposable#dispose()
      */
     public void dispose() {
         if (this.manager != null) {
             this.manager.release(ptm);
-            ptm = null;
-            this.manager = null;
+            this.ptm = null;
         }
         super.dispose();
     }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/PortalToolsI18nTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/PortalToolsI18nTransformer.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/PortalToolsI18nTransformer.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/PortalToolsI18nTransformer.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -27,14 +27,14 @@
 import org.apache.cocoon.transformation.I18nTransformer;
 
 /**
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class PortalToolsI18nTransformer extends I18nTransformer {
-    
+
     public static String ROLE = PortalToolsI18nTransformer.class.getName();
-    
-    /* (non-Javadoc)
+
+    /**
      * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
      */
     public void configure(Configuration conf) throws ConfigurationException {
@@ -43,7 +43,7 @@
           <catalogue id="portalTools" name="portalTools" location="cocoon:/i18n"/>
         </catalogues>
         */
-        
+
         if (conf.getChild("catalogues").getAttribute("new", "no").equals("no")) {
             super.configure(conf);
             return;
@@ -73,5 +73,4 @@
             this.manager.release(ptm);            
         }
     }
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/PortalToolsLayoutTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/PortalToolsLayoutTransformer.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/PortalToolsLayoutTransformer.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/transformation/PortalToolsLayoutTransformer.java Fri Oct 14 03:36:50 2005
@@ -47,15 +47,15 @@
 	private PortalToolManager pm;
 	private String selected;
 
-	/* (non-Javadoc)
+	/**
 	 * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
 	 */
 	public void service(ServiceManager manager) throws ServiceException {
 		super.service(manager);
-		pm =  (PortalToolManager) manager.lookup(PortalToolManager.ROLE);
+		this.pm =  (PortalToolManager) manager.lookup(PortalToolManager.ROLE);
 	}
 
-	/* (non-Javadoc)
+	/**
      * @see org.apache.cocoon.transformation.AbstractSAXTransformer#setup(org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
      */
     public void setup(SourceResolver resolver, Map objectModel, String src,
@@ -69,7 +69,7 @@
         }
     }
 
-	/* (non-Javadoc)
+	/**
 	 * @see org.apache.avalon.framework.activity.Disposable#dispose()
 	 */
 	public void dispose() {
@@ -80,8 +80,7 @@
         super.dispose();
 	}
 
-
-	/* (non-Javadoc)
+	/**
 	 * @see org.xml.sax.ContentHandler#startDocument()
 	 */
 	public void startDocument() throws SAXException {
@@ -126,8 +125,7 @@
 	    }
 	}
 
-
-	/* (non-Javadoc)
+	/**
 	 * @see org.xml.sax.ContentHandler#endDocument()
 	 */
 	public void endDocument() throws SAXException {
@@ -136,5 +134,4 @@
 		selected= null;
 		super.endDocument();
 	}
-
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -22,14 +22,14 @@
 /**
  * Grabbing the context of an user, which is set in the file sunrise-user.xml
  * and is stored in the class AuthenticationContext.
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class ContextGrabber {
-	
+
 	/**
 	 * Grabbing the context of the current user
-	 * 
+	 *
 	 * @param context the instantiated class AuthenticationContext
 	 * @return Object of context information
 	 */
@@ -41,16 +41,14 @@
 		} catch (Exception e) {
             // we ignore it for now
         }
-		
+
 		grabAuthContext (df.getFirstChild(),ub);
-		
+
 		return ub;
 	}
-	
+
 	private void grabAuthContext (Node node, UserBean ub) {
-		
 		while (node != null) {
-			
 			if (!node.getNodeName().equals("#text")) {
 				if (node.getFirstChild() != null) {
 					grabAuthContext  (node.getFirstChild () ,ub);
@@ -62,5 +60,4 @@
 			node = node.getNextSibling();
 		}
 	}
-	
 }

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextItem.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextItem.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextItem.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/ContextItem.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -17,24 +17,23 @@
 
 /**
  * Capsule a key and its value of an user context 
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class ContextItem {
-	
+ 
 	private final String key;
 	private final String value;
-	
+
 	public ContextItem(String key, String value){
 		this.key = key;
 		this.value = value;
 	}
-	
-	
+
 	public String getKey() {
 		return key;
 	}
-    
+
 	public String getValue() {
 		return value;
 	}

Modified: cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java?rev=321068&r1=321067&r2=321068&view=diff
==============================================================================
--- cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java (original)
+++ cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java Fri Oct 14 03:36:50 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 1999-2005 The Apache Software Foundation.
- * 
+ *
  * Licensed 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.
@@ -20,19 +20,18 @@
 
 /**
  * Object storing information of an user context. 
- * 
- * @version CVS $Id$
+ *
+ * @version $Id$
  */
 public class UserBean {
-	
+
 	private HashMap context = new HashMap ();
 	private String picture = "";
-	
-	
+
     public UserBean () {
         // empty constructor
     }
-    
+
     /**
      * Add a single context information
      * 
@@ -42,7 +41,7 @@
     public void addContext (String key, String value){
     	this.context.put (key, new ContextItem (key, value));
     }
-	
+
 	/**
 	 * Get the whole context of the current user
 	 * 
@@ -51,7 +50,7 @@
 	public Collection getContext () {
 		return this.context.values();
 	}
-	
+
 	/**
 	 * return specified context value
 	 * 
@@ -64,7 +63,7 @@
         }
 		return "";
 	}
-	
+
 	/**
 	 * Special Attribute for the cocoon portal tool example:
 	 * you can store even extra attributes in the bean
@@ -74,7 +73,7 @@
 	public String getPicture() {
 		return picture;
 	}
-	
+
 	/**
 	 * Special Attribute for the cocoon portal tool example:
 	 * you can store even extra attributes in the bean



Mime
View raw message