net.officefloor.eclipse.wizard.governancesource
Class GovernanceSourceInstance

java.lang.Object
  extended by net.officefloor.eclipse.wizard.governancesource.GovernanceSourceInstance
All Implemented Interfaces:
CompilerIssues, GovernanceSourceExtensionContext

public class GovernanceSourceInstance
extends Object
implements GovernanceSourceExtensionContext, CompilerIssues

GovernanceSource 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 GovernanceSource Property instances.
 String getGovernanceName()
          Obtains the name of the Governance.
 String getGovernanceSourceClassName()
          Obtains the fully qualified class name of the GovernanceSource.
 String getGovernanceSourceLabel()
          Obtains the label for the GovernanceSource.
 GovernanceType<?,?> getGovernanceType()
          Obtains the loaded GovernanceType.
 org.eclipse.core.resources.IProject getProject()
          Obtains the IProject that is adding the Governance.
 PropertyList getPropertyList()
          Obtains the PropertyList to source the Governance from the GovernanceSource.
 void loadGovernanceInstance(GovernanceInstance governanceInstance)
          Loads the particular GovernanceInstance for this GovernanceSourceInstance to configure properties from.
 void loadGovernanceType()
          Attempts to load the GovernanceType.
 void notifyPropertiesChanged()
           Notifies of a change to the PropertyList.
 void setErrorMessage(String message)
          Specifies an error message.
 void setGovernanceName(String governanceName)
          Specifies the name of the Governance.
 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

setGovernanceName

public void setGovernanceName(String governanceName)
Specifies the name of the Governance.

Parameters:
governanceName - Name of the Governance.

loadGovernanceInstance

public void loadGovernanceInstance(GovernanceInstance governanceInstance)
Loads the particular GovernanceInstance for this GovernanceSourceInstance to configure properties from.

Parameters:
governanceInstance - GovernanceInstance.

loadGovernanceType

public void loadGovernanceType()
Attempts to load the GovernanceType.


getGovernanceSourceLabel

public String getGovernanceSourceLabel()
Obtains the label for the GovernanceSource.

Returns:
Label for the GovernanceSource.

getGovernanceSourceClassName

public String getGovernanceSourceClassName()
Obtains the fully qualified class name of the GovernanceSource.

Returns:
GovernanceSource class name.

getGovernanceName

public String getGovernanceName()
Obtains the name of the Governance.

Returns:
Name of the Governance.

getPropertyList

public PropertyList getPropertyList()
Obtains the PropertyList to source the Governance from the GovernanceSource.

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

getGovernanceType

public GovernanceType<?,?> getGovernanceType()
Obtains the loaded GovernanceType.

Returns:
Loaded GovernanceType or null if issue loading.

createControls

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

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

setTitle

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

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

setErrorMessage

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

notifyPropertiesChanged

public void notifyPropertiesChanged()
Description copied from interface: GovernanceSourceExtensionContext

Notifies of a change to the PropertyList.

This allows for to report issues in attempting to source the GovernanceType from the GovernanceSource with the PropertyList.

Specified by:
notifyPropertiesChanged in interface GovernanceSourceExtensionContext

getProject

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

Specified by:
getProject in interface GovernanceSourceExtensionContext
Returns:
IProject that is adding the Governance.

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.