net.officefloor.eclipse.extension.worksource
Interface WorkSourceExtension<W extends Work,S extends WorkSource<W>>

All Known Implementing Classes:
ClassWorkSourceExtension

public interface WorkSourceExtension<W extends Work,S extends WorkSource<W>>

Interface for extension to provide enriched WorkSource usage.

Author:
Daniel Sagenschneider
See Also:
ExtensionClasspathProvider, ExtensionOpener

Field Summary
static String EXTENSION_ID
          Extension ID.
 
Method Summary
 void createControl(org.eclipse.swt.widgets.Composite page, WorkSourceExtensionContext context)
          Loads the input page with the necessary Control instances to populate the PropertyList.
 String getSuggestedWorkName(PropertyList properties)
          Obtains the suggested name of the Work.
 String getTaskDocumentation(TaskDocumentationContext context)
          Obtains documentation about a Task of the Work.
 Class<S> getWorkSourceClass()
          Obtains the class of the WorkSource being enriched in its usage.
 String getWorkSourceLabel()
           Obtains the label for the WorkSource.
 

Field Detail

EXTENSION_ID

static final String EXTENSION_ID
Extension ID.

Method Detail

getWorkSourceClass

Class<S> getWorkSourceClass()
Obtains the class of the WorkSource being enriched in its usage.

Returns:
Class of the WorkSource being enriched in its usage.

getWorkSourceLabel

String getWorkSourceLabel()

Obtains the label for the WorkSource.

This is a descriptive name that can be used other than the fully qualified name of the WorkSource.

Returns:
Label for the WorkSource.

createControl

void createControl(org.eclipse.swt.widgets.Composite page,
                   WorkSourceExtensionContext context)
Loads the input page with the necessary Control instances to populate the PropertyList. Also allows notifying of changes to Property instances via the WorkSourceExtensionContext.

Parameters:
page - Page to be setup for populating the PropertyList.
context - WorkSourceExtensionContext.

getSuggestedWorkName

String getSuggestedWorkName(PropertyList properties)
Obtains the suggested name of the Work.

Parameters:
properties - PropertyList.
Returns:
Suggested Work name or null if no suggestion.

getTaskDocumentation

String getTaskDocumentation(TaskDocumentationContext context)
                            throws Throwable
Obtains documentation about a Task of the Work.

Parameters:
context - TaskDocumentationContext.
Returns:
Documentation about the Task.
Throws:
Throwable - If fails to obtain documentation about the Task.


Copyright © 2005-2013. All Rights Reserved.