T
- - the type of entity@PublicApi public abstract class AbstractEntityPropertyConditionHelper<T extends WithId> extends Object implements EntityPropertyConditionHelper
Modifier | Constructor and Description |
---|---|
protected |
AbstractEntityPropertyConditionHelper(EntityPropertyService<T> propertyService,
Class<T> propertyEntityType,
String entityName) |
Modifier and Type | Method and Description |
---|---|
Optional<Long> |
getEntityId(JiraWebContext context)
This implementation expects to find the entity of the class
T in the context by the "entityName" key. |
String |
getEntityName() |
EntityPropertyService.PropertyResult |
getProperty(ApplicationUser user,
Long entityId,
String propertyKey)
Returns the entity property for the given and .
|
protected AbstractEntityPropertyConditionHelper(EntityPropertyService<T> propertyService, Class<T> propertyEntityType, String entityName)
public Optional<Long> getEntityId(JiraWebContext context)
T
in the context by the "entityName"
key.
ID is then taken directly from this entity.getEntityId
in interface EntityPropertyConditionHelper
context
- - context of the web element for which the condition is evaluated.public final String getEntityName()
getEntityName
in interface EntityPropertyConditionHelper
public final EntityPropertyService.PropertyResult getProperty(ApplicationUser user, Long entityId, String propertyKey)
EntityPropertyConditionHelper
getProperty
in interface EntityPropertyConditionHelper
user
- - authenticated user, who retrieves the property.entityId
- - id of the entity.propertyKey
- - key of the property to retrieve.Copyright © 2002-2024 Atlassian. All Rights Reserved.