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