Java Doc for ControllerResponse.java in  » J2EE » Expresso » com » jcorporate » expresso » core » controller » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Expresso » com.jcorporate.expresso.core.controller 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jcorporate.expresso.core.controller.ControllerResponse

All known Subclasses:   com.jcorporate.expresso.core.controller.ServletControllerResponse,
ControllerResponse
public class ControllerResponse implements Serializable(Code)
A ControllerResponse object contains the vector of Inputs, Outputs and Transitions that results from a call to "newState(String)" for a particular controller.

Once a state has been processed, the ControllerResponse object is usually saved in the Servlet Request Context where it can be retrieved by JSP tags by querying the request context for an object named "controllerResponse"



Field Summary
protected  HashMapblockCache
    
protected  VectorblockCacheOrdered
    
protected  StatecurrentState
    
protected  booleancustomResponse
     NOTE: Any Controller that must access the HttpServletResponse object available from the ControllerRequest object and handle making it's own response to the client (e.g.
protected  StringdataContext
    
protected  HashMapinputCache
    
protected  VectorinputCacheOrdered
    
protected  StringmyControllerClass
    
protected  ControllerRequestmyRequest
    
protected  StringmyRequestPath
    
protected  HashMapoutputCache
    
protected  VectoroutputCacheOrdered
    
protected  StringrequestedState
    
protected  LocaleresponseLocale
    
protected  Stringstyle
    
protected  Stringtitle
    
protected  HashMaptransitionCache
    
protected  VectortransitionCacheOrdered
    

Constructor Summary
public  ControllerResponse()
    

Method Summary
public  voidadd(ControllerElement t)
    
public  voidaddAutoInput(String fieldName, String friendlyName, String defaultValue, int displayLength, int maxLength, Vector validValues)
     addAutoInput is a convenience method that creates a new Input object based on the specified field parameters and adds the input object to this controller object.
public  voidaddAutoInput(String fieldName, DBObject dbobj, String defaultValue)
     addAutoInput is a convenience method that creates a new Input object based on the specified field parameters and adds the input object to this controller object.
public  voidaddAutoInput(String fieldName, String dbClassName, String defaultValue)
     addAutoInput is a convenience method that creates a new Input object based on the specified field parameters and adds the input object to this controller object.
public  voidaddAutoInput(DBObject myDBObj)
    
public  voidaddAutoInput(String fieldName, String friendlyName, String dbClassName, String defaultValue)
     addAutoInput is a convenience method that creates a new Input object based on the specified field parameters and adds the input object to this controller object.
public  voidaddAutoInput(String fieldName, String friendlyName, String defaultValue, int displayLength, int maxLength, Vector validValues, String fieldType)
     addAutoInput is a convenience method that creates a new Input object based on the specified field parameters and adds the input object to this controller object.
public  voidaddAutoInputRenameField(String fieldName, String renameFieldTo, DBObject dbobj, String defaultValue)
     addAutoInputRenameField is a convenience method that creates a new Input object based on the specified field parameters and adds the input object to this controller object.
public  voidaddBlock(Block newBlock)
    
public  voidaddError(String errorMessage)
    
public  voidaddError(String errorMessage, Object arg)
    
public  voidaddError(String errorMessage, Object[] args)
    
public  voidaddError(String propName, String errorMessage)
    
public  voidaddInput(Input newInput)
    
public  voidaddOutput(Output newOutput)
    
public  voidaddTransition(Transition newTransition)
    
public  voidautoValidate(String checkClassName, ErrorCollection errorCollection)
     AutoValidate is a quick way to validate the fields of a specified dbobj.
public  voidautoValidate(String checkClassName, ErrorCollection errorCollection, Vector requiredFields)
     AutoValidate is a quick way to validate the fields of a specified dbobj. This method has not been tested and may not be correct.
public  voidclearAttributes()
    
public  voidclearBlockCache()
    
public  voidclearFormCache()
    
public  voidclearInputCache()
    
public  voidclearOutputCache()
    
public  voidclearTransitionCache()
    
public static  ControllerResponsefromXML(Node n)
     Assemble a ControllerResponse from an xml document (may be document fragment).
Parameters:
  n - a DOM node to assemble the response from.
public  StringgetAttribute(String attrib)
    
public  MapgetAttributes()
    
