01: /*
02: * Copyright 2002,2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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:
17: package org.apache.catalina;
18:
19: import java.security.Principal;
20:
21: /**
22: * <p>Abstract representation of a security role, suitable for use in
23: * environments like JAAS that want to deal with <code>Principals</code>.</p>
24: *
25: * @author Craig R. McClanahan
26: * @version $Revision: 1.2 $ $Date: 2004/02/27 14:58:39 $
27: * @since 4.1
28: */
29:
30: public interface Role extends Principal {
31:
32: // ------------------------------------------------------------- Properties
33:
34: /**
35: * Return the description of this role.
36: */
37: public String getDescription();
38:
39: /**
40: * Set the description of this role.
41: *
42: * @param description The new description
43: */
44: public void setDescription(String description);
45:
46: /**
47: * Return the role name of this role, which must be unique
48: * within the scope of a {@link UserDatabase}.
49: */
50: public String getRolename();
51:
52: /**
53: * Set the role name of this role, which must be unique
54: * within the scope of a {@link UserDatabase}.
55: *
56: * @param rolename The new role name
57: */
58: public void setRolename(String rolename);
59:
60: /**
61: * Return the {@link UserDatabase} within which this Role is defined.
62: */
63: public UserDatabase getUserDatabase();
64:
65: }
|