001/*
002 *  Licensed to the Apache Software Foundation (ASF) under one
003 *  or more contributor license agreements.  See the NOTICE file
004 *  distributed with this work for additional information
005 *  regarding copyright ownership.  The ASF licenses this file
006 *  to you under the Apache License, Version 2.0 (the
007 *  "License"); you may not use this file except in compliance
008 *  with the License.  You may obtain a copy of the License at
009 * 
010 *    http://www.apache.org/licenses/LICENSE-2.0
011 * 
012 *  Unless required by applicable law or agreed to in writing,
013 *  software distributed under the License is distributed on an
014 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 *  KIND, either express or implied.  See the License for the
016 *  specific language governing permissions and limitations
017 *  under the License.
018 * 
019 */
020package org.apache.directory.server.core.api;
021
022
023/**
024 * The list of Operation we can process on the Interceptors.
025 * 
026 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
027 */
028public enum OperationEnum
029{
030    ADD("add"),
031    BIND("bind"),
032    COMPARE("compare"),
033    DELETE("delete"),
034    GET_ROOT_DSE("getRootDse"),
035    HAS_ENTRY("hasEntry"),
036    LIST("list"),
037    LOOKUP("lookup"),
038    MODIFY("modify"),
039    MOVE("move"),
040    MOVE_AND_RENAME("moveAndRename"),
041    RENAME("rename"),
042    SEARCH("search"),
043    UNBIND("unbind");
044
045    /** The associated method name */
046    private String methodName;
047
048    /** A list of all the operations */
049    private static OperationEnum[] operations = new OperationEnum[]
050        {
051            ADD,
052            BIND,
053            COMPARE,
054            DELETE,
055            GET_ROOT_DSE,
056            HAS_ENTRY,
057            LIST,
058            LOOKUP,
059            MODIFY,
060            MOVE,
061            MOVE_AND_RENAME,
062            RENAME,
063            SEARCH,
064            UNBIND
065    };
066
067
068    /**
069     * The private constructor
070     * @param methodName The associated method name
071     */
072    OperationEnum( String methodName )
073    {
074        this.methodName = methodName;
075    }
076
077
078    /**
079     * @return The associated method name
080     */
081    public String getMethodName()
082    {
083        return methodName;
084    }
085
086
087    /**
088     * @return The list of all the operations
089     */
090    public static OperationEnum[] getOperations()
091    {
092        return operations;
093    }
094}