input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void dispatch task task assign task task
|
dispatch the task needed to been executed
|
protected void main loop throws exception while check stop ready wait execute task notify if this task null try performance test start system current time millis do process process task this task end do end system current time millis double used end start 1000 log info thread current thread get name execute cost seconds used end performance test catch throwable e e print stack trace finally log info thread current thread get name return back to pool this task null if thread pool null thread pool recycle this
|
execute main loop process logic
|
public void set init threads int size this init size size
|
set default init thread size in this pool
|
public void move file string key string dest key string src bucket string dest bucket throws awss3 service exception try s3 bucket bucket validate bucket src bucket s3 bucket dst bucket validate bucket dest bucket validate object key bucket key s3 object new object new s3 object dst bucket dest key s3 service move object src bucket key dest bucket new object false catch awss3 service exception e throw e catch s3 service exception e throw new awss3 service exception e
|
move objects between 2 buckets
|
public string create signed get url string bucket name string key throws awss3 service exception calendar cal calendar get instance cal add calendar year 10 try return s3 service create signed get url bucket name key s3 service get awscredentials cal get time catch s3 service exception e throw new awss3 service exception e
|
create a read url for a file for 10 years
|
public boolean do before poll return true
|
this method is being called by the sqs message poller before polling messages
|
public void test parse throws exception album builder cli cli new album builder cli string arg string project descriptor abc properties comeon hehe string args string utils split arg string cli parse args assert equals abc properties cli get descriptor assert equals new string comeon hehe cli get commands
|
method test parse in class album builder cli test
|
public properties get additional properties return additional properties
|
method get additional properties
|
public void initialize super initialize xdocs directory get configuration get string target xdocsdir target generated xdocs album index template get configuration get string generation index gallery index vm encoding get configuration get string generation index encoding system get property file encoding 8859 1 copy source get configuration get boolean generation copysource false thumbnail columns get configuration get int generation thumbnail columns 5 image link get configuration get string generation imagelink direct image link prefix get configuration get string generation imagelink prefix
|
override method initialize of super class
|
public void execute throws exception for iterator i get source repository values iterator i has next source resource source resource source resource i next try if source resource null continue file file generate thumnail source resource logger debug thumbnail file generated catch exception e logger error can t generate thumbnail for source image source resource e
|
override method execute in super class
|
public void initialize super initialize copy source get configuration get boolean generation copysource false target directory get configuration get string target directory target docs album force over write get configuration get boolean forceoverwrite false
|
override method initialize of super class
|
public void configure configuration conf root configuration conf
|
override method configure of super class
|
public void execute component class clazz throws exception execute component get component clazz
|
method execute component
|
public configuration get configuration return root configuration
|
method get configuration in class album builder component
|
public void execute component string class name throws exception execute component get component class name
|
method execute component
|
public object get component class clazz throws exception object obj clazz new instance logger debug clazz instance created if obj instanceof configurable configurable obj configure configuration if obj instanceof initializable initializable obj initialize return obj
|
method get component
|
protected map get source repository return source repository
|
method get source repository
|
public object get component string class name throws exception return get component class for name class name
|
method get component
|
public void configure configuration conf configuration conf
|
override method configure of super class
|
public void initialize string roots get configuration get string array source directory string patterns get configuration get string array source filepattern boolean recursive get configuration get boolean source recursive false for int i 0 i roots length i string root dir roots i scan resource root dir recursive patterns
|
override method initialize of super class
|
public void initialize super initialize target directory get configuration get string target directory target docs album int max width get configuration get int generation thumbnail maxwidth 100 int max height get configuration get int generation thumbnail maxheight 100 max thumbnail dimension new dimension max width max height force over write get configuration get boolean generation forceoverwrite false
|
override method initialize of super class
|
public void initialize components put thumbnail thumbnail generator class components put index gallery index generator class components put copy source resource copier class
|
override method initialize of super class
|
public void add command string command commands add command
|
method add command
|
public string get path return root directory file separator relative path
|
get full path of this resource
|
public void execute throws exception component loader cl new component loader configuration for iterator i commands iterator i has next string command string i next if components contains key command class clazz class components get command try cl execute component clazz catch exception e logger error execute command error
|
override method execute of super class
|
public void test add category path search criteria sc new search criteria sc add category path a sc add category path b sc add category path a c assert equals 2 sc get category paths size sc add category path assert equals 1 sc get category paths size sc add category path d assert equals 1 sc get category paths size
|
method test add category path in class search criteria test
|
public file get source file return new file get path
|
method get source file
|
public string to string return relative path root directory
|
override method to string of super class
|
public void test set description product p new product assert true p is new p set description aaaa assert true p is modified
|
method test set description in class product test
|
public void test to hex assert equals 0000 number utils to hex 0 4 assert equals 00 fe number utils to hex 254 4 assert equals e number utils to hex 254 1
|
method test to hex in class number utils test
|
protected void set up throws exception super set up if torque is init properties configuration pc new properties configuration pc load new file input stream src webapp web inf conf services properties torque init pc subset services database service
|
method set up
|
protected void tear down throws exception torque shutdown super tear down
|
method tear down
|
public void do save run data data template context ctx throws exception parameter parser params data get parameters int id params get int category id category category category peer retrieve by pk id category set description params get string description category save data set message product category category get category code changed
|
save user change for product category
|
public void do delete run data data template context ctx throws exception parameter parser params data get parameters int id params get int product id criteria crit new criteria crit and product category peer product id id product category peer do delete crit crit new criteria crit and product peer product id id product peer do delete crit data set message product is deleted
|
product deletion action
|
public void set keyword string string keyword string
|
method set keyword in class search criteria
|
public void set product code string string product code string
|
method set product code in class search criteria
|
public void add category path string path boolean add it true list tobe removed new array list for iterator i category paths iterator i has next string p string i next if path starts with p add it false if p starts with path string utils equals p path tobe removed add p category paths remove all tobe removed if add it category paths add path
|
method add category path in class search criteria
|
public set get category paths return collections unmodifiable set category paths
|
method get category paths in class search criteria
|
public void set page size int i page size i
|
method set page size in class search criteria
|
public boolean contains root category boolean ret false for iterator i category paths iterator i has next string path string i next if string utils equals path ret true break return ret
|
method contains root category in class search criteria
|
public void reload root categories get service reload
|
method reload root categories in class a4 trim tool
|
public boolean admin sign in string password if string utils equals password get service get admin password is admin true return is admin
|
method admin sign in in class a4 trim tool
|
public void admin sign out is admin false
|
method admin sign out in class a4 trim tool
|
public boolean get is admin return is admin
|
method get is admin in class a4 trim tool
|
public void set property string name string value properties put name value
|
sets the property of given name and given value for this code snippet
|
public string get property string name return properties get name
|
gets the property of given name for this code snippet and returns its
|
public boolean handle transfer jtext component target component code snippet customizer customizer get customizer this target component boolean accept null customizer customizer show dialog get dialog title true if accept int indent count stripes palette utilities get caret indent target component string body create body indent count try stripes palette utilities insert body target component get caret shift indent count catch bad location exception ble accept false return accept
|
this method handles the placement of code snippet from the palette to
|
protected string indent string string to indent int indent count string builder indented value new string builder for int i 0 i indent count i indented value append indented value append string to indent return indented value to string
|
indents given string with appropriate count of spaces
|
protected string get dialog title string display name try display name nb bundle get bundle get class get string name stripes get bundle key noi18 n catch exception e string title nb bundle get message get class lbl customizer insert prefix display name return title
|
returns localized title of dialog which may be raised for customization
|
protected int get caret shift int caret indent return 0
|
positive or negative number determining that the cater should be
|
public locale get default localization return default localization
|
default localization specifies the language of stripes resources
|
public boolean is bundle created return bundle created
|
should stripes resources
|
public void notify listeners change event event for change listener l listeners l state changed event
|
notifies all registered listeners that given event occured
|
public boolean is jstl included return jstl included
|
returns true if jstl library should be included in projects libraries
|
public string get stripes filter url pattern return stripes filter url pattern
|
url mapping used in web
|
protected boolean is hyperlink point valid document doc we want to work only with org netbeans editor base document if doc instanceof base document return false jtext component target utilities get focused component we want to work only with the open editor and the editor has to be the active component if target null target get document doc return false return true
|
returns true if given document is valid for hyperlinking
|
protected boolean is hyperlink span valid document doc first check that we are working with base document if doc instanceof base document return false base document bdoc base document doc jtext component target utilities get focused component we want to work only with the open editor and the editor has to be the active component and the document has to be the same as was used in the is hyperlink point method if target null last document bdoc return false return true
|
returns true if given document is valid for hyperlink span
|
protected void check errors errors clear stripes config conf get configuration string new dispatcher value conf get stripes dispatcher url pattern if configuration validator is dispatcher url pattern valid new dispatcher value errors add dispatcher error msg else errors remove dispatcher error msg string new filter value conf get stripes filter url pattern if configuration validator is filter url pattern valid new filter value errors add filter error msg else errors remove filter error msg
|
checks the errors based on current cunfiguration in ui
|
protected boolean is perform click action valid document doc first check that we are working with base document if doc instanceof base document return false jtext component target utilities get focused component we want to work only with the open editor and the editor has to be active component and the document has to be the same as was used in the is hyperlink point method if target null last document doc return false return true
|
returns true if given document is valid for performing the click action
|
protected void set position jeditor pane pane try the whole text string text pane get document get text 0 pane get document get length 1 the place where we want the cursor to be int index text index of h2 if we can find it we place the cursor there if index 0 pane set caret position index catch bad location exception ex ex print stack trace
|
override this method when a special cater position
|
protected stripes config get configuration stripes config config new stripes config stripes config panel panel extender get component main tab config set stripes dispatcher url pattern panel get dispatcher url config set stripes filter url pattern panel get filter url localization config set bundle created panel get create resources file if config is bundle created included localizations config set included localizations panel get included localizations default localization config set default localization panel get default localization libraries config set jstl included panel get include jstl return config
|
gets the stripes config object filled with values distilled from
|
public channel get channel channel channel return new channel channel address get channel value channel address
|
this method returns the channel object for the given channel address
|
public void update channel channel channel int source ivalue set set channel sets get set source avalue set set set channel value channel
|
this method will update the value for the given address value pair
|
public channel get channel short address channel c channels get address if c null return c else return new channel address short 0
|
this method will return a channel object for the given address
|
public short get channel value short address return get channel address value
|
this method will return the value of the given channel
|
public void set channel value channel channel if channel value 100 channels get channel address null channels remove channel address else channels put channel address channel
|
this method will set the value of the given channel in this cue
|
public int compare to channel c return short address compare to c address
|
this method is part of the comparable interface
|
public short get channel value short address channel c channels get address if c null if c value 0 return c value else return 100 else return 0
|
this method will return the value of the given channel
|
public void add cue acue cue cue list put cue get number cue
|
this method adds a cue to the cueset
|
public void add cues acue cues for acue cue cues add cue cue
|
this method adds a series of cues to the set
|
public acue get cue float number return cue list get number
|
this method returns the cue with the given cue number
|
public channel get channel short address channel c channels get address if c null return c return new channel address short 0
|
this method will return a channel object for the given address
|
public channel get channel channel channel channel c channels get channel address if c null return c return new channel channel address short 0
|
this method will return a channel object for the given channel object
|
public void delete cue float number cue list remove number
|
this method will delete the cue with the given number
|
public short get channel value short address return channel values get channel value address
|
this method returns the value of the given channel address
|
public void set channel value channel channel channels put channel address channel
|
this method will set the value of the given channel in this cue
|
public void delete cues float numbers for float f numbers cue list remove f
|
this method will delete the cues with the given numbers
|
public float get highest cue number float keys get cue numbers if keys length 0 return keys keys length 1 else return 0
|
this method returns the highest cue number that exists
|
public void set channel value short address short value channels put address new channel address value
|
this method will change the value of the given address to the given
|
public void set channel values channel c for int i 0 i c length i set channel value c i
|
this method will set a series of channel values in the cue
|
public void set channel value channel channel int source if source 0 channel values update channel channel source try dmx device set value channel values get channel channel catch idmxdevice exception e write error e return connector update channel channel values get channel channel channel values get channel source channel
|
this method will set the channel value to the given value
|
public string get show desc return show desc
|
this method returns the shows description
|
public void set show desc string show desc show desc show desc
|
this method sets the shows description
|
public float get number return number
|
this method will get the cues number
|
public void set number float number number number
|
this method will set the cues number
|
public int get max channels return max channels
|
this method returns the maximum number of channels for this show
|
public void set max channels int max channels max channels max channels
|
this method sets the maximum number of channels for this show
|
public void set desc string desc desc desc
|
this method will set the cues description
|
public void add cue acue cue cue set add cue cue
|
this method will add a cue to the current cueset
|
public long get fade up millis return fade up millis
|
this method returns the fade up time in milliseconds
|
public void set fade up millis long fade up millis fade up millis fade up millis
|
this method sets the fade up time in milliseconds
|
public float get highest cue number return cue set get highest cue number
|
this method returns the highest cue number that currently exists
|
public long get fade down millis return fade down millis
|
this method returns the fade down time in milliseconds
|
public void set fade down millis long fade down millis fade down millis fade down millis
|
this method sets the fade down time in milliseconds
|
public string get file data channel cs channels values to array new channel 0 string file data for channel c cs file data general utils gen data set channel value general utils gen data set address short to string c address general utils gen data set value short to string c value return file data
|
this method is used for saving cues to a file
|
public acue get cue float cue number return cue set get cue cue number
|
this method returns the cue with the given number
|
public channel set value channel channel throws idmxdevice exception byte data new byte 3 system out println setting address address to value value if channel value 0 return channel if channel address 256 data 0 0x48 data 1 byte channel address 1 data 2 byte channel value else if channel address 512 data 0 0x49 data 1 byte channel address 1 data 2 byte channel value long result write handle data 3 if result 0 l throw new idmxdevice exception error writting to usbdmx com device error code long to string result return channel
|
this method sets the given channel value pair on the device
|
public channel set value channel channel throws idmxdevice exception return null
|
this method sets the given channel value pair on the device
|
public channel set value channel channel throws idmxdevice exception return channel
|
this method sets the given channel value pair on the device
|
private float clip float value if value 1 return 1 else if value 0 return 0 else return value
|
this method will clip values to a range of 0 to 1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.