public abstract class ResourceManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
listOfResourceLists
_more_
|
static LogUtil.LogCategory |
log_
_more_
|
static LogUtil |
LU
_more_
|
protected java.util.Hashtable |
nameToObject
_more_
|
static java.lang.String |
PROP_RESOURCECHANGE
_more_
|
static java.lang.String |
PROP_RESOURCEREMOVE
_more_
|
protected java.util.List |
resources
_more_
|
protected java.util.List |
usersList
_more_
|
protected java.lang.String |
writablePath
_more_
|
Constructor and Description |
---|
ResourceManager()
no param ctor
|
ResourceManager(XmlEncoder xmlEncoder)
ctor
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to this instance.
|
void |
addUsers(NamedObject object)
_more_
|
void |
doExport(NamedObject object)
_more_
|
void |
doExport(NamedObject object,
java.lang.String file)
_more_
|
NamedObject |
doImport()
_more_
|
NamedObject |
doImport(boolean makeUnique)
_more_
|
NamedObject |
doImport(java.lang.Object o,
boolean forceUnique)
_more_
|
java.lang.String |
doNew(java.awt.Component component)
_more_
|
java.lang.String |
doNew(java.awt.Component component,
java.lang.String label)
_more_
|
java.lang.String |
doNew(java.awt.Component component,
java.lang.String label,
java.lang.String initName,
java.lang.String tooltip)
_more_
|
java.lang.String |
doSaveAs(NamedObject o,
java.awt.Component component)
_more_
|
protected void |
firePropertyChange(java.beans.PropertyChangeEvent event)
Fires a PropertyChangeEvent.
|
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Fires a PropertyChangeEvent.
|
NamedObject |
getDefault()
_more_
|
protected XmlEncoder |
getEncoder()
create if needed and return the XmlEncoder
|
protected java.lang.String |
getExportContents(NamedObject object,
java.lang.String file)
_more_
|
java.util.List |
getFileFilters()
_more_
|
java.lang.String |
getFileSuffix()
_more_
|
NamedObject |
getObject(java.lang.String name)
_more_
|
java.util.List |
getReadFileFilters()
_more_
|
java.util.List |
getResources()
_more_
|
int |
getResourceTimestamp()
_more_
|
java.lang.String |
getTitle()
_more_
|
int |
getUsersIndex(NamedObject object)
_more_
|
NamedObject |
getUsersObject(java.lang.String name)
_more_
|
java.util.List |
getWriteFileFilters()
_more_
|
boolean |
hasUsers(java.lang.String name)
_more_
|
void |
init(ResourceCollection resources)
_more_
|
protected void |
initDone()
_more_
|
protected java.lang.Object |
initResource(ResourceCollection resources,
int index)
_more_
|
boolean |
isUsers(NamedObject object)
_more_
|
protected java.lang.Object |
processObject(java.lang.Object o)
_more_
|
protected void |
reloadResources()
_more_
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from this instance.
|
void |
removeUsers(NamedObject object)
_more_
|
boolean |
resourceExists(java.lang.String name)
_more_
|
protected boolean |
shouldWeIgnoreThisXml(java.lang.String xml)
_more_
|
java.lang.Object |
toObject(java.lang.String xml)
_more_
|
java.lang.Object |
toObject(java.lang.String xml,
java.lang.String filename)
_more_
|
public static final java.lang.String PROP_RESOURCECHANGE
public static final java.lang.String PROP_RESOURCEREMOVE
public static final LogUtil LU
public static LogUtil.LogCategory log_
protected java.util.Hashtable nameToObject
protected java.util.List usersList
protected java.lang.String writablePath
protected java.util.List listOfResourceLists
protected java.util.List resources
public ResourceManager()
public ResourceManager(XmlEncoder xmlEncoder)
xmlEncoder
- The encoder to usepublic void init(ResourceCollection resources)
resources
- protected java.lang.Object initResource(ResourceCollection resources, int index)
resources
- _more_index
- _more_public NamedObject getDefault()
public int getResourceTimestamp()
protected void reloadResources()
public boolean resourceExists(java.lang.String name)
name
- protected void initDone()
protected java.lang.Object processObject(java.lang.Object o)
o
- public java.lang.String getTitle()
public int getUsersIndex(NamedObject object)
object
- public NamedObject getObject(java.lang.String name)
name
- public java.util.List getResources()
public boolean isUsers(NamedObject object)
object
- public void removeUsers(NamedObject object)
object
- public void addUsers(NamedObject object)
object
- protected XmlEncoder getEncoder()
public java.util.List getWriteFileFilters()
public java.util.List getReadFileFilters()
public java.util.List getFileFilters()
public java.lang.String getFileSuffix()
public void doExport(NamedObject object)
object
- protected java.lang.String getExportContents(NamedObject object, java.lang.String file)
object
- file
- public void doExport(NamedObject object, java.lang.String file)
object
- file
- public NamedObject doImport(java.lang.Object o, boolean forceUnique)
o
- forceUnique
- public NamedObject doImport()
public NamedObject doImport(boolean makeUnique)
makeUnique
- public java.lang.String doNew(java.awt.Component component)
component
- public java.lang.String doNew(java.awt.Component component, java.lang.String label)
component
- label
- public java.lang.String doNew(java.awt.Component component, java.lang.String label, java.lang.String initName, java.lang.String tooltip)
component
- _more_label
- _more_initName
- _more_tooltip
- _more_public java.lang.String doSaveAs(NamedObject o, java.awt.Component component)
o
- component
- public boolean hasUsers(java.lang.String name)
name
- public NamedObject getUsersObject(java.lang.String name)
name
- public java.lang.Object toObject(java.lang.String xml, java.lang.String filename)
xml
- filename
- _more_public java.lang.Object toObject(java.lang.String xml)
xml
- protected boolean shouldWeIgnoreThisXml(java.lang.String xml)
xml
- public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener to be added.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener to be removed.protected void firePropertyChange(java.beans.PropertyChangeEvent event)
event
- The PropertyChangeEvent.protected void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
propertyName
- The name of the property.oldValue
- The old value of the property.newValue
- The new value of the property.