Package org.glite.authz.pap.common.xacml.wizard

Examples of org.glite.authz.pap.common.xacml.wizard.PolicySetWizard


        PapContainer papContainer = new PapContainer(pap);

        PolicySetType targetPolicySet = getTargetPolicySet(papContainer);

        if (targetPolicySet == null) {
            targetPolicySet = (new PolicySetWizard(resourceAttributeWizard)).getXACML();
        } else {
            updateOperationForPolicySet = true;
        }

        String policyId = null;
View Full Code Here


        // If filtering by action ruled out policies for this resource proceed to the
        // next policy set
        if (policyWizardList.isEmpty()){
          continue;
        }
        PolicySetWizard policySetWizard = new PolicySetWizard(
            policySet, policyWizardList, null);
       
        System.out.println();

        if (xacmlOutput) {
         
          System.out.println(policySetWizard.toXACMLString());
       
        } else {
         
          System.out.println(policySetWizard.toFormattedString(
              showIds, showRuleId));
        }

      } catch (UnsupportedPolicySetWizardException e) {
        log.error("Unsupported Policy/PolicySet", e);
View Full Code Here

     * @param bottom
     * @return the resource id.
     */
    private String createResource(PapContainer papContainer, String resourceValue, boolean bottom) {

      PolicySetWizard psWizard = new PolicySetWizard(new AttributeWizard("resource", resourceValue));
     
      if (obligationValue!= null && obligationScope.equals(ObligationScopeType.resource))
        psWizard.addObligation(new ObligationWizard(obligationValue))
     
        PolicySetType resource = psWizard.getXACML();

        String resourceId = resource.getPolicySetId();

        papContainer.storePolicySet(resource);

View Full Code Here

        boolean result = true;

        for (XACMLWizard xacmlWizard : xacmlWizardList) {

            PolicySetWizard policySetWizard = (PolicySetWizard) xacmlWizard;

            PolicySetType policySet = policySetWizard.getXACML();

            policySet.getPolicyIdReferences().clear();

            policySetWizard.releaseDOM();

            String policySetId = xacmlPolicyMgmtClient.addPolicySet(alias, position, policySet);

            if (position != -1) {
                position++;
            }

            if (policySetId == null) {
                System.out.println(String.format("Error policy set not added: %s (id=%s). Skipping all the policies defined inside.",
                                                 policySetWizard.getTagAndValue(),
                                                 policySetWizard.getPolicySetId()));
                result = false;
                continue;
            }

            if (verboseMode) {
                System.out.println(String.format("Added policy set: %s (id=%s)",
                                                 policySetWizard.getTagAndValue(),
                                                 policySetId));
            }

            int size = policySetWizard.getPolicyWizardList().size();
            PolicyType[] policyArray = new PolicyType[size];
            String[] idPrefixArray = new String[size];
            String[] tagAndValueArray = new String[size];

            for (int i = 0; i < size; i++) {
                PolicyWizard policyWizard = policySetWizard.getPolicyWizardList().get(i);
                policyArray[i] = policyWizard.getXACML();
                TypeStringUtils.releaseUnneededMemory(policyArray[i]);
                idPrefixArray[i] = policyWizard.getPolicyIdPrefix();
                tagAndValueArray[i] = policyWizard.getTagAndValue();
                TypeStringUtils.releaseUnneededMemory(policyWizard);
View Full Code Here

TOP

Related Classes of org.glite.authz.pap.common.xacml.wizard.PolicySetWizard

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.