如果符合定制导入器的条件,那么会向用户提供若干向导进行选择,以用于从服务器下载资产。
<!ELEMENT extension (downloadContributor+)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT assetType EMPTY>
<!ATTLIST assetType
id CDATA #REQUIRED>
<!ELEMENT assetCategory EMPTY>
<!ATTLIST assetCategory
id CDATA #REQUIRED>
<!ELEMENT artifactPath EMPTY>
<!ATTLIST artifactPath
path CDATA #REQUIRED>
<!ELEMENT downloadContributor (enablement?)>
<!ATTLIST downloadContributor
class CDATA #REQUIRED>
<!ELEMENT and ((assetType | (and | or | not | assetCategory | artifactPath)+) | (and | or | not | assetCategory | artifactPath))>
<!ELEMENT or (and | or | not | assetType | assetCategory | artifactPath)>
<!ELEMENT not (and | or | not | assetType | assetCategory | artifactPath)>
在以下示例中,添加程序提供将会在符合启用条件时激活的类。 可以使用 and、or 和 not 逻辑运算符的组合来指定复杂启用条件。
<extension
point="com.ibm.ram.rich.ui.extension.downloadAsset">
<downloadContributor
class="com.ibm.ram.rich.ui.test.downloadasset.RASDownloadContributor">
<enablement>
<or>
<assetType
id="Service Test">
</assetType>
<assetCategory
id="Automobiles/Color/Red">
</assetCategory>
<and>
<assetCategory
id="Automobiles/Color/Red">
</assetCategory>
<not>
<artifactPath
path="/[^/]*/plugin.xml">
</artifactPath>
</not>
</and>
</or>
</enablement>
</downloadContributor>
</extension>