com.atlassian.jira.bc.issue.properties
Class IssuePropertyHelper

java.lang.Object
  extended by com.atlassian.jira.bc.issue.properties.IssuePropertyHelper
All Implemented Interfaces:
EntityPropertyHelper<Issue>, EntityWithKeyPropertyHelper<Issue>

public class IssuePropertyHelper
extends Object
implements EntityWithKeyPropertyHelper<Issue>

Defines permission checking, events creation and persistence layer for IssuePropertyService.

Since:
v6.2

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.entity.property.EntityPropertyHelper
EntityPropertyHelper.CheckPermissionFunction<E extends WithId>
 
Constructor Summary
IssuePropertyHelper(I18nHelper i18n, IssueManager issueManager, PermissionManager permissionManager)
           
 
Method Summary
 com.atlassian.fugue.Function2<ApplicationUser,EntityProperty,IssuePropertyDeletedEvent> createDeletePropertyEventFunction()
           
 com.atlassian.fugue.Function2<ApplicationUser,EntityProperty,IssuePropertySetEvent> createSetPropertyEventFunction()
           
 com.google.common.base.Function<Long,com.atlassian.fugue.Option<Issue>> getEntityByIdFunction()
           
 com.google.common.base.Function<String,com.atlassian.fugue.Option<Issue>> getEntityByKeyFunction()
           
 EntityPropertyType getEntityPropertyType()
           
 EntityPropertyHelper.CheckPermissionFunction<Issue> hasEditPermissionFunction()
           
 EntityPropertyHelper.CheckPermissionFunction<Issue> hasReadPermissionFunction()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IssuePropertyHelper

public IssuePropertyHelper(I18nHelper i18n,
                           IssueManager issueManager,
                           PermissionManager permissionManager)
Method Detail

getEntityByKeyFunction

public com.google.common.base.Function<String,com.atlassian.fugue.Option<Issue>> getEntityByKeyFunction()
Specified by:
getEntityByKeyFunction in interface EntityWithKeyPropertyHelper<Issue>
Returns:
the function which will get the entity for the provided key.

hasEditPermissionFunction

public EntityPropertyHelper.CheckPermissionFunction<Issue> hasEditPermissionFunction()
Specified by:
hasEditPermissionFunction in interface EntityPropertyHelper<Issue>
Returns:
the function which will check if the provided user has permissions to edit the entity.

hasReadPermissionFunction

public EntityPropertyHelper.CheckPermissionFunction<Issue> hasReadPermissionFunction()
Specified by:
hasReadPermissionFunction in interface EntityPropertyHelper<Issue>
Returns:
the function which will check if the provided user has permissions to view the entity.

getEntityByIdFunction

public com.google.common.base.Function<Long,com.atlassian.fugue.Option<Issue>> getEntityByIdFunction()
Specified by:
getEntityByIdFunction in interface EntityPropertyHelper<Issue>
Returns:
the function which will get the entity for the provided id.

createSetPropertyEventFunction

public com.atlassian.fugue.Function2<ApplicationUser,EntityProperty,IssuePropertySetEvent> createSetPropertyEventFunction()
Specified by:
createSetPropertyEventFunction in interface EntityPropertyHelper<Issue>
Returns:
the function which will create an instance of EntityPropertySetEvent for the proper entity type.

createDeletePropertyEventFunction

public com.atlassian.fugue.Function2<ApplicationUser,EntityProperty,IssuePropertyDeletedEvent> createDeletePropertyEventFunction()
Specified by:
createDeletePropertyEventFunction in interface EntityPropertyHelper<Issue>
Returns:
the function which will create an instance of EntityPropertyDeletedEvent for the proper entity type.

getEntityPropertyType

public EntityPropertyType getEntityPropertyType()
Specified by:
getEntityPropertyType in interface EntityPropertyHelper<Issue>
Returns:
the type of the entity property.


Copyright © 2002-2014 Atlassian. All Rights Reserved.