net.officefloor.eclipse.extension.worksource.clazz
Class ClassWorkSourceExtension

java.lang.Object
  extended by net.officefloor.eclipse.extension.worksource.clazz.ClassWorkSourceExtension
All Implemented Interfaces:
ExtensionClasspathProvider, ExtensionOpener, WorkSourceExtension<ClassWork,ClassWorkSource>

public class ClassWorkSourceExtension
extends Object
implements WorkSourceExtension<ClassWork,ClassWorkSource>, ExtensionClasspathProvider, ExtensionOpener

WorkSourceExtension for the ClassWorkSource.

Author:
Daniel Sagenschneider

Field Summary
 
Fields inherited from interface net.officefloor.eclipse.extension.worksource.WorkSourceExtension
EXTENSION_ID
 
Fields inherited from interface net.officefloor.eclipse.extension.classpath.ExtensionClasspathProvider
EXTENSION_ID
 
Constructor Summary
ClassWorkSourceExtension()
           
 
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.
 ClasspathProvision[] getClasspathProvisions()
          Obtains the ClasspathProvision instances for the extension.
 String getSuggestedWorkName(PropertyList properties)
          Obtains the suggested name of the Work.
 String getTaskDocumentation(TaskDocumentationContext context)
          Obtains documentation about a Task of the Work.
 Class<ClassWorkSource> getWorkSourceClass()
          Obtains the class of the WorkSource being enriched in its usage.
 String getWorkSourceLabel()
           Obtains the label for the WorkSource.
 void openSource(ExtensionOpenerContext context)
          Opens the source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassWorkSourceExtension

public ClassWorkSourceExtension()
Method Detail

getWorkSourceClass

public Class<ClassWorkSource> getWorkSourceClass()
Description copied from interface: WorkSourceExtension
Obtains the class of the WorkSource being enriched in its usage.

Specified by:
getWorkSourceClass in interface WorkSourceExtension<ClassWork,ClassWorkSource>
Returns:
Class of the WorkSource being enriched in its usage.

getWorkSourceLabel

public String getWorkSourceLabel()
Description copied from interface: WorkSourceExtension

Obtains the label for the WorkSource.

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

Specified by:
getWorkSourceLabel in interface WorkSourceExtension<ClassWork,ClassWorkSource>
Returns:
Label for the WorkSource.

createControl

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

Specified by:
createControl in interface WorkSourceExtension<ClassWork,ClassWorkSource>
Parameters:
page - Page to be setup for populating the PropertyList.
context - WorkSourceExtensionContext.

getSuggestedWorkName

public String getSuggestedWorkName(PropertyList properties)
Description copied from interface: WorkSourceExtension
Obtains the suggested name of the Work.

Specified by:
getSuggestedWorkName in interface WorkSourceExtension<ClassWork,ClassWorkSource>
Parameters:
properties - PropertyList.
Returns:
Suggested Work name or null if no suggestion.

getTaskDocumentation

public String getTaskDocumentation(TaskDocumentationContext context)
                            throws Throwable
Description copied from interface: WorkSourceExtension
Obtains documentation about a Task of the Work.

Specified by:
getTaskDocumentation in interface WorkSourceExtension<ClassWork,ClassWorkSource>
Parameters:
context - TaskDocumentationContext.
Returns:
Documentation about the Task.
Throws:
Throwable - If fails to obtain documentation about the Task.

getClasspathProvisions

public ClasspathProvision[] getClasspathProvisions()
Description copied from interface: ExtensionClasspathProvider
Obtains the ClasspathProvision instances for the extension.

Specified by:
getClasspathProvisions in interface ExtensionClasspathProvider
Returns:
ClasspathProvision instances for the extension.

openSource

public void openSource(ExtensionOpenerContext context)
                throws Exception
Description copied from interface: ExtensionOpener
Opens the source.

Specified by:
openSource in interface ExtensionOpener
Parameters:
context - ExtensionOpenerContext.
Throws:
Exception - If fails to open the source.


Copyright © 2005-2013. All Rights Reserved.