net.refractions.udig.issues
Interface IssuesListConfigurator


public interface IssuesListConfigurator

A interface for classes that can configuring an IssuesList. Each Configurator is defined in the same extension as the IssuesList it can configure. Some IIssuesLists don't require a configurator. An example of an issues list that requires a configuration is one that is backed onto a database. The username/password and connection information need to be set; it is the job of the IssuesListConfigurator to do this.

The configuration appears in the preference pages of the application.

Since:
1.1.0
Author:
Jesse

Method Summary
 void getConfiguration(IMemento memento)
          Fills the memento object with the configuration data.
 Control getControl(Composite parent, IIssuesPreferencePage page)
          Returns a control that will configure the issues list.
 java.lang.String getError()
          This method is called after isConfigured() is called.
 void initConfiguration(IIssuesList list, IMemento memento)
          Initializes the IssuesListConfigurator AND the IssuesList.
 boolean isConfigured()
          Returns true if the IIssuesList can be used.
 

Method Detail

initConfiguration

void initConfiguration(IIssuesList list,
                       IMemento memento)
Initializes the IssuesListConfigurator AND the IssuesList. It is important to initialize the issueslist with the memento object when this object is called. getControl() is not always called.

Parameters:
list - the list that the configurator will configure.
memento - a memento that contains the previous configuration. Maybe null if the list has never been configured.

getConfiguration

void getConfiguration(IMemento memento)
Fills the memento object with the configuration data. This is not used to configure the IssuesList. It is used in the future to configure the IssuesListConfiguration Object.

Note: The control may be disposed by this point so ensure that the method does not need to access any widgets in the control.


getControl

Control getControl(Composite parent,
                   IIssuesPreferencePage page)
Returns a control that will configure the issues list. Should use the configuration memento to fill out the controls.

Warning: the memento may be null

Parameters:
parent - the composite that will be used to create the control. The Layout of the parent is a FillLayout.
Returns:
a control that will configure the issues list.

isConfigured

boolean isConfigured()
Returns true if the IIssuesList can be used. If the IIssuesList is backed onto a database; the database should be queried to ensure that the issues list is correctly configured. If it is not then this method should return null so that the issues list will not be used.

Returns:
true if the IIssuesList can be used

getError

java.lang.String getError()
This method is called after isConfigured() is called. If isConfigured() returns false this method is called to obtain a human readable error message.

Returns:
a human readable error message. Or null if isConfigured was not previously called or if there was no error.