org.cts.registry
Class RegistryManager

java.lang.Object
  extended by org.cts.registry.RegistryManager

public final class RegistryManager
extends Object

This class manages all supported registry. It permits to declare a custom registry or remove one.

Author:
Erwan Bocher

Constructor Summary
RegistryManager()
          Create a default registry manager without any declared registry.
 
Method Summary
 void addRegistry(Registry registryClass)
          Declare a registry to the RegistryManager
 void addRegistry(Registry registry, boolean replace)
          Declare a registry to the RegistryManager An existing registry can be replaced by a new one.
 void addRegistryManagerListener(RegistryManagerListener listener)
          Adds a listener.
 boolean contains(String name)
          Gets if the registry with the given name has been registered.
 Registry getRegistry(String registryName)
          Return the corresponding registry based on its name
 String[] getRegistryNames()
          Gets all registered registry names
 boolean removeRegistryManagerListener(RegistryManagerListener listener)
          Remove the listener if it is present in the listener list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryManager

public RegistryManager()
Create a default registry manager without any declared registry. To load a registry you must call the addRegistry ig : addRegistry(new IGNFRegistry());

Method Detail

addRegistryManagerListener

public void addRegistryManagerListener(RegistryManagerListener listener)
Adds a listener.

Parameters:
listener - a listener

removeRegistryManagerListener

public boolean removeRegistryManagerListener(RegistryManagerListener listener)
Remove the listener if it is present in the listener list

Parameters:
listener -
Returns:
true if the listener was successfully removed. False if the specified parameter was not a listener

addRegistry

public void addRegistry(Registry registryClass)
Declare a registry to the RegistryManager

Parameters:
registryClass -

addRegistry

public void addRegistry(Registry registry,
                        boolean replace)
Declare a registry to the RegistryManager An existing registry can be replaced by a new one.

Parameters:
registryClass -
replace -

contains

public boolean contains(String name)
Gets if the registry with the given name has been registered.

Parameters:
name - a registry name ie epsg, ignf, esri...
Returns:
true if registered

getRegistryNames

public String[] getRegistryNames()
Gets all registered registry names

Returns:
an array of names

getRegistry

public Registry getRegistry(String registryName)
Return the corresponding registry based on its name

Parameters:
string -
Returns:


Copyright © 2014 IRSTV CNRS-FR-2488. All Rights Reserved.