| | |
| | | */ |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | | import static org.opends.guitools.controlpanel.util.Utilities.getElementNameOrOID; |
| | | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | import org.opends.guitools.controlpanel.browser.IconPool; |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.SomeSchemaElement; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationElementCreatedEvent; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationElementCreatedListener; |
| | |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.guitools.controlpanel.util.ViewPositions; |
| | | import org.opends.server.schema.ServerSchemaElement; |
| | | import org.opends.server.types.Schema; |
| | | |
| | | /** The pane that is displayed when the user clicks on 'Browse Schema'. */ |
| | |
| | | |
| | | private JPopupMenu popup; |
| | | |
| | | private SomeSchemaElement lastCreatedElement; |
| | | private ServerSchemaElement lastCreatedElement; |
| | | |
| | | private final CategoryTreeNode attributes = new CategoryTreeNode(INFO_CTRL_PANEL_ATTRIBUTES_CATEGORY_NODE.get()); |
| | | private final CategoryTreeNode objectClasses = |
| | |
| | | { |
| | | if (mustAdd(oc)) |
| | | { |
| | | SomeSchemaElement element = new SomeSchemaElement(oc); |
| | | ServerSchemaElement element = new ServerSchemaElement(oc); |
| | | String name = oc.getNameOrOID(); |
| | | if (Utilities.isStandard(element)) |
| | | { |
| | |
| | | Map<String, CustomAttributeTreeNode> hmCustomAttrs = new HashMap<>(); |
| | | for (AttributeType attr : lastSchema.getAttributeTypes()) |
| | | { |
| | | SomeSchemaElement element = new SomeSchemaElement(attr); |
| | | ServerSchemaElement element = new ServerSchemaElement(attr); |
| | | if (mustAdd(attr)) |
| | | { |
| | | String name = attr.getNameOrOID(); |
| | |
| | | if (lastCreatedElement != null) |
| | | { |
| | | if (node instanceof CustomObjectClassTreeNode |
| | | && name.equals(lastCreatedElement.getNameOrOID())) |
| | | && name.equals(getElementNameOrOID(lastCreatedElement))) |
| | | { |
| | | newSelectionPath = new TreePath(node.getPath()); |
| | | lastCreatedElement = null; |
| | |
| | | private void configurationElementCreated(ConfigurationElementCreatedEvent ev) |
| | | { |
| | | Object o = ev.getConfigurationObject(); |
| | | if (o instanceof SomeSchemaElement) |
| | | if (o instanceof ServerSchemaElement) |
| | | { |
| | | lastCreatedElement = (SomeSchemaElement) o; |
| | | lastCreatedElement = (ServerSchemaElement) o; |
| | | } |
| | | } |
| | | |