net.officefloor.eclipse.wizard.administratorsource
Class AdministratorSourceInstance

java.lang.Object
  extended by net.officefloor.eclipse.wizard.administratorsource.AdministratorSourceInstance
All Implemented Interfaces:
CompilerIssues, AdministratorSourceExtensionContext

public class AdministratorSourceInstance
extends Object
implements AdministratorSourceExtensionContext, CompilerIssues

AdministratorSource 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 AdministratorLoaderProperty instances.
 String getAdministratorName()
          Obtains the name of the OfficeAdministrator.
 AdministratorScope getAdministratorScope()
          Obtains the AdministratorScope for the OfficeAdministrator.
 String getAdministratorSourceClassName()
          Obtains fully qualified class name of the AdministratorSource.
 String getAdministratorSourceLabel()
          Obtains the label for the AdministratorSource.
 AdministratorType<?,?> getAdministratorType()
          Obtains the loaded AdministratorType.
 org.eclipse.core.resources.IProject getProject()
          Obtains the IProject that is adding the Administrator.
 PropertyList getPropertyList()
          Obtains the PropertyList to source the OfficeAdministrator from the AdministratorSource.
 void loadAdministratorType()
          Attempts to load the AdministratorType.
 void notifyPropertiesChanged()
           Notifies of a change to the PropertyList.
 void setAdministratorNameAndScope(String administratorName, AdministratorScope administratorScope)
          Specifies the name and AdministratorScope of the OfficeAdministrator.
 void setErrorMessage(String message)
          Specifies an error message.
 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

setAdministratorNameAndScope

public void setAdministratorNameAndScope(String administratorName,
                                         AdministratorScope administratorScope)
Specifies the name and AdministratorScope of the OfficeAdministrator.

Parameters:
administratorName - Name of the OfficeAdministrator.
administratorScope - AdministratorScope.

loadAdministratorType

public void loadAdministratorType()
Attempts to load the AdministratorType.


getAdministratorSourceLabel

public String getAdministratorSourceLabel()
Obtains the label for the AdministratorSource.

Returns:
Label for the AdministratorSource.

getAdministratorSourceClassName

public String getAdministratorSourceClassName()
Obtains fully qualified class name of the AdministratorSource.

Returns:
AdministratorSource class name.

getAdministratorName

public String getAdministratorName()
Obtains the name of the OfficeAdministrator.

Returns:
Name of the OfficeAdministrator.

getPropertyList

public PropertyList getPropertyList()
Obtains the PropertyList to source the OfficeAdministrator from the AdministratorSource.

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

getAdministratorScope

public AdministratorScope getAdministratorScope()
Obtains the AdministratorScope for the OfficeAdministrator.

Returns:
AdministratorScope for the OfficeAdministrator.

getAdministratorType

public AdministratorType<?,?> getAdministratorType()
Obtains the loaded AdministratorType.

Returns:
Loaded AdministratorType or null if issue loading.

createControls

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

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

setTitle

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

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

setErrorMessage

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

notifyPropertiesChanged

public void notifyPropertiesChanged()
Description copied from interface: AdministratorSourceExtensionContext

Notifies of a change to the PropertyList.

This allows for to report issues in attempting to source the AdministratorType from the AdministratorSource with the PropertyList.

Specified by:
notifyPropertiesChanged in interface AdministratorSourceExtensionContext

getProject

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

Specified by:
getProject in interface AdministratorSourceExtensionContext
Returns:
IProject that is adding the Administrator.

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.