FDT Pixlib template Remoting command

Tags : , ,

Command and Business delegate are merged).

<?xml version="1.0" encoding="UTF-8"?><templates><template autoinsert="true" context="com.pf.fdt.ui.editor.template.actionscript" deleted="false" description="Creates remoting command class for osPixlib" enabled="true" name="remoting">import com.bourre.commands.Command;&#13;
import com.bourre.core.HashCodeFactory;&#13;
import com.bourre.events.IEvent;&#13;
import com.bourre.log.Logger;&#13;
import com.bourre.log.LogLevel;&#13;
import com.bourre.remoting.BasicFaultEvent;&#13;
import com.bourre.remoting.BasicResultEvent;&#13;
import com.bourre.remoting.IServiceProxyListener;&#13;
import com.bourre.remoting.ServiceProxy;&#13;
import com.bourre.log.PixlibStringifier;&#13;
	&#13;
class ${enclosing_package_and_type} &#13;
	implements Command, IServiceProxyListener&#13;
{&#13;
	private var _service : ServiceProxy;&#13;
	&#13;
	public function ${enclosing_type}() &#13;
	{&#13;
		_service = ServiceLocator.getInstance().getService( ${cursor} );&#13;
		_service.addListener( this );&#13;
	}&#13;
	&#13;
	public function execute( e : IEvent ) : Void &#13;
	{&#13;
		Logger.LOG( this + ".execute(" + e + ")" );&#13;
	}&#13;
	&#13;
	public function onResult(e : BasicResultEvent) : Void &#13;
	{&#13;
		Logger.LOG( this + ".onResult(" + e + ")" );&#13;
	}&#13;
&#13;
	public function onFault(e : BasicFaultEvent) : Void &#13;
	{&#13;
		Logger.LOG( "**Error " + this + ".onFault(" + e + ")", LogLevel.ERROR );&#13;
	}&#13;
	&#13;
	public function toString() : String&#13;
	{&#13;
		return PixlibStringifier.stringify( this );&#13;
	}&#13;
}</template></templates>