Package org.apache.lenya.ac

Examples of org.apache.lenya.ac.AccessControlException


     */
    public void setNetworkAddress(String address) throws AccessControlException {
        try {
            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 {
            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 (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 {
            subnetMask = InetAddress.getByAddress(mask);
        } catch (UnknownHostException e) {
            throw new AccessControlException(
                    "Failed to convert mask [" + addr2string(mask) + "]: ", e);
        }
    }
View Full Code Here

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

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

        if (!instances.containsKey(configurationDirectory)) {
            instances.put(configurationDirectory, new FileUserManager(configurationDirectory,
View Full Code Here

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

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

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

            source = resolver.resolveURI("cocoon://" + policyUrl);
            Document document = DocumentHelper.readDocument(source.getInputStream());
            policy = new PolicyBuilder(accreditableManager).buildPolicy(document);

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

                    publication =
                        PublicationFactory.getPublication(
                            publicationId,
                            contextDir.getAbsolutePath());
                } catch (PublicationException e) {
                    throw new AccessControlException(e);
                }

            } 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

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.