obips.SecurityService=function(){};obips.SecurityService.namespaceMap=new Array();obips.SecurityService.namespaceMap.sawsoap="com.siebel.analytics.web/soap/v4";obips.SecurityService.namespaceMap.sawsoape="com.siebel.analytics.web/soap/error/v1";obips.SecurityService.namespaceMap.soap="http://schemas.xmlsoap.org/soap/envelope/";obips.SecurityService.Proxies=function(){};obips.SecurityService.Proxies.getURL=function(){return saw.commandToURL("SoapImpl=securityService")};obips.SecurityService.getMultipleAccountDetails=function(o,d){var q=obips.XMLHTTP.createSoapEnvelope();var u=obips.XMLDOM.selectSingleNode(q,"//soap:Body",obips.SecurityService.namespaceMap);var c=q.createElement("getMultipleAccountDetails");c.setAttribute("xmlns",obips.SecurityService.namespaceMap.sawsoap);for(var s=0;s<o.acl.tokens.length;s++){var k=o.acl.tokens[s];var b=q.createElement("accountGUID");b.appendChild(obips.XMLDOM.createElementWithTextNode(q,"guid",k.account.id));b.appendChild(obips.XMLDOM.createElementWithTextNode(q,"isInternal",k.account.bIsInternal));c.appendChild(b)}var b=q.createElement("accountGUID");b.appendChild(obips.XMLDOM.createElementWithTextNode(q,"guid",o.ownerAccount.id));b.appendChild(obips.XMLDOM.createElementWithTextNode(q,"isInternal",o.ownerAccount.bIsInternal));c.appendChild(b);if(d){c.appendChild(obips.XMLDOM.createElementWithTextNode(q,"sessionID",d))}u.appendChild(c);var l=obips.XMLHTTP.syncSOAPAction(obips.SecurityService.Proxies.getURL(),"#getMultipleAccountDetails",q);var v=obips.XMLDOM.selectSingleNode(l,"//sawsoape:Error",obips.SecurityService.namespaceMap);var h=null;var p=null;if(v){var f="";var g=obips.XMLDOM.selectNodes(v,"//sawsoape:Message/text()",obips.SecurityService.namespaceMap);for(var s=0;s<g.length;s++){f+=g[s].nodeValue+" "}p=f;h=obips.XMLDOM.selectSingleNode(l,"//sawsoape:Code",obips.SecurityService.namespaceMap).firstChild.nodeValue}else{var m=obips.XMLDOM.selectNodes(l,"//sawsoap:getMultipleAccountDetailsResult/sawsoap:accountDetails",obips.SecurityService.namespaceMap);for(var s=0;s<m.length;s++){var t=m[s];var n=obips.XMLDOM.selectSingleNode(t,"sawsoap:accountGUID/sawsoap:guid/text()",obips.SecurityService.namespaceMap).nodeValue;var a=obips.XMLDOM.selectSingleNode(t,"sawsoap:name/text()",obips.SecurityService.namespaceMap).nodeValue;var e=obips.XMLDOM.selectSingleNode(t,"sawsoap:accountType/text()",obips.SecurityService.namespaceMap).nodeValue;for(var r=0;r<o.acl.tokens.length;r++){var k=o.acl.tokens[r];if(k.account.id==n){k.account.name=a;k.account.type=e}}if(o.ownerAccount.id==n){o.ownerAccount.name=a;o.ownerAccount.type=e;o.ownerGUID=n;o.owner=name}}}return new obips.SecurityService.GetMultipleAccountDetailsResponse(o,h,p)};obips.SecurityService.GetMultipleAccountDetailsResponse=function(a,b,c){this.itemInfo=a;this.errorCode=b;this.errorMessage=c};obips.SecurityService.Manager=function(){var a=obips.getSingleton(obips.SecurityService.Manager.SINGLETON_NAME);if(a){return a}obips.SecurityService.Manager.baseConstructor.call(this);this._privilegesCacheHasBeenInitialized=true;globalRegister.addObject(obips.SecurityService.Manager.SINGLETON_NAME,this)};extend(obips.SecurityService.Manager,obips.Observable);obips.SecurityService.Manager.SINGLETON_NAME="securityServiceManager";obips.SecurityService.Manager.getSingleton=function(){return obips.getSingleton(obips.SecurityService.Manager.SINGLETON_NAME)};obips.SecurityService.Manager.prototype.needsToBeInitialized=function(){var a=false;if(!this._privilegesCacheHasBeenInitialized){a=true}return a};obips.SecurityService.Manager.prototype.hasBeenInitialized=function(){return this._privilegesCacheHasBeenInitialized};obips.SecurityService.Manager.prototype.initialize=function(a){this._privilegesCacheHasBeenInitialized=true};obips.SecurityService.Manager.prototype.getMultipleAccountDetails=function(a,b){return obips.SecurityService.getMultipleAccountDetails(a,b)};obips.SecurityService.Manager.EventType=function(){};obips.SecurityService.Manager.EventType.PRIVILEGES_UPDATED="privilegesUpdated";new obips.SecurityService.Manager();