1 |
/* AbstractPreferences - Partial implementation of a Preference node |
/* AbstractPreferences -- Partial implementation of a Preference node |
2 |
Copyright (C) 2001, 2003 Free Software Foundation, Inc. |
Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
1197 |
* @exception BackingStoreException when the backing store cannot be |
* @exception BackingStoreException when the backing store cannot be |
1198 |
* reached |
* reached |
1199 |
*/ |
*/ |
1200 |
abstract protected String[] keysSpi() throws BackingStoreException; |
protected abstract String[] keysSpi() throws BackingStoreException; |
1201 |
|
|
1202 |
/** |
/** |
1203 |
* Returns the value associated with the key in this preferences node or |
* Returns the value associated with the key in this preferences node or |
1207 |
* key is valid, not null and that the node has not been removed. |
* key is valid, not null and that the node has not been removed. |
1208 |
* <code>key()</code> will catch any exceptions that this method throws. |
* <code>key()</code> will catch any exceptions that this method throws. |
1209 |
*/ |
*/ |
1210 |
abstract protected String getSpi(String key); |
protected abstract String getSpi(String key); |
1211 |
|
|
1212 |
/** |
/** |
1213 |
* Sets the value of the given preferences entry for this node. |
* Sets the value of the given preferences entry for this node. |
1220 |
* Called by <code>put()</code> with this node locked after checking that |
* Called by <code>put()</code> with this node locked after checking that |
1221 |
* key and value are valid and non-null. |
* key and value are valid and non-null. |
1222 |
*/ |
*/ |
1223 |
abstract protected void putSpi(String key, String value); |
protected abstract void putSpi(String key, String value); |
1224 |
|
|
1225 |
/** |
/** |
1226 |
* Removes the given key entry from this preferences node. |
* Removes the given key entry from this preferences node. |
1233 |
* Called by <code>remove()</code> with this node locked after checking |
* Called by <code>remove()</code> with this node locked after checking |
1234 |
* that the key is valid and non-null. |
* that the key is valid and non-null. |
1235 |
*/ |
*/ |
1236 |
abstract protected void removeSpi(String key); |
protected abstract void removeSpi(String key); |
1237 |
|
|
1238 |
/** |
/** |
1239 |
* Writes all entries of this preferences node that have not yet been |
* Writes all entries of this preferences node that have not yet been |
1245 |
* <p> |
* <p> |
1246 |
* Called (indirectly) by <code>flush()</code> with this node locked. |
* Called (indirectly) by <code>flush()</code> with this node locked. |
1247 |
*/ |
*/ |
1248 |
abstract protected void flushSpi() throws BackingStoreException; |
protected abstract void flushSpi() throws BackingStoreException; |
1249 |
|
|
1250 |
/** |
/** |
1251 |
* Writes all entries of this preferences node that have not yet been |
* Writes all entries of this preferences node that have not yet been |
1257 |
* <p> |
* <p> |
1258 |
* Called (indirectly) by <code>sync()</code> with this node locked. |
* Called (indirectly) by <code>sync()</code> with this node locked. |
1259 |
*/ |
*/ |
1260 |
abstract protected void syncSpi() throws BackingStoreException; |
protected abstract void syncSpi() throws BackingStoreException; |
1261 |
|
|
1262 |
/** |
/** |
1263 |
* Clears this node from this VM and removes it from the backing store. |
* Clears this node from this VM and removes it from the backing store. |
1266 |
* Called (indirectly) by <code>removeNode()</code> with this node locked |
* Called (indirectly) by <code>removeNode()</code> with this node locked |
1267 |
* after all the sub nodes of this node have already been removed. |
* after all the sub nodes of this node have already been removed. |
1268 |
*/ |
*/ |
1269 |
abstract protected void removeNodeSpi() throws BackingStoreException; |
protected abstract void removeNodeSpi() throws BackingStoreException; |
1270 |
} |
} |