Package org.opensaml.xacml.policy

Examples of org.opensaml.xacml.policy.PolicyType


        TypeStringUtils.releaseUnneededMemory(policySet);

        for (String policyId : idList) {

            PolicyType policy = policyDAO.getById(papId, policyId);
            int numberOfRules = policy.getRules().size();
            TypeStringUtils.releaseUnneededMemory(policy);

            policyDAO.delete(papId, policyId);
            notifyPoliciesDeleted(numberOfRules);
        }
View Full Code Here


     * @throws InvalidVersionException if there was a concurrent modification of the policy. Getting
     *             this exception means that no policy has been updated and the repository hasn't
     *             been modified nor corrupted.
     */
    public void updatePolicy(String version, PolicyType policy) {
        PolicyType oldPolicy = policyDAO.getById(papId, policy.getPolicyId());
        int numberOfRemovedRules = oldPolicy.getRules().size();
        TypeStringUtils.releaseUnneededMemory(oldPolicy);

        int numberOfAddedRules = policy.getRules().size();

        policyDAO.update(papId, version, policy);
View Full Code Here

        if (!xacmlPolicyMgmtClient.hasPolicy(alias, id)) {
            System.out.println("Error: action id \"" + id + "\" does not exists.");
            return ExitStatus.FAILURE.ordinal();
        }

        PolicyType oldPolicy = xacmlPolicyMgmtClient.getPolicy(alias, id);

        policyWizard.setPolicyId(id);
        policyWizard.increaseVersion();

        boolean success = xacmlPolicyMgmtClient.updatePolicy(alias, oldPolicy.getVersion(), policyWizard.getXACML());

        if (!success) {
            return ExitStatus.FAILURE.ordinal();
        }
View Full Code Here

     
      return ExitStatus.SUCCESS.ordinal();
     
    }else if (xacmlPolicyMgmtClient.hasPolicy(papAlias, policyId)){
     
      PolicyType policy = xacmlPolicyMgmtClient.getPolicy(papAlias, policyId);
     
      if (PolicyHelper.hasObligationWithId(policy, obligationId)){
        System.err.println("Obligation '"+obligationId+"' already defined for policy '"+policyId+"'.");
        return ExitStatus.FAILURE.ordinal();
      }
View Full Code Here

      }
     
     
    }else if (xacmlPolicyMgmtClient.hasPolicy(papAlias, policyId)){
     
      PolicyType policy = xacmlPolicyMgmtClient.getPolicy(papAlias, policyId);
     
      if (!PolicyHelper.hasObligationWithId(policy, obligationId)){
        System.err.println("Obligation '"+obligationId+"' not defined for policy '"+policyId+"'.");
        return ExitStatus.FAILURE.ordinal();
      }
View Full Code Here

TOP

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

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.