| java.lang.Object org.apache.lenya.cms.publication.util.DocumentHelper
DocumentHelper | public class DocumentHelper (Code) | | Helper class to handle documents from XSP.
|
Constructor Summary | |
public | DocumentHelper(ServiceManager manager, Map _objectModel) Ctor. |
DocumentHelper | public DocumentHelper(ServiceManager manager, Map _objectModel)(Code) | | Ctor.
Parameters: manager - The service manager. Parameters: _objectModel - The Cocoon object model. |
getCompleteParentUrl | public String getCompleteParentUrl() throws ProcessingException(Code) | | Returns the complete URL of the parent document. If the document is a top-level document, the
/index document is chosen. If the parent does not exist in the appropriate language, the
default language is chosen.
A string. throws: ProcessingException - when something went wrong. |
getDocumentUrl | public String getDocumentUrl(String uuid, String documentArea, String language) throws ProcessingException(Code) | | Creates a document URL. If the document ID is null, the current document ID is used.
If the document area is null, the current area is used. If the language is null,
the current language is used.
Parameters: uuid - The target document UUID. Parameters: documentArea - The target area. Parameters: language - The target language. A string. throws: ProcessingException - if something went wrong. |
getExistingLanguageVersion | public static Document getExistingLanguageVersion(Document document) throws DocumentException(Code) | | Returns an existing language version of a document. If the document exists in the default
language, the default language version is returned. Otherwise, a random language version is
returned. If no language version exists, a DocumentException is thrown.
Parameters: document - The document. A document. throws: DocumentException - when an error occurs. |
getExistingLanguageVersion | public static Document getExistingLanguageVersion(Document document, String preferredLanguage) throws DocumentException(Code) | | Returns an existing language version of a document. If the document exists in the preferred
language, this version is returned. Otherwise, if the document exists in the default
language, the default language version is returned. Otherwise, a random language version is
returned. If no language version exists, a DocumentException is thrown.
Parameters: document - The document. Parameters: preferredLanguage - The preferred language. A document. throws: DocumentException - when an error occurs. |
|
|