Additional top-level class in compilation unit: DmtPermissionCollection.
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 |
|---|---|
| private final String | |
| public static final 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. |
| public static final 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. |
| public static final 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. |
| public static final 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. |
| private final int | |
| private final String | |
| private final boolean | |
| public static final 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. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | DmtPermission(String
URI of the management object (or subtree) dmtUri, String OMA DM actions allowed actions)Creates a new DmtPermission object for the specified DMT URI with the specified actions. |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static String | |
| private void | |
| public boolean | Returns: true if the parameter represents the same permissions as
this instancethe object to compare to this DmtPermission instance obj)Implements abstract java. Checks whether the given object is equal to this DmtPermission instance. |
| public String | Returns: canonical action list for this permission objectImplements abstract java. Returns the String representation of the action list. |
| private static int | |
| pack-priv int | |
| public int | Returns: hash code for this permission objectImplements abstract java. Returns the hash code for this permission object. |
| public boolean | Returns: true if this DmtPermission instance implies the specified permissionthe permission to check for implication p)Implements abstract java. Checks if this DmtPermission object "implies" the specified permission. |
| pack-priv boolean | |
| public PermissionCollection | Returns: the new PermissionCollectionOverrides java. Returns a new PermissionCollection object for storing DmtPermission objects. |
| actions | back to summary |
|---|---|
| private final String actions | |
| ADD | back to summary |
|---|---|
| public static final 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. This action is also required for the copy() command, which needs to perform node creation operations (among others). | |
| DELETE | back to summary |
|---|---|
| public static final 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. | |
| EXEC | back to summary |
|---|---|
| public static final 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. | |
| GET | back to summary |
|---|---|
| public static final 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. This action is also required for the copy() command, which needs to perform node query operations (among others). | |
| mask | back to summary |
|---|---|
| private final int mask | |
| path | back to summary |
|---|---|
| private final String path | |
| prefixPath | back to summary |
|---|---|
| private final boolean prefixPath | |
| REPLACE | back to summary |
|---|---|
| public static final 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. This action is also be required for the copy() command if the original node had a title property (which must be set in the new node). | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| DmtPermission | back to summary |
|---|---|
| public DmtPermission(String dmtUri, String actions) Creates a new DmtPermission object for the specified DMT URI with the specified actions. The given URI can be:
Since the 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.
| |
| addAction | back to summary |
|---|---|
| private static void addAction(StringBuilder sb, int mask, int flag, String action) | |
| canonicalActions | back to summary |
|---|---|
| private static String canonicalActions(int mask) | |
| checkUri | back to summary |
|---|---|
| private void checkUri(String dmtUri) throws IllegalArgumentException | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Implements abstract java. Checks whether the given object is equal to this DmtPermission instance. Two DmtPermission instances are equal if they have the same target string and the same action mask. The "*" action mask is considered equal to a mask containing all actions. | |
| getActions | back to summary |
|---|---|
| public String getActions() Implements abstract java. Returns the String representation of the action list. The allowed actions are listed in the following order: Add, Delete, Exec, Get, Replace. The wildcard character is not used in the returned string, even if the class was created using the "*" wildcard. | |
| getMask | back to summary |
|---|---|
| private static int getMask(String actions) | |
| getMask | back to summary |
|---|---|
| pack-priv int getMask() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Implements abstract java. Returns the hash code for this permission object. If two DmtPermission
objects are equal according to the
| |
| implies | back to summary |
|---|---|
| public boolean implies(Permission p) Implements abstract java. Checks if this DmtPermission object "implies" the specified
permission. This method returns
| |
| impliesPath | back to summary |
|---|---|
| pack-priv boolean impliesPath(DmtPermission p) | |
| newPermissionCollection | back to summary |
|---|---|
| public PermissionCollection newPermissionCollection() Overrides java. Returns a new PermissionCollection object for storing DmtPermission objects.
| |