org.systinet.wasp.policy
Interface EffectivePolicy


public interface EffectivePolicy

This interface represents the effective policy. In the processing, the effective policy is accessible from CallContext under key org.systinet.wasp.webservice.CallContext.POLICY_INPUT for input and org.systinet.wasp.webservice.CallContext.POLICY_OUTPUT for output. The effective policy can be also obtained by the PolicyManager.getEffectivePolicy(DomainExpression).

Since:
5.0
Component:
Core

Method Summary
 PolicyAssertion getAssertion(PolicyAssertion assertion)
          Gets given policy assertion from the effective policy or null if the effective policy doesn't contain the assertion.
 Policy getPolicy()
          Gets the policy, which represents effective policy.
 boolean isPolicySatisfied()
          Gets true if the effective policy is satisfied; false otherwise.
 boolean isSatisfied(PolicyAssertion assertion)
          Gets true if given policy assertion is satisfied; false otherwise.
 PolicyAssertion setSatisfied(PolicyAssertion assertion)
          Sets given policy assertion as satisfied.
 

Method Detail

getPolicy

public Policy getPolicy()
Gets the policy, which represents effective policy.

Returns:
the policy represented effective policy

isPolicySatisfied

public boolean isPolicySatisfied()
Gets true if the effective policy is satisfied; false otherwise. A policy is satisfied when all child elements are satisfied. This depends on type of policy operator:
  • All - requires that all of its child elements must be satisfied
  • ExactlyOne - requires that exactly one of its child elements must be satisfied
  • OneOrMore - requires that at least one of its child elements must be satisfied
  • Policy - has same semantics as All

    Returns:
    true if the effective policy is satisfied; false otherwise.

  • setSatisfied

    public PolicyAssertion setSatisfied(PolicyAssertion assertion)
    Sets given policy assertion as satisfied.

    Parameters:
    assertion - assertion to set as satisfied
    Returns:
    assertion which was set as satisfied

    isSatisfied

    public boolean isSatisfied(PolicyAssertion assertion)
    Gets true if given policy assertion is satisfied; false otherwise.

    Parameters:
    assertion - assertion to check
    Returns:
    true if given policy assertion is satisfied; false otherwise

    getAssertion

    public PolicyAssertion getAssertion(PolicyAssertion assertion)
    Gets given policy assertion from the effective policy or null if the effective policy doesn't contain the assertion.

    Parameters:
    assertion - to get
    Returns:
    iven policy assertion from the effective policy or null if the effective policy doesn't contain the assertion.