public  BlockgetBlock(String blockName)
     Get a specific block.
final public  VectorgetBlocks()
    
public  StringgetControllerClass()
    
public  StategetCurrentState()
    
public  StringgetDBName()
    
public  StringgetDataContext()
    
protected  DefaultFormgetDefaultForm()
    
public  ErrorCollectiongetErrors()
    
public  HashtablegetFormCache()
    
public  StringgetFormCache(String fieldName)
     Fetch the requested field from the response cache.
public  ObjectgetFormCacheAttribute(String fieldName)
     Gets the saved cache attribute.
final public  InputgetInput(String inputName)
     Return a specific Input item.
final public  VectorgetInputs()
     Return the vector of input items for this controller state to the client.
public  LocalegetLocale()
    
public  StringgetName()
    
public  MapgetNamedBlocks()
    
public  MapgetNamedInputs()
    
public  MapgetNamedOutputs()
    
public  MapgetNamedTransitions()
    
public  MapgetNestedMap()
     Useful for JSTL iteration of all items in response.
public  OutputgetOutput(String outputName)
     Get a specific output item.
public  StringgetOutputContent(String outputName)
     Get the contents of a particular Output item.
public  OutputgetOutputRequired(String outputName)
     Get the named output, but throw if it's not found.
final public  VectorgetOutputs()
     The client calls this method for each state to determine what output to show to the user.
public  StringgetParameter(String paramName)
    
public  ControllerRequestgetRequest()
    
public  StringgetRequestPath()
     Returns the request path set earlier.
public  StringgetRequestedState()
    
public  StringgetSchema()
    
public  java.util.StackgetSchemaStack()
     Retrieve the schema stack.
public  StringgetString(String stringCode, Object[] args)
     retrieve an appropriate localized string from the correct Schema object.
public  StringgetString(String stringCode)
     Convenience version of the above with no arguments.
public  StringgetString(String stringCode, String string1)
    
public  StringgetString(String stringCode, String string1, String string2)
    
public  StringgetString(String stringCode, String string1, String string2, String string3)
    
public  StringgetString(String stringCode, String string1, String string2, String string3, String string4)
    
public  StringgetStyle()
    
public  StringgetTitle()
    
public  StringgetTitleKey()
    
public  TransitiongetTransition(String transitionName)
     Get a specific transition item.
final public  VectorgetTransitions()
     The getTransitions method is called by the client to this controller in order to determine what the possible next states are from the current state.
public  StringgetUser()
    
public  booleanhasErrors()
    
public  booleanhasErrors(String label)
    
public  booleanisCustomResponse()
    
public  voidrestoreForm()
    
public  voidsaveErrors(ErrorCollection errorCollection)
     This method saves an ErrorCollection object to the request attributes collection.
public  voidsetAttribute(String attrib, String val)
    
public  voidsetAttributes(Map attributes)
    
public  voidsetControllerClass(String newClass)
     Set public so that test classes can get into it.
 voidsetCurrentState(State newState)
    
public  voidsetCustomResponse(boolean newCustom)
     If absolutely necessary the Controller can access the ServletResponse object directly from the ServletControllerRequest object, if the controller is running in a servlet environment.
public synchronized  voidsetDBName(String newDBName)
    
public  voidsetFormCache()
     Automatically find all input fields and put them in the formCache.
public  voidsetFormCache(String fieldName, String fieldValue)
     Save a name/value pair to the formCache.
public  voidsetFormCacheAttribute(String fieldName, Object fieldAttribute)
     Allows the generic setting of form attributes.
public  voidsetRequest(ControllerRequest newRequest)
    
public synchronized  voidsetRequestPath(String newPath)
    
protected  voidsetSchema(String schemaClass)
     Tell this Controller object what Schema it belongs to.
public  voidsetSchemaStack(java.util.Stack schemaStack)
    
public  voidsetStyle(String newStyle)
     Use setStyle to specify a different Struts ActionForward to send the rendering to rather then the default one.
Parameters:
  newStyle - the new style string.
public  voidsetTitle(String newTitle)
    
public synchronized  voidsetUser(String newUser)
    
public synchronized  StringtoXML()
     Convert the controller response to an xml document fragment.
protected  booleanvalidState()
    
