12 |
- //>>built
- define("pd/controller/mdsrvRequest",["dojo/_base/connect","dojox/io/xhrMultiPart"],function(_1,_2){var _3=250;return {createXhr:function(_4){var _5=dojo._xhrObj(_4);var _6;_1.connect(_5,"error",null,function(_7){_4.onError(_7);clearInterval(_6);},false);_5.onreadystatechange=function(){if(_5.readyState===4){clearInterval(_6);try{_4.onComplete(_5.responseText);}catch(err){_4.onError(err);}}};_5.open(_4.method,_4.url);_6=setInterval(function(){try{if(typeof (_5.statusText)){}}catch(e){clearInterval(_6);}},_3);return _5;},saveDataSet:function(_8,_9,_a,_b,_c,_d){_2({url:g_pd_gateway+"/metadataUIService?pid=pdm_process&c=saveLOBData&dataSetStoreID="+_8+"&repositoryName="+encodeURIComponent(_9)+"&repositoryConnection="+encodeURIComponent(_a)+"&repositorySignon="+encodeURIComponent(_b),content:{"name":"inSpec","content":String(_c).F_XMLEncode()},error:function(_e){pd.messageBox(pd.statics.MB_ERROR,PDMSG.ERR.IDS_ERR_SAVE_DATA_SET,_e.message,_e.detail);},load:function(_f){try{pd.parseResponse(_f);_d();}catch(err){if(err.name==pd.CAM_PASSPORT_ERROR){pd.showLogonDialog();}else{pd.messageBox(pd.statics.MB_ERROR,PDMSG.ERR.IDS_ERR_SAVE_DATA_SET,err.message,err.detail);}}}});},cancelDataSet:function(_10,_11,_12,_13){var xhr=this.createXhr({url:g_pd_gateway+"/metadataUIService?pid=pdm_process&c=cancelLOBData&dataSetStoreID="+_10+"&repositoryName="+encodeURIComponent(_11)+"&repositoryConnection="+encodeURIComponent(_12)+"&repositorySignon="+encodeURIComponent(_13),method:"get",onError:function(_14){pd.messageBox(pd.statics.MB_ERROR,PDMSG.ERR.IDS_ERR_SAVE_DATA_SET,_14.message,_14.detail);},onComplete:function(_15){try{pd.parseResponse(_15);}catch(err){if(err.name==pd.CAM_PASSPORT_ERROR){pd.showLogonDialog();}else{pd.messageBox(pd.statics.MB_ERROR,PDMSG.ERR.IDS_ERR_SAVE_DATA_SET,err.message,err.detail);}}}});xhr.setRequestHeader("Content-Type","application/document");xhr.send();}};});
|