You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by jw...@apache.org on 2005/05/17 17:33:39 UTC
svn commit: r170611 -
/lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java
Author: jwkaltz
Date: Tue May 17 08:33:37 2005
New Revision: 170611
URL: http://svn.apache.org/viewcvs?rev=170611&view=rev
Log:
[minor change] reduced dependency on parent document
Modified:
lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java
Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java?rev=170611&r1=170610&r2=170611&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java Tue May 17 08:33:37 2005
@@ -67,7 +67,7 @@
if (getLogger().isDebugEnabled())
getLogger().debug("DocumentManagerImpl::add() called with:\n"
- + "\t parentDocument.getId() [" + parentDocument.getId() + "]\n"
+ + "\t parentDocument.getId() [" + (parentDocument != null ? parentDocument.getId() : "null") + "]\n"
+ "\t newDocumentNodeName [" + newDocumentNodeName + "]\n"
+ "\t newDocumentId [" + newDocumentId + "]\n" + "\t documentTypeName ["
+ documentTypeName + "]\n" + "\t language [" + language + "]\n"
@@ -124,8 +124,8 @@
// where, relative to content base (and potentially to the parent
// as well), the new document shall be created
String contentBaseURI = publication.getContentURI(area);
- String newDocumentURI = creator.getNewDocumentURI(contentBaseURI, parentDocument
- .getId(), newDocumentNodeName, language);
+ String parentId = (parentDocument != null ? parentDocument.getId() : "/");
+ String newDocumentURI = creator.getNewDocumentURI(contentBaseURI, parentId, newDocumentNodeName, language);
// Important note:
// how the new document's source URI is constructed is
@@ -741,4 +741,4 @@
copy(sortedSourceDocs[i], (Document) source2target.get(sortedSourceDocs[i]));
}
}
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org