public class DmtPermission extends Permission
 DmtPermission("./OSGi/bundles", "Add,Replace,Get");
 
 
 This means that owner of this permission can execute Add, Replace and Get
 commands on the ./OSGi/bundles management object. It is possible to use
 wildcards in both the target and the actions field. Wildcard in the target
 field means that the owner of the permission can access children nodes of the
 target node. Example:
 
 
 DmtPermission("./OSGi/bundles/*", "Get");
 
 
 This means that owner of this permission has Get access on every child node
 of ./OSGi/bundles. The asterisk does not necessarily have to follow a '/'
 character. For example the "./OSGi/a*" target matches the
 ./OSGi/applications subtree.
 
 If wildcard is present in the actions field, all legal OMA DM commands are
 allowed on the designated nodes(s) by the owner of the permission. Action
 names are interpreted case-insensitively, but the canonical action string
 returned by getActions() uses the forms defined by the action
 constants.
| Modifier and Type | Field and Description | 
|---|---|
static String | 
ADD
Holders of DmtPermission with the Add action present can create new nodes
 in the DMT, that is they are authorized to execute the
 createInteriorNode() and createLeafNode() methods of the DmtSession. 
 | 
static String | 
DELETE
Holders of DmtPermission with the Delete action present can delete nodes
 from the DMT, that is they are authorized to execute the deleteNode()
 method of the DmtSession. 
 | 
static String | 
EXEC
Holders of DmtPermission with the Exec action present can execute nodes
 in the DMT, that is they are authorized to call the execute() method of
 the DmtSession. 
 | 
static String | 
GET
Holders of DmtPermission with the Get action present can query DMT node
 value or properties, that is they are authorized to execute the
 isLeafNode(), getNodeAcl(), getEffectiveNodeAcl(), getMetaNode(),
 getNodeValue(), getChildNodeNames(), getNodeTitle(), getNodeVersion(),
 getNodeTimeStamp(), getNodeSize() and getNodeType() methods of the
 DmtSession. 
 | 
static String | 
REPLACE
Holders of DmtPermission with the Replace action present can update DMT
 node value or properties, that is they are authorized to execute the
 setNodeAcl(), setNodeTitle(), setNodeValue(), setNodeType() and
 renameNode() methods of the DmtSession. 
 | 
| Constructor and Description | 
|---|
DmtPermission(String dmtUri,
             String actions)
Creates a new DmtPermission object for the specified DMT URI with the
 specified actions. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object obj)
Checks whether the given object is equal to this DmtPermission instance. 
 | 
String | 
getActions()
Returns the String representation of the action list. 
 | 
int | 
hashCode()
Returns the hash code for this permission object. 
 | 
boolean | 
implies(Permission p)
Checks if this DmtPermission object "implies" the specified
 permission. 
 | 
PermissionCollection | 
newPermissionCollection()
Returns a new PermissionCollection object for storing DmtPermission
 objects. 
 | 
checkGuard, getName, toStringpublic static final String ADD
public static final String DELETE
public static final String EXEC
public static final String GET
public static final String REPLACE
public DmtPermission(String dmtUri, String actions)
"*", which matches all valid (see
 Uri.isValidUri(String)) absolute URIs;* character
 (for example "./OSGi/L*"), which matches all valid absolute URIs
 beginning with the given prefix;
 Since the * character is itself a valid URI character, it can
 appear as the last character of a valid absolute URI. To distinguish this
 case from using * as a wildcard, the * character at the
 end of the URI must be escaped with the \ character. For example
 the URI "./a*" matches "./a", "./aa",
 "./a/b" etc. while "./a\*" matches "./a*" only.
 
The actions string must either be "*" to allow all actions, or it must contain a non-empty subset of the valid actions, defined as constants in this class.
dmtUri - URI of the management object (or subtree)actions - OMA DM actions allowedNullPointerException - if any of the parameters are nullIllegalArgumentException - if any of the parameters are invalidpublic boolean equals(Object obj)
equals in class Permissionobj - the object to compare to this DmtPermission instancetrue if the parameter represents the same permissions as
         this instancepublic String getActions()
getActions in class Permissionpublic int hashCode()
equals(Object) method, then
 calling this method on each of the two DmtPermission objects must produce
 the same integer result.hashCode in class Permissionpublic boolean implies(Permission p)
false if and only if at least one
 of the following conditions are fulfilled for the specified permission:
 implies in class Permissionp - the permission to check for implicationpublic PermissionCollection newPermissionCollection()
newPermissionCollection in class PermissionCopyright © OSGi Alliance (2000, 2015). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0