input
stringlengths
10
828
output
stringlengths
5
107
protected boolean is handle state state next state return handle states contains next state
return true if the passed in state was added to this controller
protected boolean is prompt state state next state return prompt states contains next state
return true if the passed in state was added to this controller
protected string process path http servlet request http servlet request http servlet response http servlet response throws ioexception string path super process path http servlet request http servlet response string controller http servlet request get parameter controller if controller null do reverse lookup from controller class to mapping action config mapping config manager get action config controller http servlet request get parameter state if mapping null path mapping get path return path
subclass in order to allow expresso action servlet to be a dispatcher
public void add param string param code string param value constructed param string null if param code equals state set state string util not null param value return if param code equals controller set controller object string util not null param value return params put param code string util not null param value add param string string
adds a parameter to a transition
public class set filter class class filter class old m filter if filter null m filter null else m filter filter return old
set the filter class that will be used for all string filtering
public map get named transitions throws controller exception valid state return transition cache
retrieve the transitions as a map so that jstl can cope with navigating
public void set state string new state constructed param string null my state new state
sets the target state to transition to
public string get state if my state null return get param state return my state
retrieve the currently set state
public string get user throws controller exception return get request get user
get the database from the request if there is a request available
public void add controller element t throws controller exception if t instanceof input add input input t else if t instanceof output add output output t else if t instanceof transition add transition transition t else if t instanceof block add block block t else throw new controller exception element t get name is not a block input output or transition
convenience method to allow us to add any controller element to this
protected string next handle state state next state string next handle null int i prompt states index of next state if i 1 valid prompt new state name passed in state handle state state handle states get i next handle handle state get name return next handle
return the name of the handle state that is associated with the
public boolean is external transition string running controller if controller object null controller object equals running controller return false else return true
returns true if the destination for this transition is a different
public string get controller object if controller object null return get param controller return controller object get controller object
return the name of the controller object that this transition
public filter set filter class filter filter class old m filter if filter null m filter null else m filter filter get class filter result null if old null try result filter old new instance catch exception e should not happen since we were passed in a good filter log error e return result
set the filter class that will be used for all string filtering
public string get owner controller return this owner object
sets the controller that created this transition
protected string next prompt state state next state string next prompt null int i prompt states index of next state i if i 0 i prompt states size next prompt s exist state prompt state state prompt states get i next prompt prompt state get name return next prompt
return the name of the prompt state that is next to the passed
public string get param string param code return string params get param code get param string
return the value for a specific parameter for this transition object
public hashtable get params return params get params
return the hashtable of parameters for this transition object
public string get error state return error state
retrieves the state that has been set as the error state
protected void end timer long begin timer http servlet request request if log is info enabled log info request string util not null request get request uri string util not null request get query string total time system current time millis begin timer milliseconds
used for logging time of requests
public string get param string return get param string true get param string
return a string of the current params this is not url encoded string
public void set return to sender transition new return to sender return to sender new return to sender
set the return to sender transition
public void set state form class string new state form class state form class new state form class
set the class name of the state form associated with this state
public void set success transition transition new success transition success transition new success transition
set the success transition
public boolean is return to sender enabled return return to sender
return the return to sender flag
public void set controller object string new object constructed param string null controller object new object set controller object string
set the controller that this action referrs to
public void set controller object class c constructed param string null if c null set controller object c get name else set controller object string null
mor typesafe way of setting the controller object
public void set name string new name name new name this calculate handler name new name
set the internal name of this state
public void add block block new block throws controller exception if block cache null block cache new hash map if string util not null new block get name equals int next num block cache size 1 new block set name next num new block set controller response this synchronized block cache block cache put new block get name new block if block cache ordered null block cache ordered new vector block cache ordered add element new block
adds a block to the response that will be formatted by the controller
public void set owner controller string new controller constructed param string null owner object new controller
sets the controller that created this transition
public void set secure boolean new secure this secure new secure
sets the should be secure flag
public void set params hashtable new params constructed param string null params new hashtable new params
set this transitions parameters to the passed in collection
public void set description string new descrip descrip new descrip
set a description human readable for this state
public void add required parameter string new param required parameters add new param set mask new param notempty mask
add a required parameter to this state
public void add optional parameter string new param optional parameters add new param
add a required parameter to this state
public void add parameter string new param add required parameter new param add parameter string
add a required parameter to this state
public void add input input new input throws controller exception if input cache null input cache new hash map new input set controller response this if string util not null new input get name equals int next num input cache size 1 new input set name i next num synchronized input cache input cache put new input get name new input if input cache ordered null input cache ordered new vector input cache ordered add element new input
add an input to the controller response
public void add parameter string new param string mask add required parameter new param set mask new param mask
add a new parameter to this state
public void add required parameters string new param string error message add required parameter new param set the mask to that of a non empty string set mask new param notempty mask
add a new parameter that is required and display the given error message
public void add output output new output throws controller exception if output cache null output cache new hash map new output set controller response this if string util not null new output get name equals int next num output cache size 1 new output set name o next num synchronized output cache output cache put new output get name new output if output cache ordered null output cache ordered new vector output cache ordered add element new output
add an output to the controller response object
public string get full url throws controller exception http servlet response serv response this get servlet response if serv response null return serv response encode url config manager get context path get the url true else return config manager get context path get the url true
similar to get url but also includes the context path
public void add parameter string new param boolean required if required required parameters add new param else optional parameters add new param add parameter string boolean
add a new parameter to this state
protected string previous prompt state state next state string previous prompt null int i prompt states index of next state if i 0 previous prompt s exist state previous state state prompt states get i 1 previous prompt previous state get name return previous prompt
return the name of the prompt state that is previous to the passed
public string get mapping throws controller exception action config action config config manager get action config this get controller object this get state if action config null throw new controller exception unable to locate action mapping for this get controller object and state this get state return action config get path do
this function returns the mapping of the struts action including the
public void add parameter string new param boolean required string mask if required add required parameter new param else add optional parameter new param set mask new param mask
add a new parameter to this state
public string get description controller response my response get controller response if my response null return descrip try return my response get string descrip catch exception ee return descrip get description
get the description of this state as supplied when the
public vector get parameters return new vector required parameters get parameters
return the list of parameters required by this state
public list get required parameters list return new array list required parameters
same as get parameters but returns a list instead
public void clear attributes my request set attributes null
clear the attribute values
public vector get optional parameters return new vector optional parameters
returns a list of optional parameters
public string get default value string result if default value null result string default value get 0 return result get default value
return a single default value supplied by the controller for this
public list get optional parameters list return new array list optional parameters
returns a list of optional parameters
public string get content return get default value
convenience for jstl access to be parallel with output
public array list get default value list if default value null default value new array list return array list default value clone
return a list of default values supplied by the controller for this
public string get lookup return lookup get lookup
returns the class name of a database object that can be used to
public string to string return class name name descrip to string
returns the string of this state
public void clear form cache throws controller exception get default form clear
completely clear the internal form response cache creation date 7 19 00
public vector get valid values if valid values null return new vector return valid values
return the list of valid values that are allowed for this
public boolean equals object o if o instanceof string string cmp string o if cmp null return cmp equals name else return false else if o instanceof state state cmp state o return name equals cmp get name return false equals object
overrides default object
public void set default value string new value if new value null is this trying to unset a value if default value null default value clear return if default value null default value new array list if default value size 0 default value add new value else default value set 0 new value
supply a default value for this
public void set default value list list if list null is this trying to unset a value if default value null default value clear return if default value null default value new array list list else default value clear default value add all list
supply a list of default values for this
public transition get error transition return error transition
return the error transition
public void clear input cache input cache null
clear the input cache
public void add default value string new value if new value null return could throw but seems nicer to just discard if default value null default value new array list default value add new value
supply another default value for this
protected void set controller security transition transition new controller security transition controller security transition new controller security transition
set the transition that will be executed when a user attempts to run
public void set lookup string s lookup s set lookup string
set the name of the lookup object the database object that
public void set max length int new max length max length new max length set max length int
set the maximum recommended length of the input object
public void clear output cache output cache null
clear the output cache
public void set name string new name if config manager is parameter reserved word new name throw new illegal argument exception you cannot have a input name of new name it is a reserved word check com jcorporate expresso core misc config manager for a full list of reservered words super set name new name
sets the inputs name
public void set type string new type if new type null super set type c else super set type new type
sets the input type
public void set valid values vector v valid values v set valid values vector
method for the controller to specify the valid values for this
public action forward get action forward return my forward
gets the action forward that the controller should forward or redirect to
public void set action forward action forward forward this my forward forward
sets the action forward that the controller should forward or redirect to
public string get forward name return get style
gets the logical name of the action forward that the controller
public void set forward name string forward name set style forward name
sets the logical name of the action forward that the controller
public boolean has errors throws controller exception error collection errs get errors if errs null return false if errs get error count 0 return true return false
determine whether response has errors
public void set initial state string new initial state if string util not null new initial state equals if initial states get get class get name null if get state new initial state null initial states put get class get name new initial state else throw new illegal argument exception unable to set initial state to new initial state this is not a valid state for this controller set initial state string
set what state to invoke if no state parameter is set
public boolean has errors string label throws controller exception error collection errs get errors if errs null return false if errs get errors label has next return true return false
determine whether response has errors of the particular label
public vector get blocks vector elements new vector 16 controller element t null for enumeration e get nested elements e has more elements t controller element e next element if t instanceof block elements add t return elements
retrieve a list of blocks contained within this block
public block get block string block name return block this get nested map get block name
retrieve a newsted block by name
public void restore form throws controller exception get default form restore form get request
restore the controller form
protected void set schema string schema class string util assert not blank schema class must specify a non blank schema stack stack stack schemas get get class get name if stack null stack new stack we have to push expresso on because of items such as must login first stack push com jcorporate expresso core expresso schema class get name if stack contains schema class stack push schema class schemas put get class get name stack set schema string
tell this controller object what schema it belongs to
public input get input string input name return input this get nested map get input name
retrieve a nested input by name
public output get output string output name return output this get nested map get output name
retrieve a nested output by name
public transition get transition string transition name return transition this get nested map get transition name
retrieve a nested transition by name
public string get form encoding return get attribute form encoding get form encoding
retrieve the form encoding attribute of this block
public string get form method string form method string util not null get attribute form method if form method equals ignore case get form method post return form method get form method
get the form method whether get or post
public transition get form transition return form transition get form transition
get the form transition
public vector get inputs vector elements new vector 16 controller element t null for enumeration e get nested elements e has more elements t controller element e next element if t instanceof input elements add t return elements
get the nested inputs
public int get num contents return get nested size get num contents
get the number of elements contained within the nested block
public vector get outputs vector elements new vector 16 controller element t null for enumeration e get nested elements e has more elements t controller element e next element if t instanceof output elements add t return elements
retrieve a list of outputs nested wtihin this block
protected void set schema class schema class if schema class null throw new illegal argument exception parameter schema class must not be null set schema schema class get name
identical to set schema string but provides a typesafe way of passing
public vector get transitions vector elements new vector 16 controller element t null for enumeration e get nested elements e has more elements t controller element e next element if t instanceof transition elements add t return elements
retrieve a list of transitions nested wtihin this block
public boolean is form if string util not null get attribute form equals true return true else return false is form
return true if the form attribute for this block has been set
public fast string buffer to xml fast string buffer stream stream append block name string util xml escape this get name n stream super to xml stream stream to nested xml stream nested outputs get outputs stream to nested xml stream nested inputs get inputs stream to nested xml stream nested transitions get transitions stream to nested xml stream nested blocks get blocks stream append block return stream
concert the object to an xml fragment
protected string get file name string param name return my request get file name param name
if a particular parameter represents an uploaded file which can be determined
public string get file name string param name if is file parameter param name return string file params get param name else return null
if a particular parameter represents an uploaded file which can be determined
protected string get attribute string attrib return string my request get attrib attrib
get attribute from request
protected void set schema string schema class string util assert not blank schema class must specify a non blank schema if schema stack null schema stack new stack schema stack push schema class
tell this controller object what schema it belongs to
public void set attribute string attrib string val if attributes null attributes new hash map 3 attributes put attrib val set attributes string string
set the named attribute of this controller to the given value