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

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.FirstChildExistsAction
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.logger.LogEnabled, org.apache.cocoon.acting.Action

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

Action that checks the sitetree if there is a child document with 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
FirstChildExistsAction()
           
 
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 child 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

FirstChildExistsAction

public FirstChildExistsAction()
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,
                         SiteTreeException,
                         DocumentBuildException
Check if the current document-id has a child 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.
SiteTreeException - if the sitetree couldn't be created
DocumentBuildException - if the DocumentBuilder couldn't be created


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