public  voidvalidate(ValidationSet validSet, ErrorCollection errorCollection)
     The validate method is a quick and easy way to test user input.

Field Detail
blockCache
protected HashMap blockCache(Code)
A name to value map of blocks



blockCacheOrdered
protected Vector blockCacheOrdered(Code)
A list of all blocks in the order they were added to the response



currentState
protected State currentState(Code)
The current state



customResponse
protected boolean customResponse(Code)
NOTE: Any Controller that must access the HttpServletResponse object available from the ControllerRequest object and handle making it's own response to the client (e.g. a custom mime type, multimedia stream, etc), should call setCustomResponse(true) to tell the caller that it should not try to format the Outputs, Inputs, and Transitions from this controller call. Use only when absolutely required!



dataContext
protected String dataContext(Code)
The data context for this controller response



inputCache
protected HashMap inputCache(Code)
The name to value map for inputs



inputCacheOrdered
protected Vector inputCacheOrdered(Code)
A list of all inputs as added to the response



myControllerClass
protected String myControllerClass(Code)
The classname of this controller



myRequest
protected ControllerRequest myRequest(Code)
The ControllerRequest object set for this response



myRequestPath
protected String myRequestPath(Code)
The request path



outputCache
protected HashMap outputCache(Code)
A name to value map for outputs



outputCacheOrdered
protected Vector outputCacheOrdered(Code)
A list of all outputs in the order they were added to the response



requestedState
protected String requestedState(Code)
The requested state name



responseLocale
protected Locale responseLocale(Code)
Object for setting the Locale object



style
protected String style(Code)
The resulting style code



title
protected String title(Code)
The title of the ControllerResponse



transitionCache
protected HashMap transitionCache(Code)
A name to value map for Transitions



transitionCacheOrdered
protected Vector transitionCacheOrdered(Code)
A list of all transitions in the order they were added to the response




Constructor Detail
ControllerResponse
public ControllerResponse()(Code)
Default constructor for the controller response




Method Detail
add
public void add(ControllerElement t) throws ControllerException(Code)
Convenience method to allow us to add any ControllerElement to this controllers inputs, outputs or transitions
Parameters:
  t - the new ControllerElement
throws:
  ControllerException - upon error [Such as if the ControllerElementis an unrecognized type]



addAutoInput
public void addAutoInput(String fieldName, String friendlyName, String defaultValue, int displayLength, int maxLength, Vector validValues) throws ControllerException(Code)
addAutoInput is a convenience method that creates a new Input object based on the specified field parameters and adds the input object to this controller object. Creation date: (7/20/00 3:43:14 PM)
Parameters:
  fieldName - java.lang.String
Parameters:
  friendlyName - the friendly name
Parameters:
  defaultValue - java.lang.String
Parameters:
  displayLength - the length of the display
Parameters:
  maxLength - the maximum length of the input
Parameters:
  validValues - a Vector of valid value objects for dropdowns
throws:
  ControllerException - upon error



addAutoInput
public void addAutoInput(String fieldName, DBObject dbobj, String defaultValue) throws ControllerException(Code)
addAutoInput is a convenience method that creates a new Input object based on the specified field parameters and adds the input object to this controller object. Creation date: (7/20/00 3:43:14 PM) author: Shash Chatterjee
Parameters:
  fieldName - java.lang.String
Parameters:
  dbobj - com.jcorporate.expresso.core.dbobj.DBObject
Parameters:
  defaultValue - java.lang.String
throws:
  ControllerException - upon error



addAutoInput
public void addAutoInput(String fieldName, String dbClassName, String defaultValue) throws ControllerException(Code)
addAutoInput is a convenience method that creates a new Input object based on the specified field parameters and adds the input object to this controller object. Creation date: (7/20/00 3:43:14 PM) author: Adam Rossi, PlatinumSolutions
Parameters:
  fieldName - java.lang.String
Parameters:
  dbClassName - java.lang.String
Parameters:
  defaultValue - java.lang.String
throws:
  ControllerException - upon error



addAutoInput
public void addAutoInput(DBObject myDBObj) throws ControllerException(Code)
Convenience method to add an input for every non-secret field in a db object to the current response, using the default values and valid values provided by the db object itself
Parameters:
  myDBObj - the dbobject to render to the controller response
throws:
  ControllerException - upon error



