Package org.opensaml.xacml.policy

Examples of org.opensaml.xacml.policy.ObligationsType


     * @return preprocessed obligations
     */
    protected Map<String, ObligationType> preprocessObligations(ObligationProcessingContext context) {
        HashMap<String, ObligationType> effectiveObligations = new HashMap<String, ObligationType>();

        ObligationsType obligations = context.getAuthorizationDecisionResult().getObligations();
        if (obligations == null || obligations.getObligations() == null) {
            return effectiveObligations;
        }

        EffectType activeEffect;
        if (context.getAuthorizationDecisionResult().getDecision().getDecision() == DECISION.Permit) {
            activeEffect = EffectType.Permit;
        } else {
            activeEffect = EffectType.Deny;
        }

        for (ObligationType obligation : obligations.getObligations()) {
            if (obligation != null && obligation.getFulfillOn() == activeEffect) {
                effectiveObligations.put(obligation.getObligationId(), obligation);
            }
        }

View Full Code Here


    }

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {

        ObligationsType obligations = (ObligationsType) parentObject;

        if (childObject instanceof ObligationType) {
            obligations.getObligations().add((ObligationType) childObject);
        } else {
            super.processChildElement(parentObject, childObject);
        }
    }
View Full Code Here

    private static final ObligationsHelper instance = new ObligationsHelper();

    private ObligationsHelper() {}

    public static ObligationsType build() {
        ObligationsType obligations = (ObligationsType) builderFactory.getBuilder(elementQName).buildObject(elementQName);
        return obligations;
    }
View Full Code Here

        releaseDOM();

        policySet = buildXACMLNoReferences();

        if (obligationWizardList.size() > 0) {
            ObligationsType obligations = ObligationsHelper.build();
            List<ObligationType> obligationList = obligations.getObligations();
            for (ObligationWizard obligationWizard : obligationWizardList) {
                obligationList.add(obligationWizard.getXACML());
            }

            policySet.setObligations(obligations);
View Full Code Here

    }
  }

  protected void addObligationToPolicy(PolicyType policy){
   
    ObligationsType obligations = policy.getObligations();
   
    if (obligations == null){
      policy.setObligations(ObligationsHelper.build());
     
    }
View Full Code Here

    return xacmlPolicyMgmtClient.updatePolicySet(papAlias, oldPolicySetVersion, policySet);
   
  }
  protected void addObligationToPolicySet(PolicySetType policySet){
   
    ObligationsType obligations = policySet.getObligations();
   
    if (obligations == null){
      policySet.setObligations(ObligationsHelper.build());
    }
   
View Full Code Here

        if (obligationValue!= null){
          if (ObligationScopeType.action.equals(obligationScope)){
           
            if (!PolicyHelper.hasObligationWithId(actionPolicy, obligationValue)){
              ObligationWizard owiz = new ObligationWizard(obligationValue);
              ObligationsType obligations = ObligationsHelper.build();
              obligations.getObligations().add(owiz.getXACML());
              actionPolicy.setObligations(obligations);
            }
           
          }else{
           
            PolicySetType resourcePolicySet = findResourcePolicySet(papContainer);
            if (!PolicySetHelper.hasObligationWithId(resourcePolicySet, obligationValue)){
              ObligationWizard owiz = new ObligationWizard(obligationValue);
              ObligationsType obligations = ObligationsHelper.build();
              obligations.getObligations().add(owiz.getXACML());
              resourcePolicySet.setObligations(obligations);
            }
           
          }
        }
View Full Code Here

        policy.setTarget(targetWizard.getXACML());
        policy.setVersion(version);

        if (obligationWizardList.size() > 0) {
            ObligationsType obligations = ObligationsHelper.build();
            List<ObligationType> obligationList = obligations.getObligations();
            for (ObligationWizard obligationWizard : obligationWizardList) {
                obligationList.add(obligationWizard.getXACML());
            }

            policy.setObligations(obligations);
View Full Code Here

TOP

Related Classes of org.opensaml.xacml.policy.ObligationsType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.