public interface RepositoryController
Every Repository is expected to provide an UI to create or change its attributes.
When creating or editing a new Repository instance, the UI is presented in a modal dialog
with the necessary Save button to trigger the RepositoryController.applyChanges()
method.
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener l)
Registers a ChangeListener.
|
void |
applyChanges()
Is called when the "Save" button was pressed.
|
void |
cancelChanges()
Is called when the "Cancel" button was pressed.
|
JComponent |
getComponent()
Returns a visual component representing the repository this controller is meant for.
|
String |
getErrorMessage()
In case the controller isn't valid, then return an error message to be
shown in Repository dialog.
|
HelpCtx |
getHelpCtx()
Returns the help context associated with this controllers visual component.
|
boolean |
isValid()
Determines whether the data in this controllers visual component are valid or not.
|
void |
populate()
Called when the Repository UI is about to be opened.
|
void |
removeChangeListener(ChangeListener l)
Unregisters a ChangeListener.
|
JComponent getComponent()
HelpCtx getHelpCtx()
boolean isValid()
true
in case the the data are valid, otherwise false
void populate()
String getErrorMessage()
void applyChanges()
void cancelChanges()
void addChangeListener(ChangeListener l)
l
- a ChangeListenervoid removeChangeListener(ChangeListener l)
l
- a ChangeListener