addAutoInput
public void addAutoInput(String fieldName, String friendlyName, String dbClassName, String defaultValue) throws ControllerException(Code)
addAutoInput is a convenience method that creates a new Input object based on the specified field parameters and adds the input object to this controller object. Creation date: (7/20/00 3:43:14 PM) author: Adam Rossi, PlatinumSolutions
Parameters:
  fieldName - java.lang.String
Parameters:
  friendlyName - the description of the Input to set.
Parameters:
  dbClassName - java.lang.String
Parameters:
  defaultValue - java.lang.String
throws:
  ControllerException - upon error



addAutoInput
public void addAutoInput(String fieldName, String friendlyName, String defaultValue, int displayLength, int maxLength, Vector validValues, String fieldType) throws ControllerException(Code)
addAutoInput is a convenience method that creates a new Input object based on the specified field parameters and adds the input object to this controller object. Creation date: (7/20/00 3:43:14 PM)
Parameters:
  fieldName - java.lang.String
Parameters:
  friendlyName - the description of the input
Parameters:
  defaultValue - java.lang.String
Parameters:
  displayLength - display size of the Input
Parameters:
  maxLength - the maximum input length
Parameters:
  validValues - valid value Vector if needed for dropdown boxes
Parameters:
  fieldType - the type of the field such as "datetime", "varchar",etc
throws:
  ControllerException - upon error



addAutoInputRenameField
public void addAutoInputRenameField(String fieldName, String renameFieldTo, DBObject dbobj, String defaultValue) throws ControllerException(Code)
addAutoInputRenameField is a convenience method that creates a new Input object based on the specified field parameters and adds the input object to this controller object. This variation on addAutoInput allows a user to force a field to be renamed in the INPUT object. This is important when you have two DBOBjects with the same field name rendering on the same page, and you still want to use AddAutoInput. Creation date: 1/17/2002
Parameters:
  fieldName - java.lang.String
Parameters:
  renameFieldTo - the field to rename to
Parameters:
  dbobj - com.jcorporate.expresso.core.dbobj.DBObject
Parameters:
  defaultValue - java.lang.String
throws:
  ControllerException - upon error



addBlock
public void addBlock(Block newBlock) throws ControllerException(Code)
Adds a Block to the response that will be formatted by the controller handler
Parameters:
  newBlock - the block instance to add
throws:
  ControllerException - upon error



addError
public void addError(String errorMessage) throws ControllerException(Code)

Parameters:
  errorMessage -



addError
public void addError(String errorMessage, Object arg) throws ControllerException(Code)
add an error code, and an associated arg for translating that error code
Parameters:
  errorMessage - key to error msg found in message bundle
Parameters:
  arg - a replacement value to use in ${} replacement template
See Also:   com.jcorporate.expresso.core.i18n.MessageBundle.getString(java.lang.Stringjava.lang.Object[])



addError
public void addError(String errorMessage, Object[] args) throws ControllerException(Code)
add an error code, and associated args for translating that error code
Parameters:
  errorMessage - key to error msg found in message bundle
Parameters:
  args - an array of replacement value to use in ${} replacement templates
See Also:   com.jcorporate.expresso.core.i18n.MessageBundle.getString(java.lang.Stringjava.lang.Object[])



addError
public void addError(String propName, String errorMessage) throws ControllerException(Code)

Parameters:
  propName -
Parameters:
  errorMessage -



addInput
public void addInput(Input newInput) throws ControllerException(Code)
Add an Input to the ControllerResponse
Parameters:
  newInput - the Input to add to the ControllerResponse
throws:
  ControllerException - upon error



addOutput
public void addOutput(Output newOutput) throws ControllerException(Code)
Add an Output to the controller response object
Parameters:
  newOutput - the new output to add
throws:
  ControllerException - upon error



addTransition
public void addTransition(Transition newTransition) throws ControllerException(Code)
Add a Transition to this ControllerResponse
Parameters:
  newTransition - the new Transition to add
throws:
  ControllerException - upon error



autoValidate
public void autoValidate(String checkClassName, ErrorCollection errorCollection) throws ValidationException, ControllerException(Code)
AutoValidate is a quick way to validate the fields of a specified dbobj. Creation date: (7/19/00 6:06:21 PM)
Parameters:
  checkClassName - the class name to validate
