Package com.atlassian.jira.sharing.type
Class AbstractShareType
java.lang.Object
com.atlassian.jira.sharing.type.AbstractShareType
- All Implemented Interfaces:
ShareType
- Direct Known Subclasses:
AuthenticatedUserShareType,GlobalShareType,GroupShareType,ProjectShareType,UserShareType
Abstract class for ShareType classes.
- Since:
- v3.13
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.sharing.type.ShareType
ShareType.Name, ShareType.UsageContextType -
Constructor Summary
ConstructorsConstructorDescriptionAbstractShareType(ShareType.Name type, boolean singleton, int priority, ShareTypeRenderer renderer, ShareTypeValidator validator, ShareTypePermissionChecker permissionChecker, ShareQueryFactory<? extends ShareTypeSearchParameter> queryFactory, Comparator<SharePermission> comparator) -
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 ShareTypeReturn a collection of Usage Context Types in which this Share Type can be used.booleanRepresents whether this ShareType is a singleton.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.jira.sharing.type.ShareType
isAvailable
-
Constructor Details
-
Method Details
-
getType
Description copied from interface:ShareTypeUnique identifier for the ShareType. -
isSingleton
public boolean isSingleton()Description copied from interface:ShareTypeRepresents whether this ShareType is a singleton. I.e theSharedEntitycan only have a single instance of this ShareType and no others.- Specified by:
isSingletonin interfaceShareType- Returns:
- true if this ShareType is a singleton, otherwise false.
-
getPriority
public int getPriority()Description copied from interface:ShareTypeReturn 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.- Specified by:
getPriorityin interfaceShareType- Returns:
- the priority
-
getRenderer
Description copied from interface:ShareTypeRetrieves theShareTypeRendererthat contains all logic for rendering this ShareType- Specified by:
getRendererin interfaceShareType- Returns:
- the ShareTypeRenderer responsible for displaying the ShareType.
-
getValidator
Description copied from interface:ShareTypeRetrieves theShareTypeValidatorthat contains all logic for validating this ShareType- Specified by:
getValidatorin interfaceShareType- Returns:
- the ShareTypeValidator responsible for validating the ShareType.
-
getPermissionsChecker
Description copied from interface:ShareTypeResponsible for checking that a user has permission to useSharedEntity- Specified by:
getPermissionsCheckerin interfaceShareType- Returns:
- the ShareTypePermissionChecker for this
ShareType
-
getComparator
Description copied from interface:ShareTypeReturn a comparator that can order aSharePermissionof this type.- Specified by:
getComparatorin interfaceShareType- Returns:
- a comparator that can order the permissions of this type.
-
getQueryFactory
Description copied from interface:ShareTypeReturn the object that can be used to build query conditions to find instances of this ShareType.- Specified by:
getQueryFactoryin interfaceShareType- Returns:
- the object that can be used to build a query.
-
getValidUsageContextTypes
Description copied from interface:ShareTypeReturn a collection of Usage Context Types in which this Share Type can be used.- Specified by:
getValidUsageContextTypesin interfaceShareType- Returns:
- a collection of Usage Context Types in which this Share Type can be used.
-