com.sdm.quasar.client.core.common.sysinfo.services
Class DefaultSystemInfoService

java.lang.Object
  extended bycom.sdm.quasar.client.core.common.sysinfo.services.DefaultSystemInfoService
All Implemented Interfaces:
Service, SystemInfoProvider, SystemInfoRegistry, SystemInfoService

public class DefaultSystemInfoService
extends java.lang.Object
implements SystemInfoService, SystemInfoProvider

Version:
1.$Revision$
Author:
Thomas Wolf

Field Summary
 
Fields inherited from interface com.sdm.quasar.client.core.common.sysinfo.services.SystemInfoService
INFO_CLASS_APPLICATION, INFO_CLASS_DIALOG_HIERARCHY
 
Constructor Summary
DefaultSystemInfoService()
          Creates a new DefaultSystemInfoService.
 
Method Summary
 void collectSystemInfo(SystemInfoNode root, SystemInfoOptions options)
          Builds the system information tree upon local information of the implementor.
 SystemInfoOptions createSystemInfoOptions(int detailLevel)
          Creates a new SystemInfoOptions with the given detail level.
 SystemInfoNode createSystemInfoRootNode(java.lang.String type)
          Creates a new SystemInfoNode without a parent node.
 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
 

Constructor Detail

DefaultSystemInfoService

public DefaultSystemInfoService()
Creates a new DefaultSystemInfoService.

Method Detail

createSystemInfoOptions

public SystemInfoOptions createSystemInfoOptions(int detailLevel)
Description copied from interface: SystemInfoService
Creates a new SystemInfoOptions with the given detail level. This method should only be used when starting collection of system information to create the initial SystemInfoOptions for a collection run.

Specified by:
createSystemInfoOptions in interface SystemInfoService
Parameters:
detailLevel - the detail level to collect information of
Returns:
the created SystemInfoOptions
See Also:
SystemInfoService.createSystemInfoOptions(int)

createSystemInfoRootNode

public SystemInfoNode createSystemInfoRootNode(java.lang.String type)
Description copied from interface: SystemInfoService
Creates a new SystemInfoNode without a parent node. This method should only be used when starting collection of system information to create a root node.

Specified by:
createSystemInfoRootNode in interface SystemInfoService
Parameters:
type - the type of the created root node
Returns:
the SystemInfoNode created
See Also:
SystemInfoService.createSystemInfoRootNode(java.lang.String)

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)