--[[----------------------------------------------------------------------------

WFCatSortProviderList.lua

--------------------------------------------------------------------------------

ADOBE CONFIDENTIAL
------------------
Copyright 2015 Adobe Systems Incorporated
All Rights Reserved.

NOTICE: All information contained herein is, and remains the property of
Adobe Systems Incorporated and its suppliers, if any. The intellectual and
technical concepts contained herein are proprietary to Adobe Systems
Incorporated and its suppliers and are protected by all applicable
intellectual property laws, including trade secret and copyright laws.
Dissemination of this information or reproduction of this material is
strictly forbidden unless prior written permission is obtained from
Adobe Systems Incorporated.

----------------------------------------------------------------------------]]--

--[[!
	\brief WFCatSortProviderList maintains a list of sort providers.
]]--

--============================================================================--

local WFCatSortProviderList = {}
WFCatSortProviderList.registerdProviders = {}

--------------------------------------------------------------------------------
function WFCatSortProviderList.getProviderList( providerType )
	if WFCatSortProviderList.registerdProviders[ providerType ] == nil then
		WFCatSortProviderList.registerdProviders[ providerType ] = {}
	end
	
	return WFCatSortProviderList.registerdProviders[ providerType ]
end

--------------------------------------------------------------------------------
local function addProvider( providerType, providerKey, provider)
	local providerList = WFCatSortProviderList.getProviderList( providerType )
	providerList[ providerKey ] = provider
end

--------------------------------------------------------------------------------
function WFCatSortProviderList.registerSortProvider( provider, searchTerm, providerTypeList )
	for i, providerType in ipairs( providerTypeList ) do
		addProvider( providerType,  searchTerm, provider)
	end
	
end

--==============================================================================

return WFCatSortProviderList
