3.1.4.12.6 SetMetadata (Opnum 8)

The SetMetadata method is received by the server in an RPC_REQUEST packet. In response, the server returns the value of the metadata from the server administration system.

This method is used to set a metadata property.

 HRESULT SetMetadata(
   [in] BSTR bstrMetadataType,
   [in] VARIANT value
 );

bstrMetadataType: The name of the metadata property to set. Valid names are as follows.

Value

Meaning

"overrideMode"

A string that represents the explicit override mode of the specified IAppHostElement object. Override mode defines the locking behavior of an IAppHostElement object as it relates to other IAppHostElement objects at deeper hierarchy paths. The administration system is free to implement override rules, the selection of which is reflected by this metadata.

string

"configSource"

A string that represents an optional redirection path from which the specified IAppHostElement object was retrieved. The path is specific to the administration system and only applicable if the administration system supports alternate redirection paths.

string

"childSource"

A string that represents an optional redirection path from which the specified IAppHostElement object was retrieved. The path is specific to the administration system and only applicable if the administration system supports alternate redirection paths. The difference between "configSource" and "childSource" is totally an implementation detail of the redirection support of the administration system.

string

"lockItem"

A Boolean that represents whether the specified IAppHostElement object can be set at deeper hierarchy paths. If true, the item cannot be set deeper.

bool

"lockAllElementsExcept"

A string that represents a comma-delimited list of child element names that are allowed to be set at deeper hierarchy paths. All other unlisted child elements are not allowed to be set at deeper paths.

string

"lockElements"

A string that represents a comma-delimited list of child element names that are not allowed to be set at deeper hierarchy paths.

string

"lockAllAttributesExcept"

A string that represents a comma-delimited list of property names that are allowed to be set at deeper hierarchy paths. All other unlisted properties are not allowed to be set at deeper paths.

string

"lockAttributes"

A string that represents a comma-delimited list of property names that are not allowed to be set at deeper hierarchy paths.

string

If SetMetadata() is called with another name, that metadata is stored and can be retrieved with GetMetadata().

value: The value of the metadata property to set.

Return Values: The server MUST return zero if it successfully processes the message that is received from the client. If processing fails, the server MUST return a nonzero HRESULT code as defined in [MS-ERREF]. The following table describes the error conditions that MUST be handled and the corresponding error codes. A server MAY return additional implementation-specific error codes.

Return value/code

Description

0X00000000

NO_ERROR

The operation completed successfully.

0X80070057

ERROR_INVALID_PARAMETER

One or more parameters are incorrect or null.

0X80070032

ERROR_NOT_SUPPORTED

The metadata property specified by bstrMetadataType is not supported.

0X80070013

ERROR_INVALID_DATA

The data is invalid. The value that was attempted to be set is invalid against the schema.