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 2006-2008 Sun Microsystems, Inc.
015 * Portions Copyright 2015 ForgeRock AS.
016 */
017package org.opends.server.types;
018
019
020
021/**
022 * This enumeration defines the set of possible operation types that
023 * may be processed by the Directory Server.
024 */
025@org.opends.server.types.PublicAPI(
026     stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
027     mayInstantiate=false,
028     mayExtend=false,
029     mayInvoke=true)
030public enum OperationType
031{
032  /**
033   * The operation type for abandon operations.
034   */
035  ABANDON("ABANDON"),
036
037
038
039  /**
040   * The operation type for add operations.
041   */
042  ADD("ADD"),
043
044
045
046  /**
047   * The operation type for bind operations.
048   */
049  BIND("BIND"),
050
051
052
053  /**
054   * The operation type for compare operations.
055   */
056  COMPARE("COMPARE"),
057
058
059
060  /**
061   * The operation type for delete operations.
062   */
063  DELETE("DELETE"),
064
065
066
067  /**
068   * The operation type for extended operations.
069   */
070  EXTENDED("EXTENDED"),
071
072
073
074  /**
075   * The operation type for modify operations.
076   */
077  MODIFY("MODIFY"),
078
079
080
081  /**
082   * The operation type for modify DN operations.
083   */
084  MODIFY_DN("MODIFYDN"),
085
086
087
088  /**
089   * The operation type for search operations.
090   */
091  SEARCH("SEARCH"),
092
093
094
095  /**
096   * The operation type for unbind operations.
097   */
098  UNBIND("UNBIND");
099
100
101
102  /** The string representation of this operation type. */
103  private final String operationName;
104
105
106
107  /**
108   * Creates a new operation type with the provided operation name.
109   *
110   * @param  operationName  The operation name for this operation
111   *                        type.
112   */
113  private OperationType(String operationName)
114  {
115    this.operationName = operationName;
116  }
117
118
119
120  /**
121   * Retrieves the human-readable name for this operation type.
122   *
123   * @return  The human-readable name for this operation type.
124   */
125  public final String getOperationName()
126  {
127    return operationName;
128  }
129
130
131
132  /**
133   * Retrieves a string representation of this operation type.
134   *
135   * @return  A string representation of this operation type.
136   */
137  public final String toString()
138  {
139    return operationName;
140  }
141}
142