com.atlassian.crowd.manager.property
Class PropertyManagerGeneric

java.lang.Object
  extended by com.atlassian.crowd.manager.property.PropertyManagerGeneric
All Implemented Interfaces:
PropertyManager

public class PropertyManagerGeneric
extends java.lang.Object
implements PropertyManager


Constructor Summary
PropertyManagerGeneric(PropertyDAO propertyDAO)
           
 
Method Summary
 void generateDesEncryptionKey()
           
 java.lang.Integer getBuildNumber()
          This method returns the current build number for Crowd from the datastore.
 long getCacheTime()
          Returns the cache time in minutes
 int getCurrentLicenseResourceTotal()
           
 java.lang.String getDeploymentTitle()
           
 java.security.Key getDesEncryptionKey()
           
 java.lang.String getDomain()
          Will return the Domain property from the datastore or null if the domain has not been set.
 java.lang.String getNotificationEmail()
           
 java.lang.String getProperty(java.lang.String name)
           
protected  Property getPropertyObject(java.lang.String name)
           
 long getSessionTime()
           
 SMTPServer getSMTPServer()
           
 java.lang.String getSMTPTemplate()
          Deprecated. 
 java.lang.String getTokenSeed()
           
 java.lang.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 isSecureCookie()
          If true, the "Secure" flag is set on the SSO cookie
 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(java.lang.String name)
          Will attempt to remove a property from the datastore
 void setBuildNumber(java.lang.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(java.lang.String title)
           
 void setDomain(java.lang.String domain)
           
 void setGzipEnabled(boolean gzip)
           
 void setNotificationEmail(java.lang.String notificationEmail)
           
 void setProperty(java.lang.String name, java.lang.String value)
           
 void setSecureCookie(boolean secure)
           
 void setSessionTime(long time)
           
 void setSMTPServer(SMTPServer server)
           
 void setSMTPTemplate(java.lang.String template)
          Deprecated. 
 void setTokenSeed(java.lang.String seed)
           
 void setTrustedProxyServers(java.lang.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyManagerGeneric

public PropertyManagerGeneric(PropertyDAO propertyDAO)
Method Detail

getCacheTime

public long getCacheTime()
                  throws PropertyManagerException
Description copied from interface: PropertyManager
Returns the cache time in minutes

Specified by:
getCacheTime in interface PropertyManager
Returns:
caching time in minutes
Throws:
PropertyManagerException - if the property cannot be found

setCacheTime

public void setCacheTime(long cacheTime)
Description copied from interface: PropertyManager
Sets the cache time in minutes

Specified by:
setCacheTime in interface PropertyManager
Parameters:
cacheTime - the caching time in minutes

getTokenSeed

public java.lang.String getTokenSeed()
                              throws PropertyManagerException
Specified by:
getTokenSeed in interface PropertyManager
Throws:
PropertyManagerException

setTokenSeed

public void setTokenSeed(java.lang.String seed)
Specified by:
setTokenSeed in interface PropertyManager

getDeploymentTitle

public java.lang.String getDeploymentTitle()
                                    throws PropertyManagerException
Specified by:
getDeploymentTitle in interface PropertyManager
Throws:
PropertyManagerException

setDeploymentTitle

public void setDeploymentTitle(java.lang.String title)
Specified by:
setDeploymentTitle in interface PropertyManager

getDomain

public java.lang.String getDomain()
                           throws PropertyManagerException
Description copied from interface: PropertyManager
Will return the Domain property from the datastore or null if the domain has not been set.

Specified by:
getDomain in interface PropertyManager
Returns:
domain or null
Throws:
PropertyManagerException

setDomain

public void setDomain(java.lang.String domain)
Specified by:
setDomain in interface PropertyManager

isSecureCookie

public boolean isSecureCookie()
Description copied from interface: PropertyManager
If true, the "Secure" flag is set on the SSO cookie

Specified by:
isSecureCookie in interface PropertyManager
Returns:

setSecureCookie

public void setSecureCookie(boolean secure)
Specified by:
setSecureCookie in interface PropertyManager

setCacheEnabled

public void setCacheEnabled(boolean enabled)
Specified by:
setCacheEnabled in interface PropertyManager

isCacheEnabled

public boolean isCacheEnabled()
Specified by:
isCacheEnabled in interface PropertyManager

getSessionTime

public long getSessionTime()
Specified by:
getSessionTime in interface PropertyManager
Returns:
returns number of minutes the session is valid.

setSessionTime

public void setSessionTime(long time)
Specified by:
setSessionTime in interface PropertyManager

getSMTPServer

public SMTPServer getSMTPServer()
                         throws PropertyManagerException
Specified by:
getSMTPServer in interface PropertyManager
Throws:
PropertyManagerException

setSMTPServer

public void setSMTPServer(SMTPServer server)
Specified by:
setSMTPServer in interface PropertyManager

getDesEncryptionKey

public java.security.Key getDesEncryptionKey()
                                      throws PropertyManagerException
Specified by:
getDesEncryptionKey in interface PropertyManager
Throws:
PropertyManagerException

generateDesEncryptionKey

public void generateDesEncryptionKey()
                              throws PropertyManagerException
Specified by:
generateDesEncryptionKey in interface PropertyManager
Throws:
PropertyManagerException

setSMTPTemplate

@Deprecated
public void setSMTPTemplate(java.lang.String template)
Deprecated. 

Specified by:
setSMTPTemplate in interface PropertyManager

getSMTPTemplate

@Deprecated
public java.lang.String getSMTPTemplate()
                                 throws PropertyManagerException
Deprecated. 

Specified by:
getSMTPTemplate in interface PropertyManager
Throws:
PropertyManagerException

setCurrentLicenseResourceTotal

public void setCurrentLicenseResourceTotal(int total)
Specified by:
setCurrentLicenseResourceTotal in interface PropertyManager

getCurrentLicenseResourceTotal

public int getCurrentLicenseResourceTotal()
Specified by:
getCurrentLicenseResourceTotal in interface PropertyManager

setNotificationEmail

public void setNotificationEmail(java.lang.String notificationEmail)
Specified by:
setNotificationEmail in interface PropertyManager

getNotificationEmail

public java.lang.String getNotificationEmail()
                                      throws PropertyManagerException
Specified by:
getNotificationEmail in interface PropertyManager
Throws:
PropertyManagerException

isGzipEnabled

public boolean isGzipEnabled()
                      throws PropertyManagerException
Specified by:
isGzipEnabled in interface PropertyManager
Throws:
PropertyManagerException

setGzipEnabled

public void setGzipEnabled(boolean gzip)
Specified by:
setGzipEnabled in interface PropertyManager

getBuildNumber

public java.lang.Integer getBuildNumber()
                                 throws PropertyManagerException
Description copied from interface: PropertyManager
This method returns the current build number for Crowd from the datastore. This BuildNumber may not be the same as the build number in 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.

Specified by:
getBuildNumber in interface PropertyManager
Returns:
an Integer representing the current build number in the database.
Throws:
PropertyManagerException - if we fail to find the buildNumber

setBuildNumber

public void setBuildNumber(java.lang.Integer buildNumber)
Description copied from interface: PropertyManager
Will set the buildNumber for the current release of Crowd.

Specified by:
setBuildNumber in interface PropertyManager
Parameters:
buildNumber - the buildNumber to set in the database

getTrustedProxyServers

public java.lang.String getTrustedProxyServers()
                                        throws PropertyManagerException
Retrieves a String that contains a list of proxy servers we trust to correctly set the X-Forwarded-For flag. Internal format of this string is the responsibility of TrustedProxyManagerImpl.

Specified by:
getTrustedProxyServers in interface PropertyManager
Returns:
list of proxy servers we trust
Throws:
PropertyManagerException - If the list of proxy servers could not be found.

setTrustedProxyServers

public void setTrustedProxyServers(java.lang.String proxyServers)
Persists a String containing a list of proxy servers we trust to correctly set the X-Forwarded-For flag. Internal format of this string is the responsibility of TrustedProxyManagerImpl.

Specified by:
setTrustedProxyServers in interface PropertyManager
Throws:
org.springframework.dao.DataAccessException - If the list of proxy servers could not be saved.

isUsingDatabaseTokenStorage

public boolean isUsingDatabaseTokenStorage()
                                    throws PropertyManagerException
Description copied from interface: PropertyManager
Will return true if the Crowd instance is using database token storage for authentication Token's otherwise assume we are using in-memory

Specified by:
isUsingDatabaseTokenStorage in interface PropertyManager
Returns:
true if database token storage is being used
Throws:
PropertyManagerException

setUsingDatabaseTokenStorage

public void setUsingDatabaseTokenStorage(boolean usingMemoryTokenStorage)
Description copied from interface: PropertyManager
Will set a property to state that this crowd instance is using database token storage, otherwise assume we are using in-memory

Specified by:
setUsingDatabaseTokenStorage in interface PropertyManager
Parameters:
usingMemoryTokenStorage - true if you are switching to in-memory token storage

removeProperty

public void removeProperty(java.lang.String name)
Description copied from interface: PropertyManager
Will attempt to remove a property from the datastore

Specified by:
removeProperty in interface PropertyManager
Parameters:
name - the name of the Property, ie Property.DOMAIN

getPropertyObject

protected Property getPropertyObject(java.lang.String name)
                              throws ObjectNotFoundException
Throws:
ObjectNotFoundException

getProperty

public java.lang.String getProperty(java.lang.String name)
                             throws ObjectNotFoundException
Specified by:
getProperty in interface PropertyManager
Throws:
ObjectNotFoundException

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Specified by:
setProperty in interface PropertyManager


Copyright © 2010 Atlassian. All Rights Reserved.