Package org.codice.ddf.condition
Class PrincipalCondition
java.lang.Object
org.codice.ddf.condition.AbstractCondition
org.codice.ddf.condition.PrincipalCondition
- All Implemented Interfaces:
org.osgi.service.condpermadmin.Condition
public final class PrincipalCondition
extends AbstractCondition
implements org.osgi.service.condpermadmin.Condition
The interface implemented by a Condition. Conditions are bound to Permissions using Conditional
Permission Info. The Permissions of a ConditionalPermission Info can only be used if the
associated Conditions are satisfied.
Selects bundles based on the identity of the principal executing the call. @ThreadSafe
-
Field Summary
Fields inherited from interface org.osgi.service.condpermadmin.Condition
FALSE, TRUE -
Constructor Summary
ConstructorsConstructorDescriptionPrincipalCondition(org.osgi.framework.Bundle bundle, org.osgi.service.condpermadmin.ConditionInfo conditionInfo) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the Condition is satisfied.Methods inherited from class org.codice.ddf.condition.AbstractCondition
isMutable, isPostponed, isSatisfiedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.osgi.service.condpermadmin.Condition
isMutable, isPostponed, isSatisfied
-
Constructor Details
-
PrincipalCondition
public PrincipalCondition(org.osgi.framework.Bundle bundle, org.osgi.service.condpermadmin.ConditionInfo conditionInfo)
-
-
Method Details
-
isSatisfied
public boolean isSatisfied()Returns whether the Condition is satisfied. This method is only called for immediate Condition objects or immutable postponed conditions, and must always be called inside a permission check. Mutable postponed Condition objects will be called with the grouped versionAbstractCondition.isSatisfied(Condition[],Dictionary)at the end of the permission check.- Specified by:
isSatisfiedin interfaceorg.osgi.service.condpermadmin.Condition- Returns:
trueto indicate the Conditions is satisfied. Otherwise,falseif the Condition is not satisfied.
-