123456 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: cchl
- // (C) Copyright IBM Corp. 2003, 2016.
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- var G_BusServer={};G_BusServer._cYE=1000;G_BusServer._c7L=[];G_BusServer._cJH={};G_BusServer._cGP={};G_BusServer._cNE1=0;G_BusServer.M_bUseReportServiceConsumerMode=false;G_BusServer._cY7=function(){this._cKH ='<bus:parameterValues ' + C_BusRequest._cD8 + ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENC:arrayType="bus:parameterValue[]" xsi:type="SOAP-ENC:Array">' +'</bus:parameterValues>';};G_BusServer._cY7();G_BusServer._cZ7=[];G_BusServer.F_AddParametersListener=function(_cCB1){this._cZ7.push(_cCB1);};G_BusServer._cE41=function(){return++this._cNE1;};G_BusServer.F_SetCafContextId=function(_cVQ){this._c9U=_cVQ;};G_BusServer.F_GetCafContextId=function(){return this._c9U;};G_BusServer._cC8="";G_BusServer.F_SetRoutingServerGroup=function(_cRB){this._cC8=_cRB?_cRB:"";};G_BusServer.F_GetRoutingServerGroup=function(){return this._cC8;};G_BusServer._cG6=function(_cEJ1){G_BusServer._c8L(true);};G_BusServer._cJ2=function(_cLU1,_cOE1,_cF41,_c7Z){G_BusServer._c8L(false);};G_BusServer.F_Logon=function(_cCB1,_cV01){U_GlassUtils.F_UserProfileAcountRequest(this._cG6.bind(this), this._cJ2.bind(this));this._c7L.push(_cCB1);this._cSB="";return true;};function ccModalCallBack(_cRM1){var _cZG1=false;if(_cRM1=="ok"){_cZG1=true;}G_BusServer._c8L(_cZG1);};G_BusServer.F_OnLogonBlockerMouseDown=function(){if(G_BusServer._cGZ&&!G_BusServer._cGZ.closed){G_BusServer._cGZ.focus();return;}U_DOM.F_HideEventBlocker();G_Debug.F_Print("G_BusServer.F_OnLogonBlockerMouseDown: blocker was up, yet no logon window");};G_BusServer._c8L=function(_cZG1){U_DOM.F_HideEventBlocker();setTimeout(this._c08.bind(this, _cZG1), 0);if(G_BusServer._cGZ&&!G_BusServer._cGZ.closed){G_BusServer._cGZ.close();}delete G_BusServer._cGZ;G_BusServer._cGZ=null;};G_BusServer._c08=function(_cZG1){for(var i=0;i<this._c7L.length;i++){if(this._c7L[i]&&this._c7L[i].F_OnServerLogonComplete){this._c7L[i].F_OnServerLogonComplete(_cZG1);}}this._c7L.F_Clear();};G_BusServer._cH6=function(){if(G_BusServer._cGZ){if(G_BusServer._cGZ.closed){G_BusServer._c8L();}else{setTimeout(this._cH6.bind(this), G_BusServer._cYE);}}};G_BusServer.F_Logoff=function(){var _cG41=new C_BusRequest(null, C_BusRequest.K_sSOAPAction_contentManagerService, "<bus:logoff/>");_cG41.F_Send();this._cSB="";};G_BusServer.F_AuthenticationRequired=function(_c9L){var _cHZ=_c9L.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Header/bus:biBusHeader");if (_cHZ&&_cHZ.selectSingleNode(".//bus:errorCodeString[text() = 'camAuthUserRecoverable'] | .//errorCodeString[text() = 'camAuthUserRecoverable']" ) ){return _cHZ.selectSingleNode( ".//bus:promptInfo | .//promptInfo" ) != null;}return false;};G_BusServer.F_RequiresServerPrompting=function(_c9L){return Boolean(_c9L&&_c9L.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:details/item[bus:status='prompting']"));};G_BusServer.F_DoPrompting=function(_cCB1,_c9L,_cH41){G_HAL.F_VerifyDependencies("G_ResManager");var _cAV1=document;var _cIZ=_cAV1.getElementById("CCHL_formServerPrompting");if(!_cIZ){var _cJQ1=G_ResManager.F_GetResource("CCHL_formServerPrompting").text;var div=_cAV1.body.appendChild(_cAV1.createElement('DIV'));div.innerHTML=_cJQ1;_cIZ=_cAV1.getElementById("CCHL_formServerPrompting");}var _cAU=_c9L.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Body/*/bus:result/bus:primaryRequest");var _cPE1=_c9L.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Header/bus:biBusHeader/bus:tracking/bus:conversationContext");var _cP9=_c9L.selectSingleNode("/SOAP-ENV:Envelope/SOAP-ENV:Header/bus:biBusHeader/bus:routing/bus:routingServerGroup");if(!(_cAU&&_cPE1)){return false;}_cIZ.action=G_CCHL.M_sGatewayURL;_cIZ.conversation.value=(_cAU&&!_cH41)?_cAU.xml:"";_cIZ.htmlFragment.value=_cH41? "":"h";_cIZ.specification.value=_cH41?_cH41:"";_cIZ.method.value=_cH41?"collectParameterValuesSpecification":"";_cIZ.tracking.value=(_cPE1&&!_cH41)?_cPE1.xml:"";_cIZ.routingServerGroup.value =_cP9?_cP9.text:"";var _cQE1=this._cE41();_cIZ.clientContext.value=_cQE1;var _cL91=this.F_GetCafContextId();if(_cL91){_cIZ.cafcontextid.value=_cL91;}_cIZ.target="winPrompt_"+(new Date()).getTime();this._cY7();if(D_Progress.F_IsActiveDialog()){D_Progress.F_DisableCancel();}var _cRE1=U_DOM.F_ShowEventBlocker(10000);_cRE1.onmousedown=G_BusServer.F_OnPromptBlockerMouseDown;this._cJH[_cQE1]=_cCB1;this._cGP[_cQE1]=window.open( G_HAL.F_GetFileURL("hal/blank.htm"), _cIZ.target, "directories=no,location=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,top=100,left=100,height=400,width=630" );if(U_DOM.F_WindowOpenWasBlocked(this._cGP[_cQE1])){return false;}this._cGP[_cQE1].focus();_cIZ.submit();this._c18=U_DOM.F_CreateClearableTimeout(this._cK2.bind(this, _cQE1), G_BusServer._cYE);return true;};G_BusServer.F_OnPromptBlockerMouseDown=function(){for(var s in G_BusServer._cGP){G_BusServer._cGP[s].focus();return;}U_DOM.F_HideEventBlocker();G_Debug.F_Print("G_BusServer.F_OnPromptBlockerMouseDown: blocker was up, yet no prompt window");};G_BusServer._cK2=function(_cQE1){delete this._c18;if(this._cGP[_cQE1]){var _cBU=false;try{_cBU=this._cGP[_cQE1].closed;}catch(e){_cBU=true;}if(_cBU){delete this._cGP[_cQE1];if(U_Object.F_IsEmpty(this._cGP)){U_DOM.F_HideEventBlocker();}else{for(var s in this._cGP){this._cGP[s].focus();break;}}setTimeout(this._c84.bind(this, _cQE1), 0);}else{this._c18=U_DOM.F_CreateClearableTimeout(this._cK2.bind(this, _cQE1), G_BusServer._cYE);}}};G_BusServer.F_GetScriptableParameter=function(_cG91){var _cI41=[];var d=this._c28(this._cKH);if(d){var nl=d.documentElement.selectNodes( _cG91?"item[bus:name=" + _cG91.F_ToXPathString() + "]":"item" );var _cFK1=nl.length;for(var i=0;i<_cFK1;i++){var _cM91=nl.item(i);var _cRL1=[];var _cN91={ "parameter":_cM91.selectSingleNode( "bus:name" ).text, "values":_cRL1 };_cI41.push(_cN91);var _cFJ1=_cM91.selectNodes("bus:value/item");var _cCU=_cFJ1.length;for(var j=0;j<_cCU;j++){var _cO91=_cFJ1.item(j);if(_cO91.selectSingleNode( "bus:start | bus:end" ) ){var _cGJ1=_cO91.selectSingleNode("bus:start/bus:use");var _cDU=_cO91.selectSingleNode("bus:start/bus:display");var _c0N1=_cO91.selectSingleNode("bus:end/bus:use");var _cJ41=_cO91.selectSingleNode("bus:end/bus:display");_cRL1.push(new C_ScriptableParameterRangeValue(_cGJ1?_cGJ1.text:null, _cDU?_cDU.text:null, _c0N1?_c0N1.text:null, _cJ41?_cJ41.text:null));}else{var _cMU1=_cO91.selectSingleNode("bus:use");var _cHJ1=_cO91.selectSingleNode("bus:display");_cRL1.push(new C_ScriptableParameterValue(_cMU1?_cMU1.text:null, _cHJ1?_cHJ1.text:null)); }}}}return _cI41;};G_BusServer.F_GetParameterValues=function(){return this._cKH;};G_BusServer.F_SetParameterValues=function(_cLH){var _cP91=_cLH.replace(/bus:parameters(\W)/g, "bus:parameterValues$1");var _cJZ=this._c28(_cP91);var _cKZ=this._c28(this._cKH);if(_cJZ&&_cKZ&&_cJZ.documentElement.xml!=_cKZ.documentElement.xml){this._cKH=_cP91;this._c25();return true;}return false;};G_BusServer._c28=function(_cLH){var d=U_XML.F_LoadString(null, _cLH);d.setProperty( "SelectionNamespaces", 'xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"' );return d;};G_BusServer.F_AddParameterValues=function(_cLH){var _cJZ=this._c28(_cLH);var _cMH=this._c28(this._cKH);if(_cJZ&&_cMH){var _cHR1=_cMH.documentElement;var nl=_cJZ.documentElement.selectNodes("item");var _cFK1=nl.length;for(var i=0;i<_cFK1;i++){var _cEU=nl.item(i);var _cYQ1=_cEU.selectSingleNode("bus:name").text;var _cNH=U_XML.F_RemoveNode( _cHR1, "item[bus:name=" + _cYQ1.F_ToXPathString() + "]" );if(_cNH&&(_cYQ1.indexOf("credential:")==0)){var _cTB=U_XML.F_LoadString(null, _cNH.selectSingleNode("bus:value/item/bus:use").text).documentElement;var _cOH=U_XML.F_LoadString(null, _cEU.selectSingleNode("bus:value/item/bus:use").text);var _cHP=_cOH.documentElement;var _cQ9=_cTB.selectNodes("*");for(var j=0;j<_cQ9.length;j++){var _cNU1=_cQ9.item(i);if(!_cHP.selectSingleNode(_cNU1.nodeName)){_cHP.appendChild(U_XML.F_ImportNode(_cOH, _cNU1));}}var _cIP=_cHP.xml;_cEU.selectSingleNode("bus:value/item/bus:use").text=_cIP;_cEU.selectSingleNode("bus:value/item/bus:display").text=_cIP;}_cHR1.appendChild(_cEU);}return this.F_SetParameterValues(_cMH.xml);}return false;};G_BusServer.F_SetInitialParameterValues=function(_cLH){this._c94=_cLH;return this.F_SetParameterValues(_cLH);};G_BusServer.F_RestoreToInitialParameterValues=function(){if(this._c94){this.F_SetParameterValues(this._c94);}else{this.F_ClearParameterValues();}};G_BusServer.F_HasParameterValues=function(){var _c1N1=U_XML.F_LoadString(D_XmlError, this._cKH);return(_c1N1.documentElement.text!="");};G_BusServer.F_ClearParameterValues=function(){this._cY7();this._c25();};G_BusServer.F_ClearNonCredentialParameterValues=function(){if(this.F_HasParameterValues()){var _cNT1=this.F_GetParameterValues();var _cSE1=U_XML.F_LoadString(D_XmlError, _cNT1, false);_cSE1.setProperty("SelectionNamespaces", C_BusRequest._cD8);var _cIJ1=false;var _cPH=_cSE1.documentElement.selectNodes("item[not(starts-with(./bus:name,'credential'))]");for(var i=0; i<_cPH.length; i++){_cSE1.documentElement.removeChild(_cPH.item(i));_cIJ1=true;}if(_cIJ1){this._cKH=U_XML.F_SerializeNode(_cSE1.documentElement);this._c25();}}};G_BusServer._c25=function(){for(var i=0;i<this._cZ7.length;i++){if(this._cZ7[i]&&this._cZ7[i].F_OnServerParametersChange){this._cZ7[i].F_OnServerParametersChange();}}};G_BusServer._c84=function(_cJP){if(this._cJH[_cJP]&&this._cJH[_cJP].F_OnServerPromptingComplete){this._cJH[_cJP].F_OnServerPromptingComplete();}delete this._cJH[_cJP];};function pdsCallback(pdsState){if(pdsState.state!="Cancel"){G_BusServer._cKH ='<bus:parameterValues ' + C_BusRequest._cD8 + ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENC:arrayType="bus:parameterValue[]" xsi:type="SOAP-ENC:Array">' +(pdsState.parameters?pdsState.parameters.join( "" ):"") +'</bus:parameterValues>';setTimeout(G_BusServer._c25.bind(G_BusServer), 0);}var _cJP=pdsState._cJP;if(!_cJP){G_Debug.F_Print("Error: Prompting returned with no client context. Will attempt to inform any listener that can be found");for(var s in G_BusServer._cGP){_cJP=s;}}if(G_BusServer._c18){U_DOM.F_ClearTimeout(G_BusServer._c18);delete G_BusServer._c18;}setTimeout(G_BusServer._c84.bind(G_BusServer, _cJP), 0);delete G_BusServer._cGP[_cJP];if(U_Object.F_IsEmpty(G_BusServer._cGP)){U_DOM.F_HideEventBlocker();}else{for(var s in G_BusServer._cGP){G_BusServer._cGP[s].focus();break;}}};G_BusServer.F_GetAuthenticityToken=function(){if(!this._cSB){try{this._cSB=(new CAMAuthenticityTokenSession()).generate();}catch(e){alert( "Exception thrown by CAMAuthenticityTokenSession" +"\n\n Make sure you've included the camcrypto javascript files:" +"\n camcrypto/base64.js" +"\n camcrypto/camcryptoutil.js" +"\n camcrypto/sha1.js" +"\n camcrypto/authtoken1.js");}}return this._cSB;};
|