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

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


        }
    }

    public String getRepositoryVersion() {
      if (!initialized) {
        throw new RepositoryException("FileSytemRepository not initialized");
      }
    return FileSystemPapDAO.getInstance().getVersion();
  }
View Full Code Here


        File rootDir = new File(fileSystemDatabaseDir);

        try {
            setupRepositoryDirectory(rootDir);
        } catch (RepositoryException e) {
            throw new RepositoryException("Cannot create the repository root directory: " + rootDir.getAbsolutePath(), e);
        }

        initialized = true;
        log.info("Repository root directory is set to: " + rootDir.getAbsolutePath());
    }
View Full Code Here

            if (papCache.size() == 0) {
                cache.remove(papId);
            }

            if (!policySetFile.delete()) {
                throw new RepositoryException("Cannot delete file: " + policySetFile.getAbsolutePath());
            }

        } else {
            throw new NotFoundException(policySetNotFoundExceptionMsg(policySetId));
        }
View Full Code Here

        }

        File papDir = new File(FileSystemRepositoryManager.getPAPDirAbsolutePath(papId));

        if (!papDir.exists()) {
            throw new RepositoryException(papDirNotFoundExceptionMsg(papDir.getAbsolutePath()));
        }

        for (File file : papDir.listFiles()) {

            if (file.isDirectory()) {
View Full Code Here

                    try {
                        policySet = new PolicySetTypeString(policySetId,
                                                            policySetHelper.readFromFileAsString(file));
                        log.debug("getAll(): PolicySet retrieved from file: id=" + policySetId);
                    } catch (Throwable e) {
                        throw new RepositoryException(e);
                    }

                    papCache.put(policySetId, policySet);
                } else {
                    log.debug("getAll(): PolicySet retrieved from cache: id=" + policySetId);
View Full Code Here

            try {
                policySet = new PolicySetTypeString(policySetId,
                                                    policySetHelper.readFromFileAsString(policySetFile));
            } catch (Throwable e) {
                throw new RepositoryException(e);
            }

            papCache.put(policySetId, policySet);
            log.debug("getById(): PolicySet retrieved from file: id=" + policySetId);
View Full Code Here

        if (oldPolicySetString == null) {
            try {
                oldPolicySetString = new PolicySetTypeString(policySetHelper.buildFromFile(policySetFile));
                log.debug("update(): PolicySet retrieved from file: id=" + policySetId);
            } catch (Throwable e) {
                throw new RepositoryException(e);
            }
        } else {
            log.debug("update(): PolicySet retrieved from cache: id=" + policySetId);
        }
View Full Code Here

      logger.info("Starting repository validation. repair=" + repair);

      if (RepositoryUtils.performAllChecks(repair) == false) {

        throw new RepositoryException(
            "Repository validation check failed");

      }
    }
View Full Code Here

        }

        PapContainer papContainer = new PapContainer(pap);

        if (papContainer.getRootPolicySetId().equals(id)) {
            throw new RepositoryException("Invalid operation: cannot remove the local PAP root policy set");
        }

        if (papContainer.hasPolicy(id)) {
            papContainer.removePolicyAndReferences(id);
            return true;
View Full Code Here

        // the PAP
        // root policy set
        PolicySetType rootPAPPolicySet = papContainer.getRootPolicySet();

        if (!(PolicySetHelper.hasPolicySetReferenceId(rootPAPPolicySet, pivotId))) {
            throw new RepositoryException("Id not found or not a resource-id: " + pivotId);
        }

        if (!(PolicySetHelper.deletePolicySetReference(rootPAPPolicySet, id))) {
            throw new RepositoryException(String.format("Id \"%s\" not found into resource \"%s\"",
                                                        id,
                                                        rootPAPPolicySet.getPolicySetId()));
        }

        int pivotIndex = PolicySetHelper.getPolicySetIdReferenceIndex(rootPAPPolicySet, pivotId);
View Full Code Here

TOP

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

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.