|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.entity.property.BaseEntityPropertyService<E>
E
- the entity type which is identifiable by id.@ExperimentalApi public class BaseEntityPropertyService<E extends WithId>
The base implementation of EntityPropertyService
.
BaseEntityWithKeyPropertyService
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.jira.entity.property.EntityPropertyService |
---|
EntityPropertyService.DeletePropertyValidationResult, EntityPropertyService.EntityPropertyInput, EntityPropertyService.PropertyInput, EntityPropertyService.PropertyKeys<E>, EntityPropertyService.PropertyResult, EntityPropertyService.PropertyServiceResult, EntityPropertyService.SetPropertyValidationResult |
Constructor Summary | |
---|---|
BaseEntityPropertyService(JsonEntityPropertyManager jsonEntityPropertyManager,
I18nHelper i18n,
com.atlassian.event.api.EventPublisher eventPublisher,
EntityPropertyHelper<E> entityPropertyHelper)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseEntityPropertyService(JsonEntityPropertyManager jsonEntityPropertyManager, I18nHelper i18n, com.atlassian.event.api.EventPublisher eventPublisher, EntityPropertyHelper<E> entityPropertyHelper)
Method Detail |
---|
public EntityPropertyService.SetPropertyValidationResult validateSetProperty(ApplicationUser user, Long entityId, EntityPropertyService.PropertyInput propertyInput)
EntityPropertyService
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 EntityPropertyService<E extends WithId>
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.
protected EntityPropertyService.SetPropertyValidationResult validateSetProperty(ApplicationUser user, com.atlassian.fugue.Option<E> entity, EntityPropertyService.PropertyInput propertyInput)
public EntityPropertyService.PropertyResult setProperty(ApplicationUser user, @NotNull EntityPropertyService.SetPropertyValidationResult propertyValidationResult)
EntityPropertyService
EntityPropertySetEvent
is published.
setProperty
in interface EntityPropertyService<E extends WithId>
user
- who the permission checks will be run against (can be null, indicating anonymous user).propertyValidationResult
- validated entity property.
public EntityPropertyService.DeletePropertyValidationResult validateDeleteProperty(ApplicationUser user, Long entityId, String propertyKey)
EntityPropertyService
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.
validateDeleteProperty
in interface EntityPropertyService<E extends WithId>
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.
protected EntityPropertyService.DeletePropertyValidationResult validateDeleteProperty(ApplicationUser user, com.atlassian.fugue.Option<E> entity, @NotNull String propertyKey)
public void deleteProperty(ApplicationUser user, @NotNull EntityPropertyService.DeletePropertyValidationResult validationResult)
EntityPropertyService
EntityPropertyDeletedEvent
is published.
deleteProperty
in interface EntityPropertyService<E extends WithId>
user
- who the permission checks will be run against (can be null, indicating anonymous user).validationResult
- validation results of entity's property removal.public EntityPropertyService.PropertyResult getProperty(ApplicationUser user, Long entityId, String propertyKey)
EntityPropertyService
This method checks if the calling user has permissions to browse the entitys and if the entity with given id exists.
getProperty
in interface EntityPropertyService<E extends WithId>
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.
protected EntityPropertyService.PropertyResult getProperty(ApplicationUser user, com.atlassian.fugue.Option<E> entity, @NotNull String propertyKey)
public EntityPropertyService.PropertyKeys<E> getPropertiesKeys(ApplicationUser user, Long entityId)
EntityPropertyService
This method checks if the calling user has permissions to browse the entities and if the entity with given id exists.
getPropertiesKeys
in interface EntityPropertyService<E extends WithId>
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.
protected EntityPropertyService.PropertyKeys<E> getPropertiesKeys(ApplicationUser user, com.atlassian.fugue.Option<E> entity)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |