Package com.atlassian.jira.sharing.type
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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classThe Name of this share type, constricts thegetType()static enumUsage Context types of the Share type. -
Method Summary
Modifier and TypeMethodDescriptionReturn a comparator that can order aSharePermissionof this type.Responsible for checking that a user has permission to useSharedEntityintReturn the priority of the ShareType.ShareQueryFactory<? extends ShareTypeSearchParameter>Return the object that can be used to build query conditions to find instances of this ShareType.Retrieves theShareTypeRendererthat contains all logic for rendering this ShareTypegetType()Unique identifier for the ShareType.Retrieves theShareTypeValidatorthat contains all logic for validating this ShareTypedefault Collection<ShareType.UsageContextType>Return a collection of Usage Context Types in which this Share Type can be used.default booleanReturn true if this share type is configured to be allowed.booleanRepresents whether this ShareType is a singleton.
-
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 theSharedEntitycan 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 theShareTypeRendererthat contains all logic for rendering this ShareType- Returns:
- the ShareTypeRenderer responsible for displaying the ShareType.
-
getValidator
ShareTypeValidator getValidator()Retrieves theShareTypeValidatorthat 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 useSharedEntity- 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 aSharePermissionof 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
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
-