|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.security.Permission
org.dvb.application.storage.ApplicationStoragePermission
public class ApplicationStoragePermission
This class represents a permission to manage applications stored in the GEM 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 :-
"manageService"
, representing permission to query what
applications are stored in a stored application service with the given
organisation ID. This permission is also necessary (but not sufficient)
to store applications into and remove applications from a stored
application service, where the stored application service has the given
organisation ID.
"storeService"
, representing permission to store an
application in a stored application service, where the application has
the given organisation ID.
"removeService"
, representing permission to remove an
application from a stored application service, where the application has
the given organisation ID.
"createService"
, representing permission to create a
stored application service with a given organisation ID.
"deleteService"
, representing permission to remove a
stored application service with a given organisation ID.
"manageCache"
, representing permission to query what applications
are stored in an application cache with the given organisation ID.
This permission is also necessary (but not sufficient) to store
applications into and remove applications from an application cache,
where the application cache has the given organisation ID.
"storeCache"
, representing permission to store an
application in a cache.
"removeCache"
, representing permission to remove an
application from a cache.
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 |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ApplicationStoragePermission(java.lang.String name, java.lang.String actions)
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.
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 |
---|
public boolean implies(java.security.Permission permission)
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:
Y
is an instance of ApplicationStoragePermission
X
and Y
have the same run-time type
(i.e. X.getClass() == Y.getClass()
)
X
and Y
were both constructed with
correctly encoded parameters
X
and Y
both have the same organization
ID, or X
has the organization ID "*"
X
contains all the actions requested by
Y
. The order of the comma-separated actions list
does not affect the results of this check.
implies
in class java.security.Permission
permission
- the permission to check against.
true
if the specified permission is implied by this object,
false
if not.public boolean equals(java.lang.Object obj)
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:
Y
is not null
Y
is an instance of ApplicationStoragePermission
X
and Y
have the same run-time type
(i.e. X.getClass() == Y.getClass()
)
X
and Y
were both constructed with
correctly encoded parameters
X
and Y
both have the same organization
ID, or both have organization ID "*"
.
X
has the same actions as
Y
. The order of the comma-separated actions list
does not affect the results of this check.
equals
in class java.security.Permission
obj
- the object we are testing for equality with this object.
true
if both ApplicationStoragePermission
objects are equivalent.public int hashCode()
ApplicationStoragePermission
object.
The required hashCode
behavior for
ApplicationStoragePermission
objects is the following:
hashCode
method
must consistently return the same integer. This integer need not
remain consistent from one execution of an application to another
execution of the same application.
ApplicationStoragePermission
objects are equal according to
the equals(Object)
method, then calling the hashCode
method on each of the
two Permission objects must produce the same integer result.
hashCode
in class java.security.Permission
public java.lang.String getActions()
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)
.
getActions
in class java.security.Permission
Permission
.public java.security.PermissionCollection newPermissionCollection()
PermissionCollection
for
ApplicationStoragePermission
objects.
newPermissionCollection
in class java.security.Permission
PermissionCollection
object for
ApplicationStoragePermissions
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |