com.atlassian.jira.sharing
Interface SharedEntity

All Superinterfaces:
Favourite
All Known Implementing Classes:
IndexableSharedEntity, PortalPage, SearchRequest, SharedEntity.Identifier

public interface SharedEntity
extends Favourite

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.

Since:
v3.13

Nested Class Summary
static class SharedEntity.Identifier
          Utility class for identifying a SharedEntity.
static class SharedEntity.SharePermissions
          Encapsulates the permissions that a SharedEntity has.
static class SharedEntity.TypeDescriptor<S extends SharedEntity>
          The name and type of a SharedEntity.
 
Method Summary
 java.lang.String getDescription()
          A general description of the entity.
<S extends SharedEntity>
SharedEntity.TypeDescriptor<S>
getEntityType()
          The type of entity it is.
 java.lang.Long getId()
          The id of the entity.
 java.lang.String getName()
          The name of the entity.
 java.lang.String getOwnerUserName()
          The user name of the owner of the entity.
 SharedEntity.SharePermissions getPermissions()
          The permissions for this entity.
 
Methods inherited from interface com.atlassian.jira.favourites.Favourite
getFavouriteCount
 

Method Detail

getId

java.lang.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.

getName

java.lang.String getName()
The name of the entity.

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

getDescription

java.lang.String getDescription()
A general description of the entity.

Returns:
the description. May be null or empty.

getEntityType

<S extends SharedEntity> SharedEntity.TypeDescriptor<S> getEntityType()
The type of entity it is. Examples include SearchRequest ("SearchRequest") and PortalPage ("PortalPage")

Returns:
the type of entity.

getOwnerUserName

java.lang.String getOwnerUserName()
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.

getPermissions

SharedEntity.SharePermissions getPermissions()
The permissions for this entity.

Returns:
the permissions object. Must not be null.


Copyright © 2002-2010 Atlassian. All Rights Reserved.