com.atlassian.jira.bc.admin
Interface ApplicationPropertiesService

All Known Implementing Classes:
ApplicationPropertiesServiceImpl

public interface ApplicationPropertiesService

Service level implementation of CRUD for ApplicationProperties which are administrative level configuration settings that boil down to a key and a value. In addition to key and value are other metadata properties as modelled by ApplicationPropertyMetadata including default value, type and i18n keys etc.

Since:
v4.4

Nested Class Summary
static class ApplicationPropertiesService.EditPermissionLevel
           
 
Method Summary
 ApplicationProperty getApplicationProperty(String key)
          Retrieves a property with the given key.
 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 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.
 

Method Detail

getEditableApplicationProperties

List<ApplicationProperty> getEditableApplicationProperties(String permissionLevel,
                                                           String keyFilter)
                                                           throws DataAccessException
Retrieves all properties that can be edited dynamically by the user.

Parameters:
permissionLevel - the level EditPermissionLevel as a string the all returned values should contain
keyFilter - may be null. Filter the list of properties by which keys start with keyFilter
Returns:
the properties.
Throws:
DataAccessException - if there is a problem with the backing store.

hasPermissionForLevel

boolean hasPermissionForLevel(String permissionLevel)
Checks if the user has the permission to fetch values at the permissionLevel requested.

Parameters:
permissionLevel -
Returns:
true if they are allowed the list

getEditableApplicationProperties

List<ApplicationProperty> getEditableApplicationProperties(ApplicationPropertiesService.EditPermissionLevel permissionLevel,
                                                           String keyFilter)
                                                           throws DataAccessException
Retrieves all properties that can be edited dynamically by the user.

Parameters:
permissionLevel - the level EditPermissionLevel as a string the all returned values should contain
keyFilter - may be null. Filter the list of properties by which keys start with keyFilter
Returns:
the properties.
Throws:
DataAccessException - if there is a problem with the backing store.

getApplicationProperty

ApplicationProperty getApplicationProperty(String key)
                                           throws DataAccessException
Retrieves a property with the given key.

Parameters:
key - the property's key.
Returns:
the property or null if there is no property with that key.
Throws:
DataAccessException - if there is a problem with the backing store.

setApplicationProperty

Validated<ApplicationProperty> setApplicationProperty(String key,
                                                      String value)
                                                      throws DataAccessException
Stores the given value for the given key in the underlying data store.

Parameters:
key - the key.
value - the string representation of the value.
Returns:
the property in full that corresponds to the new state of the property.
Throws:
DataAccessException - if the key cannot be stored due to a problem with the backing store.


Copyright © 2002-2013 Atlassian. All Rights Reserved.