Examples of AbstractConfiguration


Examples of org.apache.commons.configuration2.AbstractConfiguration

    }

    @Override
    protected AbstractConfiguration getConfiguration()
    {
        AbstractConfiguration config;
        final Properties parameters = new Properties();
        parameters.setProperty("key1", "value1");
        parameters.setProperty("key2", "value2");
        parameters.setProperty("list", "value1, value2");
        parameters.setProperty("listesc", "value1\\,value2");

        if (supportsApplet)
        {
            Applet applet = new Applet()
            {
                /**
                 * Serial version UID.
                 */
                private static final long serialVersionUID = 1L;

                @Override
                public String getParameter(String key)
                {
                    return parameters.getProperty(key);
                }

                @Override
                public String[][] getParameterInfo()
                {
                    return new String[][]
                    {
                    { "key1", "String", "" },
                    { "key2", "String", "" },
                    { "list", "String[]", "" },
                    { "listesc", "String", "" } };
                }
            };

            config = new AppletConfiguration(applet);
        }
        else
        {
            config = new MapConfiguration(parameters);
        }

        config.setListDelimiterHandler(new DefaultListDelimiterHandler(','));
        return config;
    }
View Full Code Here

Examples of org.eclipse.jetty.webapp.AbstractConfiguration

  /**
   * Create a configuration object that adds error handlers
   * @return a configuration object for adding error pages
   */
  private Configuration getErrorPageConfiguration() {
    return new AbstractConfiguration() {
      @Override
      public void configure(WebAppContext context) throws Exception {
        ErrorHandler errorHandler = context.getErrorHandler();
        addJettyErrorPages(errorHandler, getErrorPages());
      }
View Full Code Here

Examples of org.eclipse.jetty.webapp.AbstractConfiguration

  /**
   * Create a configuration object that adds mime type mappings
   * @return a configuration object for adding mime type mappings
   */
  private Configuration getMimeTypeConfiguration() {
    return new AbstractConfiguration() {
      @Override
      public void configure(WebAppContext context) throws Exception {
        MimeTypes mimeTypes = context.getMimeTypes();
        for (MimeMappings.Mapping mapping : getMimeMappings()) {
          mimeTypes.addMimeMapping(mapping.getExtension(),
View Full Code Here

Examples of org.jboss.mcann.repository.AbstractConfiguration

      try
      {
         URL[] urls = ClasspathUtils.getUrls(unit);
         DefaultAnnotationScanner scanner = new ModuleAnnotationScanner(module);

         AbstractConfiguration config = new DefaultConfiguration();
         configureScanner(unit, scanner, config);
         if (configuration != null)
            config.merge(configuration); // override with custom config
         scanner.setConfiguration(config);

         AnnotationRepository repository = scanner.scan(unit.getClassLoader(), urls);
         unit.addAttachment(AnnotationRepository.class, repository);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.