| | |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | import static com.forgerock.opendj.cli.CommonArguments.*; |
| | | import static com.forgerock.opendj.cli.ArgumentConstants.*; |
| | | import static com.forgerock.opendj.cli.CommonArguments.*; |
| | | import static com.forgerock.opendj.cli.Utils.*; |
| | | |
| | | import java.io.File; |
| | |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.config.server.ConfigException; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.forgerock.opendj.ldap.ResultCode; |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | import org.forgerock.opendj.server.config.server.BackendCfg; |
| | | import org.opends.server.api.Backend; |
| | | import org.opends.server.api.Backend.BackendOperation; |
| | |
| | | import org.opends.server.tasks.ImportTask; |
| | | import org.opends.server.tools.makeldif.TemplateFile; |
| | | import org.opends.server.tools.tasks.TaskTool; |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | import org.forgerock.opendj.ldap.DN; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.ExistingFileBehavior; |
| | | import org.opends.server.types.InitializationException; |
| | |
| | | |
| | | if (initializeServer) |
| | | { |
| | | DirectoryServer.InitializationBuilder ib; |
| | | try |
| | | { |
| | | new DirectoryServer.InitializationBuilder(configFile.getValue()) |
| | |
| | | } |
| | | } |
| | | |
| | | ArrayList<Backend> backendList = new ArrayList<>(); |
| | | ArrayList<BackendCfg> entryList = new ArrayList<>(); |
| | | ArrayList<Backend<?>> backendList = new ArrayList<>(); |
| | | ArrayList<BackendCfg> entryList = new ArrayList<>(); |
| | | ArrayList<List<DN>> dnList = new ArrayList<>(); |
| | | int code = BackendToolUtils.getBackends(backendList, entryList, dnList); |
| | | if (code != 0) |
| | |
| | | return retCode; |
| | | } |
| | | |
| | | private Object getMessage(Exception e) |
| | | { |
| | | try |
| | | { |
| | | throw e; |
| | | } |
| | | catch (ConfigException | InitializationException e2) |
| | | { |
| | | return e2.getMessage(); |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | return getExceptionMessage(e2); |
| | | } |
| | | } |
| | | |
| | | private boolean useBackend(Set<DN> includeBranches, List<DN> dnlist) |
| | | { |
| | | for (DN baseDN : dnlist) |