01: package org.apache.turbine.om.security;
02:
03: /*
04: * Licensed to the Apache Software Foundation (ASF) under one
05: * or more contributor license agreements. See the NOTICE file
06: * distributed with this work for additional information
07: * regarding copyright ownership. The ASF licenses this file
08: * to you under the Apache License, Version 2.0 (the
09: * "License"); you may not use this file except in compliance
10: * with the License. You may obtain a copy of the License at
11: *
12: * http://www.apache.org/licenses/LICENSE-2.0
13: *
14: * Unless required by applicable law or agreed to in writing,
15: * software distributed under the License is distributed on an
16: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17: * KIND, either express or implied. See the License for the
18: * specific language governing permissions and limitations
19: * under the License.
20: */
21:
22: import java.io.Serializable;
23:
24: import org.apache.turbine.util.security.TurbineSecurityException;
25:
26: /**
27: * This class represents the permissions that a Role has to access
28: * certain pages/functions within the system. The class implements
29: * Comparable so that when Permissions are added to a Set, they will
30: * be in alphabetical order by name.
31: *
32: * @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
33: * @author <a href="mailto:john.mcnally@clearink.com">John D. McNally</a>
34: * @author <a href="mailto:bmclaugh@algx.net">Brett McLaughlin</a>
35: * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
36: * @version $Id: Permission.java 534527 2007-05-02 16:10:59Z tv $
37: */
38: public interface Permission extends SecurityEntity, Serializable {
39: /**
40: * Makes changes made to the Permission attributes permanent.
41: *
42: * @throws TurbineSecurityException if there is a problem while
43: * saving data.
44: */
45: void save() throws TurbineSecurityException;
46:
47: /**
48: * Removes a permission from the system.
49: *
50: * @throws TurbineSecurityException if the Permission could not be removed.
51: */
52: void remove() throws TurbineSecurityException;
53:
54: /**
55: * Renames the permission.
56: *
57: * @param name The new Permission name.
58: * @throws TurbineSecurityException if the Permission could not be renamed.
59: */
60: void rename(String name) throws TurbineSecurityException;
61: }
|