set_properties method

set_properties(self, specification, value)

Sets known metadata properties satisfying the specification. The operation is recursive so it affects all nested packages as well. This method is a combination of MetadataPackage.add_properties and MetadataPackage.update_properties. If an existing property satisfies the specification its value is updated. If there is a known property missing in the package that satisfies the specification it is added to the package.

Returns

The number of affected properties.


def set_properties(self, specification, value):
    ...
Parameter Type Description
specification groupdocs.metadata.search.Specification A specification to test each metadata property for a condition.
value groupdocs.metadata.common.PropertyValue A new value for the filtered properties.

Remarks

Please note that GroupDocs.Metadata implicitly checks the type of each filtered property. It’s impossible to set a property with a value having inappropriate type.

See Also