|
||||||||||
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 org.norther.tammi.spray.db.step.SelectionStepAction org.norther.tammi.spray.db.step.ElementStepAction
public class ElementStepAction
A flow step action for selecting and caching meta elements.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.norther.tammi.spray.loader.task.Task |
---|
Task.Control |
Field Summary | |
---|---|
static String |
META_IDENTITY_PARAMETER
Deprecated. use IDENTITY_PARAMETER instead. |
protected static String[] |
NEW_METADATA_ATTRIBUTES
Attributes of a new metadata that should be nullified before saving. |
Fields inherited from class org.norther.tammi.spray.loader.task.Submit |
---|
EXECUTE_METHOD, SUBMIT_PREFIX |
Constructor Summary | |
---|---|
ElementStepAction()
Constructs a new flow step action. |
Method Summary | ||
---|---|---|
boolean |
checkPermission(Variable var,
Permission permission,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Check access permission for the specified variable. |
|
DBCriteria<? extends Variable> |
createPermissionCriteria(String className,
Object oid,
Object uid,
Object[] gids,
boolean others,
Permission permission,
Persister persister,
FilterChain chain)
Creates the specified permission criteria for a meta element query. |
|
DBCriteria<? extends Variable> |
createUserPermissionCriteria(String className,
Permission permission,
Persister persister,
FilterChain chain)
Creates the specified user permission criteria for a meta element query. |
|
Object |
getGroupId(ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the id of the current group. |
|
Variable |
getImportedElement(int index,
Identity id,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context,
Object... options)
Gets the indexed imported metaelement from an identity source referenced by either a primary or foreign key field by applying the specified persister. |
|
String |
getMetaRecordType(Variable variable,
Persister persister,
FilterChain chain)
Gets the record type of the specified meta variable. |
|
Variable |
getMetaSelectionVariable(int index,
Identity[] ids,
DBCriteria<? extends Variable> criteria,
Permission permission,
String[] nameFields,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the indexed meta list selection variable with the specified identities selected for the specified search criteria. |
|
Variable |
getMetaSelectionVariable(int index,
Identity[] ids,
String className,
Object oid,
Object uid,
Object[] gids,
boolean others,
Permission permission,
DBAttribute[] attributes,
String[] nameFields,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the indexed meta list selection variable with the specified identities selected for the specified users. |
|
Variable |
getMetaSelectionVariable(int index,
Identity[] ids,
Variable search,
Permission permission,
String[] nameFields,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the indexed meta list selection variable with the specified identities selected for the specified meta search variable. |
|
String |
getSelectedFormPrefix(int index,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the selected form prefix. |
|
Identity |
getSelectedIdentity(int index,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context)
Gets the selected identity. |
|
boolean |
isGroupMember(Object group,
Persister persister,
FilterChain chain)
Checks if the current user if the owner or member of the specified group. |
|
boolean |
isGroupOwner(Object group,
Persister persister,
FilterChain chain)
Checks if the current user is the owner of the specified group. |
|
Variable |
prepareMetaElement(Identity id,
Persister persister,
ServletRequest request,
ServletResponse response,
FilterChain chain,
StepFlowContext context,
Object... options)
Prepares the selected meta element. |
|
|
queryAllMemberGroups(String className,
String[] sortFields,
Persister persister,
FilterChain chain)
Queries all member groups of the current user in a relation tree fulfilling the specified criteria, and may sort them by optional sort fields. |
|
|
queryChildMemberGroups(String className,
String[] sortFields,
Persister persister,
FilterChain chain)
Queries child member groups of the current user in a relation tree fulfilling the specified criteria, and may sort them by optional sort fields. |
|
Variable |
queryMetaElement(Identity id,
Permission permission,
Persister persister,
FilterChain chain)
Queries a meta element with permissions. |
|
|
queryParentMemberGroups(String className,
String[] sortFields,
Persister persister,
FilterChain chain)
Queries parent member groups of the current user in a relation tree fulfilling the specified criteria, and may sort them by optional sort fields. |
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 |
Field Detail |
---|
public static final String META_IDENTITY_PARAMETER
protected static final String[] NEW_METADATA_ATTRIBUTES
Constructor Detail |
---|
public ElementStepAction()
Method Detail |
---|
public Variable prepareMetaElement(Identity id, Persister persister, ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context, Object... options) throws Exception
id
- the element identity.persister
- the persister.request
- the request.response
- the response.chain
- the filter chain.context
- the flow context.options
- optional foreign key field, resource permission,
permission criteria and attribute filter.
Exception
- on errors.public Variable getImportedElement(int index, Identity id, Persister persister, ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context, Object... options) throws Exception
index
- the variable index.id
- the source identity.persister
- the persister.request
- the request.response
- the response.chain
- the filter chain.context
- the flow context.options
- optional foreign key field, resource permission,
permission criteria and attribute filter.
Exception
- on errors.public Object getGroupId(ServletRequest request, ServletResponse response, FilterChain chain)
request
- the request.response
- the response.chain
- the filter chain.
public boolean isGroupOwner(Object group, Persister persister, FilterChain chain) throws Exception
group
- the member group.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public boolean isGroupMember(Object group, Persister persister, FilterChain chain) throws Exception
group
- the member group.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public <T> Map<Object,T> queryAllMemberGroups(String className, String[] sortFields, Persister persister, FilterChain chain) throws Exception
T
- the group type.className
- the class name.sortFields
- optionals sort field.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public <T> Map<Object,T> queryParentMemberGroups(String className, String[] sortFields, Persister persister, FilterChain chain) throws Exception
T
- the group type.className
- the class name.sortFields
- optionals sort field.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public <T> Map<Object,T> queryChildMemberGroups(String className, String[] sortFields, Persister persister, FilterChain chain) throws Exception
T
- the group type.className
- the class name.sortFields
- optionals sort field.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Variable getMetaSelectionVariable(int index, Identity[] ids, DBCriteria<? extends Variable> criteria, Permission permission, String[] nameFields, Persister persister, ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context) throws Exception
index
- the selection variable index.ids
- the selected identities.criteria
- the search criteria.nameFields
- the name fields.permission
- the permission.persister
- the persister.request
- the request.response
- the response.chain
- the filter chain.context
- the flow context.
Exception
- on errors.public Variable getMetaSelectionVariable(int index, Identity[] ids, Variable search, Permission permission, String[] nameFields, Persister persister, ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context) throws Exception
index
- the selection variable index.ids
- the selected identities.search
- the search variable.nameFields
- the name fields.permission
- the permission.persister
- the persister.request
- the request.response
- the response.chain
- the filter chain.context
- the flow context.
Exception
- on errors.public Variable getMetaSelectionVariable(int index, Identity[] ids, String className, Object oid, Object uid, Object[] gids, boolean others, Permission permission, DBAttribute[] attributes, String[] nameFields, Persister persister, ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context) throws Exception
index
- the selection variable index.ids
- the selected identities.className
- the selection class name.oid
- the owner id.uid
- the user id.gids
- the group ids.others
- the others option.permission
- the permission.attributes
- optional attributes.nameFields
- the name fields.persister
- the persister.request
- the request.response
- the response.chain
- the filter chain.context
- the flow context.
Exception
- on errors.public String getMetaRecordType(Variable variable, Persister persister, FilterChain chain) throws Exception
variable
- the meta variable.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public DBCriteria<? extends Variable> createPermissionCriteria(String className, Object oid, Object uid, Object[] gids, boolean others, Permission permission, Persister persister, FilterChain chain)
className
- the variable class name.oid
- the owner id.uid
- the user id.gids
- the group ids.others
- the others option.permission
- the reuqested permission.persister
- the persister.chain
- the filter chain.
public DBCriteria<? extends Variable> createUserPermissionCriteria(String className, Permission permission, Persister persister, FilterChain chain) throws Exception
className
- the element class name.permission
- the permission.persister
- the persister.chain
- the filter chain.
Exception
- on errors.public Variable queryMetaElement(Identity id, Permission permission, Persister persister, FilterChain chain) throws Exception
id
- the meta element identity.persister
- the persister.permission
- the permission.chain
- the filter chain.
Exception
- on errors.public Identity getSelectedIdentity(int index, ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context)
index
- the parameter index.request
- the request.response
- the response.chain
- the filter chain.context
- the flow context.
public String getSelectedFormPrefix(int index, ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context)
index
- the variable index.request
- the request.response
- the response.chain
- the filter chain.context
- the flow context.
public boolean checkPermission(Variable var, Permission permission, Persister persister, ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context) throws Exception
SelectionStepAction
checkPermission
in class SelectionStepAction
var
- the variable.permission
- the permissions.persister
- the persister.request
- the request.response
- the response.chain
- the filter chain.context
- the flow context.
Exception
- on errors.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |