public abstract class StatusGenericPanel extends JPanel implements ConfigChangeListener
Modifier and Type | Class and Description |
---|---|
protected class |
StatusGenericPanel.IgnoreItemListener
A class used to avoid the possibility a certain type of objects in a combo
box.
|
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
COMBO_SEPARATOR
The string to be used as combo separator.
|
protected JEditorPane |
errorPane
The error pane.
|
protected static LocalizableMessage |
NOT_APPLICABLE
The not applicable message.
|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Modifier | Constructor and Description |
---|---|
protected |
StatusGenericPanel()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Component comp,
Object constraints)
The components are not added directly to the panel but to the main panel.
|
protected void |
add(JLabel[] labels,
Component[] comps,
JLabel[] inlineHelp,
Container panel,
GridBagConstraints gbc)
Commodity method used to add lines, where each line contains a label, a
component and an inline help label.
|
protected void |
addBottomGlue(GridBagConstraints gbc)
Adds a bottom glue to the main panel with the provided constraints.
|
void |
addConfigurationElementCreatedListener(ConfigurationElementCreatedListener listener)
Adds a configuration element created listener.
|
protected void |
addErrorPane(Container p,
GridBagConstraints baseGbc)
Adds an error pane to the provided container.
|
protected void |
addErrorPane(GridBagConstraints baseGbc)
Creates and adds an error pane.
|
protected void |
addScheduleErrors(ScheduleType schedule,
Collection<LocalizableMessage> errors,
JLabel label)
Checks whether the server is running or not and depending on the schedule
updates the list of errors with the errors found.
|
protected boolean |
authenticationRequired(ServerDescriptor desc)
Returns
true if the server is running and the user did not
provide authentication and false otherwise. |
boolean |
callConfigurationChangedInBackground()
This method is called to indicate that the configuration changes should be
called in the background.
|
void |
cancelClicked()
Notification that cancel was clicked, the panel is in charge of doing
whatever is required (close the dialog, etc.).
|
protected void |
checkCompatibleSuperiors(Set<org.forgerock.opendj.ldap.schema.ObjectClass> objectClassSuperiors,
org.forgerock.opendj.ldap.schema.ObjectClassType objectClassType,
List<LocalizableMessage> errors)
Checks whether the provided superior object classes are compatible with the
provided object class type.
|
protected boolean |
checkIntValue(Collection<LocalizableMessage> errors,
String stringValue,
int minValue,
int maxValue,
LocalizableMessage errMsg)
Checks that the provided string value is a valid integer and if it is not
updates a list of error messages with an error.
|
protected void |
checkOKButtonEnable()
Updates the enabling/disabling of the OK button.
|
void |
closeClicked()
Notification that close was clicked, the panel is in charge of doing
whatever is required (close the dialog, etc.).
|
protected void |
comboBoxSelected(Map<String,SortedSet<AbstractIndexDescriptor>> hmIndexes,
CategorizedComboBoxElement selectedItem,
AddRemovePanel<AbstractIndexDescriptor> addRemove)
Updates and addremove panel with the contents of the provided item.
|
protected void |
createErrorPane()
Creates the error pane.
|
protected JLabel |
createRequiredLabel()
Returns a label with text 'Required Field' and an icon (used as legend in
some panels).
|
protected boolean |
displayBackend(BackendDescriptor backend)
Method that says if a backend must be displayed.
|
protected boolean |
displayConfirmationDialog(LocalizableMessage title,
LocalizableMessage msg)
Displays a confirmation message.
|
protected void |
displayErrorDialog(Collection<LocalizableMessage> errors)
Displays a dialog with the provided list of error messages.
|
protected void |
displayErrorMessage(LocalizableMessage title,
LocalizableMessage msg)
Displays an error message and hides the main panel.
|
protected void |
displayMainPanel()
Displays the main panel.
|
protected void |
displayMessage(LocalizableMessage msg)
Displays a message and hides the main panel.
|
protected boolean |
entryExists(org.forgerock.opendj.ldap.Dn dn)
Tells whether an entry exists or not.
|
protected String |
getAuthenticateHTML()
Returns the HTML required to render an Authenticate button in HTML.
|
GenericDialog.ButtonType |
getButtonType()
Returns the buttons that the dialog where this panel is contained should
display.
|
protected List<ConfigurationElementCreatedListener> |
getConfigurationElementCreatedListeners()
Returns the list of configuration listeners.
|
ControlPanelInfo |
getInfo()
Returns the control panel info object.
|
protected static LocalizableMessage |
getLabel(MonitoringAttributes attr)
Returns the label to be used in panels (with ':') based on the definition
of the monitoring attribute.
|
protected GenericDialog |
getLoginDialog()
Returns the login dialog that is displayed when the method authenticate is
called.
|
JMenuBar |
getMenuBar()
Returns the menu bar that the panel might have.
|
static String |
getMonitoringValue(MonitoringAttributes attr,
org.forgerock.opendj.ldap.messages.SearchResultEntry monitoringEntry)
Returns the monitoring value in a String form to be displayed to the user.
|
abstract Component |
getPreferredFocusComponent()
Returns the component that should get the focus when the dialog that
contains this panel is displayed.
|
protected Border |
getRightPanelBorder()
Returns the border to be used in the right panel of the dialog with a tree
on the left (for instance the schema browser, entry browser and index
browser).
|
protected List<String> |
getScheduleArgs(ScheduleType schedule)
Returns the command-line arguments associated with the provided schedule.
|
protected String |
getStartServerHTML()
Returns the HTML required to render an Start button in HTML.
|
abstract LocalizableMessage |
getTitle()
Returns the title that will be used as title of the dialog.
|
protected boolean |
hasObjectClass(org.forgerock.opendj.ldap.Dn dn,
String... objectClasses)
Tells whether a given entry exists and contains one of the specified object classes.
|
protected boolean |
isBinary(String attrName)
Returns whether the provided attribute name has binary syntax.
|
protected boolean |
isCategory(Object o)
Returns
true if the provided object is a category object in a
combo box. |
boolean |
isDisposeOnClose()
Whether the dialog should be disposed when the user closes it.
|
boolean |
isEnableCancel()
Returns
true if the cancel button is enabled and
false otherwise. |
boolean |
isEnableClose()
Returns
true if the close button is enabled and
false otherwise. |
boolean |
isEnableOK()
Returns
true if the ok button is enabled and
false otherwise. |
protected boolean |
isLocal()
Returns
true if the managed server is the local installation
(where the control panel is installed) false otherwise. |
protected boolean |
isServerRunning()
Returns
true if the server is running and false
otherwise. |
protected void |
launchOperation(Task task,
LocalizableMessage initialSummary,
LocalizableMessage successSummary,
LocalizableMessage successDetail,
LocalizableMessage errorSummary,
LocalizableMessage errorDetail,
LocalizableMessageDescriptor.Arg1<Number> errorDetailCode,
ProgressDialog dialog)
Launch an task.
|
static void |
launchOperation(Task task,
LocalizableMessage initialSummary,
LocalizableMessage successSummary,
LocalizableMessage successDetail,
LocalizableMessage errorSummary,
LocalizableMessage errorDetail,
LocalizableMessageDescriptor.Arg1<Number> errorDetailCode,
ProgressDialog dialog,
boolean resetLogs,
ControlPanelInfo info)
Launch an task.
|
abstract void |
okClicked()
Notification that the ok button has been clicked, the panel is in charge of
doing whatever is required (close the dialog, launch a task, etc.).
|
protected void |
packParentDialog()
Packs the parent dialog.
|
protected void |
rebuildIndexIfNecessary(AbstractIndexDescriptor index,
ProgressDialog progressDialog)
If the index must be rebuilt, asks the user for confirmation.
|
void |
removeConfigurationElementCreatedListener(ConfigurationElementCreatedListener listener)
Removes a configuration element created listener.
|
boolean |
requiresBorder()
Returns
true if this panel requires some bordering (in general
an EmptyBorder with some insets) and false otherwise. |
boolean |
requiresScroll()
Tells whether this panel should be contained in a scroll pane or not.
|
protected void |
restartServer()
Restarts the server.
|
void |
setDisposeOnClose(boolean disposeOnClose)
Sets whether the dialog should be disposed when the user closes it or not.
|
protected void |
setEnabledCancel(boolean enable)
Enables the Cancel button in the parent dialog.
|
protected void |
setEnabledOK(boolean enable)
Enables the OK button in the parent dialog.
|
void |
setInfo(ControlPanelInfo info)
Sets the control panel info object.
|
protected void |
setPrimaryInvalid(JComponent comp)
Updates the font type and color of the component to be invalid and primary.
|
protected void |
setPrimaryValid(JComponent comp)
Updates the font type and color of the component to be valid and primary.
|
protected void |
setSecondaryInvalid(JComponent comp)
Updates the font type and color of the component to be invalid and
secondary.
|
protected void |
setSecondaryValid(JComponent comp)
Updates the font type and color of the component to be valid and secondary.
|
protected void |
startServer()
Starts the server.
|
protected void |
stopServer()
Stops the server.
|
void |
toBeDisplayed(boolean visible)
The panel is notified that the dialog is going to be visible or invisible.
|
protected void |
updateBaseDNComboBoxModel(DefaultComboBoxModel model,
ServerDescriptor desc)
Commodity method to update a combo box model with the backends of a server.
|
protected void |
updateComboBoxModel(Collection<?> newElements,
DefaultComboBoxModel model)
Updates a combo box model with a number of items.
|
protected void |
updateConfirmationPane(JEditorPane pane,
LocalizableMessage title,
Font titleFont,
LocalizableMessage details,
Font detailsFont)
Updates the contents of an editor pane using the confirmation format.
|
protected void |
updateErrorPane(JEditorPane pane,
LocalizableMessage title,
Font titleFont,
LocalizableMessage details,
Font detailsFont)
Updates the contents of an editor pane using the error format.
|
protected void |
updateErrorPaneAndOKButtonIfAuthRequired(ServerDescriptor desc,
LocalizableMessage details)
Updates the error panel and enables/disables the OK button depending on the
status of the server.
|
protected void |
updateErrorPaneIfAuthRequired(ServerDescriptor desc,
LocalizableMessage details)
Updates the error panel depending on the status of the server.
|
protected void |
updateErrorPaneIfServerRunningAndAuthRequired(ServerDescriptor desc,
LocalizableMessage detailsServerNotRunning,
LocalizableMessage authRequired)
Updates the error panel depending on the status of the server.
|
protected void |
updateIndexMap(ServerDescriptor desc,
Map<String,SortedSet<AbstractIndexDescriptor>> hmIndexes)
Updates a map, so that the keys are the base DN where the indexes are
defined and the values are a sorted set of indexes.
|
protected void |
updateMonitoringInfo(List<? extends MonitoringAttributes> monitoringAttrs,
List<JLabel> monitoringLabels,
org.forgerock.opendj.ldap.messages.SearchResultEntry monitoringEntry)
Updates the monitoring information writing it to a list of labels.
|
protected void |
updateSimpleBackendComboBoxModel(JComboBox combo,
JLabel lNoBackendsFound,
ServerDescriptor desc)
Commodity method used to update the elements of a combo box that contains
the different user backends.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
configurationChanged
public static final String COMBO_SEPARATOR
protected static final LocalizableMessage NOT_APPLICABLE
protected JEditorPane errorPane
protected StatusGenericPanel()
public abstract LocalizableMessage getTitle()
public GenericDialog.ButtonType getButtonType()
public abstract Component getPreferredFocusComponent()
public boolean requiresBorder()
true
if this panel requires some bordering (in general
an EmptyBorder with some insets) and false
otherwise.true
if this panel requires some bordering (in general
an EmptyBorder with some insets) and false
otherwise.public JMenuBar getMenuBar()
null
if the panel has no menu bar associated.public boolean callConfigurationChangedInBackground()
true
and the operation will be performed in the background while a message of
type 'Loading...' is displayed on the panel.true
if changes should be loaded in the background and
false
otherwise.public void toBeDisplayed(boolean visible)
visible
- whether is going to be visible or not.public boolean requiresScroll()
true
if this panel should be contained in a scroll
pane and false
otherwise.public void add(Component comp, Object constraints)
protected void addBottomGlue(GridBagConstraints gbc)
gbc
- the constraints.protected JLabel createRequiredLabel()
protected void addErrorPane(GridBagConstraints baseGbc)
baseGbc
- the GridBagConstraints to be used.protected void addErrorPane(Container p, GridBagConstraints baseGbc)
baseGbc
- the GridBagConstraints to be used.p
- the container.protected void createErrorPane()
protected void add(JLabel[] labels, Component[] comps, JLabel[] inlineHelp, Container panel, GridBagConstraints gbc)
labels
- the labels.comps
- the components.inlineHelp
- the inline help labels.panel
- the panel where we will add the lines.gbc
- the grid bag constraints.protected void setEnabledOK(boolean enable)
enable
- whether to enable or disable the button.protected void setEnabledCancel(boolean enable)
enable
- whether to enable or disable the button.protected void setPrimaryInvalid(JComponent comp)
comp
- the component to update.protected void setPrimaryValid(JComponent comp)
comp
- the component to update.protected void setSecondaryInvalid(JComponent comp)
comp
- the component to update.protected void setSecondaryValid(JComponent comp)
comp
- the component to update.protected void packParentDialog()
public abstract void okClicked()
public void addConfigurationElementCreatedListener(ConfigurationElementCreatedListener listener)
listener
- the listener.public void removeConfigurationElementCreatedListener(ConfigurationElementCreatedListener listener)
listener
- the listener.protected List<ConfigurationElementCreatedListener> getConfigurationElementCreatedListeners()
public void cancelClicked()
public boolean isDisposeOnClose()
true
if the dialog should be disposed when the user
closes it or true
otherwise.public void setDisposeOnClose(boolean disposeOnClose)
disposeOnClose
- true
if the dialog should be disposed when the user
closes it or true
otherwise.public void closeClicked()
protected void displayErrorDialog(Collection<LocalizableMessage> errors)
errors
- the error messages.protected boolean displayConfirmationDialog(LocalizableMessage title, LocalizableMessage msg)
title
- the title/summary of the message.msg
- the description of the confirmation.true
if the user confirms and false
otherwise.protected void rebuildIndexIfNecessary(AbstractIndexDescriptor index, ProgressDialog progressDialog)
index
- the index.progressDialog
- the progress dialog.protected String getAuthenticateHTML()
protected String getStartServerHTML()
protected void updateErrorPaneAndOKButtonIfAuthRequired(ServerDescriptor desc, LocalizableMessage details)
desc
- the Server Descriptor.details
- the message to be displayed if authentication has not been
provided and the server is running.protected boolean authenticationRequired(ServerDescriptor desc)
true
if the server is running and the user did not
provide authentication and false
otherwise.desc
- the server descriptor.true
if the server is running and the user did not
provide authentication and false
otherwise.protected void updateErrorPaneIfAuthRequired(ServerDescriptor desc, LocalizableMessage details)
desc
- the Server Descriptor.details
- the message to be displayed if authentication has not been
provided and the server is running.protected void updateErrorPaneIfServerRunningAndAuthRequired(ServerDescriptor desc, LocalizableMessage detailsServerNotRunning, LocalizableMessage authRequired)
desc
- the Server Descriptor.detailsServerNotRunning
- the message to be displayed if the server is not running.authRequired
- the message to be displayed if authentication has not been
provided and the server is running.protected void checkOKButtonEnable()
protected boolean isCategory(Object o)
true
if the provided object is a category object in a
combo box.o
- the item in the combo box.true
if the provided object is a category object in a
combo box.protected boolean isBinary(String attrName)
attrName
- the attribute name.true
if the provided attribute name has binary syntax,
false
otherwise.public ControlPanelInfo getInfo()
public void setInfo(ControlPanelInfo info)
info
- the control panel info object.protected void displayMainPanel()
protected void displayMessage(LocalizableMessage msg)
msg
- the message to be displayed.protected void displayErrorMessage(LocalizableMessage title, LocalizableMessage msg)
title
- the title of the message to be displayed.msg
- the message to be displayed.protected void updateErrorPane(JEditorPane pane, LocalizableMessage title, Font titleFont, LocalizableMessage details, Font detailsFont)
pane
- the editor pane to be updated.title
- the title.titleFont
- the font to be used for the title.details
- the details message.detailsFont
- the font to be used for the details.protected void updateConfirmationPane(JEditorPane pane, LocalizableMessage title, Font titleFont, LocalizableMessage details, Font detailsFont)
pane
- the editor pane to be updated.title
- the title.titleFont
- the font to be used for the title.details
- the details message.detailsFont
- the font to be used for the details.protected void updateSimpleBackendComboBoxModel(JComboBox combo, JLabel lNoBackendsFound, ServerDescriptor desc)
combo
- the combo to be updated.lNoBackendsFound
- the label that must be shown if no user backends are found.desc
- the server descriptor that contains the configuration.protected boolean displayBackend(BackendDescriptor backend)
backend
- the backend.true
if the backend must be displayed and
false
otherwise.protected void updateBaseDNComboBoxModel(DefaultComboBoxModel model, ServerDescriptor desc)
model
- the combo box model to be updated.desc
- the server descriptor containing the configuration.protected void updateComboBoxModel(Collection<?> newElements, DefaultComboBoxModel model)
newElements
- the new items for the combo box model.model
- the combo box model to be updated.protected void updateIndexMap(ServerDescriptor desc, Map<String,SortedSet<AbstractIndexDescriptor>> hmIndexes)
desc
- the server descriptor containing the index configuration.hmIndexes
- the map to be updated.protected void comboBoxSelected(Map<String,SortedSet<AbstractIndexDescriptor>> hmIndexes, CategorizedComboBoxElement selectedItem, AddRemovePanel<AbstractIndexDescriptor> addRemove)
hmIndexes
- the map that contains the indexes definitions as values and the
base DNs as keys.selectedItem
- the selected item.addRemove
- the add remove panel to be updated.public boolean isEnableCancel()
true
if the cancel button is enabled and
false
otherwise.true
if the cancel button is enabled and
false
otherwise.public boolean isEnableClose()
true
if the close button is enabled and
false
otherwise.true
if the close button is enabled and
false
otherwise.public boolean isEnableOK()
true
if the ok button is enabled and
false
otherwise.true
if the ok button is enabled and
false
otherwise.protected boolean isServerRunning()
true
if the server is running and false
otherwise.true
if the server is running and false
otherwise.protected boolean isLocal()
true
if the managed server is the local installation
(where the control panel is installed) false
otherwise.true
if the managed server is the local installation
(where the control panel is installed) false
otherwise.protected void launchOperation(Task task, LocalizableMessage initialSummary, LocalizableMessage successSummary, LocalizableMessage successDetail, LocalizableMessage errorSummary, LocalizableMessage errorDetail, LocalizableMessageDescriptor.Arg1<Number> errorDetailCode, ProgressDialog dialog)
task
- the task to be launched.initialSummary
- the initial summary to be displayed in the progress dialog.successSummary
- the success summary to be displayed in the progress dialog if the
task is successful.successDetail
- the success details to be displayed in the progress dialog if the
task is successful.errorSummary
- the error summary to be displayed in the progress dialog if the
task ended with error.errorDetail
- error details to be displayed in the progress dialog if the task
ended with error.errorDetailCode
- error detail message to be displayed in the progress dialog if the
task ended with error and we have an exit error code (for instance
if the error occurred when launching a script we will have an
error code).dialog
- the progress dialog.public static void launchOperation(Task task, LocalizableMessage initialSummary, LocalizableMessage successSummary, LocalizableMessage successDetail, LocalizableMessage errorSummary, LocalizableMessage errorDetail, LocalizableMessageDescriptor.Arg1<Number> errorDetailCode, ProgressDialog dialog, boolean resetLogs, ControlPanelInfo info)
task
- the task to be launched.initialSummary
- the initial summary to be displayed in the progress dialog.successSummary
- the success summary to be displayed in the progress dialog if the
task is successful.successDetail
- the success details to be displayed in the progress dialog if the
task is successful.errorSummary
- the error summary to be displayed in the progress dialog if the
task ended with error.errorDetail
- error details to be displayed in the progress dialog if the task
ended with error.errorDetailCode
- error detail message to be displayed in the progress dialog if the
task ended with error and we have an exit error code (for instance
if the error occurred when launching a script we will have an
error code).dialog
- the progress dialog.resetLogs
- whether the contents of the progress dialog should be reset or
not.info
- the ControlPanelInfo.protected boolean checkIntValue(Collection<LocalizableMessage> errors, String stringValue, int minValue, int maxValue, LocalizableMessage errMsg)
errors
- the list of error messages to be updated.stringValue
- the string value to analyze.minValue
- the minimum integer value accepted.maxValue
- the maximum integer value accepted.errMsg
- the error message to use to update the error list if the provided
value is not valid.true
if the provided string value is a valid integer and if
it is not updates a list of error messages with an error.protected void startServer()
protected void stopServer()
protected void restartServer()
protected GenericDialog getLoginDialog()
protected boolean entryExists(org.forgerock.opendj.ldap.Dn dn)
dn
- the DN of the entry to look for.true
if the entry with the provided DN could be found, false
otherwise.protected boolean hasObjectClass(org.forgerock.opendj.ldap.Dn dn, String... objectClasses)
dn
- the DN of the entry.objectClasses
- the object classes to check.true
if the entry exists and contains one of the specified object classes,
false
otherwise.protected Border getRightPanelBorder()
public static String getMonitoringValue(MonitoringAttributes attr, org.forgerock.opendj.ldap.messages.SearchResultEntry monitoringEntry)
attr
- the attribute to analyze.monitoringEntry
- the monitoring entry.protected void updateMonitoringInfo(List<? extends MonitoringAttributes> monitoringAttrs, List<JLabel> monitoringLabels, org.forgerock.opendj.ldap.messages.SearchResultEntry monitoringEntry)
monitoringAttrs
- the monitoring operations whose information we want to update.monitoringLabels
- the monitoring labels to be updated.monitoringEntry
- the monitoring entry containing the information to be displayed.protected static LocalizableMessage getLabel(MonitoringAttributes attr)
attr
- the monitoring attribute.protected List<String> getScheduleArgs(ScheduleType schedule)
schedule
- the schedule.protected void addScheduleErrors(ScheduleType schedule, Collection<LocalizableMessage> errors, JLabel label)
schedule
- the schedule.errors
- the list of errors.label
- the label to be marked as invalid if errors where encountered.protected void checkCompatibleSuperiors(Set<org.forgerock.opendj.ldap.schema.ObjectClass> objectClassSuperiors, org.forgerock.opendj.ldap.schema.ObjectClassType objectClassType, List<LocalizableMessage> errors)
objectClassSuperiors
- the superior object classes.objectClassType
- the object class type.errors
- the list of error messages.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.