| | |
| | | import javax.swing.event.DocumentListener; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | import org.forgerock.opendj.server.config.client.BackendCfgClient; |
| | | import org.forgerock.opendj.server.config.client.BackendIndexCfgClient; |
| | | import org.forgerock.opendj.server.config.client.PluggableBackendCfgClient; |
| | | import org.forgerock.opendj.server.config.meta.BackendIndexCfgDefn.IndexType; |
| | | import org.opends.admin.ads.util.ConnectionWrapper; |
| | | import org.opends.guitools.controlpanel.datamodel.AbstractIndexDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | |
| | | import org.opends.guitools.controlpanel.event.ScrollPaneBorderListener; |
| | | import org.opends.guitools.controlpanel.task.DeleteIndexTask; |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.util.ConfigReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.opendj.server.config.client.BackendCfgClient; |
| | | import org.forgerock.opendj.server.config.client.BackendIndexCfgClient; |
| | | import org.forgerock.opendj.server.config.client.PluggableBackendCfgClient; |
| | | import org.forgerock.opendj.server.config.meta.BackendIndexCfgDefn.IndexType; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | |
| | | /** |
| | | * The panel that displays an existing index (it appears on the right of the |
| | |
| | | createLayout(); |
| | | } |
| | | |
| | | /** |
| | | * Creates the layout of the panel (but the contents are not populated here). |
| | | */ |
| | | /** Creates the layout of the panel (but the contents are not populated here). */ |
| | | private void createLayout() |
| | | { |
| | | GridBagConstraints gbc = new GridBagConstraints(); |
| | |
| | | !String.valueOf(index.getEntryLimit()).equals(entryLimit.getText()); |
| | | } |
| | | |
| | | /** |
| | | * The task in charge of modifying the index. |
| | | */ |
| | | /** The task in charge of modifying the index. */ |
| | | protected class ModifyIndexTask extends Task |
| | | { |
| | | private Set<String> backendSet; |
| | |
| | | /** |
| | | * Updates the configuration of the modified index. |
| | | * |
| | | * @throws OpenDsException |
| | | * @throws Exception |
| | | * if there is an error updating the configuration. |
| | | */ |
| | | private void updateConfiguration() throws Exception |
| | |
| | | if (!isServerRunning()) |
| | | { |
| | | configHandlerUpdated = true; |
| | | getInfo().stopPooling(); |
| | | if (getInfo().mustDeregisterConfig()) |
| | | { |
| | | DirectoryServer.deregisterBaseDN(DN.valueOf("cn=config")); |
| | | } |
| | | DirectoryServer.getInstance().initializeConfiguration(ConfigReader.configFile); |
| | | getInfo().setMustDeregisterConfig(true); |
| | | stopPoolingAndInitializeConfiguration(); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | if (configHandlerUpdated) |
| | | { |
| | | DirectoryServer.getInstance().initializeConfiguration(ConfigReader.configFile); |
| | | getInfo().startPooling(); |
| | | startPoolingAndInitializeConfiguration(); |
| | | } |
| | | } |
| | | } |
| | |
| | | * |
| | | * @param connWrapper |
| | | * the connection to be used to update the index configuration. |
| | | * @throws OpenDsException |
| | | * @throws Exception |
| | | * if there is an error updating the server. |
| | | */ |
| | | private void modifyIndexOnline(final ConnectionWrapper connWrapper) throws Exception |