123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: ps
- (C) Copyright IBM Corp. 2005, 2020
- 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="canUseAdministrationPortal">
- <!--
- ===============================================================================================
- 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"/>
-
- <!-- Load object-specific property tabs map ============================================================== -->
- <xts:block id="getTabs" type="exec" mode="interpret" processor="XML" path="/portal/uiobjects_tabs.xml"/>
-
- <!--
- ================================================================================
- get_content
-
- Retrieve the data source connection details from Content Manager.
- ================================================================================
- -->
- <xts:block id="get_content" processor="XSLT" type="exec" mode="interpret" dependency="formlogic_init">
- <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="/">
- <xsl:choose>
- <xsl:when test="key('env-param','m_connection_data')!=''">
- <xts:sequence>
- <xts:append>
- <xsl:value-of select="xtsext:web64decode(xtsext:cafaction('sign_unwrap', string(key('env-param','m_connection_data'))), true())" disable-output-escaping="yes"/>
- </xts:append>
- </xts:sequence>
- </xsl:when>
- <xsl:otherwise>
- <xts:sequence>
- <xts:append>
- <connection>
- <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_obj')"/>
- <xsl:text>[permission("read")]</xsl:text>
- </search>
- <properties>
- <cml:prop-connection/>
- </properties>
- <options schemaInfo="true">
- <refProps>
- <refProp refPropName="parent">
- <properties>
- <property name="openConnectionCommands"/>
- <property name="openSessionCommands"/>
- <property name="closeConnectionCommands"/>
- <property name="closeSessionCommands"/>
- <property name="capabilities"/>
- </properties>
- </refProp>
- </refProps>
- </options>
- </query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </connection>
- </xts:append>
- </xts:sequence>
- </xsl:otherwise>
- </xsl:choose>
- <xts:sequence>
- <xts:append>
- <namespaces>
- <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>/directory/namespace</search>
- <properties>
- <cm:property name="defaultName"/>
- <cm:property name="searchPath"/>
- <cm:property name="active"/>
- </properties>
- </query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:transform>
- </namespaces>
- </xts:append>
-
- <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>
-
- <!--
- ===============================================================================================
- process_command_blocks
- ===============================================================================================
- -->
- <xts:block id="process_command_blocks" dependency="get_content load_metadata" type="exec" mode="interpret" processor="XSLT" path="portal/command_blocks.xml"/>
-
- <!--
- ================================================================================
- parse_connect_string
-
- This block examines the database code contained in the connection string to
- determine what the connection type is.
- This block only runs if the connection_type parameter is not present.
- ================================================================================
- -->
- <xts:block id="parse_connect_string" type="exec" mode="interpret" dependency="get_content" processor="XSLT" mandatory="false" condition=".[not(/root/env/param[@name='m_connection_type'])]">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="cm pf xtsext">
- <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/'"/>
-
- <pf:variables/>
-
- <xsl:template match="/">
-
- <xsl:variable name="capability" select="/root/connection/cm:queryResponse/cm:dataSourceConnection/cm:parent/cm:dataSource/cm:dataSourceCapabilities/cm:capability"/>
-
- <xsl:variable name="connectionString">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_p_connectionString'] != ''">
- <xsl:value-of select="/root/env/param[@name='m_p_connectionString']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/connection/cm:queryResponse/cm:dataSourceConnection/cm:connectionString"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="type">
- <xsl:choose>
- <xsl:when test="contains($capability, 'Enum#lobData')">
- <xsl:text>lob-jdbc</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;CR') and not(contains($connectionString, 'SERVER='))">
- <!-- Contributor -->
- <xsl:text>contributor</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;CR;') and contains($connectionString, 'SERVER=')">
- <!-- Contributor Series 7-->
- <xsl:text>contributorSeries7</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;CL;')">
- <!-- Consolidation -->
- <xsl:text>consolidation</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;PC;')">
- <!-- Cognos powercube -->
- <xsl:text>powercube</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;CS;')">
- <!-- composite -->
- <xsl:text>composite</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;VM;')">
- <!-- IBM Cognos Virtual View Manager -->
- <xsl:text>virtualviewmanager</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;DO;') or contains($connectionString, ';LOCAL;EB;')">
- <!-- IBM DB2 OLAP Server -->
- <xsl:text>dbtwoolap</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;X8;')">
- <!-- Microsoft Analysis Services (via XMLA) -->
- <xsl:text>msas_xmla</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;TM;')">
- <!-- TM1 -->
- <xsl:text>tm1</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;TMR;')">
- <!-- TM1 -->
- <xsl:text>tm1R</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;ODATA;')">
- <!-- ODATA -->
- <xsl:text>odata</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;JSON;')">
- <!-- JSON -->
- <xsl:text>json</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;LA;')">
- <!-- Cognos Now! Cube -->
- <xsl:text>cognosnow</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;YK;')">
- <!-- MS Analysis Services 2005-->
- <xsl:text>msanalysis2005</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;M8;')">
- <!-- MS Analysis Services 2008-->
- <xsl:text>msanalysis2008</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;M12;')">
- <!-- MS Analysis Services 2012-->
- <xsl:text>msanalysis2012</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;M14;')">
- <!-- MS Analysis Services 2014-->
- <xsl:text>msanalysis2014</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;M16;')">
- <!-- MS Analysis Services 2016-->
- <xsl:text>msanalysis2016</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;M17;')">
- <!-- MS Analysis Services 2017-->
- <xsl:text>msanalysis2017</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;D2;')">
- <!-- DB2 -->
- <xsl:text>db2</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;OR;')">
- <!-- Oracle -->
- <xsl:text>oracle</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;OL;DBInfo_Type=MS;Provider=SQLOLEDB;')">
- <!-- MS SQLServer (OLE DB) -->
- <xsl:text>sql</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;OL;DBInfo_Type=MS;Provider=SQLNCLI;')">
- <!-- MS SQLServer 2005 (SQLNCLI) -->
- <xsl:text>sql2005</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;OL;DBInfo_Type=MS;Provider=SQLNCLI10;')">
- <!-- MS SQLServer 2008 (SQLNCLI10) -->
- <xsl:text>sql2008</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;OL;DBInfo_Type=MS;Provider=SQLNCLI11;')">
- <!-- MS SQLServer 2012/2014 (SQLNCLI11) -->
- <xsl:text>sql2012-2014</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;OD;')">
- <!-- ODBC -->
- <xsl:text>odbc</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;PG;')">
- <!-- Progress OpenEdge -->
- <xsl:text>openEdge</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;CT;')">
- <!-- Sybase -->
- <xsl:text>sybase</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;CT15;')">
- <!-- Sybase CT15-->
- <xsl:text>sybase_ct15</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;IQ;')">
- <!-- SybaseIQ -->
- <xsl:text>sybaseIQ</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;IF;')">
- <!-- Informix -->
- <xsl:text>informix</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;BW;')">
- <!-- SAP -->
- <xsl:text>sap</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;R3;')">
- <!-- SAP R3 -->
- <xsl:text>sapR3</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;EC;')">
- <!-- SAP BW ECC -->
- <xsl:text>sapECC</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;XML;')">
- <!-- XML -->
- <xsl:text>xml</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;RB;')">
- <!-- redbrick -->
- <xsl:text>redbrick</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;TD;')">
- <!-- teradata -->
- <xsl:text>teradata</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;NZ;')">
- <xsl:text>netezza</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;SS;')">
- <!-- sql via odbc -->
- <xsl:text>sqlodbc</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;JD-D2;')">
- <xsl:text>jdbc-db2</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;JD-OR;')">
- <xsl:text>jdbc-oracle</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;JD-SS;')">
- <xsl:text>jdbc-sql</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;JDBC;')">
- <xsl:text>jdbc-generic</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;JD-TD;')">
- <xsl:text>jdbc-teradata</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;JD-NZ;')">
- <xsl:text>jdbc-netezza</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, ';LOCAL;RP-CMIS-FILENET;')">
- <xsl:text>filenet</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, 'ERP-SFDC')">
- <xsl:text>sfdc</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, 'ERP-SAP')">
- <xsl:text>sr3</xsl:text>
- </xsl:when>
- <xsl:when test="contains($connectionString, 'ERP-SIEBEL')">
- <xsl:text>siebel</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>other</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="variant">
- <xsl:text>new</xsl:text>
- </xsl:variable>
- <!-- Populate the DOM -->
- <xts:sequence>
- <xts:append select="/root/env">
- <xsl:if test="contains(' msanalysis2005 msanalysis2008 msanalysis2012 msanalysis2014 msanalysis2016 msanalysis2017 ', concat(' ',$type,' '))">
- <xsl:variable name="lcidFromConnString">
- <xsl:if test="contains($connectionString, ';LCID=')">
- <xsl:value-of select="substring-after($connectionString, ';LCID=')"/>
- </xsl:if>
- </xsl:variable>
- <param name="m_connection_locale">
- <xsl:choose>
- <xsl:when test="$lcidFromConnString">
- <xsl:choose>
- <xsl:when test="contains($lcidFromConnString, ';')">
- <xsl:value-of select="substring-before($lcidFromConnString, ';')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$lcidFromConnString"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="translate( $contentLocale, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' )"/>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- </xsl:if>
- <param name="m_connection_type"><xsl:value-of select="$type"/></param>
- <param name="m_connection_variant"><xsl:value-of select="$variant"/></param>
- <xsl:if test="$type = 'cognosnow'">
- <param name="m_connection_file"><xsl:value-of select="concat('/', substring-after($connectionString, '/'))"/></param>
- </xsl:if>
- <xsl:if test="/root/connection/cm:queryResponse/cm:dataSourceConnection/cm:credentialNamespaces/*/cm:searchPath">
- <param name="m_p_credentialNamespaces"><xsl:value-of select="/root/connection/cm:queryResponse/cm:dataSourceConnection/cm:credentialNamespaces/*/cm:searchPath"/></param>
- </xsl:if>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- get_proxy_info
- Retrieve the proxy host information
- ================================================================================
- -->
- <xts:block id="get_proxy_info" mode="interpret" type="exec" processor="XSLT" dependency="parse_connect_string" nodelist="env,credential,system,http,header" mandatory="false" condition=".[(/root/env/param[@name='m_connection_type']='sfdc') and (not(/root/env/param[@name='m_proxy_credentials']))]">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <proxyHost>
- <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="/root/env/param[@name='m_obj']"/>/credential[@name='proxy']</search>
- <properties>
- <cm:property name="defaultName"/>
- <cm:property name="objectClass"/>
- <cm:property name="dataSourceConnectionName"/>
- <cm:property name="credentials"/>
- </properties>
- </query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </proxyHost>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- save_credentials_param
-
- Save the credentials value in an environment variable
- ================================================================================
- -->
- <xts:block id="save_credentials_param" processor="XSLT" mode="interpret" type="exec" dependency="get_proxy_info" nodelist="env,proxyHost" mandatory="false" condition=".[(/root/env/param[@name='m_connection_type']='sfdc') and (not(/root/env/param[@name='m_proxy_credentials']))]">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl pf xtsext">
- <xsl:output method="xml" encoding="UTF-8" version="1.0" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/env">
- <param name="m_proxy_credentials">
- <xsl:value-of select="/root/proxyHost/cm:queryResponse/cm:credential/cm:credentials"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ================================================================================
- create_credentials
-
- Recreate the credentials if the user changed the password or username of
- the proxy host signon
- ================================================================================
- -->
- <xts:block id="create_credentials" type="exec" mode="interpret" processor="XSLT" dependency="get_content save_credentials_param" nodelist="env" mandatory="false" condition=".[/root/env/param[@name='m_username_changed']='1' or /root/env/param[@name='m_password_changed']='1']">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/">
- <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>
- <dcx:savePasswordVars/>
- <xsl:variable name="proxy_password">
- <xsl:value-of select="key('env-param', 'm_connection_proxy_password')"/>
- </xsl:variable>
- <xts:delete select="/root/env/param[@name='m_proxy_credentials']"/>
- <xts:append select="/root/env">
- <param name="m_proxy_credentials">
- <xsl:text><credential><encryptedValue></xsl:text>
- <xsl:call-template name="dcx:genCredentials">
- <xsl:with-param name="username" select="key('env-param', 'm_connection_proxy_user')"/>
- <xsl:with-param name="password" select="$proxy_password"/>
- <xsl:with-param name="passwordEncrypted" select="true()"/>
- <xsl:with-param name="cubePassword" select="$cubePassword"/>
- <xsl:with-param name="cubePasswordEncrypted" select="$cubePasswordEncrypted"/>
- </xsl:call-template>
- <xsl:text></encryptedValue></credential></xsl:text>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- <dcx:genCredentialTemplate/>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ================================================================================
- encode_lists
-
- Encodes the signons list into a blob so that the set_signons.xts morphlet can
- use it.
- ================================================================================
- -->
- <xts:block id="encode_lists" processor="XSLT" mode="interpret" type="exec" dependency="get_content">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl pf xtsext">
- <xsl:output method="xml" encoding="UTF-8" version="1.0" indent="no"/>
- <pf:serialize-xml/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='m_connection_data']"/>
- <xts:append select="/root/env">
- <xsl:variable name="markup">
- <xsl:apply-templates select="/root/connection" mode="markup"/>
- </xsl:variable>
- <param name="m_connection_data">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup), true()))"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- catch_changes
-
- Detects if the connection string has changed.
- ================================================================================
- -->
- <xts:block id="catch_changes" type="exec" mode="interpret" processor="XSLT" dependency="get_content create_credentials">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <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:delete select="/root/env/param[@name='changed_m_p_connectionString']"/>
- <xts:append select="/root/env">
- <param name="changed_m_p_connectionString">
- <xsl:variable name="orig-value">
- <xsl:value-of select="/root/connection/cm:queryResponse/cm:dataSourceConnection/cm:connectionString"/>
- </xsl:variable>
- <xsl:variable name="current-value">
- <xsl:value-of select="/root/env/param[@name='m_p_connectionString']"/>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="($orig-value != $current-value) and /root/env/param[@name='m_p_connectionString']">1</xsl:when>
- <xsl:otherwise>0</xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- delete_signons
-
- Deletes the existing signons if the user switched from "Signons" to any other
- type of authentication.
- ================================================================================
- -->
- <xts:block id="delete_signons" type="exec" mode="interpret" processor="XSLT" dependency="catch_changes" mandatory="false" condition=".[/root/env/param[@name='changed_m_p_connectionString']='1']">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
- <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>
- <xsl:variable name="connectionString" select="key('env-param','m_p_connectionString')"/>
- <xsl:variable name="isDatasourceSignon">
- <xsl:call-template name="dcx-isDatasourceSignon">
- <xsl:with-param name="connectionString" select="$connectionString"/>
- </xsl:call-template>
- </xsl:variable>
- <!-- delete all the existing signons if the type is NOT datasourceSignon -->
- <xsl:if test="$isDatasourceSignon='false'">
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:delete xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:objects>
- <cm:dataSourceSignon>
- <cm:searchPath><xsl:value-of select="key('env-param','m_obj')"/>/dataSourceSignon</cm:searchPath>
- </cm:dataSourceSignon>
- </cm:objects>
- <cm:options recursive="true" force="true"/>
- </cm:delete>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- <dcx:isDatasourceSignon/>
- </xsl:stylesheet>
- </xts:block>
- ===============================================================================================
- load metadata
- ===============================================================================================
- -->
- <xts:block id="load_metadata" type="exec" mode="interpret" processor="XML" nodelist="">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <config>
- <xts:function name="getConfiguration">
- <xts:param name="dataAccess"/>
- <xts:param name="edition"/>
- </xts:function>
- </config>
- </xts:append>
- <!-- get a list of installed components -->
- <xts:append>
- <installedComponents>
- <xts:function name="getConfiguration">
- <xts:param name="installedComponents"/>
- </xts:function>
- </installedComponents>
- </xts:append>
- <xts:append>
- <xts:transform src="/transforms/portal/dataSource/filterHiddenDatasources.xslt" processor="XSLT">
- <root>
- <xts:queryNode select="/root/env"/>
- <xts:queryNode select="/root/system"/>
- <config>
- <param name="dataAccess"><xts:queryValue select="/root/config/configuration/property[@name='dataAccess']"/></param>
- <param name="edition"><xts:queryValue select="/root/config/configuration/property[@name='edition']"/></param>
- </config>
- <xts:queryNode select="/root/installedComponents"/>
- <exempted>
- <value>
- <xts:queryNode select="/root/env/param[@name='m_connection_type']"/>
- </value>
- </exempted>
- <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>
- <!--
- ================================================================================
- render_page
-
- Render the HTML page.
- ================================================================================
- -->
- <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="process_command_blocks parse_connect_string encode_lists catch_changes getTabs delete_signons">
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- get the presentation theme -->
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
- <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"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
- <!-- 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:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- 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:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
- 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:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
- xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
- xmlns:x="x"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl cm cf cp pf df dp dc dt lyt utml x xtsext">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'properties_connection.xts'"/>
- <!-- add any theme variables -->
- <pf:variables/>
- <xsl:variable name="back-url" select="key('env-param','backURL')"/>
- <xsl:variable name="object" select="/root/connection/cm:queryResponse/cm:dataSourceConnection"/>
- <xsl:variable name="connectionType" select="/root/env/param[@name='m_connection_type']"/>
-
- <dcx:commandTemplate/>
-
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="supportsIso">
- <xsl:value-of select="datasources/datasource[value=$connectionType]/supportsIsolationLevels"/>
- </xsl:variable>
- <xsl:variable name="known-type" select="datasources/datasource[value=$connectionType] and $connectionType != 'other'"/>
- <!-- get passed in parameters -->
- <xsl:variable name="canWrite" select="contains($object/cm:permissions,'write')"/>
- <xsl:variable name="canSetPolicy" select="contains($object/cm:permissions,'setPolicy')"/>
- <xsl:variable name="showOKCancel" select="$canWrite or $canSetPolicy"/>
-
- <xsl:variable name="browserTitle">
- <xts:string id="IDS_PROPERTIES_TITLE">
- <xts:param name="objectName"><span lang="{$contentLocale}"><xsl:value-of select="/root/env/param[@name='m_name']"/></span></xts:param>
- </xts:string>
- </xsl:variable>
- <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_DATA_SOURCES"/>
- <xsl:if test="$canWrite">
- <script language="javascript">
- function init()
- {
- var f = document.pform;
- f.m_p_isolationLevel.disabled = !f.m_p_iso_pref[1].checked;
- f.m_connection_tab.value='odbc';
- }
- var MSG_CONF_CHANGE = "<xts:string id="IDS_WARN_0005_CHANGE_CONNECTION_TYPE" encode="javascript"/>";
- var originalType = "<xsl:value-of select="xtsext:javascriptencode(string($connectionType))"/>";
- <![CDATA[
- function changeType()
- {
- var f = document.pform;
-
- // Perform the delete after confirmation
- if (confirm(MSG_CONF_CHANGE))
- {
- // delete the connection string
- f.m_p_connectionString.value='';
- f.submit();
- }
- else
- {
- resetType();
- }
- }
- function resetType()
- {
- var ctrl = document.pform.m_connection_type;
- for (i = 0; i < ctrl.options.length; i++)
- {
- if (ctrl.options[i].value == originalType)
- {
- ctrl.options[i].selected = true;
- break;
- }
- }
- }
- function disableIso(disable)
- {
- var frm = document.pform;
- if (frm) {
- var lstIsoLevel = frm.m_p_isolationLevel;
- if (lstIsoLevel) {
- lstIsoLevel.disabled = disable;
- }
- }
- }
- ]]>
- function checkMandatoryConnectString(obj, label)
- {
- obj.value = trim(obj.value);
- if (obj.value == '')
- {
- <xsl:variable name="errmsg">
- <xts:string id="IDS_ERR_MANDATORY_CONNECTION_STRING" encode="javascript"><xts:param name="field">" + label + "</xts:param></xts:string>
- </xsl:variable>
- window.alert("<xsl:value-of select="normalize-space($errmsg)"/>");
- obj.focus();
- return false;
- }
- return true;
- }
- function validate()
- {
- var f = document.pform;
- if (f.m_p_connectionString)
- {
- return checkMandatoryConnectString(f.m_p_connectionString, "<xts:string id="IDS_PROP_CONN_CONNECT" encode="javascript"/>");
- }
- return true;
- }
- </script>
- <dc:confirm-cancel/>
- </xsl:if>
- <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
- <script language="javascript">
- function validateBeforeTest()
- {
- var f = document.pform;
- if (f.m_p_connectionString)
- {
- return checkMandatoryConnectString(f.m_p_connectionString, "<xts:string id="IDS_PROP_CONN_CONNECT" encode="javascript"/>");
- }
-
- return true;
- }
- function doTest()
- {
- if(!validateBeforeTest())
- {
- return;
- }
- else
- {
- f=document.pform;
- f.ps_nav_op.value = 'push';
- f.m.value = '<xsl:value-of select="concat($app,'/test_connection.xts')"/>';
- f.submit();
- }
- }
- function doAuthentication()
- {
- var f = document.pform;
- if (f.m_p_connectionString) {
- var authString = f.action;
- var cs = f.m_p_connectionString.value;
- var authType = getField(cs,';AUTHENTICATION_TYPE=');
- if(authType == 'OAuth1.0'){
- authString += '/oauth1?';
- authString += 'temporary_token_endpoint=' + getField(cs,';TEMPORARY_TOKEN_ENDPOINT=');
- authString += '&authorization_endpoint=' + getField(cs,';AUTHORIZATION_ENDPOINT=');
- authString += '&token_endpoint=' + getField(cs,';TOKEN_ENDPOINT=');
- authString += '&reponse_type=code';
- authString += '&state=' + f.m_name.value;
- } else {
- authString += '/oauth2?';
- authString += 'authorization_endpoint=' + getField(cs,';AUTHORIZATION_ENDPOINT=');
- authString += '&token_endpoint=' + getField(cs,';TOKEN_ENDPOINT=');
- var scope = getField(cs,';SCOPE=');
- if (scope)
- {
- authString += '&scope=' + scope;
- }
- authString += '&state=' + f.m_name.value;
- }
- window.open(authString);
- }
- }
- function getField(string, param)
- {
- start = string.indexOf(param);
- if (start != -1)
- {
- end = string.indexOf(";", start + param.length);
- if (end == -1)
- {
- return(string.substring(start + param.length));
- }
-
- return(string.substring(start + param.length, end));
- }
- return '';
- }
-
- </script>
- </dp:script>
- <utml:form name="pform" method="post" action="{$gateway}">
- <utml:read-only>
- <xsl:choose>
- <xsl:when test="$canWrite">false</xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </utml:read-only>
- <!--
- this defines the form command operation to be performed when all the collected properties are submitted.
- -->
- <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
- <utml:input type="hidden" name="changed_m_p_isolationLevel" value="0"/>
- <utml:input type="hidden" name="m_p_credentialNamespaces" utml:value="key('env-param','m_p_credentialNamespaces')"/>
- <utml:input type="hidden" name="m_connection_tab" utml:value="odbc"/>
- <utml:input type="hidden" name="m_dscap" value="" update="true"/>
- <!--
- Get the flag to tell if a connection string is a dual which is needed to render the initial status of "Trusted context" checkbox in ODBC tab.
- [Work Item 59728] Disable/hide 'Trusted context' feature when configuring a dual stack (classic and jdbc) for DB2 data source connections
- -->
- <utml:input type="hidden" name="m_connection_enable_JDBC">
- <utml:value>
- <xsl:choose>
- <xsl:when test="contains($object/cm:connectionString,'IBM_JD_CNX_STR:')">
- <xsl:value-of select="'true'"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'false'"/>
- </xsl:otherwise>
- </xsl:choose>
- </utml:value>
- </utml:input>
-
- <!-- dialog header -->
- <dp:header useBackURL="not($showOKCancel)">
- <!-- header titles-->
- <dp:title><xsl:copy-of select="$browserTitle"/></dp:title>
- </dp:header>
- <!-- property tabs -->
- <df:propertiesTabs select="connection">
- <df:hasSetPolicy><xsl:value-of select="$canSetPolicy"/></df:hasSetPolicy>
- </df:propertiesTabs>
- <!-- description tabs -->
- <dp:description>
- <xts:string id="IDS_PROP_CONN_INTRO"/>
- </dp:description>
- <lyt:layout style="1">
- <lyt:section>
- <dp:list>
- <dp:section>
- <dp:label for="ctrl_m_connection_type"><xts:string id="IDS_PROP_CONN_TYPE"/></dp:label>
- </dp:section>
- <dp:section>
- <dp:box>
- <dp:boxSection hgap="20">
- <utml:select size="1" name="m_connection_type" onchange="changeType();" id="ctrl_m_connection_type">
- <xsl:for-each select="datasources/datasource">
- <utml:option>
- <utml:value><xsl:value-of select="value"/></utml:value>
- <xsl:value-of select="name"/>
- </utml:option>
- </xsl:for-each>
- </utml:select>
- </dp:boxSection>
- <dp:boxSection>
- <a href="javascript:doTest();">
- <xsl:text><xts:string id="IDS_PROP_CONN_TEST_CONNECTION"/></xsl:text>
- </a>
- </dp:boxSection>
- </dp:box>
- </dp:section>
- </dp:list>
- <img height="5" width="1" src="{$webcontent}/images/space.gif"/>
- <dp:list>
- <dp:section>
- <dp:label for="isolationLevel_ID" id="isolationLevel_ID">
- <xts:string id="IDS_PROP_CONN_ISOLATION"/>
- </dp:label>
- </dp:section>
- </dp:list>
- <utml:radio-group name="m_p_iso_pref">
- <utml:default-value>
- <xsl:choose>
- <xsl:when test="string-length($object/cm:isolationLevel) = 0">default</xsl:when>
- <xsl:otherwise>specify</xsl:otherwise>
- </xsl:choose>
- </utml:default-value>
- <dp:choice aria-labelledby="isolationLevel_ID">
- <dp:section1>
- <utml:input type="radio" value="default" onclick="window.disableIso(true);" id="useDefaultGateway_ID">
- <xsl:if test="$supportsIso = 'false'">
- <xsl:attribute name="disabled">disabled</xsl:attribute>
- </xsl:if>
- </utml:input>
- </dp:section1>
- <dp:section2 for="useDefaultGateway_ID">
- <xts:string id="IDS_PROP_CONN_GATEWAYDEFAULT"/>
- </dp:section2>
- <dp:section1>
- <utml:input type="radio" value="specify" onclick="window.disableIso(false);" id="specifyValue_ID">
- <xsl:if test="$supportsIso = 'false'">
- <xsl:attribute name="disabled">disabled</xsl:attribute>
- </xsl:if>
- </utml:input>
- </dp:section1>
- <dp:section2 for="specifyValue_ID">
- <xts:string id="IDS_PROP_CONN_SPECIFYVALUE"/>
- </dp:section2>
- <dp:section3>
- <utml:select size="1" name="m_p_isolationLevel" onchange="document.pform.changed_m_p_isolationLevel.value='1';" id="isolationLevel_ID">
- <utml:default-value>
- <xsl:value-of select="$object/cm:isolationLevel"/>
- </utml:default-value>
- <xsl:if test="string-length($object/cm:isolationLevel) = 0">
- <xsl:attribute name="disabled"><xsl:value-of select="'true'"/></xsl:attribute>
- </xsl:if>
- <utml:option value="cursorStability"><xts:string id="IDS_PROP_CONN_CURSOR"/></utml:option>
- <utml:option value="phantomProtection"><xts:string id="IDS_PROP_CONN_PHANTOM"/></utml:option>
- <utml:option value="readCommitted"><xts:string id="IDS_PROP_CONN_COMMITTED"/></utml:option>
- <utml:option value="readUncommitted"><xts:string id="IDS_PROP_CONN_UNCOMMITTED"/></utml:option>
- <utml:option value="reproducibleRead"><xts:string id="IDS_PROP_CONN_REPRODUCIBLE"/></utml:option>
- <utml:option value="serializable"><xts:string id="IDS_PROP_CONN_SERIALIZABLE"/></utml:option>
- </utml:select>
- </dp:section3>
- </dp:choice>
- </utml:radio-group>
- </lyt:section>
- <lyt:section>
- <dp:list>
- <dp:section>
- <dp:textarea>
- <dp:section1>
- <span id="lbl_connectionString"><xts:string id="IDS_PROP_CONN_CONNECT"/></span>
- </dp:section1>
- <dp:section2>
- <utml:input type="text" name="m_p_connectionString" size="53" utml:track="true" aria-labelledby="lbl_connectionString">
- <xsl:if test="$known-type">
- <xsl:attribute name="readonly">readonly</xsl:attribute>
- </xsl:if>
- <utml:value>
- <xsl:value-of select="$object/cm:connectionString"/>
- </utml:value>
- </utml:input>
- <xsl:if test="$known-type and $canWrite">
- <xsl:text>  </xsl:text>
- <utml:a utml:op="stack-up">
- <utml:target>
- <xsl:value-of select="concat($app,'/specify_connection.xts')"/>
- </utml:target>
- <img border="0" height="16" width="10">
- <xsl:attribute name="src"><xsl:value-of select="concat($image_root,'action_edit_10.gif')"/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_PROP_CONN_EDIT_ALT"/></xsl:attribute>
- </img>
- </utml:a>
- </xsl:if>
- </dp:section2>
- </dp:textarea>
- </dp:section>
- <xsl:if test="$connectionType != 'other' and $connectionType != 'xml'">
- <dp:section>
- <dp:text>
- <xts:string id="IDS_SELECT_CONNECT_AUTHENTICATION"/>
- <xsl:variable name="connectionString">
- <xsl:choose>
- <xsl:when test="key('env-param','m_p_connectionString')!=''">
- <xsl:value-of select="key('env-param','m_p_connectionString')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/connection/*[local-name()='queryResponse']/*[local-name()='dataSourceConnection']/*[local-name()='connectionString']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="key('env-param','m_p_credentialNamespaces') != ''">
- <xts:string id="IDS_SELECT_CONNECT_EXTERNAL_NAMESPACE">
- <xts:param name="namespaceName"><xsl:value-of select="/root/*[local-name()='namespaces']/*[local-name()='queryResponse']/*[local-name()='namespace' and ./*[local-name()='searchPath']=key('env-param','m_p_credentialNamespaces')]/*[local-name()='defaultName']"/></xts:param>
- </xts:string>
- </xsl:when>
- <xsl:when test="contains($connectionString,'Trusted_Connection=yes') or contains($connectionString,'Integrated Security=SSPI')">
- <xts:string id="IDS_SELECT_CONNECT_WINDOWS_AUTHENTICATION"/>
- </xsl:when>
- <xsl:when test="contains($connectionString, '^User ID:')">
- <xts:string id="IDS_SELECT_CONNECT_SIGNON_PROPERTY_DIALOG"/>
- </xsl:when>
- <xsl:when test="contains($connectionString, 'AUTHENTICATION_TYPE=None')">
- <xts:string id="IDS_SELECT_CONNECT_NONE"/>
- </xsl:when>
- <xsl:when test="contains($connectionString, 'AUTHENTICATION_TYPE=APIKey')">
- <xts:string id="IDS_SELECT_CONNECT_API_KEY"/>
- </xsl:when>
- <xsl:when test="contains($connectionString, 'AUTHENTICATION_TYPE=Basic')">
- <xts:string id="IDS_SELECT_CONNECT_BASIC"/>
- </xsl:when>
- <xsl:when test="contains($connectionString, 'AUTHENTICATION_TYPE=OAuth1.0')">
- <xts:string id="IDS_SELECT_CONNECT_OAUTH1"/>
- <xsl:text> </xsl:text>
- <a href="javascript:doAuthentication();">
- <xsl:text><xts:string id="IDS_PROP_CONN_AUTHENTICATE"/></xsl:text>
- </a>
- </xsl:when>
- <xsl:when test="contains($connectionString, 'AUTHENTICATION_TYPE=OAuth2.0')">
- <xts:string id="IDS_SELECT_CONNECT_OAUTH2"/>
- <xsl:text> </xsl:text>
- <a href="javascript:doAuthentication();">
- <xsl:text><xts:string id="IDS_PROP_CONN_AUTHENTICATE"/></xsl:text>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="$connectionType = 'powercube'">
- <xts:string id="IDS_SELECT_CONNECT_POWERCUBE_NO_AUTHENTICATION"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_SELECT_CONNECT_NO_AUTHENTICATION"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </dp:text>
- </dp:section>
- </xsl:if>
- <xsl:if test="$connectionType = 'sfdc'">
- <dp:section>
- <dp:text>
- <xts:string id="IDS_SELECT_CONNECT_PROXY_HOST"/>
- <xsl:variable name="connectionString">
- <xsl:choose>
- <xsl:when test="key('env-param','m_p_connectionString')!=''">
- <xsl:value-of select="key('env-param','m_p_connectionString')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/connection/*[local-name()='queryResponse']/*[local-name()='dataSourceConnection']/*[local-name()='connectionString']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="contains($connectionString,'PROXY_ENABLED=true')">
- <xts:string id="IDS_SELECT_CONNECT_PROXY_HOST_SET"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_SELECT_CONNECT_NO_PROXY_HOST_SET"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:text>
- </dp:section>
- </xsl:if>
- <xsl:if test="datasources/datasource[value=$connectionType]/supportsCommandBlocks = 'true'">
- <dp:section>
- <cf:dynamicExpandingSection name="b_commands" indent="false" initialize="true" visible="false" title="IDS_PROP_CONN_COMMAND_SECTION">
- <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="$canWrite"/>
- <xsl:with-param name="dataSourceConnection" select="true()"/>
- <xsl:with-param name="inWizard" select="false()"/>
- </xsl:call-template>
- </cf:dynamicExpandingSection>
- </dp:section>
- </xsl:if>
- </dp:list>
- </lyt:section>
- </lyt:layout>
-
-
-
- <dp:footer>
- <xsl:choose>
- <xsl:when test="$showOKCancel">
- <df:button df:id="IDS_OK" utml:validate="true" df:style="submit"/>
- <xsl:choose>
- <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
- <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <df:button df:id="IDS_CLOSE" df:style="back-url"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:footer>
- </utml:form>
- </dp:page>
- </xsl:template>
- <xsl:template match="*[local-name()='messageString']">
- <xsl:value-of select="xtsext:javascriptencode(string(.))"/><xsl:if test="string-length(normalize-space(.)) > 0">\n</xsl:if>
- </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"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|