de.cau.cs.kieler.kwebs
Class ServiceDataLayoutDataService

java.lang.Object
  extended by de.cau.cs.kieler.kiml.LayoutDataService
      extended by de.cau.cs.kieler.kiml.service.ExtensionLayoutDataService
          extended by de.cau.cs.kieler.kiml.service.ProgrammaticLayoutDataService
              extended by de.cau.cs.kieler.kwebs.ServiceDataLayoutDataService
Direct Known Subclasses:
RemoteLayoutDataService

public abstract class ServiceDataLayoutDataService
extends ProgrammaticLayoutDataService

This class provides the ability to initialize the local layout meta data of KIELER from the serial notation in XMI of a layout services meta data model. An array of ServiceDataConfigurationElement instances is derived from the model which is provided to ExtensionLayoutDataService by overriding its getProviderExtensions() method.

Rating red

Nested Class Summary
 
Nested classes/interfaces inherited from class de.cau.cs.kieler.kiml.LayoutDataService
LayoutDataService.Registry
 
Field Summary
 
Fields inherited from class de.cau.cs.kieler.kiml.service.ExtensionLayoutDataService
ATTRIBUTE_ADVANCED, ATTRIBUTE_APPLIESTO, ATTRIBUTE_CATEGORY, ATTRIBUTE_CLASS, ATTRIBUTE_DEFAULT, ATTRIBUTE_DESCRIPTION, ATTRIBUTE_ENUMVALUES, ATTRIBUTE_ID, ATTRIBUTE_IMPLEMENTATION, ATTRIBUTE_NAME, ATTRIBUTE_OPTION, ATTRIBUTE_PARAMETER, ATTRIBUTE_PRIORITY, ATTRIBUTE_TYPE, ELEMENT_CATEGORY, ELEMENT_KNOWN_OPTION, ELEMENT_LAYOUT_ALGORITHM, ELEMENT_LAYOUT_OPTION, ELEMENT_LAYOUT_TYPE, ELEMENT_SUPPORTED_DIAGRAM, EXTP_ID_LAYOUT_PROVIDERS
 
Fields inherited from class de.cau.cs.kieler.kiml.LayoutDataService
DIAGRAM_TYPE_GENERAL, ECLIPSEDATASERVICE, REMOTEDATASERVICE, SERVICEDATASERVICE
 
Constructor Summary
protected ServiceDataLayoutDataService()
          Protected constructor, since class shall only be instantiated by deriving classes.
 
Method Summary
protected  IConfigurationElement[] getProviderExtensions()
          Returns the configuration elements created from the layout meta data from the server.
protected  void initializeFromServiceData(String serviceDataXMI)
          Initializes the layout meta data from the XMI representation of the service data model retrieved from the layout service.
protected  void reportError(CoreException e)
          Report an error that occurred while reading extensions.
protected abstract  void reportError(String message)
          To be implemented by sub classes to handle an error.
protected  void reportError(String extensionPoint, IConfigurationElement element, String attribute, Throwable exception)
          Report an error that occurred while reading extensions.
protected abstract  void reportError(String message, Throwable throwable)
          To be implemented by sub classes to handle an error.
 
Methods inherited from class de.cau.cs.kieler.kiml.service.ProgrammaticLayoutDataService
registerProgrammaticOptions
 
Methods inherited from class de.cau.cs.kieler.kiml.service.ExtensionLayoutDataService
createLayoutAlgorithmData, getLayoutProviderFactory, loadClass, loadLayoutProviderExtensions
 
Methods inherited from class de.cau.cs.kieler.kiml.LayoutDataService
addService, getAlgorithmData, getAlgorithmData, getAlgorithmDataBySuffix, getCategoryName, getInstance, getInstanceOf, getMode, getOptionData, getOptionData, getOptionData, getOptionDataBySuffix, getRegistry, getTypeData, getTypeData, getTypeDataBySuffix, removeService, setMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceDataLayoutDataService

protected ServiceDataLayoutDataService()
Protected constructor, since class shall only be instantiated by deriving classes.

Method Detail

initializeFromServiceData

protected void initializeFromServiceData(String serviceDataXMI)
Initializes the layout meta data from the XMI representation of the service data model retrieved from the layout service.

Parameters:
serviceDataXMI - the XMI representation of the service data model retrieved from the layout service

getProviderExtensions

protected IConfigurationElement[] getProviderExtensions()
Returns the configuration elements created from the layout meta data from the server.

Overrides:
getProviderExtensions in class ExtensionLayoutDataService
Returns:
the configuration elements created from the layout meta data from the server

reportError

protected void reportError(String extensionPoint,
                           IConfigurationElement element,
                           String attribute,
                           Throwable exception)
Description copied from class: ExtensionLayoutDataService
Report an error that occurred while reading extensions.

Specified by:
reportError in class ExtensionLayoutDataService
Parameters:
extensionPoint - the identifier of the extension point
element - the configuration element
attribute - the attribute that contains an invalid entry
exception - an optional exception that was caused by the invalid entry

reportError

protected void reportError(CoreException e)
Description copied from class: ExtensionLayoutDataService
Report an error that occurred while reading extensions.

Specified by:
reportError in class ExtensionLayoutDataService
Parameters:
e - a core exception holding a status with further information

reportError

protected abstract void reportError(String message)
To be implemented by sub classes to handle an error.

Parameters:
message - the error message

reportError

protected abstract void reportError(String message,
                                    Throwable throwable)
To be implemented by sub classes to handle an error.

Parameters:
message - the error message
exception - the exception occurred