All Downloads are FREE. Search and download functionalities are using the official Maven repository.

assets.libs.h-ubu-1.0.1-SNAPSHOT-min.js Maven / Gradle / Ivy

The newest version!
/*
 * %%Ignore-License
 */
(function(){var scope,_ref,_ref1;scope="undefined"!=typeof global&&null!==global?global:this,scope.HUBU=null!=(_ref=scope.HUBU)?_ref:{},scope.HUBU.extensions=null!=(_ref1=scope.HUBU.extensions)?_ref1:{},scope.hubu=function(){return scope.HUBU},scope.getHubuExtensions=function(){return HUBU.extensions},scope.getGlobal=function(){return scope}}).call(this),function(){var Exception,Logger,logger,utils,_ref,__slice=[].slice;HUBU.UTILS=null!=(_ref=HUBU.UTILS)?_ref:{},utils=HUBU.UTILS,getGlobal().namespace=function(target,name,block){var item,top,_i,_len,_ref1,_ref2;for(arguments.length<3&&(_ref1=["undefined"!=typeof exports?exports:window].concat(__slice.call(arguments)),target=_ref1[0],name=_ref1[1],block=_ref1[2]),top=target,_ref2=name.split("."),_i=0,_len=_ref2.length;_len>_i;_i++)item=_ref2[_i],target=target[item]||(target[item]={});return block(target,top)},getGlobal().Logger=Logger=function(){function Logger(name){null==name&&(name=""),name.length>0&&(this._header="["+name+"] ")}return Logger.DEBUG=0,Logger.INFO=1,Logger.WARNING=2,Logger.ERROR=3,Logger.prototype._header="",Logger.prototype._level=Logger.INFO,Logger.prototype._getConsole=function(){return null!=("undefined"!=typeof window&&null!==window?window.console:void 0)?window.console:null!=("undefined"!=typeof global&&null!==global?global.console:void 0)?global.console:null},Logger.prototype.log=function(message){return null!=this._getConsole()?(this._getConsole().log(""+this._header+message),!0):!1},Logger.prototype.debug=function(message){return this._level<=Logger.DEBUG?this.log("DEBUG - "+message):!1},Logger.prototype.info=function(message){return this._level<=Logger.INFO?this.log("INFO - "+message):!1},Logger.prototype.warn=function(message){return this._level<=Logger.WARNING?this.log("WARN - "+message):!1},Logger.prototype.error=function(message){return this._level<=Logger.ERROR?this.log("ERROR - "+message):void 0},Logger.prototype.setLevel=function(level){return this._level=level},Logger}(),HUBU.logger=new Logger("hubu"),logger=HUBU.logger,getGlobal().Exception=Exception=function(){function Exception(message){this.message=message}return Exception.prototype.data={},Exception.prototype.add=function(key,value){return this.data.key=value,this},Exception.prototype.toString=function(){return this.message},Exception}(),utils.typeOf=function(obj){var classToType,myClass,name,_i,_len,_ref1;if(null==obj)return new String(obj);for(classToType=new Object,_ref1="Boolean Number String Function Array Date RegExp".split(" "),_i=0,_len=_ref1.length;_len>_i;_i++)name=_ref1[_i],classToType["[object "+name+"]"]=name.toLowerCase();return myClass=Object.prototype.toString.call(obj),myClass in classToType?classToType[myClass]:"object"},utils.isObjectConformToContract=function(object,contract){var props;for(props in contract){if(null==object[props])return logger.warn("Object not conform to contract - property "+props+" missing"),!1;if(this.typeOf(contract[props])!==this.typeOf(object[props]))return logger.warn("Object not conform to contract - the type of the property "+props+" does not match. Expected '"+this.typeOf(contract[props])+"' but found '"+this.typeOf(object[props])+"'"),!1}return!0},utils.isFunction=function(ref){return"function"===this.typeOf(ref)},utils.isObject=function(ref){return"object"===this.typeOf(ref)},utils.invoke=function(target,method,args){return null!=target[method]&&this.isFunction(target[method])?target[method].apply(target,args):!1},utils.defineFunctionIfNotExist=function(obj,name,func){return null==obj[name]?(obj[name]=func,!0):!1},utils.clone=function(obj,excludes){var flags,key,newInstance;if(null==obj||"object"!=typeof obj)return obj;if(obj instanceof Date)return new Date(obj.getTime());if(obj instanceof RegExp)return flags="",null!=obj.global&&(flags+="g"),null!=obj.ignoreCase&&(flags+="i"),null!=obj.multiline&&(flags+="m"),null!=obj.sticky&&(flags+="y"),new RegExp(obj.source,flags);newInstance=new obj.constructor,excludes=null!=excludes?excludes:[];for(key in obj)-1===this.indexOf(excludes,key)&&(newInstance[key]=this.clone(obj[key],excludes));return newInstance},utils.bind=function(obj,method){if("string"===this.typeOf(method)){if(null==obj[method])throw"HUBU.bind: obj["+method+"] is null";method=obj[method]}if("function"===this.typeOf(method))return function(){return method.apply(obj,Array.prototype.slice.call(arguments))};throw"HUBU.bind: obj["+method+"] is not a function"},utils.createProxyForContract=function(contract,object){var props,proxy;proxy={},proxy.__proxy__=object;for(props in contract)proxy[props]=this.isFunction(contract[props])?this.bind(object,object[props]):object[props];return proxy},utils.isComponent=function(component){return null==component?!1:this.isObjectConformToContract(component,new HUBU.AbstractComponent)},utils.isComponentPlugged=function(component,hub){return"string"===this.typeOf(component)?null!==hub.getComponent(component):"object"===this.typeOf(component)?-1!==this.indexOf(hub.getComponents(),component):!1},utils.indexOf=function(array,obj){var i,v,_i,_len;if(null!=Array.prototype.indexOf)return array.indexOf(obj);for(i=_i=0,_len=array.length;_len>_i;i=++_i)if(v=array[i],v===obj)return i;return-1},utils.removeElementFromArray=function(array,obj){var v;for(v in array)array[v]===obj&&array.splice(v,1);return array}}.call(this),function(){var AbstractComponent;HUBU.AbstractComponent=AbstractComponent=function(){function AbstractComponent(){}return AbstractComponent.prototype.configure=function(){throw"AbstractComponent is an abstract class"},AbstractComponent.prototype.start=function(){throw"AbstractComponent is an abstract class"},AbstractComponent.prototype.stop=function(){throw"AbstractComponent is an abstract class"},AbstractComponent.prototype.getComponentName=function(){throw"AbstractComponent is an abstract class"},AbstractComponent}()}.call(this),function(){var Eventing,__slice=[].slice;HUBU.Eventing=Eventing=function(){function Eventing(hubu){var myExtension;this._hub=hubu,this._listeners=[],myExtension=this,this._hub.getListeners=function(){return myExtension._listeners},this._hub.registerListener=function(){var component,conf;return component=arguments[0],conf=2<=arguments.length?__slice.call(arguments,1):[],conf.length>=2?(myExtension.registerListener(component,conf[0],conf[1]),this):(myExtension.registerListener(component,conf[1]),this)},this._hub.registerConfigurableListener=function(component,conf){return HUBU.logger.warn("registerConfigurableListener is a deprecated method and may disappear at any time, use registerListener instead"),myExtension.registerListener(component,conf),this},this._hub.unregisterListener=function(component,callback){return myExtension.unregisterListener(component,callback),this},this._hub.sendEvent=function(component,event){return myExtension.sendEvent(component,event)},this._hub.subscribe=function(component,topic,callback,filter){return myExtension.subscribe(component,topic,callback,filter),this},this._hub.unsubscribe=function(component,callback){return myExtension.unsubscribe(component,callback),this},this._hub.publish=function(component,topic,event){return myExtension.publish(component,topic,event),this}}return Eventing.prototype._hub=null,Eventing.prototype._listeners=null,Eventing.prototype._processEvent=function(component,event){var ev,listener,sent,_i,_len,_ref;if(null==event||null==component)return HUBU.logger.warn("Can't process event - component or event not defined"),!1;for(sent=!1,_ref=this._listeners.slice(),_i=0,_len=_ref.length;_len>_i;_i++)listener=_ref[_i],listener.component!==component&&-1!==HUBU.UTILS.indexOf(this._listeners,listener)&&(ev=null==event.clone||event.clone?HUBU.UTILS.clone(event):event,ev.source=component,listener.match.apply(listener.component,[ev])&&(listener.callback.apply(listener.component,[ev]),sent=!0));return sent},Eventing.prototype.registerListener=function(){var callback,component,listener,match,others;switch(component=arguments[0],others=2<=arguments.length?__slice.call(arguments,1):[],match=null,callback=null,others.length){case 2:match=others[0],callback=others[1];break;case 1:match=others[0].match,callback=others[0].callback}if(null==component||null==match||null==callback)throw new Exception("Cannot register event listener, component or match or callback is/are not defined").add("component",component).add("match",match).add("callback",callback);if(!HUBU.UTILS.isComponentPlugged(component,this._hub))throw new Exception("Cannot register event listener, the component is not plugged on the hub");return listener={component:component,callback:callback,match:match},this._listeners.push(listener)},Eventing.prototype.unregisterListener=function(component,callback){var cmp,listener,toRemove,_i,_j,_k,_len,_len1,_len2,_ref,_ref1,_results;if(null==component)return HUBU.logger.warn("Cannot unregister listener - component not defined"),!1;if(cmp=this.getComponent(component),null==cmp)return HUBU.logger.warn("Cannot unregister listener - component not plugged on the hub"),!1;if(toRemove=[],null!=callback)for(_ref=this._listeners,_i=0,_len=_ref.length;_len>_i;_i++)listener=_ref[_i],listener.component===cmp&&listener.callback===callback&&toRemove.push(listener);else for(_ref1=this._listeners,_j=0,_len1=_ref1.length;_len1>_j;_j++)listener=_ref1[_j],listener.component===cmp&&toRemove.push(listener);for(_results=[],_k=0,_len2=toRemove.length;_len2>_k;_k++)listener=toRemove[_k],_results.push(this._listeners=HUBU.UTILS.removeElementFromArray(this._listeners,listener));return _results},Eventing.prototype.getComponent=function(obj){return"string"===HUBU.UTILS.typeOf(obj)?this._hub.getComponent(obj):HUBU.UTILS.isComponent(obj)?obj:null},Eventing.prototype.sendEvent=function(component,event){return null==component||null==event?void HUBU.logger.warn("Cannot send event, component or/and event are undefined"):this._processEvent(component,event)},Eventing.prototype.subscribe=function(component,topic,callback,filter){var match,regex;return null==component||null==topic||null==callback?void HUBU.logger.warn("Cannot subscribe to topic, component or/and topic and/or callback are undefined"):(regex=new RegExp(topic),match=null,match=null!=filter&&HUBU.UTILS.isFunction(filter)?function(event){return regex.test(event.topic)&&filter(event)}:function(event){return regex.test(event.topic)},this.registerListener(component,match,callback))},Eventing.prototype.unsubscribe=function(component,callback){return this.unregisterListener(component,callback)},Eventing.prototype.publish=function(component,topic,event){return null==component||null==topic||null==event?(HUBU.logger.info("Cannot publish event - component and/or topic and/or event are missing"),!1):(event.topic=topic,this.sendEvent(component,event))},Eventing.prototype.reset=function(){return this._listeners=[]},Eventing.prototype.unregisterComponent=function(cmp){return this.unregisterListener(cmp)},Eventing}(),getHubuExtensions().eventing=Eventing}.call(this),function(){var Binding;HUBU.Binding=Binding=function(){function Binding(hubu){var myExtension;this._hub=hubu,myExtension=this,this._hub.bind=function(binding){return myExtension.bind(binding),this}}return Binding.prototype._hub=null,Binding.prototype.getComponent=function(obj){var component;return component=null,"string"===HUBU.UTILS.typeOf(obj)?this._hub.getComponent(obj):HUBU.UTILS.isComponent(obj)?obj:null},Binding.prototype.getInjectedObject=function(binding,component){if(null!=binding.contract){if(!HUBU.UTILS.isObjectConformToContract(component,binding.contract))throw new Exception("Cannot bind components, the component is not conform to contract").add("component",component.getComponentName()).add("contract",binding.contract);if(null==binding.proxy||binding.proxy)return HUBU.UTILS.createProxyForContract(binding.contract,component)}return component},Binding.prototype.bind=function(binding){var component,to;if(null==binding||!(null!=binding?binding.to:void 0)||!(null!=binding?binding.component:void 0)||!(null!=binding?binding.into:void 0))throw new Exception("Cannot bind components - component, to and into must be defined");if(component=this.getComponent(binding.component),null==component)throw new Exception("Cannot bind components - 'component' is invalid").add("component",binding.component);if(to=this.getComponent(binding.to),null==to)throw new Exception("Cannot bind components - 'to' is invalid").add("component",binding.to);switch(component=this.getInjectedObject(binding,component),HUBU.UTILS.typeOf(binding.into)){case"function":return binding.into.apply(to,[component]);case"string":return null==to[binding.into]?to[binding.into]=component:HUBU.UTILS.isFunction(to[binding.into])?to[binding.into].apply(to,[component]):to[binding.into]=component;default:throw new Exception("Cannot bind components = 'into' must be either a function or a string").add("into",binding.into)}},Binding}(),getHubuExtensions().binding=Binding}.call(this),function(){var SOC,ServiceEvent,ServiceReference,ServiceRegistration,ServiceRegistry,_ref;getGlobal().SOC=null!=(_ref=getGlobal().SOC)?_ref:{},SOC=getGlobal().SOC,SOC.ServiceRegistration=ServiceRegistration=function(){function ServiceRegistration(contract,component,svcObject,properties,hub,registry){if(this._id=-1,null==component)throw new Exception("Cannot create a service registration without a valid component");if(null==svcObject)throw new Exception("Cannot create a service registration without a valid service object");if(null==contract)throw new Exception("Cannot create a service registration without a contract");if(null==hub)throw new Exception("Cannot create a service registration without the hub");if(null==registry)throw new Exception("Cannot create a service registration without the registry");this._component=component,this._hub=hub,this._contract=contract,this._properties="undefined"==typeof properties||null===properties?{}:HUBU.UTILS.clone(properties),this._registry=registry,this._svcObject=svcObject,this._properties["service.contract"]=this._contract,this._properties["service.publisher"]=this._component}return ServiceRegistration._nextId=1,ServiceRegistration.prototype._id=-1,ServiceRegistration.prototype._component=null,ServiceRegistration.prototype._contract=null,ServiceRegistration.prototype._hub=null,ServiceRegistration.prototype._registered=!1,ServiceRegistration.prototype._properties={},ServiceRegistration.prototype._reference=null,ServiceRegistration.prototype._registry=null,ServiceRegistration.prototype._svcObject=null,ServiceRegistration.getAndIncId=function(){var id;return id=SOC.ServiceRegistration._nextId,SOC.ServiceRegistration._nextId=SOC.ServiceRegistration._nextId+1,id},ServiceRegistration.prototype.register=function(){if(!HUBU.UTILS.isComponentPlugged(this._component,this._hub)&&this._component!==this._hub)throw new Exception("Invalid registration, the component is not plugged on the hub");return this._id=SOC.ServiceRegistration.getAndIncId(),this._reference=new SOC.ServiceReference(this),this._properties["service.id"]=this._id,this._registered=-1!==this._id,this._id},ServiceRegistration.prototype.unregister=function(){return this._registered=!1},ServiceRegistration.prototype.isRegistered=function(){return this._registered},ServiceRegistration.prototype.getReference=function(){if(!HUBU.UTILS.isComponentPlugged(this._component,this._hub)&&this._component!==this._hub)throw new Exception("Invalid lookup, the component is not plugged on the hub");return this._reference},ServiceRegistration.prototype.getProperties=function(){return this._properties},ServiceRegistration.prototype.getService=function(component){return HUBU.UTILS.isFunction(this._svcObject)?this._svcObject.apply(this._component,[component]):this._svcObject},ServiceRegistration.prototype.setProperties=function(properties){var event,old,props;return old=null,this.isRegistered()&&(props=HUBU.UTILS.clone(this._properties,["service.contract","service.publisher"]),old=new SOC.ServiceRegistration(this._contract,this._component,this._svcObject,props,this._hub,this._registry),old._id=this._id,old._reference=new SOC.ServiceReference(old)),this._properties=null!=properties?properties:{},this._properties["service.contract"]=this._contract,this._properties["service.publisher"]=this._component,this._properties["service.id"]=this._id,this.isRegistered()&&null!=old?(event=new SOC.ServiceEvent(SOC.ServiceEvent.MODIFIED,this.getReference()),this._registry.fireServiceEvent(event,old.getReference())):void 0},ServiceRegistration}(),SOC.ServiceReference=ServiceReference=function(){function ServiceReference(registration){this._registration=registration}return ServiceReference.prototype._registration=null,ServiceReference.prototype.getContract=function(){return this._registration.getProperties()["service.contract"]},ServiceReference.prototype.getProperties=function(){return this._registration.getProperties()},ServiceReference.prototype.getProperty=function(key){return this._registration.getProperties()[key]},ServiceReference.prototype.getId=function(){return this._registration.getProperties()["service.id"]},ServiceReference.prototype.isValid=function(){return this._registration.isRegistered},ServiceReference}(),SOC.ServiceEvent=ServiceEvent=function(){function ServiceEvent(type,ref){this._type=type,this._reference=ref}return ServiceEvent.REGISTERED=1,ServiceEvent.MODIFIED=2,ServiceEvent.UNREGISTERING=4,ServiceEvent.MODIFIED_ENDMATCH=8,ServiceEvent.prototype._type=0,ServiceEvent.prototype._reference=null,ServiceEvent.prototype.getReference=function(){return this._reference},ServiceEvent.prototype.getType=function(){return this._type},ServiceEvent}(),SOC.ServiceRegistry=ServiceRegistry=function(){function ServiceRegistry(hub){if(this._registrations=[],this._listeners=[],null==hub)throw new Exception("Cannot initialize the service registry without a hub");this._hub=hub}return ServiceRegistry.prototype._registrations=null,ServiceRegistry.prototype._hub=null,ServiceRegistry.prototype._listeners=null,ServiceRegistry.prototype.getRegisteredServices=function(){var entry,reg,result,_i,_j,_len,_len1,_ref1,_ref2;for(result=[],_ref1=this._registrations,_i=0,_len=_ref1.length;_len>_i;_i++)for(entry=_ref1[_i],_ref2=entry.registrations,_j=0,_len1=_ref2.length;_len1>_j;_j++)reg=_ref2[_j],result.push(reg.getReference());return result},ServiceRegistry.prototype._addRegistration=function(component,reg){var cmpEntry,entry,_i,_len,_ref1;for(_ref1=this._registrations,_i=0,_len=_ref1.length;_len>_i;_i++)entry=_ref1[_i],entry.component===component&&(cmpEntry=entry);return null==cmpEntry&&(cmpEntry={component:component,registrations:[]},this._registrations.push(cmpEntry)),cmpEntry.registrations.push(reg)},ServiceRegistry.prototype._removeRegistration=function(reg){var cmpEntry,entry,_i,_len,_ref1;for(_ref1=this._registrations,_i=0,_len=_ref1.length;_len>_i;_i++)entry=_ref1[_i],-1!==HUBU.UTILS.indexOf(entry.registrations,reg)&&(cmpEntry=entry);return null==cmpEntry?null:(HUBU.UTILS.removeElementFromArray(cmpEntry.registrations,reg),0===cmpEntry.registrations.length&&HUBU.UTILS.removeElementFromArray(this._registrations,cmpEntry),cmpEntry.component)},ServiceRegistry.prototype.registerService=function(component,contract,properties,svcObject){var reg;if(null==contract)throw new Exception("Cannot register a service without a proper contract");if(null==component)throw new Exception("Cannot register a service without a valid component");if(svcObject=null!=svcObject?svcObject:component,!HUBU.UTILS.isFunction(svcObject)&&!HUBU.UTILS.isObjectConformToContract(svcObject,contract))throw new Exception("Cannot register service - the service object does not implement the contract").add("contract",contract).add("component",component);return svcObject=null!=svcObject?svcObject:component,reg=new ServiceRegistration(contract,component,svcObject,properties,this._hub,this),this._addRegistration(component,reg),reg.register(),this.fireServiceEvent(new SOC.ServiceEvent(SOC.ServiceEvent.REGISTERED,reg.getReference())),reg},ServiceRegistry.prototype.unregisterService=function(registration){var component,ref;if(null==registration)throw new Exception("Cannot unregister the service - invalid registration");if(component=this._removeRegistration(registration),null!=component)return ref=registration.getReference(),registration.unregister(),this.fireServiceEvent(new SOC.ServiceEvent(SOC.ServiceEvent.UNREGISTERING,ref)),!0;throw new Exception("Cannot unregister service - registration not found")},ServiceRegistry.prototype.unregisterServices=function(component){var cmpEntry,entry,reg,regs,_i,_j,_len,_len1,_ref1;if(null==component)throw new Exception("Cannot unregister the services - invalid component");for(_ref1=this._registrations,_i=0,_len=_ref1.length;_len>_i;_i++)entry=_ref1[_i],entry.component===component&&(cmpEntry=entry);if(null!=cmpEntry){if(regs=cmpEntry.registrations,null!=regs)for(_j=0,_len1=regs.length;_len1>_j;_j++)reg=regs[_j],this.unregisterService(reg);return HUBU.UTILS.removeElementFromArray(this._registrations,cmpEntry)}},ServiceRegistry.prototype.getServiceReferences=function(contract,filter){return this._match(this._buildFilter(contract,filter))},ServiceRegistry.prototype._match=function(filter){var matching,ref,refs;return refs=this.getRegisteredServices(),matching=function(){var _i,_len,_results;for(_results=[],_i=0,_len=refs.length;_len>_i;_i++)ref=refs[_i],filter.match(ref)&&_results.push(ref);return _results}()},ServiceRegistry.prototype._buildFilter=function(contract,filter){var container;return null==contract&&null==filter?{match:function(){return!0}}:null!=contract&&null==filter?(container={},container.contract=contract,container.match=function(){return function(ref){return ref.getProperty("service.contract")===container.contract}}(this),container):null!=contract&&null!=filter?(container={},container.contract=contract,container.filter=filter,container.match=function(){return function(ref){return ref.getProperty("service.contract")===container.contract&&container.filter(ref)}}(this),container):{filter:filter,match:function(ref){return this.filter(ref)}}},ServiceRegistry.prototype.getService=function(component,ref){if(null==ref)throw new Exception("Cannot get service - the reference is null");return ref.isValid()?ref._registration.getService(component):(HUBU.logger.warn("Cannot retrieve service for "+ref+" - the reference is invalid"),null)},ServiceRegistry.prototype.ungetService=function(){},ServiceRegistry.prototype.registerServiceListener=function(listenerConfig){var contract,filter,listener,newFilter,svcListener;if(contract=listenerConfig.contract,filter=listenerConfig.filter,listener=listenerConfig.listener,null==listener)throw new Exception("Can't register the service listener, the listener is not set").add("listenerConfig",listenerConfig);if(newFilter=this._buildFilter(contract,filter),svcListener={listener:listener,filter:newFilter,contract:contract},HUBU.UTILS.isObject(listener)&&!HUBU.UTILS.isObjectConformToContract(listener,SOC.ServiceListener))throw new Exception("Can't register the service listener, the listener is not conform to the Service Listener contract");return this._listeners.push(svcListener)},ServiceRegistry.prototype.unregisterServiceListener=function(listenerConfig){var contract,filter,list,listener,_i,_len,_ref1,_results;if(contract=listenerConfig.contract,filter=listenerConfig.filter,listener=listenerConfig.listener,null==listener)throw new Exception("Can't unregister the service listener, the listener is not set").add("listenerConfig",listenerConfig);for(_ref1=this._listeners.slice(),_results=[],_i=0,_len=_ref1.length;_len>_i;_i++)list=_ref1[_i],list.contract===contract&&list.listener===listener&&_results.push(HUBU.UTILS.removeElementFromArray(this._listeners,list));return _results},ServiceRegistry.prototype.fireServiceEvent=function(event,oldRef){var listener,matched,newEvent,_i,_len,_ref1,_results;for(_ref1=this._listeners,_results=[],_i=0,_len=_ref1.length;_len>_i;_i++)listener=_ref1[_i],matched=null==listener.filter||this._testAgainstFilter(listener,event.getReference()),matched?_results.push(this._invokeServiceListener(listener,event)):event.getType()===SOC.ServiceEvent.MODIFIED&&null!=oldRef?this._testAgainstFilter(listener,oldRef)?(newEvent=new SOC.ServiceEvent(SOC.ServiceEvent.MODIFIED_ENDMATCH,event.getReference()),_results.push(this._invokeServiceListener(listener,newEvent))):_results.push(void 0):_results.push(void 0);return _results},ServiceRegistry.prototype._testAgainstFilter=function(listener,ref){return listener.filter.match(ref)},ServiceRegistry.prototype._invokeServiceListener=function(listener,event){return HUBU.UTILS.isFunction(listener.listener)?listener.listener(event):HUBU.UTILS.isObject(listener.listener)?listener.serviceChanged(event):void 0},ServiceRegistry}()}.call(this),function(){var ProvidedService,ServiceComponent,ServiceDependency,ServiceOrientation;HUBU.ServiceComponent=ServiceComponent=function(){function ServiceComponent(component){this._component=component,this._providedServices=[],this._requiredServices=[],this._state=ServiceComponent.STOPPED}return ServiceComponent.STOPPED=0,ServiceComponent.INVALID=1,ServiceComponent.VALID=2,ServiceComponent.prototype._component=null,ServiceComponent.prototype._providedServices=null,ServiceComponent.prototype._requiredServices=null,ServiceComponent.prototype._state=0,ServiceComponent.prototype.getComponent=function(){return this._component},ServiceComponent.prototype.getState=function(){return this._state},ServiceComponent.prototype.addProvidedService=function(ps){return-1===HUBU.UTILS.indexOf(this._providedServices,ps)&&(this._providedServices.push(ps),ps.setServiceComponent(this),this._state>ServiceComponent.STOPPED&&ps.onStart(),this._state===ServiceComponent.VALID&&ps.onValidation(),this._state===ServiceComponent.INVALID)?ps.onInvalidation():void 0},ServiceComponent.prototype.removeProvidedService=function(ps){return-1!==HUBU.UTILS.indexOf(this._providedServices,ps)?(HUBU.UTILS.removeElementFromArray(this._providedServices,ps),ps.onStop()):void 0},ServiceComponent.prototype.addRequiredService=function(req){return-1===HUBU.UTILS.indexOf(this._requiredServices,req)&&(this._requiredServices.push(req),req.setServiceComponent(this),this._state>ServiceComponent.STOPPED)?(req.onStart(),this.computeState()):void 0},ServiceComponent.prototype.removeRequiredService=function(req){return HUBU.UTILS.indexOf(this._requiredServices,req)>-1&&(HUBU.UTILS.removeElementFromArray(this._requiredServices,req),req.onStop(),this._state>ServiceComponent.STOPPED)?this.computeState():void 0},ServiceComponent.prototype.computeState=function(){var isValid,oldState,req,_i,_len,_ref;for(isValid=!0,_ref=this._requiredServices,_i=0,_len=_ref.length;_len>_i;_i++)req=_ref[_i],isValid=isValid&&req.isValid();return oldState=this._state,this._state=isValid?ServiceComponent.VALID:ServiceComponent.INVALID,this._state>oldState&&this._state===ServiceComponent.VALID?this._validate():this._state_i;_i++)prov=_ref1[_i],_results.push(prov.onValidation());return _results},ServiceComponent.prototype._invalidate=function(){var prov,_i,_len,_ref,_results;for(HUBU.logger.debug("Invalidate instance"),_ref=this._providedServices,_results=[],_i=0,_len=_ref.length;_len>_i;_i++)prov=_ref[_i],_results.push(prov.onInvalidation());return _results},ServiceComponent.prototype.onStart=function(){var prov,req,_i,_j,_len,_len1,_ref,_ref1;for(_ref=this._requiredServices,_i=0,_len=_ref.length;_len>_i;_i++)req=_ref[_i],req.onStart();for(_ref1=this._providedServices,_j=0,_len1=_ref1.length;_len1>_j;_j++)prov=_ref1[_j],prov.onStart();return this.computeState()},ServiceComponent.prototype.onStop=function(){var prov,req,_i,_j,_len,_len1,_ref,_ref1;for(_ref=this._providedServices,_i=0,_len=_ref.length;_len>_i;_i++)prov=_ref[_i],prov.onStop();for(_ref1=this._requiredServices,_j=0,_len1=_ref1.length;_len1>_j;_j++)req=_ref1[_j],req.onStop();return this._state=ServiceComponent.STOPPED},ServiceComponent.prototype.getServiceDependencyByName=function(name){var dep,_i,_len,_ref;for(_ref=this._requiredServices,_i=0,_len=_ref.length;_len>_i;_i++)if(dep=_ref[_i],dep.getName()===name)return dep},ServiceComponent}(),HUBU.ServiceDependency=ServiceDependency=function(){function ServiceDependency(component,contract,filter,aggregate,optional,field,bind,unbind,name,hub){var self;if(this._component=component,this._contract=contract,this._filter=filter,this._aggregate=aggregate,this._optional=optional,this._field=field,this._name=null!=name?name:this._contract,null!=bind&&(this._bind=HUBU.UTILS.isFunction(bind)?bind:this._component[bind],null==this._bind))throw new Exception("Bind method "+bind+" not found on component");if(null!=unbind&&(this._unbind=HUBU.UTILS.isFunction(unbind)?unbind:this._component[unbind],null==this._unbind))throw new Exception("Unbind method "+unbind+" not found on component");this._hub=hub,this._state=HUBU.ServiceDependency.UNRESOLVED,this._refs=[],self=this,this._listener={contract:this._contract,filter:function(ref){return ref.getProperty("service.publisher")!==self._component&&(null==self._filter||self._filter(ref))},listener:function(event){switch(event.getType()){case SOC.ServiceEvent.REGISTERED:return self._onServiceArrival(event.getReference());case SOC.ServiceEvent.MODIFIED:return self._onServiceModified(event.getReference());case SOC.ServiceEvent.UNREGISTERING:return self._onServiceDeparture(event.getReference());case SOC.ServiceEvent.MODIFIED_ENDMATCH:return self._onServiceDeparture(event.getReference())}}}}var _listener,_refs,_serviceComponent,_state;return ServiceDependency.UNRESOLVED=0,ServiceDependency.RESOLVED=1,ServiceDependency.prototype._component=null,ServiceDependency.prototype._contract=null,ServiceDependency.prototype._filter=null,ServiceDependency.prototype._aggregate=!1,ServiceDependency.prototype._optional=!1,ServiceDependency.prototype._field=null,ServiceDependency.prototype._bind=null,ServiceDependency.prototype._unbind=null,ServiceDependency.prototype._name=null,ServiceDependency.prototype._hub=null,_listener=null,_state=null,_refs=[],_serviceComponent=null,ServiceDependency.prototype.setServiceComponent=function(sc){return this._serviceComponent=sc},ServiceDependency.prototype.onStart=function(){return this._state=HUBU.ServiceDependency.UNRESOLVED,this._startTracking(),this._computeDependencyState()},ServiceDependency.prototype.onStop=function(){return this._stopTracking(),this._ungetAllServices(),this._refs=[],this._state=HUBU.ServiceDependency.UNRESOLVED},ServiceDependency.prototype._ungetAllServices=function(){var entry,_i,_len,_ref,_results;for(_ref=this._refs,_results=[],_i=0,_len=_ref.length;_len>_i;_i++)entry=_ref[_i],null!=entry.service&&(entry.service=null,_results.push(this._hub.ungetService(this._component,entry.reference)));return _results},ServiceDependency.prototype._startTracking=function(){var ref,refs,_i,_len,_results;for(this._hub.registerServiceListener(this._listener),refs=this._hub.getServiceReferences(this._contract,this._filter),_results=[],_i=0,_len=refs.length;_len>_i;_i++)ref=refs[_i],_results.push(this._onServiceArrival(ref));return _results},ServiceDependency.prototype._stopTracking=function(){return this._hub.unregisterServiceListener(this._listener)},ServiceDependency.prototype.isValid=function(){return this._state===HUBU.ServiceDependency.RESOLVED},ServiceDependency.prototype.getName=function(){return this._name},ServiceDependency.prototype.getContract=function(){return this._contract},ServiceDependency.prototype.getFilter=function(){return this._filter},ServiceDependency.prototype.isAggregate=function(){return this._aggregate
},ServiceDependency.prototype.isOptional=function(){return this._optional},ServiceDependency.prototype._computeDependencyState=function(){var oldState;return oldState=this._state,this._state=this._optional||this._refs.length>0?HUBU.ServiceDependency.RESOLVED:HUBU.ServiceDependency.UNRESOLVED,oldState!==this._state?this._serviceComponent.computeState():void 0},ServiceDependency.prototype._onServiceArrival=function(ref){var entry,refEntry,_i,_len,_ref;for(HUBU.logger.debug("Service arrival detected for "+this._component.getComponentName()),_ref=this._refs,_i=0,_len=_ref.length;_len>_i;_i++)entry=_ref[_i],entry.reference===ref&&(refEntry=entry);return null==refEntry?(refEntry={reference:ref,service:null},this._refs.push(refEntry),this._aggregate?this._inject(refEntry):1===this._refs.length&&this._inject(refEntry),this._computeDependencyState()):void 0},ServiceDependency.prototype._onServiceDeparture=function(ref){var entry,newRef,refEntry,_i,_len,_ref;for(HUBU.logger.debug("Service departure detected for "+this._component.getComponentName()),_ref=this._refs,_i=0,_len=_ref.length;_len>_i;_i++)entry=_ref[_i],entry.reference===ref&&(refEntry=entry);if(null!=refEntry){if(HUBU.UTILS.removeElementFromArray(this._refs,refEntry),null!=refEntry.service&&(this._deinject(refEntry),this._hub.ungetService(this._component,ref),refEntry.service=null),!(this._refs.length>0))return this._computeDependencyState();if(newRef=this._refs[0],!this._aggregate)return this._inject(newRef)}},ServiceDependency.prototype._onServiceModified=function(ref){var entry,refEntry,_i,_len,_ref;for(_ref=this._refs,_i=0,_len=_ref.length;_len>_i;_i++)entry=_ref[_i],entry.reference===ref&&(refEntry=entry);return null==refEntry?this._onServiceArrival(ref):void 0},ServiceDependency.prototype._inject=function(entry){var svc;return svc=this._hub.getService(this._serviceComponent,entry.reference),entry.service=svc,null!=this._field&&this._aggregate&&(null==this._component[this._field]?this._component[this._field]=[svc]:this._component[this._field].push(svc)),null==this._field||this._aggregate||(this._component[this._field]=svc),null!=this._bind?this._bind.apply(this._component,[svc,entry.reference]):void 0},ServiceDependency.prototype._deinject=function(entry){return null!=this._field&&this._aggregate&&HUBU.UTILS.removeElementFromArray(this._component[this._field],entry.service),null==this._field||this._aggregate||(this._component[this._field]=null),null!=this._unbind?this._unbind.apply(this._component,[entry.service,entry.reference]):void 0},ServiceDependency.prototype.locateServices=function(){var ref,refs,svc,_i,_len;for(svc=[],refs=this._hub.getServiceReferences(this._contract,this._filter),_i=0,_len=refs.length;_len>_i;_i++)ref=refs[_i],svc.push(this._hub.getService(this._component,ref));return svc},ServiceDependency}(),HUBU.ProvidedService=ProvidedService=function(){function ProvidedService(component,contract,properties,preRegistration,postRegistration,preUnregistration,postUnregistration,hub){if(this._component=component,this._contract=contract,this._hub=hub,this._properties=properties,null!=preRegistration&&(this._preRegistration=HUBU.UTILS.isFunction(preRegistration)?preRegistration:this._component[preRegistration],null==this._preRegistration))throw new Exception("preRegistration method "+preRegistration+" not found on component");if(null!=postRegistration&&(this._postRegistration=HUBU.UTILS.isFunction(postRegistration)?postRegistration:this._component[postRegistration],null==this._postRegistration))throw new Exception("postRegistration method "+postRegistration+" not found on component");if(null!=preUnregistration&&(this._preUnregistration=HUBU.UTILS.isFunction(preUnregistration)?preUnregistration:this._component[preUnregistration],null==this._preUnregistration))throw new Exception("preUnregistration method "+preUnregistration+" not found on component");if(null!=postUnregistration&&(this._postUnRegistration=HUBU.UTILS.isFunction(postUnregistration)?postUnregistration:this._component[postUnregistration],null==this._postUnRegistration))throw new Exception("postUnregistration method "+postUnregistration+" not found on component")}return ProvidedService.UNREGISTERED=0,ProvidedService.REGISTERED=1,ProvidedService.prototype._hub=null,ProvidedService.prototype._contract=null,ProvidedService.prototype._properties=null,ProvidedService.prototype._registration=null,ProvidedService.prototype._serviceComponent=null,ProvidedService.prototype._component=null,ProvidedService.prototype._preRegistration=null,ProvidedService.prototype._postRegistration=null,ProvidedService.prototype._preUnregistration=null,ProvidedService.prototype._postUnRegistration=null,ProvidedService.prototype.setServiceComponent=function(sc){return this._serviceComponent=sc},ProvidedService.prototype._register=function(){var proxy;return null!=this._registration?!1:(null!=this._preRegistration&&this._preRegistration.apply(this._component,[]),proxy=HUBU.UTILS.createProxyForContract(this._contract,this._component),this._registration=this._hub.registerService(this._component,this._contract,this._properties,proxy),HUBU.logger.debug("Service from "+this._component.getComponentName()+" registered"),null!=this._postRegistration&&this._postRegistration.apply(this._component,[this._registration]),!0)},ProvidedService.prototype._unregister=function(){return null==this._registration?!1:(null!=this._preUnregistration&&this._preUnregistration.apply(this._component,[this._registration]),this._hub.unregisterService(this._registration),this._registration=null,null!=this._postUnRegistration?this._postUnRegistration.apply(this._component,[]):void 0)},ProvidedService.prototype.onStart=function(){},ProvidedService.prototype.onStop=function(){return this._unregister()},ProvidedService.prototype.onValidation=function(){return this._register()},ProvidedService.prototype.onInvalidation=function(){return this._unregister()},ProvidedService}(),HUBU.ServiceOrientation=ServiceOrientation=function(){function ServiceOrientation(hubu){var registry,self;this._hub=hubu,this._registry=new SOC.ServiceRegistry(this._hub),this._components=[],registry=this._registry,self=this,this._hub.getServiceRegistry=function(){return registry},this._hub.registerService=function(component,contract,properties,svcObject){return registry.registerService(component,contract,properties,svcObject)},this._hub.unregisterService=function(registration){return registry.unregisterService(registration)},this._hub.getServiceReferences=function(contract,filter){return registry.getServiceReferences(contract,filter)},this._hub.getServiceReference=function(contract,filter){var refs;return refs=registry.getServiceReferences(contract,filter),0!==refs.length?refs[0]:null},this._hub.getService=function(component,reference){return registry.getService(component,reference)},this._hub.ungetService=function(component,reference){return registry.ungetService(component,reference)},this._hub.registerServiceListener=function(listenerConfiguration){return registry.registerServiceListener(listenerConfiguration)},this._hub.unregisterServiceListener=function(listenerConfiguration){return registry.unregisterServiceListener(listenerConfiguration)},this._hub.requireService=function(description){return self.requireService(description),this},this._hub.provideService=function(description){return self.provideService(description),this},this._hub.locateService=function(component,name){var cmpEntry,dep,entry,svc,_i,_len,_ref;for(_ref=self._components,_i=0,_len=_ref.length;_len>_i;_i++)entry=_ref[_i],entry.component===component&&(cmpEntry=entry);if(null==cmpEntry)return null;if(dep=cmpEntry.serviceComponent.getServiceDependencyByName(name),null==dep)throw new Exception("No dependency "+name+" on component "+cmpEntry.component.getComponentName());return svc=dep.locateServices(),null===svc||0===svc.length?null:svc[0]},this._hub.locateServices=function(component,name){var cmpEntry,dep,entry,svc,_i,_len,_ref;for(_ref=self._components,_i=0,_len=_ref.length;_len>_i;_i++)entry=_ref[_i],entry.component===component&&(cmpEntry=entry);if(null==cmpEntry)return null;if(dep=cmpEntry.serviceComponent.getServiceDependencyByName(name),null==dep)throw new Exception("No dependency "+name+" on component "+cmpEntry.component.getComponentName());return svc=dep.locateServices(),null===svc||0===svc.length?[]:svc}}return ServiceOrientation.prototype._hub=null,ServiceOrientation.prototype._registry=null,ServiceOrientation.prototype._components=[],ServiceOrientation.prototype.unregisterComponent=function(cmp){var entry,_i,_len,_ref;for(_ref=this._components,_i=0,_len=_ref.length;_len>_i;_i++)entry=_ref[_i],null!=entry&&entry.component===cmp&&(entry.serviceComponent.onStop(),HUBU.UTILS.removeElementFromArray(this._components,entry));return this._registry.unregisterServices(cmp)},ServiceOrientation.prototype.registerComponent=function(comp){var cmpEntry,entry,_i,_len,_ref;for(_ref=this._components,_i=0,_len=_ref.length;_len>_i;_i++)entry=_ref[_i],entry.component===comp&&(cmpEntry=entry);return null==cmpEntry&&(cmpEntry={component:comp,serviceComponent:new HUBU.ServiceComponent(comp)},this._components.push(cmpEntry),this._hub.isStarted())?cmpEntry.serviceComponent.onStart():void 0},ServiceOrientation.prototype.requireService=function(description){var aggregate,bind,component,contract,field,filter,name,optional,req,unbind;if(component=description.component,contract=description.contract,filter=description.filter,aggregate=description.aggregate,optional=description.optional,field=description.field,bind=description.bind,unbind=description.unbind,name=description.name,null==component)throw new Exception("Cannot require a service without a valid component");if(null==aggregate&&(aggregate=!1),null==optional&&(optional=!1),null==contract&&(contract=null),null==filter&&(filter=null),null==field&&null==bind&&null==name)throw new Exception("Cannot require a service - field or bind must be set");return null==field&&(field=null),null==bind&&(bind=null),null==unbind&&(unbind=null),null==name&&(name=contract),null==field&&null==bind&&(optional=!0),req=new HUBU.ServiceDependency(component,contract,filter,aggregate,optional,field,bind,unbind,name,this._hub),this._addServiceDependencyToComponent(component,req)},ServiceOrientation.prototype.provideService=function(description){var component,contract,postRegistration,postUnregistration,preRegistration,preUnregistration,properties,ps;if(component=description.component,contract=description.contract,properties=description.properties,preRegistration=description.preRegistration,postRegistration=description.postRegistration,preUnregistration=description.preUnregistration,postUnregistration=description.postUnregistration,null==component)throw new Exception("Cannot provided a service without a valid component");if(null==contract)throw new Exception("Cannot provided a service without a valid contract");return null==properties&&(properties={}),ps=new HUBU.ProvidedService(component,contract,properties,preRegistration,postRegistration,preUnregistration,postUnregistration,this._hub),this._addProvidedServiceToComponent(component,ps)},ServiceOrientation.prototype._addServiceDependencyToComponent=function(comp,req){var cmpEntry,entry,newComponent,_i,_len,_ref;for(newComponent=!1,_ref=this._components,_i=0,_len=_ref.length;_len>_i;_i++)entry=_ref[_i],entry.component===comp&&(cmpEntry=entry);return null==cmpEntry&&(cmpEntry={component:comp,serviceComponent:new HUBU.ServiceComponent(comp)},this._components.push(cmpEntry),newComponent=!0),cmpEntry.serviceComponent.addRequiredService(req),newComponent&&this._hub.isStarted()?cmpEntry.serviceComponent.onStart():void 0},ServiceOrientation.prototype._addProvidedServiceToComponent=function(comp,ps){var cmpEntry,entry,newComponent,_i,_len,_ref;for(newComponent=!1,_ref=this._components,_i=0,_len=_ref.length;_len>_i;_i++)entry=_ref[_i],entry.component===comp&&(cmpEntry=entry);return null==cmpEntry&&(cmpEntry={component:comp,serviceComponent:new HUBU.ServiceComponent(comp)},this._components.push(cmpEntry),newComponent=!0),cmpEntry.serviceComponent.addProvidedService(ps),this._hub.isStarted()&&newComponent?cmpEntry.serviceComponent.onStart():void 0},ServiceOrientation.prototype.start=function(){var entry,_i,_len,_ref,_results;for(_ref=this._components,_results=[],_i=0,_len=_ref.length;_len>_i;_i++)entry=_ref[_i],_results.push(entry.serviceComponent.onStart());return _results},ServiceOrientation.prototype.stop=function(){var entry,_i,_len,_ref,_results;for(_ref=this._components,_results=[],_i=0,_len=_ref.length;_len>_i;_i++)entry=_ref[_i],_results.push(entry.serviceComponent.onStop());return _results},ServiceOrientation}(),getHubuExtensions().service=ServiceOrientation}.call(this),function(){var Hub;HUBU.Hub=Hub=function(){function Hub(){this._components=[],this._started=!1,this._extensions=null}return Hub.prototype._components=null,Hub.prototype._started=!1,Hub.prototype._extensions=null,Hub.prototype._parentHub=null,Hub.prototype._name=null,Hub.prototype.configure=function(parent,configuration){var ext,name,_ref;if(null!=parent&&(this._parentHub=parent),null==this._name&&(this._name=null!=(null!=configuration?configuration.component_name:void 0)?configuration.component_name:"hub"),null==this._extensions){this._extensions=[],_ref=getHubuExtensions();for(name in _ref)ext=_ref[name],this._extensions.push(new ext(this))}else HUBU.logger.debug("Hub already initialized");return this},Hub.prototype.getParentHub=function(){return this._parentHub},Hub.prototype.getComponents=function(){return this._components},Hub.prototype.getComponent=function(name){var cmp,fc,n,_i,_len,_ref;if(null==name)return null;for(_ref=this._components,_i=0,_len=_ref.length;_len>_i;_i++)if(cmp=_ref[_i],fc=cmp.getComponentName,null!=fc&&HUBU.UTILS.isFunction(fc)&&(n=fc.apply(cmp,[]),n===name))return cmp;return null},Hub.prototype.registerComponent=function(component,configuration){var ext,_i,_len,_ref;if(null==component)throw new Exception("Cannot register component - component is null");if(!HUBU.UTILS.isComponent(component))throw new Exception(component.getComponentName?component.getComponentName()+" is not a valid component":component+" is not a valid component");if(null===this._extensions&&this.configure(),null!=this.getComponent(component.getComponentName()))return HUBU.logger.info("Component "+component.getComponentName()+" already registered"),this;for(this._components.push(component),null!=configuration&&null!=configuration.component_name&&(component.__name__=configuration.component_name,component.getComponentName=function(){return this.__name__}),null==component.__hub__&&null==component.hub&&(component.__hub__=this,component.hub=function(){return this.__hub__}),HUBU.logger.debug("Registering component "+component.getComponentName()),HUBU.logger.debug("Configuring component "+component.getComponentName()),component.configure(this,configuration),_ref=this._extensions,_i=0,_len=_ref.length;_len>_i;_i++)ext=_ref[_i],HUBU.UTILS.invoke(ext,"registerComponent",[component,configuration]);return this._started&&HUBU.logger.debug("Starting component "+component.getComponentName()),HUBU.logger.debug("Component "+component.getComponentName()+" registered"),this},Hub.prototype.createInstance=function(factory,configuration){var instance;if(null==factory)throw new Exception("Cannot create instance - the given factory / constructor is null");if(!HUBU.UTILS.isFunction(factory))throw new Exception("Cannot create instance - the given factory / constructor is not a function");return instance=new factory,this.registerComponent(instance,configuration)},Hub.prototype.unregisterComponent=function(component){var cmp,ext,idx,_i,_len,_ref;if(null==component)return this;if(cmp=null,"string"===HUBU.UTILS.typeOf(component)){if(cmp=this.getComponent(component),null==cmp)return this}else{if(!HUBU.UTILS.isComponent(component))throw new Exception("Cannot unregister component, it's not a valid component").add("component",component);cmp=component}if(null===this._extensions&&this.configure(),idx=HUBU.UTILS.indexOf(this._components,cmp),-1!==idx){for(_ref=this._extensions,_i=0,_len=_ref.length;_len>_i;_i++)ext=_ref[_i],HUBU.UTILS.invoke(ext,"unregisterComponent",[cmp]);cmp.stop(),this._components.splice(idx,1)}else HUBU.logger.info("Component "+cmp.getComponentName()+" not unregistered - not on the hub");return this},Hub.prototype.start=function(){var ext,_i,_len,_ref;if(this._started)return this;for(null===this._extensions&&this.configure(),_ref=this._extensions,_i=0,_len=_ref.length;_len>_i;_i++)ext=_ref[_i],HUBU.UTILS.invoke(ext,"start",[]);return this._started=!0,this},Hub.prototype.stop=function(){var cmp,ext,_i,_j,_len,_len1,_ref,_ref1;if(!this._started)return this;for(this._started=!1,_ref=this._components,_i=0,_len=_ref.length;_len>_i;_i++)cmp=_ref[_i],cmp.stop();for(_ref1=this._extensions,_j=0,_len1=_ref1.length;_len1>_j;_j++)ext=_ref1[_j],HUBU.UTILS.invoke(ext,"stop",[]);return this},Hub.prototype.isStarted=function(){return this._started},Hub.prototype.reset=function(){var ext,name,_i,_len,_ref;for(this.stop(),name=this._name,null===this._extensions&&this.configure(),_ref=this._extensions,_i=0,_len=_ref.length;_len>_i;_i++)ext=_ref[_i],HUBU.UTILS.invoke(ext,"reset",[]);return this._components=[],this._extensions=null,this._name=name,this},Hub.prototype.getComponentName=function(){return this._name},Hub}(),getGlobal().hub=(new HUBU.Hub).configure(null,{component_name:"root"})}.call(this);




© 2015 - 2025 Weber Informatics LLC | Privacy Policy