Constructor and Description |
---|
Settings() |
Modifier and Type | Method and Description |
---|---|
void |
assignDefaults() |
protected List |
convertMapListToObjects(List maps,
Class targetClass) |
String |
getAntiSpamSecret()
A random token used for preventing spam in form submissions and comments.
|
Long |
getAppCreatedMillis() |
List<AssetPreprocessorConfig> |
getAssetPreprocessors() |
String |
getAuthorName()
Get the name of the author of the site
|
Boolean |
getBundleDebug()
True by default if in debug mode, false on production.
|
String |
getCdnUrl()
The base URL for CDN (Content Delivery Network) that will pass through to your site.
|
CloudStorageSettings |
getCloudStorage()
Configuration for integration with a cloud file storage, such as S3.
|
CorsSettings |
getCors()
Cross-Origin Request configuration -- allow endpoints to respond to cross-origin requests.
|
CustomSettings |
getCustom()
A hashtable of arbitrary user defined settings.
|
DbConfig |
getDatabase()
The database configuration
|
String |
getDataDirectory()
Where all data stored to flat-file by the Controllers and Persisters will actually live in the
file system.
|
Boolean |
getDebug()
Run in debug mode.
|
String |
getDefaultTitle()
The default title of your site, will be used in the HTML title tag in the default base template
if no other title for a page is defined.
|
Boolean |
getDevMode()
Usually set by the command line options, rather than the stallion.toml file.
|
Boolean |
getDisableFormSubmissions()
If true, the default form submission endpoint will be disabled.
|
EmailSettings |
getEmail()
Email configuration for Stallion sending emails via SMTP
|
Boolean |
getEmailErrors()
If true, exceptions will emailed to the admin defined in the email configuration.
|
String |
getEnv()
The current environment name, set by command line options.
|
Long |
getFilterCacheSize() |
List<ContentFolder> |
getFolders()
ContentFolders are folders in your local site directory that are to be registered with the data access controller.
|
List<String[]> |
getHealthCheckEndpoints()
A list of paths that will be checked for a 200 response when the health check
is run.
|
String |
getHealthCheckSecret()
A secret token that must be passed in when accessing the health endpoints.
|
String |
getIpHeaderName()
If there is a proxy server in front of Stallion, that proxy server will set
the IP address of the original requester and put it in a header.
|
Boolean |
getLocalMode()
True if this is a developer running locally, false if this is running deployed on a server.
|
String |
getLogFile()
The path to the log file when file-based logging is on.
|
String |
getLogLevel()
Set the log level - INFO, FINE, FINER, FINEST
|
Boolean |
getLogToConsole()
If true, log to the console instead of file.
|
Boolean |
getLogToFile() |
String |
getMetaDescription()
The default meta tag description value.
|
String |
getMetaGenerator()
The meta tag value for generator.
|
String |
getNginxClientMaxBodySize() |
String |
getNginxProxyReadTimeout() |
Integer |
getNodeNumber()
For deployed sites using stablehand, which node this is.
|
OAuthSettings |
getoAuth()
Configuration for enabling users to give out OAuth access
|
Map<String,String> |
getPackageLogLevels() |
String |
getPageTemplate()
The default template to use to render pages
|
Integer |
getPort()
The port the server should run on.
|
Map<String,String> |
getRedirects()
A map of 301 redirects in the form of original URL or path to destination URL or path.
|
List<Map.Entry<Pattern,String>> |
getRewriteCompiledPatterns() |
List<String[]> |
getRewritePatterns()
A list of arrays, each array has two values, a source regular expression and a destination path.
|
Map<String,String> |
getRewrites()
A mapping of internal rewrites, from source path to destintion path.
|
List<RouteDefinition> |
getRoutes() |
String |
getSchemeForSecondaryDomain(String domain)
Gets the scheme (https or http) for a given secondary domain
|
SecondaryDomain |
getSecondaryDomainByDomain(String domain) |
List<SecondaryDomain> |
getSecondaryDomains()
A list of domains that content is also accesible at, and their mapping
to URL paths.
|
SecretsSettings |
getSecrets() |
String |
getSiteName()
The name of your site, accessible in templates via {{ site.name }}
|
String |
getSiteUrl()
The base URL at which the site lives.
|
String |
getSiteUrlScheme()
Get siteUrl scheme
|
StrictnessLevel |
getStrictnessLevel() |
StyleSettings |
getStyles()
Default CSS styles and colors that will be used in the default templates
for log in, password reset emails, etc.
|
String |
getSupportEmail()
Included in the templates for error pages.
|
String |
getTargetFolder()
The root site folder that contains the conf directory and the conf/stallion.toml files.
|
String |
getTimeZone()
Should be a time zone parseable by ZoneId.of() Used by the DateUtils.renderLocalDate() method when there
is no time zone for the particular user.
|
ZoneId |
getTimeZoneId() |
UserSettings |
getUsers()
The user configuration
|
String |
getxFrameOptions() |
static Settings |
init(String env,
CommandOptionsBase options) |
static Settings |
instance() |
static boolean |
isNull() |
boolean |
isStrict()
In strict mode, more errors will be exceptions that stop all processing.
|
Settings |
setAntiSpamSecret(String antiSpamSecret) |
Settings |
setAppCreatedMillis(Long appCreatedMillis) |
Settings |
setAssetPreprocessors(List assetPreProcessors) |
void |
setAuthorName(String authorName) |
void |
setBundleDebug(Boolean bundleDebug) |
void |
setCdnUrl(String cdnUrl) |
void |
setCloudStorage(CloudStorageSettings cloudStorage) |
Settings |
setCors(CorsSettings cors) |
void |
setCustom(CustomSettings custom) |
void |
setDatabase(DbConfig database) |
void |
setDataDirectory(String dataDirectory) |
void |
setDebug(Boolean debug) |
void |
setDefaultTitle(String defaultTitle) |
void |
setDevMode(Boolean devMode) |
Settings |
setDisableFormSubmissions(Boolean disableFormSubmissions) |
void |
setEmail(EmailSettings email) |
void |
setEmailErrors(Boolean emailErrors) |
void |
setEnv(String env) |
Settings |
setFilterCacheSize(Long filterCacheSize) |
void |
setFolders(List<ContentFolder> folders) |
void |
setHealthCheckEndpoints(List<String[]> healthCheckEndpoints) |
void |
setHealthCheckSecret(String healthCheckSecret) |
Settings |
setIpHeaderName(String ipHeaderName) |
void |
setLocalMode(Boolean localMode) |
void |
setLogFile(String logFile) |
void |
setLogLevel(String logLevel) |
void |
setLogToConsole(Boolean logToConsole) |
void |
setLogToFile(Boolean logToFile) |
void |
setMetaDescription(String metaDescription) |
void |
setMetaGenerator(String metaGenerator) |
Settings |
setNginxClientMaxBodySize(String nginxClientMaxBodySize) |
Settings |
setNginxProxyReadTimeout(String nginxProxyReadTimeout) |
Settings |
setNodeNumber(Integer nodeNumber) |
Settings |
setoAuth(OAuthSettings oAuth) |
void |
setPackageLogLevels(Map<String,String> packageLogLevels) |
void |
setPageTemplate(String pageTemplate) |
void |
setPort(Integer port) |
void |
setRedirects(Map<String,String> redirects) |
void |
setRewriteCompiledPatterns(List<Map.Entry<Pattern,String>> rewriteCompiledPatterns) |
void |
setRewritePatterns(List<String[]> rewritePatterns) |
void |
setRewrites(Map<String,String> rewrites) |
void |
setRoutes(List<RouteDefinition> routes) |
Settings |
setSecondaryDomains(List<SecondaryDomain> secondaryDomains) |
Settings |
setSecrets(SecretsSettings secrets) |
void |
setSiteName(String siteName) |
void |
setSiteUrl(String siteUrl) |
void |
setStrictnessLevel(StrictnessLevel strictnessLevel) |
void |
setStyles(StyleSettings style) |
Settings |
setSupportEmail(String supportEmail) |
void |
setTargetFolder(String targetFolder) |
void |
setTimeZone(String timeZone) |
void |
setTimeZoneId(ZoneId timeZoneId) |
void |
setUsers(UserSettings users) |
Settings |
setxFrameOptions(String xFrameOptions) |
static void |
shutdown() |
public Settings()
public static boolean isNull()
public static void shutdown()
public static Settings init(String env, CommandOptionsBase options)
public void assignDefaults()
assignDefaults
in interface ISettings
public String getSchemeForSecondaryDomain(String domain)
public String getSiteUrlScheme()
public SecondaryDomain getSecondaryDomainByDomain(String domain)
public boolean isStrict()
public List<ContentFolder> getFolders()
public void setFolders(List<ContentFolder> folders)
public DbConfig getDatabase()
public void setDatabase(DbConfig database)
public UserSettings getUsers()
public void setUsers(UserSettings users)
public EmailSettings getEmail()
public void setEmail(EmailSettings email)
public CorsSettings getCors()
public Settings setCors(CorsSettings cors)
public String getDataDirectory()
public void setDataDirectory(String dataDirectory)
public CustomSettings getCustom()
public void setCustom(CustomSettings custom)
public String getPageTemplate()
public void setPageTemplate(String pageTemplate)
public String getCdnUrl()
public String getSiteUrl()
public void setSiteUrl(String siteUrl)
public List<RouteDefinition> getRoutes()
public void setRoutes(List<RouteDefinition> routes)
public Boolean getDebug()
public String getTimeZone()
public void setTimeZone(String timeZone)
public ZoneId getTimeZoneId()
public void setTimeZoneId(ZoneId timeZoneId)
public Boolean getDevMode()
public void setDevMode(Boolean devMode)
public String getLogLevel()
public void setLogLevel(String logLevel)
public Map<String,String> getPackageLogLevels()
public void setPackageLogLevels(Map<String,String> packageLogLevels)
public Boolean getBundleDebug()
public void setBundleDebug(Boolean bundleDebug)
public String getSiteName()
public void setSiteName(String siteName)
public String getDefaultTitle()
public void setDefaultTitle(String defaultTitle)
public String getMetaDescription()
public void setMetaDescription(String metaDescription)
public String getAuthorName()
public void setAuthorName(String authorName)
public Integer getPort()
public String getTargetFolder()
public void setTargetFolder(String targetFolder)
public StrictnessLevel getStrictnessLevel()
public void setStrictnessLevel(StrictnessLevel strictnessLevel)
public List<String[]> getHealthCheckEndpoints()
public void setHealthCheckEndpoints(List<String[]> healthCheckEndpoints)
public String getHealthCheckSecret()
public void setHealthCheckSecret(String healthCheckSecret)
public Boolean getEmailErrors()
public void setEmailErrors(Boolean emailErrors)
public Map<String,String> getRedirects()
public void setRedirects(Map<String,String> redirects)
public String getMetaGenerator()
public void setMetaGenerator(String metaGenerator)
public String getLogFile()
public void setLogFile(String logFile)
public Boolean getLogToConsole()
public void setLogToConsole(Boolean logToConsole)
public Boolean getLogToFile()
public void setLogToFile(Boolean logToFile)
public Boolean getLocalMode()
public void setLocalMode(Boolean localMode)
public Map<String,String> getRewrites()
public void setRewrites(Map<String,String> rewrites)
public List<SecondaryDomain> getSecondaryDomains()
public Settings setSecondaryDomains(List<SecondaryDomain> secondaryDomains)
public List<Map.Entry<Pattern,String>> getRewriteCompiledPatterns()
public void setRewriteCompiledPatterns(List<Map.Entry<Pattern,String>> rewriteCompiledPatterns)
public List<String[]> getRewritePatterns()
public void setRewritePatterns(List<String[]> rewritePatterns)
public CloudStorageSettings getCloudStorage()
public void setCloudStorage(CloudStorageSettings cloudStorage)
public StyleSettings getStyles()
public void setStyles(StyleSettings style)
public Integer getNodeNumber()
public Settings setNodeNumber(Integer nodeNumber)
public String getAntiSpamSecret()
public Settings setAntiSpamSecret(String antiSpamSecret)
public Boolean getDisableFormSubmissions()
public Settings setDisableFormSubmissions(Boolean disableFormSubmissions)
public String getIpHeaderName()
public Settings setIpHeaderName(String ipHeaderName)
public OAuthSettings getoAuth()
public Settings setoAuth(OAuthSettings oAuth)
public Long getFilterCacheSize()
public Settings setFilterCacheSize(Long filterCacheSize)
public SecretsSettings getSecrets()
public Settings setSecrets(SecretsSettings secrets)
public String getSupportEmail()
public Settings setSupportEmail(String supportEmail)
public Long getAppCreatedMillis()
public Settings setAppCreatedMillis(Long appCreatedMillis)
public List<AssetPreprocessorConfig> getAssetPreprocessors()
public Settings setAssetPreprocessors(List assetPreProcessors)
protected List convertMapListToObjects(List maps, Class targetClass)
public String getxFrameOptions()
public Settings setxFrameOptions(String xFrameOptions)
public String getNginxClientMaxBodySize()
public Settings setNginxClientMaxBodySize(String nginxClientMaxBodySize)
public String getNginxProxyReadTimeout()
public Settings setNginxProxyReadTimeout(String nginxProxyReadTimeout)
Copyright © 2016. All rights reserved.