Parameters:
  errorCollection - where Errors are saved to
throws:
  ValidationException - The exception description.
throws:
  ControllerException - upon error



autoValidate
public void autoValidate(String checkClassName, ErrorCollection errorCollection, Vector requiredFields) throws ValidationException, ControllerException(Code)
AutoValidate is a quick way to validate the fields of a specified dbobj. This method has not been tested and may not be correct. This methods takes an optional requiredFields vector, which just tells the validation routine which inputs are required. Creation date: (7/19/00 6:06:21 PM)
Parameters:
  checkClassName - the class name to cehck
Parameters:
  errorCollection - the error collection to save errors to
Parameters:
  requiredFields - the field anmes that are required
throws:
  ValidationException - The exception description.
throws:
  ControllerException - upon error



clearAttributes
public void clearAttributes()(Code)
Clear the Attribute values



clearBlockCache
public void clearBlockCache()(Code)



clearFormCache
public void clearFormCache() throws ControllerException(Code)
Completely clear the internal formResponseCache Creation date: (7/19/00 6:53:58 PM) author: Adam Rossi, PlatinumSolutions
throws:
  ControllerException - upon error



clearInputCache
public void clearInputCache()(Code)
Clear the input cache



clearOutputCache
public void clearOutputCache()(Code)
Clear the output cache



clearTransitionCache
public void clearTransitionCache()(Code)



fromXML
public static ControllerResponse fromXML(Node n) throws ControllerException(Code)
Assemble a ControllerResponse from an xml document (may be document fragment).
Parameters:
  n - a DOM node to assemble the response from. an instantiated ControllerResponse object
throws:
  ControllerException - upon error



getAttribute
public String getAttribute(String attrib) throws ControllerException(Code)
Retrieve an attribute as specified from the request
Parameters:
  attrib - The name of an "attribute" for this ControllerElement item the attribute value (may be null)
throws:
  ControllerException - upon error



getAttributes
public Map getAttributes() throws ControllerException(Code)
Get the attribute Map an java.util.Map of Strings
throws:
  ControllerException - upon error



getBlock
public Block getBlock(String blockName) throws ControllerException(Code)
Get a specific block.
Parameters:
  blockName - the name of the Block Block instance or null if no block found.
throws:
  ControllerException - upon error



getBlocks
final public Vector getBlocks()(Code)
Return the vector of Blocks for this controller state to the client Vector of Block objects



getControllerClass
public String getControllerClass()(Code)
Retrieve the controller class name java.lang.String, the name of the controller class



getCurrentState
public State getCurrentState()(Code)
Return the current State object, based on the state we last transitioned into java.lang.String the current state



getDBName
public String getDBName() throws ControllerException(Code)
Get the database from the request, if there is a request available the database context that the system is set for.
throws:
  ControllerException - upon error



getDataContext
public String getDataContext() throws ControllerException(Code)
Get the database from the request, if there is a request available the database context that the system is set for.
throws:
  ControllerException - upon error



getDefaultForm
protected DefaultForm getDefaultForm() throws ControllerException(Code)
Retrieve the DefaultForm object DefaultForm
throws:
  ControllerException - upon error



getErrors
public ErrorCollection getErrors() throws ControllerException(Code)
Retrieve the error collection for this response ErrorCollection (may be null)
throws:
  ControllerException - upon error reading from the session



getFormCache
public Hashtable getFormCache() throws ControllerException(Code)
Get the entire formResponseCache Hashtable Creation date: (7/19/00 7:18:51 PM) author: Adam Rossi, PlatinumSolutions Hashtable of ControllerElements
throws:
  ControllerException - upon error



getFormCache
public String getFormCache(String fieldName) throws ControllerException(Code)
Fetch the requested field from the response cache. Return an empty string if not found. Creation date: (7/19/00 7:18:51 PM) author: Adam Rossi, PlatinumSolutions
Parameters:
  fieldName - java.lang.String java.lang.String
throws:
  ControllerException - upon error



getFormCacheAttribute
public Object getFormCacheAttribute(String fieldName) throws ControllerException(Code)
Gets the saved cache attribute.
Parameters:
  fieldName - the name of the field to retrieve Object the cache attribute
throws:
  ControllerException - if the fieldName specified is blank or null.



