Package lumis.portal.configuration
Class EnvironmentConfiguration
- java.lang.Object
-
- lumis.portal.configuration.EnvironmentConfiguration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EnvironmentConfiguration.ActivityAnonymizationPolicy
The user activity anonymization policy.static class
EnvironmentConfiguration.EnvironmentConfigurationCommand
This is a environment configuration command that updates the configuration information cached.
-
Constructor Summary
Constructors Constructor Description EnvironmentConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EnvironmentProperty
addProperty(String name)
Adds a property with the given name in the configuration.void
clearProperties()
Removes all environment properties.static void
clearPropertiesCache()
Clears the environment properties cache.protected Object
clone()
EnvironmentConfiguration.ActivityAnonymizationPolicy
getActivityAnonymizationPolicy()
Returns the activityAnonymizationPolicy.String
getBigDataRepositoryClassName()
Returns the class name of big data repository implementation to use.BigDataRepositoryType
getBigDataRepositoryType()
Returns the configured big data repository type.Long
getCacheUserSegmentationExpirationAmount()
Returns the cache user segmentation member expiration amount.long
getCacheUserSegmentationExpirationMillis()
Returns the cache user segmentation expiration in milliseconds.TimeUnit
getCacheUserSegmentationExpirationUnit()
Returns the cache user segmentation member expiration unit.static EnvironmentConfiguration
getCurrentConfiguration()
Returns the current configuration.int
getElasticsearchBulkConcurrentRequests()
Returns the maximum number of bulk requests to be sent concurrently.Integer
getElasticsearchFlushInterval()
Returns the interval in milliseconds for flush elastic search data.String
getElasticsearchIndexNamePrefix()
Returns the Elasticsearch index names prefix.String
getElasticsearchRestConnectionAddresses()
Returns the connection addresses to use when initializing the Elasticsearch Rest client.EnvironmentStandardBigDataDocumentPopularityProviderConfiguration
getEnvironmentStandardBigDataDocumentPopularityProviderConfiguration()
Returns the standard big data document popularity provider configuration.String
getFileSystemImplementation()
Returns the portal's file system implementation class name.String
getGeoLocationIPAddressUpdateLicenseKey()
Returns the geoLocationIPAddressUpdateLicenseKey.String
getId()
Returns the id.String
getIdentification()
Returns the identification.Integer
getMaxLoginFailures()
Returns the maximum number of login failures before a given user is blocked.Integer
getMaxLoginFailuresOrDefault()
Returns the maximum number of login failures before a given user is blocked or the default value.EnvironmentMonitorConfiguration
getMonitorConfiguration()
Returns the monitor configuration.Map<String,List<String>>
getProperties()
Returns an immutable map of the environment properties.String
getPropertyValue(String propertyName)
Returns the value of the property that has the given name.List<String>
getPropertyValues(String propertyName)
Returns an immutable set of values of the property that has the given name.Collection<String>
getTags()
Returns the collection of tags this environment has.EnvironmentType
getType()
Returns the environment type.Integer
getUserSegmentationMaxMembers()
Returns the maximum number of members are calculated for each user segmentation.boolean
isDataPrivacySystemEnabled()
Returns the dataPrivacySystemEnabled.boolean
isGeolocationServiceEnabled()
Returns whether the Geolocation service is enabled.boolean
isJavaMelodyEnabled()
Returns whether the JavaMelody monitoring should be enabled next time portal starts.boolean
isUserGroupsSessionCacheEnabled()
Returns whether the user's group session cache is enabled.void
removeProperty(String name)
Removes the property that has the given name.void
setActivityAnonymizationPolicy(EnvironmentConfiguration.ActivityAnonymizationPolicy activityAnonymizationPolicy)
Sets the activityAnonymizationPolicy.void
setBigDataRepositoryClassName(String bigDataRepositoryClassName)
Sets the class name of big data repository implementation to use.void
setBigDataRepositoryType(BigDataRepositoryType bigDataRepositoryType)
Sets the configured big data repository type.void
setCacheUserSegmentationExpirationAmount(Long cacheUserSegmentationExpirationAmount)
Sets the cache user segmentation member expiration amount.void
setCacheUserSegmentationExpirationUnit(TimeUnit cacheUserSegmentationExpirationUnit)
Sets the cache user segmentation member expiration unit.void
setDataPrivacySystemEnabled(boolean dataPrivacySystemEnabled)
Sets the dataPrivacySystemEnabled.void
setElasticsearchBulkConcurrentRequests(int elasticsearchBulkConcurrentRequests)
Sets the maximum number of bulk requests to be sent concurrently.void
setElasticsearchFlushInterval(Integer elasticsearchFlushInterval)
Sets the interval in milliseconds for flush elastic search data.void
setElasticsearchIndexNamePrefix(String elasticsearchIndexNamePrefix)
Sets the Elasticsearch index names prefix.void
setElasticsearchRestConnectionAddresses(String addresses)
Sets the connection addresses to use when initializing the Elasticsearch Rest client.void
setEnvironmentStandardBigDataDocumentPopularityProviderConfiguration(EnvironmentStandardBigDataDocumentPopularityProviderConfiguration bigDataPopularityProviderConfig)
Set the standard big data document popularity provider configuration.void
setFileSystemImplementation(String fileSystemImplementation)
Sets the portal's file system implementation class name.void
setGeoLocationIPAddressUpdateLicenseKey(String geoLocationIPAddressUpdateLicenseKey)
Sets the geoLocationIPAddressUpdateLicenseKey.void
setGeolocationServiceEnabled(boolean geolocationServiceEnabled)
Sets whether the Geolocation service is enabled.void
setIdentification(String identification)
Sets the identification.void
setJavaMelodyEnabled(boolean javaMelodyEnabled)
Sets whether JavaMelody monitoring should be enabled next time portal starts.void
setMaxLoginFailures(Integer maxLoginFailures)
Set the maximum number of login failures before a given user is blocked.void
setTags(Collection<String> tags)
Sets the collection of tags this environment has.void
setType(EnvironmentType type)
Sets the environment type.void
setUserGroupsSessionCacheEnabled(boolean userGroupsSessionCacheEnabled)
Sets whether the user's group session cache is enabled.void
setUserSegmentationMaxMembers(Integer segmentationMaxMembers)
Sets the maximum number of members are calculated for each segmentation.static void
updateCurrentConfiguration(EnvironmentConfiguration config)
Update the current configuration.
-
-
-
Method Detail
-
getId
public String getId()
Returns the id.- Returns:
- the id
- Since:
- 7.1.0
-
getType
public EnvironmentType getType()
Returns the environment type.- Returns:
- the environment type
- Since:
- 7.1.0
-
setType
public void setType(EnvironmentType type)
Sets the environment type.- Since:
- 7.1.0
-
clone
protected Object clone() throws CloneNotSupportedException
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
getTags
public Collection<String> getTags()
Returns the collection of tags this environment has. The returned collection is unmodifiable.- Returns:
- the collection of tags this environment has.
- Since:
- 7.1.0
-
setTags
public void setTags(Collection<String> tags)
Sets the collection of tags this environment has.- Since:
- 7.1.0
-
getFileSystemImplementation
public String getFileSystemImplementation()
Returns the portal's file system implementation class name.- Returns:
- the portal's file system implementation class name.
- Since:
- 8.0.0
-
setFileSystemImplementation
public void setFileSystemImplementation(String fileSystemImplementation)
Sets the portal's file system implementation class name.- Parameters:
fileSystemImplementation
- the portal's file system implementation class name- Since:
- 8.0.0
-
isJavaMelodyEnabled
public boolean isJavaMelodyEnabled()
Returns whether the JavaMelody monitoring should be enabled next time portal starts.- Returns:
- whether the JavaMelody monitoring should be enabled next time portal starts.
- Since:
- 8.0.0
-
setJavaMelodyEnabled
public void setJavaMelodyEnabled(boolean javaMelodyEnabled)
Sets whether JavaMelody monitoring should be enabled next time portal starts.- Parameters:
javaMelodyEnabled
- whether JavaMelody monitoring should be enabled next time portal starts.- Since:
- 8.0.0
-
isGeolocationServiceEnabled
public boolean isGeolocationServiceEnabled()
Returns whether the Geolocation service is enabled.- Returns:
- whether the Geolocation service is enabled.
- Since:
- 10.2.0
-
setGeolocationServiceEnabled
public void setGeolocationServiceEnabled(boolean geolocationServiceEnabled)
Sets whether the Geolocation service is enabled.- Parameters:
geolocationServiceEnabled
- whether the Geolocation service is enabled.- Since:
- 10.2.0
-
getBigDataRepositoryType
public BigDataRepositoryType getBigDataRepositoryType()
Returns the configured big data repository type.- Returns:
- the configured big data repository type.
- Since:
- 8.1.0
-
setBigDataRepositoryType
public void setBigDataRepositoryType(BigDataRepositoryType bigDataRepositoryType)
Sets the configured big data repository type.- Parameters:
bigDataRepositoryType
- the big data repository type.- Since:
- 8.1.0
-
getBigDataRepositoryClassName
public String getBigDataRepositoryClassName()
Returns the class name of big data repository implementation to use. Used only ifgetBigDataRepositoryType()
isBigDataRepositoryType.CUSTOM
.- Returns:
- the big data repository class name.
- Since:
- 8.1.0
-
setBigDataRepositoryClassName
public void setBigDataRepositoryClassName(String bigDataRepositoryClassName)
Sets the class name of big data repository implementation to use. Used only ifgetBigDataRepositoryType()
isBigDataRepositoryType.CUSTOM
.- Parameters:
bigDataRepositoryClassName
- the big data repository class name.- Since:
- 8.1.0
-
getElasticsearchRestConnectionAddresses
public String getElasticsearchRestConnectionAddresses()
Returns the connection addresses to use when initializing the Elasticsearch Rest client. The addresses are in format of one or many "hostname:port" separated by colon.- Returns:
- the connection addresses. Example: "host1:9200,host2:9200,192.168.1.13:9200"
- Since:
- 10.0.0
-
setElasticsearchRestConnectionAddresses
public void setElasticsearchRestConnectionAddresses(String addresses)
Sets the connection addresses to use when initializing the Elasticsearch Rest client. The addresses are in format of one or many "hostname:port" separated by colon.- Parameters:
addresses
- the connection addresses. Example: "host1:9200,host2:9200,192.168.1.13:9200"- Since:
- 10.0.0
-
getElasticsearchIndexNamePrefix
public String getElasticsearchIndexNamePrefix()
Returns the Elasticsearch index names prefix.- Returns:
- the Elasticsearch index names prefix.
- Since:
- 8.1.0
-
setElasticsearchIndexNamePrefix
public void setElasticsearchIndexNamePrefix(String elasticsearchIndexNamePrefix)
Sets the Elasticsearch index names prefix.- Parameters:
elasticsearchIndexNamePrefix
- the Elasticsearch index names prefix.- Since:
- 8.1.0
-
getElasticsearchBulkConcurrentRequests
public int getElasticsearchBulkConcurrentRequests()
Returns the maximum number of bulk requests to be sent concurrently.- Returns:
- the maximum number of concurrent bulk requests.
- Since:
- 8.1.0
-
setElasticsearchBulkConcurrentRequests
public void setElasticsearchBulkConcurrentRequests(int elasticsearchBulkConcurrentRequests)
Sets the maximum number of bulk requests to be sent concurrently.- Parameters:
elasticsearchBulkConcurrentRequests
- the maximum number of concurrent bulk requests.- Since:
- 8.1.0
-
getEnvironmentStandardBigDataDocumentPopularityProviderConfiguration
public EnvironmentStandardBigDataDocumentPopularityProviderConfiguration getEnvironmentStandardBigDataDocumentPopularityProviderConfiguration()
Returns the standard big data document popularity provider configuration.- Returns:
- the standard big data document popularity provider configuration.
- Since:
- 11.1.0
-
setEnvironmentStandardBigDataDocumentPopularityProviderConfiguration
public void setEnvironmentStandardBigDataDocumentPopularityProviderConfiguration(EnvironmentStandardBigDataDocumentPopularityProviderConfiguration bigDataPopularityProviderConfig)
Set the standard big data document popularity provider configuration.- Parameters:
the
- standard big data document popularity provider configuration.- Since:
- 11.1.0
-
isUserGroupsSessionCacheEnabled
public boolean isUserGroupsSessionCacheEnabled()
Returns whether the user's group session cache is enabled.- Returns:
- whether the user's group session cache is enabled.
- Since:
- 10.3.0
-
setUserGroupsSessionCacheEnabled
public void setUserGroupsSessionCacheEnabled(boolean userGroupsSessionCacheEnabled)
Sets whether the user's group session cache is enabled.- Parameters:
userGroupsSessionCacheEnabled
- true if the user's group session cache is enabled.- Since:
- 10.3.0
-
getCurrentConfiguration
public static EnvironmentConfiguration getCurrentConfiguration()
Returns the current configuration.- Returns:
- the current configuration.
- Since:
- 7.1.0
-
updateCurrentConfiguration
public static void updateCurrentConfiguration(EnvironmentConfiguration config) throws PortalException
Update the current configuration.- Throws:
PortalException
- Since:
- 7.1.0
-
getIdentification
public String getIdentification()
Returns the identification.- Returns:
- the identification
- Since:
- 8.2.0
-
setIdentification
public void setIdentification(String identification)
Sets the identification. The identification parameter is expected to match the pattern^[a-zA-Z0-9_]+$
.- Parameters:
identification
- the identification value to set.- Since:
- 8.2.0
-
getMonitorConfiguration
public EnvironmentMonitorConfiguration getMonitorConfiguration()
Returns the monitor configuration.- Returns:
- the monitor configuration.
- Since:
- 9.0.0
-
getCacheUserSegmentationExpirationUnit
public TimeUnit getCacheUserSegmentationExpirationUnit()
Returns the cache user segmentation member expiration unit.- Returns:
- the cache user segmentation member expiration unit.
- Since:
- 11.2.0
-
setCacheUserSegmentationExpirationUnit
public void setCacheUserSegmentationExpirationUnit(TimeUnit cacheUserSegmentationExpirationUnit)
Sets the cache user segmentation member expiration unit.- Parameters:
cacheUserSegmentationExpirationUnit
- the cache user segmentation member expiration unit.- Since:
- 11.2.0
-
getCacheUserSegmentationExpirationAmount
public Long getCacheUserSegmentationExpirationAmount()
Returns the cache user segmentation member expiration amount.- Returns:
- the cache user segmentation member expiration amount.
- Since:
- 11.2.0
-
setCacheUserSegmentationExpirationAmount
public void setCacheUserSegmentationExpirationAmount(Long cacheUserSegmentationExpirationAmount)
Sets the cache user segmentation member expiration amount.- Parameters:
cacheUserSegmentationExpirationAmount
- the cache user segmentation member expiration amount.- Since:
- 11.2.0
-
getCacheUserSegmentationExpirationMillis
public long getCacheUserSegmentationExpirationMillis()
Returns the cache user segmentation expiration in milliseconds.- Returns:
- the cache user segmentation expiration in milliseconds.
- Since:
- 11.2.0
-
getUserSegmentationMaxMembers
public Integer getUserSegmentationMaxMembers()
Returns the maximum number of members are calculated for each user segmentation.- Returns:
- the maximum number of members calculated for each user segmentation.
- Since:
- 12.0.0
-
setUserSegmentationMaxMembers
public void setUserSegmentationMaxMembers(Integer segmentationMaxMembers)
Sets the maximum number of members are calculated for each segmentation.- Parameters:
segmentationMaxMembers
- the maximum number of members calculated for each segmentation.- Since:
- 12.0.0
-
addProperty
public EnvironmentProperty addProperty(String name) throws PortalException
Adds a property with the given name in the configuration.- Parameters:
name
- the property name.- Returns:
- the added property.
- Throws:
IllegalArgumentException
- if the given name is null or empty.PortalObjectAlreadyExistsException
- if there's already a property with the given name.PortalException
- Since:
- 8.2.0
-
removeProperty
public void removeProperty(String name)
Removes the property that has the given name.- Parameters:
name
- the property name.- Since:
- 8.2.0
-
clearProperties
public void clearProperties()
Removes all environment properties.- Since:
- 8.2.0
-
getPropertyValues
public List<String> getPropertyValues(String propertyName) throws PortalException
Returns an immutable set of values of the property that has the given name.- Parameters:
propertyName
- the desired property name.- Returns:
- an immutable set of values of the property that has the given name.
- Throws:
IllegalArgumentException
- if property name is null or empty.PortalObjectNotFoundException
- if there's no such property.PortalException
- Since:
- 8.2.0
-
getPropertyValue
public String getPropertyValue(String propertyName) throws PortalException
Returns the value of the property that has the given name. If the given property has more than one value, the first will be returned.- Parameters:
propertyName
- the desired property name.- Returns:
- the value of the property that has the given name.
- Throws:
IllegalArgumentException
- if property name is null or empty.PortalObjectNotFoundException
- if there's no such property.PortalException
- Since:
- 8.2.0
-
getProperties
public Map<String,List<String>> getProperties() throws PortalException
Returns an immutable map of the environment properties.- Returns:
- an immutable map of the environment properties.
- Throws:
PortalException
- Since:
- 8.2.0
-
clearPropertiesCache
public static void clearPropertiesCache()
Clears the environment properties cache.- Since:
- 8.2.0
-
getMaxLoginFailures
public Integer getMaxLoginFailures()
Returns the maximum number of login failures before a given user is blocked.- Returns:
- the maximum number of login failures before a given user is blocked.
- Since:
- 12.0.0
-
getMaxLoginFailuresOrDefault
public Integer getMaxLoginFailuresOrDefault()
Returns the maximum number of login failures before a given user is blocked or the default value.- Returns:
- the maximum number of login failures before a given user is blocked or the default value.
- Since:
- 12.0.0
-
setMaxLoginFailures
public void setMaxLoginFailures(Integer maxLoginFailures)
Set the maximum number of login failures before a given user is blocked.- Parameters:
maxLoginFailures
-- Since:
- 12.0.0
-
getElasticsearchFlushInterval
public Integer getElasticsearchFlushInterval()
Returns the interval in milliseconds for flush elastic search data.- Returns:
- The interval in milliseconds for flush elastic search data.
- Since:
- 12.0.0
-
setElasticsearchFlushInterval
public void setElasticsearchFlushInterval(Integer elasticsearchFlushInterval)
Sets the interval in milliseconds for flush elastic search data.- Parameters:
elasticsearchFlushInterval
- The interval in milliseconds for flush elastic search data value to set.- Since:
- 12.0.0
-
getGeoLocationIPAddressUpdateLicenseKey
public String getGeoLocationIPAddressUpdateLicenseKey()
Returns the geoLocationIPAddressUpdateLicenseKey.- Returns:
- the geoLocationIPAddressUpdateLicenseKey
- Since:
- 12.2.0
-
setGeoLocationIPAddressUpdateLicenseKey
public void setGeoLocationIPAddressUpdateLicenseKey(String geoLocationIPAddressUpdateLicenseKey)
Sets the geoLocationIPAddressUpdateLicenseKey.- Parameters:
geoLocationIPAddressUpdateLicenseKey
- the geoLocationIPAddressUpdateLicenseKey value to set.- Since:
- 12.2.0
-
getActivityAnonymizationPolicy
public EnvironmentConfiguration.ActivityAnonymizationPolicy getActivityAnonymizationPolicy()
Returns the activityAnonymizationPolicy.- Returns:
- the activityAnonymizationPolicy.
- Since:
- 12.3.0
-
setActivityAnonymizationPolicy
public void setActivityAnonymizationPolicy(EnvironmentConfiguration.ActivityAnonymizationPolicy activityAnonymizationPolicy)
Sets the activityAnonymizationPolicy.- Parameters:
activityAnonymizationPolicy
- the dataPrivacyAnonymizedActivities value to set.- Since:
- 12.3.0
-
isDataPrivacySystemEnabled
public boolean isDataPrivacySystemEnabled()
Returns the dataPrivacySystemEnabled.- Returns:
- the dataPrivacySystemEnabled
- Since:
- 12.3.0
-
setDataPrivacySystemEnabled
public void setDataPrivacySystemEnabled(boolean dataPrivacySystemEnabled)
Sets the dataPrivacySystemEnabled.- Parameters:
dataPrivacySystemEnabled
- the dataPrivacySystemEnabled value to set.- Since:
- 12.3.0
-
-