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

asset.manager Method Definitions

You can use the asset.manager callback method to override the existing methods to handle the CRUD (create, read, update and delete) business logic of an asset type. The following is the list of methods that are returned by the asset.manager callback method:

Method

Description

asset.manager.init
 

asset.manager.create

Creates a new asset instance.

asset.manager.postCreate 
asset.manager.setAsDefaultAssetMakes the provided asset the default asset.

asset.manager.update

Updates the asset instance that corresponds to the provided asset ID.

asset.manager.remove

Removes the asset instance based on the provided asset ID.

asset.manager.synchAsset

Synchronizes an asset instance, by updating the provided asset with the latest values in the registry.

asset.manager.list

Lists the assets bound by a paging object. If a paging object is not provided, then a default paging object is used.

asset.manager.get

Retrieves a single asset based on the UUID.

asset.manager.search

Searches for assets that are bound by a paging object, which is specified in the query restrictions.

asset.manager.advanceSearch 
asset.manager.searchByGroup

Retrieves a set of assets that are bound by a paging object, and thereafter groups it by a default property.

asset.manager.getAssetGroupRetrieves the set of assets that have the same name.
asset.manager.compareVersions 
asset.manager.setDefaultAssetInfo

Enriches an asset object with information on whether it is a default asset.

asset.manager.isDefaultAsset 

asset.manager.recentAssets

Lists the assets that have been recently added.

asset.manager.popularAssets

Lists the most popular assets.

asset.manager.tags

Retrieves the list of tags that match the provided asset type.

asset.manager.tagged

Retrieves the list of assets that match the provided tag.

asset.manager.addTagsAdds a tag to a given asset.
asset.manager.removeTagsRemoves a tag of a given asset.
asset.manager.getTagsRetrieves the set of tags applied to an asset.

asset.manager.rating

Retrieves the average and the rated value of a particular asset type.

asset.manager.rate

Rates a given asset instance.

asset.manager.subscribe

Subscribes to an asset. This is used to add a bookmark in ES.

asset.manager.unsubscribe

Unsubscribes from an asset. This is used to remove a bookmark in ES.

asset.manager.isSubscribed

Checks if the user who is currently logged in is subscribed to the provided asset.

asset.manager.subscriptions

Returns the list of asset subscriptions that belongs to the user who is currently logged into ES.

asset.manager.getSubscriptionSpace 

asset.manager.attachLifecycle

Attaches a life cycle to an asset.

asset.manager.invokeDefaultLcAction

Invokes the default life-cycle action.

asset.manager.invokeLcAction

Invokes the provided life-cycle action.

asset.manager.invokeLifecycleCheckItem

Sets the check item at the provided index to the given state.

asset.manager.getLifecycleCheckItems

Retrieves all of the check list items for the asset.
asset.manager.getLifecycleStateRetrieves the state of a specific life cycle.
asset.manager.getLifecycleHistoryRetrieves the history of a specific life cycle.
asset.manager.listAllAttachedLifecycles 
asset.manager.createVersion
Added a specific version to an asset type.

asset.manager.getName

Retrieves the name of the asset type.

asset.manager.getVersionRetrieves the version of an asset type.

asset.manager.getThumbnail

Retrieves the thumbnail of the asset type.

asset.manager.getBanner

Retrieves the banner of the asset type.

asset.manager.getTimeStamp

Retrieves the temporal value.

asset.manager.getAssetResourcesRetrieves a list of all the fields that represent resources of the asset (e.g., thumbnail, banner and content).

asset.manager.importAssetFromHttpRequest

 
asset.manager.combineWithRxt 

asset.manager.render

Renders a page object. This is done by combining the page details with the asset details, which in turn are combined with the RXT template. If an array of assets are provided, then the assets will not be merged with the RXT template.

asset.manager.renderBasic

Renders a page object. This is done by combining the assets details with the RXT template.

asset.manager.getCategories

Retrieves the list of categories for a given asset type.

asset.manager.getSearchableFields

Retrieves the list of fields that can be used to search for an asset.

The default version of all the above asset.manager methods are defined in <ES_HOME>/modules/rxt/scripts/asset/asset.js file.

Example 1 - Altering the search, list and get methods

The following code snippet shows how the search, list and get methods can be altered.

asset.manager = function(ctx) {
    return {
        search: function(query, paging) {
            return this._super.search.call(this, query, paging);
        },
        list: function(paging) {
            return this._super.list.call(this, paging);
        },
        get: function(id) {
            return this._super.get.call(this, id);
        }
    };
};

 

Example 2 - Calling the parent implementation when overriding a method

A method that is overridden can still call the parent implementation of a method by using the _super property. You can use the _super property, which is a reference to the parent object, to call any of the parent methods. An example of this usage is as follows:

return this._super.search.call(this, query, paging);
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.