input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void test get update document tickets throws exception journal operation jopts journal operation update document query ticket tickets journal get tickets new journal query 0 10 null null null jopts
|
get the updated documents
|
public string get other return this other
|
get the other data for the ticket could be parent ticket etc etc
|
public void test get update status tickets throws exception journal operation jopts journal operation update status query ticket tickets journal get tickets new journal query 0 10 null null null jopts
|
get update status tickets
|
public void set journal operations journal operation journal operations this journal operations journal operations
|
set the the journal operations
|
protected void roll log file throws ioexception file logfile new file get log file if logfile length get log max size get log writer close string file name get log file new date to string log log info i18n get 013001 file name logfile rename to new file file name log writer new file writer get log file true log printer new csvwriter get log writer
|
roll the log file if necessary
|
public string get stage return this stage
|
get the pipeline stage of this ticket
|
public void remove suboption string name if get suboptions null get config data remove child get suboption name get config data get suboptions remove name
|
remove the named option from the suboptions and remove the configuration
|
public void add config change listener iconfig change listener listener string configs throws com babeldoc core config config exception if config service instanceof iconfig change notifier iconfig change notifier config service add config change listener listener configs else throw new config exception i18n get 005200
|
add a configuration change listener to this object and a configuration
|
protected void set up throws exception mgr new ejb reference manager journal journal factory get journal new impl ejb journal
|
setup the journal
|
public int get step return this step
|
get the step for the ticket
|
public ijournal ticket get ticket return this ticket
|
get the ticket
|
protected void tear down throws exception mgr remove
|
teardown the journal
|
public void test fork ticket throws exception ijournal ticket ticket journal new ticket assert not null journal fork ticket ticket
|
test forking tickets
|
public void remove config change listener iconfig change listener listener if config service instanceof iconfig change notifier iconfig change notifier config service remove config change listener listener else do what
|
remove the listener from the list of configuration change listeners
|
public string to string string valid type get valid types string allowed if valid null for int i 0 i valid length i allowed allowed valid i else allowed any return option get name type type description description default value default value allowed values allowed value get value
|
stringify this object
|
public void test get new ticket throws exception assert not null journal new ticket
|
test getting new ticket
|
public void test update document throws exception ijournal ticket ticket journal new ticket journal update document ticket new com babeldoc core pipeline pipeline document test document get bytes test stage
|
test updating document
|
public string get additional info if additional info null return else return additional info
|
get the additional information for this status
|
private file get log directory ijournal ticket ticket string dir get tracker dir ticket get id file log directory new file dir return log directory
|
make a file object for the ticket
|
public void test update status throws exception ijournal ticket ticket journal new ticket journal update status ticket journal status success test stage
|
testimg i date status
|
public void set query options query option query options this query options query options
|
set the query options
|
protected void set up throws exception com babeldoc core environment loader load environment journal journal factory get journal new impl ejb journal
|
setup the test
|
public void config changed string config if config service instanceof iconfig change notifier iconfig change notifier config service config changed config
|
fire event to all the configurations that are interested in this event
|
public void set start date date start date if start date null this start date start date else this start date new date 0
|
set the start date
|
public iconfig data get config data if config data null system out println config data is null setting config data new config data this get name get parent data container get config data add child config data config data set value this default value return config data
|
get the configuration data for this configuration option
|
public collection get general options return new array list
|
this method returns options that are general to all components
|
public journal command do replay command line cmd line string ticketstep cmd line get option value r int index ticketstep index of long tval long parse long ticketstep substring 0 index int step integer parse int ticketstep substring index 1 get display mode cmd line ijournal ticket ticket new journal ticket tval try journal factory get journal replay ticket ticket step catch exception e log log warn i18n get 000051 e return this
|
handle replaying of a ticket
|
public boolean is config change notifier return config service instanceof iconfig change notifier
|
is this configuration service a notifier
|
private file make ticket document attr file ijournal ticket ticket int step return new file get tracker dir ticket get id file separator integer to string step attr suffix
|
make a file name for the attributes at the step
|
public string to string return new to string builder this append name name to string
|
return string representation of this object
|
public journal command do steps command line cmd line long tval long parse long cmd line get option value t get display mode cmd line journal ticket ticket new journal ticket tval try query ticket qts journal factory get journal get all ticket steps ticket render query tickets qts catch exception e log log warn i18n get 000051 e return this
|
handle listing the steps for a ticket
|
protected map get suboptions return suboptions
|
get the suboptions
|
public string get name return string get first
|
get the name
|
public string get value return string get second
|
get the value
|
public iconfig info get info if info null info new journal config info this method returns type specific options return comments public collection get type specific options return new array list return description of this worker return description public string get description return dummy journal is a do nothing jounal return the name return public string get name return null return info
|
get the configuration iformation for this class
|
public collection get type specific options return new array list
|
this method returns type specific options
|
public string get description return dummy journal is a do nothing jounal
|
return description of this worker
|
public void execute command line command line if command line has option l do list command line else if command line has option t do steps command line else if command line has option r do replay command line else if command line has option d do display command line else print usage
|
execute the command line
|
public string get service name if log is debug enabled log log debug service get service prefix get type name return get service prefix get type name
|
make the service name for this type from the service prefix which must
|
private file make ticket document file ijournal ticket ticket int step return new file get tracker dir ticket get id file separator integer to string step delta suffix
|
make a file name for the ticket at the step
|
public class get type class try return service factory get service class get service name catch service exception e return null
|
get the class represented by this type
|
public string to string return new to string builder this append num results num results append start date start date append end date end date append query options query options append journal operations journal operations to string
|
string representation of the journal query
|
public object get type instance throws service exception return service factory get service get service name
|
get an instance of this type
|
public ijournal ticket get ticket string identifier throws journal exception return new journal ticket 0
|
get an existing ticket from the string identifier
|
public string to string return new to string builder this append first first append second second to string
|
convert to a string
|
public ijournal ticket dummy ticket throws journal exception return new journal ticket 0
|
get a ticket for tracking a document
|
public boolean equals object o if o instanceof type return false type rhs type o return new equals builder append type name rhs type name append get service prefix rhs get service prefix is equals
|
do a comparison between these two types
|
public void configure ipipeline stage factory stage factory iconfig data data super configure stage factory data get info apply config data data poolsize number utils string to int string get info get option pool size get value keep alive number utils string to int string get info get option keep alive get value thread pool new pooled executor poolsize thread pool set keep alive time keep alive environment loader add shutdown listener this
|
this method is call prior to any processing it is a necessary configuration
|
public ijournal ticket new ticket throws journal exception return new journal ticket 0
|
get a ticket for tracking a document
|
public string to string return new to string builder this append type name type name append service prefix get service prefix to string
|
make a nice string here
|
private int get number of deltas in directory ijournal ticket ticket int i file directory get log directory ticket i directory list files new filename filter public boolean accept file dir string name log log debug name return name ends with delta suffix length return i
|
get the number of delta files in the ticket directory
|
public ipipeline stage factory get stage factory return stage factory
|
get the owning pipeline stage factory
|
protected date get date string arg if arg length ccyymmddhhmmss length int yy integer parse int arg substring 0 3 int mm integer parse int arg substring 4 5 int dd integer parse int arg substring 6 7 int hh integer parse int arg substring 8 9 int mm integer parse int arg substring 10 11 int ss integer parse int arg substring 12 13 calendar cal calendar get instance cal set yy mm dd hh mm ss return cal get time else return null
|
convert a string date into a java date
|
public void configure ipipeline stage factory stage factory iconfig data data super configure stage factory data get info apply config data data global max threads number utils string to int string get info get option max threads get value
|
this method is call prior to any processing it is a necessary configuration
|
public collection get type specific options collection options new array list options add new config option pool size iconfig option type integer integer to string default poolsize false i18n get core pipeline processor threadpool option pool size options add new config option keep alive iconfig option type integer integer to string default keepalive false i18n get core pipeline processor threadpool option keep alive return options
|
this method returns type specific options
|
public string get description return i18n get core pipeline processor threadpool desc
|
return description of this worker
|
public string get entry stage name throws pipeline exception string entry stage this get resolver get entry stage name if entry stage null entry stage trim length 0 throw new pipeline exception i18n get 019002 ipipeline stage resolver entry stage else return entry stage
|
get the entry point into the pipelinestage
|
public string get name return threadpool
|
return the name
|
public iconfig info get info if info null info new pipeline stage factory info this method returns type specific options return comments public collection get type specific options collection specific new array list specific add new config option config filename iconfig option type string null true configuration data filename return specific return description of this worker return description public string get description return simple pipeline stage factory reads its pipeline configuration from configuration objects return the name return public string get name return simple return info
|
get the configuration iformation for this class
|
public collection get type specific options collection specific new array list specific add new config option config filename iconfig option type string null true configuration data filename return specific
|
this method returns type specific options
|
public void shutdown new thread new runnable public void run while true try thread sleep 1000 if thread pool get pool size 0 thread pool shutdown now return catch interrupted exception e e print stack trace to change body of catch statement use options file templates start
|
callback method from the loader to signal that the babeldoc
|
public string get description return simple pipeline stage factory reads its pipeline configuration from configuration objects
|
return description of this worker
|
protected void get display mode command line commandline if commandline has option d string disp commandline get option value d if disp equals ignore case xml disp mode xml disp else if disp equals ignore case csv disp mode csv disp
|
determine if the argument at the position is a valid display mode modifier
|
public string get name return simple
|
return the name
|
public boolean is stage tracked string stage name try return get processor get pipeline stage stage name is tracked catch exception e return false
|
must this pipeline stage track its data object
|
public int get global max threads return global max threads
|
get the globally configured number of threads allowed
|
public void configure ipipeline stage factory stage factory iconfig data data this stage factory stage factory
|
this method is call prior to any processing it is a necessary configuration
|
public iconfig info get info return new processor config info this method returns type specific options return comments public collection get type specific options collection options new array list options add new config option max threads iconfig option type integer integer to string default max threads false i18n get core pipeline processor async option max threads return options return description of this worker return description public string get description return i18n get core pipeline processor async desc return the name return public string get name return async
|
get the configuration information for this processor
|
public collection get type specific options collection options new array list options add new config option max threads iconfig option type integer integer to string default max threads false i18n get core pipeline processor async option max threads return options
|
this method returns type specific options
|
protected log service get log if log null log log service get instance this get class get name return log
|
get the logservice object
|
public map get attributes return this map
|
get all the attributes on the pipeline document
|
public string get description return i18n get core pipeline processor async desc
|
return description of this worker
|
public ipipeline stage processor get processor return processor
|
get the processor
|
public void set binary boolean binary string bool binary true false this map put binary bool
|
set the binary flag on this document
|
public string get name return async
|
return the name
|
public collection get type specific options collection options new array list options add new config option simple journal journal logfile iconfig option type filename null true the journal log file each operation is logged to this file options add new config option simple journal journal dir iconfig option type directory null true the journal data directory each store operation gets placed in a directory options add new config option simple journal journal maxsize iconfig option type integer integer to string simple journal default logsize false the maximum size that the log can grow to before it is rolled return options
|
this method returns type specific options
|
private string buffer get socket response buffered reader in try string buffer str buffer new string buffer string response line while response line in read line null str buffer append response line return str buffer catch ioexception iox log service get instance log error iox return null
|
read the results from the communication
|
public boolean is binary return true equals this map get binary
|
get the boolean status of this document
|
private void send document to socket print writer out pipeline document document out write document get contents out flush
|
send the document to the socket
|
public void set bytes byte new buffer if new buffer null buffer new byte 0 else byte buf new byte new buffer length system arraycopy new buffer 0 buf 0 new buffer length buffer buf
|
set the array of bytes representing the documents content
|
public iconfig info get info return new processor config info this method returns type specific options return comments public collection get type specific options return new array list return description of this worker return description public string get description return i18n get core pipeline processor sync desc return the name return public string get name return sync
|
get the configuration information for this processor
|
public string get description return the simple journal stores its configuration information in directories and a log file
|
return description of this worker
|
public string get description return i18n get core pipeline processor sync desc
|
return description of this worker
|
private void add parameters to transformer transformer transformer now add the mandatory parameters transformer set parameter param pipelinestage this transformer set parameter param document this get document and any other parameters that might be configured name value pair params this get option list new string param if params null params length 0 for int i 0 i params length i name value pair param params i transformer set parameter param get name param get value
|
add the parameters to the transformer
|
public int get length if this buffer null return this buffer length else return 0
|
get length of the data in bytes
|
public linked list get messages linked list messages linked list map get messages if messages null messages new linked list map put messages messages return messages
|
return messages list that represent stack for errors or warnings
|
public string get name return sync
|
return the name
|
public templates get template return template
|
get the template on the cache item
|
public void set mime type string mime type if mime type null mime type equals this map put mime type mime type
|
set mime type for this document
|
protected csvwriter get log printer if log printer null log printer new csvwriter get log writer return log printer
|
setup the log printer
|
public string get mime type string result string this map get mime type if result null result equals string file name string this map get name if file name null file name equals result get mime type for file file name else result default mime type return result
|
get content type for this document
|
public string get content string content null content this get options content if content null equals content content this get document get contents return content
|
return content to write as string
|
public pipeline document get content document if this get document is binary return this get document else pipeline document new document new pipeline document this get content get bytes new document set mime type this get document get mime type new document set binary this get document is binary 20071114 josem dev why not set encoding and set name new document set encoding this get document get encoding new document set name this get document get name return new document
|
get this document setting the mimetpe etc appropriately
|
public void set name string name if name null name equals this map put name name
|
set the name using the name attribute
|
protected file writer get log writer if log writer null try log writer new file writer get log file true catch ioexception e log log error e return log writer
|
get the log writer
|
public string translate message string message string buffer sb new string buffer for int i 0 i message length i if message char at i n sb append br else if message char at i sb append comma else if message char at i sb append quot else sb append message char at i return new string sb
|
translates the message into a journal safe message converting any
|
public string get name return string map get name
|
get the name of this document using the name attribute
|
public void add message string message get messages add last message
|
add new message at the end of this list
|
protected string get log file if log file null log file get info get str value journal logfile log file variable processor expand string log file system out println setting log file log file return log file
|
get the log file configuration
|
public void fatal error saxparse exception exception error occured true if log is debug enabled log log debug i18n get 100012 exception get message error description error description exception get message n
|
called for fatal errors
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.