You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2006/07/27 14:59:18 UTC

svn commit: r426053 - /lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/DocumentInfoModule.java

Author: andreas
Date: Thu Jul 27 05:59:17 2006
New Revision: 426053

URL: http://svn.apache.org/viewvc?rev=426053&view=rev
Log:
Added webappUrl attribute to DocumentInfoModule

Modified:
    lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/DocumentInfoModule.java

Modified: lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/DocumentInfoModule.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/DocumentInfoModule.java?rev=426053&r1=426052&r2=426053&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/DocumentInfoModule.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/DocumentInfoModule.java Thu Jul 27 05:59:17 2006
@@ -22,6 +22,7 @@
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Map;
+
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.service.ServiceException;
@@ -30,9 +31,6 @@
 import org.apache.cocoon.components.modules.input.AbstractInputModule;
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Request;
-import org.apache.lenya.cms.metadata.MetaData;
-import org.apache.lenya.cms.metadata.MetaDataException;
-import org.apache.lenya.cms.metadata.dublincore.DublinCore;
 import org.apache.lenya.cms.publication.Document;
 import org.apache.lenya.cms.publication.DocumentException;
 import org.apache.lenya.cms.publication.DocumentFactory;
@@ -68,6 +66,7 @@
     protected final static String PARAM_PROPERTY = "property";
     protected final static int MIN_MANDATORY_PARAMS = 5;
 
+    protected final static String WEBAPP_URL = "webappUrl";
     protected final static String RESOURCE_TYPE = "resourceType";
     protected final static String LAST_MODIFIED = "lastModified";
     protected final static String MIME_TYPE = "mimeType";
@@ -77,7 +76,7 @@
 
     protected final static String[] PARAMS = { PARAM_PUBLICATION_ID, PARAM_AREA, PARAM_DOCUMENT_ID,
             PARAM_DOCUMENT_LANGUAGE, PARAM_PROPERTY, VISIBLE_IN_NAVIGATION, MIME_TYPE,
-            CONTENT_LENGTH };
+            CONTENT_LENGTH, WEBAPP_URL };
 
     protected final static String META_RESOURCE_TYPE = "resourceType";
     protected final static String META_EXPIRES = "expires";
@@ -137,6 +136,8 @@
                 value = document.getMimeType();
             } else if (attribute.equals(CONTENT_LENGTH)) {
                 value = Long.toString(document.getContentLength());
+            } else if (attribute.equals(WEBAPP_URL)) {
+                value = document.getCanonicalWebappURL();
             } else if (attribute.equals(EXPIRES)) {
                 try {
                     Date expires = document.getExpires();



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org