You are here

Alfresco Share Document Library repository tier

In order to preserve existing customizations and third party add-ons, a parallel set of data web scripts has been developed to coexist with the previous data web scripts. These web scripts are located in the remote-api project and have URLs starting with /slingshot/doclib2/.

There are three extension points supported by the repository data web scripts.

1. Document Library custom response

A custom response appears within the metadata.custom section of the JSON response. An example of a cleanly installed service is the vtiServer configuration, defined within the slingshot-context.xml file.

The customResponses property defines a map of JSON key to custom response bean within the SlingshotDocLibCustomerResponse bean definition.

Default slingshotDocLibCustomResponse bean configuration:

<bean id="slingshotDocLibCustomResponse"
  <property name="extensionName">
  <property name="<b>customResponses</b>">
       <entry key="vtiServer">
          <ref bean="doclibCustomVtiServer"/>

The bean for returning the vtiServer configuration is defined as:

<bean id="doclibCustomVtiServer" class="">
    <property name="scriptUtils">
        <ref bean="utilsScript" />
    <property name="sysAdminParams">
        <ref bean="sysAdminParams" />
    <property name="port">
    <property name="host">

The VtiServerCustomResponse class (which implements CustomResponse) returns a Serializable object (for example a LinkedHashMap) that is serialized into the JSON response by the DocLib web scripts.

This extension point is designed to return useful information that is not specific to any node, for example, the presence of an optional module; whether a subsystem is active or not, etc.

2. Property decorators

The other place the data web scripts may be extended is via the property decorator extension mechanism.

To add a new property decorator, the baseDecorator bean needs to be extended with the property decorator you wish to use. For example:

      <bean id="customPropertyDecorator" parent="baseDecorator" class="">
        <property name="nodeService" ref="nodeService"/>
        <property name="personService" ref="PersonService" />
        <property name="propertyNames">

3. Permissions list

The third place the data web script response can be extended is by using the list of permissions that are returned for each node. These are defined by using the userPermissions property on the applicationScriptUtils bean. For example:

<property name="<b>userPermissions</b>">

The default set of permissions should not be reduced without fully understanding the impact on actions, indicators, and metadata evaluators already in use throughout Share.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.