org.apache.lenya.cms.publication.util
Class DocumentLanguagesHelper

java.lang.Object
  extended by org.apache.lenya.cms.publication.util.DocumentLanguagesHelper

public class DocumentLanguagesHelper
extends java.lang.Object

Helper class for the policy GUI.


Constructor Summary
DocumentLanguagesHelper(java.util.Map objectModel, org.apache.avalon.framework.service.ServiceManager manager)
          Create a new DocumentlanguageHelper.
 
Method Summary
protected  Document getDocument(java.lang.String language)
          Create a document for a given language and the parameters given in the contructor.
 java.lang.String getLanguage()
           
 java.lang.String[] getLanguages()
          All available languages for the current URL.
protected  DocumentLocator getLocator()
           
 java.lang.String getUrl(java.lang.String language)
          Compute the URL for a given language and the parameters given in the contructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentLanguagesHelper

public DocumentLanguagesHelper(java.util.Map objectModel,
                               org.apache.avalon.framework.service.ServiceManager manager)
                        throws org.apache.cocoon.ProcessingException
Create a new DocumentlanguageHelper.

Parameters:
objectModel - the objectModel
manager - The service manager.
Throws:
org.apache.cocoon.ProcessingException - if the page envelope could not be created.
Method Detail

getLanguage

public java.lang.String getLanguage()
                             throws org.apache.cocoon.ProcessingException
Returns:
The requested language.
Throws:
org.apache.cocoon.ProcessingException - if an error occurs.

getLanguages

public java.lang.String[] getLanguages()
                                throws org.apache.cocoon.ProcessingException
All available languages for the current URL.

Returns:
A string array.
Throws:
org.apache.cocoon.ProcessingException

getUrl

public java.lang.String getUrl(java.lang.String language)
                        throws org.apache.cocoon.ProcessingException
Compute the URL for a given language and the parameters given in the contructor.

Parameters:
language - the language
Returns:
the url for the given language
Throws:
org.apache.cocoon.ProcessingException - if the document for the given language could not be created.

getDocument

protected Document getDocument(java.lang.String language)
                        throws org.apache.cocoon.ProcessingException
Create a document for a given language and the parameters given in the contructor.

Parameters:
language - the language
Returns:
the document with the given language
Throws:
org.apache.cocoon.ProcessingException - if the document for the given language could not be created.

getLocator

protected DocumentLocator getLocator()
                              throws DocumentBuildException
Throws:
DocumentBuildException


Copyright © 1999-2006 Apache Software Foundation. All Rights Reserved.