@PublicApi
public interface FavouritesManager<S extends SharedEntity>
Modifier and Type | Method and Description |
---|---|
void |
addFavourite(ApplicationUser user,
S entity)
Add the given entity as a favourite of the user passed in add to favourites count if necessary.
|
void |
addFavourite(com.atlassian.crowd.embedded.api.User user,
S entity)
Deprecated.
Use
addFavourite(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity) instead. Since v6.0.
Add the given entity as a favourite of the user passed in add to favourites count if necessary. |
void |
addFavouriteInPosition(ApplicationUser user,
S entity,
long position)
Add the given entity as a favourite of the user passed in, in the specified position, add to favourites count if necessary.
|
void |
addFavouriteInPosition(com.atlassian.crowd.embedded.api.User user,
S entity,
long position)
Deprecated.
Use
addFavouriteInPosition(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity, long) instead. Since v6.0.
Add the given entity as a favourite of the user passed in, in the specified position, add to favourites count if necessary.
The entity currently in the specified position and all those after will be moved down one position. |
void |
decreaseFavouriteSequence(ApplicationUser user,
S entity)
Decreases the position of the
SharedEntity relative to the user's set of all other entities of the same type. |
void |
decreaseFavouriteSequence(com.atlassian.crowd.embedded.api.User user,
S entity)
Deprecated.
Use
decreaseFavouriteSequence(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity) instead. Since v6.0.
Decreases the position of the SharedEntity relative to the user's set of all other entities of the same type. |
Collection<Long> |
getFavouriteIds(ApplicationUser user,
SharedEntity.TypeDescriptor<S> entityType)
Get the ids of a user's favourite Entities for a given entity type
|
Collection<Long> |
getFavouriteIds(com.atlassian.crowd.embedded.api.User user,
SharedEntity.TypeDescriptor<S> entityType)
Deprecated.
Use
getFavouriteIds(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity.TypeDescriptor) instead. Since v6.0.
Get the ids of a user's favourite Entities for a given entity type |
void |
increaseFavouriteSequence(ApplicationUser user,
S entity)
Increases the position of the
SharedEntity relative to the user's set of all other entities of the same type. |
void |
increaseFavouriteSequence(com.atlassian.crowd.embedded.api.User user,
S entity)
Deprecated.
Use
increaseFavouriteSequence(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity) instead. Since v6.0.
Increases the position of the SharedEntity relative to the user's set of all other entities of the same type. |
boolean |
isFavourite(ApplicationUser user,
S entity)
Check to see if the given entity is a favourite of the user passed in.
|
boolean |
isFavourite(com.atlassian.crowd.embedded.api.User user,
S entity)
Deprecated.
Use
isFavourite(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity) instead. Since v6.0.
Check to see if the given entity is a favourite of the user passed in. |
void |
moveToEndFavouriteSequence(ApplicationUser user,
S entity)
Moves the position of the
SharedEntity to the end relative to the user's set of all other entities of the same type. |
void |
moveToEndFavouriteSequence(com.atlassian.crowd.embedded.api.User user,
S entity)
Deprecated.
Use
moveToEndFavouriteSequence(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity) instead. Since v6.0.
Moves the position of the SharedEntity to the end relative to the user's set of all other entities of the same type. |
void |
moveToStartFavouriteSequence(ApplicationUser user,
S entity)
Moves the position of the
SharedEntity to the start relative to the user's set of all other entities of the same type. |
void |
moveToStartFavouriteSequence(com.atlassian.crowd.embedded.api.User user,
S entity)
Deprecated.
Use
moveToStartFavouriteSequence(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity) instead. Since v6.0.
Moves the position of the SharedEntity to the start relative to the user's set of all other entities of the same type. |
void |
removeFavourite(ApplicationUser user,
S entity)
Remove the given entity as a favourite of the user passed in.
|
void |
removeFavourite(com.atlassian.crowd.embedded.api.User user,
S entity)
Deprecated.
Use
removeFavourite(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity) instead. Since v6.0.
Remove the given entity as a favourite of the user passed in. Remove even if user doesn't have permission to see it and adjust count of
favourites if necessary. |
void |
removeFavouritesForEntityDelete(SharedEntity entity)
Remove all favourite associations for a given entity for entity deletion.
|
void |
removeFavouritesForUser(ApplicationUser user,
SharedEntity.TypeDescriptor<S> entityType)
Remove the favourite associations for the given User and the given type
|
void |
removeFavouritesForUser(com.atlassian.crowd.embedded.api.User user,
SharedEntity.TypeDescriptor<S> entityType)
Deprecated.
Use
removeFavouritesForUser(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity.TypeDescriptor) instead. Since v6.0.
Remove the favourite associations for the given User and the given type |
void addFavourite(ApplicationUser user, S entity) throws PermissionException
user
- The user adding the favouriteentity
- The entity to favouritePermissionException
- when trying to add a filter as favourite when you have no permissionsvoid addFavourite(com.atlassian.crowd.embedded.api.User user, S entity) throws PermissionException
addFavourite(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity)
instead. Since v6.0.
Add the given entity as a favourite of the user passed in add to favourites count if necessary.user
- The user adding the favouriteentity
- The entity to favouritePermissionException
- when trying to add a filter as favourite when you have no permissionsvoid addFavouriteInPosition(ApplicationUser user, S entity, long position) throws PermissionException
user
- The user adding the favouriteentity
- The entity to favouriteposition
- the position in which this entity should be added in the favourites order.PermissionException
- when trying to add a filter as favourite when you have no permissionsvoid addFavouriteInPosition(com.atlassian.crowd.embedded.api.User user, S entity, long position) throws PermissionException
addFavouriteInPosition(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity, long)
instead. Since v6.0.
Add the given entity as a favourite of the user passed in, in the specified position, add to favourites count if necessary.
The entity currently in the specified position and all those after will be moved down one position.user
- The user adding the favouriteentity
- The entity to favouriteposition
- the position in which this entity should be added in the favourites order.PermissionException
- when trying to add a filter as favourite when you have no permissionsvoid removeFavourite(ApplicationUser user, S entity)
user
- The user removing the favouriteentity
- The entity to favouritevoid removeFavourite(com.atlassian.crowd.embedded.api.User user, S entity)
removeFavourite(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity)
instead. Since v6.0.
Remove the given entity as a favourite of the user passed in. Remove even if user doesn't have permission to see it and adjust count of
favourites if necessary.user
- The user removing the favouriteentity
- The entity to favouriteboolean isFavourite(ApplicationUser user, S entity) throws PermissionException
user
- The user checking the favouriteentity
- The entity to favouritePermissionException
- when checking a filter with no permissionboolean isFavourite(com.atlassian.crowd.embedded.api.User user, S entity) throws PermissionException
isFavourite(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity)
instead. Since v6.0.
Check to see if the given entity is a favourite of the user passed in.user
- The user checking the favouriteentity
- The entity to favouritePermissionException
- when checking a filter with no permissionCollection<Long> getFavouriteIds(ApplicationUser user, SharedEntity.TypeDescriptor<S> entityType)
user
- The user for the associated entities. Can not be null.entityType
- The type of entities to get. E.g. SearchRequest.ENTITY_TYPE. Can not be null.IllegalArgumentException
- for null user or entity typeCollection<Long> getFavouriteIds(com.atlassian.crowd.embedded.api.User user, SharedEntity.TypeDescriptor<S> entityType)
getFavouriteIds(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity.TypeDescriptor)
instead. Since v6.0.
Get the ids of a user's favourite Entities for a given entity typeuser
- The user for the associated entities. Can not be null.entityType
- The type of entities to get. E.g. SearchRequest.ENTITY_TYPE. Can not be null.IllegalArgumentException
- for null user or entity typevoid removeFavouritesForUser(ApplicationUser user, SharedEntity.TypeDescriptor<S> entityType)
user
- The ApplicationUser
with whom to disassociate entitiesentityType
- The type of entity to disassociate user with.void removeFavouritesForUser(com.atlassian.crowd.embedded.api.User user, SharedEntity.TypeDescriptor<S> entityType)
removeFavouritesForUser(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity.TypeDescriptor)
instead. Since v6.0.
Remove the favourite associations for the given User and the given typeuser
- The ApplicationUser
with whom to disassociate entitiesentityType
- The type of entity to disassociate user with.void removeFavouritesForEntityDelete(SharedEntity entity)
entity
- The entity that is being deletedvoid increaseFavouriteSequence(ApplicationUser user, S entity) throws PermissionException
SharedEntity
relative to the user's set of all other entities of the same type.user
- the user whom the entity belongs toentity
- The entity in questionPermissionException
- when the user does not have permission to perform the action.void increaseFavouriteSequence(com.atlassian.crowd.embedded.api.User user, S entity) throws PermissionException
increaseFavouriteSequence(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity)
instead. Since v6.0.
Increases the position of the SharedEntity
relative to the user's set of all other entities of the same type.user
- the user whom the entity belongs toentity
- The entity in questionPermissionException
- when the user does not have permission to perform the action.void decreaseFavouriteSequence(ApplicationUser user, S entity) throws PermissionException
SharedEntity
relative to the user's set of all other entities of the same type.user
- the user whom the entity belongs toentity
- The entity in questionPermissionException
- when the user does not have permission to perform the action.void decreaseFavouriteSequence(com.atlassian.crowd.embedded.api.User user, S entity) throws PermissionException
decreaseFavouriteSequence(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity)
instead. Since v6.0.
Decreases the position of the SharedEntity
relative to the user's set of all other entities of the same type.user
- the user whom the entity belongs toentity
- The entity in questionPermissionException
- when the user does not have permission to perform the action.void moveToStartFavouriteSequence(ApplicationUser user, S entity) throws PermissionException
SharedEntity
to the start relative to the user's set of all other entities of the same type.user
- the user whom the entity belongs toentity
- The entity in questionPermissionException
- when the user does not have permission to perform the action.void moveToStartFavouriteSequence(com.atlassian.crowd.embedded.api.User user, S entity) throws PermissionException
moveToStartFavouriteSequence(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity)
instead. Since v6.0.
Moves the position of the SharedEntity
to the start relative to the user's set of all other entities of the same type.user
- the user whom the entity belongs toentity
- The entity in questionPermissionException
- when the user does not have permission to perform the action.void moveToEndFavouriteSequence(ApplicationUser user, S entity) throws PermissionException
SharedEntity
to the end relative to the user's set of all other entities of the same type.user
- the user whom the entity belongs toentity
- The entity in questionPermissionException
- when the user does not have permission to perform the action.void moveToEndFavouriteSequence(com.atlassian.crowd.embedded.api.User user, S entity) throws PermissionException
moveToEndFavouriteSequence(com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.sharing.SharedEntity)
instead. Since v6.0.
Moves the position of the SharedEntity
to the end relative to the user's set of all other entities of the same type.user
- the user whom the entity belongs toentity
- The entity in questionPermissionException
- when the user does not have permission to perform the action.Copyright © 2002-2015 Atlassian. All Rights Reserved.