things.universe
Interface UniverseRegistry

All Superinterfaces:
Verbose
All Known Implementing Classes:
UniverseRegistry_Simple

public interface UniverseRegistry
extends Verbose

Universe registry interface. The implementation is responsible for maintaining the configuration of universes and manufacturing of access objects.

There are two ways to refer to a Universe-UniverseId or name. The UniverseId is globally valid can be expressed as an object or a String. A name is a local unique String name that can only be used with a single registry.

Universe objects can found with a URI that is : or :

There are four types of universes:
UNIVERSE_LOCAL - Local system
UNIVERSE_DEFAULT - Alias for the local default

The implementation will decide the method of configuration.

Version:
1.0

Version History

EPG - Initial - 18 NOV 04
 
Author:
Erich P. Gatejen

Field Summary
static int UNIVERSE_INVALID
          Types of universe
static int UNIVERSE_LOCAL
           
static java.lang.String UNIVERSE_LOCAL_name
           
 
Method Summary
 Universe getAccessor(java.lang.String name)
          Get an accessor to a universe by local name.
 Universe getAccessor(UniverseID theUniverse)
          Get an accessor to a universe.
 Clearance getClearance(java.lang.String name)
          Get an clearance for a universe by localName
 Clearance getClearance(UniverseID theUniverse)
          Get an clearance for a universe by id.
 void loadRegistry(ThingsPropertyView config)
          Load a registry from a configuration node.
 void register(int type, ThingsPropertyView config)
          Register a universe.
 void safetyTheRegistry()
          Safety the Registry.
 
Methods inherited from interface things.common.Verbose
isVerbose, screech, verboseOff, verboseOn
 

Field Detail

UNIVERSE_INVALID

static final int UNIVERSE_INVALID
Types of universe

See Also:
Constant Field Values

UNIVERSE_LOCAL

static final int UNIVERSE_LOCAL
See Also:
Constant Field Values

UNIVERSE_LOCAL_name

static final java.lang.String UNIVERSE_LOCAL_name
See Also:
Constant Field Values
Method Detail

getAccessor

Universe getAccessor(UniverseID theUniverse)
                     throws UniverseException
Get an accessor to a universe.

Parameters:
theUniverse - ID for the universe to access
Returns:
a Universe or null if the universe doesn't exist ( or isn't loaded ).
Throws:
UniverseException

getAccessor

Universe getAccessor(java.lang.String name)
                     throws UniverseException
Get an accessor to a universe by local name.

Parameters:
name - the name
Returns:
a Universe or null if the universe doesn't exist ( or isn't loaded ).
Throws:
UniverseException

getClearance

Clearance getClearance(UniverseID theUniverse)
                       throws UniverseException
Get an clearance for a universe by id.

Parameters:
theUniverse - ID for the universe to access
Returns:
a Universe or null if the universe doesn't exist ( or isn't loaded ).
Throws:
UniverseException

getClearance

Clearance getClearance(java.lang.String name)
                       throws UniverseException
Get an clearance for a universe by localName

Parameters:
name - the local name
Returns:
a Universe or null if the universe doesn't exist ( or isn't loaded ).
Throws:
UniverseException

register

void register(int type,
              ThingsPropertyView config)
              throws UniverseException
Register a universe.

Parameters:
type - numeric as specific in this class
config - information
Throws:
UniverseException

loadRegistry

void loadRegistry(ThingsPropertyView config)
                  throws UniverseException
Load a registry from a configuration node. See documentation above for expected properties.

Parameters:
config - a configuration node
Throws:
UniverseException
See Also:
ThingsPropertyView

safetyTheRegistry

void safetyTheRegistry()
                       throws UniverseException
Safety the Registry. If the configuration node supports it, the registry will be checkpointed and/or saved. This effectively sets the last known good configuration.

Throws:
UniverseException


Things.