Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.model.preprocessor
Class SymbolDefinitionSetRegistry

java.lang.Object
  extended by org.eclipse.mtj.core.model.preprocessor.SymbolDefinitionSetRegistry
All Implemented Interfaces:
IPersistable

public class SymbolDefinitionSetRegistry
extends Object
implements IPersistable

Provides a registry of SymbolDefinitionSet instances for use by various parts of the core system.


Field Summary
static SymbolDefinitionSetRegistry singleton
          Singleton instance of the registry
 
Method Summary
 void addDefinitionSet(SymbolDefinitionSet definitions)
          Add the specified SymbolDefinitions object to the registry of definitions.
 SymbolDefinitionSet addNewDefinitionSet(String name)
          Create and add a new SymbolDefinitions object to the registry of definitions with the specified name.
 void addSymbolDefinitionSetChangeListener(ISymbolDefinitionSetChangeListener listener)
           
 void clear()
          Clear all of the registered SymbolDefinitions objects.
 String[] getAllDefinitionSetNames()
          Return all of the definition names registered.
 SymbolDefinitionSet[] getAllSetDefinitions()
          Return all of the definitions registered.
 SymbolDefinitionSet getSymbolDefinitionSet(String name)
          Return the SymbolDefinitions instance registered with the specified name or null if the object cannot be found.
 void load()
          Load the contents of the symbol definitions registry from the storage file in the plug-in state location.
 void loadUsing(IPersistenceProvider persistenceProvider)
          Load the state of this object using the specified persistence state information.
 void removeDefinitionSet(String setName)
          Remove the specified definition set from the registry.
 void removeDefinitionSet(SymbolDefinitionSet set)
          Remove the specified definition set from the registry.
 void removeSymbolDefinitionSetChangeListener(ISymbolDefinitionSetChangeListener listener)
           
 void store()
          Store out the contents of the registry into the standard device storage file in the plug-in state location.
 void storeUsing(IPersistenceProvider persistenceProvider)
          Save the state of this object using the specified persistence state information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

singleton

public static final SymbolDefinitionSetRegistry singleton
Singleton instance of the registry

Method Detail

addDefinitionSet

public void addDefinitionSet(SymbolDefinitionSet definitions)
                      throws PersistenceException
Add the specified SymbolDefinitions object to the registry of definitions.

Parameters:
definitions -
Throws:
PersistenceException
IllegalStateException - if the provided definition set has a null name.

addNewDefinitionSet

public SymbolDefinitionSet addNewDefinitionSet(String name)
                                        throws PersistenceException
Create and add a new SymbolDefinitions object to the registry of definitions with the specified name.

Parameters:
name -
Returns:
Throws:
PersistenceException

addSymbolDefinitionSetChangeListener

public void addSymbolDefinitionSetChangeListener(ISymbolDefinitionSetChangeListener listener)
Parameters:
listener -

clear

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

Throws:
PersistenceException

getAllDefinitionSetNames

public String[] getAllDefinitionSetNames()
                                  throws PersistenceException
Return all of the definition names registered.

Returns:
Throws:
PersistenceException

getAllSetDefinitions

public SymbolDefinitionSet[] getAllSetDefinitions()
                                           throws PersistenceException
Return all of the definitions registered.

Returns:
Throws:
PersistenceException

getSymbolDefinitionSet

public SymbolDefinitionSet getSymbolDefinitionSet(String name)
                                           throws PersistenceException
Return the SymbolDefinitions instance registered with the specified name or null if the object cannot be found.

Parameters:
name -
Returns:
Throws:
PersistenceException

load

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

Throws:
PersistenceException

loadUsing

public void loadUsing(IPersistenceProvider persistenceProvider)
               throws PersistenceException
Description copied from interface: IPersistable
Load the state of this object using the specified persistence state information.

Specified by:
loadUsing in interface IPersistable
Throws:
PersistenceException
See Also:
IPersistable.loadUsing(org.eclipse.mtj.core.persistence.IPersistenceProvider)

removeDefinitionSet

public void removeDefinitionSet(String setName)
Remove the specified definition set from the registry. Does nothing if the specified set cannot be found in the registry.

Parameters:
setName -

removeDefinitionSet

public void removeDefinitionSet(SymbolDefinitionSet set)
Remove the specified definition set from the registry. Does nothing if the specified set cannot be found in the registry.

Parameters:
set -

removeSymbolDefinitionSetChangeListener

public void removeSymbolDefinitionSetChangeListener(ISymbolDefinitionSetChangeListener listener)
Parameters:
listener -

store

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

Throws:
PersistenceException
TransformerException
IOException

storeUsing

public void storeUsing(IPersistenceProvider persistenceProvider)
                throws PersistenceException
Description copied from interface: IPersistable
Save the state of this object using the specified persistence state information.

Specified by:
storeUsing in interface IPersistable
Throws:
PersistenceException
See Also:
IPersistable.storeUsing(org.eclipse.mtj.core.persistence.IPersistenceProvider)

Mobile Tools for Java
Release 1.0