Package com.atlassian.jira.association
Class UserAssociationStoreImpl
java.lang.Object
com.atlassian.jira.association.UserAssociationStoreImpl
- All Implemented Interfaces:
UserAssociationStore
- Since:
- v4.3
-
Constructor Summary
ConstructorsConstructorDescriptionUserAssociationStoreImpl
(OfBizDelegator ofBizDelegator, UserManager userManager) -
Method Summary
Modifier and TypeMethodDescriptionboolean
associationExists
(String associationType, ApplicationUser user, String sinkNodeEntity, Long sinkNodeId) Tests if the given association exists.void
createAssociation
(String associationType, ApplicationUser user, Issue sink) Creates an association between a user and a sink node.void
createAssociation
(String associationType, ApplicationUser user, org.ofbiz.core.entity.GenericValue sink) Creates an association between a user and a sink node.void
createAssociation
(String associationType, String userName, String sinkNodeEntity, Long sinkNodeId) Creates an association between a user and a sink node.List<org.ofbiz.core.entity.GenericValue>
getSinksFromUser
(String associationType, ApplicationUser user, String sinkNodeEntity) Returns all the sinks that are associated with the given User.getUserkeysFromIssue
(String associationType, Long issueId) getUserkeysFromSink
(String associationType, String sinkNodeEntity, Long sinkNodeId) Finds and returns a list of userkeys associated with a given sink.getUsernamesFromSink
(String associationType, org.ofbiz.core.entity.GenericValue sink) Finds and returns a list of usernames associated with a given sink.getUsersFromSink
(String associationType, org.ofbiz.core.entity.GenericValue sink) Finds and returns a list of Users associated with a given sink.void
removeAssociation
(String associationType, ApplicationUser user, Issue sink) Removes an association between a user and a sink node.void
removeAssociation
(String associationType, String userkey, String sinkNodeEntity, Long sinkNodeId) Removes an association between a user and a sink node.void
removeUserAssociationsFromSink
(String sinkNodeEntity, Long sinkNodeId) Removes all User Associations for this Sinkvoid
removeUserAssociationsFromUser
(String associationType, ApplicationUser user, String sinkNodeEntity) Removes all User Associations for this User of the given associationType
-
Constructor Details
-
UserAssociationStoreImpl
-
-
Method Details
-
createAssociation
public void createAssociation(String associationType, ApplicationUser user, org.ofbiz.core.entity.GenericValue sink) Description copied from interface:UserAssociationStore
Creates an association between a user and a sink node.- Specified by:
createAssociation
in interfaceUserAssociationStore
- Parameters:
associationType
- the Association typeuser
- the user to associate with the sink node.sink
- the sink node
-
createAssociation
Description copied from interface:UserAssociationStore
Creates an association between a user and a sink node.- Specified by:
createAssociation
in interfaceUserAssociationStore
- Parameters:
associationType
- the Association typeuser
- the user to associate with the sink node.sink
- the sink node
-
createAssociation
public void createAssociation(String associationType, String userName, String sinkNodeEntity, Long sinkNodeId) Description copied from interface:UserAssociationStore
Creates an association between a user and a sink node.- Specified by:
createAssociation
in interfaceUserAssociationStore
- Parameters:
associationType
- the Association typeuserName
- the user name to associate with the sink node.sinkNodeEntity
- the entity name of the sink nodesinkNodeId
- the id of the sink node entity
-
removeAssociation
public void removeAssociation(String associationType, String userkey, String sinkNodeEntity, Long sinkNodeId) Description copied from interface:UserAssociationStore
Removes an association between a user and a sink node.- Specified by:
removeAssociation
in interfaceUserAssociationStore
- Parameters:
associationType
- the Association typeuserkey
- the user to associate with the sink node.sinkNodeEntity
- the entity name of the sink nodesinkNodeId
- the id of the sink node entity
-
removeAssociation
Description copied from interface:UserAssociationStore
Removes an association between a user and a sink node.- Specified by:
removeAssociation
in interfaceUserAssociationStore
- Parameters:
associationType
- the Association typeuser
- the user to associate with the sink node.sink
- the sink node
-
removeUserAssociationsFromUser
public void removeUserAssociationsFromUser(String associationType, ApplicationUser user, String sinkNodeEntity) Description copied from interface:UserAssociationStore
Removes all User Associations for this User of the given associationType- Specified by:
removeUserAssociationsFromUser
in interfaceUserAssociationStore
- Parameters:
associationType
- the Association typeuser
- the UsersinkNodeEntity
- The entity name of the sink node (eg "Issue").
-
removeUserAssociationsFromSink
Description copied from interface:UserAssociationStore
Removes all User Associations for this Sink- Specified by:
removeUserAssociationsFromSink
in interfaceUserAssociationStore
- Parameters:
sinkNodeEntity
- The entity name of the sink node (eg "Issue").sinkNodeId
- the id of the sink node entity
-
associationExists
public boolean associationExists(String associationType, ApplicationUser user, String sinkNodeEntity, Long sinkNodeId) Description copied from interface:UserAssociationStore
Tests if the given association exists.- Specified by:
associationExists
in interfaceUserAssociationStore
- Parameters:
associationType
- the Association typeuser
- the UsersinkNodeEntity
- The entity name of the sink node (eg "Issue").sinkNodeId
- The id of the sink node.- Returns:
- true if the given association exists.
-
getUsersFromSink
public List<ApplicationUser> getUsersFromSink(String associationType, org.ofbiz.core.entity.GenericValue sink) Description copied from interface:UserAssociationStore
Finds and returns a list of Users associated with a given sink.- Specified by:
getUsersFromSink
in interfaceUserAssociationStore
- Parameters:
associationType
- the Association typesink
- the sink node- Returns:
- a list of associated Users (never null)
-
getUsernamesFromSink
public List<String> getUsernamesFromSink(String associationType, org.ofbiz.core.entity.GenericValue sink) Description copied from interface:UserAssociationStore
Finds and returns a list of usernames associated with a given sink.- Specified by:
getUsernamesFromSink
in interfaceUserAssociationStore
- Parameters:
associationType
- the Association typesink
- the sink node- Returns:
- a list of associated usernames (never null)
-
getUserkeysFromSink
public Collection<String> getUserkeysFromSink(String associationType, String sinkNodeEntity, Long sinkNodeId) Description copied from interface:UserAssociationStore
Finds and returns a list of userkeys associated with a given sink.- Specified by:
getUserkeysFromSink
in interfaceUserAssociationStore
- Parameters:
associationType
- the Association typesinkNodeEntity
- The entity name of the sink node (eg "Issue").sinkNodeId
- The id of the sink node.- Returns:
- a list of associated usernames (never null)
-
getUserkeysFromIssue
- Specified by:
getUserkeysFromIssue
in interfaceUserAssociationStore
-
getSinksFromUser
public List<org.ofbiz.core.entity.GenericValue> getSinksFromUser(String associationType, ApplicationUser user, String sinkNodeEntity) Description copied from interface:UserAssociationStore
Returns all the sinks that are associated with the given User.- Specified by:
getSinksFromUser
in interfaceUserAssociationStore
- Parameters:
associationType
- the Association typeuser
- the UsersinkNodeEntity
- The entity name of the sink node (eg "Issue").- Returns:
- all the sinks that are associated with the given User.
-