getInput
final public Input getInput(String inputName)(Code)
Return a specific Input item.
Parameters:
  inputName - the name of the input to retrieve Input



getInputs
final public Vector getInputs()(Code)
Return the vector of input items for this controller state to the client. java.util.Vector of Input objects



getLocale
public Locale getLocale() throws ControllerException(Code)
Retrieve the Locale for the request Locale object or default locale if noen was set
throws:
  ControllerException - upon error



getName
public String getName()(Code)
get title title and name are synonymous--easier for JSTL java.lang.String The Title of the controller



getNamedBlocks
public Map getNamedBlocks() throws ControllerException(Code)
Retrieve the Blocks as a map so that JSTL can cope with navigating the ControllerResponse through a named fashion java.util.Map
throws:
  ControllerException - upon error



getNamedInputs
public Map getNamedInputs() throws ControllerException(Code)
Retrieve the Inputs as a map so that JSTL can cope with navigating the ControllerResponse through a named fashion java.util.Map
throws:
  ControllerException - upon error



getNamedOutputs
public Map getNamedOutputs() throws ControllerException(Code)
Retrieve the Outputs as a map so that JSTL can cope with navigating the ControllerResponse through a named fashion java.util.Map
throws:
  ControllerException - upon error



getNamedTransitions
public Map getNamedTransitions() throws ControllerException(Code)
Retrieve the Transitions as a map so that JSTL can cope with navigating the ControllerResponse through a named fashion java.util.Map
throws:
  ControllerException - upon error



getNestedMap
public Map getNestedMap() throws ControllerException(Code)
Useful for JSTL iteration of all items in response. a Map of all nested elements keyed by controllerElement name.



getOutput
public Output getOutput(String outputName) throws ControllerException(Code)
Get a specific output item.
Parameters:
  outputName - the name of the output to retrieve Output
throws:
  ControllerException - upon error



getOutputContent
public String getOutputContent(String outputName) throws ControllerException(Code)
Get the contents of a particular Output item.
Parameters:
  outputName - the name of the output to retrieve java.lang.String the content of the named output
throws:
  ControllerException - If there is no such output



getOutputRequired
public Output getOutputRequired(String outputName) throws ControllerException(Code)
Get the named output, but throw if it's not found.
Parameters:
  outputName - the name of the output to retrieve Output object
throws:
  ControllerException - if the output cannot be found



getOutputs
final public Vector getOutputs()(Code)
The client calls this method for each state to determine what output to show to the user. Vector of Output objects



getParameter
public String getParameter(String paramName) throws ControllerException(Code)
Retrieve the parameter
Parameters:
  paramName - the name of the parameter to retrieve java.lang.String or null if the parameter doesn't exist
throws:
  ControllerException - upon error



getRequest
public ControllerRequest getRequest()(Code)
Retrieve the ControllerRequest associated with this object ControllerRequest object
throws:
  IllegalArgumentException - if the setRequest() object has notbeen set yet.



getRequestPath
public String getRequestPath()(Code)
Returns the request path set earlier. (Note we moved the +".do" to setRequestPath because we set less often than we get, so we do less string allocations) java.lang.String



getRequestedState
public String getRequestedState()(Code)
Retrieve the requested state state name requested



getSchema
public String getSchema()(Code)
Get the name of the schema object that this Controller belongs to java.lang.String, the Schema classname associated with thisControllerResponse.



getSchemaStack
public java.util.Stack getSchemaStack()(Code)
Retrieve the schema stack. Walk up the schema stack to check a hierarchy of MessagesBundles for a possible message java.util.Stack



getString
public String getString(String stringCode, Object[] args) throws ControllerException(Code)
retrieve an appropriate localized string from the correct Schema object. This version of the call is overridden with more sophisticated versions in DBController (which knows the username)
Parameters:
  stringCode - the String code to retrieve
Parameters:
  args - the formatting arguments translated string or stringCode if not found
throws:
  ControllerException - upon error



getString
public String getString(String stringCode) throws ControllerException(Code)
Convenience version of the above with no arguments.
Parameters:
  stringCode - the string code to retrieve java.lang.String
throws:
  ControllerException - upon error



getString
public String getString(String stringCode, String string1) throws ControllerException(Code)
Convenience method of getString(String,Object[]) where first (and only) param of args will be string1
Parameters:
  stringCode - the string code to retrieve
