com.atlassian.jira.sharing.type
Interface ShareType

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

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
static class ShareType.Name
          The Name of this share type, constricts the getType()
 
Method Summary
 java.util.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.
 

Method Detail

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

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


Copyright © 2002-2010 Atlassian. All Rights Reserved.