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