com.sdm.quasar.client.core.common.sysinfo
Class DefaultSystemInfoRegistry

java.lang.Object
  extended bycom.sdm.quasar.client.core.common.sysinfo.DefaultSystemInfoRegistry
All Implemented Interfaces:
SystemInfoProvider, SystemInfoRegistry

public class DefaultSystemInfoRegistry
extends java.lang.Object
implements SystemInfoRegistry, SystemInfoProvider

Version:
1.$Revision$
Author:
Thomas Wolf

Field Summary
static java.lang.String INFO_CLASS_TAG
          tag for info-xml: the information classe tag.
static java.lang.String INFO_CLASSES_TAG
          tag for info-xml: the container for all information classes.
static java.lang.String INFO_SYSTEM_INFORMATION_TAG
          tag for info-xml: the SystemInfoProvider registered.
 
Constructor Summary
DefaultSystemInfoRegistry()
          Creates a new DefaultSystemInfoRegistry.
 
Method Summary
 void collectSystemInfo(SystemInfoNode root, SystemInfoOptions options)
          Builds the system information tree upon local information of the implementor.
 java.lang.String[] getAllInfoClasses()
          Returns all classes for system information.
 SystemInfoProvider[] getAllSystemInfoProviders(java.lang.String infoClass)
          Returns an array containing all registered SystemInfoProvider for the given information class.
 void registerSystemInfoProvider(java.lang.String infoClass, SystemInfoProvider systemInfoProvider)
          Registers the given SystemInfoProvider for the given information class.
 void unregisterSystemInfoProvider(SystemInfoProvider systemInfoProvider)
          Unregisters the previous registered SystemInfoProvider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFO_CLASSES_TAG

public static final java.lang.String INFO_CLASSES_TAG
tag for info-xml: the container for all information classes.

See Also:
Constant Field Values

INFO_CLASS_TAG

public static final java.lang.String INFO_CLASS_TAG
tag for info-xml: the information classe tag.

See Also:
Constant Field Values

INFO_SYSTEM_INFORMATION_TAG

public static final java.lang.String INFO_SYSTEM_INFORMATION_TAG
tag for info-xml: the SystemInfoProvider registered.

See Also:
Constant Field Values
Constructor Detail

DefaultSystemInfoRegistry

public DefaultSystemInfoRegistry()
Creates a new DefaultSystemInfoRegistry.

Method Detail

registerSystemInfoProvider

public void registerSystemInfoProvider(java.lang.String infoClass,
                                       SystemInfoProvider systemInfoProvider)
Description copied from interface: SystemInfoRegistry
Registers the given SystemInfoProvider for the given information class.

Specified by:
registerSystemInfoProvider in interface SystemInfoRegistry
Parameters:
infoClass - the info class to register under (not null)
See Also:
SystemInfoRegistry.registerSystemInfoProvider(java.lang.String, com.sdm.quasar.client.core.common.sysinfo.SystemInfoProvider)

unregisterSystemInfoProvider

public void unregisterSystemInfoProvider(SystemInfoProvider systemInfoProvider)
Description copied from interface: SystemInfoRegistry
Unregisters the previous registered SystemInfoProvider.

Specified by:
unregisterSystemInfoProvider in interface SystemInfoRegistry
Parameters:
systemInfoProvider - the SystemInfoProvider to unregister (not null)
See Also:
SystemInfoRegistry.unregisterSystemInfoProvider(com.sdm.quasar.client.core.common.sysinfo.SystemInfoProvider)

getAllInfoClasses

public java.lang.String[] getAllInfoClasses()
Description copied from interface: SystemInfoRegistry
Returns all classes for system information.

Specified by:
getAllInfoClasses in interface SystemInfoRegistry
See Also:
SystemInfoRegistry.getAllInfoClasses()

getAllSystemInfoProviders

public SystemInfoProvider[] getAllSystemInfoProviders(java.lang.String infoClass)
Description copied from interface: SystemInfoRegistry
Returns an array containing all registered SystemInfoProvider for the given information class.

Specified by:
getAllSystemInfoProviders in interface SystemInfoRegistry
Parameters:
infoClass - the information class to get all SystemInfoProvider for (not null)
See Also:
SystemInfoRegistry.getAllSystemInfoProviders(java.lang.String)

collectSystemInfo

public void collectSystemInfo(SystemInfoNode root,
                              SystemInfoOptions options)
Description copied from interface: SystemInfoProvider
Builds the system information tree upon local information of the implementor. The system information tree can be used within development by inspecting the system; so implementors should append their internal state (depending on the details settings within SystemInfoOptions). The information can be appended to the tree by adding new child SystemInformationNodes to the root node given using the SystemInfoNode.createChild(String) method and by setting information attributes the these nodes or the given root node.

Specified by:
collectSystemInfo in interface SystemInfoProvider
Parameters:
root - the SystemInfoNode to add information to (guaranteed to be not null)
options - contains additional options, that might influence the amount of information added to the tree (guaranteed to be not null)
See Also:
SystemInfoProvider.collectSystemInfo(com.sdm.quasar.client.core.common.sysinfo.SystemInfoNode, com.sdm.quasar.client.core.common.sysinfo.SystemInfoOptions)