vSphere Client SDK API Documentation : version 5.5.0.1300321

com.vmware.vise.search
Interface SearchServiceExtensionRegistry


public interface SearchServiceExtensionRegistry

Allow inventory service extensions to register adapters, metadata and unmarshallers.


Method Summary
 void registerMetadata(String sourceId, Document metadataDoc)
          Registers any Search-related types, properties, relationships, and/or function metadata entries found in the metadataDoc.
 void registerMetadata(String sourceId, Document metadataDoc, ClassLoader resourceClassLoader)
          Registers any object types, properties, relationship and/or function metadata entries found in the metadataDoc.
 void registerProvider(ObjectModelProvider provider, String namespace)
          Registers an ObjectModelProvider for the namespace.
 void registerUnmarshaller(String namespace, PropertyUnmarshaller unmarshaller)
          Registers a property unmarshaller for the namespace.
 void unregisterMetadata(String sourceId)
          Unregisters any object types, properties, relationship, and/or function metadata entries registered with the given sourceId.
 void unregisterProvider(String namespace)
          Unregisters the ObjectModelProvider for the namespace.
 void unregisterUnmarshaller(String namespace)
          Unregisters the unmarshaller associated with the namespace.
 

Method Detail

registerProvider

void registerProvider(ObjectModelProvider provider,
                      String namespace)
Registers an ObjectModelProvider for the namespace.

Attempting to register a null provider, a null or empty namespace could result in an IllegalArgumentException.

Any existing provider registered for that namespace will be replaced, except in the case of a reserved namespace.

Attempting to register a provider to a reserved namespace that already has a registered provider could result in an IllegalStateException.

Parameters:
provider - An ObjectModelProvider implementation.
namespace - An object or resource namespace (e.g., vim25).
Throws:
IllegalArgumentException - If provider or namespace arguments are null or empty.
IllegalStateException - If namespace is a reserved namespace with a provider already registered (i.e. it cannot be changed).

unregisterProvider

void unregisterProvider(String namespace)
Unregisters the ObjectModelProvider for the namespace.

Attempting to unregister a null namespace could result in an IllegalArgumentException.

Attempting to unregister a provider of a reserved namespace could result in an IllegalStateException.

Parameters:
namespace - The namespace of a registered ObjectModelProvider.
Throws:
IllegalArgumentException - If the namespace arguments is null.
IllegalStateException - If the namespace is reserved.

registerMetadata

void registerMetadata(String sourceId,
                      Document metadataDoc)
Registers any Search-related types, properties, relationships, and/or function metadata entries found in the metadataDoc.

Attempting to register a null document or a null sourceId could result in an IllegalArgumentException.

Attempting to register a document with a reserved sourceId could result in an IllegalStateException.

Parameters:
sourceId - An id uniquely identifying this metadata document. There is no strict rule regarding the format of the sourceId, but to ensure uniqueness, the sourceId should be namespaced with the company and plugin-name. For example: mycompany:plugin-name:descriptorSource.

Note: the same id must be used to unregister the metadata document.

metadataDoc - A metadata XML document.
Throws:
IllegalArgumentException - If the namespace arguments is null.
IllegalStateException - If namespace is a reserved namespace with a provider already registered (i.e. it cannot be changed).

registerMetadata

void registerMetadata(String sourceId,
                      Document metadataDoc,
                      ClassLoader resourceClassLoader)
Registers any object types, properties, relationship and/or function metadata entries found in the metadataDoc.

Attempting to register a null document or a null sourceId could result in an IllegalArgumentException.

Attempting to register a document with a reserved id could result in an IllegalStateException.

Parameters:
sourceId - An id uniquely identifying the metadata source.
metadataDoc - A metadata XML document.
resourceClassLoader - Classloader to be used to load resource bundles.
Throws:
IllegalArgumentException - If sourceId or metadataDoc arguments are null.
IllegalStateException - If the sourceId is a reserved id and there is already a document registered with the sourceId.

unregisterMetadata

void unregisterMetadata(String sourceId)
Unregisters any object types, properties, relationship, and/or function metadata entries registered with the given sourceId.

Attempting to unregister to a document with a reserved id could result in an IllegalStateException.

Parameters:
sourceId - An id uniquely identifying a metadata source. throws IllegalStateException If the sourceId is a reserved id.

registerUnmarshaller

void registerUnmarshaller(String namespace,
                          PropertyUnmarshaller unmarshaller)
Registers a property unmarshaller for the namespace.

Attempting to register a null unmarshaller, a null or empty namespace could result in an IllegalArgumentException.

Attempting to register to a reserved namespace that already has an unmarshaller could result in an IllegalStateException.

Parameters:
namespace - An object or resource namespace (e.g., vim25).
unmarshaller - Unmarshaller that converts a fragment of raw xml into a property value.
Throws:
IllegalArgumentException - If the namespace parameter is null or empty; if the unmarshaller is null.
IllegalStateException - If the namespace is reserved and an unmarshaller is already registered for the namespace.

unregisterUnmarshaller

void unregisterUnmarshaller(String namespace)
Unregisters the unmarshaller associated with the namespace.

Attempting to unregister a null namespace could result in an IllegalArgumentException.

Attempting to unregister a reserved namespace that already has an unmarshaller could result in an IllegalStateException.

Parameters:
namespace - An xml data namespace.
Throws:
IllegalStateException - If the namespace is reserved.

vSphere Client SDK API Documentation : version 5.5.0.1300321

Copyright @ 2012 VMware, Inc. All rights reserved.