input
stringlengths
10
828
output
stringlengths
5
107
public string get default value return param default value get default value
return the default value for this parameter
public string get descrip return param descrip get descrip
return the description of this parameter
public string get type return param type get type
return the type code for this parameter
public string get dbname return db name get dbname
retrieve the db name
public vector get default params return vector default params clone get default params
return a vector of default parameter objects
protected page get page return my page get page
return a reference to the current page
public string get title return report title get title
return the title of this report
public void set default string new value default value new value
set the default value for the string
public void print report output stream os throws report exception java io ioexception try java io print writer print writer new java io print writer os this display print writer print writer flush catch html exception ex throw new report exception error producing report ex
print the report page
public void set report parameters map parameters if my params null my params new hash map parameters size put in default parameters and set in the new ones if default params null for iterator i this default params iterator i has next report page param param report page param i next my params put param get code param get default value for iterator i parameters key set iterator i has next string key string i next string value string parameters get key if value null value length 0 my params put key value
sets the report parameters
protected map get report parameters return my params
protected quot getter quot function so derived classes can get the
public void set data context string new data context db name new data context
sets the data context for this report
protected string get data context return db name
retrieve the data context for this report
public string get report mime type return text html
retrieve the report mime type
public string get report file extension return html
retrieve the recommended file extension for the report
public void interrupt done true synchronized write lock if cur process null cur process get wrapped object kill super interrupt
interrupt and cause the thread to exit
public void run linked list queue parent get queue while done synchronized queue if queue size 0 try queue wait catch interrupted exception ex if done return continue synchronized write lock cur process default async processor process wrapper queue remove first cur process process synchronized write lock cur process null
run the process wrapper in this thread
public object get status if original process null return original process get status return null
retrieve the status object
public async process get original process return original process
get the asynchronous process
public int get ticket id return ticket id
retrieve the ticket id
public int hash code return ticket id
custom hash code for this class
public string to string return integer to string ticket id
custom to string behavior
public async process result get process result async ticket ticket id synchronized all processes process wrapper wrapper get process wrapper ticket id if wrapper null log warn error getting process wrapper for ticket ticket id to string return null if wrapper get result get status code async process result status complete all processes remove ticket id return wrapper get result
retrieve the result of the process
protected category get log return log
utilize this function for quick and easy logging for test cases
public void run test result result if test schemas null test schemas new vector try add schema test schemas catch exception e e print stack trace system out println error adding schemas e get message super run result clean up
runs the tests and collects their result in a test result
public void setup parameters string state web request request the state state request add parameter style xml request add parameter xsl none request add parameter state state
called to set the appropriate states for the controller also makes sure
synchronized static public void add reference schema s schema manager add reference s false
add a reference to a schema
synchronized static public void force schema delete schema s read only set remove s get class get name
forces the schema deletion even if the schema is marked read only
public node list get nodes document d string xpath node list nl null try nl xpath api select node list d xpath catch javax xml transform transformer exception trex log error error performing transformation trex return nl
returns a dom node list given the xpath expression and the document given
public void run test result result super run result clean up
runs the tests and collects their result in a test result
public void set primary group user group group throws dbexception user preference pref new user preference pref set data context this get data context pref set field user preference pref code user preference def primary group pref pref set field user preference class name user preference def any class pref set field user preference expuid this get uid pref set field user preference pref value group get group name pref add or update
set the primary group of this user
public string get title return job security matrix get title
return the title of this job
public string get title return error handling get title
return the title of this controller
public void set validation handler class clazz throws auth validation exception try clazz new instance catch illegal access exception ex throw new auth validation exception illegal access loading validation handler object clazz get name ex catch instantiation exception ex throw new auth validation exception validation handler object clazz get name cannot be instantiated ex validation class name clazz get name
method to set the app specific validation handler associated with this
public string get title return edit user preferences get title
return the title of this controller
public string get title return database object security matrix get title
return the title of this controller
public string get title return cache control get title
return the title of this controller
protected void delay login delay thread delay
function called to suspend thread execution for x many seconds before
public void log invalid login attempt string msg controller request request string remote ip try remote ip servlet controller request request get servlet request get remote addr catch class cast exception cce we aren t running in a servlet container we can t get the remote ip address fast string buffer fsb new fast string buffer msg length 32 fsb append msg if remote ip length 0 fsb append n client ip address fsb append remote ip log warn fsb to string
does a warning log to log the invalid login request
public string get title return queue job get title
return the title of this controller
protected void add show transition expresso component component block parent throws controller exception transition t new transition show container transition component get meta data get name configuration class configuration state show component t add param runtime name lc get path component parent add t
adds the transition to each block given each component to show any
public string get title return authorization processing
a short title for this controller used mainly in ui screens
private root container interface get root container interface controller request request throws controller exception root container interface rci root container interface request get session get persistent attribute runtime key if rci null try rci component factory get instance construct root container catch com jcorporate expresso kernel exception configuration exception ex log error unable to construct root of the new expresso runtime ex throw new controller exception unable to construct root of the new expresso runtime ex request get session set persistent attribute runtime key rci return rci
retrieve the root container interface for what were configuring
public string get title return administer controller security get title
return the title of this controller
private void remove http servlet request request todo how to
remove lookup session variable
protected void set fields param string new param if new param null fields param new param else fields param set fields param string
set a encoded fields parameter
protected record paginator get record paginator throws controller exception if paginator null paginator new record paginator paginator set count records true paginator set page number get page number return paginator
gets the currently used paginator
protected string decode string orig string new string orig int pos while pos new string index of 20 1 system out println pos pos new string new string substring 0 pos new string substring pos 3 while pos new string index of 2 b 1 system out println pos pos new string new string substring 0 pos new string substring pos 3 return new string decode string
remove 20 from a string replacing it with spaces
public void begin dbmenu test web request the request try super setup parameters show dbmenu the request super log in the request catch exception e e print stack trace fail e get message
the next three classes are for testing the prompt state
public void test dbmenu test try controller response response super controller process assert true must get a non null controller response object response null catch exception e e print stack trace fail e get message
executed on the server side
public void begin prompt self register web request the request try super setup parameters prompt self register the request the request add parameter db context test system initializer get test context catch exception e e print stack trace fail e get message
makes sure that the prompt self register dialog is getting displayed properly
public void test prompt self register try controller response response super controller process assert true must get a non null controller response object response null catch exception e e print stack trace fail e get message
makes sure that the registration form is displaying properly
public string get title return database maintenance
retrieve the title of this controller
public void test prompt state throws exception controller response response super controller process assert true must get a non null controller response object response null input i response get input db context assert true must have a db context input object i null verify login form response
executed on the server side
private void verify login form controller response response throws exception input i response get input login name assert true must have a login name input object i null i response get input password assert true must have a password input object i null i response get input remember assert true must have a remember input object i null transition t response get transition process login assert true must have a process login transition object t null t response get transition process login assert true must have a prompt register transition object t null return
verify login form is a helper function that verifies the expected basic
public void begin test bad login web request the request throws exception super setup parameters process login the request the request add parameter login name dummy false password
this function makes sure that errors are proper for processing a bad
protected data object get data object throws controller exception if my data object null throw new controller exception dbobject is not initialized return my data object
retrieve the data object
public void begin prompt change password state web request the request throws exception super setup parameters prompt change password the request super log in the request
tests to make sure that the change password dialog is getting correctly
public void test prompt change password state throws exception controller response response super controller process assert true must get a non null controller response object response null input i response get input old password assert true old password input must exist i null i response get input password assert true new password input must exist i null i response get input password verify assert true password verify input must exist i null transition t response get transition process change password assert true process change password transition must exist t null
tests the prompt change password state
private void error notify string msg try will email new event get job queue entry get data context syserror get class get name unable to run validation job msg job get job number user get user false catch exception e log error e error notify
notification of job failires
public string get title return validation job
the name of this job used typically in ui screens
public string get title return clear old validation entries
retrieve the friendly title name of the job
public string get title return controller job get title
retrieve the job title
private boolean determine mime type throws dbexception string base name file util get base this get field fld file path name file util get extension this get field fld file path name if base name null base name length 0 set mime as unknown return false mime types mt mime types get mime type base name this get data context if mt null set mime as unknown return false this set fld mime type mt get data field mime types fld mimenumber as string return true
function that examines the file path name and automatically determines the
private void set mime as unknown throws dbexception mime types mt new mime types secured dbobject system account mt set mime types fld mimetype application unknown if mt find throw new dbexception unable to determine mime type of this get field fld file path name and cannot find the application unknown mime type this set fld mime type mt get data field mime types fld mimenumber as string
for mimetypes that we cant auto detect we set it to unknown
protected string get key parameter data object src dbobj throws controller exception fast string buffer key param fast string buffer get instance try boolean need pipe false string one key name null for iterator keys src dbobj get meta data get key field list array iterator keys has next one key name string keys next if need pipe key param append need pipe true key param append get data object get data field one key name as string return key param to string catch dbexception de throw new controller exception de finally key param release key param null
create a key parameter for locating the dbobject
public int get expected default population string country codes this get country codes return country codes length
useful method for unit testing to make sure that everything got added during
protected data object get my data object return my data object
retrieves an instance of my dataobject instance
protected string get controller name throws controller exception if controller name null following added by pete in order to share mvc traits controller name string this get my data object get attribute mvc controller if controller name null controller name this get controller get class get name return controller name
retrieve the name of the controller we use
public vector get values throws dbexception return get values default auditlog code auditlog des
provide a list of audit codes for other objects to use
public dbobject get this dbobj throws dbexception return new audit log l get this dbobj
standard method to create a new copy of this
public int get expected default population string internet codes this get internet codes return internet codes length super get expected default population
useful method for unit testing to make sure that everything got added during
public int get expected default population return restricted ids length
useful method for unit testing to make sure that everything got added during
public dbobject get this dbobj throws dbexception return new audit log get this dbobj
standard method to create a new copy of this
public string get required class return org w3c dom document
retrieve a class that must exist in the classpath for this to work
public void output document node node throws ioexception if omit xml decl node get node type node element node println xml version 1 0 println print tree node
output the document whose root element is the specified node
private string lookup entity int ch if ch 0 ch entities size return string entities get ch return null
lookup the entity
public void set writer writer out this out out
set the output writer
public writer get writer return this out
get the output writer
public void set indent size int indent size indent indent length 0 int inc if indent char t inc 4 else inc 1 for int i 0 i indent size i indent indent char indent length inc
set the indentation size to the number of characters specified using the
public void set indent char indent char int size indent char indent char set indent size size
set the indent semantics
public void close writer try this out close catch ioexception ioe oe print stack trace
closes the output writer ignoring any errors recieved
private int lookup entity to char int nlook if lookup entity nlook if pushahead len 0 pushahead len return pushahead pushahead offset return 1
lookup the entity and return the first char
public void set file file file throws ioexception file parent directory file get parent file if parent directory null parent directory exists parent directory mkdirs set writer new buffered writer new file writer file
creates an output writer that will create the file specified and any
public void set file string filename throws ioexception set file new file filename
creates an output writer that will create the file specified and any
private boolean lookup entity int nlook string lookahead str new string lookahead 0 nlook string entity string entities get lookahead str if entity null entity get chars 0 entity length pushahead 0 pushahead offset 0 pushahead len entity length return true return false
lookup the entity
public void print string string string indent throws ioexception print indent if string null print string trim
prints the string to the output at an indentation
public void print string string throws ioexception this out write string
prints the string to the output
public void println string string throws ioexception print string print newline
prints the string to the output following it with a newline
protected string get indent int col string indent go by twos to improve performance string indent2x this indent this indent for int i col 0x7ffffe i 0 i 2 indent indent2x if col 0x01 1 indent this indent return indent
get the normal indentation for a level
protected void print tree node node int col throws ioexception int old column column col print tree node column old
output the node and children at the specified indentation level
protected boolean print formatted string value throws ioexception if value null value length 0 return false value format para text value trim int len get indent length column value length if len max format len println println value return true else print value return false
print the text formatted for a tag that does not place significance on
protected string convert newline string text convert msdos crlf to a lf text string util replace text r n n convert lf to the set newline seq text string util replace text n newline return text
convert newlines to what we want
public void warning saxparse exception ex log warn get location string ex ex get message
issue a warning on parsing errors
private string get location string saxparse exception ex fast string buffer str new fast string buffer 128 string system id ex get system id if system id null int index system id last index of if index 1 system id system id substring index 1 str append system id str append str append ex get line number str append str append ex get column number return str to string get location string saxparse exception string
returns a string of the location
public void set name java lang string new name name new name set name java lang string
insert the methods description here
public void set value java lang string new value value new value set value java lang string
insert the methods description here
private string get string string key string util assert not blank key you must specify a key for the string locale l locale page context get attribute messages locale key page context session scope string schema class string page context get attribute ex message tag schema key page context page scope try if schema class null object args return messages get string schema class l key args else return messages get string l key catch servlet exception se return key
i18n method returns the given string as defined in the message bundles
public void set class value java lang string new class value class value new class value set class value java lang string
used for setting the class value for buttons
public void set onclick java lang string new value onclick new value set onclick java lang string
setter method for javascript onlick