VMware {code} Community
wodge
Enthusiast
Enthusiast
Jump to solution

Handling multiple types with a single DataProvider

Hi, 

I'm writing a DataProvider and would like it handle multiple types. The documentation says as follows:

For example, if you have a custom object of type WhatsIt, you annotate the class like the following example:

 

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 say "samples:Whatelse".
 
What is the syntax for the @type annotation so that multiple object types can be handled please?

 

Many thanks

 
0 Kudos
1 Solution
2 Replies
laurentsd
VMware Employee
VMware Employee
Jump to solution

See ChassisRackVSphereDataAdapter.java in the ChassisB sample for such case:

@type("HostSystem,samples:Rack,samples:ChassisB") // declares the supported object types.

It's always a good idea to search all the sample source files for particular APIs 🙂

0 Kudos