Package org.apache.lenya.ac

Examples of org.apache.lenya.ac.AccessControlException


     */
    public void setNetworkAddress(String address) throws AccessControlException {
        try {
            this.networkAddress = InetAddress.getByName(address);
        } catch (UnknownHostException e) {
            throw new AccessControlException("Failed to convert address [" + address + "]: ", e);
        }
    }
View Full Code Here


     */
    public void setNetworkAddress(byte[] address) throws AccessControlException {
        try {
            this.networkAddress = InetAddress.getByAddress(address);
        } catch (UnknownHostException e) {
            throw new AccessControlException("Failed to convert address [" + addr2string(address)
                    + "]: ", e);
        }
    }
View Full Code Here

    public void setSubnetMask(String mask) throws AccessControlException {
        try {
            /* use setSubnetMask(...) to check the mask-format: */
            setSubnetMask(InetAddress.getByName(mask).getAddress());
        } catch (final UnknownHostException e) {
            throw new AccessControlException("Failed to convert mask [" + mask + "]: ", e);
        }

    }
View Full Code Here

                }
                /*
                 * Invalid byte found, i.e. one which is not element of { 11111111, 11111110,
                 * 11111100, 11111000, ..., 00000000 }
                 */
                throw new AccessControlException("Invalid byte in mask [" + addr2string(mask) + "]");
            }
        }
        /* the remaining byte(s) (if any) must be 0: */
        while (++i < mask.length) {
            if (mask[i] != 0) {
                /*
                 * Invalid byte found, i.e. some non-zero byte right of the first non-zero byte.
                 */
                throw new AccessControlException("Invalid non-zero byte in mask ["
                        + addr2string(mask) + "]");
            }
        }

        /* convert the checked mask to InetAddress: */
        try {
            this.subnetMask = InetAddress.getByAddress(mask);
        } catch (final UnknownHostException e) {
            throw new AccessControlException(
                    "Failed to convert mask [" + addr2string(mask) + "]: ", e);
        }
    }
View Full Code Here

                getLogger().debug("Resolved access controller [" + controller + "]");
                i++;
            }

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

        return controller;
    }
View Full Code Here

    public static FileUserManager instance(File configurationDirectory, UserType[] userTypes, Logger logger)
            throws AccessControlException {

        assert configurationDirectory != null;
        if (!configurationDirectory.isDirectory()) {
            throw new AccessControlException("Configuration directory [" + configurationDirectory
                    + "] does not exist!");
        }

        if (!instances.containsKey(configurationDirectory)) {
            FileUserManager manager = new FileUserManager(userTypes);
View Full Code Here

        File xmlfile = new File(xmlPath, getId() + FileRoleManager.SUFFIX);

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

            resolver = (SourceResolver) getManager().lookup(SourceResolver.ROLE);
            key = generateCacheKey(webappUrl, resolver);
            getLogger().debug("Access controller cache key: [" + key + "]");

        } catch (Exception e) {
            throw new AccessControlException(e);
        } finally {
            if (resolver != null) {
                getManager().release(resolver);
            }
        }
View Full Code Here

        throws AccessControlException {
        Object key;
        try {
            key = URLKeyUtil.generateKey(resolver, webappUrl);
        } catch (Exception e) {
            throw new AccessControlException(e);
        }
        return key;
    }
View Full Code Here

    public static FileIPRangeManager instance(File configurationDirectory, Logger logger)
            throws AccessControlException {

        assert configurationDirectory != null;
        if (!configurationDirectory.isDirectory()) {
            throw new AccessControlException("Configuration directory [" + configurationDirectory
                    + "] does not exist!");
        }

        if (!instances.containsKey(configurationDirectory)) {
            FileIPRangeManager manager = new FileIPRangeManager();
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.