org.apache.jetspeed.security
Class PortalResourcePermission

java.lang.Object
  extended byjava.security.Permission
      extended byorg.apache.jetspeed.security.PortalResourcePermission
All Implemented Interfaces:
Guard, Serializable
Direct Known Subclasses:
FolderPermission, PagePermission, PortletPermission

public abstract class PortalResourcePermission
extends Permission

Generalized Portlet Resoure permission.

This code was partially inspired from articles from:

Author:
David Le Strat, David Sean Taylor
See Also:
Serialized Form

Field Summary
protected  int mask
          Mask used for determining what action to perform.
protected  Subject subject
          The subject the permission is being performed against.
 
Fields inherited from class java.security.Permission
 
Constructor Summary
PortalResourcePermission(String name, String actions, Subject subject)
          Constructor for PortletPermission.
 
Method Summary
 boolean equals(Object object)
           
 String getActions()
           
 Subject getSubject()
          Gets the subject.
 int hashCode()
           
 boolean implies(Permission permission)
           
private  void parseActions(String actions)
          Parses the actions string.
 
Methods inherited from class java.security.Permission
checkGuard, getName, newPermissionCollection, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

mask

protected int mask

Mask used for determining what action to perform.


subject

protected Subject subject

The subject the permission is being performed against.

Constructor Detail

PortalResourcePermission

public PortalResourcePermission(String name,
                                String actions,
                                Subject subject)

Constructor for PortletPermission.

Parameters:
name - The portlet name.
actions - The actions on the portlet.
Method Detail

hashCode

public int hashCode()
See Also:
Permission.hashCode()

equals

public boolean equals(Object object)
See Also:
Permission.equals(Object)

getActions

public String getActions()
See Also:
Permission.getActions()

implies

public boolean implies(Permission permission)

parseActions

private void parseActions(String actions)

Parses the actions string.

Actions are separated by commas or white space.

Parameters:
actions - The actions

getSubject

public Subject getSubject()

Gets the subject.

Returns:
Returns a Subject


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