| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.publication.DocumentHelper
public class DocumentHelper
Helper class to handle documents from XSP.
| Constructor Summary | |
|---|---|
DocumentHelper(java.util.Map objectModel)
Ctor.  | 
|
| Method Summary | |
|---|---|
 java.lang.String | 
getCompleteParentUrl()
Returns the complete URL of the parent document.  | 
 java.lang.String | 
getDocumentUrl(java.lang.String documentId,
               java.lang.String documentArea,
               java.lang.String language)
Creates a document URL.  | 
static Document | 
getExistingLanguageVersion(Document document)
Returns an existing language version of a document.  | 
static Document | 
getExistingLanguageVersion(Document document,
                           java.lang.String preferredLanguage)
Returns an existing language version of a document.  | 
static Document | 
getParentDocument(Document document)
Returns the parent document of a document in the same language.  | 
 java.lang.String | 
getSourceUri(Document document)
Returns e.g. context:/lenya/pubs/default/content/authoring/tutorial/index_en.xml  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public DocumentHelper(java.util.Map objectModel)
objectModel - The Cocoon object model.| Method Detail | 
|---|
public java.lang.String getDocumentUrl(java.lang.String documentId,
                                       java.lang.String documentArea,
                                       java.lang.String language)
                                throws org.apache.cocoon.ProcessingException
documentId - The target document ID.documentArea - The target area.language - The target language.
org.apache.cocoon.ProcessingException - if something went wrong.
public java.lang.String getCompleteParentUrl()
                                      throws org.apache.cocoon.ProcessingException
org.apache.cocoon.ProcessingException - when something went wrong.
public static Document getExistingLanguageVersion(Document document)
                                           throws DocumentException
document - The document.
DocumentException - when an error occurs.
public static Document getExistingLanguageVersion(Document document,
                                                  java.lang.String preferredLanguage)
                                           throws DocumentException
document - The document.preferredLanguage - The preferred language.
DocumentException - when an error occurs.
public static Document getParentDocument(Document document)
                                  throws org.apache.cocoon.ProcessingException
document - The document.
null if the document parameter is a top-level document.
org.apache.cocoon.ProcessingException - when the parent document could not be created.public java.lang.String getSourceUri(Document document)
document - The document to calculate the path for.
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||