|
Oracle Fusion Middleware Oracle Platform Security Services API Reference 11g Release 1 (11.1.1) E14650-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.security.Permission
java.security.BasicPermission
oracle.security.jps.JpsPermission
oracle.security.jps.ResourcePermission
public class ResourcePermission
This permission represents access rights to resources of a particular type.
A ResourcePermission contains the following items of information:
The resourceType: the type of the resource can/to be accessed, e.g. "Taskflow", "PageView".
The resourceName: the name of the resource can/to be accessed, e.g. "app.aTaskflow", "aPageView."
The action: the list of actions can/to be operated against the resource, e.g. "read,write", "grant". The action list is optional, in which case you have a named permission. If specified it denotes a list of one or more comma-separated operations. The action is returned by getActions()
.
If you have a ResourcePermission, it allows operations only if all four of the items match. see implies(Permission)
The target name of this ResourcePermission will encode the information of resourceType, and resourceName in a single string. The name of the permission is returned by Permission.getName()
. The format of the string is a comma-delimited list of key-value pair:
resourceType=aType,resourceName=aName
The supported keys are:
In a target name, spaces are allowed before and after each key or value.
In a comma-separated list of actions, spaces are allowed before and after each action.
Constructor Summary | |
---|---|
ResourcePermission(java.lang.String name) Creates a new instance of this class with the specified target name. |
|
ResourcePermission(java.lang.String name, java.lang.String actions) Creates a new instance of this permission with the specified target name and actions. |
|
ResourcePermission(java.lang.String resourceType, java.lang.String resourceName, java.lang.String actions) Creates a new instance of this class with the specified resource type, name and actions. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj) Checks two ResourcePermission objects for equality. |
java.lang.String |
getActions() Returns the "canonical string representation" of the actions. |
int |
hashCode() |
boolean |
implies(java.security.Permission perm) Checks if this object "implies" the specified permission. |
java.security.PermissionCollection |
newPermissionCollection() Returns a new PermissionCollection object for storing ResourcePermission objects. |
Methods inherited from class java.security.Permission |
---|
checkGuard, getName, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ResourcePermission(java.lang.String name, java.lang.String actions)
Creates a new instance of this permission with the specified target name and actions.
The target name is of the form "resourceType=aType,resourceName=aName
" where each part is required. It must not be empty or null.
The actions parameter contains a comma-separated list of the desired actions granted on the target name. It must not be null.
name
- the target nameactions
- the action listjava.lang.NullPointerException
- if name
is null
.java.lang.IllegalArgumentException
- if name
is empty, action
is null, or name
has syntax errorpublic ResourcePermission(java.lang.String name)
Creates a new instance of this class with the specified target name.
This constructor is equivalent to ResourcePermission(name,"")
.
name
- the target namepublic ResourcePermission(java.lang.String resourceType, java.lang.String resourceName, java.lang.String actions)
Creates a new instance of this class with the specified resource type, name and actions.
This constructor is equivalent to ResourcePermission(name,actions)
. The target name is constructed with the input resourceType
, and resourceName
, following the name encoding scheme.
resourceType
- the resource typeresourceName
- the resource nameactions
- the actions that operate against the resourceMethod Detail |
---|
public boolean implies(java.security.Permission perm)
Checks if this object "implies" the specified permission.
More specifically, this method returns true if:
implies
in class java.security.BasicPermission
perm
- the permission to check againstpublic boolean equals(java.lang.Object obj)
Checks two ResourcePermission objects for equality.
More specifically, this method returns true if:
equals
in class java.security.BasicPermission
obj
- the object tested for equality with this objectpublic int hashCode()
hashCode
in class java.security.BasicPermission
public java.lang.String getActions()
getActions
in class java.security.BasicPermission
public java.security.PermissionCollection newPermissionCollection()
newPermissionCollection
in class java.security.BasicPermission
|
Oracle Fusion Middleware Oracle Platform Security Services API Reference 11g Release 1 (11.1.1) E14650-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |