org.apache.turbine.om.security
Class TurbinePermission

java.lang.Object
  extended byorg.apache.torque.om.BaseObject
      extended byorg.apache.turbine.om.security.SecurityObject
          extended byorg.apache.turbine.om.security.TurbinePermission
All Implemented Interfaces:
java.lang.Comparable, Permission, org.apache.torque.om.Persistent, SecurityEntity, java.io.Serializable

public class TurbinePermission
extends SecurityObject
implements Permission

This class represents the permissions that a Role has to access certain pages/functions within the system. The class implements Comparable so that when Permissions are added to a Set, they will be in alphabetical order by name.

Version:
$Id: TurbinePermission.java 278822 2005-09-05 19:53:05Z henning $
Author:
Frank Y. Kim, John D. McNally, Brett McLaughlin
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.torque.om.BaseObject
NEW_ID
 
Constructor Summary
TurbinePermission()
          Constructs a new TurbinePermission.
TurbinePermission(java.lang.String name)
          Constructs a new TurbinePermission with the sepcified name.
 
Method Summary
 void remove()
          Removes a permission from the system.
 void rename(java.lang.String name)
          Renames the permission.
 void save()
          Makes changes made to the Permission attributes permanent.
 void save(java.sql.Connection conn)
          not implemented
 void save(java.lang.String dbname)
          not implemented
 
Methods inherited from class org.apache.turbine.om.security.SecurityObject
compareTo, getAttribute, getAttributes, getId, getIdAsObj, getName, setAttribute, setAttributes, setId, setName, toString
 
Methods inherited from class org.apache.torque.om.BaseObject
equals, equals, getByName, getByPeerName, getByPosition, getLog, getPrimaryKey, hashCode, isModified, isNew, log, resetModified, setModified, setNew, setPrimaryKey, setPrimaryKey, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.turbine.om.security.SecurityEntity
getId, getIdAsObj, getName, setId, setName
 

Constructor Detail

TurbinePermission

public TurbinePermission()
Constructs a new TurbinePermission.


TurbinePermission

public TurbinePermission(java.lang.String name)
Constructs a new TurbinePermission with the sepcified name.

Parameters:
name - The name of the new object.
Method Detail

save

public void save()
          throws TurbineSecurityException
Makes changes made to the Permission attributes permanent.

Specified by:
save in interface Permission
Throws:
TurbineSecurityException - if there is a problem while saving data.

save

public void save(java.sql.Connection conn)
          throws java.lang.Exception
not implemented

Specified by:
save in interface org.apache.torque.om.Persistent
Parameters:
conn -
Throws:
java.lang.Exception

save

public void save(java.lang.String dbname)
          throws java.lang.Exception
not implemented

Specified by:
save in interface org.apache.torque.om.Persistent
Parameters:
dbname -
Throws:
java.lang.Exception

remove

public void remove()
            throws TurbineSecurityException
Removes a permission from the system.

Specified by:
remove in interface Permission
Throws:
TurbineSecurityException - if the Permission could not be removed.

rename

public void rename(java.lang.String name)
            throws TurbineSecurityException
Renames the permission.

Specified by:
rename in interface Permission
Parameters:
name - The new Permission name.
Throws:
TurbineSecurityException - if the Permission could not be renamed.


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.