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.api.ldap.aci;
21  
22  
23  /**
24   * An enumeration that represents all micro-operations that makes up LDAP
25   * operations.
26   * 
27   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
28   */
29  public enum MicroOperation
30  {
31      // Permissions that may be used in conjunction with any component of <tt>ProtectedItem</tt>s.
32      /** The Add permission, may be used in conjunction with any component of {@link ProtectedItem}s. */
33      ADD("Add"),
34  
35      /** The DiscloseOnError permission, may be used in conjunction with any component of {@link ProtectedItem}s. */
36      DISCLOSE_ON_ERROR("DiscloseOnError"),
37  
38      /** The Read permission, may be used in conjunction with any component of {@link ProtectedItem}s. */
39      READ("Read"),
40  
41      /** The Remove permission, may be used in conjunction with any component of {@link ProtectedItem}s. */
42      REMOVE("Remove"),
43  
44      // Permissions that may be used only in conjunction with the entry component.
45      /** The Browse permission, may be used only in conjunction with the entry component. */
46      BROWSE("Browse"),
47  
48      /** The Export permission, may be used only in conjunction with the entry component. */
49      EXPORT("Export"),
50  
51      /** The Import permission, may be used only in conjunction with the entry component. */
52      IMPORT("Import"),
53  
54      /** The Modify permission, may be used only in conjunction with the entry component. */
55      MODIFY("Modify"),
56  
57      /** The Rename permission, may be used only in conjunction with the entry component. */
58      RENAME("Rename"),
59  
60      /** The ReturnDN permission, may be used only in conjunction with the entry component. */
61      RETURN_DN("ReturnDN"),
62  
63      // Permissions that may be used in conjunction with any component, except entry, of <tt>ProtectedItem</tt>s.
64      /** The Compare permission, may be used in conjunction with any component, except entry. */
65      COMPARE("Compare"),
66  
67      /** The FilterMatch permission, may be used in conjunction with any component, except entry. */
68      FILTER_MATCH("FilterMatch"),
69  
70      /** The Invoke permission, may be used in conjunction with any component, except entry. */
71      INVOKE("Invoke");
72  
73      /** The name. */
74      private final String name;
75  
76  
77      MicroOperation( String name )
78      {
79          this.name = name;
80      }
81  
82  
83      /**
84       * Gets the name of this micro-operation.
85       *
86       * @return the name
87       */
88      public String getName()
89      {
90          return name;
91      }
92  
93  
94      /**
95       * {@inheritDoc}
96       */
97      @Override
98      public String toString()
99      {
100         return name;
101     }
102 }