Class AbstractEntityPropertyConditionHelper<T extends WithId>
java.lang.Object
com.atlassian.jira.entity.property.AbstractEntityPropertyConditionHelper<T>
- Type Parameters:
T- - the type of entity
- All Implemented Interfaces:
EntityPropertyConditionHelper
- Direct Known Subclasses:
CommentPropertyConditionHelper,DashboardItemPropertyConditionHelper,IssuePropertyConditionHelper,IssueTypePropertyConditionHelper,ProjectPropertyConditionHelper,UserPropertyConditionHelper
@PublicApi
public abstract class AbstractEntityPropertyConditionHelper<T extends WithId>
extends Object
implements EntityPropertyConditionHelper
Base class for entity property conditions.
- Since:
- v7.1
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractEntityPropertyConditionHelper(EntityPropertyService<T> propertyService, Class<T> propertyEntityType, String entityName) -
Method Summary
Modifier and TypeMethodDescriptiongetEntityId(JiraWebContext context) This implementation expects to find the entity of the classTin the context by the"entityName"key.final StringgetProperty(ApplicationUser user, Long entityId, String propertyKey) Returns the entity property for the given and .
-
Constructor Details
-
AbstractEntityPropertyConditionHelper
protected AbstractEntityPropertyConditionHelper(EntityPropertyService<T> propertyService, Class<T> propertyEntityType, String entityName)
-
-
Method Details
-
getEntityId
This implementation expects to find the entity of the classTin the context by the"entityName"key. ID is then taken directly from this entity.- Specified by:
getEntityIdin interfaceEntityPropertyConditionHelper- Parameters:
context- - context of the web element for which the condition is evaluated.- Returns:
- ID of the entity taken from context or empty.
-
getEntityName
- Specified by:
getEntityNamein interfaceEntityPropertyConditionHelper- Returns:
- the name of the entity.
-
getProperty
public final EntityPropertyService.PropertyResult getProperty(ApplicationUser user, Long entityId, String propertyKey) Description copied from interface:EntityPropertyConditionHelperReturns the entity property for the given and .- Specified by:
getPropertyin interfaceEntityPropertyConditionHelper- Parameters:
user- - authenticated user, who retrieves the property.entityId- - id of the entity.propertyKey- - key of the property to retrieve.- Returns:
- the property of invalid if the property does not exist.
-