This plugin is used to store predefined queries into the repositories of the system.
To use the plugin in the component configuration, you must use the following target-component:
<target-component>org.exoplatform.services.cms.queries.QueryService</target-component>
The configuration is applied mainly in /packaging/wcm/webapp/src/main/webapp/WEB-INF/conf/dms-extension/dms/dms-queries-configuration.xml.
  
Sample configuration:
<external-component-plugins>
<target-component>org.exoplatform.services.cms.queries.QueryService</target-component>
<component-plugin>
<name>query.plugin</name>
<set-method>setQueryPlugin</set-method>
<type>org.exoplatform.services.cms.queries.impl.QueryPlugin</type>
<description>Nothing</description>
<init-params>
<value-param>
<name>autoCreateInNewRepository</name>
<value>true</value>
</value-param>
<value-param>
<name>repository</name>
<value>repository</value>
</value-param>
<object-param>
<name>CreatedDocuments</name>
<description>documents created by the current user</description>
<object type="org.exoplatform.services.cms.queries.impl.QueryData">
<field name="name">
<string>Created Documents</string>
</field>
<field name="language">
<string>xpath</string>
</field>
<field name="statement">
<string>//*[(@jcr:primaryType = 'exo:article' or @jcr:primaryType = 'nt:file') and
@exo:owner='${UserId}$'] order by @exo:dateCreated descending
</string>
</field>
<field name="permissions">
<collection type="java.util.ArrayList">
<value>
<string>*:/platform/users</string>
</value>
</collection>
</field>
<field name="cachedResult">
<boolean>false</boolean>
</field>
</object>
</object-param>
</init-params>
</component-plugin>
</external-component-plugins>
In which:
        Name:
        predefinedTaxonomyPlugin
      
        Set-method:
        setQueryPlugin
      
        Type:
        org.exoplatform.services.cms.queries.impl.QueryPlugin
      
Init-param:
| Value-param | Type | Value | Description | 
|---|---|---|---|
| autoCreateInNewRepository | boolean | true | Stores queries in a new repository if the value is "true". | 
| repository | string | repository | The repository to the target node. | 
        Object type: 
        org.exoplatform.services.cms.queries.impl.QueryData
      
| Field | Type | Description | 
|---|---|---|
| name | string | The name of the query. | 
| language | string | The language of the query (Xpath, SQL). | 
| statement | string | The query statement. | 
| permissions | ArrayList | The permission which users must have to use this query. | 
| cachedResult | boolean | Specifies if the query is cached or not. |