Package org.glite.authz.pap.ui.cli

Examples of org.glite.authz.pap.ui.cli.CLIException


    PolicySetType[] policySetArray;

    policySetArray = xacmlPolicyMgmtClient.listPolicySets(papAlias);

    if (policySetArray.length == 0) {
      throw new CLIException(
          "Error: the repository seems to be corrupted, no policy sets have been found");
    }

    PolicyType[] policyArray;

    policyArray = xacmlPolicyMgmtClient.listPolicies(papAlias);

    List<PolicyWizard> policyWizardList = new ArrayList<PolicyWizard>(policyArray.length);

    for (PolicyType policy : policyArray) {
     
      // Filtering by action
      // TODO: how to handle wildcards? Should we use regexp match?
      String actionValue = PolicyWizard.getActionValue(policy);
      if (actionFilter != null && !actionValue.equals(actionFilter))
        continue;
     
      PolicyWizard policyWizard = new PolicyWizard(policy);
      policyWizardList.add(policyWizard);
      policyWizard.releaseChildrenDOM();
      policyWizard.releaseDOM();
    }

    policyArray = null;

    PolicySetType localRootPolicySet = policySetArray[0];

    for (String policySetId : PolicySetHelper
        .getPolicySetIdReferencesValues(localRootPolicySet)) {

      PolicySetType policySet = null;

      for (PolicySetType policySetElem : policySetArray) {
        if (policySetId.equals(policySetElem.getPolicySetId())) {
          policySet = policySetElem;
          break;
        }
      }

      if (policySet == null) {
        throw new CLIException(
            "Error: the repository seems to be corrupted, policy set not found: "
                + policySetId);
      }

      try {
View Full Code Here


    public static void initAttributeWizard() {
        String papDir = System.getProperty("PAP_HOME");

        if (papDir == null) {
            throw new CLIException("Environment variable PAP_HOME is not set.");
        }

        AttributeWizardTypeConfiguration.bootstrap(papDir + "/conf/attribute-mappings.ini");
    }
View Full Code Here

TOP

Related Classes of org.glite.authz.pap.ui.cli.CLIException

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.