|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.spray.loader.task.Action org.norther.tammi.spray.loader.task.Submit 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
public class RepositoryStepAction
A flow step action for repository based actions.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.norther.tammi.spray.loader.task.Task |
---|
Task.Control |
Field Summary |
---|
Fields inherited from class org.norther.tammi.spray.loader.task.Submit |
---|
EXECUTE_METHOD, SUBMIT_PREFIX |
Constructor Summary | |
---|---|
RepositoryStepAction()
Constructs a new flow step action. |
Method Summary | ||
---|---|---|
boolean |
add1NForeignReferences(Object node,
String className,
String fkField,
Object[] fks,
Persister persister,
FilterChain chain)
Adds foreign references to 1:n relations. |
|
boolean |
add1NNullReferences(String className,
String fkField,
Object[] fks,
Persister persister,
FilterChain chain)
Adds null references to 1:n relations. |
|
boolean |
add1NObjectReferences(Object node,
String relField,
String fkField,
Object[] fks,
Persister persister,
FilterChain chain)
Adds object references to 1:n relations. |
|
boolean |
addAttributeValues(Object node,
String field,
Persister persister,
FilterChain chain,
List<Object> result)
Adds attribute values to a list. |
|
boolean |
addToRelationMap(Object node,
String relField,
Persister persister,
FilterChain chain,
ConcurrentMap<Object,Object> result)
Adds to a map of referenced objects. |
|
|
createVariable(Class<V> clazz,
FilterChain chain)
Creates a new variable instance of the specified class. |
|
Variable |
createVariable(String type,
FilterChain chain)
Creates a new variable instance of the specified type. |
|
void |
deleteReferences(Variable var,
Persister persister,
FilterChain chain)
Deletes a variable and its dependencies. |
|
Variable |
deleteVariable(Variable var,
Persister persister,
FilterChain chain)
Deletes a variable. |
|
Variable |
deleteVariable(Variable var,
String type,
Persister persister,
FilterChain chain)
Deletes a variable of the specified type. |
|
VariableAttributeInfo |
getAttributeInfo(String name,
String type,
FilterChain chain)
Gets the named attribute info of the variable of the specified type. |
|
List<Object> |
getAttributeValues(Object node,
String field,
Persister persister,
FilterChain chain)
Gets a list of attribute values. |
|
List<Variable> |
getDesktopData(Persister persister,
FilterChain chain)
Gets desktop data of the current user. |
|
Introspector |
getIntrospector(ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets a localized introspector. |
|
Loader |
getLoader(FilterChain chain)
Gets the loader for dynamic class loading. |
|
Variable |
getMetaDesktop(Persister persister,
FilterChain chain)
Gets the desktop of the current user. |
|
Variable |
getMetaFolder(Persister persister,
FilterChain chain)
Gets the folder of the current user. |
|
Persister |
getPersister(ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the context specific persister. |
|
Object |
getReferenceValue(Object node,
int index,
String relField,
Persister persister,
FilterChain chain)
Gets the indexed referenced node. |
|
protected BeanRepositoryFilter |
getRepositoryFilter(FilterChain chain)
Gets the bean repository client. |
|
Variable |
getRootFolder(Persister persister,
FilterChain chain)
Gets the root folder. |
|
List<?> |
getRootReferences(Object node,
String relField,
Persister persister,
FilterChain chain)
Gets the root nodes. |
|
VariableInfo |
getVariableInfo(String type,
FilterChain chain)
Gets the variable info of the specified type. |
|
void |
insertReferences(Variable var,
Persister persister,
FilterChain chain)
Inserts a variable and its dependencies. |
|
Variable |
insertVariable(Variable var,
Persister persister,
FilterChain chain)
Inserts a variable by exporting the specified one. |
|
Variable |
insertVariable(Variable var,
String type,
Persister persister,
FilterChain chain)
Inserts a variable of the specified type by exporting the specified one. |
|
boolean |
isRelatedTo(Variable node,
String relField,
Object xpk,
Persister persister,
FilterChain chain)
Checks whether the specified key is related to the specified node. |
|
int[] |
orderObjects(Collection<?> objects,
String[] sortFields,
Persister persister,
FilterChain chain)
Orders a collection of objects with the specified fields. |
|
|
queryAllObjects(DBCriteria<T> criteria,
String[] sortFields,
Persister persister,
FilterChain chain,
Object... clazz)
Queries all objects fulfilling the specified criteria and may sort them by optional sort fields. |
|
|
queryAllObjects(DBQuery<T> query,
String[] sortFields,
Persister persister,
FilterChain chain)
Queries all objects of the specified query and may sort them by optional sort fields. |
|
|
queryTreeObjects(DBCriteria<T> criteria,
String relField,
Object rpk,
int depth,
String[] sortFields,
Persister persister,
FilterChain chain,
Object... clazz)
Queries objects to the specified depth in a relation tree fulfilling the specified criteria and may sort them by optional sort fields. |
|
Object[] |
setMNForeignReferences(Object node,
String indirection,
String fkField1,
String fkField2,
Object[] fks,
Persister persister,
FilterChain chain)
Sets foreign references in m:n relations. |
|
Object[] |
setMNObjectReferences(Object node,
String relField,
String indirection,
String fkField1,
String fkField2,
Object[] fks,
Persister persister,
FilterChain chain)
Sets object references in m:n relations. |
|
|
sortObjects(Collection<T> objects,
String[] sortFields,
Persister persister,
FilterChain chain)
Sorts a collection of objects with the specified fields. |
|
Variable |
storeVariable(Variable var,
Persister persister,
FilterChain chain)
Stores a variable by exporting the specified one. |
|
Variable |
storeVariable(Variable var,
String type,
Persister persister,
FilterChain chain)
Stores a variable of the specified type by exporting the specified one. |
|
Class<?> |
toClass(String className,
FilterChain chain)
Converts a class name into the corresponding class. |
|
void |
updateReferences(Variable var,
Persister persister,
FilterChain chain)
Updates a variable and its dependencies. |
|
Variable |
updateVariable(Variable var,
Persister persister,
FilterChain chain)
Updates a variable by importing the specified one. |
|
Variable |
updateVariable(Variable var,
String type,
Persister persister,
FilterChain chain)
Updates a variable of the specified type by importing the specified one. |
Methods inherited from class org.norther.tammi.spray.template.step.FormStepAction |
---|
clearParameters, loadPropertyFile, loadUploadedFile, submit, submitCancelStep, submitFinishStep, submitInsertForm, submitNextStep, submitPreviousStep, submitRenewForm, submitResetForm, submitReuseForm, submitUpdateForm, update, update, update, update |
Methods inherited from class org.norther.tammi.spray.template.step.NextStepAction |
---|
isNextStepEnabled, setNextStepEnabled, submitBackStep |
Methods inherited from class org.norther.tammi.spray.template.step.FlowStepAction |
---|
checkPermission, checkPermission, checkPermission, construct, execute, execute, finish, forward, getPermissibleRoles, getSignature, include, initialize, initialize, prepare, submit, submitOpenHelp |
Methods inherited from class org.norther.tammi.spray.loader.task.Submit |
---|
getAction, getAction, invoke |
Methods inherited from class org.norther.tammi.spray.loader.task.Action |
---|
find, find, getFilter, getMBeanServer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RepositoryStepAction()
Method Detail |
---|
public Class<?> toClass(String className, FilterChain chain) throws ClassNotFoundException
className
- the class name.chain
- the filter chain.
ClassNotFoundException
- if not found.public Loader getLoader(FilterChain chain)
chain
- the filter chain.
IllegalStateException
- if not found.public Introspector getIntrospector(ServletRequest request, ServletResponse response, FilterChain chain)
request
- the request.response
- the response.chain
- the filter chain.
public Persister getPersister(ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context) throws Exception
request
- the request.response
- the response.chain
- the filter chain.context
- the flow context.
Exception
- on errors.public Variable createVariable(String type, FilterChain chain) throws Exception
type
- the type of the variable.chain
- the filter chain.
Exception
- on errors.public <V extends Variable> V createVariable(Class<V> clazz, FilterChain chain) throws Exception
V
- the variable type.clazz
- the class of the variable.chain
- the filter chain.
Exception
- on errors.public Variable insertVariable(Variable var, Persister persister, FilterChain chain) throws Exception
var
- the variable to insert.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Variable updateVariable(Variable var, Persister persister, FilterChain chain) throws Exception
var
- the variable to update.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Variable storeVariable(Variable var, Persister persister, FilterChain chain) throws Exception
var
- the variable to store.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Variable deleteVariable(Variable var, Persister persister, FilterChain chain) throws Exception
var
- the variable to delete.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Variable insertVariable(Variable var, String type, Persister persister, FilterChain chain) throws Exception
var
- the variable to insert.type
- the variable type.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Variable updateVariable(Variable var, String type, Persister persister, FilterChain chain) throws Exception
var
- the variable to update.type
- the variable type.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Variable storeVariable(Variable var, String type, Persister persister, FilterChain chain) throws Exception
var
- the variable to store.type
- the variable type.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Variable deleteVariable(Variable var, String type, Persister persister, FilterChain chain) throws Exception
var
- the variable to delete.type
- the variable type.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public void insertReferences(Variable var, Persister persister, FilterChain chain) throws Exception
var
- the variable to insert.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public void updateReferences(Variable var, Persister persister, FilterChain chain) throws Exception
var
- the variable to update.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public void deleteReferences(Variable var, Persister persister, FilterChain chain) throws Exception
var
- the variable to delete.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public VariableInfo getVariableInfo(String type, FilterChain chain)
type
- the type of the variable.chain
- the filter chain.
public VariableAttributeInfo getAttributeInfo(String name, String type, FilterChain chain)
name
- the name of the attribute.type
- the type of the variable.chain
- the filter chain.
public List<Object> getAttributeValues(Object node, String field, Persister persister, FilterChain chain) throws Exception
node
- the node object.field
- the attribute field(s).persister
- the persister.chain
- the filter chain.
Exception
- on errors.public boolean addAttributeValues(Object node, String field, Persister persister, FilterChain chain, List<Object> result) throws Exception
node
- the node object.field
- the attribute field(s).persister
- the persister.chain
- the filter chain.result
- a list of attribute values.
Exception
- on errors.public List<?> getRootReferences(Object node, String relField, Persister persister, FilterChain chain) throws Exception
node
- the node object.relField
- the relation field.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Object getReferenceValue(Object node, int index, String relField, Persister persister, FilterChain chain) throws Exception
node
- the node object.index
- the index.relField
- the relation field.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public boolean isRelatedTo(Variable node, String relField, Object xpk, Persister persister, FilterChain chain) throws Exception
node
- the node variable.relField
- the relation field.xpk
- the primary key to check.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public boolean addToRelationMap(Object node, String relField, Persister persister, FilterChain chain, ConcurrentMap<Object,Object> result) throws Exception
node
- the node object.relField
- the relation field.persister
- the persister.chain
- the filter chain.result
- the result map.
Exception
- on errors.public boolean add1NNullReferences(String className, String fkField, Object[] fks, Persister persister, FilterChain chain) throws Exception
className
- the data class name.fkField
- the foreign key field.fks
- an array of new foreign keys or identities.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public boolean add1NForeignReferences(Object node, String className, String fkField, Object[] fks, Persister persister, FilterChain chain) throws Exception
node
- the node object.className
- the foreign class name.fkField
- the foreign key field.fks
- an array of new foreign keys or identities.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public boolean add1NObjectReferences(Object node, String relField, String fkField, Object[] fks, Persister persister, FilterChain chain) throws Exception
node
- the node object.relField
- the relation field.fkField
- the foreign key field.fks
- an array of new foreign keys or identities.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Object[] setMNForeignReferences(Object node, String indirection, String fkField1, String fkField2, Object[] fks, Persister persister, FilterChain chain) throws Exception
node
- the node object.indirection
- the indirection class name.fkField1
- the foreign key field to the node.fkField2
- the foreign key field to the reference.fks
- an array of new foreign keys or identities.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Object[] setMNObjectReferences(Object node, String relField, String indirection, String fkField1, String fkField2, Object[] fks, Persister persister, FilterChain chain) throws Exception
node
- the node object.relField
- the relation field.indirection
- the indirection class name.fkField1
- the foreign key field to the node.fkField2
- the foreign key field to the reference.fks
- an array of new foreign keys or identities.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public int[] orderObjects(Collection<?> objects, String[] sortFields, Persister persister, FilterChain chain)
objects
- a collection of objects.sortFields
- the sort fields.persister
- the persister.chain
- the filter chain.
public <T> Collection<T> sortObjects(Collection<T> objects, String[] sortFields, Persister persister, FilterChain chain)
T
- the object type.objects
- a collection of objects.sortFields
- optional sort fields.persister
- the persister.chain
- the filter chain.
public <T> Collection<T> queryAllObjects(DBQuery<T> query, String[] sortFields, Persister persister, FilterChain chain) throws Exception
T
- the object type.query
- the query.sortFields
- optional sort fields.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public <T> Collection<T> queryAllObjects(DBCriteria<T> criteria, String[] sortFields, Persister persister, FilterChain chain, Object... clazz) throws Exception
T
- the object type.criteria
- optional criteria.sortFields
- optional sort fields.persister
- the persister.chain
- the filter chain.clazz
- an alternate class or class name.
Exception
- on errors.public <T> Collection<T> queryTreeObjects(DBCriteria<T> criteria, String relField, Object rpk, int depth, String[] sortFields, Persister persister, FilterChain chain, Object... clazz) throws Exception
T
- the object type.criteria
- optional criteria.relField
- the relation field.rpk
- an optional root primary key.depth
- the tree depth (-1 = bottom).sortFields
- optionals sort field.persister
- the persister.chain
- the filter chain.clazz
- an alternate class or class name.
Exception
- on errors.public Variable getMetaDesktop(Persister persister, FilterChain chain) throws Exception
persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Variable getRootFolder(Persister persister, FilterChain chain) throws Exception
persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Variable getMetaFolder(Persister persister, FilterChain chain) throws Exception
persister
- the persister.chain
- the filter chain.
Exception
- on errors.public List<Variable> getDesktopData(Persister persister, FilterChain chain) throws Exception
persister
- the persister.chain
- the filter chain.
Exception
- on errors.protected BeanRepositoryFilter getRepositoryFilter(FilterChain chain)
chain
- the filter chain.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |