
/*
 * B E A    S Y S T E M S
 *
 * Copyright (c) 2006  BEA Systems, Inc.
 *
 * All Rights Reserved. Unpublished rights reserved under the copyright laws
 * of the United States. The software contained on this media is proprietary
 * to and embodies the confidential technology of BEA Systems, Inc. The
 * possession or receipt of this information does not convey any right to
 * disclose its contents, reproduce it, or use,  or license the use, for
 * manufacture or sale, the information or anything described therein. Any
 * use, disclosure, or reproduction without BEA System's prior written
 * permission is strictly prohibited.
 */

//@package __BEA.com.bea.portal.tools.js.skin

/**
 * A service to manage optional skin feature providers.
 **/

__BEA.com.bea.portal.tools.js.Core.set('__BEA.com.bea.portal.tools.js.skin.FeatureProviderManager', new function() {

	/**
	 * The map from feature name to skin feature provider.
	 **/
	
	this.featureProviderByFeature = new Object()
	
	/**
	 * Register the specified skin feature provider.
	 *
	 * @param feature the name of the skin feature
	 * @param featureProvider the skin feature provider
	 **/

	this.register = function(feature, featureProvider) {
		this.featureProviderByFeature[feature] = featureProvider
	}

	/**
	 * Get the specified skin feature provider.
	 *
	 * @param feature the name of the skin feature
	 *
	 * @return the skin feature provider
	 * or <code>undefined</code> if there is no such registered
	 * skin feature provider
	 **/

	this.get = function(feature) {
		return this.featureProviderByFeature[feature]
	}

})
