public class BaseEntityWithKeyPropertyService<E extends WithKey & WithId> extends BaseEntityPropertyService<E> implements EntityWithKeyPropertyService<E>
EntityWithKeyPropertyService
. This should be used for entities which are
identifiable by both: key and id, such as Issue
.BaseEntityPropertyService
EntityPropertyService.DeletePropertyValidationResult, EntityPropertyService.EntityPropertyInput, EntityPropertyService.PropertyInput, EntityPropertyService.PropertyKeys<E>, EntityPropertyService.PropertyResult, EntityPropertyService.PropertyServiceResult, EntityPropertyService.SetPropertyValidationResult
Constructor and Description |
---|
BaseEntityWithKeyPropertyService(JsonEntityPropertyManager jsonEntityPropertyManager,
I18nHelper i18n,
com.atlassian.event.api.EventPublisher eventPublisher,
EntityWithKeyPropertyHelper<E> entityHelper) |
Modifier and Type | Method and Description |
---|---|
EntityPropertyService.PropertyKeys<E> |
getPropertiesKeys(ApplicationUser user,
String entityKey)
Returns the properties keys associated with the specified entity.
|
EntityPropertyService.PropertyKeys<E> |
getPropertiesKeys(ApplicationUser user,
String entityKey,
EntityPropertyOptions options)
Returns the properties keys associated with the specified entity.
|
EntityPropertyService.PropertyResult |
getProperty(ApplicationUser user,
String entityKey,
String propertyKey)
Returns the JSON property with the specified key from specified entity.
|
EntityPropertyService.PropertyResult |
getProperty(ApplicationUser user,
String entityKey,
String propertyKey,
EntityPropertyOptions options)
Returns the JSON property with the specified key from specified entity.
|
EntityPropertyService.DeletePropertyValidationResult |
validateDeleteProperty(ApplicationUser user,
String entityKey,
String propertyKey)
Check if it is possible to remove the entity property with specified entity's key and entity's property key.
|
EntityPropertyService.DeletePropertyValidationResult |
validateDeleteProperty(ApplicationUser user,
String entityKey,
String propertyKey,
EntityPropertyOptions options)
Check if it is possible to remove the entity property with specified entity's key and entity's property key.
|
EntityPropertyService.SetPropertyValidationResult |
validateSetProperty(ApplicationUser user,
String entityKey,
EntityPropertyService.PropertyInput propertyInput)
Checks if the provided entity's property is valid.
|
EntityPropertyService.SetPropertyValidationResult |
validateSetProperty(ApplicationUser user,
String entityKey,
EntityPropertyService.PropertyInput propertyInput,
EntityPropertyOptions options)
Checks if the provided entity's property is valid.
|
deleteProperty, getProperties, getProperties, getPropertiesKeys, getPropertiesKeys, getPropertiesKeys, getProperty, getProperty, getProperty, setProperty, validateDeleteProperty, validateDeleteProperty, validateDeleteProperty, validatePropertyInput, validateSetProperty, validateSetProperty, validateSetProperty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deleteProperty, getProperties, getProperties, getPropertiesKeys, getPropertiesKeys, getProperty, getProperty, setProperty, validateDeleteProperty, validateDeleteProperty, validatePropertyInput, validateSetProperty, validateSetProperty
public BaseEntityWithKeyPropertyService(JsonEntityPropertyManager jsonEntityPropertyManager, I18nHelper i18n, com.atlassian.event.api.EventPublisher eventPublisher, EntityWithKeyPropertyHelper<E> entityHelper)
public EntityPropertyService.SetPropertyValidationResult validateSetProperty(ApplicationUser user, String entityKey, EntityPropertyService.PropertyInput propertyInput)
EntityWithKeyPropertyService
This method checks if the entity with which the property will be associated exists and if the calling user
has permissions to edit the entity. It validates if the property's key length is less then 255
characters.
It also checks if the length of the property's value is less then 32,768
.
validateSetProperty
in interface EntityWithKeyPropertyService<E extends WithKey & WithId>
user
- who the permission checks will be run against (can be null, indicating anonymous user).entityKey
- the key of the entity with which the property will be associated.propertyInput
- the pair of key and value which will be associated with the entity.public EntityPropertyService.SetPropertyValidationResult validateSetProperty(ApplicationUser user, @NonNull String entityKey, @NonNull EntityPropertyService.PropertyInput propertyInput, @NonNull EntityPropertyOptions options)
EntityWithKeyPropertyService
This method checks if the entity with which the property will be associated exists.
It validates if the property's key length is less then 255
characters.
It also checks if the length of the property's value is less then 32,768
.
validateSetProperty
in interface EntityWithKeyPropertyService<E extends WithKey & WithId>
user
- who the permission checks will be run against (can be null, indicating anonymous user).entityKey
- the key of the entity with which the property will be associated.propertyInput
- the pair of key and value which will be associated with the entity.options
- options to skip permission while performing the validation.public EntityPropertyService.DeletePropertyValidationResult validateDeleteProperty(ApplicationUser user, String entityKey, String propertyKey)
EntityWithKeyPropertyService
This method checks if the calling user has permissions to edit the selected entity and if the property for given entity key and property key exists.
validateDeleteProperty
in interface EntityWithKeyPropertyService<E extends WithKey & WithId>
user
- who the permission checks will be run against (can be null, indicating anonymous user).entityKey
- the key of the entity with which the property is associated.propertyKey
- the key of the entity's property.public EntityPropertyService.DeletePropertyValidationResult validateDeleteProperty(ApplicationUser user, @NonNull String entityKey, @NonNull String propertyKey, @NonNull EntityPropertyOptions options)
EntityWithKeyPropertyService
This method checks if the property for given entity key and property key exists.
validateDeleteProperty
in interface EntityWithKeyPropertyService<E extends WithKey & WithId>
user
- who the permission checks will be run against (can be null, indicating anonymous user).entityKey
- the key of the entity with which the property is associated.propertyKey
- the key of the entity's property.options
- options to skip permission while performing the validation.public EntityPropertyService.PropertyResult getProperty(ApplicationUser user, String entityKey, String propertyKey)
EntityWithKeyPropertyService
This method checks if the calling user has permissions to browse the entities and if the entity with given key exists.
getProperty
in interface EntityWithKeyPropertyService<E extends WithKey & WithId>
user
- who the permission checks will be run against (can be null, indicating anonymous user).entityKey
- the key of the entity with which the property is associated.propertyKey
- the key of the entity's property.public EntityPropertyService.PropertyResult getProperty(ApplicationUser user, @NonNull String entityKey, @NonNull String propertyKey, @NonNull EntityPropertyOptions options)
EntityWithKeyPropertyService
This method checks if the entity with given key exists.
getProperty
in interface EntityWithKeyPropertyService<E extends WithKey & WithId>
user
- who the permission checks will be run against (can be null, indicating anonymous user).entityKey
- the key of the entity with which the property is associated.propertyKey
- the key of the entity's property.options
- options to skip permission while performing the validation.public EntityPropertyService.PropertyKeys<E> getPropertiesKeys(ApplicationUser user, String entityKey)
EntityWithKeyPropertyService
This method checks if the calling user has permissions to browse the entitys and if the entity with given id exists.
getPropertiesKeys
in interface EntityWithKeyPropertyService<E extends WithKey & WithId>
user
- who the permission checks will be run against (can be null, indicating anonymous user).entityKey
- the key of the entity with which the property is associated.public EntityPropertyService.PropertyKeys<E> getPropertiesKeys(ApplicationUser user, @NonNull String entityKey, @NonNull EntityPropertyOptions options)
EntityWithKeyPropertyService
This method checks if the entity with given id exists.
getPropertiesKeys
in interface EntityWithKeyPropertyService<E extends WithKey & WithId>
user
- who the permission checks will be run against (can be null, indicating anonymous user).entityKey
- the key of the entity with which the property is associated.options
- options to skip permission while performing the validation.Copyright © 2002-2018 Atlassian. All Rights Reserved.