net.officefloor.eclipse.wizard.managedobjectsource
Class ManagedObjectSourceInstance

java.lang.Object
  extended by net.officefloor.eclipse.wizard.managedobjectsource.ManagedObjectSourceInstance
All Implemented Interfaces:
CompilerIssues, ManagedObjectSourceExtensionContext

public class ManagedObjectSourceInstance
extends Object
implements ManagedObjectSourceExtensionContext, CompilerIssues

ManagedObjectSource 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 ManagedObjectLoaderProperty instances.
 ClassLoader getClassLoader()
          Obtains the ClassLoader for adding the ManagedObjectSource.
 String getManagedObjectSourceClassName()
          Obtains the fully qualified class name of the ManagedObjectSource .
 String getManagedObjectSourceLabel()
          Obtains the label for the ManagedObjectSource.
 ManagedObjectType<?> getManagedObjectType()
          Obtains the loaded ManagedObjectType.
 org.eclipse.core.resources.IProject getProject()
          Obtains the IProject that is adding the ManagedObjectSource.
 PropertyList getPropertyList()
          Obtains the PropertyList to source the ManagedObject from the ManagedObjectSource.
 String getSuggestedManagedObjectName()
          Obtains the suggested name for the ManagedObject.
 void loadManagedObjectType()
          Attempts to load the ManagedObjectType.
 void notifyPropertiesChanged()
           Notifies of a change to the PropertyList.
 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

loadManagedObjectType

public void loadManagedObjectType()
Attempts to load the ManagedObjectType.


getManagedObjectSourceLabel

public String getManagedObjectSourceLabel()
Obtains the label for the ManagedObjectSource.

Returns:
Label for the ManagedObjectSource.

getManagedObjectSourceClassName

public String getManagedObjectSourceClassName()
Obtains the fully qualified class name of the ManagedObjectSource .

Returns:
ManagedObjectSource class name.

getPropertyList

public PropertyList getPropertyList()
Obtains the PropertyList to source the ManagedObject from the ManagedObjectSource.

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

getManagedObjectType

public ManagedObjectType<?> getManagedObjectType()
Obtains the loaded ManagedObjectType.

Returns:
Loaded ManagedObjectType or null if issue loading.

getSuggestedManagedObjectName

public String getSuggestedManagedObjectName()
Obtains the suggested name for the ManagedObject.

Returns:
Suggested name for the ManagedObject.

createControls

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

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

setTitle

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

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

setErrorMessage

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

notifyPropertiesChanged

public void notifyPropertiesChanged()
Description copied from interface: ManagedObjectSourceExtensionContext

Notifies of a change to the PropertyList.

This allows for to report issues in attempting to source the ManagedObjectType from the ManagedObjectSource with the PropertyList.

Specified by:
notifyPropertiesChanged in interface ManagedObjectSourceExtensionContext

getProject

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

Specified by:
getProject in interface ManagedObjectSourceExtensionContext
Returns:
IProject that is adding the ManagedObjectSource.

getClassLoader

public ClassLoader getClassLoader()
Description copied from interface: ManagedObjectSourceExtensionContext
Obtains the ClassLoader for adding the ManagedObjectSource.

Specified by:
getClassLoader in interface ManagedObjectSourceExtensionContext
Returns:
ClassLoader for adding the ManagedObjectSource.

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.