Examples of ApplicationSettings


Examples of com.commafeed.CommaFeedConfiguration.ApplicationSettings

  private final CommaFeedConfiguration config;

  public void sendMail(User user, String subject, String content) throws Exception {

    ApplicationSettings settings = config.getApplicationSettings();

    final String username = settings.getSmtpUserName();
    final String password = settings.getSmtpPassword();
    final String fromAddress = Optional.fromNullable(settings.getSmtpFromAddress()).or(settings.getSmtpUserName());

    String dest = user.getEmail();

    Properties props = new Properties();
    props.put("mail.smtp.auth", "true");
    props.put("mail.smtp.starttls.enable", "" + settings.isSmtpTls());
    props.put("mail.smtp.host", settings.getSmtpHost());
    props.put("mail.smtp.port", "" + settings.getSmtpPort());

    Session session = Session.getInstance(props, new Authenticator() {
      @Override
      protected PasswordAuthentication getPasswordAuthentication() {
        return new PasswordAuthentication(username, password);
View Full Code Here

Examples of com.commafeed.CommaFeedConfiguration.ApplicationSettings

    this.queues = queues;
    this.config = config;
    this.feedSubscriptionDAO = feedSubscriptionDAO;
    this.cache = cache;

    ApplicationSettings settings = config.getApplicationSettings();
    int threads = Math.max(settings.getDatabaseUpdateThreads(), 1);
    pool = new FeedRefreshExecutor("feed-refresh-updater", threads, Math.min(50 * threads, 1000), metrics);
    locks = Striped.lazyWeakLock(threads * 100000);

    entryCacheMiss = metrics.meter(MetricRegistry.name(getClass(), "entryCacheMiss"));
    entryCacheHit = metrics.meter(MetricRegistry.name(getClass(), "entryCacheHit"));
View Full Code Here

Examples of com.vaynberg.wicket.select2.ApplicationSettings

            }
        }
    }

    private void configureWicketSelect2() {
        ApplicationSettings select2Settings = ApplicationSettings.get();
        select2Settings.setCssReference(new Select2BootstrapCssReference());
        select2Settings.setJavaScriptReference(new Select2JsReference());
        select2Settings.setIncludeJqueryUI(false);
    }
View Full Code Here

Examples of de.timefinder.core.util.ApplicationSettings

     * This method should be used only for testing!
     * and for Startup class
     */
    public static void initLogging() {
        try {
            PropertyConfigurator.configure(new ApplicationSettings().getLogPropertiesFile().getAbsolutePath());
        } catch (Exception ex) {
            ex.printStackTrace();
            System.out.println("Fall back to classpath log4j.properties.");
        }
    }
View Full Code Here

Examples of org.apache.wicket.jmx.wrapper.ApplicationSettings

      domain = tempDomain;

      Application appBean = new Application(application);
      register(application, appBean, appBeanName);

      register(application, new ApplicationSettings(application), new ObjectName(domain
        + ":type=Application,name=ApplicationSettings"));
      register(application, new DebugSettings(application), new ObjectName(domain
        + ":type=Application,name=DebugSettings"));
      register(application, new MarkupSettings(application), new ObjectName(domain
        + ":type=Application,name=MarkupSettings"));
View Full Code Here

Examples of org.apache.wicket.settings.ApplicationSettings

  public final ApplicationSettings getApplicationSettings()
  {
    checkSettingsAvailable();
    if (applicationSettings == null)
    {
      applicationSettings = new ApplicationSettings();
    }
    return applicationSettings;
  }
View Full Code Here

Examples of org.apache.wicket.settings.ApplicationSettings

      {
        // Can the application always be taken??
        // Should be if serialization happened in thread with application set
        // (WICKET-2195)
        Application application = Application.get();
        ApplicationSettings applicationSettings = application.getApplicationSettings();
        IClassResolver classResolver = applicationSettings.getClassResolver();

        candidate = classResolver.resolveClass(className);
        if (candidate == null)
        {
          candidate = super.resolveClass(desc);
View Full Code Here

Examples of org.apache.wicket.settings.ApplicationSettings

        // ignore this exception.
        log.debug("Class not found by using objects own classloader, trying the IClassResolver");
      }

      Application application = Application.get();
      ApplicationSettings applicationSettings = application.getApplicationSettings();
      IClassResolver classResolver = applicationSettings.getClassResolver();

      Class<?> candidate = null;
      try
      {
        candidate = classResolver.resolveClass(className);
View Full Code Here

Examples of org.apache.wicket.settings.ApplicationSettings

  public final ApplicationSettings getApplicationSettings()
  {
    checkSettingsAvailable();
    if (applicationSettings == null)
    {
      applicationSettings = new ApplicationSettings();
    }
    return applicationSettings;
  }
View Full Code Here

Examples of org.apache.wicket.settings.ApplicationSettings

      {
        // Can the application always be taken??
        // Should be if serialization happened in thread with application set
        // (WICKET-2195)
        Application application = Application.get();
        ApplicationSettings applicationSettings = application.getApplicationSettings();
        IClassResolver classResolver = applicationSettings.getClassResolver();

        candidate = classResolver.resolveClass(className);
        if (candidate == null)
        {
          candidate = super.resolveClass(desc);
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.