Package org.apache.lenya.ac

Examples of org.apache.lenya.ac.AccessControlException


            log.info("LDAPUser.existsUser() got exception while looking up id [" + ldapId + "], so will return false", e);
            exists = false;
        } catch (Exception e) {
            if (log.isDebugEnabled())
                log.debug("existsUser() for id [" + ldapId + "] got exception: " + e);
            throw new AccessControlException("Exception during search: ", e);
        }

        return exists;
    }
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

        Configuration config = createConfiguration();

        try {
            serializer.serializeToFile(getFile(), config);
        } catch (Exception e) {
            throw new AccessControlException(e);
        }
    }
View Full Code Here

            getLogger().debug(
                    "Authenticating username [" + username + "] with password [" + password + "]");
        }

        if (username == null || password == null) {
            throw new AccessControlException("Username or password is null!");
        }

        Identity identity = (Identity) request.getSession(false).getAttribute(
                Identity.class.getName());
        boolean authenticated = authenticate(accreditableManager, username, password, identity);
View Full Code Here

        Document document;

        try {
            document = DocumentHelper.readDocument(stream);
        } catch (Exception e) {
            throw new AccessControlException(e);
        }

        return buildPolicy(document);
    }
View Full Code Here

        } else if (elementName.equals(IP_RANGE_ELEMENT)) {
            accreditable = getAccreditableManager().getIPRangeManager().getIPRange(id);
        }

        if (accreditable == null) {
            throw new AccessControlException(
                "Unknown accreditable [" + elementName + "] with ID [" + id + "]");
        }

        return accreditable;
    }
View Full Code Here

                new NamespaceHelper(
                    AccessController.NAMESPACE,
                    AccessController.DEFAULT_PREFIX,
                    POLICY_ELEMENT);
        } catch (ParserConfigurationException e) {
            throw new AccessControlException(e);
        }

        Credential[] credentials = policy.getCredentials();
        Element policyElement = helper.getDocument().getDocumentElement();
View Full Code Here

            localName = IP_RANGE_ELEMENT;
            id = ((AbstractIPRange) accreditable).getId();
        }

        if (localName == null) {
            throw new AccessControlException("Could not save accreditable [" + accreditable + "]");
        }

        Element element = helper.createElement(localName);

        if (id != null) {
View Full Code Here

        File xmlfile = getFile();

        try {
            serializer.serializeToFile(xmlfile, config);
        } catch (Exception e) {
            throw new AccessControlException(e);
        }
    }
View Full Code Here

     * @return An array of user types.
     * @throws AccessControlException if an error occurs.
     */
    public UserType[] getUserTypes() throws AccessControlException {
        if (userTypes == null)
            throw new AccessControlException("User types not initialized");
        return (UserType[]) userTypes.toArray(new UserType[userTypes.size()]);
    }
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.