net.officefloor.eclipse.wizard.sectionsource
Class SectionSourceInstance

java.lang.Object
  extended by net.officefloor.eclipse.wizard.sectionsource.SectionSourceInstance
All Implemented Interfaces:
CompilerIssues, SectionSourceExtensionContext

public class SectionSourceInstance
extends Object
implements SectionSourceExtensionContext, CompilerIssues

SectionSource instance.

Author:
Daniel Sagenschneider

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.officefloor.compile.issues.CompilerIssues
CompilerIssues.LocationType
 
Method Summary
 void addIssue(CompilerIssues.LocationType locationType, String location, OfficeFloorIssues.AssetType assetType, String assetName, String issueDescription)
           
 void addIssue(CompilerIssues.LocationType locationType, String location, OfficeFloorIssues.AssetType assetType, String assetName, String issueDescription, Throwable cause)
           
 void createControls(org.eclipse.swt.widgets.Composite page)
          Creates the Control instances to populate the SectionLoaderProperty instances.
 OfficeSection getOfficeSection()
          Obtains the loaded OfficeSection.
 org.eclipse.core.resources.IProject getProject()
          Obtains the IProject that is adding the OfficeSection.
 PropertyList getPropertyList()
          Obtains the PropertyList to source the OfficeSection from the SectionSource.
 String getSectionLocation()
          Obtains the location of the OfficeSection.
 String getSectionName()
          Obtains the name of the OfficeSection.
 String getSectionSourceClassName()
          Obtains the fully qualified class name of the SectionSource.
 String getSectionSourceLabel()
          Obtains the label for the SectionSource.
 SectionType getSectionType()
          Obtains the loaded SectionType.
 void loadSectionInstance(SectionInstance sectionInstance)
          Loads the particular SectionInstance for this SectionSourceInstance to configure properties from.
 void loadSectionType()
          Attempts to load the SectionType.
 boolean loadSectionType(CompilerIssues issues)
          Attempts to load the SectionType for the ClassSectionSource.
 void notifyPropertiesChanged()
           Notifies of a change to the PropertyList.
 void setErrorMessage(String message)
          Specifies an error message.
 void setSectionNameAndLocation(String sectionName, String sectionLocation)
          Specifies the location of the OfficeSection.
 void setTitle(String title)
          Specifies the title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setSectionNameAndLocation

public void setSectionNameAndLocation(String sectionName,
                                      String sectionLocation)
Specifies the location of the OfficeSection.

Parameters:
sectionName - Name of the OfficeSection.
sectionLocation - Location of the OfficeSection.

loadSectionInstance

public void loadSectionInstance(SectionInstance sectionInstance)
Loads the particular SectionInstance for this SectionSourceInstance to configure properties from.

Parameters:
sectionInstance - SectionInstance.

loadSectionType

public void loadSectionType()
Attempts to load the SectionType.


loadSectionType

public boolean loadSectionType(CompilerIssues issues)
Attempts to load the SectionType for the ClassSectionSource.

Parameters:
issues - CompilerIssues to be notified of issues in loading.
Returns:
true if loaded.

getSectionSourceLabel

public String getSectionSourceLabel()
Obtains the label for the SectionSource.

Returns:
Label for the SectionSource.

getSectionSourceClassName

public String getSectionSourceClassName()
Obtains the fully qualified class name of the SectionSource.

Returns:
SectionSource class name.

getSectionName

public String getSectionName()
Obtains the name of the OfficeSection.

Returns:
Name of the OfficeSection.

getSectionLocation

public String getSectionLocation()
Obtains the location of the OfficeSection.

Returns:
Location of the OfficeSection.

getPropertyList

public PropertyList getPropertyList()
Obtains the PropertyList to source the OfficeSection from the SectionSource.

Specified by:
getPropertyList in interface SectionSourceExtensionContext
Returns:
Populated PropertyList.

getSectionType

public SectionType getSectionType()
Obtains the loaded SectionType.

Returns:
Loaded SectionType or null if issue loading.

getOfficeSection

public OfficeSection getOfficeSection()
Obtains the loaded OfficeSection.

Returns:
Loaded OfficeSection or null if issue loading.

createControls

public void createControls(org.eclipse.swt.widgets.Composite page)
Creates the Control instances to populate the SectionLoaderProperty instances.

Parameters:
page - Composite to add Control instances.
context - SectionSourceInstanceContext.

setTitle

public void setTitle(String title)
Description copied from interface: SectionSourceExtensionContext
Specifies the title.

Specified by:
setTitle in interface SectionSourceExtensionContext
Parameters:
title - Title.

setErrorMessage

public void setErrorMessage(String message)
Description copied from interface: SectionSourceExtensionContext
Specifies an error message. Calling this after notifying of property changes allows for overriding the error message reported to the user.

Specified by:
setErrorMessage in interface SectionSourceExtensionContext
Parameters:
message - Error message. null indicating no error.

notifyPropertiesChanged

public void notifyPropertiesChanged()
Description copied from interface: SectionSourceExtensionContext

Notifies of a change to the PropertyList.

This allows for to report issues in attempting to source the SectionType from the SectionSource with the PropertyList.

Specified by:
notifyPropertiesChanged in interface SectionSourceExtensionContext

getProject

public org.eclipse.core.resources.IProject getProject()
Description copied from interface: SectionSourceExtensionContext
Obtains the IProject that is adding the OfficeSection.

Specified by:
getProject in interface SectionSourceExtensionContext
Returns:
IProject that is adding the OfficeSection.

addIssue

public void addIssue(CompilerIssues.LocationType locationType,
                     String location,
                     OfficeFloorIssues.AssetType assetType,
                     String assetName,
                     String issueDescription)
Specified by:
addIssue in interface CompilerIssues

addIssue

public void addIssue(CompilerIssues.LocationType locationType,
                     String location,
                     OfficeFloorIssues.AssetType assetType,
                     String assetName,
                     String issueDescription,
                     Throwable cause)
Specified by:
addIssue in interface CompilerIssues


Copyright © 2005-2013. All Rights Reserved.