VMware {code} Community
narcis
Contributor
Contributor

Filter extensions/actions based on java service

Hi,

I need to filter an extension based on a response from the java service: show the extension if the java service returns true. If not, hide the extension.

Is this possible?

Thanks

0 Kudos
1 Reply
laurentsd
VMware Employee
VMware Employee

Yes, you can do the extension filtering that is described in the Programming Guide, using a custom property like myVmProperty below whose value will be returned by your own PropertyProviderAdapter.

 
     <metadata>
         <objectType>VirtualMachine</objectType>
         <propertyConditions>
            <com.vmware.data.query.CompositeConstraint>
               <nestedConstraints>
                   <com.vmware.data.query.PropertyConstraint>
                     <propertyName>myVmProperty</propertyName>
                     <comparator>EQUALS</comparator>
                     <comparableValue>
                        <Boolean>true</Boolean>
                     </comparableValue>
                   </com.vmware.data.query.PropertyConstraint>
               </nestedConstraints>
            </com.vmware.data.query.CompositeConstraint>
         </propertyConditions>
      </metadata>
0 Kudos