cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r321078 - in /cocoon/blocks: portal-sample/trunk/samples/ portal-sample/trunk/samples/conf/ portal-sample/trunk/samples/tools/ portal-sample/trunk/samples/tools/plugins/copletManagement/ portal-sample/trunk/samples/tools/plugins/userManagem...
Date Fri, 14 Oct 2005 11:55:53 GMT
Author: cziegeler
Date: Fri Oct 14 04:55:44 2005
New Revision: 321078

URL: http://svn.apache.org/viewcvs?rev=321078&view=rev
Log:
Code cleanup

Modified:
    cocoon/blocks/portal-sample/trunk/samples/conf/cocoon-portal-tools.xconf
    cocoon/blocks/portal-sample/trunk/samples/sitemap.xmap
    cocoon/blocks/portal-sample/trunk/samples/tools/plugins/copletManagement/sitemap.xmap
    cocoon/blocks/portal-sample/trunk/samples/tools/plugins/userManagement/flow.js
    cocoon/blocks/portal-sample/trunk/samples/tools/plugins/userManagement/sitemap.xmap
    cocoon/blocks/portal-sample/trunk/samples/tools/sitemap.xmap
    cocoon/blocks/portal/trunk/java/org/apache/cocoon/portal/tools/PortalToolManager.java

Modified: cocoon/blocks/portal-sample/trunk/samples/conf/cocoon-portal-tools.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal-sample/trunk/samples/conf/cocoon-portal-tools.xconf?rev=321078&r1=321077&r2=321078&view=diff
==============================================================================
--- cocoon/blocks/portal-sample/trunk/samples/conf/cocoon-portal-tools.xconf (original)
+++ cocoon/blocks/portal-sample/trunk/samples/conf/cocoon-portal-tools.xconf Fri Oct 14 04:55:44
2005
@@ -21,7 +21,7 @@
 <components>
 
   <component class="org.apache.cocoon.portal.tools.PortalToolManager" 
-             role="org.apache.cocoon.portal.tools.PortalToolManager">
+             role="org.apache.cocoon.portal.tools.PortalToolManager" preload="true">
 	<parameter name="root" value="tools/"/>
 	<parameter name="conf" value="conf.xml"/>
 	<parameter name="auth" value="auth.xml"/>

Modified: cocoon/blocks/portal-sample/trunk/samples/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal-sample/trunk/samples/sitemap.xmap?rev=321078&r1=321077&r2=321078&view=diff
==============================================================================
--- cocoon/blocks/portal-sample/trunk/samples/sitemap.xmap (original)
+++ cocoon/blocks/portal-sample/trunk/samples/sitemap.xmap Fri Oct 14 04:55:44 2005
@@ -117,9 +117,9 @@
 
       <map:match pattern="save-user-profile">
         <map:generate src="resources/save-user-profile.xml"/>
-				<map:transform src="styles/save-user-profile.xsl">
-					<map:parameter name="profiles" value="context://samples/blocks/portal-sample/profiles/"/>
-				</map:transform>
+        <map:transform src="styles/save-user-profile.xsl">
+          <map:parameter name="profiles" value="context://samples/blocks/portal-sample/profiles/"/>
+        </map:transform>
         <map:transform type="session"/>
         <map:transform type="write-source"/>
         <map:serialize type="xml"/>

Modified: cocoon/blocks/portal-sample/trunk/samples/tools/plugins/copletManagement/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal-sample/trunk/samples/tools/plugins/copletManagement/sitemap.xmap?rev=321078&r1=321077&r2=321078&view=diff
==============================================================================
--- cocoon/blocks/portal-sample/trunk/samples/tools/plugins/copletManagement/sitemap.xmap
(original)
+++ cocoon/blocks/portal-sample/trunk/samples/tools/plugins/copletManagement/sitemap.xmap
Fri Oct 14 04:55:44 2005
@@ -16,56 +16,48 @@
 -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
   <map:components>
-      <map:generators default="file">
+    <map:generators default="file">
       <map:generator name="xmlprofile"
                      src="org.apache.cocoon.portal.tools.copletManagement.generation.XMLProfileGenerator"
/>
-	      </map:generators>
-    <map:transformers default="xalan">
-    </map:transformers>
+    </map:generators>
   </map:components>
-<!-- flow script -->
+
+  <!-- flow script -->
   <map:flow language="javascript">
     <map:script src="flow.js" />
   </map:flow>
+  
   <map:pipelines>
-<!-- Now the accessible pipelines -->
-    <map:pipeline>
-      
+    <map:pipeline>      
       <map:match pattern="main">
         <map:generate src="tool.xml" />
         <map:serialize type="xml" />
       </map:match>
-     
-     <map:match pattern="save-user-profile">
-        <map:generate src="context://samples/blocks/portal-sample/resources/save-user-profile.xml"/>
-				<map:transform src="context://samples/blocks/portal-sample/styles/save-user-profile.xsl">
-					<map:parameter name="profiles" value="context://samples/blocks/portal-sample/profiles/"/>
-				</map:transform>
-        <map:transform type="session"/>
-        <map:transform type="write-source"/>
-        <map:serialize type="xml"/>
+
+      <map:match pattern="save-user-profile">
+        <map:act type="portal-save-profile"/>
+        <map:redirct-to uri="cocoon:/main"/>
       </map:match>
 
+      <map:match pattern="i18n/**">
+        <map:generate src="{1}" type="i18nc"/>
+        <map:serialize type="xml"/>
+      </map:match> 
      
-     		<map:match pattern="i18n/**">
-			<map:generate src="{1}" type="i18nc"/>
-			<map:serialize type="xml"/>
-		</map:match> 
-     
-	<!-- generate the layoutprofile -->
-	<map:match pattern="layoutProfile/*">
-		<map:generate type="xmlprofile"/>
-		<map:transform src="styles/createIndex.xsl">
-			<map:parameter name="rootId" value="{1}" />
-		</map:transform>
-		<map:serialize type="xml" />
-	</map:match>
-	<map:match pattern="layoutProfile">
-		<map:generate type="xmlprofile"/>
-		<map:transform src="styles/createIndex.xsl">
-		</map:transform>
-		<map:serialize type="xml" />
-	</map:match>
+      <!-- generate the layoutprofile -->
+      <map:match pattern="layoutProfile/*">
+        <map:generate type="xmlprofile"/>
+        <map:transform src="styles/createIndex.xsl">
+          <map:parameter name="rootId" value="{1}" />
+        </map:transform>
+        <map:serialize type="xml" />
+      </map:match>
+
+      <map:match pattern="layoutProfile">
+        <map:generate type="xmlprofile"/>
+        <map:transform src="styles/createIndex.xsl"/>
+        <map:serialize type="xml" />
+      </map:match>
       
       <map:match pattern="page/showTab/*">
         <map:generate src="cocoon:/layoutProfile/{1}"/>
@@ -81,17 +73,17 @@
         <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
         <map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl" />
         <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
-					<map:parameter name="base" value="{portalpath:relative}"/>
-					<map:parameter name="title" value="{global:toolsTitle}"/>
+          <map:parameter name="base" value="{portalpath:relative}"/>
+          <map:parameter name="title" value="{global:toolsTitle}"/>
         </map:transform>
         <map:serialize type="html" />
       </map:match>
-      
+
       <map:match pattern="page/showxml/*">
         <map:generate src="cocoon:/layoutProfile/{1}"/>
         <map:serialize type="xml" />
       </map:match>
-      
+
       <map:match pattern="jx/*.jx">
         <map:generate src="jx/{1}.jx" type="jx" />
         <map:transform type="tool-layout">
@@ -101,12 +93,12 @@
         <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
         <map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl" />
         <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
-					<map:parameter name="base" value="{portalpath:relative}"/>
-					<map:parameter name="title" value="{global:toolsTitle}"/>
+          <map:parameter name="base" value="{portalpath:relative}"/>
+          <map:parameter name="title" value="{global:toolsTitle}"/>
         </map:transform>
         <map:serialize type="html" />
       </map:match>
-      
+
       <map:match pattern="form/**">
         <map:generate src="form/{1}.xml"/>
         <map:transform type="forms"/>
@@ -119,31 +111,30 @@
         <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
         <map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl" />
         <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
-					<map:parameter name="base" value="{portalpath:relative}"/>
-					<map:parameter name="title" value="{global:toolsTitle}"/>
+          <map:parameter name="base" value="{portalpath:relative}"/>
+          <map:parameter name="title" value="{global:toolsTitle}"/>
         </map:transform>
         <map:serialize type="html" />
       </map:match>
-      
+
       <map:match pattern="model/**">
       	<map:generate src="form/{1}/form.xml"/>
       	<map:serialize type="xml"/>
       </map:match>
-      
+
       <map:match pattern="selectSkinThumb/*">
       	<map:read src="{portal-skin:skin.thumbnailuri.{1}}"/>
       </map:match>
-      
+
       <map:match pattern="*.continue">
         <map:call continuation="{1}" />
       </map:match>
-      
+
       <map:match pattern="*">
         <map:call function="{1}" />
       </map:match>
-      
+
     </map:pipeline>
   </map:pipelines>
 </map:sitemap>
-<!-- end of file -->
 

Modified: cocoon/blocks/portal-sample/trunk/samples/tools/plugins/userManagement/flow.js
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal-sample/trunk/samples/tools/plugins/userManagement/flow.js?rev=321078&r1=321077&r2=321078&view=diff
==============================================================================
--- cocoon/blocks/portal-sample/trunk/samples/tools/plugins/userManagement/flow.js (original)
+++ cocoon/blocks/portal-sample/trunk/samples/tools/plugins/userManagement/flow.js Fri Oct
14 04:55:44 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,7 @@
 
 /* component authenticationManager contains the data from the file 'sunrise-user.xml' */
 
-function getContext ()
-{
+function getContext () {
 	var contextMan = 
 	cocoon.getComponent(Packages.org.apache.cocoon.webapps.session.ContextManager.ROLE);
 	var context = contextMan.getContext("authentication");

Modified: cocoon/blocks/portal-sample/trunk/samples/tools/plugins/userManagement/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal-sample/trunk/samples/tools/plugins/userManagement/sitemap.xmap?rev=321078&r1=321077&r2=321078&view=diff
==============================================================================
--- cocoon/blocks/portal-sample/trunk/samples/tools/plugins/userManagement/sitemap.xmap (original)
+++ cocoon/blocks/portal-sample/trunk/samples/tools/plugins/userManagement/sitemap.xmap Fri
Oct 14 04:55:44 2005
@@ -16,81 +16,65 @@
 -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 	
-	<!-- components -->
-	<map:components>
-		<map:transformers default="xalan">
-		</map:transformers>
-	</map:components>
-	
-	<!-- flow script -->
-	<map:flow language="javascript">
-		<map:script src="flow.js"/>
-	</map:flow>
-	
-	<map:pipelines>
-
-		<!-- accessible pipeline -->
-		<map:pipeline>
-			
-			<!-- necessary standard matcher -->
-			<map:match pattern="main">
-				<map:generate src="tool.xml"/>
-				<map:serialize type="xml"/>
-			</map:match>
-     		
-     	<map:match pattern="i18n/**">
-			<map:generate src="{1}" type="i18nc"/>
-			<map:serialize type="xml"/>
-		</map:match>
-     		
-			<map:match pattern="*">
-				<map:call function="{1}">
-					<map:parameter name="user" value="{ID}"/>
-				</map:call>
-			</map:match>
-			
-		
-			<!-- matcher for this plugin -->
-			
-			<map:match pattern="page/form/*">
-				<map:generate src="form/{1}_template.xml"/>
-				<map:transform type="forms" />
-				<map:transform type="tool-layout">
-					<map:parameter name="selected" value="userManagement" />
-				</map:transform>
-				<map:transform src="{portal-skin:skin.basepath}/styles/forms-styling.xsl" />
-				<map:transform src="stylesheets/convertAbstractForm.xsl">
-					<map:parameter name="mode" value="{request-param:mode}"/>
-				</map:transform>
-				<map:transform type="i18n" />
-				<map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
-				<map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl" />
-				<map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
-					<map:parameter name="base" value="{portalpath:relative}"/>
-					<map:parameter name="title" value="{global:toolsTitle}"/>
-				</map:transform>
-				<map:serialize type="html" />
-			</map:match>
-			
-			<map:match pattern="page/model/*">
-				<map:generate src="form/{1}_form_{request-param:mode}.xml"/>
-				<map:serialize type="xml"/>
-			</map:match>
-			
-			<map:match pattern="page/binding/*">
-				<map:generate src="form/{1}_binding.xml"/>
-				<map:serialize type="xml"/>
-			</map:match>
-			
-			<map:match pattern="page/abstractForm">
-				<map:generate src="form/userData_style.xml"/>
-				<map:serialize type="xml"/>
-			</map:match>
-			
-		</map:pipeline>
-		
-	</map:pipelines>
-	
-</map:sitemap>
+  <!-- flow script -->
+  <map:flow language="javascript">
+    <map:script src="flow.js"/>
+  </map:flow>
+
+  <map:pipelines>
+    <map:pipeline>
+      <!-- necessary standard matcher -->
+      <map:match pattern="main">
+        <map:generate src="tool.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="i18n/**">
+        <map:generate src="{1}" type="i18nc"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="*">
+        <map:call function="{1}">
+          <map:parameter name="user" value="{ID}"/>
+        </map:call>
+      </map:match>
 
-<!-- end of file -->
+      <!-- matcher for this plugin -->
+      <map:match pattern="page/form/*">
+        <map:generate src="form/{1}_template.xml"/>
+        <map:transform type="forms" />
+        <map:transform type="tool-layout">
+          <map:parameter name="selected" value="userManagement"/>
+        </map:transform>
+        <map:transform src="{portal-skin:skin.basepath}/styles/forms-styling.xsl"/>
+        <map:transform src="stylesheets/convertAbstractForm.xsl">
+          <map:parameter name="mode" value="{request-param:mode}"/>
+        </map:transform>
+        <map:transform type="i18n"/>
+        <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl"/>
+        <map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl"/>
+        <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
+          <map:parameter name="base" value="{portalpath:relative}"/>
+          <map:parameter name="title" value="{global:toolsTitle}"/>
+        </map:transform>
+        <map:serialize type="html"/>
+      </map:match>
+
+      <map:match pattern="page/model/*">
+        <map:generate src="form/{1}_form_{request-param:mode}.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="page/binding/*">
+        <map:generate src="form/{1}_binding.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="page/abstractForm">
+        <map:generate src="form/userData_style.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Modified: cocoon/blocks/portal-sample/trunk/samples/tools/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/portal-sample/trunk/samples/tools/sitemap.xmap?rev=321078&r1=321077&r2=321078&view=diff
==============================================================================
--- cocoon/blocks/portal-sample/trunk/samples/tools/sitemap.xmap (original)
+++ cocoon/blocks/portal-sample/trunk/samples/tools/sitemap.xmap Fri Oct 14 04:55:44 2005
@@ -31,11 +31,11 @@
 	  <map:generator name="i18nc" src="org.apache.cocoon.portal.tools.generation.I18nCatalogueGenerator"/>
     </map:generators>
     <map:actions>
-    	<map:action name="check-access-action" src="org.apache.cocoon.portal.tools.acting.CheckAccessAction"/>
+      <map:action name="check-access-action" src="org.apache.cocoon.portal.tools.acting.CheckAccessAction"/>
     </map:actions>
   </map:components>
 
-<!-- flow script -->
+  <!-- flow script -->
   <map:flow language="javascript">
     <map:script src="flow.js" />
   </map:flow>
@@ -108,7 +108,7 @@
         </map:call>
       </map:match>
 
-<!-- mount sub-sitemaps -->
+      <!-- mount sub-sitemaps -->
       <map:match pattern="plugins/*/**">
      	 <map:act type="cowarp-is-logged-in">
             <map:parameter name="application" value="portal"/> 
@@ -123,4 +123,3 @@
     </map:pipeline>
   </map:pipelines>
 </map:sitemap>
-<!-- end of file -->
\ No newline at end of file

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=321078&r1=321077&r2=321078&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 04:55:44 2005
@@ -93,6 +93,17 @@
 		    fSource = this.resolver.resolveURI(rootDir + confFile);
 		    DefaultConfigurationBuilder confBuilder = new DefaultConfigurationBuilder();
 		    this.configuration = confBuilder.build(fSource.getInputStream());
+        } catch (ConfigurationException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (SAXException e) {
+            e.printStackTrace();
+        } finally {
+            this.resolver.release(fSource);
+        }
+        fSource = null;
+        try {
 		    fSource = this.resolver.resolveURI(rootDir + authFile);
 		    this.userRightsService = new UserRightsService();
 		    this.userRightsService.setLocation(fSource);
@@ -102,10 +113,6 @@
 			e.printStackTrace();
 		} catch (IOException e) {
 			e.printStackTrace();
-        } catch (ConfigurationException e) {
-            e.printStackTrace();
-        } catch (SAXException e) {
-            e.printStackTrace();
         } finally {
             this.resolver.release(fSource);
         }



Mime
View raw message