org.apache.lenya.cms.cocoon.flow
Interface FlowHelper

All Known Implementing Classes:
FlowHelperImpl

public interface FlowHelper

Flowscript utility class.

Version:
$Id: FlowHelper.java 564507 2007-08-10 08:33:31Z andreas $

Field Summary
static java.lang.String ROLE
          The Avalon Role.
 
Method Summary
 DocumentHelper getDocumentHelper(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon)
          Returns a DocumentHelper instance.
 java.lang.String getImageParameterValue(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon, java.lang.String parameterName)
          Resolves the request parameter value for a specific name.
 java.util.Map getObjectModel(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon)
          Returns the Cocoon Object Model
 PageEnvelope getPageEnvelope(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon)
          Returns the current page envelope.
 org.apache.cocoon.environment.Request getRequest(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon)
          Returns the request object of the current request.
 java.lang.String getRequestURI(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon)
          Returns the request URI of the current request.
 void reservedCheckIn(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon, boolean backup)
          Checkis in the current document from the PageEnvelope context.
 void triggerWorkflow(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon, java.lang.String event)
          Trigger a workflow event for the document associated with the current PageEnvelope.
 

Field Detail

ROLE

static final java.lang.String ROLE
The Avalon Role.

Method Detail

getPageEnvelope

PageEnvelope getPageEnvelope(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon)
                             throws PageEnvelopeException
Returns the current page envelope.

Parameters:
cocoon - The FOM_Cocoon object.
Returns:
A page envelope.
Throws:
PageEnvelopeException - when something went wrong.

getRequestURI

java.lang.String getRequestURI(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon)
Returns the request URI of the current request.

Parameters:
cocoon - The FOM_Cocoon object.
Returns:
A string.

getRequest

org.apache.cocoon.environment.Request getRequest(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon)
Returns the request object of the current request.

Parameters:
cocoon - The FOM_Cocoon object.
Returns:
A request object.

getObjectModel

java.util.Map getObjectModel(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon)
Returns the Cocoon Object Model

Parameters:
cocoon - The Flow Object Model of Cocoon
Returns:
The object model

getDocumentHelper

DocumentHelper getDocumentHelper(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon)
Returns a DocumentHelper instance.

Parameters:
cocoon - The Flow Object Model of Cocoon
Returns:
The document helper
See Also:
DocumentHelper

getImageParameterValue

java.lang.String getImageParameterValue(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon,
                                        java.lang.String parameterName)
Resolves the request parameter value for a specific name. The parameter names are encoded as {name}:{value}.{axis}. This is a workaround for the <input type="image"/> bug in Internet Explorer.

Parameters:
cocoon - The FOM_Cocoon object.
parameterName - The request parameter name.
Returns:
A string.

triggerWorkflow

void triggerWorkflow(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon,
                     java.lang.String event)
                     throws WorkflowException,
                            PageEnvelopeException,
                            AccessControlException
Trigger a workflow event for the document associated with the current PageEnvelope.

Parameters:
cocoon - The Cocoon Flow Object Model
event - The name of the workflow event to trigger.
Throws:
WorkflowException - If an workflow error occurs
PageEnvelopeException - Page envelope can not operate properly.
AccessControlException - If an access control violation occurs.

reservedCheckIn

void reservedCheckIn(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon cocoon,
                     boolean backup)
                     throws FileReservedCheckInException,
                            java.lang.Exception
Checkis in the current document from the PageEnvelope context.

Parameters:
cocoon - The Cocoon Flow Object Model
backup - Wether a new revision should be created.
Throws:
FileReservedCheckInException
java.lang.Exception


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