//# 0 errors, 330 messages
//#
/*
    //#configuration.java:1:1: class: net.sourceforge.pebble.Configuration
 * Copyright (c) 2003-2006, Simon Brown
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in
 *     the documentation and/or other materials provided with the
 *     distribution.
 *
 *   - Neither the name of Pebble nor the names of its contributors may
 *     be used to endorse or promote products derived from this software
 *     without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package net.sourceforge.pebble;

import net.sourceforge.pebble.dao.DAOFactory;
import net.sourceforge.pebble.dao.file.FileDAOFactory;
import net.sourceforge.pebble.security.SecurityRealm;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * A bean representing configurable properties for Pebble.
 *
 * @author    Simon Brown
 */
public class Configuration {

  /** the log used by this class */
  private static Log log = LogFactory.getLog(Configuration.class);
    //#configuration.java:48: method: net.sourceforge.pebble.Configuration.net.sourceforge.pebble.Configuration__static_init
    //#configuration.java:48: Warning: method not available
    //#    -- call on Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.Configuration
    //#    method: net.sourceforge.pebble.Configuration__static_init
    //#    unanalyzed callee: Log org.apache.commons.logging.LogFactory:getLog(Class)
    //#output(net.sourceforge.pebble.Configuration__static_init): __Descendant_Table[net/sourceforge/pebble/Configuration]
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.evaluateDirectory(Ljava/lang/String;)Ljava/lang/String;
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getDaoFactory()Lnet/sourceforge/pebble/dao/DAOFactory;
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getDataDirectory()Ljava/lang/String;
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getDomainName()Ljava/lang/String;
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getFileUploadQuota()J
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getFileUploadSize()J
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getSecureUrl()Ljava/lang/String;
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getSecurityRealm()Lnet/sourceforge/pebble/security/SecurityRealm;
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getSmtpHost()Ljava/lang/String;
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getUrl()Ljava/lang/String;
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.isMultiBlog()Z
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.isUserThemesEnabled()Z
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.isVirtualHostingEnabled()Z
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setDaoFactory(Lnet/sourceforge/pebble/dao/DAOFactory;)V
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setDataDirectory(Ljava/lang/String;)V
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setFileUploadQuota(J)V
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setFileUploadSize(J)V
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setMultiBlog(Z)V
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setSecureUrl(Ljava/lang/String;)V
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setSecurityRealm(Lnet/sourceforge/pebble/security/SecurityRealm;)V
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setSmtpHost(Ljava/lang/String;)V
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setUrl(Ljava/lang/String;)V
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setUserThemesEnabled(Z)V
    //#output(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setVirtualHostingEnabled(Z)V
    //#output(net.sourceforge.pebble.Configuration__static_init): log
    //#post(net.sourceforge.pebble.Configuration__static_init): __Descendant_Table[net/sourceforge/pebble/Configuration] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.evaluateDirectory(Ljava/lang/String;)Ljava/lang/String; == &evaluateDirectory
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getDaoFactory()Lnet/sourceforge/pebble/dao/DAOFactory; == &getDaoFactory
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getDataDirectory()Ljava/lang/String; == &getDataDirectory
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getDomainName()Ljava/lang/String; == &getDomainName
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getFileUploadQuota()J == &getFileUploadQuota
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getFileUploadSize()J == &getFileUploadSize
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getSecureUrl()Ljava/lang/String; == &getSecureUrl
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getSecurityRealm()Lnet/sourceforge/pebble/security/SecurityRealm; == &getSecurityRealm
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getSmtpHost()Ljava/lang/String; == &getSmtpHost
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.getUrl()Ljava/lang/String; == &getUrl
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.isMultiBlog()Z == &isMultiBlog
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.isUserThemesEnabled()Z == &isUserThemesEnabled
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.isVirtualHostingEnabled()Z == &isVirtualHostingEnabled
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setDaoFactory(Lnet/sourceforge/pebble/dao/DAOFactory;)V == &setDaoFactory
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setDataDirectory(Ljava/lang/String;)V == &setDataDirectory
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setFileUploadQuota(J)V == &setFileUploadQuota
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setFileUploadSize(J)V == &setFileUploadSize
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setMultiBlog(Z)V == &setMultiBlog
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setSecureUrl(Ljava/lang/String;)V == &setSecureUrl
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setSecurityRealm(Lnet/sourceforge/pebble/security/SecurityRealm;)V == &setSecurityRealm
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setSmtpHost(Ljava/lang/String;)V == &setSmtpHost
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setUrl(Ljava/lang/String;)V == &setUrl
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setUserThemesEnabled(Z)V == &setUserThemesEnabled
    //#post(net.sourceforge.pebble.Configuration__static_init): __Dispatch_Table.setVirtualHostingEnabled(Z)V == &setVirtualHostingEnabled
    //#post(net.sourceforge.pebble.Configuration__static_init): init'ed(log)
    //#configuration.java:48: end of method: net.sourceforge.pebble.Configuration.net.sourceforge.pebble.Configuration__static_init

