public class ApplicationPropertiesServiceImpl extends Object implements ApplicationPropertiesService
ApplicationPropertiesService.EditPermissionLevel
Constructor and Description |
---|
ApplicationPropertiesServiceImpl(ApplicationPropertiesStore applicationPropertiesStore,
com.atlassian.event.api.EventPublisher eventPublisher,
PermissionManager permissionManager,
JiraAuthenticationContext authenticationContext,
FeatureManager featureManager) |
Modifier and Type | Method and Description |
---|---|
protected ApplicationPropertyChangeEvent |
createEvent(ApplicationPropertyMetadata metadata,
String oldValue,
String newValue) |
ApplicationProperty |
getApplicationProperty(String key)
Retrieves a property with the given key.
|
List<ApplicationProperty> |
getEditableAdvancedProperties()
Retrieves all properties that can be edited by the user on the "General Configuration > Advanced Settings" page.
|
List<ApplicationProperty> |
getEditableApplicationProperties(ApplicationPropertiesService.EditPermissionLevel permissionLevel,
String keyFilter)
Retrieves all properties that can be edited dynamically by the user.
|
List<ApplicationProperty> |
getEditableApplicationProperties(String permissionLevel,
String keyFilter)
Retrieves all properties that can be edited dynamically by the user.
|
boolean |
hasAdministrativePermissions()
Checks if the user has either ADMIN or SYSADMIN level permissions.
|
boolean |
hasPermissionForLevel(String permissionLevel)
Checks if the user has the permission to fetch values at the permissionLevel requested.
|
Validated<ApplicationProperty> |
setApplicationProperty(String key,
String value)
Stores the given value for the given key in the underlying data store.
|
public ApplicationPropertiesServiceImpl(ApplicationPropertiesStore applicationPropertiesStore, com.atlassian.event.api.EventPublisher eventPublisher, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext, FeatureManager featureManager)
public List<ApplicationProperty> getEditableApplicationProperties(String permissionLevel, String keyFilter)
ApplicationPropertiesService
getEditableApplicationProperties
in interface ApplicationPropertiesService
permissionLevel
- the level EditPermissionLevel as a string the all returned values should containkeyFilter
- may be null. Filter the list of properties by which keys start with keyFilterpublic List<ApplicationProperty> getEditableAdvancedProperties() throws DataAccessException
ApplicationPropertiesService
getEditableAdvancedProperties
in interface ApplicationPropertiesService
DataAccessException
- if there is a problem with the backing store.public boolean hasAdministrativePermissions()
The implementation below calls only isNormalAdmin()
as the SYSTEM_ADMIN has an implicit ADMINISTER privilege.
hasAdministrativePermissions
in interface ApplicationPropertiesService
public boolean hasPermissionForLevel(String permissionLevel)
ApplicationPropertiesService
hasPermissionForLevel
in interface ApplicationPropertiesService
permissionLevel
- the permission level. If blank, defaults the check for either ADMIN or SYSADMIN levels.public List<ApplicationProperty> getEditableApplicationProperties(ApplicationPropertiesService.EditPermissionLevel permissionLevel, String keyFilter) throws DataAccessException
ApplicationPropertiesService
getEditableApplicationProperties
in interface ApplicationPropertiesService
permissionLevel
- the level EditPermissionLevel as a string the all returned values should containkeyFilter
- may be null. Filter the list of properties by which keys start with keyFilterDataAccessException
- if there is a problem with the backing store.public ApplicationProperty getApplicationProperty(String key)
ApplicationPropertiesService
getApplicationProperty
in interface ApplicationPropertiesService
key
- the property's key.public Validated<ApplicationProperty> setApplicationProperty(String key, String value)
ApplicationPropertiesService
setApplicationProperty
in interface ApplicationPropertiesService
key
- the key.value
- the string representation of the value.protected ApplicationPropertyChangeEvent createEvent(ApplicationPropertyMetadata metadata, String oldValue, String newValue)
Copyright © 2002-2017 Atlassian. All Rights Reserved.