properties_job.xts 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2014
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" resolverBase="prompting" includeConfig="true">
  13. <!--
  14. ===============================================================================================
  15. formlogic_init
  16. ===============================================================================================
  17. -->
  18. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  19. <!--
  20. ===============================================================================================
  21. callMorphlet - Calls the appropriate morphlet using the passed in params which will return
  22. markup to be displayed or the expected results
  23. ===============================================================================================
  24. -->
  25. <xts:block
  26. id="callMorphlet"
  27. nodelist="requestParams,env, http, session, credential, cookies, header, user"
  28. dependency="formlogic_init"
  29. processor="XSLT" type="exec"
  30. condition=".[ /root/env/param[@name='controller_state'] != '' ]"
  31. mandatory="false">
  32. <xts:logicsheet path="logicsheets/portal.xsl"/>
  33. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  34. <xsl:stylesheet version="1.0"
  35. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  36. xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
  37. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  38. xmlns:req-params="http://developer.cognos.com/schemas/request/params"
  39. exclude-result-prefixes="xsl dlgctrl xtsext req-params">
  40. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  41. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  42. <xsl:template match="/">
  43. <xts:sequence>
  44. <dlgctrl:XTS2Request>
  45. <dlgctrl:target>/portal/addEntries/add_entries.xts</dlgctrl:target>
  46. <dlgctrl:stackName>addEntriesStack</dlgctrl:stackName>
  47. <req-params:param name="defaultTarget">/portal/properties_job.xts</req-params:param>
  48. <req-params:param name="titlePostfix"><xsl:value-of select="key('env-param','m_name')"/></req-params:param>
  49. <req-params:param name="defaultSearchPath"><xsl:value-of select="/root/env/param[@name='m_path']"/></req-params:param>
  50. <req-params:param name="showUsers">false</req-params:param>
  51. <req-params:param name="typeDialog">false</req-params:param>
  52. <req-params:param name="addEntriesUI">runnables</req-params:param>
  53. <req-params:param name="returnProperties">
  54. <req-params:property name="permissions"/>
  55. <req-params:property name="canBurst"/>
  56. <req-params:property name="runAsOwner"/>
  57. <req-params:property name="runWithOwnerCapabilities"/>
  58. <req-params:property name="base"/>
  59. <req-params:property name="parent"/>
  60. <req-params:property name="executionFormat"/>
  61. <req-params:property name="executionLocale"/>
  62. <req-params:property name="executionPageDefinition"/>
  63. <req-params:property name="executionPageOrientation"/>
  64. <req-params:property name="routingServerGroup"/>
  65. <req-params:property name="options"/>
  66. </req-params:param>
  67. <req-params:param name="refProp">
  68. <req-params:refProp name="base"/>
  69. <req-params:refProp name="parent"/>
  70. </req-params:param>
  71. <req-params:param name="allowDuplicates">true</req-params:param>
  72. <req-params:param name="allowRootBrowsing">true</req-params:param>
  73. </dlgctrl:XTS2Request>
  74. </xts:sequence>
  75. </xsl:template>
  76. </xsl:stylesheet>
  77. </xts:block>
  78. <!--
  79. ===============================================================================================
  80. processResponse - Process the response from the callMorphlet block and either displays
  81. the markup or processes the results
  82. ===============================================================================================
  83. -->
  84. <xts:block
  85. id="processResponse"
  86. nodelist="output,http,env,system,user,morphletResponse,credential,cookies"
  87. path="/portal/addEntries/logicsheets/process_added_entries.xslt"
  88. processor="XSLT"
  89. dependency="callMorphlet"
  90. type="exec"
  91. condition=".[ /root/env/param[@name='controller_state'] != '' ]"
  92. mandatory="false">
  93. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  94. <xts:logicsheet path="logicsheets/portal.xsl"/>
  95. </xts:block>
  96. <!--
  97. ===============================================================================================
  98. Load object-specific property tabs map
  99. ===============================================================================================
  100. -->
  101. <xts:block id="getTabs" type="exec" mode="interpret" processor="XML" dependency="processResponse" path="/portal/uiobjects_tabs.xml" condition=".[not(/root/mode='addEntries')]" mandatory="false"/>
  102. <!--
  103. ===============================================================================================
  104. getObjects - get object class names
  105. ===============================================================================================
  106. -->
  107. <xts:block id="classNames" type="exec" mode="input" processor="XML" dependency="processResponse" path="/portal/uiExtensions.xml" condition=".[not(/root/mode='addEntries')]" mandatory="false">
  108. <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
  109. </xts:block>
  110. <!--
  111. ===============================================================================================
  112. getContent
  113. ===============================================================================================
  114. -->
  115. <xts:block id="getContent" type="exec" mode="interpret" processor="XSLT" dependency="processResponse formlogic_init" condition=".[not(/root/mode='addEntries')]" mandatory="false">
  116. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  117. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  118. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  119. <xsl:stylesheet version="1.0"
  120. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  121. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  122. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  123. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  124. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  125. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  126. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  127. <xsl:variable name="query-values" select="/root/env/param"/>
  128. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  129. <cml:object-predicates/>
  130. <xsl:template match="/">
  131. <!-- unpack some xml blobs -->
  132. <xts:sequence>
  133. <xts:append>
  134. <!-- Either unpack the list or retrieve the jobSteps -->
  135. <xsl:if test="key('env-param','jobSteps')">
  136. <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( key('env-param','jobSteps') )), true() )" disable-output-escaping="yes"/>
  137. </xsl:if>
  138. <!-- Either unpack the job options -->
  139. <xsl:if test="key('env-param','jobOptions')">
  140. <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap', string( key('env-param','jobOptions') )), true() )" disable-output-escaping="yes"/>
  141. </xsl:if>
  142. </xts:append>
  143. </xts:sequence>
  144. <!-- content request -->
  145. <xts:sequence>
  146. <xts:append>
  147. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  148. <send:request provider="cm">
  149. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  150. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  151. <cm:requests>
  152. <!-- Page definitions -->
  153. <cm:query>
  154. <cm:search>
  155. <xsl:text>/configuration/pageDefinition</xsl:text>
  156. <xsl:value-of select="$visibility-predicate"/>
  157. </cm:search>
  158. <cm:properties>
  159. <cm:property name="displaySequence"/>
  160. <cm:property name="defaultName"/>
  161. <cm:property name="searchPath"/>
  162. </cm:properties>
  163. <cm:sortBy>
  164. <cm:sort name="displaySequence" order="descending"/>
  165. </cm:sortBy>
  166. </cm:query>
  167. <!-- Job information -->
  168. <cm:query>
  169. <cm:search>
  170. <!-- step options page changes m_obj so make sure to use the saved version-->
  171. <xsl:choose>
  172. <xsl:when test="/root/env/param[@name = 'step_options_visited'] = 'true'">
  173. <xsl:value-of select="/root/env/param[@name='m_job_obj']"/>
  174. </xsl:when>
  175. <xsl:otherwise>
  176. <xsl:value-of select="/root/env/param[@name='m_obj']"/>
  177. </xsl:otherwise>
  178. </xsl:choose>
  179. </cm:search>
  180. <cm:properties>
  181. <cml:prop-job/>
  182. </cm:properties>
  183. <cm:options>
  184. <cm:refProps>
  185. <cm:refProp refPropName="parent">
  186. <cm:properties>
  187. <cm:property name="searchPath"/>
  188. </cm:properties>
  189. </cm:refProp>
  190. </cm:refProps>
  191. </cm:options>
  192. </cm:query>
  193. <!-- need to get all the archiveLocations -->
  194. <cm:query>
  195. <cm:search>
  196. <xsl:text>/configuration/archiveLocation</xsl:text>
  197. <xsl:value-of select="$visibility-predicate"/>
  198. </cm:search>
  199. <cm:properties>
  200. <cm:property name="searchPath"/>
  201. <cm:property name="defaultName"/>
  202. </cm:properties>
  203. <cm:sortBy>
  204. <cm:sort name="defaultName" order="ascending"/>
  205. </cm:sortBy>
  206. </cm:query>
  207. </cm:requests>
  208. </cm:query>
  209. </xts:transform>
  210. </send:request>
  211. </xts:transform>
  212. </xts:append>
  213. <xsl:if test="not(/root/env/param[@name='visited_job_properties'])">
  214. <!-- need to deal with an exception case for the continueOnError jobOptions. That option
  215. is set on the job property dialog and NOT in the job options dialog -->
  216. <xts:append select="/root/env">
  217. <xts:transform src="transforms/portal/options/generateParams.xslt" processor="XSLT">
  218. <root>
  219. <options>
  220. <value>
  221. <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='options']/*[local-name()='value']/*[local-name()='item' and ./*[local-name()='name']='continueOnError' or ./*[local-name()='name']='writeCompleteHistory']"/>
  222. </value>
  223. </options>
  224. </root>
  225. </xts:transform>
  226. <!-- check if we need to override output format -->
  227. <xsl:variable name="allowPDF"><xsl:if test="not(/root/session/param[@name='capabilities']/canGeneratePDFOutput)">false</xsl:if></xsl:variable>
  228. <xsl:variable name="allowXML"><xsl:if test="not(/root/session/param[@name='capabilities']/canGenerateXMLOutput)">false</xsl:if></xsl:variable>
  229. <xsl:variable name="allowCSV"><xsl:if test="not(/root/session/param[@name='capabilities']/canGenerateCSVOutput)">false</xsl:if></xsl:variable>
  230. <xsl:variable name="allowXLS"><xsl:if test="not(/root/session/param[@name='capabilities']/canGenerateXLSOutput)">false</xsl:if></xsl:variable>
  231. <xsl:if test="$allowPDF='false' or $allowXML='false' or $allowCSV='false' or $allowXLS='false'">
  232. <param name="override_outputFormat_option"><xsl:value-of select="'true'"/></param>
  233. </xsl:if>
  234. </xts:append>
  235. <xts:delete select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='options']/*[local-name()='value']/*[local-name()='item' and ./*[local-name()='name']='continueOnError']"/>
  236. <xts:delete select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='options']/*[local-name()='value']/*[local-name()='item' and ./*[local-name()='name']='writeCompleteHistory']"/>
  237. <xts:append>
  238. <steps>
  239. <xts:transform src="transforms/portal/jobDefinition/addStepGUIDs.xslt" processor="XSLT">
  240. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  241. <send:request provider="cm">
  242. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  243. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  244. <cm:search><xsl:value-of select="concat(/root/env/param[@name = 'm_obj'],'/jobStepDefinition')"/></cm:search>
  245. <cm:properties>
  246. <cm:property name="searchPath"/>
  247. <cm:property name="storeID"/>
  248. <cm:property name="displaySequence"/>
  249. <cm:property name="stepObject"/>
  250. <cm:property name="options"/>
  251. <cm:property name="parameters"/>
  252. </cm:properties>
  253. <cm:options>
  254. <cm:refProps>
  255. <cm:refProp refPropName="stepObject">
  256. <cm:properties>
  257. <cml:prop-base/>
  258. <cm:property name="ancestors"/>
  259. <cm:property name="canBurst"/>
  260. <cm:property name="runAsOwner"/>
  261. <cm:property name="runWithOwnerCapabilities"/>
  262. <cm:property name="parent"/>
  263. <cm:property name="executionFormat"/>
  264. <cm:property name="executionLocale"/>
  265. <cm:property name="executionPageDefinition"/>
  266. <cm:property name="executionPageOrientation"/>
  267. <cm:property name="routingServerGroup"/>
  268. </cm:properties>
  269. </cm:refProp>
  270. </cm:refProps>
  271. </cm:options>
  272. <cm:sortBy>
  273. <cm:sort name="displaySequence" order="ascending"/>
  274. </cm:sortBy>
  275. </cm:query>
  276. </xts:transform>
  277. </send:request>
  278. </xts:transform>
  279. </xts:transform>
  280. </steps>
  281. <jobOptions>
  282. <xts:queryNode select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='options']"/>
  283. </jobOptions>
  284. </xts:append>
  285. </xsl:if>
  286. <!-- removed any options from the env that aren't suppose to be there (i.e. dependent on checkboxes that aren't checked -->
  287. <xsl:if test="/root/env/param[@name = 'run_options_visited'] = 'true' or /root/env/param[@name = 'step_options_visited'] = 'true'">
  288. <xts:replace select="/root/env">
  289. <xts:transform src="transforms/portal/options/cleanEnv.xslt" processor="XSLT">
  290. <root>
  291. <xsl:copy-of select="/root/env"/>
  292. </root>
  293. </xts:transform>
  294. </xts:replace>
  295. </xsl:if>
  296. </xts:sequence>
  297. </xsl:template>
  298. </xsl:stylesheet>
  299. </xts:block>
  300. <!--
  301. ===============================================================================================
  302. upgradeJobOptions:
  303. Upgrade the job options (and step options) to to handle deprecated options. In particular, the deprecated 'savePromptCache' option has
  304. to be converted to the new 'promptCacheMode' option.
  305. This is applied for the job and job steps
  306. ===============================================================================================
  307. -->
  308. <xts:block id="upgradeJobOptions" dependency="getContent" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/env/param[@name='visited_job_properties']) and not(/root/mode='addEntries')]" mandatory="false">
  309. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  310. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  311. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  312. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  313. <xts:logicsheet path="logicsheets/portal.xsl"/>
  314. <xsl:stylesheet version="1.0"
  315. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  316. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  317. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  318. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  319. exclude-result-prefixes="xsl xsi pf xtsext">
  320. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  321. <pf:variables/>
  322. <xsl:template match="/">
  323. <xts:sequence>
  324. <!-- apply an upgrade transform to the job options-->
  325. <xts:replace select="/root/*[local-name()='jobOptions']/*[local-name()='options']">
  326. <xts:transform src="transforms/portal/jobDefinition/upgradeJobOptions.xslt" processor="XSLT">
  327. <xsl:copy-of select="/root/jobOptions/options"/>
  328. </xts:transform>
  329. </xts:replace>
  330. <!-- apply an upgrade transform to the job step's option-->
  331. <xts:replace select="/root/*[local-name()='steps']/*[local-name()='queryResponse']">
  332. <xts:transform src="transforms/portal/jobDefinition/upgradeJobStepOptions.xslt" processor="XSLT">
  333. <xsl:copy-of select="/root/steps/*"/>
  334. </xts:transform>
  335. </xts:replace>
  336. </xts:sequence>
  337. </xsl:template>
  338. </xsl:stylesheet>
  339. </xts:block>
  340. <!--
  341. ===============================================================================================
  342. generateUIHelpers:
  343. Use the information queries from CM about the delivery options to build summary strings
  344. for the job and steps to be used by the UI generation
  345. ===============================================================================================
  346. -->
  347. <xts:block id="generateUIHelpers" dependency="upgradeJobOptions" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/env/param[@name='visited_job_properties']) and not(/root/mode='addEntries')]" mandatory="false">
  348. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  349. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  350. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  351. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  352. <xts:logicsheet path="logicsheets/portal.xsl"/>
  353. <xsl:stylesheet version="1.0"
  354. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  355. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  356. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  357. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  358. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  359. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  360. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  361. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  362. exclude-result-prefixes="xtsext xsl cm dt pf cf cp send">
  363. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  364. <pf:variables/>
  365. <xsl:template match="/">
  366. <xts:sequence>
  367. <xsl:call-template name="dt:generateUIHelpersFromOptions">
  368. <xsl:with-param name="queryReplyPath" select="/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*"/>
  369. <xsl:with-param name="appendPath" select="'/root/jobOptions'"/>
  370. </xsl:call-template>
  371. <xsl:if test="/root/steps/*">
  372. <xsl:call-template name="dt:generateUIHelpersFromOptions">
  373. <xsl:with-param name="queryReplyPath" select="/root/steps/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition']"/>
  374. <xsl:with-param name="appendPath" select="'/root/steps/*[local-name()=&quot;queryResponse&quot;]/*[local-name()=&quot;jobStepDefinition&quot;]'"/>
  375. <xsl:with-param name="currentReply" select="'1'"/>
  376. <xsl:with-param name="steps" select="/root/steps/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition']"/>
  377. </xsl:call-template>
  378. </xsl:if>
  379. <!-- special case for content task. We must keep track if the content task is a report upgrade or
  380. consistency check -->
  381. <xsl:for-each select="/root/steps/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition']">
  382. <xsl:if test="*[local-name()='stepObject']/*/*[local-name()='objectClass']='contentTask'">
  383. <xsl:variable name="pos" select="position()"/>
  384. <xts:append select="/root/steps/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition'][{$pos}]">
  385. <xts:transform src="transforms/portal/options/parseContentTaskOptions.xslt" processor="XSLT">
  386. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  387. <send:request provider="cm">
  388. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  389. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  390. <cm:requests>
  391. <cm:query>
  392. <cm:search><xsl:value-of select="*[local-name()='stepObject']/*/*[local-name()='searchPath']"/></cm:search>
  393. <cm:properties>
  394. <cm:property name="options"/>
  395. </cm:properties>
  396. </cm:query>
  397. </cm:requests>
  398. </cm:query>
  399. </xts:transform>
  400. </send:request>
  401. </xts:transform>
  402. </xts:transform>
  403. </xts:append>
  404. </xsl:if>
  405. </xsl:for-each>
  406. </xts:sequence>
  407. </xsl:template>
  408. <dt:generateUIHelpersFromOptions/>
  409. </xsl:stylesheet>
  410. </xts:block>
  411. <!--
  412. ===============================================================================================
  413. modify the sequences of the steps.
  414. NOTE: This block compiles with XSLTC but it doesn't work.
  415. ===============================================================================================
  416. -->
  417. <xts:block id="updateSequence" dependency="generateUIHelpers" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[@name='modifySequence'] and not(/root/mode='addEntries')]" mandatory="false">
  418. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  419. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  420. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  421. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  422. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  423. xmlns:x="x">
  424. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  425. <dt:jobUpdateSequence/>
  426. </xsl:stylesheet>
  427. </xts:block>
  428. <!--
  429. ===============================================================================================
  430. preserveOptionPassword
  431. A block to preserve the pdf options passwod.
  432. ===============================================================================================
  433. -->
  434. <xts:block id="preserveOptionPassword" processor="XSLT" type="exec" dependency="getContent">
  435. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  436. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  437. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  438. <xsl:template match="/root">
  439. <xts:sequence>
  440. <xsl:choose>
  441. <xsl:when test="key('env-param','run_options_visited') = 'true'">
  442. <xsl:call-template name="generate-encrypted-params">
  443. <xsl:with-param name="options" select="/root/cm:queryResponse/cm:queryReply[2]/*/*[local-name()='options']/*[local-name()='value']"/>
  444. </xsl:call-template>
  445. </xsl:when>
  446. <xsl:when test="key('env-param','step_options_visited') = 'true'">
  447. <xsl:variable name="current-step" select="/root/env/param[@name='current_step']"/>
  448. <xsl:call-template name="generate-encrypted-params">
  449. <xsl:with-param name="options" select="/root/steps/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition' and *[local-name() = 'displaySequence' and string()=$current-step]]/*[local-name()='options']/*[local-name()='value']"/>
  450. </xsl:call-template>
  451. </xsl:when>
  452. </xsl:choose>
  453. </xts:sequence>
  454. </xsl:template>
  455. <xsl:template name="generate-encrypted-params">
  456. <xsl:param name="options"/>
  457. <xsl:if test="key('env-param','preserve_pdf_userPwd')='true' or key('env-param','preserve_pdf_ownerPwd')='true'">
  458. <xts:append select="/root/env">
  459. <xsl:if test="key('env-param','preserve_pdf_userPwd')='true'">
  460. <param name="m_pdf_userPassword_runOption_Encrypted">
  461. <xsl:value-of select="$options/*[local-name()='item' and *[local-name()='name']='userPassword']/*[local-name()='value']"/>
  462. </param>
  463. </xsl:if>
  464. <xsl:if test="key('env-param','preserve_pdf_ownerPwd')='true'">
  465. <param name="m_pdf_ownerPassword_runOption_Encrypted">
  466. <xsl:value-of select="$options/*[local-name()='item' and *[local-name()='name']='ownerPassword']/*[local-name()='value']"/>
  467. </param>
  468. </xsl:if>
  469. </xts:append>
  470. </xsl:if>
  471. </xsl:template>
  472. </xsl:stylesheet>
  473. </xts:block>
  474. <!--
  475. ================================================================================
  476. create an encrypted credention for any option password
  477. ================================================================================
  478. -->
  479. <xts:block id="processOptionPassword" nodelist="env" path="/portal/genOptionCredentials.xslt" dependency="preserveOptionPassword" type="exec" mode="interpret" processor="XSLT" mandatory="false" condition=".[/root/env/param[contains(@name, 'Password_runOption')] != '']"/>
  480. <!--
  481. ===============================================================================================
  482. build the options with the params present in /env/param. Should only get executed when we've
  483. returned from the job options or step options dialog.
  484. ===============================================================================================
  485. -->
  486. <xts:block id="buildOptions" dependency="updateSequence processOptionPassword" type="exec" mode="interpret" processor="XSLT" condition=".[(/root/env/param[@name = 'run_options_visited'] = 'true' or /root/env/param[@name = 'step_options_visited'] = 'true') and not(/root/mode='addEntries')]" mandatory="false">
  487. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  488. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  489. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  490. <xts:logicsheet path="logicsheets/portal.xsl"/>
  491. <xsl:stylesheet version="1.0"
  492. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  493. xmlns:x="x"
  494. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  495. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  496. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  497. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  498. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  499. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  500. exclude-result-prefixes="xtsext xsl x cm dt pf cf cp">
  501. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  502. <pf:variables/>
  503. <dt:updateOptions/>
  504. </xsl:stylesheet>
  505. </xts:block>
  506. <!--
  507. ===============================================================================================
  508. Execute the operation: delete, additems_
  509. Only execute if lisop isn't empty (i.e. we're performing and action) or we've returned from
  510. the add entries dialog.
  511. ===============================================================================================
  512. -->
  513. <xts:block id="executeCommand" dependency="buildOptions" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/mode='addEntries') and (/root/env/param[@name='listop'] != '' or /root/newEntries)]" mandatory="false">
  514. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  515. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  516. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  517. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  518. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  519. <xts:logicsheet path="logicsheets/portal.xsl"/>
  520. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  521. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  522. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  523. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  524. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  525. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  526. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  527. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  528. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  529. xmlns:x="x"
  530. exclude-result-prefixes="pf cm dt cf xtsext x cp send">
  531. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  532. <pf:variables/>
  533. <dt:jobExecuteCommand/>
  534. </xsl:stylesheet>
  535. </xts:block>
  536. <!--
  537. ===============================================================================================
  538. Update the displaySequence property to reflect the order of the steps
  539. ===============================================================================================
  540. -->
  541. <xts:block id="setSequence" dependency="executeCommand" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/mode='addEntries')]" mandatory="false">
  542. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  543. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  544. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  545. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  546. xmlns:x="x"
  547. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  548. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  549. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  550. <dt:jobSetSequence/>
  551. </xsl:stylesheet>
  552. </xts:block>
  553. <!--
  554. ===============================================================================================
  555. Serialize the data (web64 encoded)
  556. ===============================================================================================
  557. -->
  558. <xts:block id="encodeList" dependency="setSequence" type="exec" mode="interpret" processor="XSLT" condition=".[not(/root/mode='addEntries')]" mandatory="false">
  559. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  560. <xts:logicsheet path="logicsheets/portal.xsl"/>
  561. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  562. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  563. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  564. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  565. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
  566. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  567. <pf:variables/>
  568. <dt:jobEncodeList/>
  569. </xsl:stylesheet>
  570. </xts:block>
  571. <!--
  572. ===============================================================================================
  573. Render the HTML page
  574. ===============================================================================================
  575. -->
  576. <xts:block id="render_page" dependency=" encodeList formlogic_init getTabs classNames" mode="output" processor="XSLT" type="exec" mimeType="text/html" condition=".[not(/root/mode='addEntries')]" mandatory="false">
  577. <!-- portal specific information -->
  578. <xts:logicsheet path="logicsheets/portal.xsl"/>
  579. <!-- Dialog specific logicsheets -->
  580. <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
  581. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  582. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  583. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  584. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  585. <!-- Generic logicsheets -->
  586. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  587. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  588. <!-- apply the form logic -->
  589. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  590. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  591. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  592. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  593. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  594. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  595. xmlns:ut="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/ui-templates/"
  596. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  597. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  598. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  599. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  600. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  601. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  602. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  603. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  604. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  605. xmlns:x="x"
  606. exclude-result-prefixes="xsl lyt dp df cp cf cm bus utml xtsext xts">
  607. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  608. <!-- current file name -->
  609. <xsl:variable name="mname" select="'properties_job.xts'"/>
  610. <xsl:variable name="m_class" select="/root/env/param[@name = 'm_class']"/>
  611. <xsl:variable name="back-url" select="key('env-param','backURL')"/>
  612. <!-- add any theme variables -->
  613. <pf:variables/>
  614. <!-- Need ability to display icons-->
  615. <pf:gen-icon/>
  616. <!-- start the output -->
  617. <xsl:variable name="the-object" select="/root/cm:queryResponse/cm:queryReply[2]/*"/>
  618. <xsl:variable name="has_write_permission" select="contains( $the-object/cm:permissions, 'write' )"/>
  619. <xsl:variable name="has_policy_permission" select="contains($the-object/cm:permissions, 'setPolicy')"/>
  620. <xsl:variable name="showOKCancel" select="$has_write_permission or $has_policy_permission"/>
  621. <xsl:template match="root">
  622. <!-- Page and title -->
  623. <xsl:variable name="browserTitle"><xts:string id="IDS_PROPERTIES_TITLE"><xts:param name="objectName">
  624. <span lang="{$contentLocale}"><xsl:value-of select="xtsext:enforceBTD(/root/env/param[@name = 'm_name'], $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></span>
  625. </xts:param></xts:string></xsl:variable>
  626. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  627. <dp:meta>
  628. <pf:meta/>
  629. <!-- Standard meta tags -->
  630. </dp:meta>
  631. <xsl:copy-of select="/root/promptScripts/*"/>
  632. <dp:script>
  633. <!-- Help system -->
  634. <pf:help/>
  635. <!-- Define selectall and deselectall functions.-->
  636. <dt:selectDeselectAll/>
  637. <script language="javascript" src="{$webcontent}/{$app}/js/runOptions.js"/>
  638. <script language="javascript">
  639. <!-- some behavior for when the page loads -->
  640. function init()
  641. {
  642. if (document.pform.controller_state)
  643. {
  644. document.pform.controller_state.value = '';
  645. }
  646. <!-- m can get clobbered when going to secondary dialogs, so make sure it has the right value -->
  647. document.pform.m.value = "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param', 'm')))"/>";
  648. }
  649. function validate()
  650. {
  651. return true;
  652. }
  653. </script>
  654. </dp:script>
  655. <!-- TODO: Replace with real logic once prompting model has been defined. -->
  656. <xsl:variable name="has_prompts" select="false()"/>
  657. <utml:form name="pform" action="{$gateway}" method="post">
  658. <!-- Since the date control input variables are not utml input, they would be put into Hidden inputs whenever the page is refreshed and cause
  659. duplicate. So we exclude them from query values. -->
  660. <utml:exclusion-list>
  661. <xsl:value-of select="' override_default_options promptObject select_languages_visited txtDatedateFrom txtDatedateTo jobDefinitionNotify jobDefinitionBurst jobDefinitionFormat jobDefinitionLocale step_options_visited language formatSection deliverySection runAsSection p_sched_date1 p_sched_date2 p_sched_time1 p_intradayRecurrenceStart p_intradayRecurrenceEnd hourstimeTo hourstimeFrom minutestimeTo minutestimeFrom secondstimeFrom secondstimeTo AMPMtimeTo AMPMtimeFrom visited_schedule_properties dateTotxtDate dateFromtxtDate so.searchPath confirm_m_pdf_userPassword_runOption m_pdf_userPassword_runOption_Encrypted confirm_m_pdf_ownerPassword_runOption m_pdf_ownerPassword_runOption_Encrypted '"/>
  662. </utml:exclusion-list>
  663. <!-- Determine if this form is read-only. -->
  664. <utml:read-only>
  665. <xsl:choose>
  666. <xsl:when test="$has_write_permission = true()">
  667. <xsl:text>false</xsl:text>
  668. </xsl:when>
  669. <xsl:otherwise>
  670. <xsl:text>true</xsl:text>
  671. </xsl:otherwise>
  672. </xsl:choose>
  673. </utml:read-only>
  674. <!-- this defines the form command operation to be performed when all the collected properties are submitted. -->
  675. <utml:input type="hidden" name="ifrmcmd" utml:update="false">
  676. <utml:value>
  677. <xsl:text>save</xsl:text>
  678. </utml:value>
  679. </utml:input>
  680. <utml:input type="hidden" name="m_class" utml:update="false">
  681. <utml:value>
  682. <xsl:value-of select="$m_class"/>
  683. </utml:value>
  684. </utml:input>
  685. <utml:input type="hidden" name="page_is_read_only" utml:update="false">
  686. <utml:value>
  687. <xsl:choose>
  688. <xsl:when test="$has_write_permission">
  689. <xsl:text>false</xsl:text>
  690. </xsl:when>
  691. <xsl:otherwise>
  692. <xsl:text>true</xsl:text>
  693. </xsl:otherwise>
  694. </xsl:choose>
  695. </utml:value>
  696. </utml:input>
  697. <!-- set flag to indicate initial state -->
  698. <xsl:if test="not(/root/*[local-name()='queryResponse']/*[local-name()='queryReply'][2]/*/*[local-name()='options']/*[local-name()='value']/*[local-name()='item']/*[local-name()='name']='outputFormat') and not(key('env-param', 'no_initial_job_properties'))">
  699. <utml:input name="no_initial_job_properties" type="hidden" value="true"/>
  700. </xsl:if>
  701. <!--
  702. Only keep track that we've visited this dialog if the user has write permission.
  703. We can't keep track of the steps and options since we'd try to save them when the user hits the
  704. OK button, so we must always query CM for the steps and options.
  705. -->
  706. <xsl:if test="$has_write_permission">
  707. <utml:input name="visited_job_properties" type="hidden" value="true"/>
  708. </xsl:if>
  709. <utml:input name="ps_nav_op" type="hidden" value=""/>
  710. <utml:input name="m" type="hidden" value=""/>
  711. <!-- prompt run options must always be set to false for a job -->
  712. <utml:input type="hidden" name="m_ro_prompt" utml:update="false" value="false"/>
  713. <utml:input type="hidden" name="m_path" utml:update="false">
  714. <utml:value>
  715. <xsl:value-of select="/root/*[local-name() = 'queryResponse']/*[local-name()='queryReply'][2]/*[local-name()='jobDefinition']/*[local-name()='parent']/*/*[local-name()='searchPath']"/>
  716. </utml:value>
  717. </utml:input>
  718. <!-- Dialog header -->
  719. <dp:header useBackURL="not($showOKCancel)">
  720. <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
  721. </dp:header>
  722. <!-- Property tabs -->
  723. <df:propertiesTabs select="job">
  724. <df:hasSetPolicy><xsl:value-of select="$has_policy_permission"/></df:hasSetPolicy>
  725. </df:propertiesTabs>
  726. <!-- Tab description -->
  727. <dp:description>
  728. <xts:string id="IDS_PROP_JOB_INTRO"/>
  729. </dp:description>
  730. <ut:jobUI/>
  731. <dp:footer>
  732. <xsl:choose>
  733. <xsl:when test="$showOKCancel">
  734. <df:button df:id="IDS_OK" utml:validate="true" df:style="submit" onclick="if(document.pform.h_CAM_action)document.pform.h_CAM_action.value='generateTC';"/>
  735. <xsl:choose>
  736. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  737. <df:button df:id="IDS_CANCEL" df:style="stack-down"/>
  738. </xsl:when>
  739. <xsl:otherwise>
  740. <df:button df:id="IDS_CANCEL" df:style="back-url"/>
  741. </xsl:otherwise>
  742. </xsl:choose>
  743. </xsl:when>
  744. <xsl:otherwise>
  745. <df:button df:id="IDS_CLOSE" df:style="back-url"/>
  746. </xsl:otherwise>
  747. </xsl:choose>
  748. </dp:footer>
  749. <xsl:if test="$has_write_permission and not(key('env-param','visited_job_properties')) and /root/*[local-name()='steps']/*[local-name()='queryResponse']/*[local-name()='jobStepDefinition']/*[local-name()='stepObject' and @nil='true']">
  750. <script language="javascript">
  751. if (window.confirm("<xts:string id="IDS_PROP_JOB_MISSING_STEP_ALERT" encode="javascript"/>"))
  752. {
  753. document.pform.listop.value = 'removeNilSteps';
  754. document.pform.ps_nav_op.value = 'maintain';
  755. document.pform.m.value = 'portal/<xsl:value-of select="$mname"/>';
  756. window.setTimeout('document.pform.submit();', 1 );
  757. }
  758. </script>
  759. </xsl:if>
  760. </utml:form>
  761. </dp:page>
  762. </xsl:template>
  763. <ut:jobUITemplate showTitle="true" showBorder="true"/>
  764. </xsl:stylesheet>
  765. </xts:block>
  766. <!--
  767. ===============================================================================================
  768. debug - display debug information
  769. ===============================================================================================
  770. -->
  771. <xts:block id="debug" dependency="processResponse render_page" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  772. <!-- Get the debug logic sheet -->
  773. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  774. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
  775. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  776. <xsl:template match="/">
  777. <dbg:dumpxml select="/root"/>
  778. </xsl:template>
  779. </xsl:stylesheet>
  780. </xts:block>
  781. </xts:morphlet>