com.atlassian.jira.favourites.FavouritesManager<S extends com.atlassian.jira.sharing.SharedEntity> |
![]() |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
Manager for basic Favourites functionality. Used for adding, removing and checking favourites of generic entities. It also adjusts favourite counts for entities
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add the given entity as a favourite of the user passed in add to favourites count if necessary.
| |||||||||||
Add the given entity as a favourite of the user passed in, in the specified position, add to favourites count if necessary.
| |||||||||||
Decreases the position of the
SharedEntity relative to the user's set of all other entities of the same type. | |||||||||||
Get the ids of a user's favourite Entities for a given entity type
| |||||||||||
Increases the position of the
SharedEntity relative to the user's set of all other entities of the same type. | |||||||||||
Check to see if the given entity is a favourite of the user passed in.
| |||||||||||
Moves the position of the
SharedEntity to the end relative to the user's set of all other entities of the same type. | |||||||||||
Moves the position of the
SharedEntity to the start relative to the user's set of all other entities of the same type. | |||||||||||
Remove the given entity as a favourite of the user passed in.
| |||||||||||
Remove all favourite associations for a given entity for entity deletion.
| |||||||||||
Remove the favourite associations for the given User and the given type
|
Add the given entity as a favourite of the user passed in add to favourites count if necessary.
user | The user adding the favourite |
---|---|
entity | The entity to favourite |
PermissionException | when trying to add a filter as favourite when you have no permissions |
---|
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 favourite |
---|---|
entity | The entity to favourite |
position | 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 permissions |
---|
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 to |
---|---|
entity | The entity in question |
PermissionException | when the user does not have permission to perform the action. |
---|
Get the ids of a user's favourite Entities for a given entity type
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 type |
---|
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 to |
---|---|
entity | The entity in question |
PermissionException | when the user does not have permission to perform the action. |
---|
Check to see if the given entity is a favourite of the user passed in.
user | The user checking the favourite |
---|---|
entity | The entity to favourite |
PermissionException | when checking a filter with no permission |
---|
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 to |
---|---|
entity | The entity in question |
PermissionException | when the user does not have permission to perform the action. |
---|
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 to |
---|---|
entity | The entity in question |
PermissionException | when the user does not have permission to perform the action. |
---|
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 favourite |
---|---|
entity | The entity to favourite |
Remove all favourite associations for a given entity for entity deletion. This method is for only for when an entity is deleted as it does not adjust favourite counts.
entity | The entity that is being deleted |
---|
Remove the favourite associations for the given User and the given type
user | The ApplicationUser with whom to disassociate entities |
---|---|
entityType | The type of entity to disassociate user with. |