02b1f1e15fef4df8d2dd771a293f57f696893a46
[utils] / security / src / main / java / org / wamblee / security / authorization / AllOperation.java
1 /*
2  * Copyright 2005 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.wamblee.security.authorization;
17
18 /**
19  * An superclass of all other operations.
20  */
21 public class AllOperation implements Operation {
22     /**
23      * DOCUMENT ME!
24      */
25     private static final String OPERATION = "all";
26
27     /**
28      * Operation name.
29      */
30     private String name;
31
32 /**
33      * Constructs an all operation. 
34      *
35      */
36     public AllOperation() {
37         name = OPERATION;
38     }
39
40 /**
41      * Constructs the operation, this constructor is the one that must be used
42      * by subclasses. 
43      * @param aName Name of the operation. This name must be unique among all operations. 
44      */
45     protected AllOperation(String aName) {
46         name = aName;
47     }
48
49     /* (non-Javadoc)
50      * @see org.wamblee.security.authorization.Operation#getName()
51      */
52     /**
53      * DOCUMENT ME!
54      *
55      * @return DOCUMENT ME!
56      */
57     public String getName() {
58         return name;
59     }
60 }