<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Handling multiple types with a single DataProvider in vSphere Client SDK Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Handling-multiple-types-with-a-single-DataProvider/m-p/2726746#M5599</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;I'm writing a DataProvider and would like it handle multiple types. The documentation says as follows:&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV class="B_Body" style="margin: 6pt 0pt; padding: 0px; color: rgb(51, 51, 51); font-family: Arial, Helvetica, 'sans serif'; font-size: 10pt; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; vertical-align: baseline;"&gt;&lt;A name="1004984" shape="rect"&gt;You must annotate your Data Provider Adapter class with the object types for which the adapter processes queries. The vSphere Web Client uses these annotations to route queries for the specific types to the correct adapters. You use the&amp;nbsp;&lt;/A&gt;&lt;SPAN class="C_Command" style="color: rgb(0, 0, 0); font-family: 'Lucida Console', 'Courier New', monospace; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; vertical-align: baseline;"&gt;@type&lt;/SPAN&gt;&amp;nbsp;tag to create the necessary annotation.&amp;nbsp;&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV class="B_Body" style="margin: 6pt 0pt; padding: 0px; color: rgb(51, 51, 51); font-family: Arial, Helvetica, 'sans serif'; font-size: 10pt; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; vertical-align: baseline;"&gt;&lt;A name="1005032" shape="rect"&gt;For example, if you have a custom object of type&amp;nbsp;&lt;/A&gt;&lt;SPAN class="C_Command" style="color: rgb(0, 0, 0); font-family: 'Lucida Console', 'Courier New', monospace; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; vertical-align: baseline;"&gt;WhatsIt&lt;/SPAN&gt;, you annotate the class like the following example:&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV class="C1_CodeIndent1" style="margin: 6pt 0pt 6pt 85.68pt; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Console', 'Courier New', monospace; font-size: 10pt; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; text-indent: -67.68pt; vertical-align: baseline;"&gt;&lt;A name="1004985" shape="rect"&gt;@type("samples:WhatsIt") // declares the supported object types&lt;/A&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV class="C1_CodeIndent1" style="margin: 6pt 0pt 6pt 85.68pt; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Console', 'Courier New', monospace; font-size: 10pt; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; text-indent: -67.68pt; vertical-align: baseline;"&gt;&lt;A name="1001737" shape="rect"&gt;public class MyAdapter implements DataProviderAdapter {&lt;/A&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN style="font-size: medium; font-weight: 300;"&gt;I would like to handle multiple types with the same data adapter, so as well as "samples:WhatsIt" objects, I'd also like to handle&amp;nbsp;say "samples:Whatelse".&lt;/SPAN&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;What is the syntax for the @type annotation so that multiple object types can be handled please?&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Jun 2017 14:38:33 GMT</pubDate>
    <dc:creator>wodge</dc:creator>
    <dc:date>2017-06-20T14:38:33Z</dc:date>
    <item>
      <title>Handling multiple types with a single DataProvider</title>
      <link>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Handling-multiple-types-with-a-single-DataProvider/m-p/2726746#M5599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;I'm writing a DataProvider and would like it handle multiple types. The documentation says as follows:&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV class="B_Body" style="margin: 6pt 0pt; padding: 0px; color: rgb(51, 51, 51); font-family: Arial, Helvetica, 'sans serif'; font-size: 10pt; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; vertical-align: baseline;"&gt;&lt;A name="1004984" shape="rect"&gt;You must annotate your Data Provider Adapter class with the object types for which the adapter processes queries. The vSphere Web Client uses these annotations to route queries for the specific types to the correct adapters. You use the&amp;nbsp;&lt;/A&gt;&lt;SPAN class="C_Command" style="color: rgb(0, 0, 0); font-family: 'Lucida Console', 'Courier New', monospace; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; vertical-align: baseline;"&gt;@type&lt;/SPAN&gt;&amp;nbsp;tag to create the necessary annotation.&amp;nbsp;&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV class="B_Body" style="margin: 6pt 0pt; padding: 0px; color: rgb(51, 51, 51); font-family: Arial, Helvetica, 'sans serif'; font-size: 10pt; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; vertical-align: baseline;"&gt;&lt;A name="1005032" shape="rect"&gt;For example, if you have a custom object of type&amp;nbsp;&lt;/A&gt;&lt;SPAN class="C_Command" style="color: rgb(0, 0, 0); font-family: 'Lucida Console', 'Courier New', monospace; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; vertical-align: baseline;"&gt;WhatsIt&lt;/SPAN&gt;, you annotate the class like the following example:&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV class="C1_CodeIndent1" style="margin: 6pt 0pt 6pt 85.68pt; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Console', 'Courier New', monospace; font-size: 10pt; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; text-indent: -67.68pt; vertical-align: baseline;"&gt;&lt;A name="1004985" shape="rect"&gt;@type("samples:WhatsIt") // declares the supported object types&lt;/A&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV class="C1_CodeIndent1" style="margin: 6pt 0pt 6pt 85.68pt; padding: 0px; color: rgb(51, 51, 51); font-family: 'Lucida Console', 'Courier New', monospace; font-size: 10pt; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; text-indent: -67.68pt; vertical-align: baseline;"&gt;&lt;A name="1001737" shape="rect"&gt;public class MyAdapter implements DataProviderAdapter {&lt;/A&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN style="font-size: medium; font-weight: 300;"&gt;I would like to handle multiple types with the same data adapter, so as well as "samples:WhatsIt" objects, I'd also like to handle&amp;nbsp;say "samples:Whatelse".&lt;/SPAN&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;What is the syntax for the @type annotation so that multiple object types can be handled please?&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2017 14:38:33 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Handling-multiple-types-with-a-single-DataProvider/m-p/2726746#M5599</guid>
      <dc:creator>wodge</dc:creator>
      <dc:date>2017-06-20T14:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Handling multiple types with a single DataProvider</title>
      <link>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Handling-multiple-types-with-a-single-DataProvider/m-p/2726747#M5600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="C1_CodeIndent1" style="font-weight: normal; margin: 6pt 0pt 6pt 85.68pt; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 10pt; text-indent: -67.68pt; vertical-align: baseline;"&gt;&lt;A name="1004985" shape="rect"&gt;@type("samples:WhatsIt, &lt;/A&gt;&lt;SPAN style="font-size: medium; font-weight: 300;"&gt;samples:Whatelse&lt;/SPAN&gt;&lt;A name="1004985" shape="rect"&gt;") // declares the supported object types&lt;/A&gt;&lt;/DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;DIV class="C1_CodeIndent1" style="font-weight: normal; margin: 6pt 0pt 6pt 85.68pt; padding: 0px; color: rgb(51, 51, 51); font-family: &amp;quot;Lucida Console&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 10pt; text-indent: -67.68pt; vertical-align: baseline;"&gt;&lt;A name="1001737" shape="rect"&gt;public class MyAdapter implements DataProviderAdapter {&lt;/A&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2017 19:28:36 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Handling-multiple-types-with-a-single-DataProvider/m-p/2726747#M5600</guid>
      <dc:creator>ilyak</dc:creator>
      <dc:date>2017-06-20T19:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Handling multiple types with a single DataProvider</title>
      <link>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Handling-multiple-types-with-a-single-DataProvider/m-p/2726748#M5601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See &lt;SPAN style="font-family: 'andale mono', times;"&gt;ChassisRackVSphereDataAdapter.java&lt;/SPAN&gt; in the ChassisB sample for such case:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'andale mono', times;"&gt;@type("HostSystem,samples:Rack,samples:ChassisB") // declares the supported object types.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;It's always a good idea to search all the sample source files for particular APIs &lt;img class="lia-deferred-image lia-image-emoji" src="https://communities.vmware.com/html/@DCF4E2F7991292CEECF250394DB2C2BC/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2017 14:57:18 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Client-SDK-Discussions/Handling-multiple-types-with-a-single-DataProvider/m-p/2726748#M5601</guid>
      <dc:creator>laurentsd</dc:creator>
      <dc:date>2017-06-21T14:57:18Z</dc:date>
    </item>
  </channel>
</rss>

