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)
ApplicationPropertiesServicegetEditableApplicationProperties in interface ApplicationPropertiesServicepermissionLevel - 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
ApplicationPropertiesServicegetEditableAdvancedProperties in interface ApplicationPropertiesServiceDataAccessException - 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 ApplicationPropertiesServicepublic boolean hasPermissionForLevel(String permissionLevel)
ApplicationPropertiesServicehasPermissionForLevel in interface ApplicationPropertiesServicepermissionLevel - 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
ApplicationPropertiesServicegetEditableApplicationProperties in interface ApplicationPropertiesServicepermissionLevel - 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)
ApplicationPropertiesServicegetApplicationProperty in interface ApplicationPropertiesServicekey - the property's key.public Validated<ApplicationProperty> setApplicationProperty(String key, String value)
ApplicationPropertiesServicesetApplicationProperty in interface ApplicationPropertiesServicekey - the key.value - the string representation of the value.protected ApplicationPropertyChangeEvent createEvent(ApplicationPropertyMetadata metadata, String oldValue, String newValue)
Copyright © 2002-2023 Atlassian. All Rights Reserved.