Platform Explorer / Nuxeo Platform 2023.10

Extension point deprecation

Documentation

Extension Point to register deprecated/removed properties. XML extensions may contain any number of 'property' elements of the form:

    <property deprecated="true" name="size" schema="common"/>
    <property fallback="content/name" name="filename" schema="file"/>

A property contributed to this extension point enables deprecation mechanisms inside Nuxeo Platform. This generates WARN message of usage to help to remove deprecated usage.

A contribution is one of these types:

  • deprecated: property still exists in schema definition, but it'll be removed in next version
  • removed: property has been removed from schema definition, relax platform behavior. This will avoid Nuxeo property not found exceptions for remaining use of the property

The fallback attribute is optional, its value has to be a xpath referencing an existing property in the same schema than removed/deprecated property. When presents, it is used:

  • to set the value to the fallback property
  • to get the value from the fallback property if it exists

Note: for a deprecated property, setValue also set value to property and getValue get value from property if fallback value is null.

For example, the contribution below enables WARN message of usage of property file:filename . This will also get/set the value from/to file:content/name for deprecated usage of file:filename property.

    <property fallback="content/name" name="filename" schema="file"/>

As it, each usage of this property will automatically fallback on the fallback and avoid exception from platform. This will also allows to import document declaring the removed property.

@since 9.2 @deprecated since 11.1, use schema extension point with PropertyDescriptor object

Contribution Descriptors

  • Class: org.nuxeo.ecm.core.schema.PropertyDeprecationDescriptor

Contributions

No known contributions.