com.vmware.apputils
Class EntityHelper

java.lang.Object
  extended by com.vmware.apputils.EntityHelper

public class EntityHelper
extends java.lang.Object

Helper methods for using entity reference objects.


Constructor Summary
EntityHelper()
           
 
Method Summary
static com.vmware.vim.sms.EntityReference parseEntityReference(com.vmware.vim.ManagedObjectReference mor)
          Takes a VC ManagedObjectReference Id and constructs a valid EntityReference from it.
static com.vmware.vim.ManagedObjectReference parseMOR(com.vmware.vim.sms.EntityReference entity)
          Converts the given entity reference, which represents a managed object, to a ManagedObjectReference type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityHelper

public EntityHelper()
Method Detail

parseEntityReference

public static com.vmware.vim.sms.EntityReference parseEntityReference(com.vmware.vim.ManagedObjectReference mor)
                                                               throws com.vmware.apputils.ArgumentHandlingException
Takes a VC ManagedObjectReference Id and constructs a valid EntityReference from it.

Parameters:
mor - managed object reference to translate
Returns:
EntityReference
Throws:
ArgumentHandlingException - if input mor is invalid

parseMOR

public static com.vmware.vim.ManagedObjectReference parseMOR(com.vmware.vim.sms.EntityReference entity)
                                                      throws com.vmware.apputils.ArgumentHandlingException
Converts the given entity reference, which represents a managed object, to a ManagedObjectReference type.

Parameters:
entity - MO entity reference
Returns:
ManagedObjectReference
Throws:
ArgumentHandlingException - if an invalid entity is specified