public final class SWMPermission extends java.security.BasicPermission
SWMPermissionprovides permission handling for SWM API permissions. An
SWMPermissionobject contains a scope and actions.
The scope is the scope of the permission. Valid scopes are
"client"stands for permission to perform the listed actions only for applications assigned to the same Client.
"crossClient"stands for permission to perform the listed actions also for applications assigned to other Clients. Usually this is a permission reserved for the Root Client. Granting this permissions to other Clients should be figured out well in order to avoid security breaches.
The actions to be granted are passed to the constructor in a non-empty string,
containing a list of comma-separated keywords. Trailing and leading white
spaces as well as those between the keywords and commas in the list are not
allowed and lead to an
IllegalArgumentException. The possible
values can be seen in this
table in the Security Policy Provider chapter of the spec.
The actions string is converted to lowercase before processing.
|Constructor and Description|
Creates a new
|Modifier and Type||Method and Description|
Checks if another object is "equal" to this one.
Returns the permitted actions of this Permission as a comma separated list in alphabetical order.
Gets the hash code value for this object.
Checks if the specified permission is "implied" by this object.
Creates a new
public SWMPermission(java.lang.String scope, java.lang.String actions)
SWMPermissionobject with the specified name and actions. If an action is listed multiple times, the second and following occurences are ignored, means
"installation,installation"has the same effect as
scope- The scope of the permission (see class description for details).
actions- a comma seperated list of the permitted actions. For possible values see this table in the Security Policy Provider chapter of the spec.
actionsinclude any string other than those allowed, or if
scopeargument is an empty string, or a string that consists of white space(s) only.
public boolean implies(java.security.Permission p)
p- the permission to check against.
trueif the passed permission is equal to or implied by this permission,
public java.security.PermissionCollection newPermissionCollection()
public java.lang.String getActions()
public boolean equals(java.lang.Object object)
object- an object to compare
trueif the objects are of the same type and the event and action are equal.
public int hashCode()
Copyright (c) 2014, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.