|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.spray.loader.task.Action
org.norther.tammi.spray.loader.task.ActionEvent
org.norther.tammi.spray.template.step.FlowStepAction
org.norther.tammi.spray.template.step.NextStepAction
org.norther.tammi.spray.template.step.FormStepAction
org.norther.tammi.spray.db.step.RepositoryStepAction
org.norther.tammi.spray.db.step.SelectionStepAction
public class SelectionStepAction
A flow step action for selecting and caching form variables.
| Field Summary | |
|---|---|
protected static int |
DELETE_ACTION
The delete action. |
protected static int |
INSERT_ACTION
The insert action. |
static String |
MARKED_NAME_PROPERTY
The marked name property. |
static String |
SELECTED_NAME_PROPERTY
The selected name property. |
protected static int |
UPDATE_ACTION
The update action. |
| Fields inherited from class org.norther.tammi.spray.db.step.RepositoryStepAction |
|---|
NULL_PK, ROOT_PK |
| Fields inherited from interface org.norther.tammi.spray.template.flow.StepFlowConstants |
|---|
ADAPTABLE_STATE, DISPOSABLE_STATE, EXPLICIT_STATE, FINISHED_STATE, HELP_PIPE_PROPERTY, QUALIFIED_STATE, READ_ONLY_STATE, REPOSITORY_PROPERTY, SELECTABLE_STATE |
| Constructor Summary | |
|---|---|
SelectionStepAction()
Constructs a new flow step action. |
|
| Method Summary | |
|---|---|
protected boolean |
checkPermission(Identity id,
int mask,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Check access permission for the cached identity. |
void |
clearSelectedIdentity(int step,
int index,
StepFlowContext context)
Clears the selected identity or identities. |
Variable |
deleteVariable(int index,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Deletes the indexed variable. |
protected void |
filterRoleNameEnumeration(Variable var,
Variable account,
Persister persister,
FilterChain chain,
StepFlowContext context)
Filters unauthorized role names from the specified variable. |
Identity |
getAccountIdentity(String className,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the user account identity of the current user. |
Variable |
getImportedVariable(int index,
Identity id,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the imported indexed variable for the specified identity. |
Variable |
getImportedVariable(int index,
Identity id,
String fkField,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the imported indexed variable for the specified identity and foreign key by applying the specified persister. |
Variable |
getImportedVariable(int index,
Identity id,
String fkField,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the imported indexed variable for the specified identity and foreign key. |
Variable |
getImportedVariable(int index,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the imported indexed variable. |
protected Identity |
getMandatorySelection(int index,
String className,
String[] nameFields,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the mandatory selection for the specified class. |
Identity[] |
getSelectedIdentities(int step,
int index,
StepFlowContext context)
Gets the selected identities. |
Identity |
getSelectedIdentity(int step,
int index,
StepFlowContext context)
Gets the selected identity. |
int[] |
getSelectedIndeces(String name,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the indeces of the selected variables in the named parameter. |
int |
getSelectedIndex(String name,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the index of the selected variable in the named parameter. |
Variable |
getSelectedVariable(int step,
int index,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the selected variable. |
protected List |
getSelectionEnumeration(int index,
String className,
String[] nameFields,
OrderedMap identities,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the selection enumeration for the specified class from the corresponding identity tree. |
protected List |
getSelectionEnumeration(int index,
String className,
String[] nameFields,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context,
OrderedSet list)
Gets the selection enumeration for the specified class from the corresponding identity list. |
Variable |
getSelectionVariable(int index,
Identity[] ids,
String className,
Collection vars,
String[] nameFields,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the indexed list selection variable with the specified variables and the specified identities selected. |
Variable |
getSelectionVariable(int index,
Identity[] ids,
String className,
Collection roots,
String parentField,
String childField,
String[] nameFields,
boolean marked,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the indexed tree selection variable with the specified root variables, the specified identities selected and their parents expanded. |
Variable |
getSelectionVariable(int index,
Identity[] ids,
String className,
DBAttribute attribute,
String[] nameFields,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the indexed list selection variable with the specified identities selected. |
Variable |
getSelectionVariable(int index,
Identity[] ids,
String className,
Object pk,
String parentField,
String childField,
String[] nameFields,
boolean marked,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the indexed tree selection variable with the specified identities selected and their parents expanded. |
Variable |
getSelectionVariable(int index,
Identity id,
String className,
DBAttribute attribute,
String[] nameFields,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the indexed list selection variable with the specified identity selected. |
Variable |
getSelectionVariable(int index,
Identity id,
String className,
Object pk,
String parentField,
String childField,
String[] nameFields,
boolean marked,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the indexed tree selection variable with the specified identity selected and its parent expanded. |
Variable |
getSelectionVariable(int index,
String className,
DBAttribute attribute,
String[] nameFields,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the indexed list selection variable with the current selection. |
Variable |
getSelectionVariable(int index,
String className,
Object pk,
String parentField,
String childField,
String[] nameFields,
boolean marked,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the indexed tree selection variable with the current selection and expansions. |
Variable |
insertVariable(int index,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Inserts the indexed variable. |
Variable |
queryAccountVariable(String className,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Queries an account variable of the current user. |
Collection |
queryAllObjects(String className,
DBCriteria criteria,
String[] sortFields,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Queries all objects fulfilling the specified criteria. |
Collection |
queryTreeObjects(String className,
Object pk,
String relField,
DBCriteria criteria,
String[] sortFields,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Queries objects on the next level in a relation tree. |
Collection |
sortObjects(Collection objects,
String[] sortFields,
Persister persister,
FilterChain chain)
Sorts a collection of objects with the specified fields. |
void |
submitDeleteVariable(int index,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Deletes the selected variable. |
void |
submitInsertVariable(int index,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Inserts the selected variable. |
void |
submitQueryVariable(int index,
String className,
String attribute,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Queries a non-localized variable in the indexed selection tree. |
void |
submitSearchVariable(String className,
String attribute,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Searches for a localized variable. |
void |
submitSelectAll(int index,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Selects all selectable identitis. |
void |
submitUnselectAll(int index,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Unselects all selectable identities. |
void |
submitUpdateVariable(int index,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Updates the selected variable. |
protected Variable |
submitVariable(int index,
int action,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Submits the indexed context variable. |
Variable |
updateVariable(int index,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Updates the indexed variable. |
| Methods inherited from class org.norther.tammi.spray.template.step.FormStepAction |
|---|
disableNextStep, enableNextStep, isStepFinished, parseUploadedFile, parseUploadedFile, setStepFinished, submit, submitCancelStep, submitFinishStep, submitNextStep, submitPreviousStep, submitRenewForm, submitResetForm, submitUpdateForm, update, update |
| Methods inherited from class org.norther.tammi.spray.template.step.NextStepAction |
|---|
submitBackStep |
| Methods inherited from class org.norther.tammi.spray.template.step.FlowStepAction |
|---|
checkPermission, checkPermission, done, execute, execute, finish, forward, getPermissibleRoles, getSignature, include, initialize, initialize, prepare, pushError, submit, submitOpenHelp |
| Methods inherited from class org.norther.tammi.spray.loader.task.ActionEvent |
|---|
getAction, getAction, getAction, invoke |
| Methods inherited from class org.norther.tammi.spray.loader.task.Action |
|---|
find, getFilter, getMBeanServer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SELECTED_NAME_PROPERTY
public static final String MARKED_NAME_PROPERTY
protected static int INSERT_ACTION
protected static int UPDATE_ACTION
protected static int DELETE_ACTION
| Constructor Detail |
|---|
public SelectionStepAction()
| Method Detail |
|---|
public Collection queryAllObjects(String className,
DBCriteria criteria,
String[] sortFields,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
throws Exception
className - the class name.criteria - optional criteria.sortFields - optionals sort field.persister - the persister.request - the request.response - the response.chain - the filter chain.context - the flow context.
Exception - on errors.
public Collection queryTreeObjects(String className,
Object pk,
String relField,
DBCriteria criteria,
String[] sortFields,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
throws Exception
className - the class name.pk - an optional primary key.criteria - optional criteria.relField - the relation field.sortFields - optionals sort field.persister - the persister.request - the request.response - the response.chain - the filter chain.context - the flow context.
Exception - on errors.
public Collection sortObjects(Collection objects,
String[] sortFields,
Persister persister,
FilterChain chain)
objects - a collection of objects.sortFields - optional sort fields.persister - the persister.chain - the filter chain.
public Variable queryAccountVariable(String className,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
throws Exception
className - the account class name.persister - the persister.request - the request.response - the response.chain - the filter chain.context - the flow context.
Exception - on errors.
public Identity getAccountIdentity(String className,
ServletRequest request,
ServletResponse response,
FilterChain chain)
throws Exception
className - the account class name.request - the request.response - the response.chain - the filter chain.
Exception - on errors.
public int getSelectedIndex(String name,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
name - the parameter name.request - the request.response - the response.chain - the filter chain.context - the flow context.
public int[] getSelectedIndeces(String name,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
name - the parameter name.request - the request.response - the response.chain - the filter chain.context - the flow context.
public Identity getSelectedIdentity(int step,
int index,
StepFlowContext context)
throws Exception
step - the selection step.index - the variable index.context - the flow context.
Exception - on errors.
public Identity[] getSelectedIdentities(int step,
int index,
StepFlowContext context)
throws Exception
step - the selection step.index - the variable index.context - the flow context.
Exception - on errors.
public void clearSelectedIdentity(int step,
int index,
StepFlowContext context)
throws Exception
step - the selection step.index - the variable index.context - the flow context.
Exception - on errors.
public Variable getSelectedVariable(int step,
int index,
Persister persister,