|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.system.pm.XMLAttributePersistenceManager
public class XMLAttributePersistenceManager
XMLAttributePersistenceManager
Field Summary | |
---|---|
static String |
AL_ATTRIBUTE_ELEMENT
|
static String |
AL_DATE_ATTRIBUTE
|
static String |
AL_FALSE_VALUE
|
static String |
AL_ID_ATTRIBUTE
|
static String |
AL_NAME_ATTRIBUTE
|
static String |
AL_NULL_ATTRIBUTE
|
static String |
AL_ROOT_ELEMENT
The XML attribute-list elements and attributes |
static String |
AL_SERIALIZED_ATTRIBUTE
|
static String |
AL_TRUE_VALUE
|
static String |
AL_TYPE_ATTRIBUTE
|
static String |
DATA_DIR_ELEMENT
The XML configuration element |
static String |
DEFAULT_BASE_DIR
Default base directory if one not specified |
Constructor Summary | |
---|---|
XMLAttributePersistenceManager()
Constructs a FileAttributePersistenceManager. |
Method Summary | |
---|---|
void |
create(String version,
Element config)
Initializes the AttributePersistenceManager using the supplied configuration element CONFIG_ELEMENT whose content will be probably different for each particular implementation. |
void |
destroy()
Releases resources and destroys the AttributePersistenceManager. |
boolean |
exists(String id)
Checks if a persistened AttributeList for this particular id exists |
boolean |
getState()
Returns true if the AttributePersistenceManager is "in-service" state, i.e. |
String[] |
listAll()
Returns a String array with all the saved ids under the configured version tag. |
AttributeList |
load(String id)
Persists an AttributeList (name/value pair list), under a specified id. |
void |
remove(String id)
Removes the persisted AttributeList, if exists |
void |
removeAll()
Removes all the persisted data stored under the configured version tag. |
void |
store(String id,
AttributeList attrs)
Uses the specified id to retrieve a previously persisted AttributeList. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DATA_DIR_ELEMENT
public static final String DEFAULT_BASE_DIR
public static final String AL_ROOT_ELEMENT
public static final String AL_ID_ATTRIBUTE
public static final String AL_DATE_ATTRIBUTE
public static final String AL_ATTRIBUTE_ELEMENT
public static final String AL_NAME_ATTRIBUTE
public static final String AL_TYPE_ATTRIBUTE
public static final String AL_NULL_ATTRIBUTE
public static final String AL_SERIALIZED_ATTRIBUTE
public static final String AL_TRUE_VALUE
public static final String AL_FALSE_VALUE
Constructor Detail |
---|
public XMLAttributePersistenceManager()
Method Detail |
---|
public void create(String version, Element config) throws Exception
create
in interface AttributePersistenceManager
version
- a tag to identify the versionconfig
- XML Element to load arbitrary config
Exception
- when any error occurs during createpublic boolean getState()
getState
in interface AttributePersistenceManager
public void destroy()
destroy
in interface AttributePersistenceManager
public void store(String id, AttributeList attrs) throws Exception
store
in interface AttributePersistenceManager
id
- the key for retrieving the data
Exception
- when an error occurspublic AttributeList load(String id) throws Exception
load
in interface AttributePersistenceManager
id
- the key for retrieving the data later on, not nullattrs
- the data to be persisted, not null
Exception
- when data cannot be persistedpublic boolean exists(String id) throws Exception
exists
in interface AttributePersistenceManager
id
- the key of the image
Exception
- on any errorpublic void remove(String id) throws Exception
remove
in interface AttributePersistenceManager
id
- the key of the image
Exception
- when any error occurspublic void removeAll() throws Exception
removeAll
in interface AttributePersistenceManager
Exception
- when any error occurspublic String[] listAll() throws Exception
listAll
in interface AttributePersistenceManager
Exception
- when any error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |