Package com.atlassian.jira.sharing
Class IndexableSharedEntity<S extends SharedEntity>
java.lang.Object
com.atlassian.jira.sharing.IndexableSharedEntity<S>
- All Implemented Interfaces:
Favourite
,SharedEntity
Represents a
SharedEntity
in a lightweight way that can be used for indexing.
Like SearchRequest
s, you can set the share permissions after construction
because they might not always be available at that time.
- Since:
- v4.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.sharing.SharedEntity
SharedEntity.Identifier, SharedEntity.SharePermissions, SharedEntity.TypeDescriptor<S extends SharedEntity>
-
Constructor Summary
ConstructorsConstructorDescriptionIndexableSharedEntity
(Long id, String name, String description, SharedEntity.TypeDescriptor<S> entityType, ApplicationUser owner, Long favouriteCount) IndexableSharedEntity
(Long id, String name, String description, SharedEntity.TypeDescriptor<S> entityType, ApplicationUser owner, Long favouriteCount, SharedEntity.SharePermissions permissions) -
Method Summary
Modifier and TypeMethodDescriptionboolean
A general description of the entity.The type of entity it is.The number of users who have marked this entity as one of their favourites.getId()
The id of the entity.getName()
The name of the entity.getOwner()
The permissions for this entity.int
hashCode()
void
setPermissions
(SharedEntity.SharePermissions permissions)
-
Constructor Details
-
Method Details
-
getId
Description copied from interface:SharedEntity
The id of the entity.- Specified by:
getId
in interfaceSharedEntity
- Returns:
- the id. May be null if not yet persisted. Some components may not accept a non-persisted entity.
-
getName
Description copied from interface:SharedEntity
The name of the entity.- Specified by:
getName
in interfaceSharedEntity
- Returns:
- the name. Must not be null or empty.
-
getDescription
Description copied from interface:SharedEntity
A general description of the entity.- Specified by:
getDescription
in interfaceSharedEntity
- Returns:
- the description. May be null or empty.
-
getOwner
- Specified by:
getOwner
in interfaceSharedEntity
-
getOwnerUserName
- Specified by:
getOwnerUserName
in interfaceSharedEntity
- Returns:
- The user name of the user who owns this entity. May be null for anonymous user.
-
getEntityType
Description copied from interface:SharedEntity
The type of entity it is. Examples include SearchRequest ("SearchRequest") and PortalPage ("PortalPage")- Specified by:
getEntityType
in interfaceSharedEntity
- Returns:
- the type of entity.
-
getPermissions
Description copied from interface:SharedEntity
The permissions for this entity.- Specified by:
getPermissions
in interfaceSharedEntity
- Returns:
- the permissions object. Must not be null.
-
getFavouriteCount
Description copied from interface:Favourite
The number of users who have marked this entity as one of their favourites.- Specified by:
getFavouriteCount
in interfaceFavourite
- Returns:
- long the user count
-
equals
-
hashCode
public int hashCode()
-