com.atlassian.jira.bc.admin
Class ApplicationPropertiesServiceImpl

java.lang.Object
  extended by com.atlassian.jira.bc.admin.ApplicationPropertiesServiceImpl
All Implemented Interfaces:
ApplicationPropertiesService

public class ApplicationPropertiesServiceImpl
extends Object
implements ApplicationPropertiesService


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.bc.admin.ApplicationPropertiesService
ApplicationPropertiesService.EditPermissionLevel
 
Constructor Summary
ApplicationPropertiesServiceImpl(ApplicationPropertiesStore applicationPropertiesStore, com.atlassian.event.api.EventPublisher eventPublisher, PermissionManager permissionManager, JiraAuthenticationContext authenticationContext, FeatureManager featureManager)
           
 
Method Summary
protected  ApplicationPropertyChangeEvent createEvent(ApplicationPropertyMetadata metadata, String oldValue, String newValue)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationPropertiesServiceImpl

public ApplicationPropertiesServiceImpl(ApplicationPropertiesStore applicationPropertiesStore,
                                        com.atlassian.event.api.EventPublisher eventPublisher,
                                        PermissionManager permissionManager,
                                        JiraAuthenticationContext authenticationContext,
                                        FeatureManager featureManager)
Method Detail

getEditableApplicationProperties

public List<ApplicationProperty> getEditableApplicationProperties(String permissionLevel,
                                                                  String keyFilter)
Description copied from interface: ApplicationPropertiesService
Retrieves all properties that can be edited dynamically by the user.

Specified by:
getEditableApplicationProperties in interface ApplicationPropertiesService
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.

hasPermissionForLevel

public boolean hasPermissionForLevel(String permissionLevel)
Description copied from interface: ApplicationPropertiesService
Checks if the user has the permission to fetch values at the permissionLevel requested.

Specified by:
hasPermissionForLevel in interface ApplicationPropertiesService
Returns:
true if they are allowed the list

getEditableApplicationProperties

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

Specified by:
getEditableApplicationProperties in interface ApplicationPropertiesService
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

public ApplicationProperty getApplicationProperty(String key)
Description copied from interface: ApplicationPropertiesService
Retrieves a property with the given key.

Specified by:
getApplicationProperty in interface ApplicationPropertiesService
Parameters:
key - the property's key.
Returns:
the property or null if there is no property with that key.

setApplicationProperty

public Validated<ApplicationProperty> setApplicationProperty(String key,
                                                             String value)
Description copied from interface: ApplicationPropertiesService
Stores the given value for the given key in the underlying data store.

Specified by:
setApplicationProperty in interface ApplicationPropertiesService
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.

createEvent

protected ApplicationPropertyChangeEvent createEvent(ApplicationPropertyMetadata metadata,
                                                     String oldValue,
                                                     String newValue)


Copyright © 2002-2014 Atlassian. All Rights Reserved.