In my plugin, I have a method on one of my scripting objects that use the attributes of different ManagedObjects (Vc Scripting objects), e.g: the name and type of a Folder and Datastore ManagedObjects.
Is there a way I can use the Objects as is within my plugin? Because it would be nicer to just use a VcManagedObject within my plugin rather than what I am currently doing:
I extract the name, type and sdkId from these different managed objects to create a custom JSONobject, that is then serialized. Then within the method of my scripting object, it deserializes it (via Gson) into a custom "SimpleManagedObject" class I have created within my plugin.
Any thoughts?
Thanks
Well, usually it is not a good idea for a plug-in to rely on Java stuff provided by another plug-in (like directly using its scripting objects). Plug-in implementations may change over time and this will break all other plug-ins if they were dependent on the changed plug-in internals; for example, this was exactly the case with vCenter plug-in which got completely different implementation in vRO 7.3 and this caused some issues with another plug-in that expected certain Java classes/packages to be there.
Well, usually it is not a good idea for a plug-in to rely on Java stuff provided by another plug-in (like directly using its scripting objects). Plug-in implementations may change over time and this will break all other plug-ins if they were dependent on the changed plug-in internals; for example, this was exactly the case with vCenter plug-in which got completely different implementation in vRO 7.3 and this caused some issues with another plug-in that expected certain Java classes/packages to be there.
That makes sense. I'll stick with my serializing/deserializing approach then 😃