123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2011
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseDataSourcesTool">
- <!--
- ===============================================================================================
- formlogic_init - standard form logic initialization
- ===============================================================================================
- -->
- <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
-
- <!--
- ======================================================================================
- encrypt the password - never store passwords in the page if they're not encrypted.
- ======================================================================================
- -->
- <xts:block id="encrypt_password" dependency="formlogic_init" type="exec" mode="interpret" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='m_connection_password'] != '']">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:variable name="xtscm" select="'http://developer.cognos.com/schemas/xts-cm/1/'"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:if test="not(/root/env/param[@name='passwordEncrypted']) or /root/env/param[@name='passwordEncrypted'] = ''">
- <xts:delete select="/root/env/param[@name='passwordEncrypted']"/>
-
- <xts:append select="/root/env">
- <param name="passwordEncrypted">
- <xts:encrypt>
- <xts:param name="provider">cognos.cam</xts:param>
- <xts:param name="source">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_connection_password' !='' and @format='encrypted']">
- <xts:decrypt>
- <xts:param name="provider">cognos.cam</xts:param>
- <xts:param name="source"><xsl:value-of select="/root/env/param[@name='m_connection_password']"/></xts:param>
- </xts:decrypt>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/env/param[@name='m_connection_password']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xts:param>
- </xts:encrypt>
- </param>
- </xts:append>
-
- <xts:delete select="/root/env/param[@name='m_connection_password']"/>
- <xts:delete select="/root/env/param[@name='m_connection_confirm_password']"/>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================================
- get_content
- - if we're creating a new oracle connection then query for the commands stored on the dataSource
- - add the information in the DOM for the pager control
- ===============================================================================================================
- -->
- <xts:block id="get_content" processor="XSLT" type="exec" mode="interpret" condition=".[/root/env/param[@name='m_new_type']='dataSourceConnection' or /root/env/param[@name='m_class']='dataSourceConnection']" mandatory="false">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <parentDataSource>
- <xts:transform src="transforms/portal/dataSource/stripnamespace.xslt" processor="XSLT">
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <search><xsl:value-of select="key('env-param','m_path')"/></search>
- <properties>
- <cm:property name="searchPath"/>
- <cm:property name="openConnectionCommands"/>
- <cm:property name="openSessionCommands"/>
- <cm:property name="closeConnectionCommands"/>
- <cm:property name="closeSessionCommands"/>
- </properties>
- <cm:options schemaInfo="true"/>
- </query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:transform>
- </parentDataSource>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
-
- <!--
- ===============================================================================================================
- remove pager params
- ===============================================================================================================
- -->
- <xts:block id="remove_pager_params" processor="XSLT" type="exec" mode="interpret" mandatory="false">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='pagerfromlistpager']"/>
- <xts:delete select="/root/env/param[@name='pagertolistpager']"/>
- <xts:delete select="/root/env/param[@name='pagerfrom_dlistpager']"/>
- <xts:delete select="/root/env/param[@name='pagerto_dlistpager']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- load_metadata
- ===============================================================================================
- -->
- <xts:block id="load_metadata" processor="XSLT" type="exec" mode="interpret" nodelist="">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <xts:transform src="transforms/portal/dataSource/extractDatasourceMetadata.xslt" processor="XSLT">
- <root>
- <xts:queryNode select="/root/env"/>
- <xts:transform src="/transforms/portal/dataSource/generateDatasourceMetadata.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/portal.xml</xts:param>
- <root/>
- </xts:transform>
- </root>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- getConfig - retrieve the configuration UI settings
- ===============================================================================================
- -->
- <xts:block id="process_command_blocks" dependency="get_content load_metadata" type="exec" mode="interpret" processor="XSLT" path="portal/command_blocks.xml"/>
-
- <!--
- ===============================================================================================
- renderPage - render the page
- ===============================================================================================
- -->
- <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="process_command_blocks encrypt_password get_content formlogic_init">
- <!-- get the presentation theme -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/"
- xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- exclude-result-prefixes="xsl dcx cf cp pf df dp dt lyt utml">
-
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'new_connection4.xts'"/>
- <!-- add any theme variables -->
- <pf:variables/>
- <dcx:commandTemplate/>
-
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="backURL" select="key('env-param','backURL')"/>
- <xsl:variable name="browserTitle">
- <xsl:choose>
- <xsl:when test="key('env-param','m_new_class')='dataSource'">
- <xts:string id="IDS_NEW_DATA_SOURCE_COMMANDS_TITLE"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_NEW_CONNECTION_COMMANDS_TITLE"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="fromCMM" select="key('env-param', 'fromCMM')"/>
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
- <dp:meta>
- <!-- Standard meta tags -->
- <pf:meta/>
- </dp:meta>
- <dp:script>
- <!-- Help system -->
- <pf:help context="HID_DATABASE_COMMANDS"/>
- <dt:selectDeselectAll/>
- <script language="javascript">
- <xsl:if test="$fromCMM">
- function doCMMCancel()
- {
- document.cmmform.submit();
- }
- </xsl:if>
- <xsl:if test="key('env-param','from_bmt')!=''">
- <!-- Called only when canceling back to BMT environment.
- from_bmt is not exclusive to BMT. It is added to the environment by the new_connection.xts
- Therefore any external application that calls this morphlet will be defining this from_bmt
- (Transformer, BMT ...).
- -->
- function doCancel()
- {
- window.external.OnClose(1);
- }
- </xsl:if>
- </script>
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:exclusion-list>
- <xsl:value-of select="' m_connection_password m_connection_confirm_password '"/>
- </utml:exclusion-list>
- <dp:header>
- <!-- header titles-->
- <dp:title><xsl:value-of select="normalize-space($browserTitle)"/></dp:title>
- <dp:description>
- <xsl:choose>
- <xsl:when test="key('env-param','m_new_class')='dataSource'">
- <xts:string id="IDS_NEW_INTRO_DATASOURCE_COMMANDS"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_NEW_INTRO_CONNECTION_COMMANDS"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:description>
- <dp:close>
- <xsl:choose>
- <xsl:when test="key('env-param','from_bmt')">
- <a href="javascript:doCancel()">
- <dp:closeMarker/>
- </a>
- </xsl:when>
- <xsl:when test="$fromCMM">
- <a href="javascript:doCMMCancel()">
- <dp:closeMarker/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <a href="{$backURL}">
- <dp:closeMarker/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </dp:close>
- </dp:header>
- <xsl:call-template name="dcx-commandTemplate">
- <xsl:with-param name="form-read-only" select="$form-read-only"/>
- <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
- <xsl:with-param name="canWrite" select="true()"/>
- <xsl:with-param name="dataSourceConnection" select="key('env-param','m_new_class')='dataSourceConnection'"/>
- <xsl:with-param name="inWizard" select="true()"/>
- </xsl:call-template>
- <!-- Drop the "Wait" dialog here so it gets rendered in the correct spot on the page -->
- <xsl:if test="key('env-param','from_bmt')">
- <cp:genericDialog id="wait" width="200" height="100">
- <cp:param name="title"></cp:param>
- <cp:param name="message">
- <img src="{$brand_images}progress.gif" align="absmiddle"/><xsl:value-of select="'      '"/><xts:string id="IDS_WAIT"/>
- </cp:param>
- </cp:genericDialog>
- </xsl:if>
-
- <dp:footer>
- <!-- Cancel button -->
- <xsl:choose>
- <xsl:when test="key('env-param','from_bmt')!=''">
- <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:doCancel()"/>
- </xsl:when>
- <xsl:when test="$fromCMM">
- <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:doCMMCancel()"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CANCEL" df:style="back-url"/>
- </xsl:otherwise>
- </xsl:choose>
- <!-- Back button -->
- <df:button df:id="IDS_BACK" df:style="maintain">
- <df:target>
- <xsl:value-of select="concat($app, '/new_connection3.xts')"/>
- </df:target>
- </df:button>
- <!-- Next button -->
- <df:button df:id="IDS_NEXT"/>
- <utml:input type="hidden" name="m_return" value=""/>
-
- <!-- Finish button -->
- <script language="javascript">
- var bCommandSent = false;
- function finish()
- {
- document.pform.ps_nav_op.value = "maintain";
- document.pform.m.value = "<xsl:value-of select="$app"/>/submit.xts";
- <xsl:if test="key('env-param', 'm_new_class')='dataSource' and (key('env-param', 'from_transf')!='' or (not($fromCMM) and not(key('env-param', 'from_bmt')!='')))">
- <!-- we don't have to set the m_return when the wizard is called by CMM, FM and PW1.
- This is already taken care by new_connection.xts.
- The new_connection_finish.xts will present the option to create a package
- when permitted.
- Exception is for the Transformer which provides from_bmt and from_transf (BUG# 539911).
- -->
- document.pform.m_return.value = "<xsl:value-of select="$app"/>/new_connection_finish.xts";
- </xsl:if>
- <xsl:choose>
- <xsl:when test="key('env-param','from_bmt')">
- if (!bCommandSent)
- {
- document.pform.submit();
- bCommandSent = true;
- <xsl:if test="$browser='ie'">
- wait.show();
- document.body.style.cursor = "wait";
- </xsl:if>
- }
- else
- {
- bCommandSent = false;
- <xsl:if test="$browser='ie'">
- document.body.style.cursor = "default";
- wait.hide();
- </xsl:if>
- }
- </xsl:when>
- <xsl:otherwise>
- document.pform.submit();
- </xsl:otherwise>
- </xsl:choose>
- }
- </script>
- <df:button df:id="IDS_FINISH" df:style="href" df:href="javascript:finish()"/>
- </dp:footer>
- </utml:form>
- <xsl:if test="$fromCMM">
- <dt:cmmPostBackForm/>
- </xsl:if>
- </dp:page>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="render_page" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <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">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|