| | |
| | | import javax.swing.JCheckBox; |
| | | import javax.swing.SwingUtilities; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.CategorizedComboBoxElement; |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.guitools.controlpanel.datamodel.IndexDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.IndexTypeDescriptor; |
| | | import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.task.OfflineUpdateException; |
| | |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.util.ConfigReader; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.opends.server.admin.std.meta.LocalDBIndexCfgDefn.IndexType; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | |
| | | import org.opends.server.types.Schema; |
| | | import org.opends.server.util.LDIFReader; |
| | | import org.opends.server.util.ServerConstants; |
| | | |
| | | import com.forgerock.opendj.cli.CommandBuilder; |
| | | |
| | | /** |
| | |
| | | private Set<String> backendSet; |
| | | private String attributeName; |
| | | private int entryLimitValue; |
| | | private SortedSet<IndexType> indexTypes; |
| | | private SortedSet<IndexTypeDescriptor> indexTypes; |
| | | |
| | | /** |
| | | * The constructor of the task. |
| | |
| | | lines.add("objectClass: top"); |
| | | lines.add("ds-cfg-attribute: "+attributeName); |
| | | lines.add("ds-cfg-index-entry-limit: "+entryLimitValue); |
| | | for (IndexType type : indexTypes) |
| | | for (IndexTypeDescriptor type : indexTypes) |
| | | { |
| | | lines.add("ds-cfg-index-type: " + type); |
| | | lines.add("ds-cfg-index-type: " + type.toLocalDBIndexType()); |
| | | } |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (String line : lines) |
| | |
| | | args.add("--index-name"); |
| | | args.add(attributeName); |
| | | |
| | | for (IndexType type : indexTypes) |
| | | for (IndexTypeDescriptor type : indexTypes) |
| | | { |
| | | args.add("--set"); |
| | | args.add("index-type:"+type); |
| | | args.add("index-type:"+type.toLocalDBIndexType()); |
| | | } |
| | | args.add("--set"); |
| | | args.add("index-entry-limit:"+entryLimitValue); |