public interface

ShareType

com.atlassian.jira.sharing.type.ShareType
Known Indirect Subclasses

Class Overview

Interface for all ShareTypes in the JIRA. ShareType represents a way to share an object and contains all logic for rendering, validating and searching.

Summary

Nested Classes
class ShareType.Name The Name of this share type, constricts the getType()  
Public Methods
Comparator<SharePermission> getComparator()
Return a comparator that can order a SharePermission of this type.
ShareTypePermissionChecker getPermissionsChecker()
Responsible for checking that a user has permission to use SharedEntity
int getPriority()
Return the priority of the ShareType.
ShareQueryFactory<? extends ShareTypeSearchParameter> getQueryFactory()
Return the object that can be used to build query conditions to find instances of this ShareType.
ShareTypeRenderer getRenderer()
Retrieves the ShareTypeRenderer that contains all logic for rendering this ShareType
ShareType.Name getType()
Unique identifier for the ShareType.
ShareTypeValidator getValidator()
Retrieves the ShareTypeValidator that contains all logic for validating this ShareType
boolean isSingleton()
Represents whether this ShareType is a singleton.

Public Methods

public Comparator<SharePermission> getComparator ()

Return a comparator that can order a SharePermission of this type.

Returns
  • a comparator that can order the permissions of this type.

public ShareTypePermissionChecker getPermissionsChecker ()

Responsible for checking that a user has permission to use SharedEntity

Returns
  • the ShareTypePermissionChecker for this ShareType

public int getPriority ()

Return the priority of the ShareType. The lower the value the higher the priority. This is used when determining when one ShareType should take precedence over another.

Returns
  • the priority

public ShareQueryFactory<? extends ShareTypeSearchParameter> getQueryFactory ()

Return the object that can be used to build query conditions to find instances of this ShareType.

Returns
  • the object that can be used to build a query.

public ShareTypeRenderer getRenderer ()

Retrieves the ShareTypeRenderer that contains all logic for rendering this ShareType

Returns
  • the ShareTypeRenderer responsible for displaying the ShareType.

public ShareType.Name getType ()

Unique identifier for the ShareType.

Returns
  • A ShareType.Name representing a unique value that the ShareType is associated with. Should not be internationalised.

public ShareTypeValidator getValidator ()

Retrieves the ShareTypeValidator that contains all logic for validating this ShareType

Returns
  • the ShareTypeValidator responsible for validating the ShareType.

public boolean isSingleton ()

Represents whether this ShareType is a singleton. I.e the SharedEntity can only have a single instance of this ShareType and no others.

Returns
  • true if this ShareType is a singleton, otherwise false.