  private String dataDirectory = "${user.home}/pebble";
  private String url;
  private String secureUrl;
  private boolean multiBlog = false;
  private boolean virtualHostingEnabled = false;
  private boolean userThemesEnabled = true;
  private String smtpHost = "java:comp/env/mail/Session";
  private long fileUploadSize = 2048;
  private long fileUploadQuota = -1;
  private DAOFactory daoFactory = new FileDAOFactory();
  private SecurityRealm securityRealm;

  public Configuration() {
    //#configuration.java:62: method: void net.sourceforge.pebble.Configuration.net.sourceforge.pebble.Configuration()
    //#input(void net.sourceforge.pebble.Configuration()): this
    //#output(void net.sourceforge.pebble.Configuration()): new FileBlogEntryDAO(FileDAOFactory#1) num objects
    //#output(void net.sourceforge.pebble.Configuration()): this.daoFactory.blogEntryDAO.__Tag
    //#output(void net.sourceforge.pebble.Configuration()): new FileCategoryDAO(FileDAOFactory#3) num objects
    //#output(void net.sourceforge.pebble.Configuration()): this.daoFactory.categoryDAO.__Tag
    //#output(void net.sourceforge.pebble.Configuration()): this.daoFactory.categoryDAO.jaxbContext
    //#output(void net.sourceforge.pebble.Configuration()): new FileDAOFactory(Configuration#1) num objects
    //#output(void net.sourceforge.pebble.Configuration()): this.daoFactory.__Tag
    //#output(void net.sourceforge.pebble.Configuration()): this.daoFactory.blogEntryDAO
    //#output(void net.sourceforge.pebble.Configuration()): this.daoFactory.categoryDAO
    //#output(void net.sourceforge.pebble.Configuration()): this.daoFactory.refererFilterDAO
    //#output(void net.sourceforge.pebble.Configuration()): this.daoFactory.staticPageDAO
    //#output(void net.sourceforge.pebble.Configuration()): new FileRefererFilterDAO(FileDAOFactory#4) num objects
    //#output(void net.sourceforge.pebble.Configuration()): this.daoFactory.refererFilterDAO.__Tag
    //#output(void net.sourceforge.pebble.Configuration()): new FileStaticPageDAO(FileDAOFactory#2) num objects
    //#output(void net.sourceforge.pebble.Configuration()): this.daoFactory.staticPageDAO.__Tag
    //#output(void net.sourceforge.pebble.Configuration()): this.daoFactory.staticPageDAO.jaxbContext
    //#output(void net.sourceforge.pebble.Configuration()): this.daoFactory
    //#output(void net.sourceforge.pebble.Configuration()): this.dataDirectory
    //#output(void net.sourceforge.pebble.Configuration()): this.fileUploadQuota
    //#output(void net.sourceforge.pebble.Configuration()): this.fileUploadSize
    //#output(void net.sourceforge.pebble.Configuration()): this.multiBlog
    //#output(void net.sourceforge.pebble.Configuration()): this.smtpHost
    //#output(void net.sourceforge.pebble.Configuration()): this.userThemesEnabled
    //#output(void net.sourceforge.pebble.Configuration()): this.virtualHostingEnabled
    //#new obj(void net.sourceforge.pebble.Configuration()): new FileBlogEntryDAO(FileDAOFactory#1)
    //#new obj(void net.sourceforge.pebble.Configuration()): new FileCategoryDAO(FileDAOFactory#3)
    //#new obj(void net.sourceforge.pebble.Configuration()): new FileDAOFactory(Configuration#1)
    //#new obj(void net.sourceforge.pebble.Configuration()): new FileRefererFilterDAO(FileDAOFactory#4)
    //#new obj(void net.sourceforge.pebble.Configuration()): new FileStaticPageDAO(FileDAOFactory#2)
    //#post(void net.sourceforge.pebble.Configuration()): this.daoFactory == &new FileDAOFactory(Configuration#1)
    //#post(void net.sourceforge.pebble.Configuration()): this.dataDirectory == &"${user.home}.pebble"
    //#post(void net.sourceforge.pebble.Configuration()): this.fileUploadQuota == -1
    //#post(void net.sourceforge.pebble.Configuration()): this.fileUploadSize == 2_048
    //#post(void net.sourceforge.pebble.Configuration()): this.multiBlog == 0
    //#post(void net.sourceforge.pebble.Configuration()): this.virtualHostingEnabled == 0
    //#post(void net.sourceforge.pebble.Configuration()): this.smtpHost == &"java:comp.env.mail.Session"
    //#post(void net.sourceforge.pebble.Configuration()): this.userThemesEnabled == 1
    //#post(void net.sourceforge.pebble.Configuration()): new FileBlogEntryDAO(FileDAOFactory#1) num objects == 1
    //#post(void net.sourceforge.pebble.Configuration()): new FileCategoryDAO(FileDAOFactory#3) num objects == 1
    //#post(void net.sourceforge.pebble.Configuration()): new FileDAOFactory(Configuration#1) num objects == 1
    //#post(void net.sourceforge.pebble.Configuration()): new FileRefererFilterDAO(FileDAOFactory#4) num objects == 1
    //#post(void net.sourceforge.pebble.Configuration()): new FileStaticPageDAO(FileDAOFactory#2) num objects == 1
    //#post(void net.sourceforge.pebble.Configuration()): this.daoFactory.blogEntryDAO.__Tag == net/sourceforge/pebble/dao/file/FileBlogEntryDAO
    //#post(void net.sourceforge.pebble.Configuration()): this.daoFactory.categoryDAO.__Tag == net/sourceforge/pebble/dao/file/FileCategoryDAO
    //#post(void net.sourceforge.pebble.Configuration()): possibly_updated(this.daoFactory.categoryDAO.jaxbContext)
    //#post(void net.sourceforge.pebble.Configuration()): this.daoFactory.__Tag == net/sourceforge/pebble/dao/file/FileDAOFactory
    //#post(void net.sourceforge.pebble.Configuration()): this.daoFactory.blogEntryDAO == &new FileBlogEntryDAO(FileDAOFactory#1)
    //#post(void net.sourceforge.pebble.Configuration()): this.daoFactory.categoryDAO == &new FileCategoryDAO(FileDAOFactory#3)
    //#post(void net.sourceforge.pebble.Configuration()): this.daoFactory.refererFilterDAO == &new FileRefererFilterDAO(FileDAOFactory#4)
    //#post(void net.sourceforge.pebble.Configuration()): this.daoFactory.staticPageDAO == &new FileStaticPageDAO(FileDAOFactory#2)
    //#post(void net.sourceforge.pebble.Configuration()): this.daoFactory.refererFilterDAO.__Tag == net/sourceforge/pebble/dao/file/FileRefererFilterDAO
    //#post(void net.sourceforge.pebble.Configuration()): this.daoFactory.staticPageDAO.__Tag == net/sourceforge/pebble/dao/file/FileStaticPageDAO
    //#post(void net.sourceforge.pebble.Configuration()): possibly_updated(this.daoFactory.staticPageDAO.jaxbContext)
    //#unanalyzed(void net.sourceforge.pebble.Configuration()): Effects-of-calling:net.sourceforge.pebble.dao.DAOFactory
    //#unanalyzed(void net.sourceforge.pebble.Configuration()): Effects-of-calling:java.lang.Object:getClass
    //#unanalyzed(void net.sourceforge.pebble.Configuration()): Effects-of-calling:java.lang.Class:getPackage
    //#unanalyzed(void net.sourceforge.pebble.Configuration()): Effects-of-calling:java.lang.Package:getName
    //#unanalyzed(void net.sourceforge.pebble.Configuration()): Effects-of-calling:javax.xml.bind.JAXBContext:newInstance
    //#unanalyzed(void net.sourceforge.pebble.Configuration()): Effects-of-calling:java.lang.Exception:printStackTrace
  }
    //#configuration.java:63: end of method: void net.sourceforge.pebble.Configuration.net.sourceforge.pebble.Configuration()

  public String getUrl() {
    return url;
    //#configuration.java:66: method: String net.sourceforge.pebble.Configuration.getUrl()
    //#input(String getUrl()): this
    //#input(String getUrl()): this.url
    //#output(String getUrl()): return_value
    //#pre[2] (String getUrl()): init'ed(this.url)
    //#post(String getUrl()): return_value == this.url
    //#post(String getUrl()): init'ed(return_value)
    //#configuration.java:66: end of method: String net.sourceforge.pebble.Configuration.getUrl()
  }

  public void setUrl(String s) {
    this.url = s;
    //#configuration.java:70: method: void net.sourceforge.pebble.Configuration.setUrl(String)
    //#input(void setUrl(String)): s
    //#input(void setUrl(String)): this
    //#output(void setUrl(String)): this.url
    //#post(void setUrl(String)): init'ed(this.url)
    //#test_vector(void setUrl(String)): s: Addr_Set{null}, Inverse{null}
    //#test_vector(void setUrl(String)): java.lang.String:endsWith(...)@72: {1}, {0}
    //#test_vector(void setUrl(String)): java.lang.String:length(...)@72: {0}, {1..4_294_967_295}

    if (url != null && !(url.length() == 0) && !url.endsWith("/")) {
      url += "/";
    }
  }
    //#configuration.java:75: end of method: void net.sourceforge.pebble.Configuration.setUrl(String)

  public String getDomainName() {
    // and set the domain name
    String url = PebbleContext.getInstance().getConfiguration().getUrl();
    //#configuration.java:79: method: String net.sourceforge.pebble.Configuration.getDomainName()
    //#configuration.java:79: Warning: method not available
    //#    -- call on PebbleContext net.sourceforge.pebble.PebbleContext:getInstance()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.Configuration
    //#    method: String getDomainName()
    //#    unanalyzed callee: PebbleContext net.sourceforge.pebble.PebbleContext:getInstance()
    //#configuration.java:79: Warning: method not available
    //#    -- call on Configuration net.sourceforge.pebble.PebbleContext:getConfiguration()
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.Configuration
    //#    method: String getDomainName()
    //#    unanalyzed callee: Configuration net.sourceforge.pebble.PebbleContext:getConfiguration()
    //#input(String getDomainName()): __Descendant_Table[net/sourceforge/pebble/Configuration]
    //#input(String getDomainName()): __Descendant_Table[others]
    //#input(String getDomainName()): __Dispatch_Table.getUrl()Ljava/lang/String;
    //#output(String getDomainName()): return_value
    //#presumption(String getDomainName()): java.lang.String:indexOf(...)@80 <= 4_294_967_292
    //#presumption(String getDomainName()): net.sourceforge.pebble.PebbleContext:getConfiguration(...).__Tag@79 == net/sourceforge/pebble/Configuration
    //#presumption(String getDomainName()): net.sourceforge.pebble.PebbleContext:getConfiguration(...).url@79 != null
    //#presumption(String getDomainName()): net.sourceforge.pebble.PebbleContext:getConfiguration(...)@79 != null
    //#presumption(String getDomainName()): net.sourceforge.pebble.PebbleContext:getInstance(...)@79 != null
    //#post(String getDomainName()): return_value != null
    //#test_vector(String getDomainName()): java.lang.String:indexOf(...)@85: {-2_147_483_648..-1}, {0..4_294_967_295}
    int index = url.indexOf("://");
    String domainName = url.substring(index+3);
    index = domainName.indexOf("/");
    domainName = domainName.substring(0, index);

    if (domainName.indexOf(":") > -1) {
      // the domain name still has a port number so remove it
      domainName = domainName.substring(0, domainName.indexOf(":"));
    }

    return domainName;
    //#configuration.java:90: end of method: String net.sourceforge.pebble.Configuration.getDomainName()
  }

  public String getSecureUrl() {
    if (secureUrl != null && secureUrl.length() > 0) {
    //#configuration.java:94: method: String net.sourceforge.pebble.Configuration.getSecureUrl()
    //#input(String getSecureUrl()): this
    //#input(String getSecureUrl()): this.secureUrl
    //#input(String getSecureUrl()): this.url
    //#output(String getSecureUrl()): return_value
    //#pre[2] (String getSecureUrl()): init'ed(this.secureUrl)
    //#pre[3] (String getSecureUrl()): (soft) init'ed(this.url)
    //#post(String getSecureUrl()): return_value == One-of{this.secureUrl, this.url}
    //#post(String getSecureUrl()): (soft) init'ed(return_value)
    //#test_vector(String getSecureUrl()): this.secureUrl: Addr_Set{null}, Inverse{null}
    //#test_vector(String getSecureUrl()): java.lang.String:length(...)@94: {0}, {1..4_294_967_295}
      return secureUrl;
    } else {
      return url;
    //#configuration.java:97: end of method: String net.sourceforge.pebble.Configuration.getSecureUrl()
    }
  }

  public void setSecureUrl(String s) {
    this.secureUrl = s;
    //#configuration.java:102: method: void net.sourceforge.pebble.Configuration.setSecureUrl(String)
    //#input(void setSecureUrl(String)): s
    //#input(void setSecureUrl(String)): this
    //#output(void setSecureUrl(String)): this.secureUrl
    //#post(void setSecureUrl(String)): init'ed(this.secureUrl)
    //#test_vector(void setSecureUrl(String)): s: Addr_Set{null}, Inverse{null}
    //#test_vector(void setSecureUrl(String)): java.lang.String:endsWith(...)@104: {1}, {0}
    //#test_vector(void setSecureUrl(String)): java.lang.String:length(...)@104: {0}, {1..4_294_967_295}

    if (secureUrl != null && !(secureUrl.length() == 0) && !secureUrl.endsWith("/")) {
      secureUrl += "/";
    }
  }
    //#configuration.java:107: end of method: void net.sourceforge.pebble.Configuration.setSecureUrl(String)

  public String getSmtpHost() {
    return smtpHost;
    //#configuration.java:110: method: String net.sourceforge.pebble.Configuration.getSmtpHost()
    //#input(String getSmtpHost()): this
    //#input(String getSmtpHost()): this.smtpHost
    //#output(String getSmtpHost()): return_value
    //#pre[2] (String getSmtpHost()): init'ed(this.smtpHost)
    //#post(String getSmtpHost()): return_value == this.smtpHost
    //#post(String getSmtpHost()): init'ed(return_value)
    //#configuration.java:110: end of method: String net.sourceforge.pebble.Configuration.getSmtpHost()
  }

  public void setSmtpHost(String smtpHost) {
    this.smtpHost = smtpHost;
    //#configuration.java:114: method: void net.sourceforge.pebble.Configuration.setSmtpHost(String)
    //#input(void setSmtpHost(String)): smtpHost
    //#input(void setSmtpHost(String)): this
    //#output(void setSmtpHost(String)): this.smtpHost
    //#post(void setSmtpHost(String)): this.smtpHost == smtpHost
    //#post(void setSmtpHost(String)): init'ed(this.smtpHost)
  }
    //#configuration.java:115: end of method: void net.sourceforge.pebble.Configuration.setSmtpHost(String)

  public long getFileUploadSize() {
    return fileUploadSize;
    //#configuration.java:118: method: long net.sourceforge.pebble.Configuration.getFileUploadSize()
    //#input(long getFileUploadSize()): this
    //#input(long getFileUploadSize()): this.fileUploadSize
    //#output(long getFileUploadSize()): return_value
    //#pre[2] (long getFileUploadSize()): init'ed(this.fileUploadSize)
    //#post(long getFileUploadSize()): return_value == this.fileUploadSize
    //#post(long getFileUploadSize()): init'ed(return_value)
    //#configuration.java:118: end of method: long net.sourceforge.pebble.Configuration.getFileUploadSize()
  }

  public void setFileUploadSize(long fileUploadSize) {
    this.fileUploadSize = fileUploadSize;
    //#configuration.java:122: method: void net.sourceforge.pebble.Configuration.setFileUploadSize(long)
    //#input(void setFileUploadSize(long)): fileUploadSize
    //#input(void setFileUploadSize(long)): this
    //#output(void setFileUploadSize(long)): this.fileUploadSize
    //#post(void setFileUploadSize(long)): this.fileUploadSize == fileUploadSize
    //#post(void setFileUploadSize(long)): init'ed(this.fileUploadSize)
  }
    //#configuration.java:123: end of method: void net.sourceforge.pebble.Configuration.setFileUploadSize(long)

  public long getFileUploadQuota() {
    return fileUploadQuota;
    //#configuration.java:126: method: long net.sourceforge.pebble.Configuration.getFileUploadQuota()
    //#input(long getFileUploadQuota()): this
    //#input(long getFileUploadQuota()): this.fileUploadQuota
    //#output(long getFileUploadQuota()): return_value
    //#pre[2] (long getFileUploadQuota()): init'ed(this.fileUploadQuota)
    //#post(long getFileUploadQuota()): return_value == this.fileUploadQuota
    //#post(long getFileUploadQuota()): init'ed(return_value)
    //#configuration.java:126: end of method: long net.sourceforge.pebble.Configuration.getFileUploadQuota()
  }

  public void setFileUploadQuota(long fileUploadQuota) {
    this.fileUploadQuota = fileUploadQuota;
    //#configuration.java:130: method: void net.sourceforge.pebble.Configuration.setFileUploadQuota(long)
    //#input(void setFileUploadQuota(long)): fileUploadQuota
    //#input(void setFileUploadQuota(long)): this
    //#output(void setFileUploadQuota(long)): this.fileUploadQuota
    //#post(void setFileUploadQuota(long)): this.fileUploadQuota == fileUploadQuota
    //#post(void setFileUploadQuota(long)): init'ed(this.fileUploadQuota)
  }
    //#configuration.java:131: end of method: void net.sourceforge.pebble.Configuration.setFileUploadQuota(long)

  public DAOFactory getDaoFactory() {
    return daoFactory;
    //#configuration.java:134: method: DAOFactory net.sourceforge.pebble.Configuration.getDaoFactory()
    //#input(DAOFactory getDaoFactory()): this
    //#input(DAOFactory getDaoFactory()): this.daoFactory
    //#output(DAOFactory getDaoFactory()): return_value
    //#pre[2] (DAOFactory getDaoFactory()): init'ed(this.daoFactory)
    //#post(DAOFactory getDaoFactory()): return_value == this.daoFactory
    //#post(DAOFactory getDaoFactory()): init'ed(return_value)
    //#configuration.java:134: end of method: DAOFactory net.sourceforge.pebble.Configuration.getDaoFactory()
  }

  public void setDaoFactory(DAOFactory daoFactory) {
    this.daoFactory = daoFactory;
    //#configuration.java:138: method: void net.sourceforge.pebble.Configuration.setDaoFactory(DAOFactory)
    //#input(void setDaoFactory(DAOFactory)): daoFactory
    //#input(void setDaoFactory(DAOFactory)): this
    //#output(void setDaoFactory(DAOFactory)): this.daoFactory
    //#post(void setDaoFactory(DAOFactory)): this.daoFactory == daoFactory
    //#post(void setDaoFactory(DAOFactory)): init'ed(this.daoFactory)
  }
    //#configuration.java:139: end of method: void net.sourceforge.pebble.Configuration.setDaoFactory(DAOFactory)

  public String getDataDirectory() {
    return dataDirectory;
    //#configuration.java:142: method: String net.sourceforge.pebble.Configuration.getDataDirectory()
    //#input(String getDataDirectory()): this
    //#input(String getDataDirectory()): this.dataDirectory
    //#output(String getDataDirectory()): return_value
    //#pre[2] (String getDataDirectory()): init'ed(this.dataDirectory)
    //#post(String getDataDirectory()): return_value == this.dataDirectory
    //#post(String getDataDirectory()): init'ed(return_value)
    //#configuration.java:142: end of method: String net.sourceforge.pebble.Configuration.getDataDirectory()
  }

  public void setDataDirectory(String dataDirectory) {
    this.dataDirectory = evaluateDirectory(dataDirectory);
    //#configuration.java:146: method: void net.sourceforge.pebble.Configuration.setDataDirectory(String)
    //#input(void setDataDirectory(String)): dataDirectory
    //#input(void setDataDirectory(String)): log
    //#input(void setDataDirectory(String)): this
    //#output(void setDataDirectory(String)): this.dataDirectory
    //#pre[1] (void setDataDirectory(String)): dataDirectory != null
    //#pre[2] (void setDataDirectory(String)): log != null
    //#post(void setDataDirectory(String)): this.dataDirectory != null
    //#unanalyzed(void setDataDirectory(String)): Effects-of-calling:java.lang.String:valueOf
    //#unanalyzed(void setDataDirectory(String)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void setDataDirectory(String)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void setDataDirectory(String)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void setDataDirectory(String)): Effects-of-calling:org.apache.commons.logging.Log:debug
    //#unanalyzed(void setDataDirectory(String)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(void setDataDirectory(String)): Effects-of-calling:java.lang.String:indexOf
    //#unanalyzed(void setDataDirectory(String)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void setDataDirectory(String)): Effects-of-calling:java.lang.System:getProperty
  }
    //#configuration.java:147: end of method: void net.sourceforge.pebble.Configuration.setDataDirectory(String)

  public boolean isMultiBlog() {
    return multiBlog;
    //#configuration.java:150: method: bool net.sourceforge.pebble.Configuration.isMultiBlog()
    //#input(bool isMultiBlog()): this
    //#input(bool isMultiBlog()): this.multiBlog
    //#output(bool isMultiBlog()): return_value
    //#pre[2] (bool isMultiBlog()): init'ed(this.multiBlog)
    //#post(bool isMultiBlog()): return_value == this.multiBlog
    //#post(bool isMultiBlog()): init'ed(return_value)
    //#configuration.java:150: end of method: bool net.sourceforge.pebble.Configuration.isMultiBlog()
  }

  public void setMultiBlog(boolean multiBlog) {
    this.multiBlog = multiBlog;
    //#configuration.java:154: method: void net.sourceforge.pebble.Configuration.setMultiBlog(bool)
    //#input(void setMultiBlog(bool)): multiBlog
    //#input(void setMultiBlog(bool)): this
    //#output(void setMultiBlog(bool)): this.multiBlog
    //#post(void setMultiBlog(bool)): this.multiBlog == multiBlog
    //#post(void setMultiBlog(bool)): init'ed(this.multiBlog)
  }
    //#configuration.java:155: end of method: void net.sourceforge.pebble.Configuration.setMultiBlog(bool)


  public boolean isVirtualHostingEnabled() {
    return virtualHostingEnabled;
    //#configuration.java:159: method: bool net.sourceforge.pebble.Configuration.isVirtualHostingEnabled()
    //#input(bool isVirtualHostingEnabled()): this
    //#input(bool isVirtualHostingEnabled()): this.virtualHostingEnabled
    //#output(bool isVirtualHostingEnabled()): return_value
    //#pre[2] (bool isVirtualHostingEnabled()): init'ed(this.virtualHostingEnabled)
    //#post(bool isVirtualHostingEnabled()): return_value == this.virtualHostingEnabled
    //#post(bool isVirtualHostingEnabled()): init'ed(return_value)
    //#configuration.java:159: end of method: bool net.sourceforge.pebble.Configuration.isVirtualHostingEnabled()
  }

  public void setVirtualHostingEnabled(boolean virtualHostingEnabled) {
    this.virtualHostingEnabled = virtualHostingEnabled;
    //#configuration.java:163: method: void net.sourceforge.pebble.Configuration.setVirtualHostingEnabled(bool)
    //#input(void setVirtualHostingEnabled(bool)): this
    //#input(void setVirtualHostingEnabled(bool)): virtualHostingEnabled
    //#output(void setVirtualHostingEnabled(bool)): this.virtualHostingEnabled
    //#post(void setVirtualHostingEnabled(bool)): this.virtualHostingEnabled == virtualHostingEnabled
    //#post(void setVirtualHostingEnabled(bool)): init'ed(this.virtualHostingEnabled)
  }
    //#configuration.java:164: end of method: void net.sourceforge.pebble.Configuration.setVirtualHostingEnabled(bool)

  public SecurityRealm getSecurityRealm() {
    return securityRealm;
    //#configuration.java:167: method: SecurityRealm net.sourceforge.pebble.Configuration.getSecurityRealm()
    //#input(SecurityRealm getSecurityRealm()): this
    //#input(SecurityRealm getSecurityRealm()): this.securityRealm
    //#output(SecurityRealm getSecurityRealm()): return_value
    //#pre[2] (SecurityRealm getSecurityRealm()): init'ed(this.securityRealm)
    //#post(SecurityRealm getSecurityRealm()): return_value == this.securityRealm
    //#post(SecurityRealm getSecurityRealm()): init'ed(return_value)
    //#configuration.java:167: end of method: SecurityRealm net.sourceforge.pebble.Configuration.getSecurityRealm()
  }

  public void setSecurityRealm(SecurityRealm securityRealm) {
    this.securityRealm = securityRealm;
    //#configuration.java:171: method: void net.sourceforge.pebble.Configuration.setSecurityRealm(SecurityRealm)
    //#input(void setSecurityRealm(SecurityRealm)): securityRealm
    //#input(void setSecurityRealm(SecurityRealm)): this
    //#output(void setSecurityRealm(SecurityRealm)): this.securityRealm
    //#post(void setSecurityRealm(SecurityRealm)): this.securityRealm == securityRealm
    //#post(void setSecurityRealm(SecurityRealm)): init'ed(this.securityRealm)
  }
    //#configuration.java:172: end of method: void net.sourceforge.pebble.Configuration.setSecurityRealm(SecurityRealm)

  /**
   * Replaces ${some.property} at the start of the string with the value
   * from System.getProperty(some.property).
   *
   * @param s   the String to transform
   * @return  a new String, or the same String if it doesn't start with a
   *          property name delimited by ${...}
   */
  private String evaluateDirectory(String s) {
    log.debug("Raw string is " + s);
    //#configuration.java:183: method: String net.sourceforge.pebble.Configuration.evaluateDirectory(String)
    //#configuration.java:183: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.Configuration
    //#    method: String evaluateDirectory(String)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
    //#input(String evaluateDirectory(String)): log
    //#input(String evaluateDirectory(String)): s
    //#output(String evaluateDirectory(String)): return_value
    //#pre[1] (String evaluateDirectory(String)): log != null
    //#pre[2] (String evaluateDirectory(String)): s != null
    //#presumption(String evaluateDirectory(String)): java.lang.String:indexOf(...)@185 <= 4_294_967_294
    //#post(String evaluateDirectory(String)): return_value != null
    //#test_vector(String evaluateDirectory(String)): java.lang.String:startsWith(...)@184: {0}, {1}
    if (s.startsWith("${")) {
      int index = s.indexOf("}");
      String propertyName = s.substring(2, index);
      String propertyValue = System.getProperty(propertyName);
      log.debug(propertyName + " = " + propertyValue);
    //#configuration.java:188: Warning: method not available
    //#    -- call on void org.apache.commons.logging.Log:debug(Object)
    //#    severity: INFORMATIONAL
    //#    class: net.sourceforge.pebble.Configuration
    //#    method: String evaluateDirectory(String)
    //#    unanalyzed callee: void org.apache.commons.logging.Log:debug(Object)
      return propertyValue + s.substring(index+1);
    } else {
      return s;
    //#configuration.java:191: end of method: String net.sourceforge.pebble.Configuration.evaluateDirectory(String)
    }
  }

  /**
   * Determines whether user themes are enabled.
   *
   * @return    true if user themes are enabled, false otherwise
   */
  public boolean isUserThemesEnabled() {
    return userThemesEnabled;
    //#configuration.java:201: method: bool net.sourceforge.pebble.Configuration.isUserThemesEnabled()
    //#input(bool isUserThemesEnabled()): this
    //#input(bool isUserThemesEnabled()): this.userThemesEnabled
    //#output(bool isUserThemesEnabled()): return_value
    //#pre[2] (bool isUserThemesEnabled()): init'ed(this.userThemesEnabled)
    //#post(bool isUserThemesEnabled()): return_value == this.userThemesEnabled
    //#post(bool isUserThemesEnabled()): init'ed(return_value)
    //#configuration.java:201: end of method: bool net.sourceforge.pebble.Configuration.isUserThemesEnabled()
  }

  /**
   * Sets whether user themes are enabled.
   *
   * @param userThemesEnabled   true if user themes are enabled,
   *                            false otherwise
   */
  public void setUserThemesEnabled(boolean userThemesEnabled) {
    this.userThemesEnabled = userThemesEnabled;
    //#configuration.java:211: method: void net.sourceforge.pebble.Configuration.setUserThemesEnabled(bool)
    //#input(void setUserThemesEnabled(bool)): this
    //#input(void setUserThemesEnabled(bool)): userThemesEnabled
    //#output(void setUserThemesEnabled(bool)): this.userThemesEnabled
    //#post(void setUserThemesEnabled(bool)): this.userThemesEnabled == userThemesEnabled
    //#post(void setUserThemesEnabled(bool)): init'ed(this.userThemesEnabled)
  }
    //#configuration.java:212: end of method: void net.sourceforge.pebble.Configuration.setUserThemesEnabled(bool)
}    //#configuration.java:: end of class: net.sourceforge.pebble.Configuration
