Copying an Alfred Desktop link in Alfred Desktop normally returns a link to the link landing web page. From that page you can then choose to open the node in Alfred Desktop or in Alfresco Share. You can make a configuration inside the config.js file so the “Copy Alfred Desktop Link” command in Alfred Desktop returns a direct Alfred Desktop link. This means that the link will not go to the link landing page. Instead, it will directly open the node in Alfred Desktop.
Here is an example on how to configure your config file to enable direct Alfred Desktop links:
var configByGroup = {
"default": {
"namespace" : [
"http://www.xenit.eu/fred/example/model/0.1"
],
"rootdoctype" : "{http://www.alfresco.org/model/content/1.0}content",
"rootnoderef" : companyhome.nodeRef.toString(),
"extended" : {
"link.direct" : true
}
}
};
As shown in the example you need to set “link.direct” property to true.
Users of Alfred Desktop can generate Alfred Desktop links using the “Copy Alfred Desktop Link” command in Alfred Desktop. This creates an Alfred Desktop link that automates navigation to a file/folder in the repository. However, users can do more than just navigation with Alfred Desktop links. Alfred Desktop links can be used for the following actions: * Navigating to a document/folder * Executing a search query * Executing an Alfred Desktop command (for example: opening a file) * Viewing the version history of a document * Opening the internal web browser of Alfred Desktop to a web page of choice
Navigation Alfred Desktop links are used to navigate to a file/folder in
Alfred Desktop. These Alfred Desktop links have the following syntax:
fred://<repository-id>/browse/id/<store-protocol>/<store-identifier>/<node-uuid>.
<repository-id> - The id of the repository. The easiest way to
find the repository id is by browsing to
https://<yourdomain>/alfresco/s/xenit/config. On that webpage you
can search for repositoryId.<store-protocol> - The store protocol of the node you want to
navigate to. That is, the type of store where the node is located.
e.g. ”workspace” or “archive”<store-identifier> - The store identifier of the node you want to
navigate to, e.g. ”SpacesStore”.<node-uuid> - The UUID of the node you want to navigate to,
e.g. ”ffe57203-f6dd-4f36-9086-c9037b40ec41”.Example of a navigation Alfred Desktop link:
Navigation to node with node reference
workspace://SpacesStore/ffe57203-f6dd-4f36-9086-c9037b40ec41 inside
repository
with id b212245a-5b4b-4add-870e-f19ecdf4daf8.
fred://b212245a-5b4b-4add-870e-f19ecdf4daf8/browse/id/workspace/
SpacesStore/ffe57203-f6dd-4f36-9086-c9037b40ec41
Search Alfred Desktop links are used to execute search query. These
Alfred Desktop links have the following syntax:
fred://<repository-id>/search/repository/?location=<location noderef>&type=<type qname>
&criteria<filter index>=<filter criteria qname>&value<filter index>=<filter value>
&sort=<sort_column_qname>&order=<Ascending|Descending>&group=<group column qname>.
<repository-id> - The id of the repository. The easiest way to
find the repository id is by browsing to
https://<yourdomain>/alfresco/s/xenit/config. On that webpage you
can search for repositoryId.<location noderef> - The node reference of the location in which
you want to search.<type qname> - Short prefix QName like “cm:folder” or “cm:content”
of the type of nodes you want to search for.criteria<filter index>=<filter criteria qname>&value<filter index>=<filter value> -
The properties you want to search on. The short QName of the
property and the value must be matched using an index,
e.g. criteria1=cm:creator&value1=admin.<sort_column_qname> - The short QName of the column you want to
sort on, e.g. ”cm:name”.<Ascending|Descending> - If you set sorting, you must also choose
either Ascending or Descending order.<group column qname> - Short QName of the property you want to
group by, e.g. ”cm:title”Examples of search Alfred Desktop links:
* Searching for documents and folders that were created by user admin,
sorted by name in ascending order.
fred://082e51ea-e467-11dc-a9f1-b369ea0e319b/search/repository/
?location=workspace%2fSpacesStore%2fd10ca0c6-7cf8-4f6b-80e2-a5e27cea062b&type=cm:folder
&type=cm:content&criteria1=cm:creator&value1=admin&sort=cm:name&order=Ascending
* Searching for documents and folders that were created by user admin,
grouped by title.
fred://082e51ea-e467-11dc-a9f1-b369ea0e319b/search/repository/
?location=workspace%2fSpacesStore%2fd10ca0c6-7cf8-4f6b-80e2-a5e27cea062b&type=cm:folder
&type=cm%3acontent&criteria1=cm:creator&value1=admin&group=cm:title
Custom command Alfred Desktop links are used to execute a command on a
node, e.g. opening a file. These Alfred Desktop links have the following
syntax: fred://<repository-id>/<command>
@navigate=<false|true>/id/<store-protocol>/<store-identifier>/<node-uuid>.
<repository-id> - The id of the repository. The easiest way to
find the repository id is by browsing to
https://<yourdomain>/alfresco/s/xenit/config. On that webpage you
can search for repositoryId.<command> - The command you want to execute on the node. See the
chapter on defining command to get a list of commands.navigate=<false|true> - Set navigate to false if you don’t want to
navigate to the node before executing the command. The default value
is true.<store-protocol> - The store protocol of the node you want to
navigate to. That is, the type of store where the node is located.
e.g. ”workspace” or “archive”<store-identifier> - The store identifier of the node you want to
navigate to, e.g. ”SpacesStore”.<node-uuid> - The UUID of the node you want to navigate to,
e.g. ”ffe57203-f6dd-4f36-9086-c9037b40ec41”.Examples of custom command Alfred Desktop links:
fred://b212245a-5b4b-4add-870e-f19ecdf4daf8/command.builder.open-document@navigate=false/id/workspace/SpacesStore/ffe57203-f6dd-4f36-9086-c9037b40ec41fred://b212245a-5b4b-4add-870e-f19ecdf4daf8/command.builder.editonline/id/workspace/SpacesStore/ffe57203-f6dd-4f36-9086-c9037b40ec41Version history Alfred Desktop links are used to show the version
history of a given node. These Alfred Desktop links have the following
syntax:
fred://<repository-id>/versionhistory/id/store-protocol>/<store-identifier>/<node-uuid>.
<repository-id> - The id of the repository. The easiest way to
find the repository id is by browsing to
https://<yourdomain>/alfresco/s/xenit/config. On that webpage you
can search for repositoryId.<store-protocol> - The store protocol of the node of which you
want to see the version history. That is, the type of store where
the node is located. e.g. ”workspace” or “archive”<store-identifier> - The store identifier of the node of which you
want to see the version history, e.g. ”SpacesStore”.<node-uuid> - The UUID of the node of which you want to see the
version history, e.g. ”ffe57203-f6dd-4f36-9086-c9037b40ec41”.Web browser Alfred Desktop links are used to open the internal web
browser of Alfred Desktop and open a certain web page. These Alfred
Desktop links have the following syntax:
fred://<repository-id>/page/url/<url to web page>
<repository-id> - The id of the repository. The easiest way to
find the repository id is by browsing to
https://<yourdomain>/alfresco/s/xenit/config. On that webpage you
can search for repositoryId.<url to web page> - The url of the web page you want to browse to.Example of a web browser Alfred Desktop link:
fred://b212245a-5b4b-4add-870e-f19ecdf4daf8/page/url/www.xenit.eu