public class

DelegatingEntityWithKeyPropertyService

extends DelegatingEntityPropertyService<E extends WithId>
implements EntityWithKeyPropertyService<T extends WithId & WithKey>
java.lang.Object
   ↳ com.atlassian.jira.entity.property.DelegatingEntityPropertyService<E extends com.atlassian.jira.entity.WithId>
     ↳ com.atlassian.jira.entity.property.DelegatingEntityWithKeyPropertyService<E extends com.atlassian.jira.entity.WithId & com.atlassian.jira.entity.WithKey>
Known Direct Subclasses

Class Overview

Delegates execution of methods from EntityWithKeyPropertyService to an instance of BaseEntityWithKeyPropertyService.

Summary

Public Constructors
DelegatingEntityWithKeyPropertyService(BaseEntityWithKeyPropertyService<E> delegate)
Public Methods
PropertyKeys<E> getPropertiesKeys(ApplicationUser user, String entityKey)
Returns the properties keys associated with the specified entity.
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.
[Expand]
Inherited Methods
From class com.atlassian.jira.entity.property.DelegatingEntityPropertyService
From class java.lang.Object
From interface com.atlassian.jira.entity.property.EntityPropertyService
From interface com.atlassian.jira.entity.property.EntityWithKeyPropertyService

Public Constructors

public DelegatingEntityWithKeyPropertyService (BaseEntityWithKeyPropertyService<E> delegate)

Public Methods

public PropertyKeys<E> getPropertiesKeys (ApplicationUser user, String entityKey)

Returns the properties keys associated with the specified entity.

This method checks if the calling user has permissions to browse the entitys and if the entity with given id exists.

Parameters
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.
Returns
  • the list of properties keys and associated entity or a collection with errors.

public PropertyKeys<E> getPropertiesKeys (ApplicationUser user, String entityKey, EntityPropertyOptions options)

Returns the properties keys associated with the specified entity.

This method checks if the entity with given id exists.

Parameters
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.
Returns
  • the list of properties keys and associated entity or a collection with errors.

public EntityPropertyService.PropertyResult getProperty (ApplicationUser user, String entityKey, String propertyKey)

Returns the JSON property with the specified key from specified entity.

This method checks if the calling user has permissions to browse the entities and if the entity with given key exists.

Parameters
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.
Returns
  • the chosen property of the entity if found or the error collection.

public EntityPropertyService.PropertyResult getProperty (ApplicationUser user, String entityKey, String propertyKey, EntityPropertyOptions options)

Returns the JSON property with the specified key from specified entity.

This method checks if the entity with given key exists.

Parameters
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.
Returns
  • the chosen property of the entity if found or the error collection.

public 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.

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.

Parameters
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.
Returns
  • either entity ready to be removed or collection of errors.

public 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.

This method checks if the property for given entity key and property key exists.

Parameters
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.
Returns
  • either entity ready to be removed or collection of errors.

public EntityPropertyService.SetPropertyValidationResult validateSetProperty (ApplicationUser user, String entityKey, EntityPropertyService.PropertyInput propertyInput)

Checks if the provided entity's property is valid.

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.

Parameters
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.
Returns
  • either entity ready to be persisted in DB or collection of errors.

public EntityPropertyService.SetPropertyValidationResult validateSetProperty (ApplicationUser user, String entityKey, EntityPropertyService.PropertyInput propertyInput, EntityPropertyOptions options)

Checks if the provided entity's property is valid.

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.

Parameters
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.
Returns
  • either entity ready to be persisted in DB or collection of errors.