com.atlassian.jira.entity.property.EntityPropertyService<T extends com.atlassian.jira.entity.WithId> |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
The service used to add, update, retrieve and delete properties from entities. Each method of this service ensures that the user has permission to perform the operation. For each operation an appropriate event is published.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
EntityPropertyService.DeletePropertyValidationResult | |||||||||||
EntityPropertyService.EntityPropertyInput | Tuple with property value, property key, entity id and entity name, which will be persisted by the service. | ||||||||||
EntityPropertyService.PropertyInput | The key-value pair associated to the entity. | ||||||||||
EntityPropertyService.PropertyKeys<E> | |||||||||||
EntityPropertyService.PropertyResult | |||||||||||
EntityPropertyService.PropertyServiceResult | |||||||||||
EntityPropertyService.SetPropertyValidationResult |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Removes the entity property with specified entity's id and entity's property key.
| |||||||||||
Returns properties with specified keys.
| |||||||||||
Returns all properties.
| |||||||||||
Returns the properties keys associated with the specified entity.
| |||||||||||
Returns the properties keys associated with the specified entity.
| |||||||||||
Returns the JSON property with the specified key from specified entity.
| |||||||||||
Returns the JSON property with the specified key from specified entity.
| |||||||||||
Associates validated property with the entity.
| |||||||||||
Check if it is possible to remove the entity property with specified entity's id and entity's property key.
| |||||||||||
Check if it is possible to remove the entity property with specified entity's id and entity's property key.
| |||||||||||
Validates the property's key and property's value without permission checking.
| |||||||||||
Checks if the provided entity's property is valid.
| |||||||||||
Checks if the provided entity's property is valid.
|
Removes the entity property with specified entity's id and entity's property key.
Upon successful removal, EntityPropertyDeletedEvent
is published.
user | who the permission checks will be run against (can be null, indicating anonymous user). |
---|---|
validationResult | validation results of entity's property removal. |
Returns properties with specified keys. Only properties that exist will be returned, non-existent keys are ignored. If the user does not have permissions to read properties of the entity, empty list will be returned.
user | who the permission checks will be run against (can be null, indicating anonymous user). |
---|---|
entityId | the id of the entity with which the properties are associated. |
propertyKeys | the keys of the requested properties |
Returns all properties. If the user does not have permissions to read properties of the entity, empty list will be returned.
user | who the permission checks will be run against (can be null, indicating anonymous user). |
---|---|
entityId | the id of the entity with which the properties are associated. |
Returns the properties keys associated with the specified entity.
This method checks if the calling user has permissions to browse the entities and if the entity with given id exists.
user | who the permission checks will be run against (can be null, indicating anonymous user). |
---|---|
entityId | the id of the entity with which the property is associated. |
Returns the properties keys associated with the specified entity.
This method checks if the entity with given id exists.
user | who the permission checks will be run against (can be null, indicating anonymous user). |
---|---|
entityId | the id of the entity with which the property is associated. |
options | options to skip permission while performing the validation. |
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 id exists.
user | who the permission checks will be run against (can be null, indicating anonymous user). |
---|---|
entityId | the id of the entity with which the property is associated. |
propertyKey | the key of the entity's property. |
Returns the JSON property with the specified key from specified entity.
This method checks if the entity with given id exists.
user | who the permission checks will be run against (can be null, indicating anonymous user). |
---|---|
entityId | the id 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. |
Associates validated property with the entity. Upon successful set an instance of
EntityPropertySetEvent
is published.
user | who the permission checks will be run against (can be null, indicating anonymous user). |
---|---|
propertyValidationResult | validated entity property. |
Check if it is possible to remove the entity property with specified entity's id and entity's property key.
This method checks if the property for given entity id and property key exists.
user | who the permission checks will be run against (can be null, indicating anonymous user). |
---|---|
entityId | the id 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. |
Check if it is possible to remove the entity property with specified entity's id 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 id and property key exists.
user | who the permission checks will be run against (can be null, indicating anonymous user). |
---|---|
entityId | the id of the entity with which the property is associated. |
propertyKey | the key of the entity's property. |
Validates the property's key and property's value without permission checking.
propertyInput | the key and value of the property. |
---|
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
.
user | who the permission checks will be run against (can be null, indicating anonymous user). |
---|---|
entityId | the id 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. |
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
.
user | who the permission checks will be run against (can be null, indicating anonymous user). |
---|---|
entityId | the id of the entity with which the property will be associated. |
propertyInput | the pair of key and value which will be associated with the entity. |