Package org.apache.lenya.ac

Examples of org.apache.lenya.ac.AccessControlException


            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

    Configuration config = createConfiguration();

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

            StringBuffer message = new StringBuffer("    URI: [").append(request.getRequestURI()).append("]\n");
            for (Enumeration e = request.getParameterNames(); e.hasMoreElements(); ) {
                String key = (String) e.nextElement();
                message.append("    Parameter: [").append(key).append("] = [").append(request.getParameter(key)).append("]\n");
            }
            throw new AccessControlException("Request [" + request + "] does not contain roles: \n" + message.toString());
        }
       
        Role[] roles = (Role[]) roleList.toArray(new Role[roleList.size()]);
        return roles;
    }
View Full Code Here

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

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

        return accessController;
    }
View Full Code Here

     */
    protected FileItemManager(File configurationDirectory) throws AccessControlException {
        assert configurationDirectory != null;

        if (!configurationDirectory.exists() || !configurationDirectory.isDirectory()) {
            throw new AccessControlException(
                "The directory [" + configurationDirectory.getAbsolutePath() + "] does not exist!");
        }

        this.configurationDirectory = configurationDirectory;
        notifier = new DirectoryChangeNotifier(configurationDirectory, getFileFilter());
View Full Code Here

        boolean changed;
        try {
            changed = notifier.hasChanged();
        } catch (IOException e) {
            throw new AccessControlException(e);
        }

        if (changed) {

            if (log.isDebugEnabled()) {
View Full Code Here

                        + e.fillInStackTrace();

                // an exception occured when trying to instanciate
                // a user.
                log.error(errorMsg);
                throw new AccessControlException(errorMsg, e);
            }
            item.setConfigurationDirectory(configurationDirectory);
        }

        try {
            item.configure(config);
        } catch (ConfigurationException e) {
            String errorMsg = "Exception when trying to configure: " + klass;
            throw new AccessControlException(errorMsg, e);
        }
        return item;
    }
View Full Code Here

            String errorMsg =
                "Exception when extracting class name from identity file: "
                    + klass
                    + config.getAttributeNames();
            log.error(errorMsg);
            throw new AccessControlException(errorMsg, e);
        }
        return klass;
    }
View Full Code Here

                "Exception when reading the configuration from file: " + file.getName();

            // an exception occured when trying to read the configuration
            // from the identity file.
            log.error(errorMsg);
            throw new AccessControlException(errorMsg, e);
        }
        return config;
    }
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.