public abstract class ViewEntryPanel extends StatusGenericPanel
StatusGenericPanel.IgnoreItemListener
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected static boolean |
displayOnlyWithAttrs
Static boolean used to know whether only attributes with values should be displayed or not.
|
protected SortedSet<String> |
editableOperationalAttrNames
The editable operational attributes.
|
protected boolean |
ignoreEntryChangeEvents
Whether the entry change events should be ignored or not.
|
protected SortedSet<String> |
schemaReadOnlyAttributes
The read-only attributes as they appear on the schema.
|
protected SortedSet<String> |
schemaReadOnlyAttributesLowerCase
The read-only attributes in lower case.
|
COMBO_SEPARATOR, errorPane, NOT_APPLICABLE
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
Constructor and Description |
---|
ViewEntryPanel() |
Modifier and Type | Method and Description |
---|---|
void |
addLDAPEntryChangedListener(LDAPEntryChangedListener listener)
Adds an LDAP entry change listener.
|
protected void |
addTitlePanel(Container c,
GridBagConstraints gbc)
Adds a title panel to the container.
|
protected void |
addValuesInRDN(org.forgerock.opendj.ldap.Entry entry)
Adds the values in the RDN to the entry definition.
|
protected void |
appendLDIFLine(StringBuilder sb,
String attrName,
Object value)
Appends the LDIF line corresponding to the value of an
attribute to the provided StringBuilder.
|
protected boolean |
checkSchema()
Whether the schema must be checked or not.
|
void |
configurationChanged(ConfigurationChangeEvent ev)
Method that is called when a change in the configuration occurred.
|
protected abstract String |
getDisplayedDN()
Returns the DN of the entry that the user is editing (it might differ
from the DN of the entry in the tree if the user modified the DN).
|
abstract org.forgerock.opendj.ldap.Entry |
getEntry()
Returns an Entry object representing what the panel is displaying.
|
protected Set<String> |
getObjectClassSuperiorValues(org.forgerock.opendj.ldap.schema.ObjectClass oc)
Returns the list of superior object classes (to top) for a given object class.
|
LocalizableMessage |
getTitle()
Returns the title that will be used as title of the dialog.
|
protected abstract List<Object> |
getValues(String attrName)
Gets the values associated with a given attribute.
|
static boolean |
isEditable(org.forgerock.opendj.ldap.AttributeDescription attrDesc,
org.forgerock.opendj.ldap.schema.Schema schema)
Returns whether the provided attribute name is an editable attribute.
|
protected boolean |
isPassword(String attrName)
Returns
true if the provided attribute name has password
syntax and false otherwise. |
protected void |
notifyListeners()
Notifies the entry changed listeners that the entry changed.
|
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.).
|
void |
removeLDAPEntryChangedListener(LDAPEntryChangedListener listener)
Removes an LDAP entry change listener.
|
boolean |
requiresBorder()
Returns
true if this panel requires some bordering (in general
an EmptyBorder with some insets) and false otherwise. |
protected void |
setValues(org.forgerock.opendj.ldap.Entry sr,
String attrName)
Sets the values displayed in the panel for a given attribute in the
provided search result.
|
abstract void |
update(org.forgerock.opendj.ldap.Entry sr,
boolean isReadOnly,
TreePath path)
Updates the contents of the panel.
|
protected void |
updateTitle(org.forgerock.opendj.ldap.Entry sr,
TreePath path)
Updates the title panel with the provided entry.
|
add, add, addBottomGlue, addConfigurationElementCreatedListener, addErrorPane, addErrorPane, addScheduleErrors, authenticationRequired, callConfigurationChangedInBackground, cancelClicked, checkCompatibleSuperiors, checkIntValue, checkOKButtonEnable, closeClicked, comboBoxSelected, createErrorPane, createRequiredLabel, displayBackend, displayConfirmationDialog, displayErrorDialog, displayErrorMessage, displayMainPanel, displayMessage, entryExists, getAuthenticateHTML, getButtonType, getConfigurationElementCreatedListeners, getInfo, getLabel, getLoginDialog, getMenuBar, getMonitoringValue, getPreferredFocusComponent, getRightPanelBorder, getScheduleArgs, getStartServerHTML, hasObjectClass, isBinary, isCategory, isDisposeOnClose, isEnableCancel, isEnableClose, isEnableOK, isLocal, isServerRunning, launchOperation, launchOperation, packParentDialog, rebuildIndexIfNecessary, removeConfigurationElementCreatedListener, requiresScroll, restartServer, setDisposeOnClose, setEnabledCancel, setEnabledOK, setInfo, setPrimaryInvalid, setPrimaryValid, setSecondaryInvalid, setSecondaryValid, startServer, stopServer, toBeDisplayed, updateBaseDNComboBoxModel, updateComboBoxModel, updateConfirmationPane, updateErrorPane, updateErrorPaneAndOKButtonIfAuthRequired, updateErrorPaneIfAuthRequired, updateErrorPaneIfServerRunningAndAuthRequired, updateIndexMap, updateMonitoringInfo, updateSimpleBackendComboBoxModel
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
protected SortedSet<String> schemaReadOnlyAttributes
protected SortedSet<String> schemaReadOnlyAttributesLowerCase
protected SortedSet<String> editableOperationalAttrNames
protected boolean ignoreEntryChangeEvents
protected static boolean displayOnlyWithAttrs
public ViewEntryPanel()
public void okClicked()
StatusGenericPanel
okClicked
in class StatusGenericPanel
public abstract org.forgerock.opendj.ldap.Entry getEntry() throws OpenDsException
OpenDsException
- if the entry cannot be generated (in particular if
the user provided invalid data).public abstract void update(org.forgerock.opendj.ldap.Entry sr, boolean isReadOnly, TreePath path)
sr
- the search result to be used to update the panel.isReadOnly
- whether the entry is read-only or not.path
- the tree path associated with the entry in the tree.protected void addTitlePanel(Container c, GridBagConstraints gbc)
c
- the container where the title panel must be added.gbc
- the grid bag constraints to be used.protected boolean checkSchema()
true
if the server is configured to check schema and
false
otherwise.public void addLDAPEntryChangedListener(LDAPEntryChangedListener listener)
listener
- the listener.public void removeLDAPEntryChangedListener(LDAPEntryChangedListener listener)
listener
- the listener.public boolean requiresBorder()
StatusGenericPanel
true
if this panel requires some bordering (in general
an EmptyBorder with some insets) and false
otherwise.requiresBorder
in class StatusGenericPanel
true
if this panel requires some bordering (in general
an EmptyBorder with some insets) and false
otherwise.protected abstract String getDisplayedDN()
protected void notifyListeners()
protected void updateTitle(org.forgerock.opendj.ldap.Entry sr, TreePath path)
sr
- the search result.path
- the path to the node of the entry selected in the tree. Used
to display the same icon as in the tree.protected void addValuesInRDN(org.forgerock.opendj.ldap.Entry entry)
entry
- the entry to be updated.public LocalizableMessage getTitle()
StatusGenericPanel
getTitle
in class StatusGenericPanel
public void configurationChanged(ConfigurationChangeEvent ev)
ConfigChangeListener
ev
- the configuration change event.protected void appendLDIFLine(StringBuilder sb, String attrName, Object value)
sb
- the StringBuilder that must be updated.attrName
- the attribute name.value
- the attribute value.protected boolean isPassword(String attrName)
true
if the provided attribute name has password
syntax and false
otherwise.attrName
- the attribute name.true
if the provided attribute name has password
syntax and false
otherwise.protected abstract List<Object> getValues(String attrName)
attrName
- the attribute name.protected void setValues(org.forgerock.opendj.ldap.Entry sr, String attrName)
sr
- the search result to be updated.attrName
- the attribute name.public static boolean isEditable(org.forgerock.opendj.ldap.AttributeDescription attrDesc, org.forgerock.opendj.ldap.schema.Schema schema)
attrDesc
- the attribute description.schema
- the schema.true
if the provided attribute name is an editable
attribute, false
otherwise.protected Set<String> getObjectClassSuperiorValues(org.forgerock.opendj.ldap.schema.ObjectClass oc)
oc
- the object class.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.