public class PropertyManagerGeneric extends Object implements PropertyManager
Constructor and Description |
---|
PropertyManagerGeneric(PropertyDAO propertyDAO) |
Modifier and Type | Method and Description |
---|---|
void |
generateDesEncryptionKey()
Generates and stores a DES key for DES encoded passwords.
|
Integer |
getBuildNumber()
This method returns the current build number for Crowd from the datastore.
|
long |
getCacheTime()
Returns the cache time in minutes
|
int |
getCurrentLicenseResourceTotal() |
String |
getDeploymentTitle() |
Key |
getDesEncryptionKey() |
String |
getDomain()
Will return the Domain property from the datastore or null if the domain has
not been set.
|
String |
getNotificationEmail() |
String |
getProperty(String name)
Retrieves an arbitrary property by name.
|
protected Property |
getPropertyObject(String name) |
long |
getSessionTime() |
SMTPServer |
getSMTPServer() |
String |
getSMTPTemplate()
Deprecated.
|
String |
getTokenSeed() |
String |
getTrustedProxyServers()
Retrieves a String that contains a list of proxy servers we trust to correctly set the X-Forwarded-For flag.
|
boolean |
isCacheEnabled() |
boolean |
isGzipEnabled() |
boolean |
isIncludeIpAddressInValidationFactors()
Should the client IP address be included as a validation factor?
|
boolean |
isSecureCookie() |
boolean |
isUsingDatabaseTokenStorage()
Will return true if the Crowd instance is using database token storage for authentication
Token 's
otherwise assume we are using in-memory |
void |
removeProperty(String name)
Will attempt to remove a property from the datastore
|
void |
setBuildNumber(Integer buildNumber)
Will set the buildNumber for the current release of Crowd.
|
void |
setCacheEnabled(boolean enabled) |
void |
setCacheTime(long cacheTime)
Sets the cache time in minutes
|
void |
setCurrentLicenseResourceTotal(int total) |
void |
setDeploymentTitle(String title) |
void |
setDomain(String domain) |
void |
setGzipEnabled(boolean gzip) |
void |
setIncludeIpAddressInValidationFactors(boolean includeIpAddressInValidationFactors) |
void |
setNotificationEmail(String notificationEmail) |
void |
setProperty(String name,
String value)
Sets an arbitrary property.
|
void |
setSecureCookie(boolean secure) |
void |
setSessionTime(long time) |
void |
setSMTPServer(SMTPServer server) |
void |
setSMTPTemplate(String template)
Deprecated.
|
void |
setTokenSeed(String seed) |
void |
setTrustedProxyServers(String proxyServers)
Persists a String containing a list of proxy servers we trust to correctly set the X-Forwarded-For flag.
|
void |
setUsingDatabaseTokenStorage(boolean usingMemoryTokenStorage)
Will set a property to state that this crowd instance is using database token storage, otherwise assume we are using in-memory
|
public PropertyManagerGeneric(PropertyDAO propertyDAO)
public long getCacheTime() throws PropertyManagerException
PropertyManager
getCacheTime
in interface PropertyManager
PropertyManagerException
- if the property cannot be foundpublic void setCacheTime(long cacheTime)
PropertyManager
setCacheTime
in interface PropertyManager
cacheTime
- the caching time in minutespublic String getTokenSeed() throws PropertyManagerException
getTokenSeed
in interface PropertyManager
PropertyManagerException
- property does not exist.public void setTokenSeed(String seed)
setTokenSeed
in interface PropertyManager
seed
- token seed.public String getDeploymentTitle() throws PropertyManagerException
getDeploymentTitle
in interface PropertyManager
PropertyManagerException
- property does not exist.public void setDeploymentTitle(String title)
setDeploymentTitle
in interface PropertyManager
title
- deployment title.public String getDomain() throws PropertyManagerException
PropertyManager
getDomain
in interface PropertyManager
PropertyManagerException
- property does not exist.public void setDomain(String domain)
setDomain
in interface PropertyManager
domain
- SSO cookie domain.public boolean isSecureCookie()
isSecureCookie
in interface PropertyManager
true
if the "secure" flag should be set on the SSO cookie.public void setSecureCookie(boolean secure)
setSecureCookie
in interface PropertyManager
secure
- true
if the "secure" flag should be set on the SSO cookie.public void setCacheEnabled(boolean enabled)
setCacheEnabled
in interface PropertyManager
enabled
- true
if application authorisation caching should be used on the server-side.public boolean isCacheEnabled()
isCacheEnabled
in interface PropertyManager
true
if application authorisation caching is used on the server-side.public long getSessionTime()
getSessionTime
in interface PropertyManager
public void setSessionTime(long time)
setSessionTime
in interface PropertyManager
time
- number of minutes the session is valid.public SMTPServer getSMTPServer() throws PropertyManagerException
getSMTPServer
in interface PropertyManager
PropertyManagerException
- property does not exist.public void setSMTPServer(SMTPServer server)
setSMTPServer
in interface PropertyManager
server
- SMTP server config.public Key getDesEncryptionKey() throws PropertyManagerException
getDesEncryptionKey
in interface PropertyManager
PropertyManagerException
- property does not exist.public void generateDesEncryptionKey() throws PropertyManagerException
PropertyManager
generateDesEncryptionKey
in interface PropertyManager
PropertyManagerException
- DES algorithm does not exist.@Deprecated public void setSMTPTemplate(String template)
setSMTPTemplate
in interface PropertyManager
template
- mail template.@Deprecated public String getSMTPTemplate() throws PropertyManagerException
getSMTPTemplate
in interface PropertyManager
PropertyManagerException
- property does not exist.public void setCurrentLicenseResourceTotal(int total)
setCurrentLicenseResourceTotal
in interface PropertyManager
total
- license resource total.public int getCurrentLicenseResourceTotal()
getCurrentLicenseResourceTotal
in interface PropertyManager
public void setNotificationEmail(String notificationEmail)
setNotificationEmail
in interface PropertyManager
notificationEmail
- notification email.public String getNotificationEmail() throws PropertyManagerException
getNotificationEmail
in interface PropertyManager
PropertyManagerException
- property does not exist.public boolean isGzipEnabled() throws PropertyManagerException
isGzipEnabled
in interface PropertyManager
true
if GZip compression should be used.PropertyManagerException
- property does not exist.public void setGzipEnabled(boolean gzip)
setGzipEnabled
in interface PropertyManager
gzip
- true
if GZip compression should be used.public Integer getBuildNumber() throws PropertyManagerException
PropertyManager
BuildUtils.BUILD_NUMBER
since this number is for the
current release of Crowd, while the number in the database may still be set to a previous version if the UpgradeManager
has not been run.getBuildNumber
in interface PropertyManager
PropertyManagerException
- if we fail to find the buildNumberpublic void setBuildNumber(Integer buildNumber)
PropertyManager
setBuildNumber
in interface PropertyManager
buildNumber
- the buildNumber to set in the databasepublic String getTrustedProxyServers() throws PropertyManagerException
TrustedProxyManagerImpl
.getTrustedProxyServers
in interface PropertyManager
PropertyManagerException
- If the list of proxy servers could not be found.public void setTrustedProxyServers(String proxyServers)
TrustedProxyManagerImpl
.setTrustedProxyServers
in interface PropertyManager
proxyServers
- proxy servers.org.springframework.dao.DataAccessException
- If the list of proxy servers could not be saved.public boolean isUsingDatabaseTokenStorage() throws PropertyManagerException
PropertyManager
Token
's
otherwise assume we are using in-memoryisUsingDatabaseTokenStorage
in interface PropertyManager
PropertyManagerException
- property does not exist.public void setUsingDatabaseTokenStorage(boolean usingMemoryTokenStorage)
PropertyManager
setUsingDatabaseTokenStorage
in interface PropertyManager
usingMemoryTokenStorage
- true if you are switching to in-memory token storagepublic boolean isIncludeIpAddressInValidationFactors()
PropertyManager
isIncludeIpAddressInValidationFactors
in interface PropertyManager
public void setIncludeIpAddressInValidationFactors(boolean includeIpAddressInValidationFactors)
setIncludeIpAddressInValidationFactors
in interface PropertyManager
public void removeProperty(String name)
PropertyManager
removeProperty
in interface PropertyManager
name
- the name of the property.protected Property getPropertyObject(String name) throws ObjectNotFoundException
ObjectNotFoundException
public String getProperty(String name) throws ObjectNotFoundException
PropertyManager
getProperty
in interface PropertyManager
name
- name of property.ObjectNotFoundException
- property does not exist.public void setProperty(String name, String value)
PropertyManager
setProperty
in interface PropertyManager
name
- name of property.value
- value.Copyright © 2013 Atlassian. All Rights Reserved.