001 package org.apache.turbine.om.security;
002
003 /*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements. See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership. The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License. You may obtain a copy of the License at
011 *
012 * http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied. See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022 import java.io.Serializable;
023
024 import org.apache.turbine.util.security.TurbineSecurityException;
025
026 /**
027 * This class represents the permissions that a Role has to access
028 * certain pages/functions within the system. The class implements
029 * Comparable so that when Permissions are added to a Set, they will
030 * be in alphabetical order by name.
031 *
032 * @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
033 * @author <a href="mailto:john.mcnally@clearink.com">John D. McNally</a>
034 * @author <a href="mailto:bmclaugh@algx.net">Brett McLaughlin</a>
035 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
036 * @version $Id: Permission.java 938645 2010-04-27 20:57:51Z tv $
037 */
038 public interface Permission extends SecurityEntity, Serializable
039 {
040 /**
041 * Makes changes made to the Permission attributes permanent.
042 *
043 * @throws TurbineSecurityException if there is a problem while
044 * saving data.
045 */
046 void save()
047 throws TurbineSecurityException;
048
049 /**
050 * Removes a permission from the system.
051 *
052 * @throws TurbineSecurityException if the Permission could not be removed.
053 */
054 void remove()
055 throws TurbineSecurityException;
056
057 /**
058 * Renames the permission.
059 *
060 * @param name The new Permission name.
061 * @throws TurbineSecurityException if the Permission could not be renamed.
062 */
063 void rename(String name)
064 throws TurbineSecurityException;
065 }