View Javadoc
1   /*
2    *  Licensed to the Apache Software Foundation (ASF) under one
3    *  or more contributor license agreements.  See the NOTICE file
4    *  distributed with this work for additional information
5    *  regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    *  "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    * 
10   *    http://www.apache.org/licenses/LICENSE-2.0
11   * 
12   *  Unless required by applicable law or agreed to in writing,
13   *  software distributed under the License is distributed on an
14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *  KIND, either express or implied.  See the License for the
16   *  specific language governing permissions and limitations
17   *  under the License.
18   * 
19   */
20  package org.apache.directory.server.core.api;
21  
22  
23  /**
24   * The list of Operation we can process on the Interceptors.
25   * 
26   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
27   */
28  public enum OperationEnum
29  {
30      ADD("add"),
31      BIND("bind"),
32      COMPARE("compare"),
33      DELETE("delete"),
34      GET_ROOT_DSE("getRootDse"),
35      HAS_ENTRY("hasEntry"),
36      LIST("list"),
37      LOOKUP("lookup"),
38      MODIFY("modify"),
39      MOVE("move"),
40      MOVE_AND_RENAME("moveAndRename"),
41      RENAME("rename"),
42      SEARCH("search"),
43      UNBIND("unbind");
44  
45      /** The associated method name */
46      private String methodName;
47  
48      /** A list of all the operations */
49      private static OperationEnumi/OperationEnum.html#OperationEnum">OperationEnum[] operations = new OperationEnum[]
50          {
51              ADD,
52              BIND,
53              COMPARE,
54              DELETE,
55              GET_ROOT_DSE,
56              HAS_ENTRY,
57              LIST,
58              LOOKUP,
59              MODIFY,
60              MOVE,
61              MOVE_AND_RENAME,
62              RENAME,
63              SEARCH,
64              UNBIND
65      };
66  
67  
68      /**
69       * The private constructor
70       * @param methodName The associated method name
71       */
72      OperationEnum( String methodName )
73      {
74          this.methodName = methodName;
75      }
76  
77  
78      /**
79       * @return The associated method name
80       */
81      public String getMethodName()
82      {
83          return methodName;
84      }
85  
86  
87      /**
88       * @return The list of all the operations
89       */
90      public static OperationEnum[] getOperations()
91      {
92          return operations;
93      }
94  }