| | |
| | | import java.util.Set; |
| | | import java.util.TreeSet; |
| | | |
| | | import javax.naming.ldap.InitialLdapContext; |
| | | import javax.swing.SwingUtilities; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.forgerock.opendj.ldap.SearchScope; |
| | | import org.opends.admin.ads.util.ConnectionWrapper; |
| | | import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; |
| | |
| | | import org.opends.guitools.controlpanel.util.ConfigReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.opendj.config.PropertyException; |
| | | import org.forgerock.opendj.config.client.ManagementContext; |
| | | import org.opends.server.admin.client.ldap.JNDIDirContextAdaptor; |
| | | import org.forgerock.opendj.config.client.ldap.LDAPManagementContext; |
| | | import org.forgerock.opendj.server.config.client.BackendCfgClient; |
| | | import org.forgerock.opendj.server.config.client.BackendVLVIndexCfgClient; |
| | | import org.forgerock.opendj.server.config.client.PluggableBackendCfgClient; |
| | | import org.forgerock.opendj.server.config.meta.BackendVLVIndexCfgDefn; |
| | | import org.opends.server.core.ConfigurationHandler; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.OpenDsException; |
| | | |
| | | /** |
| | | * Panel that appears when the user defines a new VLV index. |
| | |
| | | return true; |
| | | } |
| | | |
| | | private void updateConfiguration() throws OpenDsException |
| | | private void updateConfiguration() throws Exception |
| | | { |
| | | boolean configHandlerUpdated = false; |
| | | try |
| | |
| | | DirectoryServer.deregisterBaseDN(DN.valueOf("cn=config")); |
| | | } |
| | | DirectoryServer.getInstance().initializeConfiguration( |
| | | org.opends.server.extensions.ConfigFileHandler.class.getName(), ConfigReader.configFile); |
| | | ConfigurationHandler.class.getName(), ConfigReader.configFile); |
| | | getInfo().setMustDeregisterConfig(true); |
| | | } |
| | | else |
| | |
| | | |
| | | if (isServerRunning()) |
| | | { |
| | | createVLVIndexOnline(getInfo().getDirContext()); |
| | | createVLVIndexOnline(getInfo().getConnection()); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | private void createVLVIndexOnline(InitialLdapContext ctx) throws OpenDsException |
| | | private void createVLVIndexOnline(ConnectionWrapper ctx) throws Exception |
| | | { |
| | | final ManagementContext mCtx = LDAPManagementContext.createFromContext(JNDIDirContextAdaptor.adapt(ctx)); |
| | | final BackendCfgClient backend = mCtx.getRootConfiguration().getBackend(backendName.getText()); |
| | | final BackendCfgClient backend = ctx.getRootConfiguration().getBackend(backendName.getText()); |
| | | createBackendVLVIndexOnline((PluggableBackendCfgClient) backend); |
| | | } |
| | | |
| | | private void createBackendVLVIndexOnline(final PluggableBackendCfgClient backend) throws OpenDsException |
| | | private void createBackendVLVIndexOnline(final PluggableBackendCfgClient backend) throws Exception |
| | | { |
| | | final List<PropertyException> exceptions = new ArrayList<>(); |
| | | final BackendVLVIndexCfgClient index = |