This project has retired. For details please refer to its Attic page.
Operation xref
View Javadoc

1   package org.apache.archiva.redback.rbac;
2   
3   /*
4    * Copyright 2001-2006 The Apache Software Foundation.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * 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, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  /**
20   * Operation
21   * <p/>
22   * In RBAC the operation is an action or functionality that can be linked with a
23   * particular resource into an assignable Permission.  Operations don't exist outside
24   * Permissions.
25   *
26   * @author Jesse McConnell <jmcconnell@apache.org>
27   * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
28   *
29   */
30  public interface Operation
31  {
32  
33  
34      /**
35       * Long description of an operation.
36       *
37       * @return String
38       */
39      String getDescription();
40  
41      /**
42       * name of the operation that is used in the act of authorization
43       * <p/>
44       * 'modify-foo', 'change-password'
45       * <p/>
46       * NOTE: This field is considered the Primary Key for this object.
47       *
48       * @return the name of the operation.
49       */
50      String getName();
51  
52      /**
53       * @param description
54       */
55      void setDescription( String description );
56  
57      /**
58       * Set name of the operation that is used in the act of authorization
59       * <p/>
60       * 'modify-foo', 'change-password'
61       * <p/>
62       * NOTE: This field is considered the Primary Key for this object.
63       *
64       * @param name
65       */
66      void setName( String name );
67  
68      /**
69       * Test to see if the object is a permanent object or not.
70       *
71       * @return true if the object is permanent.
72       */
73      boolean isPermanent();
74  
75      /**
76       * Set flag indicating if the object is a permanent object or not.
77       *
78       * @param permanent true if the object is permanent.
79       */
80      void setPermanent( boolean permanent );
81  }