Additional top-level class in compilation unit: DevicePermissionCollection.
Device#remove() is protected with
REMOVE permission action.
The name of the permission is a filter based. See OSGi Core Specification, Filter Based Permissions. The filter gives an access to all device service properties. Filter attribute names are processed in a case sensitive manner.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv transient Device | device
Initialized when the device permission is built with device instance. |
| private transient Dictionary | deviceProperties
Device properties are initialized on the first request. |
| private transient Filter | filter
If the permission was built with filter, this filed contains LDAP filter used for matching. |
| public static final String | REMOVE
A permission action to remove the device. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | DevicePermission(String
A filter expression that can use any device service
property. The filter attribute names are processed in a case
insensitive manner. A special value of "*" can be used to match
all devices. filter, String REMOVE action.Creates a new |
| public | DevicePermission(Device
The device that needs to be checked for a permission. device, String REMOVE action.Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| private static String | |
| public boolean | Returns: true if two permissions are equal, false
otherwise.The object being compared for equality with this object. obj)Overrides java. Two
|
| public String | Returns: The canonical string representation of the actions.Overrides java. Returns the canonical string representation of |
| private Dictionary | |
| public int | Returns: Hash code value for this object.Overrides java. Returns the hash code value for this object. |
| public boolean | Returns: true if the specified permission is implied by this
permission, false otherwise.The permission to be implied. It must be constructed by
p)DevicePermission(Device, String).Overrides java. Determines if the specified permission is implied by this object. |
| pack-priv boolean | |
| public PermissionCollection | Returns: A newPermissionCollection instance.Overrides java. Returns a new |
| private static Filter | |
| private synchronized void | readObject(ObjectInputStream
the s)ObjectInputStream from which data is readHides java. Called to restore the permission state from the stream. |
| private static void | |
| private synchronized void |
| device | back to summary |
|---|---|
| pack-priv transient Device device Initialized when the device permission is built with device instance. Such permissions are used only for security checks. | |
| deviceProperties | back to summary |
|---|---|
| private transient Dictionary<String, Object> deviceProperties Device properties are initialized on the first request. | |
| filter | back to summary |
|---|---|
| private transient Filter filter If the permission was built with filter, this filed contains LDAP filter used for matching. | |
| REMOVE | back to summary |
|---|---|
| public static final String REMOVE A permission action to remove the device. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| DevicePermission | back to summary |
|---|---|
| public DevicePermission(String filter, String action) Creates a new A filter example: (dal.device.hardware.vendor=acme) An action: remove
| |
| DevicePermission | back to summary |
|---|---|
| public DevicePermission(Device device, String action) Creates a new
| |
| createPermissionName | back to summary |
|---|---|
| private static String createPermissionName(Device device) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Two
| |
| getActions | back to summary |
|---|---|
| public String getActions() Overrides java. Returns the canonical string representation of | |
| getDeviceProperties | back to summary |
|---|---|
| private Dictionary | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns the hash code value for this object.
| |
| implies | back to summary |
|---|---|
| public boolean implies(Permission p) Overrides java. Determines if the specified permission is implied by this object. The
method will return
| |
| implyDevicePermission | back to summary |
|---|---|
| pack-priv boolean implyDevicePermission(DevicePermission dp) | |
| newPermissionCollection | back to summary |
|---|---|
| public PermissionCollection newPermissionCollection() Overrides java. Returns a new
| |
| parseFilter | back to summary |
|---|---|
| private static Filter parseFilter(String filter) | |
| readObject | back to summary |
|---|---|
| private synchronized void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException Hides java. Called to restore the permission state from the stream.
| |
| validateAction | back to summary |
|---|---|
| private static void validateAction(String action) | |
| writeObject | back to summary |
|---|---|
| private synchronized void writeObject(ObjectOutputStream s) throws IOException Called when the permission state is saved to a stream. Permissions with device instance cannot be serialized. | |