|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
DefaultFlowFilter()
Constructs a new filter. |
|
DefaultFlowFilter(String key)
Constructs a new filter with a key. |
|
| Method Summary | |
|---|---|
boolean |
addFlowName(String name)
Adds a named flow if absent. |
void |
addStepName(String name,
int index,
String step)
Adds a new step to the named flow. |
void |
clearContextAttributes()
Clears all global context attributes. |
void |
clearFlows()
Clears all flows. |
void |
clearSteps(String name)
Clears all steps from the named flow. |
boolean |
containsContextAttribute(String name)
Checks the named global context attribute. |
boolean |
containsFlow(String name)
Checks the named flow. |
boolean |
containsStep(String name,
int index)
Checks the indexed step. |
Map |
contextAttributeMap()
Returns a map of global context attributes. |
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. |
boolean |
executeActions(FlowStep step,
StepFlowContext context,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Executes actions of the specified step in the given flow context. |
Set |
flowNameSet()
Returns a read-only set of flow names. |
Object |
getContextAttribute(String name)
Gets the named global context attribute. |
StepFlowContext |
getCurrentContext(ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the step flow context of the specified request. |
String |
getDefaultActionName()
Gets the name of the default action applied to flows without a flow specific action. |
String[] |
getDefaultActionNames()
Gets the names of the default actions applied to flows without flow specific templates. |
FlowStep |
getDefaultFlow()
Gets the default flow. |
String |
getDefaultFlowName()
Gets the name of the default flow. |
String |
getDefaultLabel()
Gets the default flow label. |
String |
getDefaultProperty(String property)
Gets the named default property. |
String |
getDefaultTemplatePath()
Gets the path of the default template applied to flows without a flow or specific template. |
String[] |
getDefaultTemplatePaths()
Gets the paths of the default templates applied to flows without flow specific templates. |
String |
getDefaultTransition(String state)
Gets the default transition of the named state. |
String |
getDefaultVariableType()
Gets the type of the default variable applied to flows without a flow specific variable. |
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 |
getFlowActionName(String name)
Gets the name of the action applied to the named flow. |
String[] |
getFlowActionNames(String name)
Gets the names of the actions applied to the named flow. |
String |
getFlowLabel(String name)
Gets the label of the named flow. |
String |
getFlowName(String path)
Gets the flow part of the flow step path. |
String[] |
getFlowNames()
Gets the names of all flows. |
String |
getFlowProperty(String name,
String property)
Gets the named property of the named flow. |
String |
getFlowTemplatePath(String name)
Gets the pathname of the template applied to the named flow. |
String[] |
getFlowTemplatePaths(String name)
Gets the paths of the templates applied to the named flow. |
String |
getFlowTransition(String name,
String state)
Gets the transition of the named flow. |
String |
getFlowVariableType(String name)
Gets the type of the variable applied to the named flow. |
String[] |
getFlowVariableTypes(String name)
Gets the types of the variables applied to the named flow. |
int |
getPropertyIndex(String property)
Gets the index of the named property within this filter. |
int |
getPropertyIndex(String property,
boolean add)
Gets and optionally adds the index of the named property within this filter. |
StepMatrix |
getRouteMatrix(String name)
Gets the matrix defining enabled routes for flow steps. |
int |
getStateIndex(String state)
Gets the index of the named state within this filter. |
int |
getStateIndex(String state,
boolean add)
Gets and optionally adds the index of the named 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 index part of the flow step path. |
String |
getStepName(String name)
Gets the name of the step of the named flow or step. |
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)
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. |
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 |
isDefaultState(String state)
Checks whether the named state is set by default. |
boolean |
isFlowState(String name,
String state)
Checks whether the named state is set for the named flow. |
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. |
List |
propertyNameList()
Returns a read-only list of names of known properties within this filter. |
void |
removeContextAttribute(String name)
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(String name,
Object value)
Sets the named global context attribute. |
void |
setDefaultActionName(String task)
Sets the name of the default action applied to to flows without a flow specific action. |
void |
setDefaultActionNames(String[] tasks)
Sets the names of the default actions applied to flows without flow specific templates. |
void |
setDefaultFlowName(String name)
Sets the name of the default flow. |
void |
setDefaultLabel(String label)
Sets the label of the named flow. |
void |
setDefaultProperties(String[] properties)
Sets the named default properties as consecutive pairs of names and values. |
void |
setDefaultProperty(String property,
String value)
Sets the named default property. |
void |
setDefaultState(String state,
boolean flag)
Sets whether the named state is set by default. |
void |
setDefaultStates(String[] states)
Sets the named states on by default. |
void |
setDefaultTemplatePath(String template)
Sets the path of the default template applied to flows without a flow specific template. |
void |
setDefaultTemplatePaths(String[] templates)
Sets the paths of the default templates applied to flows without flow specific templates. |
void |
setDefaultTransition(String state,
String value)
Sets the default transition of the named state. |
void |
setDefaultTransitions(String[] transitions)
Sets the default transitions as consecutive pairs of states and values. |
void |
setDefaultVariableType(String type)
Sets the type of the default variable applied to flows without a flow specific variable. |
void |
setDefaultVariableTypes(String[] types)
Sets the types of the default variables applied to flows without flow specific variables. |
void |
setFlowActionName(String name,
String task)
Sets the name of the action applied to the named flow. |
void |
setFlowActionNames(String name,
String[] tasks)
Sets the names of the actions applied to the named flow. |
void |
setFlowLabel(String name,
String label)
Sets the label of the named flow. |
void |
setFlowName(String name)
Sets or replaces a named flow if absent. |
void |
setFlowNames(String[] names)
Sets the names of absent flows. |
void |
setFlowProperties(String name,
String[] properties)
Sets the named properties of the named flow as consecutive pairs of names and values. |
void |
setFlowProperty(String name,
String property,
String value)
Sets the named property of the named flow. |
void |
setFlowState(String name,
String state,
boolean flag)
Sets whether the named state is set for the named flow. |
void |
setFlowStates(String name,
String[] states)
Sets the named states of the named flow. |
void |
setFlowTemplatePath(String name,
String template)
Sets the path of the template applied to the named flow. |
void |
setFlowTemplatePaths(String name,
String[] templates)
Sets the paths of the templates applied to the named flow. |
void |
setFlowTransition(String name,
String state,
String flow)
Sets the transition of the named flow. |
void |
setFlowTransitions(String name,
String[] transitions)
Sets the transitions of the named flow as consecutive pairs of states and values. |
void |
setFlowVariableType(String name,
String type)
Sets the type of the variable applied to the named flow. |
void |
setFlowVariableTypes(String name,
String[] types)
Sets the types of the variables applied to the named flow. |
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 |
setStepName(String name,
String step)
Sets the name of the step applied of the named flow or step. |
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. |
List |
stateNameList()
Returns a read-only list of names of known states within 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.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, checkPermission, checkPermission |
| Methods inherited from interface org.norther.tammi.core.security.AccessController |
|---|
addAllowedPermission, addDeniedPermission, allowedPermissions, allowedRoleSet, checkPermission, checkPermission, checkPermission, clearAllowedPermissions, clearDeniedPermissions, deniedPermissions, deniedRoleSet, getPermissibleRoles, getPermissibleRoles, getPermissibleRoles, isProtected, removeAllowedPermissions, removeDeniedPermissions, setAllowedPermissions, setDeniedPermissions |
| Methods inherited from interface javax.servlet.Filter |
|---|
destroy, init |
| 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 Manageablepostmanaged in class Adaptee
public void unmanaged()
throws Exception
Manageable
unmanaged in interface Manageableunmanaged in class AdapteeException - if the adaptee refused to be unmanaged.public String getFlowName(String path)
FlowFilter
getFlowName in interface FlowFilterpath - the flow step path.
public int getStepIndex(String path,
int index)
FlowFilter
getStepIndex in interface FlowFilterpath - the flow step path.index - the default index.
public String getStepPath(String name,
int index)
FlowFilter
getStepPath in interface FlowFiltername - the flow step name.index - the step index.
public String getDefaultFlowName()
FlowFilter
getDefaultFlowName in interface FlowFilterpublic void setDefaultFlowName(String name)
FlowFilter
setDefaultFlowName in interface FlowFiltername - the name of the flow.public FlowStep getDefaultFlow()
FlowFilter
getDefaultFlow in interface FlowFilterpublic String getDefaultLabel()
FlowFilter
getDefaultLabel in interface FlowFilterpublic void setDefaultLabel(String label)
FlowFilter
setDefaultLabel in interface FlowFilterlabel - the label of the flow.public String getDefaultTemplatePath()
FlowFilterNote that if several templates are defined, the first one is returned.
getDefaultTemplatePath in interface FlowFilterpublic void setDefaultTemplatePath(String template)
FlowFilterNote that all previously defined templates are replaced with the new one.
setDefaultTemplatePath in interface FlowFiltertemplate - the path of the template.public String[] getDefaultTemplatePaths()
FlowFilter
getDefaultTemplatePaths in interface FlowFilterpublic void setDefaultTemplatePaths(String[] templates)
FlowFilter
setDefaultTemplatePaths in interface FlowFiltertemplates - the paths of the templates.public String getDefaultVariableType()
FlowFilterNote that if several variables are defined, the first one is returned.
getDefaultVariableType in interface FlowFilterpublic void setDefaultVariableType(String type)
FlowFilterNote that all previously defined variables are replaced with the new one.
setDefaultVariableType in interface FlowFiltertype - the type of the variable.public String[] getDefaultVariableTypes()
FlowFilter
getDefaultVariableTypes in interface FlowFilterpublic void setDefaultVariableTypes(String[] types)
FlowFilter
setDefaultVariableTypes in interface FlowFiltertypes - the types of the variables.public String getDefaultActionName()
FlowFilterNote that if several actions are defined, the first one is returned.
getDefaultActionName in interface FlowFilterpublic void setDefaultActionName(String task)
FlowFilterNote that all previously defined actions are replaced with the new one.
setDefaultActionName in interface FlowFiltertask - the name of the action.public String[] getDefaultActionNames()
FlowFilter
getDefaultActionNames in interface FlowFilterpublic void setDefaultActionNames(String[] tasks)
FlowFilter
setDefaultActionNames in interface FlowFiltertasks - the names of the actions.public boolean isDefaultState(String state)
FlowFilter
isDefaultState in interface FlowFilterstate - the name of the state.
public void setDefaultState(String state,
boolean flag)
FlowFilter
setDefaultState in interface FlowFilterstate - the name of the state.flag - true if the state is on, false otherwise.public void setDefaultStates(String[] states)
FlowFilter
setDefaultStates in interface FlowFilterstates - the names of the states.public int getStateIndex(String state)
FlowFilter
getStateIndex in interface FlowFilterstate - the name of the state.
public int getStateIndex(String state,
boolean add)
FlowFilter
getStateIndex in interface FlowFilterstate - the name of the state.add - true to add a missing state.
public Lis