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

    Constructors
    Constructor
    Description
    PrincipalCondition(org.osgi.framework.Bundle bundle, org.osgi.service.condpermadmin.ConditionInfo conditionInfo)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether the Condition is satisfied.

    Methods inherited from class org.codice.ddf.condition.AbstractCondition

    isMutable, isPostponed, isSatisfied

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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 version AbstractCondition.isSatisfied(Condition[],Dictionary) at the end of the permission check.
      Specified by:
      isSatisfied in interface org.osgi.service.condpermadmin.Condition
      Returns:
      true to indicate the Conditions is satisfied. Otherwise, false if the Condition is not satisfied.