public interface

UserAssociationStore

com.atlassian.jira.association.UserAssociationStore
Known Indirect Subclasses

Class Overview

This Store is used to work with relationships between Users and other objects.

Summary

Public Methods
boolean associationExists(String associationType, ApplicationUser user, String sinkNodeEntity, Long sinkNodeId)
Tests if the given association exists.
boolean associationExists(String associationType, User user, String sinkNodeEntity, Long sinkNodeId)
This method is deprecated. Use associationExists(String, com.atlassian.jira.user.ApplicationUser, String, Long) instead. Since v6.0.
void createAssociation(String associationType, ApplicationUser user, Issue sink)
Creates an association between a user and a sink node.
void createAssociation(String associationType, String userkey, String sinkNodeEntity, Long sinkNodeId)
Creates an association between a user and a sink node.
void createAssociation(String associationType, ApplicationUser user, GenericValue sink)
Creates an association between a user and a sink node.
List<GenericValue> getSinksFromUser(String associationType, ApplicationUser user, String sinkNodeEntity)
Returns all the sinks that are associated with the given User.
Collection<String> getUserkeysFromIssue(String associationType, Long issueId)
Collection<String> getUserkeysFromSink(String associationType, String sinkNodeEntity, Long sinkNodeId)
Finds and returns a list of userkeys associated with a given sink.
List<String> getUsernamesFromSink(String associationType, GenericValue sink)
Finds and returns a list of usernames associated with a given sink.
List<ApplicationUser> getUsersFromSink(String associationType, GenericValue sink)
Finds and returns a list of Users associated with a given sink.
void removeAssociation(String associationType, String userkey, String sinkNodeEntity, Long sinkNodeId)
Removes an association between a user and a sink node.
void removeAssociation(String associationType, ApplicationUser user, Issue sink)
Removes an association between a user and a sink node.
void removeUserAssociationsFromSink(String sinkNodeEntity, Long sinkNodeId)
Removes all User Associations for this Sink
void removeUserAssociationsFromUser(String associationType, ApplicationUser user, String sinkNodeEntity)
Removes all User Associations for this User of the given associationType

Public Methods

public boolean associationExists (String associationType, ApplicationUser user, String sinkNodeEntity, Long sinkNodeId)

Tests if the given association exists.

Parameters
associationType the Association type
user the User
sinkNodeEntity The entity name of the sink node (eg "Issue").
sinkNodeId The id of the sink node.
Returns
  • true if the given association exists.

public boolean associationExists (String associationType, User user, String sinkNodeEntity, Long sinkNodeId)

This method is deprecated.
Use associationExists(String, com.atlassian.jira.user.ApplicationUser, String, Long) instead. Since v6.0.

Tests if the given association exists.

Parameters
associationType the Association type
user the User
sinkNodeEntity The entity name of the sink node (eg "Issue").
sinkNodeId The id of the sink node.
Returns
  • true if the given association exists.

public void createAssociation (String associationType, ApplicationUser user, Issue sink)

Creates an association between a user and a sink node.

Parameters
associationType the Association type
user the user to associate with the sink node.
sink the sink node

public void createAssociation (String associationType, String userkey, String sinkNodeEntity, Long sinkNodeId)

Creates an association between a user and a sink node.

Parameters
associationType the Association type
userkey the user name to associate with the sink node.
sinkNodeEntity the entity name of the sink node
sinkNodeId the id of the sink node entity

public void createAssociation (String associationType, ApplicationUser user, GenericValue sink)

Creates an association between a user and a sink node.

Parameters
associationType the Association type
user the user to associate with the sink node.
sink the sink node

public List<GenericValue> getSinksFromUser (String associationType, ApplicationUser user, String sinkNodeEntity)

Returns all the sinks that are associated with the given User.

Parameters
associationType the Association type
user the User
sinkNodeEntity The entity name of the sink node (eg "Issue").
Returns
  • all the sinks that are associated with the given User.

public Collection<String> getUserkeysFromIssue (String associationType, Long issueId)

public Collection<String> getUserkeysFromSink (String associationType, String sinkNodeEntity, Long sinkNodeId)

Finds and returns a list of userkeys associated with a given sink.

Parameters
associationType the Association type
sinkNodeEntity The entity name of the sink node (eg "Issue").
sinkNodeId The id of the sink node.
Returns
  • a list of associated usernames (never null)

public List<String> getUsernamesFromSink (String associationType, GenericValue sink)

Finds and returns a list of usernames associated with a given sink.

Parameters
associationType the Association type
sink the sink node
Returns
  • a list of associated usernames (never null)

public List<ApplicationUser> getUsersFromSink (String associationType, GenericValue sink)

Finds and returns a list of Users associated with a given sink.

Parameters
associationType the Association type
sink the sink node
Returns
  • a list of associated Users (never null)

public void removeAssociation (String associationType, String userkey, String sinkNodeEntity, Long sinkNodeId)

Removes an association between a user and a sink node.

Parameters
associationType the Association type
userkey the user to associate with the sink node.
sinkNodeEntity the entity name of the sink node
sinkNodeId the id of the sink node entity

public void removeAssociation (String associationType, ApplicationUser user, Issue sink)

Removes an association between a user and a sink node.

Parameters
associationType the Association type
user the user to associate with the sink node.
sink the sink node

public void removeUserAssociationsFromSink (String sinkNodeEntity, Long sinkNodeId)

Removes all User Associations for this Sink

Parameters
sinkNodeEntity The entity name of the sink node (eg "Issue").
sinkNodeId the id of the sink node entity

public void removeUserAssociationsFromUser (String associationType, ApplicationUser user, String sinkNodeEntity)

Removes all User Associations for this User of the given associationType

Parameters
associationType the Association type
user the User
sinkNodeEntity The entity name of the sink node (eg "Issue").