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 TypeMethodDescriptionbooleanassociationExists(String associationType, ApplicationUser user, String sinkNodeEntity, Long sinkNodeId) Tests if the given association exists.voidcreateAssociation(String associationType, ApplicationUser user, Issue sink) Creates an association between a user and a sink node.voidcreateAssociation(String associationType, ApplicationUser user, org.ofbiz.core.entity.GenericValue sink) Creates an association between a user and a sink node.voidcreateAssociation(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.voidremoveAssociation(String associationType, ApplicationUser user, Issue sink) Removes an association between a user and a sink node.voidremoveAssociation(String associationType, String userkey, String sinkNodeEntity, Long sinkNodeId) Removes an association between a user and a sink node.voidremoveUserAssociationsFromSink(String sinkNodeEntity, Long sinkNodeId) Removes all User Associations for this SinkvoidremoveUserAssociationsFromUser(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:UserAssociationStoreCreates an association between a user and a sink node.- Specified by:
createAssociationin interfaceUserAssociationStore- Parameters:
associationType- the Association typeuser- the user to associate with the sink node.sink- the sink node
-
createAssociation
Description copied from interface:UserAssociationStoreCreates an association between a user and a sink node.- Specified by:
createAssociationin 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:UserAssociationStoreCreates an association between a user and a sink node.- Specified by:
createAssociationin 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:UserAssociationStoreRemoves an association between a user and a sink node.- Specified by:
removeAssociationin 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:UserAssociationStoreRemoves an association between a user and a sink node.- Specified by:
removeAssociationin 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:UserAssociationStoreRemoves all User Associations for this User of the given associationType- Specified by:
removeUserAssociationsFromUserin interfaceUserAssociationStore- Parameters:
associationType- the Association typeuser- the UsersinkNodeEntity- The entity name of the sink node (eg "Issue").
-
removeUserAssociationsFromSink
Description copied from interface:UserAssociationStoreRemoves all User Associations for this Sink- Specified by:
removeUserAssociationsFromSinkin 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:UserAssociationStoreTests if the given association exists.- Specified by:
associationExistsin 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:UserAssociationStoreFinds and returns a list of Users associated with a given sink.- Specified by:
getUsersFromSinkin 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:UserAssociationStoreFinds and returns a list of usernames associated with a given sink.- Specified by:
getUsernamesFromSinkin 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:UserAssociationStoreFinds and returns a list of userkeys associated with a given sink.- Specified by:
getUserkeysFromSinkin 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:
getUserkeysFromIssuein interfaceUserAssociationStore
-
getSinksFromUser
public List<org.ofbiz.core.entity.GenericValue> getSinksFromUser(String associationType, ApplicationUser user, String sinkNodeEntity) Description copied from interface:UserAssociationStoreReturns all the sinks that are associated with the given User.- Specified by:
getSinksFromUserin 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.
-