|
vSphere Client SDK API Documentation : version 5.5.0.1300321 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
---|
void registerProvider(ObjectModelProvider provider, String 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.
provider
- An ObjectModelProvider implementation.namespace
- An object or resource namespace (e.g., vim25).
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).void unregisterProvider(String 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.
namespace
- The namespace of a registered ObjectModelProvider.
IllegalArgumentException
- If the namespace arguments is null.
IllegalStateException
- If the namespace is reserved.void registerMetadata(String sourceId, Document 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.
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.
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).void registerMetadata(String sourceId, Document metadataDoc, ClassLoader resourceClassLoader)
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.
sourceId
- An id uniquely identifying the metadata source.metadataDoc
- A metadata XML document.resourceClassLoader
- Classloader to be used to load resource bundles.
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.void unregisterMetadata(String sourceId)
Attempting to unregister to a document with a reserved id could result in an IllegalStateException.
sourceId
- An id uniquely identifying a metadata source.
throws IllegalStateException
If the sourceId is a reserved id.void registerUnmarshaller(String namespace, PropertyUnmarshaller unmarshaller)
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.
namespace
- An object or resource namespace (e.g., vim25).unmarshaller
- Unmarshaller that converts a fragment of raw xml into a property
value.
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.void unregisterUnmarshaller(String 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.
namespace
- An xml data namespace.
IllegalStateException
- If the namespace is reserved.
|
vSphere Client SDK API Documentation : version 5.5.0.1300321 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |