org.apache.lenya.cms.cocoon.acting
Class LanguageExistsAction

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.acting.AbstractAction
          extended by org.apache.lenya.cms.cocoon.acting.LanguageExistsAction
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.logger.LogEnabled, org.apache.cocoon.acting.Action

public class LanguageExistsAction
extends org.apache.cocoon.acting.AbstractAction

Action that checks the sitetree if there is a node with the current document-id and the current language, i.e. if the current document has a version in the current language.


Field Summary
 
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
 
Fields inherited from interface org.apache.cocoon.acting.Action
ROLE
 
Constructor Summary
LanguageExistsAction()
           
 
Method Summary
 java.util.Map act(org.apache.cocoon.environment.Redirector redirector, org.apache.cocoon.environment.SourceResolver resolver, java.util.Map objectModel, java.lang.String source, org.apache.avalon.framework.parameters.Parameters parameters)
          Check if the current document-id has a document for the currently requested language.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageExistsAction

public LanguageExistsAction()
Method Detail

act

public java.util.Map act(org.apache.cocoon.environment.Redirector redirector,
                         org.apache.cocoon.environment.SourceResolver resolver,
                         java.util.Map objectModel,
                         java.lang.String source,
                         org.apache.avalon.framework.parameters.Parameters parameters)
                  throws PageEnvelopeException,
                         DocumentDoesNotExistException,
                         DocumentException
Check if the current document-id has a document for the currently requested language. If yes return an empty map, if not return null.

Parameters:
redirector - a Redirector value
resolver - a SourceResolver value
objectModel - a Map value
source - a String value
parameters - a Parameters value
Returns:
an empty Map if there is a version of this document for the current language, null otherwiese
Throws:
DocumentDoesNotExistException - if there is no document with the specified document-id.
PageEnvelopeException - if the PageEnvelope could not be created.
DocumentException - if the language information could not be fetched from the document.


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