@PublicApi public interface

SharedEntity

implements Favourite
com.atlassian.jira.sharing.SharedEntity
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

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).

Note: since @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).

Class Overview

Classes that implement this interface are able to Shared and Favourited. The Favouriting and Sharing mechanism need the type of object it is and the id.

Summary

Nested Classes
class SharedEntity.Identifier Utility class for identifying a SharedEntity
class SharedEntity.SharePermissions Encapsulates the permissions that a SharedEntity has. 
class SharedEntity.TypeDescriptor<S extends SharedEntity> The name and type of a SharedEntity
Public Methods
String getDescription()
A general description of the entity.
<S extends SharedEntity> TypeDescriptor<S> getEntityType()
The type of entity it is.
Long getId()
The id of the entity.
String getName()
The name of the entity.
ApplicationUser getOwner()
String getOwnerUserName()
This method is deprecated. Use getOwner() instead. Since v6.0. The user name of the owner of the entity. Will always have permission to see it and see all shares.
SharedEntity.SharePermissions getPermissions()
The permissions for this entity.
[Expand]
Inherited Methods
From interface com.atlassian.jira.favourites.Favourite

Public Methods

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 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 ()

This method is deprecated.
Use getOwner() instead. Since v6.0. The user name of the owner of the entity. Will always have permission to see it and see all shares.

Returns
  • The user name of the user who owns this entity. May be null for anonymous user.

public SharedEntity.SharePermissions getPermissions ()

The permissions for this entity.

Returns
  • the permissions object. Must not be null.