Package org.glite.authz.pap.common

Examples of org.glite.authz.pap.common.Pap


        if (alias == null) {
            alias = Pap.DEFAULT_PAP_ALIAS;
        }
       
        Pap pap = PapManager.getInstance().getPap(alias);

        if (pap.isRemote()) {
            throw new XACMLPolicyManagementServiceException("Forbidden operation for a remote PAP");
        }

        PapContainer papContainer = new PapContainer(pap);
View Full Code Here


      papAliasArray = commandLine.getOptionValues(OPT_PAPALIAS_LONG);
      papInfoArray = getPAPInfoArray(papAliasArray, null);

    } else {

      Pap pap = Pap.makeDefaultPAP();

      Pap[] papArray = new Pap[1];
      papArray[0] = pap;

      papAliasArray = new String[1];
      papAliasArray[0] = pap.getAlias();

      papInfoArray = getPAPInfoArray(papAliasArray, papArray);
    }

    XACMLPolicyCLIUtils.initOpenSAMLAndAttributeWizard();
View Full Code Here

    for (int i = 0; i < size; i++) {

      String alias = papAliasArray[i];

      Pap pap;

      if (papArray != null) {
        pap = papArray[i];
      } else {
        pap = papMgmtClient.getPap(alias);
      }

      if (pap.isLocal()) {
        papInfoArray[i] = String.format("%s (local):", pap.getAlias());
      } else {
        papInfoArray[i] = String.format("%s (%s:%s):", pap.getAlias(),
            pap.getHostname(), pap.getPort());
      }
    }
    return papInfoArray;
  }
View Full Code Here

           
            path = getPath(args[2]);
            dn = args[3];
        }

        Pap pap = new Pap(alias, isLocal, dn, host, port, path, protocol, isPublic);

        String msg = "Adding pap: ";

        if (verboseMode) {
            System.out.println(msg + pap.toFormattedString(0, msg.length()));
        }

        if (papMgmtClient.exists(pap.getAlias())) {
            System.out.println("pap already exists.");
            return ExitStatus.FAILURE.ordinal();
        }

        papMgmtClient.addPap(pap);

        if (pap.isRemote()) {

            if (!commandLine.hasOption(OPT_NO_POLICIES_LONG)) {

                if (verboseMode) {
                    System.out.print("Retrieving policies... ");
                }

                try {
                    papMgmtClient.refreshCache(pap.getAlias());
                } catch (RemoteException e) {
                    System.out.println("Error: pap successfully added but cannot retrieve policies.");
                    throw e;
                }
View Full Code Here

    @Override
    protected Boolean doExecute() {

        PapManager papManager = PapManager.getInstance();

        Pap pap;

        try {
            pap = papManager.getPap(papAlias);

        } catch (NotFoundException e) {
            log.error("Unable to refresh cache, PAP not found: " + papAlias);
            return false;
        }
       
        if (!(pap.isRemote())) {
            throw new PAPException("\"" + papAlias + "\" is local, nothing to refresh");
        }

        try {
            DistributionModule.refreshCache(pap);
View Full Code Here

        if (alias == null) {
            alias = Pap.DEFAULT_PAP_ALIAS;
        }

        Pap pap = PapManager.getInstance().getPap(alias);

        if (pap.isRemote()) {
            throw new XACMLPolicyManagementServiceException("Forbidden operation for a remote pap");
        }

        PapContainer papContainer = new PapContainer(pap);
View Full Code Here

        if (alias == null) {
            alias = Pap.DEFAULT_PAP_ALIAS;
        }

        Pap pap = PapManager.getInstance().getPap(alias);

        if (pap.isRemote()) {
            throw new XACMLPolicyManagementServiceException("Forbidden operation for a remote PAP");
        }

        PapContainer papContainer = new PapContainer(pap);
View Full Code Here

        if (alias == null) {
            alias = Pap.DEFAULT_PAP_ALIAS;
        }
       
        Pap pap = PapManager.getInstance().getPap(alias);

        if (pap.isRemote()) {
            throw new XACMLPolicyManagementServiceException("Forbidden operation for a remote PAP");
        }

        PapContainer papContainer = new PapContainer(pap);
View Full Code Here

        if (alias == null) {
            alias = Pap.DEFAULT_PAP_ALIAS;
        }
       
        Pap pap = PapManager.getInstance().getPap(alias);

        if (pap.isRemote()) {
            throw new XACMLPolicyManagementServiceException("Forbidden operation for a remote PAP");
        }

        PapContainer papContainer = new PapContainer(pap);
View Full Code Here

    }

    @Override
    protected Object doExecute() {

        Pap pap = PapManager.getInstance().getPap(alias);

        pap.setEnabled(enabled);

        PapManager.getInstance().updatePap(pap);

        return null;
    }
View Full Code Here

TOP

Related Classes of org.glite.authz.pap.common.Pap

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.