Module: alfresco/services/actions/NodeLocationService

alfresco/services/actions/NodeLocationService

This service provides an easy way in which users can be navigated to a specific view containing the node they are interested in. This has been added to support the "document-locate" action that is configured as standard in Alfresco Share but to make the capability available for use in other contexts. Without any additional configuration this service can be used in Aikau pages contained within Alfresco Share, however if you wish to use this in an alternative client (e.g. a standalone client created from the Aikau Maven Archetype) then it is likely that you will need to set some configuration, e.g. setting useAikauPages to be true and setting the nonSiteUrl and [siteUrl]{@link module:alfresco/services/actions/NodeLocationService#siteUrl} locations to take the user to.
Author:
  • Dave Draper
License:
Source:

Examples

Standard configuration in Share:

{
   name: "alfresco/services/actions/NodeLocationService"
}

Show all nodes in custom Repository view in Share:

{
   name: "alfresco/services/actions/NodeLocationService",
   config: {
      nonSiteUrl: "custom-repository",
      siteUrl: null
   }
}

Configuration for standalone Aikau client:

{
   name: "alfresco/services/actions/NodeLocationService",
   config: {
      useAikauPages: true,
      siteUrl: "doclib",
      nonSiteUrl: "repo"
   }
}

Members

nonSiteUrl :string

The should be configured to be the URL fragment to be used when linking to nodes that are not located within a site. It defaults to "repository" as this is the standard non-site URL expected to be used within Alfresco Share.
Type:
  • string
Default Value:
  • "repository"
Source:

siteUrl :string

The should be configured to be the URL fragment to be used when linking to nodes that located within a site. It defaults to "documentlibrary" as this is the standard site URL expected to be used within Alfresco Share. If this is configured as being null then the nonSiteUrl]module:alfresco/services/actions/NodeLocationService#nonSiteUrl will be used to as the location of all items.
Type:
  • string
Default Value:
  • "documentlibrary"
Source:

Methods

onLocateDocumentRequest(payload)

Handles requests to navigate to the configured view for the node defined in the supplied payload (if available).
Parameters:
Name Type Description
payload object
Source:

registerSubscriptions()

Since:
  • 1.0.32
Source: