Class SiteSettings


public class SiteSettings extends Object
Provides site-wide settings.
AO Industries, Inc.
  • Constructor Details

  • Method Details

    • getInstance

      public static SiteSettings getInstance(ServletContext servletContext)
      Gets the proper settings instance as configured in the web.xml file.
    • getSkins

      public List<Skin> getSkins()
      Gets the unmodifiable list of skins supported by this site.

      The first one in the list will be used as the default skin, except if Text mode is determined as the default, then any skin named TextSkin.NAME will be the default if available.

    • getRootAoservConnectorUsername

      protected User.Name getRootAoservConnectorUsername()
      Gets the username for the root AoservConnector.
      See Also:
    • getRootAoservConnectorPassword

      protected String getRootAoservConnectorPassword()
      Gets the password for the root AoservConnector.
      See Also:
    • getRootAoservConnector

      public AoservConnector getRootAoservConnector() throws ConfigurationException
      Gets the root connector. Because this potentially has unrestricted privileges, this must be used at an absolute minimum for situations where a user isn't logged-in but access to the master is required, such as for sign up requests.
    • getBrand

      public Brand getBrand() throws IOException, SQLException
      Gets the Brand for this site. The returned instance has the permissions of the site's RootAoservConnector and should therefore be used carefully to not allow privilege escalation.
    • getLanguages

      public List<Skin.Language> getLanguages(ServletRequest req) throws IOException, SQLException
      Gets the unmodifiable list of languages supported by this site.

      The flags are obtained from

      Then they are scaled to a height of 24 pixels, rendered in gimp 2.

      The off version is created by filling with black, opacity 25% in gimp 2.

    • getExceptionShowError

      public boolean getExceptionShowError()
      Defaults to false.
    • getCanEditResources

      public boolean getCanEditResources()
      Determines if this site allows direct editing of resource bundles.