Interface ShareType

All Known Implementing Classes:
AbstractShareType, AuthenticatedUserShareType, GlobalShareType, GroupShareType, ProjectShareType, UserShareType

@Internal public interface ShareType
Interface for all ShareTypes in the JIRA. ShareType represents a way to share an object and contains all logic for rendering, validating and searching.
Since:
v3.13
  • Method Details

    • getType

      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.
    • isSingleton

      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.
    • getPriority

      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
    • getRenderer

      ShareTypeRenderer getRenderer()
      Retrieves the ShareTypeRenderer that contains all logic for rendering this ShareType
      Returns:
      the ShareTypeRenderer responsible for displaying the ShareType.
    • getValidator

      ShareTypeValidator getValidator()
      Retrieves the ShareTypeValidator that contains all logic for validating this ShareType
      Returns:
      the ShareTypeValidator responsible for validating the ShareType.
    • getPermissionsChecker

      ShareTypePermissionChecker getPermissionsChecker()
      Responsible for checking that a user has permission to use SharedEntity
      Returns:
      the ShareTypePermissionChecker for this ShareType
    • getQueryFactory

      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.
    • getComparator

      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.
    • isAvailable

      default boolean isAvailable()
      Return true if this share type is configured to be allowed.
      Returns:
      true if this share type is configured to be allowed.
    • getValidUsageContextTypes

      @Nonnull default Collection<ShareType.UsageContextType> getValidUsageContextTypes()
      Return a collection of Usage Context Types in which this Share Type can be used.
      Returns:
      a collection of Usage Context Types in which this Share Type can be used.
      Since:
      v7.12