123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2014
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" resolverBase="cogadmin" messageBase="messages/cogadminuimsgs.xml" requiredCapability="canUseMyDataSetsAdministration">
- <xts:block id="frag_init" nodelist="env, credential" type="exec" mode="interpret" processor="XSLT" path="cogadmin/logicsheets/fragment_init.xslt" condition=".[not(/root/env/param[@name='frag-directive']='meta-only')]" mandatory="true"/>
- <!--
- Get the datasets
- -->
- <xts:block id="getContent" dependency="frag_init" nodelist="env, header, session, system, http, configProps" type="exec" mode="interpret" processor="XSLT">
- <xts:logicsheet path="logicsheets/tenantlogic.xsl"/>
- <xts:logicsheet path="cogadmin/logicsheets/admin.xslt"/>
- <xts:logicsheet path="cogadmin/logicsheets/presentation/filters.xslt"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:flt="http://developer.cognos.com/schemas/uic/presentation/filters/"
- xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- exclude-result-prefixes="xsl xts SOAP-ENV bus admui xtsext flt send">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- common variables -->
- <admui:variables/>
- <!-- common pager variables -->
- <admui:pagerVariables pagerName="datasets"/>
- <!--
- build a searchPath to find the datasets
- -->
- <xsl:variable name="datasetsPath">
- <!-- add the scope filter -->
- <xsl:if test="key('env-param', 'dataset_filter_scope') != ''">
- <xsl:value-of select="key('env-param', 'dataset_filter_scope')"/>
- </xsl:if>
- <xsl:text>//dataSet[permission('read')]</xsl:text>
-
- <!-- add the refreshed filter -->
- <xsl:if test="key('env-param', 'dataset_filter_age') != ''">
- <xsl:text>[@dataModificationTime < '</xsl:text>
- <xsl:value-of select="xtsext:getDateTimeOffset( xtsext:getCurrentDateTime(string('GMT')), -1 * number(key('env-param', 'dataset_filter_age')), string('hour'))"/>
- <xsl:text>']</xsl:text>
- </xsl:if>
- <!-- add the owned by filter -->
- <xsl:if test="key('env-param', 'dataset_filter_owned_by') != ''">
- <xsl:text>[containsReferences(@owner, </xsl:text>
- <xsl:value-of select="key('env-param', 'dataset_filter_owned_by')"/>
- <xsl:text>)]</xsl:text>
- </xsl:if>
-
- <!-- add the tenantid filter -->
- <xsl:if test="key('env-param', 'dataset_filter_tenantid') != ''">
- <xsl:text>[@tenantID='</xsl:text>
- <xsl:value-of select="key('env-param', 'dataset_filter_tenantid')"/>
- <xsl:text>']</xsl:text>
- </xsl:if>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <xts:transform src="/cogadmin/transforms/datasets/decodeSpecification.xslt" processor="XSLT">
- <response>
- <xts:request href="bus://dispatcher" protocol="NAV" responseEnvelope="false" outputHeader="false">
- <SOAP-ENV:Envelope xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <xsl:copy-of select="/root/header/bus:biBusHeader"/>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <nav:search>
- <!-- nav options -->
- <nav:validateTag fault="true"/>
- <nav:scope><xsl:value-of select="$datasetsPath"/></nav:scope>
- <nav:property name="fullPath"/>
- <nav:property name="owner"/>
- <nav:property name="icons"/>
- <nav:property name="searchPath"/>
- <nav:property name="internalId"/>
- <nav:property name="times"/>
- <nav:property name="position"/>
- <nav:property name="defaultName"/>
- <nav:property name="dataModificationTime"/>
- <nav:property name="dataSetSize"/>
- <nav:property name="lastModifiedDate"/>
- <nav:property name="internalId"/>
- <nav:property name="searchPathForURL"/>
- <nav:property name="priority"/>
- <nav:property name="permissions"/>
- <nav:property name="screenTip"/>
- <nav:property name="tenantID"/>
- <nav:property name="hidden"/>
- <nav:property name="shown"/>
- <nav:property name="specification"/>
-
- <!-- nav properties -->
- <nav:recursive>false</nav:recursive>
- <nav:param name="backUrl">false</nav:param>
- <nav:param name="urlFlags">h1cu</nav:param>
- <nav:param name="mode">admin</nav:param>
- <nav:maxObjects><xsl:value-of select="$maxObjects"/></nav:maxObjects>
- <nav:skipObjects><xsl:value-of select="$skipObjects"/></nav:skipObjects>
- <nav:sort>
- <xsl:attribute name="order">
- <xsl:choose>
- <xsl:when test="key('env-param', 'sort_order')='ascending'">ascending</xsl:when>
- <xsl:otherwise>descending</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:choose>
- <xsl:when test="key('env-param', 'sort_column') != ''">
- <xsl:value-of select="key('env-param', 'sort_column')"/>
- </xsl:when>
- <xsl:otherwise>dataModificationTime</xsl:otherwise>
- </xsl:choose>
- </nav:sort>
-
- <!-- common nav params -->
- <admui:commonNavParams/>
- </nav:search>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </response>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!-- Merge the tenantNames into the response -->
- <xts:block processor="XSLT" type="exec" mandatory="false"
- path="/portal/tenancy/mergeTenantNames.xslt"
- id="mergeTenantNames"
- dependency="getContent"
- condition=".[/root/session/param[@name='e_showTenantInfo']='true']">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!--
- Get the owned by information
- -->
- <xts:block id="getOwnedBy" dependency="frag_init mergeTenantNames" nodelist="header, response" type="exec" mode="interpret" processor="XSLT" condition=".[/root/response/*[local-name()='searchResponse']/*[local-name()='content']/*[local-name()='item']/*[local-name()='owner']/*[local-name()='internalId' and . != '']]" mandatory="false">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- exclude-result-prefixes="xsl xts SOAP-ENV bus nav">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <ownedBy>
- <send:request provider="cm">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <requests xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:queryRequest[]">
- <xsl:for-each select="/root/response/nav:searchResponse/nav:content/nav:item">
- <!-- most users won't have access to the credential, so we need parse the user's searchPath from the credential searchPath -->
- <item xsi:type="cm:queryRequest">
- <search xsi:type="xsd:string"><xsl:value-of select="nav:owner/nav:searchPath"/></search>
- <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
- <item xsi:type="cm:propEnum">storeID</item>
- <item xsi:type="cm:propEnum">defaultName</item>
- <item xsi:type="cm:propEnum">userName</item>
- <item xsi:type="cm:propEnum">searchPath</item>
- <item xsi:type="cm:propEnum">shown</item>
- </properties>
- </item>
- </xsl:for-each>
- </requests>
- </cm:query>
- </send:request>
- </ownedBy>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="getMeta" type="exec" mode="interpret" nodelist="env" processor="XSLT">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- exclude-result-prefixes="xsl xts xos 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 select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <fragment>
- <info>
- <title>
- <xts:string id="IDS_DST_TITLE"/>
- </title>
- </info>
- <preferredTitle>
- <xts:string id="IDS_DST_TITLE"/>
- </preferredTitle>
- <meta>
- <transientProperties name="timestamp">
- <validate>
- <name>timestamp</name>
- <ruleRef id="fragment-cogadmin:timestamp"/>
- </validate>
- </transientProperties>
- <transientProperties name="dataset_filter_age">
- <validate>
- <name>dataset_filter_age</name>
- <ruleRef id="fragment-cogadmin:filter_age"/>
- </validate>
- </transientProperties>
- <transientProperties name="dataset_filter_scope">
- <validate>
- <name>dataset_filter_scope</name>
- <ruleRef id="fragment-cogadmin:filter_scope"/>
- </validate>
- </transientProperties>
- <transientProperties name="dataset_filter_tenantid">
- <validate>
- <name>dataset_filter_tenantid</name>
- <ruleRef id="fragment-cogadmin:filter_tenantid"/>
- </validate>
- </transientProperties>
- <transientProperties name="dataset_filter_owned_by">
- <validate>
- <name>dataset_filter_owned_by</name>
- <ruleRef id="fragment-cogadmin:user"/>
- </validate>
- </transientProperties>
- <globalValidator>
- <parameter>
- <name>sort_order</name>
- <ruleRef id="fragment-cogadmin:sort_order"/>
- </parameter>
- </globalValidator>
- <requiredCapabilities>canUseMyDataSetsAdministration</requiredCapabilities>
- </meta>
- <state>
- <xsl:variable name="state">
- </xsl:variable>
- <xsl:value-of select="xtsext:base64encode($state,true())"/>
- </state>
- </fragment>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- render the HTML
- -->
- <xts:block id="renderMarkup" dependency="frag_init getMeta mergeTenantNames getOwnedBy" nodelist="cogadminChartUrl, env, user, system" type="exec" mode="interpret" processor="XSLT">
- <xts:logicsheet path="cogadmin/logicsheets/admin.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:nemo="http://developer.cognos.com/nemo"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:val="http://developer.cognos.com/schemas/validator/1/"
- xmlns:fragment="urn:cognos:fragments:validator"
- xmlns:fragment-cogadmin="urn:cognos:fragments:validator:cogadmin"
- xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
- exclude-result-prefixes="xsl nemo xts SOAP-ENV xos bus admui">
-
- <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 select="/root/output/*[local-name()='part']/*[local-name()='entityBody']/fragment">
- <markup>
- <mimeType>text/html</mimeType>
- <markupXml>
- <xts:transform src="/cogadmin/transforms/presentation/renderFragment.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
- <root>
- <!-- Generate UI markup using the response and metadata -->
- <xts:transform src="/cogadmin/transforms/gen-ui-markup/datasets.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/common.xslt</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/pager.xslt</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
- <root>
- <xts:queryNode select="/root/*[local-name()='queryResponse'] | /root/response/* | /root/ownedBy | /root/mostRecentEvent | /root/user | /root/metadata | /root/system | /root/session | /root/env"/>
- </root>
- </xts:transform>
- <xts:queryNode select="/root/system | /root/session | /root/env | /root/user"/>
- </root>
- </xts:transform>
- </markupXml>
- </markup>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|