Parameters:
  string1 - a single parameter for message format (the first argument to replace) translated string or stringCode if not found
throws:
  ControllerException - upon error



getString
public String getString(String stringCode, String string1, String string2) throws ControllerException(Code)
Convenience method to retrieve the string with two formatting parameters
Parameters:
  stringCode - the string code to retrieve
Parameters:
  string1 - formatting parameter one
Parameters:
  string2 - formatting parameter two java.lang.String
throws:
  ControllerException - upon error



getString
public String getString(String stringCode, String string1, String string2, String string3) throws ControllerException(Code)
Retrieve a localized string with 3 formatting parameters
Parameters:
  stringCode - the string code to retrieve
Parameters:
  string1 - formatting parameter one
Parameters:
  string2 - formatting parameter two
Parameters:
  string3 - formatting parameter number three java.lang.String
throws:
  ControllerException - upon error



getString
public String getString(String stringCode, String string1, String string2, String string3, String string4) throws ControllerException(Code)
Retrieve a localized string with 4 formatting parameters
Parameters:
  stringCode - the string code to retrieve
Parameters:
  string1 - formatting parameter one
Parameters:
  string2 - formatting parameter two
Parameters:
  string3 - formatting parameter number three
Parameters:
  string4 - formatting parameter number four java.lang.String
throws:
  ControllerException - upon error



getStyle
public String getStyle()(Code)
Retrieve the style that the controller response is set to java.lang.String



getTitle
public String getTitle()(Code)
get title title and name are synonymous--easier for JSTL java.lang.String The Title of the controller



getTitleKey
public String getTitleKey()(Code)
return raw key, without running through msg bundle string translation--useful for when 'cloning' in Transition



getTransition
public Transition getTransition(String transitionName) throws ControllerException(Code)
Get a specific transition item.
Parameters:
  transitionName - the name of the transition Transition named in parameter
throws:
  ControllerException - upon error



getTransitions
final public Vector getTransitions()(Code)
The getTransitions method is called by the client to this controller in order to determine what the possible next states are from the current state. The controller uses the contents of the current state (e.g. parameters) to determine where it is possible for this user to go next. A Vector of Transition objects representing the transitions thatcan be taken by the user at this point to select new states



getUser
public String getUser() throws ControllerException(Code)
Get the database from the request, if there is a request available the User as specified by the request.
throws:
  ControllerException - upon error



hasErrors
public boolean hasErrors() throws ControllerException(Code)
determine whether response has errors true if response has errors
throws:
  ControllerException - if there is a problem



hasErrors
public boolean hasErrors(String label) throws ControllerException(Code)
determine whether response has errors of the particular label true if response has errors of the particular label
throws:
  ControllerException - if there is a problem



isCustomResponse
public boolean isCustomResponse()(Code)
Did this Controller call directly manipulate the ServletResponse and handle it's own output to the client? (This is NOT recommended) true if the controller IS sending a custom response



restoreForm
public void restoreForm() throws ControllerException(Code)
Restore the controller form



saveErrors
public void saveErrors(ErrorCollection errorCollection) throws ControllerException(Code)
This method saves an ErrorCollection object to the request attributes collection. The ErrorCollection is saved with the ErrorCollection.ERRORCOLLECTIONKEY key. To retrieve the ErrorCollection in a JSP or servlet: ErrorCollection errors = (ErrorCollection)pageContext.getValue( ErrorCollection.ERRORCOLLECTIONKEY, PageContext.REQUEST_SCOPE); Note: This method does not need to be updated to GenericSession...it is saving to the pageContext, not the session. Creation date: (7/19/00 7:25:05 PM) author: Adam Rossi, PlatinumSolutions
Parameters:
  errorCollection - java.jcorporate.expresso.core.controller.ErrorCollection
throws:
  ControllerException - upon error



setAttribute
public void setAttribute(String attrib, String val) throws ControllerException(Code)
Set the named attribute of this Controller to the given value
Parameters:
  attrib - The name of an "attribtue" for this ControllerElement item
Parameters:
  val - The value for this attribute
throws:
  ControllerException - upon error



setAttributes
public void setAttributes(Map attributes) throws ControllerException(Code)
Set the attribute Map
Parameters:
  attributes - the supplied attribute values
