Package org.apache.lenya.ac

Examples of org.apache.lenya.ac.AccessControlException


        }
        UsecaseRolesBuilder builder = new UsecaseRolesBuilder();
        try {
            builder.save(usecaseRoles, configUri, this.manager);
        } catch (BuildException e) {
            throw new AccessControlException(e);
        }
    }
View Full Code Here


        UsecaseRolesBuilder builder = new UsecaseRolesBuilder();
        UsecaseRoles usecaseRoles;
        try {
            usecaseRoles = (UsecaseRoles) getCache().get(_configurationUri, builder);
        } catch (CachingException e) {
            throw new AccessControlException(e);
        }
        return usecaseRoles;
    }
View Full Code Here

        Publication publication;

        try {
            publication = PublicationUtil.getPublication(this.manager, request);
        } catch (Exception e) {
            throw new AccessControlException(e);
        }
        org.apache.lenya.cms.repository.Session repoSession = RepositoryUtil.getSession(
                this.manager, request);

        DocumentFactory factory = DocumentUtil.createDocumentFactory(this.manager, repoSession);
View Full Code Here

        DefaultAccessController ac = getAccessController(session, pubId);
        AccreditableManager acMgr = ac.getAccreditableManager();
        User user = acMgr.getUserManager().getUser(userId);

        if (user == null) {
            throw new AccessControlException("The user [" + userId
                    + "] does not exist in the accreditable manager [" + acMgr.getId() + "]!");
        }

        ac.setupIdentity(getRequest());
View Full Code Here

            getLogger().debug("Policy URL: " + policyUrl);
            source = resolver.resolveURI("cocoon://" + policyUrl);
            Document document = DocumentHelper.readDocument(source.getInputStream());
            policy = new PolicyBuilder(accreditableManager).buildPolicy(document);
        } catch (SourceNotFoundException e) {
            throw new AccessControlException(e);
        } catch (ServiceException e) {
            throw new AccessControlException(e);
        } catch (MalformedURLException e) {
            throw new AccessControlException(e);
        } catch (IOException e) {
            throw new AccessControlException(e);
        } catch (ParserConfigurationException e) {
            throw new AccessControlException(e);
        } catch (SAXException e) {
            throw new AccessControlException(e);
        } catch (AccessControlException e) {
            throw new AccessControlException(e);
        } finally {
            if (resolver != null) {
                if (source != null) {
                    resolver.release(source);
                }
View Full Code Here

            File contextDir = getContext();
            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
            try {
                publication = factory.getPublication(webappUrl, contextDir);
            } catch (PublicationException e) {
                throw new AccessControlException(e);
            }
            if (publication.exists()) {
                getLogger().debug("Publication [" + publicationId + "] exists.");
            } else {
                getLogger().debug("Publication [" + publicationId + "] does not exist.");
View Full Code Here

                if (accessController instanceof Configurable) {
                    ((Configurable) accessController).configure(configuration);
                }

            } catch (Exception e) {
                throw new AccessControlException(e);
            }
        }

        return accessController;
    }
View Full Code Here

            resolver = (SourceResolver) getManager().lookup(SourceResolver.ROLE);
            contextSource = resolver.resolveURI("context:///");
            contextDir = SourceUtil.getFile(contextSource);

            if (contextDir == null || !contextDir.isDirectory()) {
                throw new AccessControlException("The servlet context is not a directory!");
            }

        } finally {
            if (resolver != null) {
                if (contextSource != null) {
View Full Code Here

                        getLogger().debug("    Document ID: [" + document.getId() + "]");
                    }
                }
            }
        } catch (Exception e) {
            throw new AccessControlException(e);
        }

        if (url == null) {
            if (getLogger().isDebugEnabled()) {
                getLogger().debug("    Document does not exist.");
View Full Code Here

            getLogger().debug("    Webapp URL:      [" + url + "]");
            getLogger().debug("    Serlvet context: [" + servletContext.getAbsolutePath() + "]");
            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
            publication = factory.getPublication(url, servletContext);
        } catch (Exception e) {
            throw new AccessControlException(e);
        } finally {
            if (resolver != null) {
                if (source != null) {
                    resolver.release(source);
                }
View Full Code Here

TOP

Related Classes of org.apache.lenya.ac.AccessControlException

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.