123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2012, 2013
- 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">
- <xts:block mandatory="false" processor="XSLT" type="exec" id="getContent" condition=".[/root/env/param[@name='action']='SetCubeProperties']">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- 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:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:resourceId="xalan://com.cognos.admin.xts.ResourceId">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <xsl:template match="/">
- <xsl:variable name="qsResId" select="resourceId:getResourceId(/root/env/param[@name='actionResourceID'],'queryService')"/>
- <xsl:variable name="id" select="resourceId:getId($qsResId)"/>
- <xsl:variable name="searchPath">
- <xsl:text>storeID('</xsl:text><xsl:value-of select="$id"/><xsl:text>')</xsl:text>
- </xsl:variable>
- <xts:sequence>
- <xts:append select="/root">
- <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:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="$searchPath"/>
- </cm:search>
- <cm:properties>
- <cm:property name="storeID"/>
- <cm:property name="defaultName"/>
- <cm:property name="permissions"/>
- <cm:property name="qsROLAPCubeConfigurations"/>
- </cm:properties>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- getDetails - get details (e.g. localed rolap cube name and icon) information from DataSource object
- ===============================================================================================
- -->
- <xts:block id="getDetails" processor="XSLT" type="exec" mode="interpret" dependency="getContent" mandatory="false">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- 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:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- exclude-result-prefixes="xts xsl send cml cm pf">
- <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='has_write_permission']"/>
- <xts:append select="/root/env">
- <param name="has_write_permission">
- <xsl:choose>
- <xsl:when test="contains(concat(' ', /root/cm:queryResponse/*/cm:permissions, ' '), ' write ')">
- <xsl:value-of select="'true'"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'false'"/>
- </xsl:otherwise>
- </xsl:choose>
- </param>
- </xts:append>
- </xts:sequence>
- <xts:sequence>
- <xsl:variable name="qsROLAPCubeConfigurations" select="/root/cm:queryResponse/*/cm:qsROLAPCubeConfigurations"/>
- <xsl:if test="$qsROLAPCubeConfigurations != ''">
- <xts:append>
- <wholeEntries>
- <xsl:for-each select="$qsROLAPCubeConfigurations/*">
- <xsl:variable name="cubeConfigType">
- <xsl:choose>
- <xsl:when test="local-name()='value'">
- <!--Cube was derived from FMD quick publish. qsROLAPCubeConfigurations array "item" is actually "value" and is not
- consumed traditionally via post-process.xslt. Handle this by deriving the configType from value/@type-->
- <xsl:value-of select="substring-after(@*[local-name()='type'],':')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="local-name()"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:element name="{$cubeConfigType}" namespace="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:copy-of select="*"/>
- <xts:transform src="transforms/portal/rolapCubeConfigurations/buildFormatedEntries.xslt" processor="XSLT">
- <rolapDataSourceDetails>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm" testBlock="test">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query>
- <cm:requests>
- <cm:query>
- <cm:search>CAMID(":")/rolapDataSource[@name='<xsl:value-of select="cm:dataSourceName"/>']|CAMID(":")/rolapVirtualDataSource[@name='<xsl:value-of select="cm:dataSourceName"/>']</cm:search>
- <cm:properties>
- <cm:property name="defaultName"/>
- <cm:property name="hidden"/>
- </cm:properties>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </rolapDataSourceDetails>
- </xts:transform>
- </xsl:element>
- </xsl:for-each>
- </wholeEntries>
- </xts:append>
- </xsl:if>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
-
- <!--
- ===============================================================================================
- getDetails - get details (e.g. localed rolap cube name and icon) information from DataSource object
- ===============================================================================================
- -->
- <xts:block id="tbd" processor="XSLT" type="exec" mode="interpret" dependency="getDetails" mandatory="false">
- <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:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- exclude-result-prefixes="xts xsl pf xtsext cm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/env">
- <xts:transform src="portal/controls/create_web64_param.xslt" processor="XSLT">
- <param name="whole_entries">
- <passport><xsl:value-of select="$passport"/></passport>
- <markup>
- <xts:transform name="XMLEncode">
- <xts:queryNode select="/root/wholeEntries"/>
- </xts:transform>
- </markup>
- </param>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
-
-
- <xts:block id="buildFragment" type="exec" dependency="tbd" nodelist="header, env,messages,user,response" processor="XSLT" condition=".[not(/root/env/param[@name='ps_nav_op']='pop')]">
-
- <xts:logicsheet path="/cogadmin/logicsheets/presentation/common.xslt"/>
- <xts:logicsheet path="/cogadmin/logicsheets/admin.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:ui="http://developer.cognos.com/schemas/ui/presentation/markup/"
- xmlns:uic="http://developer.cognos.com/schemas/uic/presentation/markup/"
- xmlns:adm-prop="http://developer.cognos.com/admin/properties"
- xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"
- xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:resourceId="xalan://com.cognos.admin.xts.ResourceId"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- exclude-result-prefixes="xsl xts xos uic adm-prop wsrf-rp admui xtsext dp resourceId">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <admui:variables/>
-
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <fragment>
- <uic:fragment>
- <script>
- <!-- display the popup -->
- function buildUrl(current, name, value) {
- return current + '&'+name+'='+encodeURIComponent(value);
- }
- <xsl:variable name="storeID" select="/root//*[local-name()='queryResponse']//*[local-name()='storeID']"/>
- var url = '<xsl:value-of select="concat(/root/configProps/param[@name = 'cps']/property[@name ='gateway']/., '?b_action=xts.run')"/>';
- <xsl:variable name="dsResourceId" select="/root/env/param[@name='actionResourceID']"/>
- <xsl:variable name="cubeResourceId">
- <xsl:variable name="rolapCubeResId" select="resourceId:getResourceId($dsResourceId,'rolapCube')"/>
- <xsl:choose>
- <xsl:when test="$rolapCubeResId != ''">
- <xsl:value-of select="$rolapCubeResId"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="resourceId:getResourceId($dsResourceId,'rolapVirtualCube')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="cubeName" select="resourceId:getId($cubeResourceId)"/>
- var cubeName = '<xsl:value-of select="$cubeName"/>';
- url = buildUrl(url, 'm', 'portal/settings_rolapcube_configurations_edit.xts');
- url = buildUrl(url, 'selected_cube',cubeName);
- url = buildUrl(url, 'selected_localizedCube',cubeName);
- url = buildUrl(url, 'm_obj','storeID("<xsl:value-of select="$storeID"/>")');
- url = buildUrl(url, 'm_class','configurationFolder');
- url = buildUrl(url, 'backURL','javascript:parent._THIS_callBack();');
- url = buildUrl(url, 'whole_entries','<xsl:value-of select="/root/env/param[@name='whole_entries']"/>');
- url = buildUrl(url, 'has_write_permission', 'true');
- url = buildUrl(url, 'ps_nav_stack', 'cogadmin/controls/datastores/editCubeConfiguration.xts');
- url = buildUrl(url, 'ps_nav_source', 'cogadmin/controls/datastores/editCubeConfiguration.xts');
- url = buildUrl(url, 'actionResourceID', '<xsl:value-of select="/root/env/param[@name='actionResourceID']"/>');
- ui_modal_dialog.open(url,false,true,true);
- </script>
-
- </uic:fragment>
- </fragment>
- </xts:append>
- </xts:sequence>
- </xsl:template>ves
- </xsl:stylesheet>
-
- </xts:block>
-
- <xts:block id="executeConfigureCube" type="exec" dependency="tbd" nodelist="header, env,messages,user,response" processor="XSLT" condition=".[/root/env/param[@name='controller_state']='editEntry']">
-
- <xts:logicsheet path="/cogadmin/logicsheets/presentation/common.xslt"/>
- <xts:logicsheet path="/cogadmin/logicsheets/admin.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:ui="http://developer.cognos.com/schemas/ui/presentation/markup/"
- xmlns:uic="http://developer.cognos.com/schemas/uic/presentation/markup/"
- xmlns:adm-prop="http://developer.cognos.com/admin/properties"
- xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"
- xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:resourceId="xalan://com.cognos.admin.xts.ResourceId"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- exclude-result-prefixes="xsl xts xos uic adm-prop wsrf-rp admui xtsext dp resourceId">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <admui:variables/>
-
- <xsl:template match="/">
- <xts:sequence>
- <xts:request protocol="ExecuteResourceAction" responseEnvelope="true">
- <!-- xsl:copy-of select="/root/envelope/*[1]"/-->
- <SOAP-ENV:Envelope
- xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:nemo="http://developer.cognos.com/nemo"
- xmlns:muws-p2-xs="http://docs.oasis-open.org/wsdm/muws2-2.xsd"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <SOAP-ENV:Header>
- <xsl:copy-of select="/root/header/bus:biBusHeader"/>
- <nemo:cogadminHeader>
- <nemo:ResourceIdentifier><xsl:value-of select="/root/env/param[@name='actionResourceID']"/></nemo:ResourceIdentifier>
- </nemo:cogadminHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <ns1:ExecuteResourceAction xmlns:ns1="http://developer.cognos.com/admin/properties">
- <ns1:Name>SetCubeProperties</ns1:Name>
- <xsl:for-each select="/root/env/param">
- <ns1:Argument name="{@name}"><xsl:value-of select="text()"/></ns1:Argument>
- </xsl:for-each>
- </ns1:ExecuteResourceAction>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
-
- </xts:sequence>
- </xsl:template>ves
- </xsl:stylesheet>
-
- </xts:block>
- <xts:block id="renderMarkup" type="exec" processor="XML" nodelist="fragment" dependency="buildFragment"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/">
-
- <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>
- <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>
- <xts:queryNode select="/root/envelope/* | /root/fragment/* | /root/system | /root/session | /root/user"/>
- </root>
- </xts:transform>
- </markupXml>
- </markup>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xts:block>
-
- </xts:morphlet>
|