Open IT Experts for Enterprise

Virtual Folders for dealing with public documents in Alfresco 5.1

Cesar Capillas
Cesar Capillas

How to manage public content in Alfresco with the help of virtual folders

In the last versions of Alfresco 5.1 EE and Alfresco 201602GA (5.1.e)
CE, they were introduced the very promising so-called "smart
folders". Smart Folders organize your content in a logical view
via custom Alfresco FTS queries. Stored searches are shown in a folder
tree, so that when a user opens a folder, a query is run and the
results are displayed in a list. Files are also automatically
classified when they are uploaded. 

So let’s start with a little example of using smart folders. There
exists many smart-related variables in, but in practice I only
needed to change this property:


In share-config-custom.xml, two aspects are enabled
by default for configuring smart folders. These can be applied
in different folders or sites resulting in different logical views of
the repository, through JSON templates deployed in /Data
Dictionary/Smart Folder Templates
folder. The JSON format
is not truly for final users, but the possibilities are huge and files
can be changed/edited/applied directly without restarting. In our
experience, some system for customizing queries was always necessary
in Alfresco in the past, for example custom document library filters,
customs dashlet for saved searches or customizations of the advanced search.

I want to share my first virtual folders example, for managing custom
public shared documents in Alfresco >4.2. I did some previous post
about this, based on a client conversation:

So this can be considered as the second part of the post. First, I
applied the smf:customConfigSmartFolder aspect for
example to /Shared folder (Compartido in Spanish) and editing the
properties of the folder, I select the
qsharedFolder.json template uploaded in /Data
Dictionary/Smart Folder Templates

Then, the resulting virtual folder structure looks this way, with
folders for the corresponding queries shown below. 

The qsharedFolder.json can be downloaded from here:

"name" : "My logical views",
"nodes" : [
    "id" : "100",
    "name" : "Shared - Public",
    "description" : "Files with aspect qshare:shared",
    "nodes" : [
            "id" : "101",
            "name" : "Shared - Public documents",
            "description" : "ASPECT:'qshare:shared'",
            "search" : {
                "language" : "fts-alfresco",
                "query" : "(PATH:'%ACTUAL_PATH%//*') AND ASPECT:'qshare:shared'"
            "id" : "102",
            "name" : "Shared - Public documents by ccl001",
            "description" : "ASPECT:'qshare:shared' AND @qshare:sharedBy:ccl001",
            "search" : {
                "language" : "fts-alfresco",
                "query" : "(PATH:'%ACTUAL_PATH%//*') AND ASPECT:'qshare:shared' AND @qshare:sharedBy:ccl001"
            "id" : "103",
            "name" : "Shared - Public documents with effectivity properties",
            "description" : "ASPECT:'qshare:shared' AND ASPECT:'cm:effectivity'",
            "search" : {
                "language" : "fts-alfresco",
                "query" : "(PATH:'%ACTUAL_PATH%//*') AND ASPECT:'qshare:shared' AND ASPECT:'cm:effectivity'"
            "id" : "104",
            "name" : "Shared - Public documents after 2016",
            "description" : "ASPECT:'qshare:shared' AND @cm:modified:['2016-01-01' TO NOW]",
            "search" : {
                "language" : "fts-alfresco",
                "query" : "(PATH:'%ACTUAL_PATH%//*') AND ASPECT:'qshare:shared' AND @cm:modified:['2016-01-01' TO NOW]"
            "id" : "105",
            "name" : "Shared - Public documents before 2016",
            "description" : "ASPECT:'qshare:shared' AND @cm:modified:[MIN TO '2016-01-01']",
            "search" : {
                "language" : "fts-alfresco",
                "query" : "(PATH:'%ACTUAL_PATH%//*') AND ASPECT:'qshare:shared' AND @cm:modified:[MIN TO '2016-01-01']"



Más entradas

innovación / i+d
Chelsea Urien

Industrial Data Research Open Laboratory

El laboratorio de pruebas de concepto industriales impulsado por ZYLK y Lortek Industrial Data Research Open Laboratory  INDAR Open Lab es una iniciativa de ZYLK (empresa líder en digitalización)

Leer más »

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *