vSphere Client SDK API Documentation : version 5.5.0.1300321

com.vmware.vise.data.query
Interface DataServiceExtensionRegistry


public interface DataServiceExtensionRegistry

Registration interface for data adapters and providers.


Method Summary
 void registerDataAdapter(DataProviderAdapter adapter, String[] types)
          Registers a DataProviderAdapter with the Data Services Framework registry.
 void registerDataAdapter(PropertyProviderAdapter provider, TypeInfo[] types)
          Registers a PropertyProviderAdapter with the Data Services Framework registry.
 void registerObjectRefTypeAdapter(ResourceObjectReferenceAdapter adapter, Class<?> type, String uidPrefix)
          Registers an adapter for the given object reference class (e.g., URI).
 void unregisterDataAdapter(DataProviderAdapter adapter)
          Removes the specified adapter from the registry.
 void unregisterDataAdapter(PropertyProviderAdapter provider)
          Removes the specified property provider from the registry.
 void unregisterObjectRefTypeAdapter(Class<?> type)
          Removes the object reference type adapter for the given reference class type and uidPrefix.
 

Method Detail

registerDataAdapter

void registerDataAdapter(DataProviderAdapter adapter,
                         String[] types)
Registers a DataProviderAdapter with the Data Services Framework registry.

The adapter will be called for all queries whose constraint has a type that matches one of those specified during registration.

When using Spring/OSGI the adapter's registration is done automatically at the time the bundle is loaded if it is registered as an osgi-service under the DataProviderAdapter interface, like this:

    <bean name="myDataProviderAdapter"
       class="com.abc.data.MyDataProviderAdapter"/>

    <osgi:service ref="myDataProviderAdapter"
       interface="com.vmware.vise.data.query.DataProviderAdapter"/>
 

Parameters:
adapter - : The data adapter.
types - : The types which the adapter will adapt.

unregisterDataAdapter

void unregisterDataAdapter(DataProviderAdapter adapter)
Removes the specified adapter from the registry. Normally you don't need to unregister your adapter as it stays active for the life of the server session.

When using Spring/OSGI the adapter is automatically unregistered when the its bundle is unloaded.

Parameters:
adapter - : The adapter to unregister.

registerDataAdapter

void registerDataAdapter(PropertyProviderAdapter provider,
                         TypeInfo[] types)
Registers a PropertyProviderAdapter with the Data Services Framework registry.

The adapter will be called for all queries targeting type-properties tuples which are specified during registration.

When using Spring/OSGI the adapter's registration is done automatically at the time the bundle is loaded if it is registered as an osgi-service under the PropertyProviderAdapter interface, like this:

    <bean name="myPropertyProviderAdapter"
       class="com.abc.data.MyPropertyProviderAdapter"/>

    <osgi:service ref="myPropertyProviderAdapter"
       interface="com.vmware.vise.data.query.PropertyProviderAdapter"/>
 

Parameters:
provider - : The property provider
types - : The type-properties tuples that will be provided.

unregisterDataAdapter

void unregisterDataAdapter(PropertyProviderAdapter provider)
Removes the specified property provider from the registry. Normally you don't need to unregister your provider as it stays active for the life of the server session.

When using Spring/OSGI the adapter is automatically unregistered when the its bundle is unloaded.

Parameters:
provider - : The property provider

registerObjectRefTypeAdapter

void registerObjectRefTypeAdapter(ResourceObjectReferenceAdapter adapter,
                                  Class<?> type,
                                  String uidPrefix)
Registers an adapter for the given object reference class (e.g., URI). The registration requires specifying a unique uid prefix that's associated with the reference class. This means that all object UIDs carrying this prefix are provided for by the given reference adapter, and so are the instances of the given reference class.

The adapter will provide additional property info required to handle the type.

Parameters:
type - The reference class type to register with the object reference type adapter.
uidPrefix - The uidPrefix to register with the object reference type adapter.
adapter - The object reference type adapter.
Throws:
IllegalArgumentException - if any of the params are null; if reference class type is java.lang.Object.class; if the uidPrefix is an empty string; if there is an ObjectRefTypeAdapter already registered for either the type or uidPrefix.

unregisterObjectRefTypeAdapter

void unregisterObjectRefTypeAdapter(Class<?> type)
Removes the object reference type adapter for the given reference class type and uidPrefix.

Parameters:
type - The reference class type to unregister with the object reference type adapter.
uidPrefix - The uidPrefix to unregister with the object reference type adapter.
Throws:
IllegalArgumentException - if any of the params are null.

vSphere Client SDK API Documentation : version 5.5.0.1300321

Copyright @ 2012 VMware, Inc. All rights reserved.