|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.security.Permission
org.systinet.security.perm.WSInvokePermission
This class represents access permission to WASP Web Service. A WSInvokePermission consists of an optional service name and an optional set of methods, which can be invoked on that service.
Service name is in the same format as the return value of org.idoox.wasp.server.WSContext.getURI().
The actions string of this permission can contain collon-separated method names, but it is not recommended to contain more that one particular method name.
Examples:
WSInvokePermission "*"
- allows to invoke all services and all their methods
WSInvokePermission "dummyservice", "getPrice, setPrice"
- allows to invoke dummyservice's getPrice and setPrice methods.
WSInvokePermission "dummyservice", "getPrice"
- allows to invoke dummyservice's getPrice method.
WSInvokePermission "dummyservice"
- allows to invoke all "dummyservice" methods.
Constructor Summary | |
WSInvokePermission()
Creates a new WSInvokePermission object, which allows to invoke all services and all their methods. |
|
WSInvokePermission(java.lang.String serviceName)
Creates a new WSInvokePermission object with the specified service name. |
|
WSInvokePermission(java.lang.String serviceName,
java.lang.String actions)
Creates a new WSInvokePermission object with the specified service name and methods. |
|
WSInvokePermission(java.lang.String serviceName,
java.lang.String[] methods)
Creates a new WSInvokePermission object with the specified service name and methods. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Checks two WSInvokePermission objects for equality. |
java.lang.String |
getActions()
Returns the "canonical string representation" of the actions, i.e. |
java.lang.String[] |
getMethods()
Gets the methods which are permitted by this permission. |
int |
hashCode()
Returns the hash code value for this object. |
boolean |
implies(java.security.Permission p)
Checks if this WSInvokePermission object "implies" the specified permission. |
java.security.PermissionCollection |
newPermissionCollection()
Returns a new PermissionCollection object for storing WSInvokePermission objects. |
java.lang.String |
toString()
Overriden to return complete description of this permission. |
Methods inherited from class java.security.Permission |
checkGuard, getName |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public WSInvokePermission()
public WSInvokePermission(java.lang.String serviceName)
serviceName
- public WSInvokePermission(java.lang.String serviceName, java.lang.String[] methods)
serviceName
- methods
- service methodspublic WSInvokePermission(java.lang.String serviceName, java.lang.String actions)
serviceName
- actions
- list of methods as a colon separated stringMethod Detail |
public java.lang.String toString()
public java.lang.String[] getMethods()
null
for all methods, sorted string array otherwisepublic boolean implies(java.security.Permission p)
More specifically, this method returns true if:
null
service name implies to all services.
p
- the permission to check against.
public boolean equals(java.lang.Object obj)
obj
- the object we are testing for equality with this object.
public int hashCode()
public java.lang.String getActions()
public java.security.PermissionCollection newPermissionCollection()
implies
method to be implemented in an efficient (and consistent) manner.
For example, if you have two WSInvokePermission:
"dummyservice", "getPrice"
"dummyservice", "setPrice"
and you are calling the implies
method with the WSInvokePermission:
"dummyservice", "getPrice,setPrice",then the
implies
function must
take into account both the "getPrice" and "setPrice"
permissions, so the effective permission is "getPrice,setPrice",
and implies
returns true. The "implies" semantics for
WSInvokePermission are handled properly by the WSInvokePermissionCollection object
returned by this newPermissionCollection
method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |