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 2003/06/25 16:32:00 UTC
cvs commit: cocoon-lenya/src/java/org/apache/lenya/cms/publication DefaultDocument.java
andreas 2003/06/25 07:32:00
Modified: src/java/org/apache/lenya/cms/publication
DefaultDocument.java
Log:
added file getters
Revision Changes Path
1.5 +22 -0 cocoon-lenya/src/java/org/apache/lenya/cms/publication/DefaultDocument.java
Index: DefaultDocument.java
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/java/org/apache/lenya/cms/publication/DefaultDocument.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DefaultDocument.java 30 May 2003 14:53:52 -0000 1.4
+++ DefaultDocument.java 25 Jun 2003 14:32:00 -0000 1.5
@@ -43,6 +43,8 @@
*/
package org.apache.lenya.cms.publication;
+import java.io.File;
+
/**
* A typical CMS document.
*
@@ -74,6 +76,26 @@
*/
public Publication getPublication() {
return publication;
+ }
+
+ /**
+ * Returns the file for this document in a certain area and language.
+ * @param area The area.
+ * @param language The language.
+ * @return A file object.
+ */
+ public File getFile(String area, String language) {
+ return getPublication().getPathMapper().getFile(
+ getPublication(), area, getId(), language);
+ }
+
+ /**
+ * Returns the files for this document in a certain area and all languages.
+ * @param area The area.
+ * @return A file object.
+ */
+ public File[] getFiles(String area) {
+ return getPublication().getPathMapper().getFiles(getPublication(), area, getId());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org