| | |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizedIllegalArgumentException; |
| | | import org.forgerock.opendj.config.LDAPProfile; |
| | | import org.forgerock.opendj.config.PropertyException; |
| | | import org.forgerock.opendj.config.client.ManagementContext; |
| | | import org.forgerock.opendj.config.client.ldap.LDAPManagementContext; |
| | |
| | | /** Name text field. */ |
| | | protected final JTextField name = Utilities.createMediumTextField(); |
| | | /** Base DNs combo box. */ |
| | | protected final JComboBox baseDNs = Utilities.createComboBox(); |
| | | protected final JComboBox<CharSequence> baseDNs = Utilities.createComboBox(); |
| | | /** Subtree text field. */ |
| | | protected final JTextField baseDN = Utilities.createLongTextField(); |
| | | |
| | |
| | | protected final JButton remove = Utilities.createButton(INFO_CTRL_PANEL_VLV_INDEX_REMOVE_BUTTON_LABEL.get()); |
| | | |
| | | /** Ascending order combo box. */ |
| | | private final JComboBox ascendingOrder = Utilities.createComboBox(); |
| | | private final JComboBox<LocalizableMessage> ascendingOrder = Utilities.createComboBox(); |
| | | |
| | | /** Combo box containing the sort order. */ |
| | | protected DefaultListModel<VLVSortOrder> sortOrderModel; |
| | |
| | | c.add(p, gbc); |
| | | gbc.gridy++; |
| | | |
| | | DefaultComboBoxModel model = new DefaultComboBoxModel(new Object[] { COMBO_SEPARATOR, OTHER_BASE_DN }); |
| | | baseDNs.setModel(model); |
| | | baseDNs.setModel(new DefaultComboBoxModel<CharSequence>( |
| | | new CharSequence[] { COMBO_SEPARATOR, OTHER_BASE_DN })); |
| | | baseDNs.setRenderer(new CustomListCellRenderer(baseDNs)); |
| | | ItemListener listener = new IgnoreItemListener(baseDNs); |
| | | baseDNs.addItemListener(listener); |
| | |
| | | c.add(attributes, gbc); |
| | | gbc.gridx++; |
| | | |
| | | ascendingOrder.setModel(new DefaultComboBoxModel(new Object[] { ASCENDING, DESCENDING })); |
| | | ascendingOrder.setModel(new DefaultComboBoxModel<LocalizableMessage>( |
| | | new LocalizableMessage[] { ASCENDING, DESCENDING })); |
| | | c.add(ascendingOrder, gbc); |
| | | gbc.gridy++; |
| | | |
| | |
| | | { |
| | | getInfo().initializeConfigurationFramework(); |
| | | final File configFile = Installation.getLocal().getCurrentConfigurationFile(); |
| | | final LDAPProfile ldapProfile = LDAPProfile.getInstance(); |
| | | try (ManagementContext context = LDAPManagementContext.newLDIFManagementContext(configFile, ldapProfile)) |
| | | try (ManagementContext context = LDAPManagementContext.newLDIFManagementContext(configFile)) |
| | | { |
| | | final PluggableBackendCfgClient backend = |
| | | (PluggableBackendCfgClient) context.getRootConfiguration().getBackend(backendName); |