| | |
| | | } |
| | | else |
| | | { |
| | | initializeWithArgParser(uData); |
| | | initializeWithArgParserForSourceServer(uData); |
| | | return initializeAllReplication(uData); |
| | | } |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | initializeWithArgParser(uData); |
| | | initializeWithArgParserForSourceServer(uData); |
| | | return preExternalInitialization(uData); |
| | | } |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | initializeWithArgParser(uData); |
| | | initializeWithArgParserForSourceServer(uData); |
| | | return postExternalInitialization(uData); |
| | | } |
| | | } |
| | |
| | | */ |
| | | private boolean promptIfRequired(InitializeAllReplicationUserData uData) |
| | | { |
| | | ConnectionWrapper conn = getConnection(uData); |
| | | ConnectionWrapper conn = getConnectionToSourceServer(uData); |
| | | if (conn == null) |
| | | { |
| | | return false; |
| | |
| | | */ |
| | | private boolean promptIfRequiredForPreOrPost(MonoServerReplicationUserData uData) |
| | | { |
| | | ConnectionWrapper conn = getConnection(uData); |
| | | ConnectionWrapper conn = getConnectionToSourceServer(uData); |
| | | if (conn == null) |
| | | { |
| | | return false; |
| | |
| | | } |
| | | } |
| | | |
| | | private ConnectionWrapper getConnection(MonoServerReplicationUserData uData) |
| | | private ConnectionWrapper getConnectionToSourceServer(MonoServerReplicationUserData uData) |
| | | { |
| | | // Try to connect to the server. |
| | | while (true) |
| | |
| | | */ |
| | | private boolean promptIfRequired(StatusReplicationUserData uData) throws ReplicationCliException |
| | | { |
| | | ConnectionWrapper conn = getConnection(uData); |
| | | ConnectionWrapper conn = getConnectionToSourceServer(uData); |
| | | if (conn == null) |
| | | { |
| | | return false; |
| | |
| | | } |
| | | |
| | | /** |
| | | * Initializes the contents of the provided user data object with what was |
| | | * provided in the command-line without prompting to the user. |
| | | * Initializes the contents of the provided user data object of a subcommand which operates on a |
| | | * single server with what was provided in the command-line without prompting to the user. |
| | | * <p> |
| | | * The subcommands which need more than the source server, or other arguments, have their own |
| | | * overload taking their own user data type. |
| | | * |
| | | * @param uData the user data object to be initialized. |
| | | */ |
| | | private void initializeWithArgParser(MonoServerReplicationUserData uData) |
| | | private void initializeWithArgParserForSourceServer(MonoServerReplicationUserData uData) |
| | | { |
| | | initialize(uData); |
| | | |