001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008-2009 Sun Microsystems, Inc.
025 *      Portions Copyright 2014 ForgeRock AS
026 */
027package org.opends.server.tools.dsreplication;
028
029/**
030 * This class is used to store the information provided by the user to
031 * disable replication.  It is required because when we are in interactive
032 * mode the ReplicationCliArgumentParser is not enough.
033 */
034public class DisableReplicationUserData extends MonoServerReplicationUserData
035{
036  private String bindDn;
037  private String bindPwd;
038  private boolean disableReplicationServer;
039  private boolean disableAll;
040
041  /**
042   * Returns the bind DN to be used to connect to the server if no Administrator
043   * has been defined.
044   * @return the bind DN to be used to connect to the server if no Administrator
045   * has been defined.
046   */
047  public String getBindDn()
048  {
049    return bindDn;
050  }
051
052  /**
053   * Sets the bind DN to be used to connect to the server if no Administrator
054   * has been defined.
055   * @param bindDn the bind DN to be used.
056   */
057  public void setBindDn(String bindDn)
058  {
059    this.bindDn = bindDn;
060  }
061
062  /**
063   * Returns the password to be used to connect to the server if no
064   * Administrator has been defined.
065   * @return the password to be used to connect to the server if no
066   * Administrator has been defined.
067   */
068  public String getBindPwd()
069  {
070    return bindPwd;
071  }
072
073  /**
074   * Sets the password to be used to connect to the server if no Administrator
075   * has been defined.
076   * @param bindPwd the password to be used.
077   */
078  public void setBindPwd(String bindPwd)
079  {
080    this.bindPwd = bindPwd;
081  }
082
083  /**
084   * Tells whether the user wants to disable all the replication from the
085   * server.
086   * @return <CODE>true</CODE> if the user wants to disable all replication
087   * from the server and <CODE>false</CODE> otherwise.
088   */
089  public boolean disableAll()
090  {
091    return disableAll;
092  }
093
094  /**
095   * Sets whether the user wants to disable all the replication from the
096   * server.
097   * @param disableAll whether the user wants to disable all the replication
098   * from the server.
099   */
100  public void setDisableAll(boolean disableAll)
101  {
102    this.disableAll = disableAll;
103  }
104
105  /**
106   * Tells whether the user asked to disable the replication server in the
107   * server.
108   * @return <CODE>true</CODE> if the user wants to disable replication server
109   * in the server and <CODE>false</CODE> otherwise.
110   */
111  public boolean disableReplicationServer()
112  {
113    return disableReplicationServer;
114  }
115
116  /**
117   * Sets whether the user asked to disable the replication server in the
118   * server.
119   * @param disableReplicationServer whether the user asked to disable the
120   * replication server in the server.
121   */
122  public void setDisableReplicationServer(boolean disableReplicationServer)
123  {
124    this.disableReplicationServer = disableReplicationServer;
125  }
126}