SMACS

smacs.xngr.browser.properties
Class ConfigurationPropertiesXml

java.lang.Object
  extended bysmacs.xngr.browser.properties.ConfigurationPropertiesXml
All Implemented Interfaces:
ConfigurationProperties
Direct Known Subclasses:
PropsConfiguration

public class ConfigurationPropertiesXml
extends Object
implements ConfigurationProperties

Handles the eXchaNGeR configuration document.

Author:
Edwin Dankert

Field Summary
protected  DesktopProperties desktopProperties
           
protected  Document document
           
protected  EditorProperties editorProperties
           
protected  ExplorerProperties explorerProperties
           
protected static Logger log
           
protected static String PROPERTIES_FILE
           
protected  Element root
           
protected  CategoryProperties rootCategoryProperties
           
protected  Vector services
           
protected  URL url
           
protected  ViewerProperties viewerProperties
           
static String XNGR_HOME
           
 
Constructor Summary
ConfigurationPropertiesXml()
           
ConfigurationPropertiesXml(File projectdir)
           
ConfigurationPropertiesXml(File projectdir, String projectfile)
          Creates the Configuration Document wrapper.
 
Method Summary
 void addService(ServiceProperties service)
          Adds a service to the properties.
 DesktopProperties getDesktop()
          Returns the properties for the desktop.
 EditorProperties getEditor()
          Returns the properties for the editor.
 ExplorerProperties getExplorer()
          Returns the properties for the explorer.
 CategoryProperties getRootCategory()
          Returns the root document category.
 Element getRootElement()
          Returns the root of the preferences or null if not applicable
 Vector getServices()
          Returns a list of Service Properties.
 ViewerProperties getViewer()
          Returns the properties for the viewer.
 boolean isShowDesktop()
          Returns true when the desktop is shown.
 ConfigurationProperties newConfigurationProperties(File projectdir)
          Creates the Configuration Document wrapper.
 void removeService(ServiceProperties service)
          Removes a service from the document and the list of services.
 void save()
          Saves the configuration properties to disk.
 void showDesktop(boolean visible)
          Set the desktop (in)visible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final Logger log

XNGR_HOME

public static final String XNGR_HOME

PROPERTIES_FILE

protected static final String PROPERTIES_FILE
See Also:
Constant Field Values

document

protected Document document

desktopProperties

protected DesktopProperties desktopProperties

explorerProperties

protected ExplorerProperties explorerProperties

editorProperties

protected EditorProperties editorProperties

viewerProperties

protected ViewerProperties viewerProperties

rootCategoryProperties

protected CategoryProperties rootCategoryProperties

root

protected Element root

services

protected Vector services

url

protected URL url
Constructor Detail

ConfigurationPropertiesXml

public ConfigurationPropertiesXml()

ConfigurationPropertiesXml

public ConfigurationPropertiesXml(File projectdir)

ConfigurationPropertiesXml

public ConfigurationPropertiesXml(File projectdir,
                                  String projectfile)
Creates the Configuration Document wrapper. It reads in the root element and sets the list of services.

Method Detail

newConfigurationProperties

public ConfigurationProperties newConfigurationProperties(File projectdir)
Description copied from interface: ConfigurationProperties
Creates the Configuration Document wrapper. It reads in the root element and sets the list of services.

Specified by:
newConfigurationProperties in interface ConfigurationProperties

getRootElement

public Element getRootElement()
Description copied from interface: ConfigurationProperties
Returns the root of the preferences or null if not applicable

Specified by:
getRootElement in interface ConfigurationProperties

isShowDesktop

public boolean isShowDesktop()
Returns true when the desktop is shown.

Specified by:
isShowDesktop in interface ConfigurationProperties
Returns:
the desktop visibility.

showDesktop

public void showDesktop(boolean visible)
Set the desktop (in)visible.

Specified by:
showDesktop in interface ConfigurationProperties
Parameters:
visible - true when the desktop should be visible.

getDesktop

public DesktopProperties getDesktop()
Returns the properties for the desktop.

Specified by:
getDesktop in interface ConfigurationProperties
Returns:
the desktop properties.

getEditor

public EditorProperties getEditor()
Returns the properties for the editor.

Specified by:
getEditor in interface ConfigurationProperties
Returns:
the editor properties.

getViewer

public ViewerProperties getViewer()
Returns the properties for the viewer.

Specified by:
getViewer in interface ConfigurationProperties
Returns:
the viewer properties.

getExplorer

public ExplorerProperties getExplorer()
Returns the properties for the explorer.

Specified by:
getExplorer in interface ConfigurationProperties
Returns:
the explorer properties.

getServices

public Vector getServices()
Returns a list of Service Properties.

Specified by:
getServices in interface ConfigurationProperties
Returns:
a list of service properties.

addService

public void addService(ServiceProperties service)
Adds a service to the properties.

Specified by:
addService in interface ConfigurationProperties

removeService

public void removeService(ServiceProperties service)
Removes a service from the document and the list of services.

Specified by:
removeService in interface ConfigurationProperties
Parameters:
service - the service properties.

getRootCategory

public CategoryProperties getRootCategory()
Returns the root document category.

Specified by:
getRootCategory in interface ConfigurationProperties
Returns:
the root category.

save

public void save()
Saves the configuration properties to disk.

Specified by:
save in interface ConfigurationProperties

SMACS