org.dvb.application.storage
Class ApplicationStoragePermission

java.lang.Object
  extended byjava.security.Permission
      extended byorg.dvb.application.storage.ApplicationStoragePermission
All Implemented Interfaces:
java.security.Guard, java.io.Serializable

public class ApplicationStoragePermission
extends java.security.Permission

This class represents a permission to manage applications stored in the MHP terminal. An ApplicationStoragePermission contains a name representing the organisation_id whose applications can be managed and an actions list representing the permitted actions, e.g. store and/or remove applications.

The name of the permission contains the organisation_id represented in hexadecimal form as defined in the section "Text encoding of application identifiers" in the main body of this specification. Valid organization ids must be in the range "1" to "ffffffff" inclusive. Alternatively, the value "*" indicates all organization ids.

The actions string shall be a comma-separated list of one or more of the following :-

Since:
MHP1.1
See Also:
Serialized Form

Constructor Summary
ApplicationStoragePermission(java.lang.String name, java.lang.String actions)
          Creates a new ApplicationStoragePermission object with the specified name and actions string.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks two permission objects for equality.
 java.lang.String getActions()
          Returns the actions as a String.
 int hashCode()
          Returns the hash code value for this ApplicationStoragePermission object.
 boolean implies(java.security.Permission permission)
          Checks if the specified permission's actions are "implied by" this object's actions.
 java.security.PermissionCollection newPermissionCollection()
          Returns an empty PermissionCollection for ApplicationStoragePermission objects.
 
Methods inherited from class java.security.Permission
checkGuard, getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationStoragePermission

public ApplicationStoragePermission(java.lang.String name,
                                    java.lang.String actions)
Creates a new ApplicationStoragePermission object with the specified name and actions string. The name contains the organisation_id of the applications that can be managed and the actions String shall be a comma-separated list of actions as defined above. Permission objects constructed with incorrectly encoded parameters do not represent any permission and are ignored by the platform.

Parameters:
name - the organisation_id whose applications can be managed. This is encoded in hexadecimal representation as if by Integer.toHexString(int), and must be in the range "1" to "ffffffff" inclusive. Alternatively, the value "*" indicates all organization ids.
actions - Shall conform to the syntax described above.
Method Detail

implies

public boolean implies(java.security.Permission permission)
Checks if the specified permission's actions are "implied by" this object's actions.

If X is an ApplicationStoragePermission, and Y is any Permission, then X.implies(Y) returns true if and only if all of the following hold:

Parameters:
permission - the permission to check against.
Returns:
true if the specified permission is implied by this object, false if not.

equals

public boolean equals(java.lang.Object obj)
Checks two permission objects for equality.

Do not use the equals method for making access control decisions; use the implies method.

If X is an ApplicationStoragePermission, and Y is any Object, then X.equals(Y) returns true if and only if all of the following hold:

Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if both ApplicationStoragePermission objects are equivalent.

hashCode

public int hashCode()
Returns the hash code value for this ApplicationStoragePermission object.

The required hashCode behavior for ApplicationStoragePermission objects is the following:

Returns:
a hash code value for this object.

getActions

public java.lang.String getActions()
Returns the actions as a String. Must always return actions in canonical form.

Permission objects constructed with an incorrectly encoded action parameter shall return an empty string.

Permission objects constructed with a correctly encoded action parameter shall return a comma-separated list of actions, with the actions sorted in the order given by String.compareTo(String).

Returns:
the actions of this Permission.

newPermissionCollection

public java.security.PermissionCollection newPermissionCollection()
Returns an empty PermissionCollection for ApplicationStoragePermission objects.

Returns:
a new PermissionCollection object for ApplicationStoragePermissions.