input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
protected void init throws exception do nothing
|
to be overridden by subclasses
|
public void init plugin config config plugin context context throws exception param config param config get param config name string name param null branch param get value context set filter class name get class
|
the plugin registers its class as a filter class
|
public void init plugin config config plugin context context throws exception param config param config get param config name string name param null cancel param get value context set filter class name get class
|
the plugin registers itself as a filter factory
|
public void init plugin config config plugin context context throws exception param config param config get param config name string name param null no cache param get value context set filter class name get class
|
register the receivers class as filter class
|
private void merge control config impl other throws config exception if exceptions null exceptions other exceptions else exceptions merge other exceptions if dispatches null dispatches other dispatches else dispatches merge other dispatches if actions null actions other actions else actions merge other actions if plugins null plugins other plugins else plugins merge other plugins
|
merge other control element into the receiver
|
protected void init throws config exception super init if action null path null throw new config exception either path or action must be specified in dispatch to inline string if path null module null throw new config exception cannot specify module with path in dispatch to inline string
|
check that exactly one of code action code and code path code
|
public void set path string string path string
|
set resource path
|
public void set redirect boolean value redirect value
|
set redirection flag
|
public void set class name string string class name string
|
set plugin class name
|
public control config parse url urls throws config exception return control config parse all urls
|
parse control configuration files
|
protected schema resolver get schema resolver return schema resolver
|
answer code null code
|
protected void init throws config exception super init initialize global dispatches and exceptions control config impl control control config impl get nearest ancestor control config impl class if control null global dispatches control get dispatches config global exceptions control get exceptions config make sure path is syntactically correct if path starts with log warn prepending to action path to inline string path path
|
do the following
|
public void set when string string when string
|
set when property
|
protected void do get http servlet request request http servlet response response throws servlet exception ioexception process request response
|
process get request
|
protected void do post http servlet request request http servlet response response throws servlet exception ioexception process request response
|
process post request
|
private void parse mappings input stream input throws servlet exception prepare a digester to scan the web application deployment descriptor digester digester new digester digester set namespace aware true digester set validating false configure the processing rules that we need digester add call method web app servlet mapping add 2 digester add call param web app servlet mapping servlet name 0 digester add call param web app servlet mapping url pattern 1 digester push this try digester parse input catch exception e throw new servlet exception could not parse web inf web xml e
|
parse web application deployment descriptor
|
public string get path string action string buffer s new string buffer if prefix null s append prefix if action starts with s append if extension null int query action index of if query 0 insert extension before query string s append action substring 0 query s append extension s append action substring query else int anchor action index of if anchor 0 insert extension before anchor s append action substring 0 anchor s append extension s append action substring anchor else s append action s append extension else s append action return s to string
|
answer path for specified action
|
public string get action http servlet request request string action get servlet path request if prefix null if action starts with prefix return null action action substring prefix length if extension null string info get path info request if info null action info else if action ends with extension return null action action substring 0 action length extension length return action length 0 action
|
get the action path from specified request
|
public class get filter class string name return class filters get name
|
get filter class for specified name
|
public void set filter class string name class clazz throws config exception if filters contains key name throw new config exception filter name already exists if clazz is interface filter class is assignable from clazz throw new config exception bad filter class clazz get name filters put name clazz
|
set filter class for specified name
|
public dispatcher get dispatcher string name return dispatcher dispatchers get name
|
get dispatcher for specified name
|
public void set dispatcher string name dispatcher value throws config exception if dispatchers contains key name throw new config exception dispatcher name already exists dispatchers put name value
|
set dispatcher for specified name
|
private command chain iterator configs action last throws exception if configs has next filter config config filter config configs next class clazz null if config get name null clazz plugin context get filter class config get name if clazz null throw new config exception unknown filter name in config to inline string else clazz context get class loader load class config get class name filter filter filter clazz new instance filter init config context return new filtered command config filter chain configs last else return last
|
build filter chain
|
public dispatcher get default dispatcher return dispatcher
|
get the default dispatcher
|
public void set class loader class loader loader throws config exception if this loader null throw new config exception module class loader must not be set more than once this loader loader
|
set module class loader
|
public class get default action class return default action class
|
get the default action class
|
public void set default action class class clazz throws config exception if default action class initial default action class throw new config exception default action class already set if clazz is interface action class is assignable from clazz throw new config exception bad action class clazz get name default action class clazz
|
set the default action class
|
private action command find action command string path action command command action command commands get path while command null path length 1 try prefix patterns command action command commands get path path path substring 0 path last index of if command null command action command commands get return command
|
lookup action command
|
public object format http servlet request request form data bean throws exception string property get field config get property object value bean get property property if is array return format array request value else return format scalar request value
|
format field property from form data
|
public string format http servlet request request form data bean int index string not available result throws exception string property get field config get property object value bean get property property if is array object values object value if values null index values length return not available result return format scalar request values index else if index 0 return format scalar request value else throw new index out of bounds exception bad index for scalar index
|
format ith component of field property from form data
|
public string get name return get field config get property
|
get input name
|
private void init property config property object bean if log is trace enabled log trace property get name property get value try property set bean evaluator catch exception e log error could not set property bean get class get name property get name e
|
set bean property
|
private string get key validate config config locale locale string key config get id if locale null string s locale to string if s length 0 key locale to string return key
|
get key used for cache lookups
|
public form create form form config config locale locale return new form impl this config locale
|
create form instance
|
public assert config get config return config
|
get underlying configuration
|
protected converter get converter return converter
|
get the converter
|
protected validate sequence config get validate sequence config return config
|
get the underlying configuration element
|
protected format get format if format null set format create format locale get default return format
|
get format instance
|
public void localize locale locale set format create format locale
|
localize the receiver
|
public void set attribute string string attribute string
|
get the attribute property
|
public void set property string string property string
|
set the property property
|
protected format create format locale locale number format f number format get instance locale adapt f return f
|
create and adapt new number format instance
|
public string get false string return false string
|
get the false value property
|
protected void adapt number format format format set grouping used grouping used format set parse integer only parse integer only format set minimum fraction digits minimum fraction digits format set maximum fraction digits maximum fraction digits
|
adapt number format instance sets code grouping used code
|
public void set scope string string scope string if scope equals request scope request else if scope equals session scope session else if scope equals module scope module else if scope equals application scope appl else scope unknown
|
set the scope property
|
public boolean get default return parsed null or empty
|
get the default property
|
public string get true string return true string
|
get the true value property
|
public void set false string string new false string false string new false string
|
set the false value property
|
public void set default boolean value parsed null or empty value
|
set the default property
|
public boolean is sharable return true
|
this converter is thread save so answer code true code
|
public boolean get grouping used return grouping used
|
get the grouping used property
|
public void set true string string new true string true string new true string
|
set the true value property
|
public void set maximum fraction digits int value maximum fraction digits value
|
set the maximum fraction digits property
|
public void set minimum fraction digits int value minimum fraction digits value
|
set the minimum fraction digits property
|
protected void merge validators config impl other throws config exception if other null iterator configs null configs other get matcher configs while configs has next add matcher config impl configs next configs other get converter configs while configs has next add converter config impl configs next configs other get checker configs while configs has next add checker config impl configs next
|
merge other validations element into the receiver
|
protected boolean is defined return defined
|
answer code true code iff the code value code property has been set
|
private void add field by property field config field throws config exception if field configs by property map contains key field get property throw new config exception duplicate property field get property in field to inline string field configs by property map put field get property field
|
add field to field by property lookup
|
protected void init throws config exception super init iterator fields get field configs while fields has next add field by property field config fields next iterator inputs get input configs while inputs has next input config input input config impl inputs next fields input get field configs while fields has next add field by property field config fields next
|
initialize field by property lookup
|
public void add validator property config impl value properties put value get name value
|
add property element
|
public void set final boolean ignored throws config exception throw new config exception attribute final is not allowed inside validate
|
throws an exception
|
public void add validate property config impl value properties put value get name value
|
add property element
|
public void set key string value key value
|
set resource key
|
protected void init2 throws config exception super init2 iterator iter forms configs values iterator while iter has next forms config impl value forms config impl iter next forms configs by locale put value get locale value
|
initialize forms by locale lookup
|
public void set bundle string string bundle string
|
set resource bundle
|
private string get forms key forms config impl value string buffer key new string buffer if value get language null key append value get language if value get country null key append key append value get country if value get variant null key append key append value get variant return key to string
|
create forms key
|
private form config get form config string name locale locale forms config forms config forms config forms configs by locale get locale if forms config null form config form config forms config get form config name if form config null return form config return null
|
lookup form by name and locale exact match
|
private locale get cached locale string language string country hash map by country hash map locales by language get language if by country null locales by language put language by country new hash map locale locale locale by country get country if locale null by country put country locale new locale language country return locale
|
get locale specified by language and country codes from locale cache
|
protected void merge forms config impl other throws config exception if other null iterator configs other get form configs while configs has next add form config impl configs next
|
merge other forms into receiver
|
private locale create locale throws config exception if language null if country null variant null throw new config exception must not specify country or variant without language in to inline string return new locale else if country null if variant null throw new config exception must not specify variant without country in to inline string return new locale language else if variant null return new locale language country else return new locale language country variant
|
create locale from language country and variant settings
|
protected void init throws config exception super init if get parent instanceof input config impl input input config get parent
|
initialize link to parent input element
|
public string get name return input null property input get name
|
answer input name
|
public forms root config parse url urls throws config exception return forms root config impl parse all urls
|
parse forms configuration files
|
public void set relax string relax this relax relax
|
set the relax expression
|
public form context get context return context
|
get the context
|
public void set context form context context this context context
|
get the context
|
protected string get rows attribute throws exception return rows
|
get rows attribute
|
protected string get selected attribute throws exception if get value null default option mode return select tag get group model get selected count 0 null selected return super get selected attribute
|
if no value attribute has been set select this option if
|
protected string get cols attribute throws exception return cols
|
get cols attribute
|
protected string get disabled attribute return disabled null null disabled
|
get disabled attribute
|
protected string get onselect attribute throws exception return onselect
|
get onselect attribute
|
protected string get selected attribute throws exception boolean select false group model model select tag get group model if model is selected get value attribute select true else if model is selection available selected null select true return select selected null
|
get selected attribute
|
protected string get type attribute return type
|
get type attribute
|
protected string get name attribute throws exception return name
|
get name attribute
|
protected string get accesskey attribute return accesskey
|
get accesskey attribute
|
protected string get checked attribute throws exception group model model group tag get group model boolean check false if model is selected get value attribute check true else if model is selection available checked null check true return check checked null
|
get checked attribute
|
protected string get alt attribute return alt
|
get alt attribute
|
public void set disabled string string disabled string
|
set disabled property
|
protected string get maxlength attribute throws exception return maxlength
|
get maxlength attribute
|
protected string get readonly attribute return readonly null null readonly
|
get readonly attribute
|
public void set selected string string selected string
|
set selected property
|
protected string get tabindex attribute return tabindex
|
get tabindex attribute
|
protected string get checked attribute throws exception string value get context get input value this if value form context not available return get checked null null checked return get value attribute equals value checked null
|
get checked attribute
|
protected string get checked attribute throws exception if get context is multiple this group model group group model get context get component data this if group null group new default group model get context this get context put component data this group if group is selected get value return checked else if group is selection available get checked null return checked return null else return super get checked attribute
|
get checked attribute
|
protected string get onblur attribute return onblur
|
get onblur attribute
|
protected string get onchange attribute return onchange
|
get onchange attribute
|
public void init throws exception http servlet request request http servlet request page context get request form context context new form context request get action this create page context get request set attribute form input tag form context key context
|
create and store form input context
|
protected void reset super reset assert class null assert style null error class null error style null create false page context get request remove attribute form input tag form context key
|
reset attributes and remove form input context
|
protected void init throws exception super init group model new default group model get context this if var group model null page context set attribute var group model group model
|
create and export group model if required
|
protected string get onfocus attribute return onfocus
|
get onfocus attribute
|
public void set redisplay boolean value redisplay value
|
set redisplay property
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.