Package org.opensaml.xacml.policy

Examples of org.opensaml.xacml.policy.PolicySetType


     */
    public void purgeUnreferencedPolicySets() {

        Set<String> idSet = new HashSet<String>();

        PolicySetType rootPS = policySetDAO.getById(papId, rootPolicySetId);

        idSet.add(rootPS.getPolicySetId());

        for (String id : PolicySetHelper.getPolicySetIdReferencesValues(rootPS)) {
            idSet.add(id);
        }

View Full Code Here


        if (!policySetDAO.exists(papId, policySetId)) {
            throw new NotFoundException("PolicySetId \"" + policySetId + "\" does not exists");
        }

        PolicySetType rootPolicySet = policySetDAO.getById(papId, rootPolicySetId);

        if (PolicySetHelper.deletePolicySetReference(rootPolicySet, policySetId)) {

            String oldVersion = rootPolicySet.getVersion();
            PolicySetWizard.increaseVersion(rootPolicySet);

            policySetDAO.update(papId, oldVersion, rootPolicySet);

            TypeStringUtils.releaseUnneededMemory(rootPolicySet);
        }

        PolicySetType policySet = policySetDAO.getById(papId, policySetId);
        policySetDAO.delete(papId, policySetId);

        List<String> idList = PolicySetHelper.getPolicyIdReferencesValues(policySet);

        TypeStringUtils.releaseUnneededMemory(policySet);
View Full Code Here

    public static PolicySetType makeRootPolicySet() {
       
        String rootPolicySetId = "root-" + PapManager.getInstance().getPap(Pap.DEFAULT_PAP_ALIAS).getId();
       
        PolicySetType rootPolicySet = PolicySetHelper.buildWithAnyTarget(rootPolicySetId,
                                                                         PolicySetHelper.COMB_ALG_FIRST_APPLICABLE);
        rootPolicySet.setVersion(RepositoryManager.REPOSITORY_MANAGER_VERSION);
       
        return rootPolicySet;
    }
View Full Code Here

            return ExitStatus.FAILURE.ordinal();
        }

        List<PolicyWizard> policyWizardList = policySetWizard.getPolicyWizardList();
       
        PolicySetType repositoryPolicySet = xacmlPolicyMgmtClient.getPolicySet(alias, id);

        String repositoryVersion = repositoryPolicySet.getVersion();

        TypeStringUtils.releaseUnneededMemory(repositoryPolicySet);

        PolicySetType policySet = policySetWizard.getXACML();

        policySet.getPolicyIdReferences().clear();
        policySet.getPolicySetIdReferences().clear();

        policySet.setPolicySetId(id);
        policySet.setVersion(repositoryVersion);
        PolicySetWizard.increaseVersion(policySet);

        xacmlPolicyMgmtClient.updatePolicySet(alias, repositoryVersion, policySet);
       
        TypeStringUtils.releaseUnneededMemory(policySetWizard);
View Full Code Here

   
    XACMLPolicyCLIUtils.initOpenSAMLAndAttributeWizard();
   
    if (xacmlPolicyMgmtClient.hasPolicySet(papAlias, policyId)){
   
      PolicySetType policySet = xacmlPolicyMgmtClient.getPolicySet(papAlias, policyId);
     
      if (PolicySetHelper.hasObligationWithId(policySet, obligationId)){
        System.err.println("Obligation '"+obligationId+"' already defined for policy '"+policyId+"'.");
        return ExitStatus.FAILURE.ordinal();
      }
View Full Code Here

       
    XACMLPolicyCLIUtils.initOpenSAMLAndAttributeWizard();
   
    if (xacmlPolicyMgmtClient.hasPolicySet(papAlias, policyId)){
     
      PolicySetType policySet = xacmlPolicyMgmtClient.getPolicySet(papAlias, policyId);
     
      if (!PolicySetHelper.hasObligationWithId(policySet, 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.PolicySetType

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.