throws:
  ControllerException - upon error



setControllerClass
public void setControllerClass(String newClass)(Code)
Set public so that test classes can get into it.
Parameters:
  newClass - the new controller class name



setCurrentState
void setCurrentState(State newState)(Code)
Set the current State object
Parameters:
  newState - the new current state



setCustomResponse
public void setCustomResponse(boolean newCustom)(Code)
If absolutely necessary the Controller can access the ServletResponse object directly from the ServletControllerRequest object, if the controller is running in a servlet environment. For example, if a custom mime-type must be set, a multimedia data stream returned, or other special processing. If this is done, the method below should be called so that the "container" that called this Controller knows that the response object has been manipulated, and that it should not perform the normal processing of Inputs, Outputs and Transitions.
Parameters:
  newCustom - set to true if you don't want Struts to render theresponse through JSP



setDBName
public synchronized void setDBName(String newDBName) throws ControllerException(Code)
Set the db name of this ControllerResponse
Parameters:
  newDBName - the new database name
throws:
  ControllerException - upon error



setFormCache
public void setFormCache() throws ControllerException(Code)
Automatically find all input fields and put them in the formCache. Creation date: (7/19/00 7:22:11 PM) author: Adam Rossi, PlatinumSolutions
throws:
  ControllerException - upon error



setFormCache
public void setFormCache(String fieldName, String fieldValue) throws ControllerException(Code)
Save a name/value pair to the formCache. Creation date: (7/20/00 1:14:14 PM)
Parameters:
  fieldName - java.lang.String
Parameters:
  fieldValue - java.lang.String
throws:
  ControllerException - upon error



setFormCacheAttribute
public void setFormCacheAttribute(String fieldName, Object fieldAttribute) throws ControllerException(Code)
Allows the generic setting of form attributes.
Parameters:
  fieldName - the name of the field attribute to set
Parameters:
  fieldAttribute - the attribute to set it to
throws:
  ControllerException - if the fieldName is blank or null



setRequest
public void setRequest(ControllerRequest newRequest) throws ControllerException(Code)
Set the controller request - this is done as part of the processing of the controller so that the response has access to all of the request fields
Parameters:
  newRequest - the new controller request.
throws:
  ControllerException - upon error



setRequestPath
public synchronized void setRequestPath(String newPath)(Code)
Sets the request path
Parameters:
  newPath - the URL path without the .do at the end of it.



setSchema
protected void setSchema(String schemaClass)(Code)
Tell this Controller object what Schema it belongs to. This is used when the Controller tries to use it's "getString(String, Object[])" method to prepare internationalized messages - it passes the call along to the appropriate schema which knows how to locate the proper message file.
Parameters:
  schemaClass - the schema class name to associate with thiscontrollerresposne



setSchemaStack
public void setSchemaStack(java.util.Stack schemaStack)(Code)
Sets the schema stack for message bundle retrieval
Parameters:
  schemaStack - the Stack to use.



setStyle
public void setStyle(String newStyle)(Code)
Use setStyle to specify a different Struts ActionForward to send the rendering to rather then the default one.
Parameters:
  newStyle - the new style string. Must be in one of thestruts-config.xml files.



setTitle
public void setTitle(String newTitle)(Code)
Sets the title of the controller
Parameters:
  newTitle - the new title for the controller



setUser
public synchronized void setUser(String newUser) throws ControllerException(Code)
Set the user string value
Parameters:
  newUser - the new user.
throws:
  ControllerException - upon error



toXML
public synchronized String toXML() throws ControllerException(Code)
Convert the controller response to an xml document fragment. an xml document
throws:
  ControllerException - upon error



validState
protected boolean validState()(Code)
Check to see if we are currently in a valid state true if the state name is valid



validate
public void validate(ValidationSet validSet, ErrorCollection errorCollection) throws ValidationException(Code)
The validate method is a quick and easy way to test user input. We are trying to ensure that required fields are completed, and that the input is correct based on the corresponding dbobj.checkField() method. Creation date: (7/19/00 3:49:16 PM)
Parameters:
  validSet - com.jcorporate.expresso.core.controller.ValidationSet
Parameters:
  errorCollection - com.jcorporate.expresso.core.controller.ErrorCollection
throws:
  ValidationException - upon error



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.