com.atlassian.jira.sharing.type
Class DefaultShareTypeFactory

java.lang.Object
  extended by com.atlassian.jira.sharing.type.DefaultShareTypeFactory
All Implemented Interfaces:
ShareTypeFactory

public class DefaultShareTypeFactory
extends java.lang.Object
implements ShareTypeFactory

Default implementation that simply builds a list based on the constructor.

Since:
v3.13

Constructor Summary
DefaultShareTypeFactory(GlobalShareType globalShareType, GroupShareType groupShareType, ProjectShareType projectShareType)
           
 
Method Summary
 java.util.Collection<ShareType> getAllShareTypes()
          Returns a Collection of all ShareType instnaces available.
 java.util.Comparator<SharePermission> getPermissionComparator()
          Return a comparator that can order SharePermissions for display.
 ShareType getShareType(ShareType.Name type)
          Returns a ShareType based on a given key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultShareTypeFactory

public DefaultShareTypeFactory(GlobalShareType globalShareType,
                               GroupShareType groupShareType,
                               ProjectShareType projectShareType)
Method Detail

getAllShareTypes

public java.util.Collection<ShareType> getAllShareTypes()
Description copied from interface: ShareTypeFactory
Returns a Collection of all ShareType instnaces available.

Specified by:
getAllShareTypes in interface ShareTypeFactory
Returns:
a Collection of all ShareType instnaces available.

getShareType

public ShareType getShareType(ShareType.Name type)
Description copied from interface: ShareTypeFactory
Returns a ShareType based on a given key.

Specified by:
getShareType in interface ShareTypeFactory
Parameters:
type - a string representing type of ShareType
Returns:
a ShareType based on a given key.

getPermissionComparator

public java.util.Comparator<SharePermission> getPermissionComparator()
Description copied from interface: ShareTypeFactory
Return a comparator that can order SharePermissions for display.

Specified by:
getPermissionComparator in interface ShareTypeFactory
Returns:
a comparator for permission ordering.


Copyright © 2002-2010 Atlassian. All Rights Reserved.