Class ViewEntryPanel

    • Field Detail

      • schemaReadOnlyAttributes

        protected SortedSet<String> schemaReadOnlyAttributes
        The read-only attributes as they appear on the schema.
      • schemaReadOnlyAttributesLowerCase

        protected SortedSet<String> schemaReadOnlyAttributesLowerCase
        The read-only attributes in lower case.
      • editableOperationalAttrNames

        protected SortedSet<String> editableOperationalAttrNames
        The editable operational attributes.
      • ignoreEntryChangeEvents

        protected boolean ignoreEntryChangeEvents
        Whether the entry change events should be ignored or not.
      • displayOnlyWithAttrs

        protected static boolean displayOnlyWithAttrs
        Static boolean used to know whether only attributes with values should be displayed or not.
    • Constructor Detail

      • ViewEntryPanel

        public ViewEntryPanel()
    • Method Detail

      • okClicked

        public void okClicked()
        Description copied from class: StatusGenericPanel
        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.).
        Specified by:
        okClicked in class StatusGenericPanel
      • getEntry

        public abstract Entry getEntry()
                                throws OpenDsException
        Returns an Entry object representing what the panel is displaying.
        Returns:
        an Entry object representing what the panel is displaying.
        Throws:
        OpenDsException - if the entry cannot be generated (in particular if the user provided invalid data).
      • update

        public abstract void update​(Entry sr,
                                    boolean isReadOnly,
                                    TreePath path)
        Updates the contents of the panel.
        Parameters:
        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.
      • addTitlePanel

        protected void addTitlePanel​(Container c,
                                     GridBagConstraints gbc)
        Adds a title panel to the container.
        Parameters:
        c - the container where the title panel must be added.
        gbc - the grid bag constraints to be used.
      • checkSchema

        protected boolean checkSchema()
        Whether the schema must be checked or not.
        Returns:
        true if the server is configured to check schema and false otherwise.
      • addLDAPEntryChangedListener

        public void addLDAPEntryChangedListener​(LDAPEntryChangedListener listener)
        Adds an LDAP entry change listener.
        Parameters:
        listener - the listener.
      • removeLDAPEntryChangedListener

        public void removeLDAPEntryChangedListener​(LDAPEntryChangedListener listener)
        Removes an LDAP entry change listener.
        Parameters:
        listener - the listener.
      • requiresBorder

        public boolean requiresBorder()
        Description copied from class: StatusGenericPanel
        Returns true if this panel requires some bordering (in general an EmptyBorder with some insets) and false otherwise.
        Overrides:
        requiresBorder in class StatusGenericPanel
        Returns:
        true if this panel requires some bordering (in general an EmptyBorder with some insets) and false otherwise.
      • getDisplayedDN

        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).
        Returns:
        the DN of the entry that the user is editing.
      • notifyListeners

        protected void notifyListeners()
        Notifies the entry changed listeners that the entry changed.
      • updateTitle

        protected void updateTitle​(Entry sr,
                                   TreePath path)
        Updates the title panel with the provided entry.
        Parameters:
        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.
      • getObjectClassDescriptor

        protected ObjectClassValue getObjectClassDescriptor​(Iterable<ByteString> ocAttr,
                                                            Schema schema)
        Returns an object class value representing all the object class values of the entry.
        Parameters:
        ocAttr - the list of object class values.
        schema - the schema.
        Returns:
        an object class value representing all the object class values of the entry.
      • addValuesInRDN

        protected void addValuesInRDN​(Entry entry)
        Adds the values in the RDN to the entry definition.
        Parameters:
        entry - the entry to be updated.
      • getTitle

        public org.forgerock.i18n.LocalizableMessage getTitle()
        Description copied from class: StatusGenericPanel
        Returns the title that will be used as title of the dialog.
        Specified by:
        getTitle in class StatusGenericPanel
        Returns:
        the title that will be used as title of the dialog.
      • configurationChanged

        public void configurationChanged​(ConfigurationChangeEvent ev)
        Description copied from interface: ConfigChangeListener
        Method that is called when a change in the configuration occurred.
        Parameters:
        ev - the configuration change event.
      • appendLDIFLine

        protected void appendLDIFLine​(StringBuilder sb,
                                      String attrName,
                                      Object value)
        Appends the LDIF line corresponding to the value of an attribute to the provided StringBuilder.
        Parameters:
        sb - the StringBuilder that must be updated.
        attrName - the attribute name.
        value - the attribute value.
      • isPassword

        protected boolean isPassword​(String attrName)
        Returns true if the provided attribute name has password syntax and false otherwise.
        Parameters:
        attrName - the attribute name.
        Returns:
        true if the provided attribute name has password syntax and false otherwise.
      • getValues

        protected abstract List<Object> getValues​(String attrName)
        Gets the values associated with a given attribute. The values are the ones displayed in the panel.
        Parameters:
        attrName - the attribute name.
        Returns:
        the values associated with a given attribute.
      • setValues

        protected void setValues​(Entry sr,
                                 String attrName)
        Sets the values displayed in the panel for a given attribute in the provided search result.
        Parameters:
        sr - the search result to be updated.
        attrName - the attribute name.
      • isEditable

        public static boolean isEditable​(AttributeDescription attrDesc,
                                         Schema schema)
        Returns whether the provided attribute name is an editable attribute.
        Parameters:
        attrDesc - the attribute description.
        schema - the schema.
        Returns:
        true if the provided attribute name is an editable attribute, false otherwise.
      • getObjectClassSuperiorValues

        protected Set<String> getObjectClassSuperiorValues​(ObjectClass oc)
        Returns the list of superior object classes (to top) for a given object class.
        Parameters:
        oc - the object class.
        Returns:
        the set of superior object classes for a given object classes.