123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <?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).
- -->
- <!--
- ===============================================================================================
- Adds the current user as to the notification list of an agent or agent view
- ===============================================================================================
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" requiredCapability="canUseAdministrationPortal">
-
- <xts:block id="doFormCommand" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:form="http://developer.cognos.com/schemas/xts/portal/iFrmCmd/1/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root/command/form:createUserProfile/form:env">
- <xts:sequence>
- <xts:append>
- <send:request provider="cm">
- <cm2:copyAccount xmlns:cm2="http://developer.cognos.com/schemas/contentManagerService/1">
- <sourceAccountPath xsi:type="bus:searchPathSingleObject">/configuration/account[@tenantID='']</sourceAccountPath>
- <targetAccountPath xsi:type="bus:searchPathSingleObject"><xsl:value-of select="form:param[@name = 'm_obj']"/></targetAccountPath>
- <options xsi:type="bus:optionArray" SOAP-ENC:arrayType="bus:option[3]">
- <item xsi:type="bus:copyAccountOptionBoolean">
- <name xsi:type="bus:copyAccountOptionEnum">folders</name>
- <value xsi:type="xsd:boolean">true</value>
- </item>
- <item xsi:type="bus:copyAccountOptionBoolean">
- <name xsi:type="bus:copyAccountOptionEnum">pages</name>
- <value xsi:type="xsd:boolean">true</value>
- </item>
- <item xsi:type="bus:copyAccountOptionBoolean">
- <name xsi:type="bus:copyAccountOptionEnum">preferences</name>
- <value xsi:type="xsd:boolean">true</value>
- </item>
- </options>
- </cm2:copyAccount>
- </send:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="saveFault" type="fault" processor="XSLT">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="xml"/>
- <xsl:template match="/root/fault">
- <xsl:choose>
- <xsl:when test="./*[local-name() = 'exception']/*[local-name() = 'exceptionDetail']/*[local-name() = 'exception']/*[local-name()='errorCode'] = 'cmDuplicateName'">
- <copyFault>
- <xsl:copy-of select="."/>
- </copyFault>
- </xsl:when>
- <xsl:otherwise>
- <xsl:copy-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- commandResults - operation results
- ===============================================================================================
- -->
- <xts:block id="commandResults" processor="XSLT" type="exec" mode="output" mimeType="text/xml" dependency="doFormCommand">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" version="1.0">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/root">
- <response xmlns="http://developer.cognos.com/schemas/xts/portal/iFrmCmd/1/">
- <!--xsl:copy-of select="."/-->
- <xsl:choose>
- <xsl:when test="./copyFault">
- <error>
- <errorCode>
- <xsl:value-of select="./copyFault/fault/*[local-name()='exception']/*[local-name()='exceptionDetail']/*[local-name()='exception']/*[local-name()='errorCode']"/>
- </errorCode>
- <errorMessage>
- <xsl:value-of select="./copyFault/fault/*[local-name()='exception']/*[local-name()='exceptionDetail']/*[local-name()='exception']/*[local-name()='message']/*[local-name()='messageString']"/>
- </errorMessage>
- </error>
- </xsl:when>
- <xsl:when test="bus:copyAccountResponse">
- <xsl:copy-of select="bus:copyAccountResponse"/>
- </xsl:when>
- <xsl:otherwise>
- <error/>
- </xsl:otherwise>
- </xsl:choose>
- </response>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|