input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public servlet get calling servlet return my calling servlet
|
gets the calling servlet
|
public void set controller class string new class my controller class new class
|
set public so that test classes can get into it
|
public string get controller class return my controller class
|
retrieve the controller class name
|
public servlet request get servlet request return my servlet request
|
gets the servlet request object
|
public servlet response get servlet response return my servlet response
|
gets the servlet response object
|
public http servlet request get http servlet request return http servlet request my servlet request
|
gets the http servlet response object
|
public http servlet response get http servlet response return http servlet response my servlet response
|
gets the http servlet response object
|
public dbconnection pool get parent pool return parent pool
|
retrieve what dbconnection pool owns this pool
|
public void set custom response boolean new custom custom response new custom
|
if absolutely necessary the controller can access the servlet response
|
public void set data context string new context try set dbname new context catch dbexception ex string error message invalid new context name new context ex get message log error error message ex throw new illegal argument exception error message
|
sets the data context that this object is residing in
|
public object clone servlet controller request scr servlet controller request super clone scr my calling servlet this my calling servlet scr my servlet request this my servlet request scr my servlet response this my servlet response scr my mapping this my mapping return scr
|
method that returns a copy of itself with all the fields properly filled
|
public boolean is custom response return custom response
|
did this controller call directly manipulate the servlet response and
|
public void set parent pool dbconnection pool new parent pool this parent pool new parent pool
|
sets the parent pool
|
public vector get contents return get nested get contents
|
returns the contents of this controller element
|
public void add nested controller element e if nested null nested new vector 3 if mapped nested null mapped nested new hash map 3 nested add element e mapped nested put e get name e e set parent this controller response cr get controller response if cr null e set controller response get controller response add nested controller element
|
add a nested item to this element
|
private vector add nested from controller element t vector v new vector vector t vec t get nested or null if t vec null return v controller element one element null for enumeration e t vec elements e has more elements one element controller element e next element v add element one element for enumeration e2 add nested from one element elements e2 has more elements v add element e2 next element for each nested element return v add nested from controller element
|
internal method used by all nested to gather all of the items nested
|
public string get dbname throws controller exception return get data context get dbname
|
get the database from the request if there is a request available
|
public vector all nested vector v new vector for enumeration e add nested from this elements e has more elements v add element e next element return v all nested
|
return the nested items from this item
|
public string get data context throws controller exception if data context null return data context return default
|
get the database from the request if there is a request available
|
public string get attribute string att if attributes null return return string util not null string attributes get att get attribute string
|
get the value of an attribute for this controller element item
|
public hash map get attributes if attributes null attributes new hash map return attributes get attributes
|
return the entire hashtable of attribute values for this controller element
|
public void set form cache throws controller exception get default form save form get request
|
automatically find all input fields and put them in the form cache
|
public string get data context if db key null db key equals try set dbname default catch dbexception de log error unable to set database to default de return db key
|
returns the name of the currently set data context
|
public object get attribute string field name throws controller exception if form attributes null return null if field name null field name length 0 throw new controller exception field name cannot be null here return form attributes get field name
|
returns the attribute that has been set for a particular field or
|
public hashtable get attributes return form attributes
|
returns the attributes hashtable
|
public boolean is dbconnection available string data context try dbconnection pool pool dbconnection pool get instance data context dbconnection connection pool get connection security check try controller security cs new controller security secured dbobject system account cs set data context data context cs count finally if connection null connection release catch dbexception ex return false return true
|
is a proper database connection available
|
public string get description return string util not null description get description
|
get the description of this element
|
public int get display length return display length get display length
|
get the display length suggested by the controller for this
|
public hashtable get form cache throws controller exception return get default form get fields
|
get the entire form response cache hashtable creation date 7 19 00
|
public string get label return string util not null label get label
|
get the label of this element
|
public int get lines return lines get lines
|
get the suggested number of lines for this item
|
public string get form cache string field name throws controller exception return string util not null get default form get field field name
|
fetch the requested field from the response cache
|
public string get name return string util not null name get name
|
get the name of this element
|
public string get title return string util not null name
|
get the name of this element
|
public map get all attributes if attributes null return new hash map else return collections unmodifiable map attributes
|
returns a b read only b map containing all the current attributes set
|
public vector get nested if nested null nested new vector return nested get nested
|
return the entire vector of nested elements in this element
|
public int get nested count return get nested size get nested count
|
a method to support jstl 1
|
protected void add state state new state try new state set controller this catch controller exception ce log error unable to set controller ce hashtable my state list hashtable states get get class get name if my state list null my state list new hashtable states put get class get name my state list my state list put new state get name new state add state state
|
the constructor of the child object should call add state to define
|
public vector get nested or null if nested null return null return nested
|
same as get nested
|
public iterator get nested iterator return get nested iterator
|
retrieve the iterator to all tested objects
|
public locale get locale throws controller exception if response locale null return locale get default return response locale
|
retrieve the locale for the request
|
public controller element get parent return parent get parent
|
return the parent of this element e
|
public output get output string output name throws controller exception valid state if output cache null return output output cache get output name return null
|
get a specific output item
|
public void set attribute string attrib string val if attributes null attributes new hash map attributes put attrib val set attributes string string
|
set the named attribute of this output to the given value
|
public void set description string new description description new description set description string
|
used by the controller to set the description of this element
|
protected transition get controller chaining transition return controller chaining transition
|
return the transition that will be executed once this controller
|
public void set display length int new length display length new length set display length int
|
set the suggested display length in caracters for this
|
public void set label string new label label new label set label string
|
set a label for this element
|
protected transition get controller security transition return controller security transition
|
return the transition that will be executed if any state in this controller
|
public void set lines int new lines lines new lines set lines int
|
set the display number of lines suggested for this item
|
public error collection get errors throws controller exception error collection errs error collection get request get session get attribute globals error key return errs
|
retrieve the error collection for this response
|
public void set name string new name name new name set name string
|
used by the controller to set the name of this element
|
public string get parameter string param name throws controller exception return get request get parameter param name
|
retrieve the parameter
|
public void set parent controller element t parent t set parent controller element
|
set the parent of this element e
|
public string get initial state return string initial states get get class get name get initial state
|
get the initial state in a controller
|
public controller request get request if my request null throw new illegal state exception controller response set request must be set before calling get request return my request
|
retrieve the controller request associated with this object
|
public map get nested map if mapped nested null mapped nested new hash map return mapped nested
|
return a map of all nested elements keyed by controller element name
|
public string get request path return my request path
|
returns the request path set earlier
|
protected schema get schema instance return schema factory get instance get schema this get schema
|
retrieve a full instance of the schema object that is associated with
|
protected void reset controller default implementation does nothing
|
this method will be called upon entry to a controller
|
public void set field name string new value field name new value
|
sets the field name for this error class
|
public string get requested state return requested state
|
retrieve the requested state
|
protected string get string string string code return this get string string code new object get string string
|
convenience version of the above with no arguments
|
public string get schema if schema stack null schema stack is empty return com jcorporate expresso core expresso schema else return string schema stack peek
|
get the name of the schema object that this controller belongs to
|
public void add nested output o super add nested o add nested output
|
add a new nested output item to this item
|
public void clear used count used count 0 clear used count
|
clears the used count
|
public string get alignment return alignment get alignment
|
get the suggested alignment for this item
|
public string get content return string util not null content get content
|
get the contents of this output the string value that this
|
public string get key return key get key
|
get the name of this output element
|
public string get style return style get style
|
return the suggested style for displaying this output item
|
protected string get string string string code object args stack s stack schemas get this get class get name if s null s is empty return messages get string get schema string code args else for iterator i s iterator i has next try string schema string i next return messages get string schema string code args catch illegal argument exception ex if i has next throw ex throw new illegal argument exception unable to locate string string code for any schema get string string object
|
pass on a call to retrieve an appropriate localized string from the
|
public void set schema stack java util stack schema stack this schema stack schema stack
|
sets the schema stack for message bundle retrieval
|
public void set error message string new value error message new value
|
sets the error message for this class
|
public void set attribute string attrib name object attrib value if request null throw new illegal argument exception httppersistent session not initialized correctly request set attribute attrib name attrib value
|
sets an attribute on the servlet request
|
public string get title return no title get title
|
return the title of this controller
|
public object get attribute string attrib name if request null return null return request get attribute attrib name
|
retrieves the object from the request context
|
public void set client attribute string attrib name string attrib value cookie c1 try if attrib value null attrib value length 0 c1 new cookie attrib name cookie util cookie encode attrib value c1 set max age 2592000 30 days else c1 new cookie attrib name c1 set max age 0 c1 set path response add cookie c1 catch chained exception ce log error ce throw new illegal argument exception ce get message
|
sets a cookie in the clients system
|
public string get client attribute string attrib name cookie cookies request get cookies try if cookies null for int i 0 i cookies length i string name string util not null cookies i get name string value string util not null cookies i get value if name equals ignore case attrib name return cookie util cookie decode value for each cookie if there are any cookies catch exception ce log error ce throw new illegal argument exception ce get message return null
|
retrieves a value of a cookie set on the clients system
|
public enumeration get peristent attribute names try return generic session get attribute names request catch servlet exception se log error se return null
|
retrieves all attribute names from the session context
|
public string get string string string code throws controller exception object args return get string string code args
|
convenience version of the above with no arguments
|
public void set persistent attribute string attrib name object attrib value if attrib value null throw new illegal argument exception value must not be null if attrib value instanceof string attrib value new serializable string string attrib value if attrib value instanceof serializable try generic session set attribute request attrib name serializable attrib value catch servlet exception se log error se throw new illegal argument exception unable to store value in session se get message else throw new illegal argument exception attribute value object must be serializable attrib value get class get name is not serializable
|
saves an attribute to the actual session rather than simply the
|
public object get persistent attribute string attrib name try return generic session get attribute request attrib name catch servlet exception se log error se return null
|
retrieves the object from the session context
|
public void set request http servlet request req request req
|
set the request object so we can get to the session
|
public void invalidate try generic session invalidate request catch servlet exception ce log error ce request null
|
clear out the session
|
public void remove attribute string attrib name request remove attribute attrib name
|
clears an attribute from the request context
|
public void remove persistent attribute string attrib name try generic session remove attribute request attrib name catch servlet exception se log error se
|
clears an attribute from the session context
|
public void set attribute string attrib name object attrib value if attrib value null attributes remove attrib name else attributes put attrib name attrib value
|
sets an attribute that is valid for the duration of the request
|
public object get attribute string attrib name return attributes get attrib name
|
retrieves the object from the request context
|
public string get client attribute string attrib name return null
|
retrieves a value of a cookie set on the clients system
|
public map get persistent attributes return new hash map persistent attributes
|
retrieves the persistent attributes table
|
public void set persistent attributes map new attributes persistent attributes new hashtable new attributes
|
sets the persistent attributes that may have been saved across instances
|
public enumeration get peristent attribute names return persistent attributes keys
|
retrieves all attribute names from the session context
|
public void set persistent attribute string attrib name object attrib value if attrib value null attributes remove attrib name else persistent attributes put attrib name attrib value
|
saves an attribute to the actual session rather than simply the response
|
public object get persistent attribute string attrib name return persistent attributes get attrib name
|
retrieves the object from the session context
|
public void invalidate attributes new hashtable persistent attributes new hashtable
|
clear out the session
|
public void remove attribute string attrib name attributes remove attrib name
|
clears an attribute from the request context
|
public void remove persistent attribute string attrib name persistent attributes remove attrib name
|
clears an attribute from the session context
|
public void set style string new style style new style
|
use set style to specify a different struts action forward to send the
|
protected boolean is final state string new state if final state null return false return final state equals new state
|
return true if the passed in state was added to this controller
|
public void destroy config manager set controller factory null super destroy
|
remove myself as a controller factory
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.