Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.symbol
Interface ISymbolSetRegistry

All Superinterfaces:
IPersistable

public interface ISymbolSetRegistry
extends IPersistable

The SymbolSet registry is the main entry point that is used to manage the SymbolSets that are currently available.

Clients must use MTJCore.getSymbolSetRegistry() method to retrieve an instance of ISymbolSetRegistry.

Since:
1.0
Restriction:
This interface is not intended to be implemented by clients.

Field Summary
 
Fields inherited from interface org.eclipse.mtj.core.persistence.IPersistable
CLASS_PERSISTABLE_ATTRIBUTE, ID_PERSISTABLE_ATTRIBUTE, KEY_PERSISTABLE_ATTRIBUTE, PROPERTY_PERSISTABLE_ELEMENT, REFID_PERSISTABLE_ATTRIBUTE, VALUE_PERSISTABLE_ATTRIBUTE
 
Method Summary
 void addSymbolSet(ISymbolSet symbolset)
          Add the specified SymbolSet object to the registry of SymbolSets.
 void addSymbolSet(List<ISymbolSet> ss)
          Add an array of SymbolSet to the registry
 void addSymbolSetRegistryChangeListener(ISymbolSetRegistryChangeListener listener)
          Adds the listener to the collection of listeners who will be notified when the SymbolSetRegistry state changes.
 void clear()
          Clear all of the registered SymbolSet objects.
 String[] getAllSymbolSetNames()
          Return all of the SymbolSet names registered.
 ISymbolSet[] getAllSymbolSets()
          Returns an array of the SymbolSets contained in this registry.
 ISymbolSet getSymbolSet(String name)
          Return the SymbolSet instance registered with the specified name or null if the object cannot be found.
 void load()
          Load the contents of the symbol SymbolSetRegistry from the storage file in the plug-in state location.
 void removeSymbolSet(String setName)
          Remove the specified SymbolSet set from the registry.
 void removeSymbolSetRegistryChangeListener(ISymbolSetRegistryChangeListener listener)
          Removes the listener from the collection of listeners who will be notified when the SymbolSetRegistry state changes.
 void store()
          Store out the contents of the SymbolSetRegistry into the standard device storage file in the plug-in state location.
 
Methods inherited from interface org.eclipse.mtj.core.persistence.IPersistable
loadUsing, storeUsing
 

Method Detail

addSymbolSet

void addSymbolSet(ISymbolSet symbolset)
                  throws PersistenceException
Add the specified SymbolSet object to the registry of SymbolSets.

Parameters:
symbolset - the SymbolSet to be added to the registry.
Throws:
PersistenceException - if any error occur while loading the persisted information.
IllegalStateException - if the provided definition set has a null name.

addSymbolSet

void addSymbolSet(List<ISymbolSet> ss)
                  throws PersistenceException
Add an array of SymbolSet to the registry

Parameters:
ss - symbol set array
Throws:
PersistenceException - if any error occur while loading the persisted information.

addSymbolSetRegistryChangeListener

void addSymbolSetRegistryChangeListener(ISymbolSetRegistryChangeListener listener)
Adds the listener to the collection of listeners who will be notified when the SymbolSetRegistry state changes. The listener is notified by invoking one of methods defined in the ISymbolSetRegistryChangeListener interface.

Parameters:
listener - the listener that should be notified when the SymbolSetRegistry state changes.

clear

void clear()
           throws PersistenceException
Clear all of the registered SymbolSet objects.

Throws:
PersistenceException - if any error occur while loading the persisted information.

getAllSymbolSetNames

String[] getAllSymbolSetNames()
                              throws PersistenceException
Return all of the SymbolSet names registered.

Returns:
all of the SymbolSet names registered.
Throws:
PersistenceException - if any error occur while loading the persisted information.

getAllSymbolSets

ISymbolSet[] getAllSymbolSets()
                              throws PersistenceException
Returns an array of the SymbolSets contained in this registry.

Returns:
array of the SymbolSets contained in this registry.
Throws:
PersistenceException - if any error occur while loading the persisted information.

getSymbolSet

ISymbolSet getSymbolSet(String name)
                        throws PersistenceException
Return the SymbolSet instance registered with the specified name or null if the object cannot be found.

Parameters:
name - the SymbolSet name.
Returns:
the SymbolSet instance registered with the specified name or null if the object cannot be found.
Throws:
PersistenceException - if any error occur while loading the persisted information.

load

void load()
          throws PersistenceException
Load the contents of the symbol SymbolSetRegistry from the storage file in the plug-in state location.

Throws:
PersistenceException - if any error occur while loading the persisted information.

removeSymbolSet

void removeSymbolSet(String setName)
Remove the specified SymbolSet set from the registry. Does nothing if the specified set cannot be found in the registry.

Parameters:
setName - the name of the SymbolSet to be removed from the registry.

removeSymbolSetRegistryChangeListener

void removeSymbolSetRegistryChangeListener(ISymbolSetRegistryChangeListener listener)
Removes the listener from the collection of listeners who will be notified when the SymbolSetRegistry state changes.

Parameters:
listener - the listener that should no longer be notified when the SymbolSetRegistry state changes.

store

void store()
           throws PersistenceException,
                  TransformerException,
                  IOException
Store out the contents of the SymbolSetRegistry into the standard device storage file in the plug-in state location.

Throws:
PersistenceException - if any error occur while writing the persisted information.
TransformerException - if any error occur while writing the persisted information.
IOException - if any error occur while writing the persisted information.

Mobile Tools for Java
Release 1.0