public class ApplicationAdminPermission extends Permission
ApplicationAdminPermission can be targeted to applications that matches the specified filter.
ApplicationAdminPermission may be granted for different actions:
lock. The permission
schedule implies the permission
|Modifier and Type||Field and Description|
Allows the lifecycle management of the target applications.
Allows setting/unsetting the locking state of the target applications.
Allows scheduling of the target applications.
|Constructor and Description|
This constructor should be used when creating
Constructs an ApplicationAdminPermission.
|Modifier and Type||Method and Description|
Returns the actions of this permission.
Checks if the specified
This method can be used in the
checkGuard, getName, newPermissionCollection, toString
public static final String LIFECYCLE_ACTION
public static final String SCHEDULE_ACTION
public ApplicationAdminPermission(String filter, String actions) throws InvalidSyntaxException
filterspecifies the target application. The
filteris an LDAP-style filter, the recognized properties are
pid. The pattern specified in the
signeris matched with the Distinguished Name chain used to sign the application. Wildcards in a DN are not matched according to the filter string rules, but according to the rules defined for a DN chain. The attribute
pidis matched with the PID of the application according to the filter string rules.
null then it matches
"*" then it identifies all the possible
filter- filter to identify application. The value
nullis equivalent to
"*"and it indicates "all application".
actions- comma-separated list of the desired actions granted on the applications or "*" means all the actions. It must not be
null. The order of the actions in the list is not significant.
InvalidSyntaxException- is thrown if the specified
filteris not syntactically correct.
NullPointerException- is thrown if the actions parameter is
public ApplicationAdminPermission(ApplicationDescriptor application, String actions)
application- The target of the operation, it must not be
actions- The required operation, it must not be
NullPointerException- If any of the arguments is null.
public ApplicationAdminPermission setCurrentApplicationId(String applicationId)
ProtectionDomainimplementation in the
impliesmethod to insert the application ID of the current application into the permission being checked. This enables the evaluation of the
applicationId- the ID of the current application.
public boolean implies(Permission otherPermission)
permissionis implied by this permission. The method returns true under the following conditions:
otherPermissionwas created for a particular
filterof this permission matches the
ApplicationDescriptorspecified in the
otherPermission. If the filter in this permission is the
<<SELF>>pseudo target, then the currentApplicationId set in the
otherPermissionis compared to the application Id of the target
Copyright © OSGi Alliance (2000, 2015). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0