cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r606931 - in /cocoon/trunk/blocks/cocoon-portal: cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/om/ cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/ cocoon-portal-sample/src/main/resources/COB-INF/ cocoon-...
Date Wed, 26 Dec 2007 18:42:45 GMT
Author: cziegeler
Date: Wed Dec 26 10:42:43 2007
New Revision: 606931

URL: http://svn.apache.org/viewvc?rev=606931&view=rev
Log:
Use File for skin base path.

Modified:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/om/SkinDescription.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultVariableResolver.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/properties/variables.properties
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/sitemap.xmap
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sitemap/src/main/java/org/apache/cocoon/portal/sitemap/modules/SkinModule.java

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/om/SkinDescription.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/om/SkinDescription.java?rev=606931&r1=606930&r2=606931&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/om/SkinDescription.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/om/SkinDescription.java
Wed Dec 26 10:42:43 2007
@@ -16,6 +16,8 @@
  */
 package org.apache.cocoon.portal.om;
 
+import java.io.File;
+
 /**
  *
  * @version $Id$
@@ -23,20 +25,20 @@
 public class SkinDescription {
 
     protected String name;
-    protected String basePath;
+    protected File basePath;
     protected String thumbnailPath;
 
     /**
      * @return Returns the basePath.
      */
-    public String getBasePath() {
+    public File getBasePath() {
         return basePath;
     }
 
     /**
      * @param basePath The basePath to set.
      */
-    public void setBasePath(String basePath) {
+    public void setBasePath(File basePath) {
         this.basePath = basePath;
     }
 

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultVariableResolver.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultVariableResolver.java?rev=606931&r1=606930&r2=606931&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultVariableResolver.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultVariableResolver.java
Wed Dec 26 10:42:43 2007
@@ -104,7 +104,7 @@
             }
             String skinPath = "";
             if ( desc != null ) {
-                skinPath = desc.getBasePath();
+                skinPath = desc.getBasePath().getAbsolutePath();
             }
             if ( insertPos == 0 ) {
                 return skinPath + this.value;

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/properties/variables.properties
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/properties/variables.properties?rev=606931&r1=606930&r2=606931&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/properties/variables.properties
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/config/properties/variables.properties
Wed Dec 26 10:42:43 2007
@@ -18,5 +18,3 @@
 skin=modern
 # the title of the portal page
 mainTitle=Cocoon Portal
-# the title of the tools page
-toolsTitle=Cocoon Portal Tools

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/sitemap.xmap?rev=606931&r1=606930&r2=606931&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/sitemap.xmap
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sample/src/main/resources/COB-INF/sitemap.xmap
Wed Dec 26 10:42:43 2007
@@ -222,7 +222,7 @@
               <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
                 <map:parameter name="user" value="{ID}"/>
                 <map:parameter name="title" value="{global:mainTitle}"/>
-                <map:parameter name="skin" value="{portal-skin:skin}"/>
+                <map:parameter name="skin" value="{global:skin}"/>
               </map:transform>
            <!--   
               <map:transform src="{portal-skin:skin.basepath}/styles/forms-styling.xsl">

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sitemap/src/main/java/org/apache/cocoon/portal/sitemap/modules/SkinModule.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sitemap/src/main/java/org/apache/cocoon/portal/sitemap/modules/SkinModule.java?rev=606931&r1=606930&r2=606931&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sitemap/src/main/java/org/apache/cocoon/portal/sitemap/modules/SkinModule.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-sitemap/src/main/java/org/apache/cocoon/portal/sitemap/modules/SkinModule.java
Wed Dec 26 10:42:43 2007
@@ -31,7 +31,7 @@
  *
  * @version $Id$
  */
-public class SkinModule 
+public class SkinModule
     extends AbstractModule {
 
     /** The global input module. */
@@ -51,7 +51,7 @@
     /**
 	 * @see org.apache.cocoon.components.modules.input.InputModule#getAttribute(java.lang.String,
org.apache.avalon.framework.configuration.Configuration, java.util.Map)
 	 */
-	public Object getAttribute(String name, Configuration modeConf, Map objectModel) 
+	public Object getAttribute(String name, Configuration modeConf, Map objectModel)
     throws ConfigurationException {
         String key = name;
         // lazy init
@@ -104,7 +104,7 @@
             if ( "skin".equals(key) ) {
                 return skinName;
             } else if ( "skin.basepath".equals(key) ) {
-                return desc.getBasePath();
+                return desc.getBasePath().getAbsoluteFile();
             } else if ( "skin.thumbnailpath".equals(key) ) {
                 return desc.getThumbnailPath();
             } else if ( key.startsWith("skin.thumbnailuri.") ) {
@@ -112,7 +112,7 @@
                 for(Iterator it = portalService.getSkinDescriptions().iterator(); it.hasNext();)
{
                     SkinDescription selected = (SkinDescription) it.next();
                     if(selected.getName().equals(selectedSkinName)) {
-                        return selected.getBasePath() + "/"  + selected.getThumbnailPath();

+                        return selected.getBasePath() + "/"  + selected.getThumbnailPath();
                     }
                 }
             }



Mime
View raw message