Basic Configuration

Overview

Alfred Desktop uses a JSON-style server-side configuration file, config.js.

This config file should be created in $TOMCAT/shared/classes/alfresco/extension/templates/
webscripts/eu/xenit/config/ and named config.js

Keywords

Below you can find a table with a full list of supported configuration-keywords:

Parameter Name Remarks Type Description
namespace required {required} string {type} or string[] {type} All types/properties in this namespace/model are considered business-related-properties and can be read and edited by default. You can fine tune the metadata-panel & search-options using the forms-configurations. See Chapter 4 on “Metadata Configuration”
rootdoctype required {required} string {type} This is the root of your document type hierarchy. Every document created/uploaded through Alfred Desktop will have a document of this type by default. The user can specify a more specialized type.
rootnoderef required {required} string {type} Indicates the client where to find the Company Home folder. This can be used to limit certain user groups into a substructure of your Alfresco Repository. Example: the members of the Alfresco group “sales” should only see the /Company Home/Sales folder. (This is an experimental feature)
template-metadata-mode optional string {type} In Alfred Desktop you can create new documents from a template from Alfresco. This property has two possible values:“MetadataFirst” [default & recommended] – when a user chooses a template, Alfred Desktop will ask for the document name (and metadata) first, before actually creating the document. “CopyTemplateFirst” – when a user chooses a template, Alfred Desktop will create the document first and ask the user for the name and metadata afterwards. This is useful if you have rules set up in Alfresco that automatically insert metadata based on folder-context.
externalAlfrescoUrl optional string {type} Alfred Desktop has the option to copy document & folder links into the clipboard to share this link with others. If your Alfresco is not reachable over the internet at the same URL you are using in your intranet, you can use this property to set a different base url. Example: you connect with Alfred Desktop to your Alfresco server in your company network using the url http://intra.alfresco.mycompany.com/alfresco but if you want to send a link to a document over email, you should use the publicly accessible http://alfresco.mycompany.com/alfresco
useNtlmLinks optional string {type} Supported values: “False” (default), “True”. Alfred Desktop has the option to copy documents & folder links into the clipboard to share this link with others. If you enable this, Alfred Desktop will use the /wcservice variant of the link, which has support for SSO (NTLM, Kerberos)
extended optional object {type} Object to hold extended-configuration-properties. This is the appropriate place to add custom configuration properties to support customizations. See topics on: Incomplete Metadata Policies, Report a problem, Digital Signature, Take Online, Take Offline
minReqClientVersion optional string {type} The version number of the minimum allowed Alfred Desktop client. Default value is “2.0.0” for Alfred Desktop backend 3.x.
maxReqClientVersion optional string {type} The version number of the maximum allowed Alfred Desktop client. (ex. “3.2” all clients with versions in the 3.2 range or below will be supported).

Example Configurations

Generic Minimal Configuration

The Alfred Desktop Backend module needs to be configured for your dictionary model. The intent is similar to the share-config-custom.xml. It allows the administrator to define how you want the client application to represent (custom) metadata. When you apply the Alfred Desktop Backend AMP, a sample file with minimal configuration is generated to get started quickly. It is located at:
$TOMCAT/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/eu/xenit/
config/config.js.sample

To get started, copy config.js.sample to config.js to this location:
$TOMCAT/shared/classes/alfresco/extension/templates/webscripts/eu/xenit/config/config.js

This folder structure needs to be created manually, since it does not exist in a default Alfresco installation. Once config.js is in place, go to the Web Scripts Home and refresh the webscripts. Note: Accessing the Web Scripts Home requires an admin account

This is a minimal config.js configuration. It uses only the standard Alfresco. All new documents will have the type cm:content.

  var configByGroup = {
      "default": {
          "namespace" : [],
          "rootdoctype" : "{http://www.alfresco.org/model/content/1.0}content",
          "rootnoderef" : companyhome.nodeRef.toString()
      },
  };

Default Custom Configuration

If you want to use Alfresco/Alfred Desktop to its full potential, you want to use a custom dictionary model.

An example dictionary model is provided in Annex A in the Backend Installation Guide. The example configuration is specific for this model. Please adapt this configuration to your own dictionary model(s).

  var configByGroup = {
      "default": {
          "namespace"         : ["http://www.xenit.eu/fred/example/model/0.1"],
          "rootdoctype"       : "{http://www.xenit.eu/fred/example/model/0.1}document",
          "rootnoderef"       : companyhome.nodeRef.toString()
      }
  };

Using this configuration, Alfred Desktop will use the dictionary model in Annex A as the business-model because the configuration defines namespaces as a list with one element:

http://www.xenit.eu/fred/example/model/0.1

This implicates that Alfred Desktop will ask the user to provide metadata properties like http://www.xenit.eu/fred/example/model/0.1}customer_name where appropriate.

Setting the rootdoctype to {http://www.xenit.eu/fred/example/model/0.1}document indicates that all document types an end-user should be able to create/search, inherit from this type.