com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

asset.configure Property Definitions

The asset.configure callback serves the following two purposes:

  • Defines asset type specific metadata regarding ES (i.e., the field used as the thumbnail field or the life cycle to be attached to asset instances).
  • Allows you to alter the properties that have been defined in the RXT definition.

When processing the asset.configure callback method, the extension model first evaluates asset.configure callback, which is defined in the default asset.js, and then the current callback. This allows you to selectively modify meta and RXT properties.

The following properties are returned from the asset.configure callback method:

Property

Description

Default ValueExample
nameThe name of the asset that appears in the RXT.N/A 
label

Overrides the name of a particular field that is specified in the default RXT.

N/AAuthor
type

Overrides the type of a particular field that is specified in the default RXT (e.g., If the type field in the RXT definition is set to text, you can change it to file using this field in the default asset extension). Only the following field input types are allowed: file, password

All the above field input types except the option-text are directly mapped to HTML input types. The option-text field type is a registry specific field type, which is supported to provide backward compatibility, where it is recommended  to use unbounded tables instead of the option-text fields.

N/Afile
readonlyDefines whether the user can edit this field or not. This is currently implemented in the Publisher add asset form (e.g., the provider field read only).falsetrue
hiddenDetermines if the automatically populated value is hidden or not. This is currently implemented in the Publisher add and edit asset form (e.g., the createdtime field is hidden).falsetrue
autoDefines whether the values are automatically populated or not. The attributes that are displayed using this field can not be edited. This is currently implemented in the Publisher add and edit asset form (e.g., the provider field).falsetrue
placeholderAllows you to add a placeholder text for a specific field.N/AProvide a valid service name.

 

Example 4 - Overriding properties in the RXT template

The table section of the configuration specifies properties that are overridden in the RXT template. This is shown in the code snippet below. The fields are referenced by the table as it appears in the RXT definition. As an example the name attribute that appears in the overview table must appear within the overview.fields property. If you reference a field that does not exist, it is silently ignored by the processor and a warning log is printed.

table: {
    overview: {
        fields: {
            provider: {
                readonly: true
            },
            name: {
                name: {
                    name: 'name',
                    label: 'Name'
                },
                validation: function() {}
            },
            version: {
                name: {
                    label: 'Version'
                }
            }
        }
    },
    images: {
        fields: {
            thumbnail: {
                type: 'file'
            },
            banner: {
                type: 'file'
            }
        }
    }
},

 

The meta property of the asset.configure callback method allows you to specify meta properties relevant to ES. The following code snippet demonstrates the use of the meta property:

meta: {
    lifecycle: {
        name: 'SampleLifeCycle2',
        commentRequired: false,
        defaultAction: 'Promote',
        deletableStates: [],
        publishedStates: ['Published'],
    },
    ui: {
        icon: 'icon-cog'
    },
    thumbnail: 'images_thumbnail',
    banner: 'images_banner',
}

meta element definitions

The following are the properties that can be specified in the meta block:

Property

Description

Example

meta.lifecycle.name

The life cycle to be attached to asset instance.

‘SampleLifeCycle2’

meta.lifecycle.commentRequired

Indicates whether a comment should be recorded when a life-cycle state changes.

false

meta.lifecycle.defaultLifecycleEnabledIf this property is set to true, the lifecycle defined in the asset extension is used as the lifecycle for the asset type. If this property is set to false, the lifecycle defined in the RXT is used as the lifecycle of the asset type. By default this property is true.true

meta.lifecycle.defaultAction

The life-cycle action to be invoked when the life cycle is attached.

‘Promote’

meta.lifecycle.deletableStates

The states in which asset instances can be deleted.

[‘Deleted’]

meta.lifecycle.publishedStates

The states in which asset instances can be published.

[‘Published’]

meta.lifecycle.lifecycleEnabledWhether the lifecycle behavior is enabled for this asset type or not.true

meta.ui.icon

The icon to be used as the asset type.

‘icon-cog’

meta.categories.categoryFields

 

‘overview_category’

meta.search.searchableFields

The fields that can be used to search for instances of the asset type.

[‘all’]

or

[‘overview_name’,

‘overview_description’]

meta.thumbnail

The attribute used as the thumbnail field.

‘images_thumbnail’

meta.banner

The attribute used as the banner field.

‘images_banner’

meta.versionAttributeThe attribute that is mapped to the version attribute (e.g., if the asset type is a ebook, ISBN can be mapped as the version). 
meta.providerAttributeThe attribute that is mapped to the provider attribute. The provider is the user who uploaded the asset. (e.g., map owner to provider) 

meta.timestamp

The attribute used to track the temporal behavior of an asset type.

‘overview_createdtime’

meta.grouping.groupingEnabled  
meta.grouping.groupingAttributes  
meta.permissions.configureRegistryPermissions  
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.