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-2016 ForgeRock AS. 016 */ 017package org.opends.server.types; 018 019/** 020 * This enumeration defines the set of possible operation types that 021 * may be processed by the Directory Server. 022 */ 023@org.opends.server.types.PublicAPI( 024 stability=org.opends.server.types.StabilityLevel.UNCOMMITTED, 025 mayInstantiate=false, 026 mayExtend=false, 027 mayInvoke=true) 028public enum OperationType 029{ 030 /** The operation type for abandon operations. */ 031 ABANDON("ABANDON"), 032 /** The operation type for add operations. */ 033 ADD("ADD"), 034 /** The operation type for bind operations. */ 035 BIND("BIND"), 036 /** The operation type for compare operations. */ 037 COMPARE("COMPARE"), 038 /** The operation type for delete operations. */ 039 DELETE("DELETE"), 040 /** The operation type for extended operations. */ 041 EXTENDED("EXTENDED"), 042 /** The operation type for modify operations. */ 043 MODIFY("MODIFY"), 044 /** The operation type for modify DN operations. */ 045 MODIFY_DN("MODIFYDN"), 046 /** The operation type for search operations. */ 047 SEARCH("SEARCH"), 048 /** The operation type for unbind operations. */ 049 UNBIND("UNBIND"); 050 051 /** The string representation of this operation type. */ 052 private final String operationName; 053 054 /** 055 * Creates a new operation type with the provided operation name. 056 * 057 * @param operationName The operation name for this operation 058 * type. 059 */ 060 private OperationType(String operationName) 061 { 062 this.operationName = operationName; 063 } 064 065 /** 066 * Retrieves the human-readable name for this operation type. 067 * 068 * @return The human-readable name for this operation type. 069 */ 070 public final String getOperationName() 071 { 072 return operationName; 073 } 074 075 /** 076 * Retrieves a string representation of this operation type. 077 * 078 * @return A string representation of this operation type. 079 */ 080 @Override 081 public final String toString() 082 { 083 return operationName; 084 } 085}