|
Eclipse Rich Ajax Platform Release 1.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.rwt.service.FileSettingStore
This ISettingStore implementation persists all settings on the
file system using Java Properties.
| Field Summary | |
static java.lang.String |
FILE_SETTING_STORE_DIR
This key (value "org.eclipse.rwt.service.FileSettingStore.dir") can be used to configure the working directory for file settings stores. |
| Constructor Summary | |
FileSettingStore(java.io.File workDir)
Create a FileSettingStore instance. |
|
| Method Summary | |
void |
addSettingStoreListener(SettingStoreListener listener)
Attaches an SettingStoreListener to this ISettingStore. |
java.lang.String |
getAttribute(java.lang.String name)
Returns the attribute stored under the specified name in this ISettingStore, or null if no attribute is stored under
that name. |
java.util.Enumeration |
getAttributeNames()
Returns an Enumeration of String objects with the names
of all attributes in this ISettingStore. |
java.lang.String |
getId()
Returns the unique identifier of this setting store |
void |
loadById(java.lang.String id)
Replace the contents of this setting store with all attributes persisted under the given id. |
void |
removeAttribute(java.lang.String name)
Removes the attribute stored under the specified name from this ISettingStore. |
void |
removeSettingStoreListener(SettingStoreListener listener)
Removes an SettingStoreListener from this ISettingStore. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Stores an attribute to this ISettingStore, using the name
specified. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String FILE_SETTING_STORE_DIR
RWTFileSettingStoreFactory and
WorkbenchFileSettingStoreFactory.
| Constructor Detail |
public FileSettingStore(java.io.File workDir)
FileSettingStore instance. The store will be initialized
with a unique random id and will contain no attributes. Use
loadById(String) to initialize an existing store with previously
persisted attributes.
workDir - a non-null File instance denoting an existing directory,
which will be used by this class persist its settings.
java.lang.NullPointerException - if the argument workDir is null
java.lang.IllegalArgumentException - if the argument workDir is not a directoryloadById(String)| Method Detail |
public java.lang.String getId()
ISettingStore
getId in interface ISettingStorepublic java.lang.String getAttribute(java.lang.String name)
ISettingStoreISettingStore, or null if no attribute is stored under
that name.
getAttribute in interface ISettingStorename - a non-null String specifying the name of the attribute
null
public void setAttribute(java.lang.String name,
java.lang.String value)
throws SettingStoreException
ISettingStoreISettingStore, using the name
specified. If an attribute with the same name is already stored in that
ISettingStore the previous value is replaced.
Any attribute stored to this ISettingStore using this method is considered persisted from that point on.
If the value argument is null, this has the same effect
as calling ISettingStore.removeAttribute(String).
SettingStoreListeners attached to this instance will be notified
after an attribute has been stored.
setAttribute in interface ISettingStorename - the name of the attribute; cannot be nullvalue - the String to store; may be null
SettingStoreException - if the load operation failed to complete
normallypublic java.util.Enumeration getAttributeNames()
ISettingStoreEnumeration of String objects with the names
of all attributes in this ISettingStore.
getAttributeNames in interface ISettingStoreEnumeration; never null
public void loadById(java.lang.String id)
throws SettingStoreException
ISettingStoreid.
The attributes of this setting store before the load operation will remain
associated with the old id, but will be removed from this store instance.
SettingStoreListeners attached to this store will receive a
notification for each removed attribute.
During the load operation this store will be filled with the attributes
associated with the new id value. SettingStoreListeners attached
to this store will receive a notification for each added attribute.
After the load operation this store will only hold attributes associated with the new id value.
It is important to note that this operation does not create a new setting
store, so that listeners still remain associated with the same store
instance. Instead the contents of this setting store are replaced
with the contents associated with the given id.
loadById in interface ISettingStoreid - a non-null; non-empty; non-whitespace-only String
SettingStoreException - if the load operation failed to complete
normally
public void removeAttribute(java.lang.String name)
throws SettingStoreException
ISettingStoreISettingStore. If no attribute is stored under the specified name,
this method does nothing.
SettingStoreListeners attached to this instance will be notified
after an attribute has been removed.
removeAttribute in interface ISettingStorename - the name of the attribute to remove;
cannot be null
SettingStoreException - if the remove operation failed to complete
normallypublic void addSettingStoreListener(SettingStoreListener listener)
ISettingStoreSettingStoreListener to this ISettingStore.
Listeners attached to this instance will notified of changes in the store.
addSettingStoreListener in interface ISettingStorelistener - the SettingStoreListener to add; non-nullpublic void removeSettingStoreListener(SettingStoreListener listener)
ISettingStoreSettingStoreListener from this ISettingStore.
removeSettingStoreListener in interface ISettingStorelistener - the SettingStoreListener to remove; non-null
|
Eclipse Rich Ajax Platform Release 1.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright (c) Innoopract Informationssysteme GmbH and others 2002, 2011. All rights reserved.