input
stringlengths
10
828
output
stringlengths
5
107
public string get refnum string prefix string suffix return prefix make refnum suffix
get a reference number
public string get name return core module name
get the name of this module
public string get str value string path return string get value path
get the option value in the path of options
public string get repeated string int number string rep string buffer buf new string buffer for int i 0 i number rep length 1 i buf append rep string ret str buf to string substring 0 number return ret str
get a string of certain length of certain characters
public string get resource string string resource throws ioexception return resource loader get resource string resource
get the resource as a string
public int get int value string path return number utils string to int get str value path 0
get the option value in the path of options
public string get global preference string key throws user exception return get instance get global preference key
get the global preference string for the organization
public boolean is authorized iuser context user user resource resource return true
can this user access this resource
public void set exclusive to array list new exclusive to exclusive to new exclusive to
sets those parameters that must not be set if this is set
public user resource get user resource string name return new user resource name
get the named user resource
public boolean get boolean value string path return boolean value of get str value path boolean value
get the option value for the configuration data object poitned
public iorganization get organization string name throws user exception return get instance get organization name
get organization object
public string from base64 string string return base64 decode string to string
get the base 64 value for the string
public collection get exclusive to return exclusive to
return option s that must not be set if this one is set
public string i18n string name return i18n get name
get the translated name
public boolean must authenticate user resource resource handle velocity macro pages if resource get name index of vm 0 if resource get name index of resource get name last index of return false return true
must this resource be authenticated this is a default operation you
public void log debug string line log log debug line
write a line to the debug log
public void set mandatory boolean new mandatory mandatory new mandatory
set the mandatory
public string get global preference string key throws user exception string buffer sbuf new string buffer org pref prefix sbuf append key return config service get string config name sbuf to string
get the global preference string for the organization
public iuser context get user context string name throws user exception return get instance get user context name
get user context object
public void add option config option option system out println adding option option get name options put option get name option now link up the configuration data option set parent data container this do this first get config data add child option get config data this relies on parent having been set
add an option to the list options
public void log error string line log log error line null
write a line to the warning log
public iorganization get organization string name throws user exception throw new user exception not implemented
get organization object
public void log info string line log log info line
write a line to the info log
public string to string return new to string builder this append name get name append description get description append options get options append data get config data to string
convert to a string
public void set mutable boolean new mutable mutable new mutable
set mutablity of option
public void log warning string line log log warn line
write a line to the warning log
public iuser context get user context string name throws user exception if log service get instance is debug enabled log service get instance log debug simple user manager get user context getting context for user name if name starts with z throw new user exception get user context invalid user return new simple user context this name
get user context object
protected void init objects
initialize the options
public string make refnum return to base62 system current time millis get inc
return a base62 string of the time epoch number
public string md5 string string value try message digest message digest message digest get instance md5 return new string message digest digest value get bytes catch no such algorithm exception e log log error e return
hash a md5 number
public void apply config data iconfig data data get the options first this needs to be done right here because this does interfere with the data applications this get options this set config data data for iterator iterator data get children name set iterator iterator has next string key string iterator next iconfig data child data get child key config option configoption this get option key if the options are not found for this data create an option if configoption null configoption create dynamic option data key this add option configoption apply config value child configoption
apply the data values from the data object to each of the configuration
public int get number suboptions if get suboptions null return 0 else return get suboptions size
get the number of suboptions in this config option
public void out println string string system out println string
print a line
public config option get suboption string name if get suboptions null return null else return config option get suboptions get name
get the named suboption
public iorganization get organization return this organization
get the parent organization
public iorganization get organization return organization
get the organization
public user type get user type return this user type
get the user type information
protected void set organization iorganization organization this organization organization
set the organization
protected void set user type user type user type this user type user type
set the user type
public void set string key object object data put key object
set some data on this user
public set get suboption names if get suboptions null return null else return get suboptions key set
get the set of suboptions for this config option
protected void set authenticated boolean authenticated this authenticated authenticated
set this as authenticated
protected void set user iuser user this user user
set the user associated with this context
public string to base62 long number number number powers 0 string buffer buff new string buffer long residue number for int i 0 i digits i long power powers i long value residue power residue residue value power buff append alphanumeric char at int value return buff to string
get the base 62 value for the number
public boolean is valid return password length 0
validity check on this credential
public boolean is authorized iuser context user user resource resource return get instance is authorized user resource
can this user access this resource
public void set type iconfig option type new type type new type
set the type
public void delete global preference string key throws user exception throw new user exception not implemented
delete the global preference string
public string to string return this password
convert this object to a string representation
public user resource get user resource string name return get instance get user resource name
get the named user resource
public int get int return user type
get the user type number
public string to base64 string string return new string base64 encode string get bytes
get the base 64 value for the string
public iconfig data get config data if config data null system out println creating new config data config data new config data this get name return config data
get the configuration data that has been set on this object
public iconfig option type get type return type
get the type
synchronized public object check out throws resource exception if not initialized setup now if is initialized setup set initialized true return null
get a new connection
public void delete global preference string key throws user exception get instance get global preference key
delete the global preference for this user
public void delete user iuser user throws user exception throw new user exception not implemented
strong delete user strong delete a user
public boolean must authenticate user resource resource return get instance must authenticate resource
must this resource be authenticated
public int to int string in return integer parse int in
convert a string to an int
public void set config data iconfig data data system out println setting get name data get value this config data data
apply the configuration config data to this configuration information
public integer to integer string in return integer get integer in
convert a string to an integer
public void execute command command line command line if command line has option h print usage return if command line has option v set verbose true if command line has option d print config info execute command line environment loader shutdown
execute the commandline
protected void protected set value object value this get config data set value value to string
set the value of the configuration option this method has package security
public void set name string name this get config data set name name
set the name actually on the configuration data object
public void print usage system out println get name system out println desc new help formatter print help get name options string version config service get string env build babeldoc version system out println n i18n get 001006 version system out println i18n get 001007 system out println i18n get 001008 system out println i18n get 001009
print the usage instructions
public long to long string in return long get long in
convert a string to an long
public iconfig get config string name locale locale string key name locale to string iconfig config iconfig configs get key if config null synchronized this config config service get config name locale configs put key config return config
get a config bundle for the name and locale
public void setup command line options options options add option v verbose false i18n get 001002 options add option h help false i18n get 001003 options add option d debug false write config info to stdout
setup the options on the command line
public void delete user iuser user throws user exception get instance delete user user
strong delete user strong delete a user
public void setup shutdown hook thread class that will be executed when this command shutsdown class shut me down nicely extends thread babeldoc command command creates a new shut me down nicely object param command babeldoc command shut me down nicely babeldoc command command super shutdown this command command shut down the command by calling finish up public void run log service get instance log debug i18n get 001001 command stop runtime get runtime add shutdown hook new shut me down nicely this
setup the shutdown hook
public void execute command line command line super execute command line if command line has option l string track key null if command line has option t track key command line get option value t list config files command line get option value l track key
execute the command
public string get name return this get config data get name
get the name
public void run log service get instance log debug i18n get 001001 command stop
shut down the command by calling finish up
public void set string string name string value throws config exception service set string this get name name value data put name value set dirty true
set a configuration option value
public iconfig get config string name system out println getting config name iconfig config iconfig configs get name if config null synchronized this system out println config name not found loading config config service get config name configs put name config return config
get a config bundle for the name and default locale
public void setup command line options options super setup command line options options add option option builder is required has arg with description i18n get core config light command option l with long opt list create l options add option option builder has arg with description i18n get core config light command option t with long opt track create t
setup the options on the command line
public string get string string name return string data get name
get the string configuration setting for the name
protected void setup environment loader load environment
setup calls the environment loader which bootstraps the
public object get value return get config data get value
get the value for this configuration option
public boolean has key string key return data contains key key
does this configuration object have this key
public iconfig get config string name string newname get property file name name if log is debug enabled log log debug loading name properties properties merge properties file from user search path newname new properties return iconfig new default config name properties this
get a config bundle for the name and default locale
public set keys return data key set
get an enumeration of all the configurations
public iconfig get config string name locale locale return get config name
get a config bundle for the name and locale
public iconfig create config string name return config service create config name
create a configuration object
public void test get all tickets throws exception query ticket tickets journal get tickets new journal query 0 30 null null null null if tickets length 10 int onethird tickets length 3 int twothird tickets length 3 2 query ticket tickets up to journal get tickets new journal query 0 10 null tickets twothird get date null null query ticket tickets from journal get tickets new journal query 0 10 tickets onethird get date null null null query ticket tickets between journal get tickets new journal query 0 10 tickets onethird get date tickets twothird get date null null
get all tickets
public iconfig create config string name return new default config name new properties this
create a null configuration object this allows objects to make new
public boolean equals object o return option query option o option
equality operator important
public map get properties return data
get the data properties
public void test get forked tickets throws exception journal operation jopts journal operation fork ticket query ticket tickets journal get tickets new journal query 0 10 null null null jopts
get forked tickets
public boolean is valid if get suboptions null for iterator iterator get suboptions key set iterator iterator has next string name string iterator next config option sub option get suboption name if sub option is valid return false object val get value if val null is mandatory return false else return this get type is valid this get value
is this value valid this depends on the type of the option
public ijournal ticket dummy ticket throws journal exception return journal ticket get dummy
make a dummy ticket
public void test get new tickets throws exception journal operation jopts journal operation new ticket query ticket tickets journal get tickets new journal query 0 10 null null null jopts for int i 0 i tickets length i system out println tickets i
test getting new tickets
public void set string string config name string property name string value throws config exception throw new config exception method not implemented
set the value for the named property for the named configuration
public string get additional return this additional
get the additional information at this query step
public void set end date date end date if end date null this end date end date else this end date new date long max value
set the enddate
public void test get new tickets newest first throws exception journal operation jopts journal operation new ticket query option qopts query option newest first query ticket tickets journal get tickets new journal query 0 10 null null qopts jopts for int i 0 i tickets length i system out println tickets i
get new tickets newest first
public boolean is dummy return this value 0
return dummy tickets dummy tickets dont do anything
public void test get new tickets oldest first throws exception journal operation jopts journal operation new ticket query option qopts query option oldest first query ticket tickets journal get tickets new journal query 0 10 null null qopts jopts for int i 0 i tickets length i system out println tickets i
get new tickets oldest first
public void add suboption config option suboption if get suboptions null suboptions new hashtable add to the collection get suboptions put suboption get name suboption now connect the iconfig data objects together suboption set parent data container this do this first get config data add child suboption get config data this relies on parent set
add a suboption to this option