@Transactional public class PropertyManagerGeneric extends Object implements InternalPropertyManager
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SCHEDULED_BACKUP_HOUR |
static int |
DEFAULT_SCHEDULED_BACKUP_MINUTE |
static String |
LOGO_IMAGE_KEY |
| Constructor and Description |
|---|
PropertyManagerGeneric(PropertyDAO propertyDAO,
com.atlassian.event.api.EventPublisher eventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
void |
generateDesEncryptionKey()
Generates and stores a DES key for DES encoded passwords.
|
AuditLogConfiguration |
getAuditLogConfiguration()
Retrieves the audit log configuration
|
BackupConfiguration |
getBackupConfiguration() |
URI |
getBaseUrl() |
boolean |
getBoolean(String property,
boolean defaultValue)
Gets a boolean property.
|
Integer |
getBuildNumber()
This method returns the current build number for Crowd from the datastore.
|
CookieConfiguration |
getCookieConfiguration() |
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.
|
int |
getInt(String property,
int defaultValue)
Gets an integer property.
|
int |
getIntOrThrowIllegalArgumentException(String property,
int defaultValue) |
Optional<ImageInfo> |
getLogoImage() |
Optional<LookAndFeelConfiguration> |
getLookAndFeelConfiguration() |
String |
getNotificationEmail() |
List<String> |
getNotificationEmails() |
Optional<String> |
getOptionalProperty(String name)
Retrieves an arbitrary property by name.
|
Optional<Long> |
getPrivateKeyCertificatePairToSign() |
String |
getProperty(String name)
Retrieves an arbitrary property by name.
|
protected Property |
getPropertyObject(String name) |
CrowdSpecificRememberMeSettings |
getRememberMeConfiguration()
Retrieves remember me configuration
|
long |
getSessionTime() |
SMTPServer |
getSMTPServer() |
String |
getSMTPTemplate()
Deprecated.
|
String |
getString(String property,
String defaultValue)
Gets a string property.
|
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 |
isUseWebAvatars()
Should public services be used for user avatars?
|
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 |
removeLookAndFeelConfiguration()
Removes Look and Feel configuration
|
void |
removeProperty(String name)
Will attempt to remove a property from the datastore
|
void |
saveBackupConfiguration(BackupConfiguration config)
Saves backup configuration
|
void |
setAuditLogConfiguration(AuditLogConfiguration newConfiguration)
Persists the audit log configuration
|
void |
setBaseUrl(URI url)
Sets the base URL for this Crowd application instance
|
void |
setBuildNumber(Integer buildNumber)
Will set the buildNumber for the current release of Crowd.
|
void |
setCacheEnabled(boolean enabled) |
void |
setCookieConfiguration(CookieConfiguration cookieConfiguration)
Updates the configuration of Crowd's cookie-based SSO
|
void |
setCurrentLicenseResourceTotal(int total) |
void |
setDeploymentTitle(String title) |
void |
setDomain(String domain) |
void |
setGzipEnabled(boolean gzip) |
void |
setIncludeIpAddressInValidationFactors(boolean includeIpAddressInValidationFactors) |
void |
setLookAndFeelConfiguration(LookAndFeelConfiguration lookAndFeelConfiguration,
ImageInfo updatedLogoInfo)
Sets Look and Feel configuration
|
void |
setNotificationEmail(String notificationEmail) |
void |
setNotificationEmails(List<String> serverAlertAddresses)
Sets notification emails.
|
void |
setPrivateKeyCertificateToSign(long privateKeyCertificatePairId)
Sets ID of private key/certificate pair used to sign assertions in SAML
|
void |
setProperty(String name,
String value)
Sets an arbitrary property.
|
void |
setRememberMeConfiguration(CrowdSpecificRememberMeSettings configuration)
Sets remember me configuration
|
void |
setSecureCookie(boolean secure) |
void |
setSessionTime(long time) |
void |
setSMTPServer(SMTPServer server) |
void |
setSMTPTemplate(String template)
Deprecated.
|
void |
setTrustedProxyServers(String proxyServers)
Persists a String containing a list of proxy servers we trust to correctly set the X-Forwarded-For flag.
|
void |
setUseWebAvatars(boolean useWebAvatars) |
void |
setUsingDatabaseTokenStorage(boolean isUsingDatabaseTokenStorage)
Will set a property to state that this crowd instance is using database token storage, otherwise assume we are using in-memory
|
public static final int DEFAULT_SCHEDULED_BACKUP_HOUR
public static final int DEFAULT_SCHEDULED_BACKUP_MINUTE
public static final String LOGO_IMAGE_KEY
public PropertyManagerGeneric(PropertyDAO propertyDAO, com.atlassian.event.api.EventPublisher eventPublisher)
public String getDeploymentTitle() throws PropertyManagerException
getDeploymentTitle in interface PropertyManagerPropertyManagerException - property does not exist.public void setDeploymentTitle(String title)
setDeploymentTitle in interface PropertyManagertitle - deployment title.public String getDomain()
PropertyManagergetDomain in interface PropertyManagerpublic void setDomain(String domain)
setDomain in interface PropertyManagerdomain - SSO cookie domain.public boolean isSecureCookie()
isSecureCookie in interface PropertyManagertrue if the "secure" flag should be set on the SSO cookie.public void setSecureCookie(boolean secure)
setSecureCookie in interface PropertyManagersecure - true if the "secure" flag should be set on the SSO cookie.public void setCacheEnabled(boolean enabled)
setCacheEnabled in interface PropertyManagerenabled - true if application authorisation caching should be used on the server-side.public boolean isCacheEnabled()
isCacheEnabled in interface PropertyManagertrue if application authorisation caching is used on the server-side.public long getSessionTime()
getSessionTime in interface PropertyManagerpublic void setSessionTime(long time)
setSessionTime in interface PropertyManagertime - number of minutes the session is valid.public SMTPServer getSMTPServer() throws PropertyManagerException
getSMTPServer in interface PropertyManagerPropertyManagerException - property does not exist.public void setSMTPServer(SMTPServer server)
setSMTPServer in interface PropertyManagerserver - SMTP server config.public Key getDesEncryptionKey() throws PropertyManagerException
getDesEncryptionKey in interface PropertyManagerPropertyManagerException - property does not exist.public void generateDesEncryptionKey()
throws PropertyManagerException
PropertyManagergenerateDesEncryptionKey in interface PropertyManagerPropertyManagerException - DES algorithm does not exist.@Deprecated public void setSMTPTemplate(String template)
setSMTPTemplate in interface PropertyManagertemplate - mail template.@Deprecated public String getSMTPTemplate() throws PropertyManagerException
getSMTPTemplate in interface PropertyManagerPropertyManagerException - property does not exist.public void setCurrentLicenseResourceTotal(int total)
setCurrentLicenseResourceTotal in interface PropertyManagertotal - license resource total.public int getCurrentLicenseResourceTotal()
getCurrentLicenseResourceTotal in interface PropertyManagerpublic void setNotificationEmail(String notificationEmail)
setNotificationEmail in interface PropertyManagernotificationEmail - notification email.public void setNotificationEmails(List<String> serverAlertAddresses)
InternalPropertyManagersetNotificationEmails in interface InternalPropertyManagerserverAlertAddresses - list of notification emails.public String getNotificationEmail() throws PropertyManagerException
getNotificationEmail in interface PropertyManagerPropertyManagerException - property does not existpublic List<String> getNotificationEmails() throws PropertyManagerException
getNotificationEmails in interface InternalPropertyManagerPropertyManagerException - property does not existpublic boolean isGzipEnabled()
throws PropertyManagerException
isGzipEnabled in interface PropertyManagertrue if GZip compression should be used.PropertyManagerException - property does not exist.public void setGzipEnabled(boolean gzip)
setGzipEnabled in interface PropertyManagergzip - true if GZip compression should be used.public Integer getBuildNumber() throws PropertyManagerException
PropertyManagerBuildUtils.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 PropertyManagerPropertyManagerException - if we fail to find the buildNumberpublic void setBuildNumber(Integer buildNumber)
PropertyManagersetBuildNumber in interface PropertyManagerbuildNumber - the buildNumber to set in the databasepublic String getTrustedProxyServers() throws PropertyManagerException
TrustedProxyManager.getTrustedProxyServers in interface PropertyManagerPropertyManagerException - If the list of proxy servers could not be found.public void setTrustedProxyServers(String proxyServers)
TrustedProxyManager.setTrustedProxyServers in interface PropertyManagerproxyServers - proxy servers.org.springframework.dao.DataAccessException - If the list of proxy servers could not be saved.public void setAuditLogConfiguration(AuditLogConfiguration newConfiguration)
PropertyManagersetAuditLogConfiguration in interface PropertyManagernewConfiguration - new configurationpublic AuditLogConfiguration getAuditLogConfiguration()
PropertyManagergetAuditLogConfiguration in interface PropertyManagerpublic boolean isUsingDatabaseTokenStorage()
PropertyManagerToken's
otherwise assume we are using in-memoryisUsingDatabaseTokenStorage in interface PropertyManagerpublic void setUsingDatabaseTokenStorage(boolean isUsingDatabaseTokenStorage)
PropertyManagersetUsingDatabaseTokenStorage in interface PropertyManagerisUsingDatabaseTokenStorage - true if you are switching to in-memory token storagepublic boolean isIncludeIpAddressInValidationFactors()
PropertyManagerisIncludeIpAddressInValidationFactors in interface PropertyManagerpublic boolean isUseWebAvatars()
PropertyManagerisUseWebAvatars in interface PropertyManagerpublic void setUseWebAvatars(boolean useWebAvatars)
setUseWebAvatars in interface PropertyManagerpublic CookieConfiguration getCookieConfiguration()
getCookieConfiguration in interface PropertyManagerpublic void setCookieConfiguration(CookieConfiguration cookieConfiguration)
PropertyManagersetCookieConfiguration in interface PropertyManagercookieConfiguration - the configuration to set, will replace the existing configurationpublic void setIncludeIpAddressInValidationFactors(boolean includeIpAddressInValidationFactors)
setIncludeIpAddressInValidationFactors in interface PropertyManagerpublic void setRememberMeConfiguration(CrowdSpecificRememberMeSettings configuration)
InternalPropertyManagersetRememberMeConfiguration in interface InternalPropertyManagerconfiguration - new configurationpublic CrowdSpecificRememberMeSettings getRememberMeConfiguration()
InternalPropertyManagergetRememberMeConfiguration in interface InternalPropertyManagerpublic void removeProperty(String name)
PropertyManagerremoveProperty in interface PropertyManagername - the name of the property.protected Property getPropertyObject(String name) throws ObjectNotFoundException
ObjectNotFoundExceptionpublic String getProperty(String name) throws ObjectNotFoundException
PropertyManagergetProperty in interface PropertyManagername - name of property.ObjectNotFoundException - property does not exist.public Optional<String> getOptionalProperty(String name)
PropertyManagergetOptionalProperty in interface PropertyManagername - name of property.public void setProperty(String name, String value)
PropertyManagersetProperty in interface PropertyManagername - name of property.value - value.public String getString(String property, String defaultValue)
PropertyManagergetString in interface PropertyManagerproperty - a property namedefaultValue - the default value to use if the property does not existpublic boolean getBoolean(String property, boolean defaultValue)
PropertyManagergetBoolean in interface PropertyManagerproperty - a property namedefaultValue - the default value to use if the property does not existpublic int getInt(String property, int defaultValue)
PropertyManagergetInt in interface PropertyManagerproperty - a property namedefaultValue - the default value to use if the property does not exist or is invalidpublic int getIntOrThrowIllegalArgumentException(String property, int defaultValue)
public void setBaseUrl(URI url)
PropertyManagersetBaseUrl in interface PropertyManagerurl - the base url to set, should be a proper absolute URLpublic URI getBaseUrl() throws PropertyManagerException
getBaseUrl in interface PropertyManagerPropertyManagerException - if the property is not configured correctlyApplicationProperties.getBaseUrl(com.atlassian.sal.api.UrlMode)public Optional<Long> getPrivateKeyCertificatePairToSign()
getPrivateKeyCertificatePairToSign in interface PropertyManagerpublic void setPrivateKeyCertificateToSign(long privateKeyCertificatePairId)
PropertyManagersetPrivateKeyCertificateToSign in interface PropertyManagerprivateKeyCertificatePairId - ID of private key/certificate pair to savepublic BackupConfiguration getBackupConfiguration()
getBackupConfiguration in interface PropertyManagerpublic void saveBackupConfiguration(BackupConfiguration config)
PropertyManagersaveBackupConfiguration in interface PropertyManagerconfig - configuration of backup to save@Nonnull public Optional<LookAndFeelConfiguration> getLookAndFeelConfiguration() throws PropertyManagerException
getLookAndFeelConfiguration in interface PropertyManagerPropertyManagerException - if there was an error while fetching configurationpublic void setLookAndFeelConfiguration(LookAndFeelConfiguration lookAndFeelConfiguration, ImageInfo updatedLogoInfo) throws PropertyManagerException
PropertyManagersetLookAndFeelConfiguration in interface PropertyManagerlookAndFeelConfiguration - look and feel configurationupdatedLogoInfo - information about custom logo. If custom logo was already set
and new value is not null then old logo will be overridden by new one.PropertyManagerException - if there was an error while saving configurationpublic void removeLookAndFeelConfiguration()
throws PropertyManagerException
PropertyManagerremoveLookAndFeelConfiguration in interface PropertyManagerPropertyManagerException - if there was an error while removing configurationpublic Optional<ImageInfo> getLogoImage() throws PropertyManagerException
getLogoImage in interface PropertyManagerPropertyManagerException - if there was an error while fetching a logoCopyright © 2023 Atlassian. All rights reserved.