org.apache.lenya.cms.task
Class WorkflowInvoker

java.lang.Object
  extended by org.apache.lenya.cms.task.ParameterWrapper
      extended by org.apache.lenya.cms.task.WorkflowInvoker

public class WorkflowInvoker
extends ParameterWrapper


Field Summary
static java.lang.String EVENT
           
static java.lang.String EVENT_REQUEST_PARAMETER
           
static java.lang.String LENYA_EVENT_REQUEST_PARAMETER
           
static java.lang.String MACHINE
           
static java.lang.String PREFIX
           
static java.lang.String ROLES
           
static java.lang.String USER_ID
           
 
Constructor Summary
WorkflowInvoker(java.util.Map parameters)
          Ctor.
 
Method Summary
static NamespaceMap extractParameters(java.lang.String eventName, Identity identity, Role[] roles)
          Ctor.
 java.lang.String getEventName()
          Returns the workflow event name.
 java.lang.String getMachineIp()
          Returns the machine IP address.
 java.lang.String getPrefix()
          Returns the namespace prefix.
protected  java.lang.String[] getRequiredKeys()
          Returns the required keys.
protected  java.lang.String[] getRoleIDs()
          Returns the role names.
 java.lang.String getUserId()
          Returns the user ID.
 void invokeTransition()
          Invokes the transition.
static void setIdentity(NamespaceMap parameters, Identity identity)
          Sets the identity.
static void setRoles(NamespaceMap parameters, Role[] roles)
          Sets the roles.
 void setup(Publication publication, java.lang.String webappUrl)
          Initializes the workflow invoker.
 
Methods inherited from class org.apache.lenya.cms.task.ParameterWrapper
get, getMap, getMissingKeys, isComplete, parameterize, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLES

public static final java.lang.String ROLES
See Also:
Constant Field Values

USER_ID

public static final java.lang.String USER_ID
See Also:
Constant Field Values

MACHINE

public static final java.lang.String MACHINE
See Also:
Constant Field Values

EVENT

public static final java.lang.String EVENT
See Also:
Constant Field Values

PREFIX

public static final java.lang.String PREFIX
See Also:
Constant Field Values

EVENT_REQUEST_PARAMETER

public static final java.lang.String EVENT_REQUEST_PARAMETER
See Also:
Constant Field Values

LENYA_EVENT_REQUEST_PARAMETER

public static final java.lang.String LENYA_EVENT_REQUEST_PARAMETER
See Also:
Constant Field Values
Constructor Detail

WorkflowInvoker

public WorkflowInvoker(java.util.Map parameters)
Ctor.

Parameters:
parameters - A map containing the prefixed parameters.
Method Detail

extractParameters

public static NamespaceMap extractParameters(java.lang.String eventName,
                                             Identity identity,
                                             Role[] roles)
Ctor.

Parameters:
eventName - The event name.
identity - The identity.
roles - The roles.
Returns:
A namespace map containing the parameters.

getRoleIDs

protected java.lang.String[] getRoleIDs()
Returns the role names.

Returns:
A string array.

setRoles

public static void setRoles(NamespaceMap parameters,
                            Role[] roles)
Sets the roles.

Parameters:
parameters - A workflow invoker namespace map.
roles - A role array.

setIdentity

public static void setIdentity(NamespaceMap parameters,
                               Identity identity)
Sets the identity.

Parameters:
parameters - A workflow invoker namespace map.
identity - An identity.

getEventName

public java.lang.String getEventName()
Returns the workflow event name.

Returns:
A string.

getUserId

public java.lang.String getUserId()
Returns the user ID.

Returns:
A string.

getMachineIp

public java.lang.String getMachineIp()
Returns the machine IP address.

Returns:
A string.

setup

public void setup(Publication publication,
                  java.lang.String webappUrl)
           throws ExecutionException
Initializes the workflow invoker.

Parameters:
publication - The publication.
webappUrl - The webapp URL.
Throws:
ExecutionException - when something went wrong.

invokeTransition

public void invokeTransition()
                      throws ExecutionException
Invokes the transition.

Throws:
ExecutionException - when something went wrong.

getPrefix

public java.lang.String getPrefix()
Description copied from class: ParameterWrapper
Returns the namespace prefix.

Specified by:
getPrefix in class ParameterWrapper
Returns:
A string.
See Also:
ParameterWrapper.getPrefix()

getRequiredKeys

protected java.lang.String[] getRequiredKeys()
Description copied from class: ParameterWrapper
Returns the required keys.

Specified by:
getRequiredKeys in class ParameterWrapper
Returns:
A string array.
See Also:
ParameterWrapper.getRequiredKeys()


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