de.cau.cs.kieler.kwebs.client.layout
Class RemoteLayoutDataService

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
                  extended by de.cau.cs.kieler.kwebs.client.layout.RemoteLayoutDataService

public final class RemoteLayoutDataService
extends ServiceDataLayoutDataService

This class is designed for retrieving the layout capabilities of a remote layout provider and make it available in the KIELER framework so the user can annotate his model only with the server side available options. At this moment the layout capabilities include available layout algorithms and layout options only.

Rating red

Nested Class Summary
 
Nested classes/interfaces inherited from class de.cau.cs.kieler.kiml.LayoutDataService
LayoutDataService.Registry
 
Field Summary
static String ATTRIBUTE_PREVIEWIMAGEPATH
          name of the 'previewImagePath' attribute layout algorithms meta data.
 
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
 
Method Summary
static void create()
          Creates the singleton instance of this class.
protected  LayoutAlgorithmData createLayoutAlgorithmData(IConfigurationElement element)
          Create a layout algorithm data instance and configure it with platform-specific extensions.
static RemoteLayoutDataService getInstance()
          Returns the singleton instance of this class.
 void initializeWithClient(ILayoutServiceClient client)
          Initializes the layout service meta data with the given web service client.
protected  void reportError(String message)
          To be implemented by sub classes to handle an error.
protected  void reportError(String message, Throwable throwable)
          To be implemented by sub classes to handle an error.
static void resetInstance()
           
 
Methods inherited from class de.cau.cs.kieler.kwebs.ServiceDataLayoutDataService
getProviderExtensions, initializeFromServiceData, reportError, reportError
 
Methods inherited from class de.cau.cs.kieler.kiml.service.ProgrammaticLayoutDataService
registerProgrammaticOptions
 
Methods inherited from class de.cau.cs.kieler.kiml.service.ExtensionLayoutDataService
getLayoutProviderFactory, loadClass, loadLayoutProviderExtensions
 
Methods inherited from class de.cau.cs.kieler.kiml.LayoutDataService
addService, getAlgorithmData, getAlgorithmData, getAlgorithmDataBySuffix, getCategoryName, 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
 

Field Detail

ATTRIBUTE_PREVIEWIMAGEPATH

public static final String ATTRIBUTE_PREVIEWIMAGEPATH
name of the 'previewImagePath' attribute layout algorithms meta data.

See Also:
Constant Field Values
Method Detail

create

public static void create()
Creates the singleton instance of this class. The layout capabilities need to be retrieved afterwards through any client which implements the ILayoutServiceClient interface by calling initializeWithClient with the client as parameter.


resetInstance

public static void resetInstance()

getInstance

public static RemoteLayoutDataService getInstance()
Returns the singleton instance of this class.

Returns:
the singleton instance.

initializeWithClient

public void initializeWithClient(ILayoutServiceClient client)
Initializes the layout service meta data with the given web service client.

Parameters:
client - the client.

createLayoutAlgorithmData

protected LayoutAlgorithmData createLayoutAlgorithmData(IConfigurationElement element)
Create a layout algorithm data instance and configure it with platform-specific extensions.

Overrides:
createLayoutAlgorithmData in class ExtensionLayoutDataService
Parameters:
element - a configuration element to use for configuration
Returns:
a new layout algorithm data instance

reportError

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

Specified by:
reportError in class ServiceDataLayoutDataService
Parameters:
message - the error message

reportError

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

Specified by:
reportError in class ServiceDataLayoutDataService
Parameters:
message - the error message