|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.base.Adaptee org.norther.tammi.spray.filter.DefaultFilter org.norther.tammi.spray.filter.DefaultKeyFilter org.norther.tammi.spray.filter.DefaultSecureKeyFilter org.norther.tammi.spray.template.DefaultFlowFilter
public class DefaultFlowFilter
A default implementation of FlowFilter.
Field Summary | |
---|---|
static String |
FLOW_KEY
The default key. |
Fields inherited from class org.norther.tammi.spray.filter.DefaultKeyFilter |
---|
DEFAULT_KEY |
Fields inherited from class org.norther.tammi.core.base.Adaptee |
---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
Constructor Summary | |
---|---|
DefaultFlowFilter()
Constructs a new filter. |
|
DefaultFlowFilter(String key)
Constructs a new filter with a key. |
Method Summary | |
---|---|
void |
addDefaultActionNames(String[] tasks)
Adds more names of the default actions applied to flows without flow specific templates. |
void |
addDefaultTemplatePaths(String[] templates)
Adds more paths of the default templates applied to flows without flow specific templates. |
void |
addDefaultVariableTypes(String[] types)
Adds more types of the default variables applied to flows without flow specific variables. |
void |
addFlowActionNames(String name,
String[] tasks)
Adds more names of the actions applied to the named flow. |
boolean |
addFlowName(String name)
Adds a named flow if absent. |
void |
addFlowNames(String[] names)
Adds named flows if absent. |
void |
addFlowTemplatePaths(String name,
String[] templates)
Adds more paths of the templates applied to the named flow. |
void |
addFlowVariableTypes(String name,
String[] types)
Adds more types of the variables applied to the named flow. |
void |
addStepName(String name,
int index,
String step)
Adds a new step to the named flow. |
void |
addStepNames(String name,
String[] steps)
Adds more step names to the named flow. |
void |
clearContextAttributes()
Clears all global context attributes. |
void |
clearFlowActions(String name)
Clears the actions applied to the named flow. |
void |
clearFlows()
Clears all flows. |
void |
clearFlowTemplates(String name)
Clears the templates applied to the named flow. |
void |
clearFlowVariables(String name)
Clears the variables applied to the named flow. |
void |
clearSteps(String name)
Clears all steps from the named flow. |
boolean |
containsContextAttribute(Object key)
Checks the named global context attribute. |
boolean |
containsFlow(String name)
Checks the named flow. |
boolean |
containsStep(String name,
int index)
Checks the indexed step. |
Set<Object> |
contextAttributeKeySet()
Returns a set of global context attribute keys. |
Variable |
createVariable(String type)
Creates a new variable MBean instance of the specified type. |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
Activates a flow. |
Task.Control |
executeActions(FlowStep step,
StepFlowContext context,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Executes actions of the specified step in the given flow context. |
Set<String> |
flowNameSet()
Returns a read-only set of flow names. |
Object |
getContextAttribute(Object key)
Gets a global context attribute. |
StepFlowContext |
getCurrentContext(ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the step flow context of the specified request. |
String[] |
getDefaultActionNames()
Gets the names of the default actions applied to flows without flow specific templates. |
String |
getDefaultBaseName()
Gets the default base name. |
String |
getDefaultFlowName()
Gets the name of the default flow. |
Identity |
getDefaultIdentity()
Gets the default identity. |
String |
getDefaultLabel()
Gets the default flow label. |
Object |
getDefaultProperty(Object property)
Gets the specified default property. |
String[] |
getDefaultTemplatePaths()
Gets the paths of the default templates applied to flows without flow specific templates. |
Object |
getDefaultTransition(Object state)
Gets the default transition of the specified state. |
String[] |
getDefaultVariableTypes()
Gets the types of the default variables applied to flows without flow specific variables. |
FlowStep |
getFlow(String name)
Gets the named flow. |
String[] |
getFlowActionNames(String name)
Gets the names of the actions applied to the named flow. |
String |
getFlowBaseName(String name)
Gets the base name of the specified flow. |
FlowStep |
getFlowDefault()
Gets the flow default. |
Identity |
getFlowIdentity(String name)
Gets the identity of the specified flow. |
String |
getFlowLabel(String name)
Gets the label of the named flow. |
String |
getFlowName(String path)
Gets the flow name of the flow step path. |
String[] |
getFlowParameters(String path)
Gets the flow parameters of the flow step path. |
String |
getFlowPath(String path)
Gets the flow path of the flow step path. |
Object |
getFlowProperty(String name,
Object property)
Gets the specified property of the named flow. |
String[] |
getFlowTemplatePaths(String name)
Gets the paths of the templates applied to the named flow. |
Object |
getFlowTransition(String name,
Object state)
Gets the transition of the named flow. |
String[] |
getFlowVariableTypes(String name)
Gets the types of the variables applied to the named flow. |
int |
getPropertyIndex(Object property)
Gets the index of the property within this filter. |
int |
getPropertyIndex(Object property,
boolean add)
Gets and optionally adds the index of the property within this filter. |
StepMatrix |
getRouteMatrix(String name)
Gets the matrix defining enabled routes for flow steps. |
int |
getStateIndex(Object state)
Gets the index of the state within this filter. |
int |
getStateIndex(Object state,
boolean add)
Gets and optionally adds the index of the state within this filter. |
int |
getStepCount(String name)
Gets the number of steps in the named flow. |
int |
getStepIndex(String path,
int index)
Gets the first index of the flow step path. |
int[] |
getStepIndices(String path)
Gets the indices of the flow step path. |
String |
getStepName(String name,
int index)
Gets the name of the step of the named flow. |
String[] |
getStepNames(String name)
Gets the step names of the named flow. |
String |
getStepPath(String name,
int index,
Object... params)
Gets the path to the indexed step of the named flow. |
ObjectName |
getTaskLoaderName()
Gets the the task loader to be applied by contexts of this filter. |
int |
getTransitionIndex(Object state)
Gets the index of the transition within this filter. |
int |
getTransitionIndex(Object state,
boolean add)
Gets and optionally adds the index of the transition within this filter. |
ObjectName |
getVariableRegistryName()
Gets the the variable registry to be applied by contexts of this filter. |
int |
indexOfStep(String name,
String step)
Return the index of the named step of the named flow. |
boolean |
isDefaultHeritable()
Checks whether flows are heritable by default. |
boolean |
isDefaultState(Object state)
Checks whether the specified state is set by default. |
boolean |
isFlowHeritable(String name)
Checks whether the named flow is heritable. |
boolean |
isFlowLocalized(String name)
Checks whether the specified flow is localized. |
boolean |
isFlowState(String name,
Object state)
Checks whether the specified state is set for the named flow. |
boolean |
isLocalizedFlows()
Gets the localized flows flag. |
boolean |
isRestrictedRoutes()
Checks whether step routes of flows of this filter are restricted by a route matrix. |
void |
postmanaged()
This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time. |
void |
removeContextAttribute(Object key)
Removes the named global context attribute. |
void |
removeFlow(String name)
Removes the named flow. |
void |
removeStep(String name,
int index)
Removes the indexed step from the named flow. |
void |
setContextAttribute(Object key,
Object value)
Sets a global context attribute. |
void |
setDefaultActionNames(String[] tasks)
Sets the names of the default actions applied to flows without flow specific templates. |
void |
setDefaultBaseName(String baseName)
Sets the default base name. |
void |
setDefaultFlowName(String name)
Sets the name of the default flow. |
void |
setDefaultHeritable(boolean flag)
Sets whether flows are heritable by default. |
void |
setDefaultIdentity(Identity identity)
Sets the default identity. |
void |
setDefaultLabel(String label)
Sets the default flow label. |
void |
setDefaultProperties(Object[] properties)
Sets the specified default properties as consecutive pairs of properties and values. |
void |
setDefaultProperty(Object property,
Object value)
Sets the specified default property. |
void |
setDefaultState(Object state,
boolean flag)
Sets whether the specified state is set by default. |
void |
setDefaultStates(Object[] states)
Sets the specified states on by default. |
void |
setDefaultTemplatePaths(String[] templates)
Sets the paths of the default templates applied to flows without flow specific templates. |
void |
setDefaultTransition(Object state,
Object value)
Sets the default transition of the specified state. |
void |
setDefaultTransitions(Object[] transitions)
Sets the default transitions as consecutive pairs of states and values. |
void |
setDefaultVariableTypes(String[] types)
Sets the types of the default variables applied to flows without flow specific variables. |
void |
setFlowActionNames(String name,
String[] tasks)
Sets the names of the actions applied to the named flow. |
void |
setFlowBaseName(String name,
String baseName)
Sets the base name of the specified flow. |
void |
setFlowHeritable(String name,
boolean flag)
Sets whether the named flow is heritable. |
void |
setFlowIdentity(String name,
Identity identity)
Sets the identity of the specified flow. |
void |
setFlowLabel(String name,
String label)
Sets the label of the named flow. |
void |
setFlowLocalized(String name,
boolean flag)
Sets whether the specified flow is localized. |
void |
setFlowName(String name)
Sets or replaces a named flow. |
void |
setFlowNames(String[] names)
Sets or replaces named flows. |
void |
setFlowProperties(String name,
Object[] properties)
Sets the specified properties of the named flow as consecutive pairs of properties and values. |
void |
setFlowProperty(String name,
Object property,
Object value)
Sets the specified property of the named flow. |
void |
setFlowState(String name,
Object state,
boolean flag)
Sets whether the specified state is set for the named flow. |
void |
setFlowStates(String name,
Object[] states)
Sets the specified states of the named flow. |
void |
setFlowTemplatePaths(String name,
String[] templates)
Sets the paths of the templates applied to the named flow. |
void |
setFlowTransition(String name,
Object state,
Object value)
Sets the transition of the named flow. |
void |
setFlowTransitions(String name,
Object[] transitions)
Sets the transitions of the named flow as consecutive pairs of states and values. |
void |
setFlowVariableTypes(String name,
String[] types)
Sets the types of the variables applied to the named flow. |
void |
setLocalizedFlows(boolean flag)
Sets the localized flows flag. |
void |
setRestrictedRoutes(boolean flag)
Sets whether step routes of flows of this filter are restricted by a route matrix. |
void |
setRouteArray(String name,
String array)
Sets the matrix defining enabled routes for flow steps as a string. |
void |
setRouteMatrix(String name,
StepMatrix matrix)
Sets the matrix defining enabled routes for flow steps. |
void |
setRoutesEnabled(String name,
boolean flag)
Sets the matrix defining enabled routes for flow steps as a boolean. |
void |
setStepName(String name,
int index,
String step)
Sets the name of the step of the named flow. |
void |
setStepNames(String name,
String[] steps)
Sets the step names of the named flow. |
void |
setTaskLoaderName(ObjectName loader)
Sets the task loader to be applied by contexts of this filter. |
void |
setVariableRegistryName(ObjectName registry)
Sets the variable registry to be applied by contexts this filter. |
void |
unmanaged()
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time. |
Methods inherited from class org.norther.tammi.spray.filter.DefaultSecureKeyFilter |
---|
addAllowedPermission, addDeniedPermission, allowedPermissions, allowedRoleSet, checkPermission, checkPermission, clearAllowedPermissions, clearDeniedPermissions, deniedPermissions, deniedRoleSet, getPermissibleRoles, isProtected, removeAllowedPermissions, removeDeniedPermissions, setAllowedPermissions, setDeniedPermissions |
Methods inherited from class org.norther.tammi.spray.filter.DefaultKeyFilter |
---|
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey |
Methods inherited from class org.norther.tammi.spray.filter.DefaultFilter |
---|
destroy, getFilterConfig, getRequestMap, getSessionMap, init |
Methods inherited from class org.norther.tammi.core.base.Adaptee |
---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.norther.tammi.spray.filter.SecureFilter |
---|
checkPermission |
Methods inherited from interface org.norther.tammi.core.security.AccessController |
---|
addAllowedPermission, addDeniedPermission, allowedPermissions, allowedRoleSet, checkPermission, clearAllowedPermissions, clearDeniedPermissions, deniedPermissions, deniedRoleSet, getPermissibleRoles, isProtected, removeAllowedPermissions, removeDeniedPermissions, setAllowedPermissions, setDeniedPermissions |
Methods inherited from interface org.norther.tammi.spray.filter.KeyFilter |
---|
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey |
Methods inherited from interface javax.servlet.Filter |
---|
destroy, init |
Field Detail |
---|
public static final String FLOW_KEY
Constructor Detail |
---|
public DefaultFlowFilter()
public DefaultFlowFilter(String key)
key
- the filter key.Method Detail |
---|
public void postmanaged()
Manageable
postmanaged
in interface Manageable
postmanaged
in class Adaptee
public void unmanaged() throws Exception
Manageable
unmanaged
in interface Manageable
unmanaged
in class Adaptee
Exception
- if the adaptee refused to be unmanaged.public String getFlowName(String path)
FlowFilter
getFlowName
in interface FlowFilter
path
- the flow step path.
public String getFlowPath(String path)
FlowFilter
getFlowPath
in interface FlowFilter
path
- the flow step path.
public int[] getStepIndices(String path)
FlowFilter
getStepIndices
in interface FlowFilter
path
- the flow step path.
public int getStepIndex(String path, int index)
FlowFilter
getStepIndex
in interface FlowFilter
path
- the flow step path.index
- the default index.
public String[] getFlowParameters(String path)
FlowFilter
getFlowParameters
in interface FlowFilter
path
- the flow step path.
public String getStepPath(String name, int index, Object... params)
FlowFilter
getStepPath
in interface FlowFilter
name
- the flow step name.index
- the step index.params
- optional parameters.
public String getDefaultFlowName()
FlowFilter
getDefaultFlowName
in interface FlowFilter
public void setDefaultFlowName(String name)
FlowFilter
setDefaultFlowName
in interface FlowFilter
name
- the name of the flow.public FlowStep getFlowDefault()
FlowFilter
getFlowDefault
in interface FlowFilter
public String getDefaultLabel()
FlowFilter
getDefaultLabel
in interface FlowFilter
public void setDefaultLabel(String label)
FlowFilter
setDefaultLabel
in interface FlowFilter
label
- the label of the flow.public boolean isLocalizedFlows()
FlowFilter
isLocalizedFlows
in interface FlowFilter
public void setLocalizedFlows(boolean flag)
FlowFilter
setLocalizedFlows
in interface FlowFilter
flag
- the localized flows flag.public String getDefaultBaseName()
FlowFilter
getDefaultBaseName
in interface FlowFilter
public void setDefaultBaseName(String baseName)
FlowFilter
setDefaultBaseName
in interface FlowFilter
baseName
- the base name of the default bundle.public Identity getDefaultIdentity()
FlowFilter
getDefaultIdentity
in interface FlowFilter
public void setDefaultIdentity(Identity identity)
FlowFilter
setDefaultIdentity
in interface FlowFilter
identity
- the default identity.public String[] getDefaultTemplatePaths()
FlowFilter
getDefaultTemplatePaths
in interface FlowFilter
public void setDefaultTemplatePaths(String[] templates)
FlowFilter
setDefaultTemplatePaths
in interface FlowFilter
templates
- the paths of the templates.public void addDefaultTemplatePaths(String[] templates)
FlowFilter
addDefaultTemplatePaths
in interface FlowFilter
templates
- the paths of the templates.public String[] getDefaultVariableTypes()
FlowFilter
getDefaultVariableTypes
in interface FlowFilter
public void setDefaultVariableTypes(String[] types)
FlowFilter
setDefaultVariableTypes
in interface FlowFilter
types
- the types of the variables.public void addDefaultVariableTypes(String[] types)
FlowFilter
addDefaultVariableTypes
in interface FlowFilter
types
- the types of the variables.public String[] getDefaultActionNames()
FlowFilter
getDefaultActionNames
in interface FlowFilter
public void setDefaultActionNames(String[] tasks)
FlowFilter
setDefaultActionNames
in interface FlowFilter
tasks
- the names of the actions.public void addDefaultActionNames(String[] tasks)
FlowFilter
addDefaultActionNames
in interface FlowFilter
tasks
- the names of the actions.public boolean isDefaultHeritable()
FlowFilter
isDefaultHeritable
in interface FlowFilter
public void setDefaultHeritable(boolean flag)
FlowFilter
setDefaultHeritable
in interface FlowFilter
flag
- true if heritable, false otherwise.public boolean isDefaultState(Object state)
FlowFilter
isDefaultState
in interface FlowFilter
state
- the state.
public void setDefaultState(Object state, boolean flag)
FlowFilter
setDefaultState
in interface FlowFilter
state
- the state.flag
- true if the state is on, false otherwise.public void setDefaultStates(Object[] states)
FlowFilter
setDefaultStates
in interface FlowFilter
states
- the states.public int getStateIndex(Object state)
FlowFilter
getStateIndex
in interface FlowFilter
state
- the state.
public int getStateIndex(Object state, boolean add)
FlowFilter
getStateIndex
in interface FlowFilter
state
- the state.add
- true to add a missing state.
public Object getDefaultProperty(Object property)
FlowFilter
getDefaultProperty
in interface FlowFilter
property
- the property.
public void setDefaultProperty(Object property, Object value)
FlowFilter
setDefaultProperty
in interface FlowFilter
property
- the property.value
- the value of the property.public void setDefaultProperties(Object[] properties)
FlowFilter
setDefaultProperties
in interface FlowFilter
properties
- the properties and values.public int getPropertyIndex(Object property)
FlowFilter
getPropertyIndex
in interface FlowFilter
property
- the property.
public int getPropertyIndex(Object property, boolean add)
FlowFilter
getPropertyIndex
in interface FlowFilter
property
- the property.add
- true to add a missing property.
public Object getDefaultTransition(Object state)
FlowFilter
getDefaultTransition
in interface FlowFilter
state
- the state.
public void setDefaultTransition(Object state, Object value)
FlowFilter
setDefaultTransition
in interface FlowFilter
state
- the state.value
- the value of the transition.public void setDefaultTransitions(Object[] transitions)
FlowFilter
setDefaultTransitions
in interface FlowFilter
transitions
- the states and values of the transitions.public int getTransitionIndex(Object state)
FlowFilter
getTransitionIndex
in interface FlowFilter
state
- the state.
public int getTransitionIndex(Object state, boolean add)
FlowFilter
getTransitionIndex
in interface FlowFilter
state
- the state.add
- true to add a missing transition.
public boolean isRestrictedRoutes()
FlowFilter
isRestrictedRoutes
in interface FlowFilter
public void setRestrictedRoutes(boolean flag)
FlowFilter
setRestrictedRoutes
in interface FlowFilter
flag
- true if restricted, false otherwise.public FlowStep getFlow(String name)
FlowFilter
getFlow
in interface FlowFilter
name
- the name of the flow.
public boolean containsFlow(String name)
FlowFilter
containsFlow
in interface FlowFilter
name
- the name of the flow.
public void removeFlow(String name)
FlowFilter
removeFlow
in interface FlowFilter
name
- the name of the flow.public void clearFlows()
FlowFilter
clearFlows
in interface FlowFilter
public void setFlowName(String name)
FlowFilter
setFlowName
in interface FlowFilter
name
- the name of the flow.public boolean addFlowName(String name)
FlowFilter
addFlowName
in interface FlowFilter
name
- the name of the flow.
public void setFlowNames(String[] names)
FlowFilter
setFlowNames
in interface FlowFilter
names
- the names of the flows.public void addFlowNames(String[] names)
FlowFilter
addFlowNames
in interface FlowFilter
names
- the names of the flows.public Set<String> flowNameSet()
FlowFilter
flowNameSet
in interface FlowFilter
public boolean containsStep(String name, int index)
FlowFilter
containsStep
in interface FlowFilter
name
- the name of the flow.index
- the index of the step.
public int indexOfStep(String name, String step)
FlowFilter
indexOfStep
in interface FlowFilter
name
- the name of the flow.step
- the name of the step.
public void removeStep(String name, int index)
FlowFilter
removeStep
in interface FlowFilter
name
- the name of the flow.index
- the index of the step.public void clearSteps(String name)
FlowFilter
clearSteps
in interface FlowFilter
name
- the name of the flow.public String getStepName(String name, int index)
FlowFilter
getStepName
in interface FlowFilter
name
- the name of the flow.index
- the index of the step.
public void setStepName(String name, int index, String step)
FlowFilter
setStepName
in interface FlowFilter
name
- the name of the flow.index
- the index of the step.step
- the name of the step.public void addStepName(String name, int index, String step)
FlowFilter
addStepName
in interface FlowFilter
name
- the name of the flow.index
- the index of the step.step
- the name of the step.public String[] getStepNames(String name)
FlowFilter
getStepNames
in interface FlowFilter
name
- the name of the flow.
public void setStepNames(String name, String[] steps)
FlowFilter
setStepNames
in interface FlowFilter
name
- the name of the flow.steps
- an array of step names.public void addStepNames(String name, String[] steps)
FlowFilter
addStepNames
in interface FlowFilter
name
- the name of the flow.steps
- an array of step names.public int getStepCount(String name)
FlowFilter
getStepCount
in interface FlowFilter
name
- the name of the flow.
public StepMatrix getRouteMatrix(String name)
FlowFilter
getRouteMatrix
in interface FlowFilter
name
- the name of the flow.
public void setRouteMatrix(String name, StepMatrix matrix)
FlowFilter
setRouteMatrix
in interface FlowFilter
name
- the name of the flow.matrix
- the step matrix.public void setRouteArray(String name, String array)
FlowFilter
setRouteArray
in interface FlowFilter
name
- the name of the flow.array
- a string of size (n+1)*(n+1) where n is the step count.public void setRoutesEnabled(String name, boolean flag)
FlowFilter
setRoutesEnabled
in interface FlowFilter
name
- the name of the flow.flag
- true to enable routes, false to disable.public String getFlowLabel(String name)
FlowFilter
getFlowLabel
in interface FlowFilter
name
- the name of the flow.
public void setFlowLabel(String name, String label)
FlowFilter
setFlowLabel
in interface FlowFilter
name
- the name of the flow.label
- the label of the flow.public boolean isFlowLocalized(String name)
FlowFilter
isFlowLocalized
in interface FlowFilter
name
- the name of the flow.
public void setFlowLocalized(String name, boolean flag)
FlowFilter
setFlowLocalized
in interface FlowFilter
name
- the name of the flow.flag
- the true if localized, false otherwise.public String getFlowBaseName(String name)
FlowFilter
getFlowBaseName
in interface FlowFilter
name
- the name of the flow.
public void setFlowBaseName(String name, String baseName)
FlowFilter
setFlowBaseName
in interface FlowFilter
name
- the name of the flow.baseName
- the base name.public Identity getFlowIdentity(String name)
FlowFilter
getFlowIdentity
in interface FlowFilter
name
- the name of the flow.
public void setFlowIdentity(String name, Identity identity)
FlowFilter
setFlowIdentity
in interface FlowFilter
name
- the name of the flow.identity
- the flow identity.public String[] getFlowTemplatePaths(String name)
FlowFilter
getFlowTemplatePaths
in interface FlowFilter
name
- the name of the flow.
public void setFlowTemplatePaths(String name, String[] templates)
FlowFilter
setFlowTemplatePaths
in interface FlowFilter
name
- the name of the flow.templates
- the paths of the templates.public void addFlowTemplatePaths(String name, String[] templates)
FlowFilter
addFlowTemplatePaths
in interface FlowFilter
name
- the name of the flow.templates
- the paths of the templates.public void clearFlowTemplates(String name)
FlowFilter
clearFlowTemplates
in interface FlowFilter
name
- the name of the flow.public String[] getFlowVariableTypes(String name)
FlowFilter
getFlowVariableTypes
in interface FlowFilter
name
- the name of the flow.
public void setFlowVariableTypes(String name, String[] types)
FlowFilter
setFlowVariableTypes
in interface FlowFilter
name
- the name of the flow.types
- the types of the variables.public void addFlowVariableTypes(String name, String[] types)
FlowFilter
addFlowVariableTypes
in interface FlowFilter
name
- the name of the flow.types
- the types of the variables.public void clearFlowVariables(String name)
FlowFilter
clearFlowVariables
in interface FlowFilter
name
- the name of the flow.public String[] getFlowActionNames(String name)
FlowFilter
getFlowActionNames
in interface FlowFilter
name
- the name of the flow.
public void setFlowActionNames(String name, String[] tasks)
FlowFilter
setFlowActionNames
in interface FlowFilter
name
- the name of the flow.tasks
- the names of the actions.public void addFlowActionNames(String name, String[] tasks)
FlowFilter
addFlowActionNames
in interface FlowFilter
name
- the name of the flow.tasks
- the names of the actions.public void clearFlowActions(String name)
FlowFilter
clearFlowActions
in interface FlowFilter
name
- the name of the flow.public boolean isFlowHeritable(String name)
FlowFilter
isFlowHeritable
in interface FlowFilter
name
- the name of the flow.
public void setFlowHeritable(String name, boolean flag)
FlowFilter
setFlowHeritable
in interface FlowFilter
name
- the name of the flow.flag
- true if heritable, false otherwise.public boolean isFlowState(String name, Object state)
FlowFilter
isFlowState
in interface FlowFilter
name
- the name of the flow.state
- the state.
public void setFlowState(String name, Object state, boolean flag)
FlowFilter
setFlowState
in interface FlowFilter
name
- the name of the flow.state
- the state.flag
- true if the state is on, false otherwise.public void setFlowStates(String name, Object[] states)
FlowFilter
setFlowStates
in interface FlowFilter
name
- the name of the flow.states
- the states.public Object getFlowProperty(String name, Object property)
FlowFilter
getFlowProperty
in interface FlowFilter
name
- the name of the flow.property
- the property.
public void setFlowProperty(String name, Object property, Object value)
FlowFilter
setFlowProperty
in interface FlowFilter
name
- the name of the flow.property
- the property.value
- the value of the property.public void setFlowProperties(String name, Object[] properties)
FlowFilter
setFlowProperties
in interface FlowFilter
name
- the name of the flow or step.properties
- the properties and values.public Object getFlowTransition(String name, Object state)
FlowFilter
getFlowTransition
in interface FlowFilter
name
- the name of the flow.state
- the state.
public void setFlowTransition(String name, Object state, Object value)
FlowFilter
setFlowTransition
in interface FlowFilter
name
- the name of the flow.state
- the state.value
- the value of the transition.public void setFlowTransitions(String name, Object[] transitions)
FlowFilter
setFlowTransitions
in interface FlowFilter
name
- the name of the flow or step.transitions
- the states and values of the transitions.public Object getContextAttribute(Object key)
FlowFilter
getContextAttribute
in interface FlowFilter
key
- the attribute key.
public void setContextAttribute(Object key, Object value)
FlowFilter
setContextAttribute
in interface FlowFilter
key
- the attribute key.value
- the attribute value.public boolean containsContextAttribute(Object key)
FlowFilter
containsContextAttribute
in interface FlowFilter
key
- the attribute key.
public void removeContextAttribute(Object key)
FlowFilter
removeContextAttribute
in interface FlowFilter
key
- the attribute key.public void clearContextAttributes()
FlowFilter
clearContextAttributes
in interface FlowFilter
public Set<Object> contextAttributeKeySet()
FlowFilter
contextAttributeKeySet
in interface FlowFilter
public ObjectName getTaskLoaderName()
FlowFilter
getTaskLoaderName
in interface FlowFilter
public void setTaskLoaderName(ObjectName loader)
FlowFilter
setTaskLoaderName
in interface FlowFilter
loader
- the object name of the task loader or a query.public ObjectName getVariableRegistryName()
FlowFilter
getVariableRegistryName
in interface FlowFilter
public void setVariableRegistryName(ObjectName registry)
FlowFilter
setVariableRegistryName
in interface FlowFilter
registry
- the object name of the variable registry or a query.public StepFlowContext getCurrentContext(ServletRequest request, ServletResponse response, FilterChain chain)
FlowFilter
getCurrentContext
in interface FlowFilter
request
- the request.response
- the response.chain
- the filter chain.
public Variable createVariable(String type) throws ConstructionException
FlowFilter
createVariable
in interface FlowFilter
type
- the type of the variable.
ConstructionException
- if construction fails.public Task.Control executeActions(FlowStep step, StepFlowContext context, ServletRequest request, ServletResponse response, FilterChain chain) throws AccessDeniedException, ExecutionException, InterruptedException
FlowFilter
executeActions
in interface FlowFilter
step
- the flow step.context
- the flow context.request
- the request.response
- the response.chain
- the filter chain.
AccessDeniedException
- for denied access.
ExecutionException
- for execution errors.
InterruptedException
- if execution is interrupted.public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException
A flow template corresponding to the current step is added to request attributes. If an overriding template is already present and can be adapted, the flow and step specific ones are ignored.
Step actions, if defined, are executed as a post-action of the previous step and as a pre-action of the current step.
doFilter
in interface Filter
doFilter
in class DefaultFilter
request
- the request to process.response
- the response to return.chain
- the current filter chain.
ServletException
- for servlet errors.
IOException
- for general errors.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |