logo       

svn commit: r264158 - in /lenya/trunk/src/java/org/apache/lenya/cms: cocoon: msg#00093

Subject: svn commit: r264158 - in /lenya/trunk/src/java/org/apache/lenya/cms: cocoon/acting/LanguageExistsAction.java publication/DefaultDocument.java
Author: andreas
Date: Mon Aug 29 08:41:19 2005
New Revision: 264158

URL: http://svn.apache.org/viewcvs?rev=264158&view=rev
Log:
[minor change] simplified code, removed accidentially committed error log

Modified:
    
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/acting/LanguageExistsAction.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java

Modified: 
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/acting/LanguageExistsAction.java
URL: 
http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/acting/LanguageExistsAction.java?rev=264158&r1=264157&r2=264158&view=diff
==============================================================================
--- 
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/acting/LanguageExistsAction.java
 (original)
+++ 
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/acting/LanguageExistsAction.java
 Mon Aug 29 08:41:19 2005
@@ -33,12 +33,9 @@
 import org.apache.lenya.cms.publication.Document;
 import org.apache.lenya.cms.publication.DocumentDoesNotExistException;
 import org.apache.lenya.cms.publication.DocumentIdentityMap;
-import org.apache.lenya.cms.publication.PageEnvelope;
-import org.apache.lenya.cms.publication.PageEnvelopeFactory;
-import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationUtil;
 import org.apache.lenya.cms.repository.RepositoryUtil;
 import org.apache.lenya.cms.repository.Session;
+import org.apache.lenya.util.ServletHelper;
 
 /**
  * Action that checks the sitetree if there is a node with the current 
document-id and the current
@@ -72,11 +69,9 @@
         Request request = ObjectModelHelper.getRequest(objectModel);
         Session session = RepositoryUtil.getSession(request, getLogger());
         DocumentIdentityMap map = new DocumentIdentityMap(session, 
this.manager, getLogger());
-        Publication pub = PublicationUtil.getPublication(this.manager, 
objectModel);
-        PageEnvelope pageEnvelope = 
PageEnvelopeFactory.getInstance().getPageEnvelope(map,
-                objectModel, pub);
 
-        Document doc = pageEnvelope.getDocument();
+        String url = ServletHelper.getWebappURI(request);
+        Document doc = map.getFromURL(url);
         String language = doc.getLanguage();
 
         if (!doc.existsInAnyLanguage()) {

Modified: 
lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java
URL: 
http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java?rev=264158&r1=264157&r2=264158&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java 
(original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java 
Mon Aug 29 08:41:19 2005
@@ -59,9 +59,9 @@
             DocumentIdentifier identifier, Logger _logger) {
 
         ContainerUtil.enableLogging(this, _logger);
-        // if (getLogger().isDebugEnabled())
-        getLogger().error("DefaultDocument() creating new instance with id [" 
+ identifier.getId()
-                + "], language [" + identifier.getLanguage() + "]");
+        if (getLogger().isDebugEnabled())
+            getLogger().debug("DefaultDocument() creating new instance with id 
["
+                    + identifier.getId() + "], language [" + 
identifier.getLanguage() + "]");
 
         this.manager = manager;
         this.identifier = identifier;
@@ -75,8 +75,8 @@
         this.identityMap = map;
 
         if (getLogger().isDebugEnabled())
-            getLogger().debug("DefaultDocument() done building instance with 
_id [" + identifier.getId()
-                    + "], _language [" + identifier.getLanguage() + "]");
+            getLogger().debug("DefaultDocument() done building instance with 
_id ["
+                    + identifier.getId() + "], _language [" + 
identifier.getLanguage() + "]");
 
     }


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    politics.lenini...    audio.emagic.ex...    tex.texinfo.gen...    handhelds.linux...    ietf.sipping/20...    lang.erlang.gen...    cygwin.talk/200...    yellowdog.gener...    mozilla.devel.l...    xfree86.newbie/...    openbsd.ports/2...    db.oracle.devel...    kde.kalyxo.deve...    user-groups.lin...    bbc.cvs/2003-04...    gnu.libtool.bug...    redhat.k12osn/2...    emulators.wine....    freebsd.devel.d...    search.xapian.g...    java.izpack.use...    network.mrtg.us...    windows.total-c...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe