站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

InstancePermission - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.core.security
Class InstancePermission

java.lang.Object
  extended byjava.security.Permission
      extended byorg.jboss.portal.security.PortalPermission
          extended byorg.jboss.portal.core.security.InstancePermission
All Implemented Interfaces:
java.security.Guard, java.io.Serializable

public final class InstancePermission
extends PortalPermission
implements java.io.Serializable

Portal permission class for authorisation checks.

This class is an extension to the JACC mechanism to allow configurable and dynamically modifiable permissions.

Note: for now this is a final class. We might want to have subclasses of it later though.

See Also:
Serialized Form

Field Summary
static java.lang.String VIEW
          The view action.
 
Constructor Summary
InstancePermission(java.lang.String uri, java.lang.String actions)
          Create a permission for the specified resource.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getActions()
           
 java.lang.String getType()
          Return the permission type.
 java.lang.String getURI()
          Return the resource identifier of this permission.
 int hashCode()
           
 boolean implies(java.security.Permission permission)
           
 java.security.PermissionCollection newPermissionCollection()
           
 java.lang.String toString()
           
 
Methods inherited from class java.security.Permission
checkGuard, getName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

VIEW

public static final java.lang.String VIEW
The view action.

See Also:
Constant Field Values
Constructor Detail

InstancePermission

public InstancePermission(java.lang.String uri,
                          java.lang.String actions)
Create a permission for the specified resource.

Parameters:
uri - handle of the resource that is being protected.
actions - the allowed actions (or the actions to check for access) as a comma separated list
Throws:
java.lang.IllegalArgumentException - if the provided arguments are null or the actions string doesn't contain any valid actions
Method Detail

equals

public boolean equals(java.lang.Object o)

hashCode

public int hashCode()

toString

public java.lang.String toString()

getActions

public java.lang.String getActions()

getURI

public java.lang.String getURI()
Description copied from class: PortalPermission
Return the resource identifier of this permission.

Specified by:
getURI in class PortalPermission

implies

public boolean implies(java.security.Permission permission)

newPermissionCollection

public java.security.PermissionCollection newPermissionCollection()

getType

public java.lang.String getType()
Description copied from class: PortalPermission
Return the permission type.

Specified by:
getType in class PortalPermission