Hi Lenya devs,
the opendocument module (CreateOpenDocument) contains code
which
depends on the configuration of the publication's content
directory:
contentDir = pub.getContentDir();
String urlID = "content/" + document.getArea() +
document.getId()
+ "/" + DEFAULT_INDEX + "_" +
document.getLanguage();
if (contentDir == null) {
destination = SourceNode.CONTEXT_PREFIX
+ Publication.PUBLICATION_PREFIX_URI +
"/"
+ publicationId + "/" + urlID;
} else {
if (new File(contentDir).isAbsolute()) {
// Absolute
destination = SourceNode.FILE_PREFIX + contentDir
+ File.separator + urlID;
} else {
// Relative
destination = SourceNode.CONTEXT_PREFIX +
contentDir
+ File.separator + urlID;
}
}
This violates SoC (the create usecase shouldn't have to
care about
the publication configuration).
Is there a special reason why document.getSourceURI() is not
sufficient
to write the content?
-- Andreas
--
Andreas Hartmann
Wyona Inc. - Open Source Content Management - Apache
Lenya
http://www.wyona.com
http://lenya.apache.org
andreas.hartmann wyona.com andreas apache.org
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe lenya.apache.org
For additional commands, e-mail: dev-help lenya.apache.org
|