org.norther.tammi.spray.db.step
Class DictionaryAction

java.lang.Object
  extended by org.norther.tammi.spray.loader.task.Action
      extended by org.norther.tammi.spray.loader.task.ActionEvent
          extended by org.norther.tammi.spray.template.step.FlowStepAction
              extended by org.norther.tammi.spray.template.step.NextStepAction
                  extended by org.norther.tammi.spray.template.step.FormStepAction
                      extended by org.norther.tammi.spray.db.step.RepositoryStepAction
                          extended by org.norther.tammi.spray.db.step.DictionaryAction
All Implemented Interfaces:
Serializable, Task, StepFlowConstants

public class DictionaryAction
extends RepositoryStepAction

A flow step action for maintaining a dictionary.

Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
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
DictionaryAction()
          Constructs a new flow step action.
 
Method Summary
protected  Class defineDictionaryClass(String locale, ServletRequest request, ServletResponse response, FilterChain chain)
          Defines a new dictionary class for the specified locale.
protected  Persister getResourcePersister(ServletRequest request, ServletResponse response, FilterChain chain)
          Gets the resource bundle specific persister.
 void prepare(ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context)
          Prepares the locale variable.
 void submitFinishStep(ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context)
          Finishes the step.
 void submitUpdateForm(ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context)
          Updates the selected dictionaries.
 void submitUploadForm(ServletRequest request, ServletResponse response, FilterChain chain, StepFlowContext context)
          Uploads the specified dictionary.
 
Methods inherited from class org.norther.tammi.spray.db.step.RepositoryStepAction
add1NForeignReferences, add1NNullReferences, add1NObjectReferences, addAttributeValues, addToRelationMap, createVariable, createVariable, deleteVariable, getAttributeValue, getAttributeValues, getBeanRepositoryClient, getConnectionKey, getEndReference, getIntrospector, getKeyAttributeValue, getKeyAttributeValues, getLoader, getNextReference, getNextReference, getNextReferences, getPersister, getPersister, getPersister, getPostDependencies, getPreDependencies, getRepositoryClient, getResourceKey, getRootReference, getRootReferences, insertVariable, isNullPK, isRelatedTo, isRootPK, setAttributeValue, setAttributeValue, setKeyAttributeValue, setKeyAttributeValues, setMNForeignReferences, setMNObjectReferences, setPostDependencies, setPreDependencies, toClass, updateVariable
 
Methods inherited from class org.norther.tammi.spray.template.step.FormStepAction
disableNextStep, enableNextStep, isStepFinished, parseUploadedFile, parseUploadedFile, setStepFinished, submit, submitCancelStep, submitNextStep, submitPreviousStep, submitRenewForm, submitResetForm, 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, 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
 

Constructor Detail

DictionaryAction

public DictionaryAction()
Constructs a new flow step action.

Method Detail

prepare

public void prepare(ServletRequest request,
                    ServletResponse response,
                    FilterChain chain,
                    StepFlowContext context)
             throws Exception
Prepares the locale variable.

Overrides:
prepare in class FlowStepAction
Parameters:
request - the request.
response - the response.
chain - the filter chain.
context - the flow context.
Throws:
Exception - on errors.

submitUpdateForm

public void submitUpdateForm(ServletRequest request,
                             ServletResponse response,
                             FilterChain chain,
                             StepFlowContext context)
                      throws Exception
Updates the selected dictionaries.

Overrides:
submitUpdateForm in class FormStepAction
Parameters:
request - the request.
response - the response.
chain - the filter chain.
context - the flow context.
Throws:
Exception - on errors.

submitUploadForm

public void submitUploadForm(ServletRequest request,
                             ServletResponse response,
                             FilterChain chain,
                             StepFlowContext context)
                      throws Exception
Uploads the specified dictionary.

Parameters:
request - the request.
response - the response.
chain - the filter chain.
context - the flow context.
Throws:
Exception - on errors.

submitFinishStep

public void submitFinishStep(ServletRequest request,
                             ServletResponse response,
                             FilterChain chain,
                             StepFlowContext context)
                      throws Exception
Description copied from class: FormStepAction
Finishes the step.

Overrides:
submitFinishStep in class FormStepAction
Parameters:
request - the request.
response - the response.
chain - the filter chain.
context - the flow context.
Throws:
Exception - on errors.

getResourcePersister

protected Persister getResourcePersister(ServletRequest request,
                                         ServletResponse response,
                                         FilterChain chain)
                                  throws Exception
Gets the resource bundle specific persister.

Parameters:
request - the request.
response - the response.
chain - the filter chain.
Returns:
the resource persister.
Throws:
Exception - on errors.

defineDictionaryClass

protected Class defineDictionaryClass(String locale,
                                      ServletRequest request,
                                      ServletResponse response,
                                      FilterChain chain)
                               throws Exception
Defines a new dictionary class for the specified locale.

Parameters:
locale - the locale string.
request - the request.
response - the response.
chain - the filter chain.
Returns:
the resource persister.
Throws:
Exception - on errors.


Copyright © 2004 The Norther Organization. All rights reserved.