123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cpscrn
- (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).
- -->
- <!-- $Header: //cpscrn/main/templates/cps4/producer/wsrp-impl/PortletManagementServiceImpl.xts#1 $ -->
- <!-- $DateTime: 2008/10/22 11:12:04 $ -->
- <!-- $Change: 25109 $ -->
- <xts:morphlet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/">
- <xts:block id="execution" type="exec" mode="interpret" processor="XSLT" nodelist="envelope,session,system,configProps,implementation">
- <xts:logicsheet path="/cps4/producer/logicsheets/cps-portlet.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:wsrp="urn:oasis:names:tc:wsrp:v1:types"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:portlet="http://developer.cognos.com/schemas/cps/logic/portlet/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <portlet:soap-response>
- <xsl:choose>
- <xsl:when test="$portlet-op-name = 'getPortletDescription'">
- <xsl:choose>
- <xsl:when test="/root/implementation/portlet[@handle = $portlet-op/wsrp:portletContext/wsrp:portletHandle]">
- <xsl:variable name="desired-locales" select="$portlet-op/wsrp:desiredLocales"/>
- <xts:transform processor="XSLT" src="/cps4/producer/wsrp-impl/transforms/getServiceDescription.xslt">
- <root>
- <xts:queryNode select="/root/implementation/message[1] | /root/implementation/portlet[@handle = '{ $portlet-op/wsrp:portletContext/wsrp:portletHandle }']"/>
- <xsl:for-each select="$desired-locales">
- <locale>
- <xsl:value-of select="."/>
- </locale>
- </xsl:for-each>
- <xts:function name="getConfiguration">
- <xts:param name="productLocales">en</xts:param>
- <xts:param name="contentLocales">en</xts:param>
- </xts:function>
- </root>
- </xts:transform>
- </xsl:when>
- <xsl:otherwise>
- <xts:transform name="XML" cache="false">
- <xts:param name="messageBase"><xts:queryValue select="/root/interfaces/interfaceInfo/param[@name='location']"/>/messages/cpsproducermsgs.xml</xts:param>
- <xts:param name="systemId">no-cache-id</xts:param>
- <xts:param name="src">
- <SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <faultcode xmlns:wsrp="urn:oasis:names:tc:wsrp:v1:types">wsrp:InconsistentParameters</faultcode>
- <faultstring><xts:string id="IDS_PRO_WSF_NOTIMPLEMENTEDFAULT"/></faultstring>
- <detail>
- <wsrp:OperationFailed xmlns:wsrp="urn:oasis:names:tc:wsrp:v1:types"/>
- </detail>
- </SOAP-ENV:Fault>
- </xts:param>
- </xts:transform>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="$portlet-op-name = 'clonePortlet'">
- <portlet:response>
- <wsrp:portletHandle>
- <xsl:choose>
- <xsl:when test="contains( $portlet-op/wsrp:portletContext/wsrp:portletHandle, ':' )">
- <xsl:value-of select="substring-before( $portlet-op/wsrp:portletContext/wsrp:portletHandle, ':' )"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$portlet-op/wsrp:portletContext/wsrp:portletHandle"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="concat(':', xtsext:generateGUID())"/>
- </wsrp:portletHandle>
- <wsrp:portletState>
- <xsl:variable name="portlet-state">
- <xsl:for-each select="$portlet-state-params">
- <xsl:value-of select="concat('<param name="', @name, '">', xtsext:xmlencode(.), '</param>')"/>
- </xsl:for-each>
- </xsl:variable>
- <xsl:value-of select="xtsext:base64encode(string($portlet-state), true())"/>
- </wsrp:portletState>
- </portlet:response>
- </xsl:when>
- <xsl:when test="$portlet-op-name = 'destroyPortlets'">
- <portlet:response/>
- </xsl:when>
- <xsl:when test="$portlet-op-name = 'setPortletProperties'">
- <portlet:response>
- <wsrp:portletHandle>
- <xsl:value-of select="$portlet-op/wsrp:portletContext/wsrp:portletHandle"/>
- <!-- TODO: complete the implementation -->
- <!-- wsrp:portletState -->
- </wsrp:portletHandle>
- </portlet:response>
- </xsl:when>
- <xsl:when test="$portlet-op-name = 'getPortletProperties'">
- <!-- TODO: complete the implementation -->
- <portlet:response/>
- </xsl:when>
- <xsl:when test="$portlet-op-name = 'getPortletPropertyDescription'">
- <!-- TODO: complete the implementation -->
- <portlet:response/>
- </xsl:when>
- </xsl:choose>
- </portlet:soap-response>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|