| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.tasks.PurgeConflictsHistoricalTask; |
| | | import org.opends.server.tools.ClientException; |
| | | import org.opends.server.tools.ToolConstants; |
| | | import org.opends.server.tools.tasks.TaskEntry; |
| | | import org.opends.server.tools.tasks.TaskScheduleInteraction; |
| | |
| | | import com.forgerock.opendj.cli.BooleanArgument; |
| | | import com.forgerock.opendj.cli.StringArgument; |
| | | import com.forgerock.opendj.cli.ArgumentException; |
| | | import com.forgerock.opendj.cli.CLIException; |
| | | import com.forgerock.opendj.cli.ClientException; |
| | | import com.forgerock.opendj.cli.FileBasedArgument; |
| | | import com.forgerock.opendj.cli.IntegerArgument; |
| | | |
| | |
| | | suffixes.add(dn); |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | confirmationLimitReached = true; |
| | |
| | | INFO_REPLICATION_PURGE_HISTORICAL_LOCAL_PROMPT.get(), |
| | | true, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | { |
| | | interaction.run(); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | cancelled = true; |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | INFO_REPLICATION_ENABLE_REPLICATION_SERVER1_PROMPT.get(), |
| | | true, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | askConfirmation(INFO_REPLICATION_ENABLE_SECURE1_PROMPT.get(replicationPort1), |
| | | false, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | INFO_REPLICATION_ENABLE_REPLICATION_DOMAIN1_PROMPT.get(), |
| | | true, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | cancelled = true; |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | INFO_REPLICATION_ENABLE_REPLICATION_SERVER2_PROMPT.get(), |
| | | true, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | secureReplication2 = |
| | | askConfirmation(INFO_REPLICATION_ENABLE_SECURE2_PROMPT.get(replicationPort2), false, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | INFO_REPLICATION_ENABLE_REPLICATION_DOMAIN2_PROMPT.get(), |
| | | true, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | disableAll = askConfirmation(INFO_REPLICATION_PROMPT_DISABLE_ALL.get(), |
| | | disableAll, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | disableReplicationServer, |
| | | logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | false, |
| | | logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | INFO_REPLICATION_DISABLE_ALL_SUFFIXES_DISABLE_REPLICATION_SERVER.get( |
| | | ConnectionUtils.getHostPort(ctx), repPort), true, logger)); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | cancelled = !askConfirmation(INFO_REPLICATION_CONFIRM_DISABLE_ADS.get( |
| | | ADSContext.getAdministrationSuffixDN()), true, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | cancelled = !askConfirmation( |
| | | INFO_REPLICATION_CONFIRM_DISABLE_SCHEMA.get(), true, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | logger); |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | ADSContext.getAdministrationSuffixDN(), hostPortSource), true, |
| | | logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | INFO_REPLICATION_CONFIRM_INITIALIZE_ALL_GENERIC.get( |
| | | hostPortSource), true, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | ADSContext.getAdministrationSuffixDN(), hostPortDestination, |
| | | hostPortSource), true, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | INFO_REPLICATION_CONFIRM_INITIALIZE_GENERIC.get( |
| | | hostPortDestination, hostPortSource), true, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | get(Utils.getMessageFromCollection(exceptionMsgs, |
| | | Constants.LINE_SEPARATOR)), true, logger); |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | cancelled = true; |
| | |
| | | suffixes.add(dn); |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | confirmationLimitReached = true; |
| | |
| | | suffixes.add(dn); |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | confirmationLimitReached = true; |
| | |
| | | true, logger); |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | confirmationLimitReached = true; |
| | |
| | | suffixes.add(dn); |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | confirmationLimitReached = true; |
| | |
| | | ReplicationCliReturnCode.USER_CANCELLED, null); |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | throw new ReplicationCliException( |
| | |
| | | ReplicationCliReturnCode.USER_CANCELLED, null); |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | throw new ReplicationCliException( |
| | |
| | | returnValue = SubcommandChoice.CANCEL; |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | returnValue = SubcommandChoice.CANCEL; |
| | | logger.warn(LocalizableMessage.raw("Error reading input: "+ce, ce)); |
| | |
| | | ReplicationCliReturnCode.USER_CANCELLED, null); |
| | | } |
| | | } |
| | | catch (CLIException ce) |
| | | catch (ClientException ce) |
| | | { |
| | | println(ce.getMessageObject()); |
| | | throw new ReplicationCliException( |