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

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


     * {@inheritDoc}
     */
    public void delete(String papAlias) {

        if (!exists(papAlias)) {
            throw new NotFoundException(String.format("Not found: papAlias=%s", papAlias));
        }

        String papId = iniConfiguration.getString(idKey(papAlias));

        PapContainer papContainer = new PapContainer(get(papAlias));
View Full Code Here


    public Pap get(String papAlias) {

        Pap pap = getPapFromINIConfiguration(papAlias);

        if (pap == null) {
            throw new NotFoundException(String.format("Not found: papAlias=%s", papAlias));
        }

        return pap;
    }
View Full Code Here

    public void update(Pap pap) {

        String papAlias = pap.getAlias();

        if (!exists(papAlias))
            throw new NotFoundException(String.format("Not found: papAlias=%s", papAlias));

        saveToINIConfiguration(pap);
    }
View Full Code Here

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

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

    public synchronized List<PolicySetType> getAll(String papId) {

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

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

        Map<String, PolicySetTypeString> papCache = getPapCache(papId);

        List<PolicySetType> policySetList = new LinkedList<PolicySetType>();
View Full Code Here

            if (!policySetFile.exists()) {
                if (papCache.size() == 0) {
                    cache.remove(papId);
                }
                throw new NotFoundException(policySetNotFoundExceptionMsg(policySetId));
            }

            try {
                policySet = new PolicySetTypeString(policySetId,
                                                    policySetHelper.readFromFileAsString(policySetFile));
View Full Code Here

        TypeStringUtils.releaseUnneededMemory(policySet);

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

        if (!papDir.exists())
            throw new NotFoundException(papDirNotFoundExceptionMsg(papDir.getAbsolutePath()));

        String policySetId = policySetTypeString.getPolicySetId();

        File policySetFile = new File(getPolicySetAbsolutePath(papId, policySetId));
        if (policySetFile.exists()) {
View Full Code Here

        String policySetId = newPolicySet.getPolicySetId();

        File policySetFile = new File(getPolicySetAbsolutePath(papId, policySetId));
        if (!policySetFile.exists()) {
            throw new NotFoundException(policySetNotFoundExceptionMsg(policySetId));
        }

        Map<String, PolicySetTypeString> papCache = getPapCache(papId);
        PolicySetTypeString oldPolicySetString = papCache.get(policySetId);
View Full Code Here

    protected PolicyType doExecute() {

        PapContainer papContainer = new PapContainer(ps);

        if (!papContainer.hasPolicy(policyId)) {
            throw new NotFoundException("Policy '" + policyId + "' not found.");
        }

        PolicyType policy = papContainer.getPolicy(policyId);

        return policy;
View Full Code Here

                break;
            }
        }

        if (targetPolicy == null) {
            throw new NotFoundException("Id not found: " + id);
        }

        if (targetPolicy.getRules().size() == 0) {
           
            papContainer.removePolicyAndReferences(targetPolicy.getPolicyId());
View Full Code Here

TOP

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

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.