|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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.
public EntityPropertyService.SetPropertyValidationResult validateSetProperty(ApplicationUser user,
@Nonnull
Long entityId,
@Nonnull
EntityPropertyService.PropertyInput propertyInput,
@Nonnull
EntityPropertyOptions options)
EntityPropertyService
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 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.options - options to skip permission while performing the validation.
protected EntityPropertyService.SetPropertyValidationResult validateSetProperty(ApplicationUser user,
com.atlassian.fugue.Option<E> entity,
EntityPropertyService.PropertyInput propertyInput,
EntityPropertyOptions options)
public ErrorCollection validatePropertyInput(EntityPropertyService.PropertyInput propertyInput)
EntityPropertyService
validatePropertyInput in interface EntityPropertyService<E extends WithId>propertyInput - the key and value of the property.
public EntityPropertyService.PropertyResult setProperty(ApplicationUser user,
@Nonnull
EntityPropertyService.SetPropertyValidationResult propertyValidationResult)
EntityPropertyServiceEntityPropertySetEvent 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)
EntityPropertyServiceThis 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.
public EntityPropertyService.DeletePropertyValidationResult validateDeleteProperty(ApplicationUser user,
@Nonnull
Long entityId,
@Nonnull
String propertyKey,
@Nonnull
EntityPropertyOptions options)
EntityPropertyServiceThis method checks 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.options - options to skip permission while performing the validation.
protected EntityPropertyService.DeletePropertyValidationResult validateDeleteProperty(ApplicationUser user,
com.atlassian.fugue.Option<E> entity,
@Nonnull
String propertyKey,
@Nonnull
EntityPropertyOptions options)
public void deleteProperty(ApplicationUser user,
@Nonnull
EntityPropertyService.DeletePropertyValidationResult validationResult)
EntityPropertyServiceEntityPropertyDeletedEvent 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)
EntityPropertyServiceThis method checks if the calling user has permissions to browse the entities 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.
public EntityPropertyService.PropertyResult getProperty(ApplicationUser user,
@Nonnull
Long entityId,
@Nonnull
String propertyKey,
@Nonnull
EntityPropertyOptions options)
EntityPropertyServiceThis method checks 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.options - options to skip permission while performing the validation.
protected EntityPropertyService.PropertyResult getProperty(ApplicationUser user,
com.atlassian.fugue.Option<E> entity,
@Nonnull
String propertyKey,
EntityPropertyOptions options)
public EntityPropertyService.PropertyKeys<E> getPropertiesKeys(ApplicationUser user,
Long entityId)
EntityPropertyServiceThis 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.
public EntityPropertyService.PropertyKeys<E> getPropertiesKeys(ApplicationUser user,
@Nonnull
Long entityId,
@Nonnull
EntityPropertyOptions options)
EntityPropertyServiceThis method checks 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.options - options to skip permission while performing the validation.
protected EntityPropertyService.PropertyKeys<E> getPropertiesKeys(ApplicationUser user,
com.atlassian.fugue.Option<E> entity,
EntityPropertyOptions options)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||