Examples of ObligationsType


Examples of org.jboss.security.xacml.core.model.policy.ObligationsType

      <!-- **************************************************************** -->
      */
      String file = "XacmlRequest-04-01.xml";
      ResponseContext response = getResponse(file);
      ResultType result = response.getResult();
      ObligationsType obligationsType = result.getObligations();
      assertTrue("1 obligation", obligationsType.getObligation().size() == 1);
      validateCase(response, XACMLConstants.DECISION_PERMIT)
   }
View Full Code Here

Examples of org.jboss.security.xacml.core.model.policy.ObligationsType

        <!-- **************************************************************** -->
       */
      String file = "XacmlRequest-04-02.xml";
      ResponseContext response = getResponse(file);
      ResultType result = response.getResult();
      ObligationsType obligationsType = result.getObligations();
      assertTrue("1 obligation", obligationsType.getObligation().size() == 1);
     
      validateCase( response,   XACMLConstants.DECISION_PERMIT);
   }
View Full Code Here

Examples of org.jboss.security.xacml.core.model.policy.ObligationsType

      <!-- **************************************************************** -->
       */
      String file = "XacmlRequest-04-03.xml";
      ResponseContext response = getResponse(file);
      ResultType result = response.getResult();
      ObligationsType obligationsType = result.getObligations();
      assertTrue("1 obligation", obligationsType.getObligation().size() == 1);
      validateCase(response, XACMLConstants.DECISION_DENY)
   }
View Full Code Here

Examples of org.jboss.security.xacml.core.model.policy.ObligationsType

       <!-- **************************************************************** -->
       */
      String file = "XacmlRequest-05-01.xml";
      ResponseContext response = getResponse(file);
      ResultType result = response.getResult();
      ObligationsType obligationsType = result.getObligations();
      assertTrue("1 obligation", obligationsType.getObligation().size() == 1);
      validateCase(response, XACMLConstants.DECISION_PERMIT);
   }
View Full Code Here

Examples of org.jboss.security.xacml.core.model.policy.ObligationsType

            {
               ObligationType obType = new ObligationType();
               obType.setObligationId(obl.getId().toASCIIString());
               obType.setFulfillOn(EffectType.fromValue(Result.DECISIONS[obl.getFulfillOn()]));
           
               ObligationsType obligationsType = new ObligationsType();
               obligationsType.getObligation().add(obType);
               resultType.setObligations(obligationsType)
            }
         }
      }
      return resultType;
View Full Code Here

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

Examples of org.opensaml.xacml.policy.ObligationsType

    }

    /** {@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

Examples of org.opensaml.xacml.policy.ObligationsType

    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

Examples of org.opensaml.xacml.policy.ObligationsType

        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

Examples of org.opensaml.xacml.policy.ObligationsType

    }
  }

  protected void addObligationToPolicy(PolicyType policy){
   
    ObligationsType obligations = policy.getObligations();
   
    if (obligations == null){
      policy.setObligations(ObligationsHelper.build());
     
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.