svn commit: r566250 - in /lenya/trunk/src/java/org/apache/lenya/cms: publication/PageEnvelope.java site/SiteUtil.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Wed Aug 15 09:34:09 2007
New Revision: 566250

URL: http://svn.apache.org/viewvc?view=rev&rev=566250
Log:
Remove SiteUtil.isDocument()

Modified:
    lenya/trunk/src/java/org/apache/lenya/cms/publication/PageEnvelope.java
    lenya/trunk/src/java/org/apache/lenya/cms/site/SiteUtil.java

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/PageEnvelope.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/publication/PageEnvelope.java?view=diff&rev=566250&r1=566249&r2=566250
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/PageEnvelope.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/PageEnvelope.java Wed Aug 15 09:34:09 2007
@@ -25,7 +25,6 @@
 import org.apache.avalon.framework.logger.ConsoleLogger;
 import org.apache.cocoon.environment.Request;
 import org.apache.lenya.cms.rc.RCEnvironment;
-import org.apache.lenya.cms.site.SiteUtil;
 
 /**
  * A page envelope carries a set of information that are needed during the presentation of a
@@ -284,7 +283,7 @@
         if (!documentChecked) {
             try {
                 documentChecked = true;
-                if (SiteUtil.isDocument(getDocumentFactory(), this.webappUrl)) {
+                if (getDocumentFactory().isDocument(this.webappUrl)) {
                     this.document = getDocumentFactory().getFromURL(this.webappUrl);
                 }
             } catch (final Exception e) {

Modified: lenya/trunk/src/java/org/apache/lenya/cms/site/SiteUtil.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/site/SiteUtil.java?view=diff&rev=566250&r1=566249&r2=566250
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/site/SiteUtil.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/site/SiteUtil.java Wed Aug 15 09:34:09 2007
@@ -22,11 +22,9 @@
 
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.ServiceSelector;
-import org.apache.lenya.cms.publication.DocumentBuilder;
 import org.apache.lenya.cms.publication.DocumentFactory;
 import org.apache.lenya.cms.publication.DocumentLocator;
 import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.URLInformation;
 
 /**
  * Utility to handle site structures.
@@ -106,24 +104,6 @@
                 }
                 manager.release(selector);
             }
-        }
-    }
-
-    public static boolean isDocument(DocumentFactory factory, String webappUrl)
-            throws SiteException {
-
-        URLInformation info = new URLInformation(webappUrl);
-        try {
-            Publication pub = factory.getPublication(info.getPublicationId());
-            if (pub.exists()) {
-                DocumentBuilder builder = pub.getDocumentBuilder();
-                return builder.isDocument(factory, webappUrl);
-            }
-            return false;
-        } catch (SiteException e) {
-            throw e;
-        } catch (Exception e) {
-            throw new SiteException(e);
         }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.