public final class ConfigurationPermission
extends java.security.BasicPermission
Modifier and Type | Field and Description |
---|---|
private static int |
ACTION_ALL |
private static int |
ACTION_CONFIGURE |
(package private) int |
action_mask
The actions mask.
|
(package private) static int |
ACTION_NONE |
private static int |
ACTION_TARGET |
private java.lang.String |
actions
The actions in canonical form.
|
static java.lang.String |
CONFIGURE
Provides permission to create new configurations for other bundles as
well as manipulate them.
|
(package private) static long |
serialVersionUID |
private java.util.List<java.lang.String> |
substrings
Parsed name if it includes wildcards: "*"
|
static java.lang.String |
TARGET
The permission to be updated, that is, act as a Managed Service or
Managed Service Factory.
|
Constructor and Description |
---|
ConfigurationPermission(java.lang.String name,
int mask)
Package private constructor used by ConfigurationPermissionCollection.
|
ConfigurationPermission(java.lang.String name,
java.lang.String actions)
Create a new ConfigurationPermission.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Determines the equality of two
ConfigurationPermission objects. |
java.lang.String |
getActions()
Returns the canonical string representation of the
ConfigurationPermission actions. |
int |
hashCode()
Returns the hash code value for this object.
|
boolean |
implies(java.security.Permission p)
Determines if a
ConfigurationPermission object "implies" the
specified permission. |
(package private) boolean |
implies0(ConfigurationPermission requested,
int effective)
Internal implies method.
|
java.security.PermissionCollection |
newPermissionCollection()
Returns a new
PermissionCollection object suitable for storing
ConfigurationPermission s. |
private static int |
parseActions(java.lang.String actions)
Parse action string into action mask.
|
private static java.util.List<java.lang.String> |
parseSubstring(java.lang.String name)
Parse the name for wildcard processing.
|
private void |
readObject(java.io.ObjectInputStream s)
readObject is called to restore the state of this permission from a
stream.
|
private void |
setTransients(int mask)
Called by constructors and when deserialized.
|
private void |
writeObject(java.io.ObjectOutputStream s)
WriteObject is called to save the state of this permission object to a
stream.
|
static final long serialVersionUID
public static final java.lang.String CONFIGURE
public static final java.lang.String TARGET
private static final int ACTION_CONFIGURE
private static final int ACTION_TARGET
private static final int ACTION_ALL
static final int ACTION_NONE
transient int action_mask
private volatile java.lang.String actions
private transient java.util.List<java.lang.String> substrings
public ConfigurationPermission(java.lang.String name, java.lang.String actions)
name
- Name of the permission. Wildcards ('*'
) are allowed
in the name. During implies(Permission)
, the name is
matched to the requested permission using the substring matching
rules used by Filter
s.actions
- Comma separated list of CONFIGURE
,
TARGET
(case insensitive).ConfigurationPermission(java.lang.String name, int mask)
name
- location stringmask
- action maskprivate void setTransients(int mask)
mask
- action maskprivate static int parseActions(java.lang.String actions)
actions
- Action string.private static java.util.List<java.lang.String> parseSubstring(java.lang.String name)
name
- The name of the permission.null
is the name has no wildcards or a
List<String>
where element is a substring to match or
null for '*'
.public boolean implies(java.security.Permission p)
ConfigurationPermission
object "implies" the
specified permission.implies
in class java.security.BasicPermission
p
- The target permission to check.true
if the specified permission is implied by this
object; false
otherwise.boolean implies0(ConfigurationPermission requested, int effective)
requested
- The requested ConfigurationPermission which has already
be validated as a proper argument.effective
- The effective actions with which to start.true
if the specified permission is implied by this
object; false
otherwise.public boolean equals(java.lang.Object obj)
ConfigurationPermission
objects.
Two ConfigurationPermission
objects are equal.
equals
in class java.security.BasicPermission
obj
- The object being compared for equality with this object.true
if obj
is equivalent to this
ConfigurationPermission
; false
otherwise.public int hashCode()
hashCode
in class java.security.BasicPermission
public java.lang.String getActions()
ConfigurationPermission
actions.
Always returns present ConfigurationPermission
actions in the
following order: "configure", "target"
getActions
in class java.security.BasicPermission
ConfigurationPermission
actions.public java.security.PermissionCollection newPermissionCollection()
PermissionCollection
object suitable for storing
ConfigurationPermission
s.newPermissionCollection
in class java.security.BasicPermission
PermissionCollection
object.private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException
java.io.IOException
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException