|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
org.molwind.util.MolwindServerConfiguration
public final class MolwindServerConfiguration
Holds the configuration options of the molwind server. This is a singleton as there is only one per server.
| Field Summary | |
|---|---|
static boolean |
DEFAULT_INTERMEDIATE_LAYER
Default intermediate layer flag. |
static int |
DEFAULT_MOLECULES_PER_LEVEL
Default maximum number of molecules per level. |
static double |
DEFAULT_ZOOM
Default zoom factor. |
| Method Summary | |
|---|---|
void |
addWorldLocator(WorldLocator locator)
Adds a world locator used to find worlds. |
void |
addWorldPath(java.lang.String searchPath)
Adds a search path for world data to locate. |
static MolwindServerConfiguration |
getInstance()
Creates a new configuration object and initializes it with default values (lazily loaded). |
static MolwindServerConfiguration |
getInstance(java.lang.String path)
Creates a new configuration object and initializes it with default values (lazily loaded). |
int |
getMoleculesPerLevel()
Get the MoleculesPerLevel value. |
java.lang.String |
getPath()
Get the Path value. |
javax.servlet.ServletContext |
getServletContext()
Get the ServletContext value. |
WorldLocator[] |
getWorldLocators()
Returns an array of world locators. |
java.lang.String[] |
getWorldNames()
Returns a (possibly empty) list of locatable worlds |
java.lang.String[] |
getWorldPaths()
Returns an array of search paths for worlds. |
double |
getZoom()
Get the Zoom value. |
boolean |
isIntermediateLayer()
Get the IntermediateLayer value. |
MolwindWorld |
locateWorld(java.lang.String worldName)
Locates a world with the given name. |
void |
setIntermediateLayer(boolean newIntermediateLayer)
Set the IntermediateLayer value. |
void |
setMoleculesPerLevel(int newMoleculesPerLevel)
Set the MoleculesPerLevel value. |
void |
setPath(java.lang.String newPath)
Set the Path value. |
void |
setServletContext(javax.servlet.ServletContext newServletContext)
Set the ServletContext value. |
void |
setup(Configurable object)
Configures the given object. |
void |
setZoom(double newZoom)
Set the Zoom value. |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_MOLECULES_PER_LEVEL
public static final double DEFAULT_ZOOM
public static final boolean DEFAULT_INTERMEDIATE_LAYER
| Method Detail |
|---|
public static MolwindServerConfiguration getInstance(java.lang.String path)
path - the path to the configuration file
public static MolwindServerConfiguration getInstance()
public java.lang.String getPath()
public void setPath(java.lang.String newPath)
newPath - the new Path valuepublic int getMoleculesPerLevel()
public void setMoleculesPerLevel(int newMoleculesPerLevel)
newMoleculesPerLevel - the new MoleculesPerLevel valuepublic double getZoom()
public void setZoom(double newZoom)
newZoom - the new Zoom valuepublic boolean isIntermediateLayer()
public void setIntermediateLayer(boolean newIntermediateLayer)
newIntermediateLayer - the new IntermediateLayer valuepublic void addWorldPath(java.lang.String searchPath)
searchPath - a path where world data can be foundpublic java.lang.String[] getWorldPaths()
public void addWorldLocator(WorldLocator locator)
locator - the locator to be addedpublic WorldLocator[] getWorldLocators()
public MolwindWorld locateWorld(java.lang.String worldName)
throws java.io.IOException
locateWorld in interface WorldLocatorworldName - the name of the world
java.io.IOException - is thrown upon i/o errorpublic javax.servlet.ServletContext getServletContext()
public void setServletContext(javax.servlet.ServletContext newServletContext)
newServletContext - the new ServletContext value
public void setup(Configurable object)
throws ConfigException
setup in interface Configuratorobject - the object to be configured
ConfigException - is thrown upon config errorpublic java.lang.String[] getWorldNames()
WorldLocator
getWorldNames in interface WorldLocator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||