企业管理 > 业务管理更改升级 > 运行业务管理更改升级命令行实用程序 > 导入更改命令 > 映射业务管理更改属性
  
映射业务管理更改属性
大多数情况下,导出管理更改的源系统和目标系统应该相同。但是,有的实例的属性可能在目标系统上不可用或者在目标系统上有不同的标识符。例如,用户在目标系统上的 UFID 与源系统上的 UFID 不同。为防止导入时发生冲突,可以创建映射文件,以及从 import 命令引用映射文件。以下部分包含了示例映射 XSL 文件。
策略访问控制规则映射
在本示例中,为创建策略访问控制规则所在的上下文和要应用策略规则的用户指定了映射:
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
<xsl:template match="@* | node()" priority="-9">
<xsl:copy><xsl:apply-templates select="@* | node()"/></xsl:copy>
</xsl:template>
<xsl:template match="AccessControlRule">
<newInfo>
<xsl:apply-templates select="objectContainerPath"/>
<xsl:apply-templates select="WTPrincipalReference"/>
</newInfo>
</xsl:template>
<xsl:template match="objectContainerPath">
<objectContainerPath>
<xsl:value-of select='replace(., "testOrg","Demo Organization")'/>
</objectContainerPath>
</xsl:template>
<xsl:template match="ufid">
<ufid>
<xsl:value-of select='replace(., "testuser","demo")'/>
</ufid>
</xsl:template>
</xsl:stylesheet>
参与者映射
在本示例中,为应用配置文件的参与者的名称和标识符指定了映射:
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
<xsl:template match="@* | node()" priority="-9">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="ExportedProfileInfo">
<newInfo>
<xsl:apply-templates select="profileMember"/>
</newInfo>
</xsl:template>
<xsl:template match="WTPrincipalReference/ufid">
<ufid>
<xsl:value-of select="replace(., "aa","demo")"/>
</ufid>
</xsl:template>
<xsl:template match="WTPrincipalReference/name">
<name>
<xsl:value-of select='replace(., "aa","demo")'/>
</name>
</xsl:template>
</xsl:stylesheet>
上下文映射
在本示例中,为创建配置文件所在的上下文指定了映射:
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
<xsl:template match="@* | node()" priority="-9">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="ExportedProfileInfo">
<newInfo>
<xsl:apply-templates select="objectContainerPath"/>
</newInfo>
</xsl:template>
<xsl:template match="objectContainerPath">
<objectContainerPath>
<xsl:value-of select='replace(., "testOrg","Demo Organization")'/>
</objectContainerPath>
</xsl:template>
</xsl:stylesheet>