net.officefloor.eclipse.wizard.officesource
Class OfficeSourceInstance

java.lang.Object
  extended by net.officefloor.eclipse.wizard.officesource.OfficeSourceInstance
All Implemented Interfaces:
CompilerIssues, OfficeSourceExtensionContext

public class OfficeSourceInstance
extends Object
implements OfficeSourceExtensionContext, CompilerIssues

OfficeSource 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 OfficeLoaderProperty instances.
 String getOfficeLocation()
          Obtains the location of the Office.
 String getOfficeName()
          Obtains the name of the Office.
 String getOfficeSourceClassName()
          Obtains the fully qualified class name of the OfficeSource.
 String getOfficeSourceLabel()
          Obtains the label for the OfficeSource.
 OfficeType getOfficeType()
          Obtains the loaded OfficeType.
 org.eclipse.core.resources.IProject getProject()
          Obtains the IProject that is adding the Office.
 PropertyList getPropertyList()
          Obtains the PropertyList to source the Office from the OfficeSource.
 void loadOfficeType()
          Attempts to load the OfficeType.
 void notifyPropertiesChanged()
           Notifies of a change to the PropertyList.
 void setErrorMessage(String message)
          Specifies an error message.
 void setOfficeNameAndLocation(String officeName, String officeLocation)
          Specifies the location of the Office.
 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

setOfficeNameAndLocation

public void setOfficeNameAndLocation(String officeName,
                                     String officeLocation)
Specifies the location of the Office.

Parameters:
officeName - Name of the Office.
officeLocation - Location of the Office.

loadOfficeType

public void loadOfficeType()
Attempts to load the OfficeType.


getOfficeSourceLabel

public String getOfficeSourceLabel()
Obtains the label for the OfficeSource.

Returns:
Label for the OfficeSource.

getOfficeSourceClassName

public String getOfficeSourceClassName()
Obtains the fully qualified class name of the OfficeSource.

Returns:
OfficeSource class name.

getOfficeName

public String getOfficeName()
Obtains the name of the Office.

Returns:
Name of the Office.

getOfficeLocation

public String getOfficeLocation()
Obtains the location of the Office.

Returns:
Location of the Office.

getPropertyList

public PropertyList getPropertyList()
Obtains the PropertyList to source the Office from the OfficeSource.

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

getOfficeType

public OfficeType getOfficeType()
Obtains the loaded OfficeType.

Returns:
Loaded OfficeType or null if issue loading.

createControls

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

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

setTitle

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

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

setErrorMessage

public void setErrorMessage(String message)
Description copied from interface: OfficeSourceExtensionContext
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 OfficeSourceExtensionContext
Parameters:
message - Error message. null indicating no error.

notifyPropertiesChanged

public void notifyPropertiesChanged()
Description copied from interface: OfficeSourceExtensionContext

Notifies of a change to the PropertyList.

This allows for to report issues in attempting to source the OfficeType from the OfficeSource with the PropertyList.

Specified by:
notifyPropertiesChanged in interface OfficeSourceExtensionContext

getProject

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

Specified by:
getProject in interface OfficeSourceExtensionContext
Returns:
IProject that is adding the Office.

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.