com.atlassian.crowd.manager.property
Interface PropertyManager

All Known Implementing Classes:
PropertyManagerGeneric

public interface PropertyManager


Method Summary
 void generateDesEncryptionKey()
           
 java.lang.Integer getBuildNumber()
          This method returns the current build number for Crowd from the datastore.
 long getCacheTime()
          Deprecated. since 1.0.2 All caching configuration has moved to the crowd-ehcache.xml
 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)
           
 long getSessionTime()
           
 SMTPServer getSMTPServer()
           
 java.lang.String getSMTPTemplate()
           
 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)
          Deprecated. since 1.0.2 All caching configuration has moved to the crowd-ehcache.xml
 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)
           
 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 usingDatabaseTokenStorage)
          Will set a property to state that this crowd instance is using database token storage, otherwise assume we are using in-memory
 

Method Detail

getCacheTime

long getCacheTime()
                  throws PropertyManagerException
Deprecated. since 1.0.2 All caching configuration has moved to the crowd-ehcache.xml

Returns the cache time in minutes

Returns:
caching time in minutes
Throws:
PropertyManagerException - if the property cannot be found

setCacheTime

void setCacheTime(long cacheTime)
Deprecated. since 1.0.2 All caching configuration has moved to the crowd-ehcache.xml

Sets the cache time in minutes

Parameters:
cacheTime - the caching time in minutes
Throws:
PropertyManagerException - if the property cannot be set

getTokenSeed

java.lang.String getTokenSeed()
                              throws PropertyManagerException
Throws:
PropertyManagerException

setTokenSeed

void setTokenSeed(java.lang.String seed)

getDeploymentTitle

java.lang.String getDeploymentTitle()
                                    throws PropertyManagerException
Throws:
PropertyManagerException

setDeploymentTitle

void setDeploymentTitle(java.lang.String title)

getDomain

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

Returns:
domain or null
Throws:
PropertyManagerException

setDomain

void setDomain(java.lang.String domain)

isSecureCookie

boolean isSecureCookie()
                       throws PropertyManagerException
If true, the "Secure" flag is set on the SSO cookie

Returns:
Throws:
PropertyManagerException

setSecureCookie

void setSecureCookie(boolean secure)

setCacheEnabled

void setCacheEnabled(boolean enabled)

isCacheEnabled

boolean isCacheEnabled()

getSessionTime

long getSessionTime()
Returns:
returns number of minutes the session is valid.

setSessionTime

void setSessionTime(long time)

getSMTPServer

SMTPServer getSMTPServer()
                         throws PropertyManagerException
Throws:
PropertyManagerException

setSMTPServer

void setSMTPServer(SMTPServer server)

getDesEncryptionKey

java.security.Key getDesEncryptionKey()
                                      throws PropertyManagerException
Throws:
PropertyManagerException

generateDesEncryptionKey

void generateDesEncryptionKey()
                              throws PropertyManagerException
Throws:
PropertyManagerException

setSMTPTemplate

void setSMTPTemplate(java.lang.String template)

getSMTPTemplate

java.lang.String getSMTPTemplate()
                                 throws PropertyManagerException
Throws:
PropertyManagerException

setCurrentLicenseResourceTotal

void setCurrentLicenseResourceTotal(int total)

getCurrentLicenseResourceTotal

int getCurrentLicenseResourceTotal()

setNotificationEmail

void setNotificationEmail(java.lang.String notificationEmail)

getNotificationEmail

java.lang.String getNotificationEmail()
                                      throws PropertyManagerException
Throws:
PropertyManagerException

isGzipEnabled

boolean isGzipEnabled()
                      throws PropertyManagerException
Throws:
PropertyManagerException

setGzipEnabled

void setGzipEnabled(boolean gzip)

getBuildNumber

java.lang.Integer getBuildNumber()
                                 throws PropertyManagerException
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.

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

setBuildNumber

void setBuildNumber(java.lang.Integer buildNumber)
Will set the buildNumber for the current release of Crowd.

Parameters:
buildNumber - the buildNumber to set in the database
Throws:
PropertyManagerException - if we fail to set the build number in the database.

getTrustedProxyServers

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.

Returns:
Throws:
PropertyManagerException - If the list of proxy servers could not be found.

setTrustedProxyServers

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.

Throws:
PropertyManagerException - If the list of proxy servers could not be saved.

isUsingDatabaseTokenStorage

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

Returns:
true if database token storage is being used
Throws:
PropertyManagerException

setUsingDatabaseTokenStorage

void setUsingDatabaseTokenStorage(boolean usingDatabaseTokenStorage)
Will set a property to state that this crowd instance is using database token storage, otherwise assume we are using in-memory

Parameters:
usingDatabaseTokenStorage - true if you are switching to in-memory token storage

removeProperty

void removeProperty(java.lang.String name)
Will attempt to remove a property from the datastore

Parameters:
name - the name of the Property, ie Property.DOMAIN

getProperty

java.lang.String getProperty(java.lang.String name)
                             throws ObjectNotFoundException
Throws:
ObjectNotFoundException

setProperty

void setProperty(java.lang.String name,
                 java.lang.String value)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.