// # # # # # # # # # # # # ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
// Class declaration

var AS4Secure = Class.create({
	
	currentChannel: null,
	/**
	 * sets the current channel Id used by flash uploader
	 */
	setCurrentChannel: function(channelID)
	{
		this.currentChannel = channelID;
	},
	/**
	 * Inserts the flash file upload dialog
	 */
	insertFileUploadForm: function(targetID)
	{
		AS4Shell.getInstance().currentComponent = 'secure';
		AS4Shell.getInstance().insertFileUploadForm(targetID,this.currentChannel);

	}
});

// # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
// Static Methods & Properties

// Static instance of the AS4ResourceEditor object
AS4Secure.instance = null;

/**
 * Return a singleton instance of the AS4ResourceEditor object
 * @return AS4ResourceEditor
 */
AS4Secure.getInstance = function()
{
	if(!AS4Secure.instance)
		AS4Secure.instance = new AS4Secure();
		
	return AS4Secure.instance;
}