Package org.glite.authz.pap.repository.exceptions

Examples of org.glite.authz.pap.repository.exceptions.AlreadyExistsException


        String policyId = policyTypeString.getPolicyId();

        File policyFile = new File(getPolicyFileAbsolutePath(papId, policyId));

        if (policyFile.exists()) {
            throw new AlreadyExistsException("Already exists: policyId=" + policyId);
        }

        PolicyHelper.toFile(policyFile, policyTypeString);

        getPapCache(papId).put(policyId, policyTypeString);
View Full Code Here


        if (Pap.DEFAULT_PAP_ALIAS.equals(papAlias)) {
            throw new PapManagerException("Forbidden alias: " + papAlias);
        }

        if (exists(papAlias)) {
            throw new AlreadyExistsException("pap \"" + papAlias + "\" already exists");
        }

        distributionConfiguration.savePap(pap);
        papDAO.store(pap);
View Full Code Here

        TypeStringUtils.releaseUnneededMemory(policy);

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

        if (PolicySetHelper.referenceIdExists(policySet, policyId)) {
            throw new AlreadyExistsException("Reference id \"" + policyId + "\" alredy exists");
        }

        if (index < 0) {
            PolicySetHelper.addPolicyReference(policySet, policyId);
        } else {
View Full Code Here

        policySetDAO.store(papId, policySet);

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

        if (PolicySetHelper.referenceIdExists(rootPolicySet, policySetId)) {
            throw new AlreadyExistsException("Reference id \"" + policySetId + "\" alredy exists");
        }

        if (index < 0) {
            PolicySetHelper.addPolicySetReference(rootPolicySet, policySetId);
        } else {
View Full Code Here

    public void store(Pap pap) {

        String papAlias = pap.getAlias();

        if (exists(papAlias)) {
            throw new AlreadyExistsException(String.format("Already exists: papAlias=%s", papAlias));
        }

        File directory = new File(getPapDirAbsolutePath(pap.getId()));
        if (!directory.mkdir())
            throw new RepositoryException(String.format("Cannot create directory for PAP: %s (id=%s) (dir=%s)",
View Full Code Here

        String policySetId = policySetTypeString.getPolicySetId();

        File policySetFile = new File(getPolicySetAbsolutePath(papId, policySetId));
        if (policySetFile.exists()) {
            throw new AlreadyExistsException("Already exists: policySetId=" + policySetId);
        }

        PolicySetHelper.toFile(policySetFile, policySetTypeString);

        TypeStringUtils.releaseUnneededMemory(policySetTypeString);
View Full Code Here

TOP

Related Classes of org.glite.authz.pap.repository.exceptions.AlreadyExistsException

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.