FDT Pixlib template ServiceLocator

Tags : , ,

For pixlib remoting package.

<?xml version="1.0" encoding="UTF-8"?><templates><template autoinsert="true" context="com.pf.fdt.ui.editor.template.actionscript" deleted="false" description="Creates concrete service locator class for pixlib framework" enabled="true" name="servicelocator">import com.bourre.core.HashCodeFactory;&#13;
import com.bourre.remoting.ServiceProxyLocator;&#13;
import com.bourre.log.PixlibStringifier;&#13;
&#13;
class ${enclosing_package_and_type} &#13;
	extends ServiceProxyLocator&#13;
{&#13;
	private static var _oI : ${enclosing_type};&#13;
	&#13;
	/**&#13;
	 * @return singleton instance of ${enclosing_type}&#13;
	 */&#13;
	public static function getInstance() : ${enclosing_type} &#13;
	{&#13;
		if (!_oI) _oI = new ${enclosing_type}();&#13;
		return _oI;&#13;
	}&#13;
	&#13;
	private function ${enclosing_type}()&#13;
	{&#13;
		super();&#13;
	}&#13;
	&#13;
	public function init( remotingURL : String ) : Void&#13;
	{&#13;
		gatewayURL = remotingURL;&#13;
	}&#13;
	&#13;
	/**&#13;
	 * Returns the string representation of this instance.&#13;
	 * @return the string representation of this instance&#13;
	 */&#13;
	public function toString() : String &#13;
	{&#13;
		return PixlibStringifier.stringify( this );&#13;
	}&#13;
}</template></templates>