input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
protected component get event source component return get view | subclasses may override this to return another component to which |
public embedded object path copy embedded object path path new embedded object path if sets null path sets vector sets clone path descriptors vector descriptors clone return path | returns a copy of the path |
public account get group info string group account result null shared map item info get new string map item group prefix group if info null result new account group info to string return result | returns the group info for the given group |
public boolean is using shared password return is shared password | returns true if all users share a password |
public string get string return get string false | returns a standard delimited string for the path |
public void init properties props to copy props new properties props to copy | initializes by copying a properties object |
public void init input stream in throws ioexception props load in | initializes by loading properties from an input stream e |
public void init file string dir string props file throws ioexception file d new file dir if d exists d mkdirs file new file d props file if file exists init new buffered input stream new file input stream file | initializes the props from a file |
public void init string resource name try init default properties source class get resource as stream resource name catch ioexception ioe ioe print stack trace | initializes by loading a properties file from a resource e |
public string get string string delimiter boolean include root string buffer buf new string buffer get string delimiter include root buf return buf to string | returns a string representing the path with nodes delimited by |
public void set using shared password boolean is shared password object old new boolean this is shared password this is shared password is shared password fire property change using shared password old new boolean is shared password this is a bad idea since it would happen on each replica things would eventually be consistent but it would waste cycles if shared password null set shared password encrypt password password | set to true if all users share a password |
public void init string args string key null string val null for int i 0 i args length i if args i starts with if key null val null props set property key val key args i substring 1 val null else if val null val args i else handle multi word args val val args i if key null val null props set property key val | initializes from an array of strings such as those passed to |
public void init string prop string val props set property prop val | inits a single property |
protected string do get property string property return props get property property null | attempt to retrieve the requested property from the system |
protected void do save properties if file null try buffered output stream out new buffered output stream new file output stream file props save out properties out flush out close catch ioexception e e print stack trace | should be overridden to save commit any unsaved properties |
public int get password type handle old field if is shared password password type password shared set password type password shared return password type | returns an integer value for the type s of passwords accepted based |
public string get url replicated object client client return get url client false | returns a url for accessing the object |
protected void override | subclasses should override this to execute logic that causes them |
public void set password type int p type int old password type password type p type set using shared password password type password shared fire property change password type new integer old new integer password type | sets the type s of passwords accepted |
protected string do get property string property string val null try if prefix null property prefix property val system get property property null catch exception e it is tempting to detect the first exception and bypass the check if we have a failure note however that both the applet sandbox and the webstart sandbox allow access to some system properties but not others return val | attempt to retrieve the requested property from the system |
protected string do get property string property string val request get parameter property if val null object attr request get attribute property if attr null attr instanceof string val string attr if val null if property equals request uri val request get request uri else val request get header property return val | should be overridden to return the given property or null if |
public string get shared password return shared password | returns the encrypted shared password |
public void deactivate this is a bad idea ref counting doesn t seem to be working embedded object set parent path get last embedded object set if parent null replication manager get instance stop sharing parent context get replicated object client shutdown | called to inform the component that it is being de activated and |
public void set shared password string shared password object old this shared password this shared password shared password fire property change shared password old shared password | sets the encrypted shared password |
protected url get code base url u null try basic service bs basic service service manager lookup javax jnlp basic service u bs get code base catch exception e system err println e e print stack trace system err println jnlppersistence properties source code base u return u | retrieves the url for the jnlp apps codebase |
protected file contents get file contents url url file contents fc null try persistence service ps persistence service service manager lookup javax jnlp persistence service fc ps get url catch exception e e print stack trace system err println e return fc | returns a file contents for the given url typically the codebase |
protected string do get property string property if property equals codebase url u get code base if u null return u to string return props get property property null | should be overridden to return the given property or null if |
public boolean is readable return permissions checker is readable id context | utility method that checks to see if the user can retrieve the |
protected void do save properties try url url get code base file contents fc get file contents url if fc null fc can write persistence service ps persistence service service manager lookup javax jnlp persistence service long size ps create url 2048 fc ps get url if fc null arg to get output stream is really overwrite not append bad docs props save fc get output stream true jnlpinstaller props catch exception e system err println e | saves the properties |
public string get plain shared password return plain shared password | returns the plain unencrypted shared password |
public string get uncached property string prop string def properties props new properties load properties props string val props get property prop if val null val def return val | returns a property that hasnt been cached |
public void process embedded object path path component context context embedded object descriptor desc path get last embedded object descriptor try writer write path path get string false n process desc context true catch ioexception ioe ioe print stack trace | handle an object in the iteration |
public boolean is writable return permissions checker is writable id context | utility method that checks to see if the user can modify the |
public void set plain shared password string plain shared password object old this plain shared password this plain shared password plain shared password fire property change plain shared password old plain shared password | sets the plain unencrypted shared password |
public boolean get allow any name return allow any name | returns true if we are using a shared password and allowing any user |
public window state get window state if window state null create window state return window state | returns a shared object containing the window state of this component view |
public void process embedded object path path component context context embedded object descriptor desc path get last embedded object descriptor object id id desc get object id temporarily limiting this to text data objects if id get classname index of text data 1 string url public path get string true index request ir new index request desc get object id url desc get name system err println enq url sl enqueue index request ir try thread sleep 30 1000 catch exception e e print stack trace | submits the object to the indexer |
private void create window state try system out println creating shared window state replicated object client client context get replicated object client permissions perms delegated permissions create delegated permissions id client system out println window state perms perms window state window state client get new object window state class perms replication manager get instance start sharing window state client catch exception e system out println error creating shared window state | create and initialize the shared window state |
public void set allow any name boolean allow any name object old new boolean this allow any name this allow any name allow any name fire property change allow any name old new boolean allow any name | set to true if using a shared password and allowing any user name |
public void detach for enumeration e active keys e has more elements object id id object id e next element try replication manager get instance stop sharing id fake client catch throwable t system err println modification tracker detach t replication manager get instance stop sharing all fake client trying to help out gc active clear context null client null listeners remove all elements fake client null | detaches the modification tracker from all objects that it is |
public static class default grouping strategy implements grouping strategy public int get group count return 1 public int get group for calendar item calendar item item return 0 | default grouping strategy that puts everything in a single bin |
public string get authentication host return auth host | returns the host were authenticating against |
public void add change to ignore string obj class name string change class name vector v vector changes to ignore get obj class name if v null v new vector changes to ignore put obj class name v if v contains change class name v add element change class name | adds a class of changes to be ignored |
protected class replicated relation factory implements relation factory name for this relation private string name null public replicated relation factory string name this name name public object relation get object relation embedded object descriptor desc object relation or null try or new replicated relation get replicated object client name desc catch java io ioexception ioe ioe print stack trace return or | relation factory implementation that constructs cork based |
public void add modification listener modification listener l listeners add element l | adds a listener to be notified when an object is first modified |
public boolean is reversed return reverse | returns true if the list is reversed |
public enumeration get embedded object descriptors return new linked list enumeration rec | returns an enumeration of embedded object descriptors representing |
public void set reversed boolean reversed this reverse reversed | set to true to reverse the list |
public void remove modification listener modification listener l listeners remove element l | removes a listener to be notified when an object is first modified |
public embedded object descriptor get embedded object descriptor string name embedded object descriptor desc null for enumeration e get embedded object descriptors desc null e has more elements embedded object descriptor tmp embedded object descriptor e next element string n tmp get name if n null n equals name desc tmp return desc | returns the embedded object descriptor with the given name |
public int get authentication port return auth port | returns the port for the external server were authenticating against |
public void add object final embedded object descriptor desc desc add property change listener this desc add named property change listener this descriptors add element desc add version desc desc runner run new runnable public void run add versions desc | adds all versions of the given object to the set |
public replicated object user get user return null | returns an object representing the logged in user or null if no |
public boolean get relation is mutable return true | returns true if the relation is mutable |
public boolean get descriptors are mutable return true | returns true if descriptors returned by this relation are mutable |
public void add object set embedded object set set for enumeration e set get embedded object descriptors e has more elements try embedded object descriptor desc embedded object descriptor e next element add object desc catch exception ex ex print stack trace | adds all versions of all objects in the set |
public void login string user object password throws security exception | logs into the server with the given user name and password object |
public boolean is client alive long client id return false | returns true if the client with the given id is alive |
public void send item white board item wbi send if m s server null try new print writer m s server get output stream true println white board global protocol add wbi send encode catch ioexception ioe system out println unable to send item else pli add item wbi send | send a new item out to everybody on the white board |
public embedded object descriptor add version embedded object path path return add version path null | adds a version of the given descriptors object with no |
public static class week interval hint implements interval hint returns an object that uniquely identifies the interval suitable for use as a key in a hashtable public object get interval date d could probably come up with something cheaper return week component get start of week d returns an array containing the start and end dates for the interval containing the given date public date get interval bounds date d date start week component get start of week d return new date start week component get one week later start | interval hint for weekly intervals |
public object get interval date d could probably come up with something cheaper return week component get start of week d | returns an object that uniquely identifies the interval suitable |
public void set embedded object path embedded object path path delegate set embedded object path path | called after construction to inform the view of its embedded object |
public component get view return delegate get view | returns a full size component for viewing and or editing the object |
public calendar item set get calendar items date start date end calendar item set set null synchronized sets object interval hint get interval start set calendar item set sets get interval if set null date d hint get interval bounds start set new vector calendar item set this d 0 d 1 sets put interval set system err println get calendar items start start end end interval interval set set return set | returns a set of calendar items for the given date range inclusive |
public component get thumbnail return delegate get thumbnail | returns a component that implements a hopefully lightweight |
public icon get icon return scs get icon | returns an icon representing the component or null if none |
public hashtable get actions return scs get actions | returns a table of actions supported by the component |
public void release object object id id throws ioexception these should just be ignored thread dump stack we definitely don t want to do this get replicated object client release object id | drops the object with the given id from the local cache and tells |
public void load delegate load | called when the object should be loaded |
public void send clear board if m s server null send message white board global protocol clear board else clear board | sends a clear board message or if we dont have a server clears |
public int get percent loaded return delegate get percent loaded | returns the percent of the object that has loaded |
public string get property string property name return version get property property name | returns the named property |
public object id get object id return delegate get object id | returns the object id if available |
public object id get object id object obj return get replicated object client get object id obj | returns the object id for the given shared object or null if the |
public boolean shutdown return delegate shutdown | called to inform the component that it is being closed and or disposed |
public void add property change listener property change listener listener if listeners null listeners add property change listener listener else delegate add property change listener listener | adds a java beans style property change listener |
public void remove property change listener property change listener listener if listeners null listeners remove property change listener listener else delegate remove property change listener listener | removes a java beans style property change listener |
public window state get window state return delegate get window state | returns a shared object containing the window state of this component view |
public void send show mouse mouse event me event int x me event get x int y me event get y if me event get id mouse event mouse released me event get modifiers mouse event button2 mask 0 me event get modifiers mouse event button3 mask 0 x 1 y 1 string s command get local id x y if m s server null send message white board global protocol showmouse s command else m v items set last mouse string s command | sends a show mouse message or sets the mouse command in the shared |
public void broadcast change change change object id id broadcast change change id true | broadcasts a change to other replicas of the object identified by id |
public void send message string s message if m s server null try new print writer m s server get output stream true println s message system out println sent s message catch ioexception ioe system out println unable to send message | send a new item out to everybody on the white board |
public boolean is current version embedded object descriptor desc return desc instanceof version descriptor version descriptor desc is current | returns true if the multiplexer thinks that the given descriptor |
public vector get multiplexed descriptors return vector descriptors clone | returns a vector of the original descriptors for all of the objects |
public object get request tag return request tag | returns the tag that will be passed to the component view source |
public embedded object descriptor get embedded object descriptor object obj embedded object descriptor result null if obj instanceof embedded object descriptor result embedded object descriptor obj return result | returns an embedded object descriptor extracted from the given object |
public boolean is dispatch thread return get replicated object client is dispatch thread | returns true if the calling thread is the thread that dispatches |
public void set date date d object old this date this date d first date d clone first set date 1 int mon first get month int day 31 last new date first get time day ticks in day while mon last get month day last new date first get time day ticks in day if month get selected index d get month month set selected index d get month year set text d get year 1900 repaint listeners fire property change date old d | sets the widget to the selected date |
public void add replicated object client listener replicated object client listener l | adds a listener for events e |
public void set local color color c local m c local color c local m lcc local color canvas set color c local | set what the local color is |
public void remove replicated object client listener replicated object client listener l | removes a listener for events e |
public void add undo handler listener undo handler listener l if listeners contains l listeners add element l | adds a listener |
protected void fire operation started event undo handler event evt vector v vector listeners clone for enumeration e v elements e has more elements undo handler listener e next element operation started evt | fires an event |
protected void fire operation completed event undo handler event evt vector v vector listeners clone for enumeration e v elements e has more elements undo handler listener e next element operation completed evt | fires an event |
public object get network status return get replicated object client get network status | experimental method for returning indication of network status |
public void set request tag object tag this request tag tag remove from cache on close false | returns the tag that will be passed to the component view source |
public void set local color canvas local color canvas lcc local color canvas m lcc local color canvas lcc local color canvas | set the canvas to which the local current should be echoed |
public void reset renderer renderer new permissions tree renderer def renderer tree set cell renderer renderer | resets the renderer on the tree |
public void component shown component event evt jtext field focus fld id if id get text length 0 focus fld pw focus fld request default focus focus fld request focus focus fld grab focus id set editable true | enable focus on the appropriate field when were shown |
protected void check menu items embedded object path menu path | may be overriden to check additional menu items to see if changes |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.