public class

IndexableSharedEntity

extends Object
implements SharedEntity
java.lang.Object
   ↳ com.atlassian.jira.sharing.IndexableSharedEntity<S extends com.atlassian.jira.sharing.SharedEntity>

Class Overview

Represents a SharedEntity in a lightweight way that can be used for indexing.

Like SearchRequests, you can set the share permissions after construction because they might not always be available at that time.

Summary

Public Constructors
IndexableSharedEntity(Long id, String name, String description, TypeDescriptor<S> entityType, ApplicationUser owner, Long favouriteCount)
IndexableSharedEntity(Long id, String name, String description, TypeDescriptor<S> entityType, ApplicationUser owner, Long favouriteCount, SharedEntity.SharePermissions permissions)
Public Methods
boolean equals(Object o)
String getDescription()
A general description of the entity.
TypeDescriptor<S> getEntityType()
The type of entity it is.
Long getFavouriteCount()
The number of users who have marked this entity as one of their favourites.
Long getId()
The id of the entity.
String getName()
The name of the entity.
ApplicationUser getOwner()
String getOwnerUserName()
SharedEntity.SharePermissions getPermissions()
The permissions for this entity.
int hashCode()
void setPermissions(SharedEntity.SharePermissions permissions)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.favourites.Favourite
From interface com.atlassian.jira.sharing.SharedEntity

Public Constructors

public IndexableSharedEntity (Long id, String name, String description, TypeDescriptor<S> entityType, ApplicationUser owner, Long favouriteCount)

public IndexableSharedEntity (Long id, String name, String description, TypeDescriptor<S> entityType, ApplicationUser owner, Long favouriteCount, SharedEntity.SharePermissions permissions)

Public Methods

public boolean equals (Object o)

public String getDescription ()

A general description of the entity.

Returns
  • the description. May be null or empty.

public TypeDescriptor<S> getEntityType ()

The type of entity it is. Examples include SearchRequest ("SearchRequest") and PortalPage ("PortalPage")

Returns
  • the type of entity.

public Long getFavouriteCount ()

The number of users who have marked this entity as one of their favourites.

Returns
  • long the user count

public Long getId ()

The id of the entity.

Returns
  • the id. May be null if not yet persisted. Some components may not accept a non-persisted entity.

public String getName ()

The name of the entity.

Returns
  • the name. Must not be null or empty.

public ApplicationUser getOwner ()

public String getOwnerUserName ()

public SharedEntity.SharePermissions getPermissions ()

The permissions for this entity.

Returns
  • the permissions object. Must not be null.

public int hashCode ()

public void setPermissions (SharedEntity.SharePermissions permissions)