com.atlassian.jira.sharing.type
Class AbstractShareType

java.lang.Object
  extended by com.atlassian.jira.sharing.type.AbstractShareType
All Implemented Interfaces:
ShareType
Direct Known Subclasses:
GlobalShareType, GroupShareType, ProjectShareType

public class AbstractShareType
extends Object
implements ShareType

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
 
Constructor Summary
AbstractShareType(ShareType.Name type, boolean singleton, int priority, ShareTypeRenderer renderer, ShareTypeValidator validator, ShareTypePermissionChecker permissionChecker, ShareQueryFactory<? extends ShareTypeSearchParameter> queryFactory, Comparator<SharePermission> comparator)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractShareType

public AbstractShareType(ShareType.Name type,
                         boolean singleton,
                         int priority,
                         ShareTypeRenderer renderer,
                         ShareTypeValidator validator,
                         ShareTypePermissionChecker permissionChecker,
                         ShareQueryFactory<? extends ShareTypeSearchParameter> queryFactory,
                         Comparator<SharePermission> comparator)
Method Detail

getType

public ShareType.Name getType()
Description copied from interface: ShareType
Unique identifier for the ShareType.

Specified by:
getType in interface ShareType
Returns:
A ShareType.Name representing a unique value that the ShareType is associated with. Should not be internationalised.

isSingleton

public boolean isSingleton()
Description copied from interface: ShareType
Represents whether this ShareType is a singleton. I.e the SharedEntity can only have a single instance of this ShareType and no others.

Specified by:
isSingleton in interface ShareType
Returns:
true if this ShareType is a singleton, otherwise false.

getPriority

public int getPriority()
Description copied from interface: ShareType
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.

Specified by:
getPriority in interface ShareType
Returns:
the priority

getRenderer

public ShareTypeRenderer getRenderer()
Description copied from interface: ShareType
Retrieves the ShareTypeRenderer that contains all logic for rendering this ShareType

Specified by:
getRenderer in interface ShareType
Returns:
the ShareTypeRenderer responsible for displaying the ShareType.

getValidator

public ShareTypeValidator getValidator()
Description copied from interface: ShareType
Retrieves the ShareTypeValidator that contains all logic for validating this ShareType

Specified by:
getValidator in interface ShareType
Returns:
the ShareTypeValidator responsible for validating the ShareType.

getPermissionsChecker

public ShareTypePermissionChecker getPermissionsChecker()
Description copied from interface: ShareType
Responsible for checking that a user has permission to use SharedEntity

Specified by:
getPermissionsChecker in interface ShareType
Returns:
the ShareTypePermissionChecker for this ShareType

getComparator

public Comparator<SharePermission> getComparator()
Description copied from interface: ShareType
Return a comparator that can order a SharePermission of this type.

Specified by:
getComparator in interface ShareType
Returns:
a comparator that can order the permissions of this type.

getQueryFactory

public ShareQueryFactory<? extends ShareTypeSearchParameter> getQueryFactory()
Description copied from interface: ShareType
Return the object that can be used to build query conditions to find instances of this ShareType.

Specified by:
getQueryFactory in interface ShareType
Returns:
the object that can be used to build a query.


Copyright © 2002-2012 Atlassian. All Rights Reserved.