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 2007/01/10 14:07:20 UTC
svn commit: r494804 -
/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PageEnvelopeModule.java
Author: andreas
Date: Wed Jan 10 05:07:19 2007
New Revision: 494804
URL: http://svn.apache.org/viewvc?view=rev&rev=494804
Log:
PageEnvelopeModule: use DocumentBuilder directly instead of SiteUtil convenience method
Modified:
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PageEnvelopeModule.java
Modified: lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PageEnvelopeModule.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PageEnvelopeModule.java?view=diff&rev=494804&r1=494803&r2=494804
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PageEnvelopeModule.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PageEnvelopeModule.java Wed Jan 10 05:07:19 2007
@@ -32,12 +32,12 @@
import org.apache.cocoon.environment.Request;
import org.apache.commons.lang.StringUtils;
import org.apache.lenya.cms.publication.Document;
+import org.apache.lenya.cms.publication.DocumentBuildException;
import org.apache.lenya.cms.publication.DocumentLocator;
import org.apache.lenya.cms.publication.PageEnvelope;
import org.apache.lenya.cms.publication.Publication;
import org.apache.lenya.cms.publication.ResourceType;
import org.apache.lenya.cms.site.SiteException;
-import org.apache.lenya.cms.site.SiteUtil;
import org.apache.lenya.util.ServletHelper;
/**
@@ -151,7 +151,12 @@
Publication pub = envelope.getPublication();
Request request = ObjectModelHelper.getRequest(objectModel);
String url = ServletHelper.getWebappURI(request);
- DocumentLocator loc = SiteUtil.getLocator(this.manager, pub.getFactory(), url);
+ DocumentLocator loc;
+ try {
+ loc = pub.getDocumentBuilder().getLocator(pub.getFactory(), url);
+ } catch (DocumentBuildException e) {
+ throw new SiteException(e);
+ }
path = loc.getPath();
} else {
path = doc.getLocator().getPath();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org