JBoss.orgCommunity Documentation

ManageViewPlugin

This plugin is used to create a predefined View into a repository. A View can include many object parameters. Parameters are used to create default Views, Templates and Actions of Manage View service. View enables administrators to customize View classification that can impact on users in exploring workspace. Each object-param has a type that is a class representing all properties of a View.

To use the plugin in the component configuration, you must use the following target-component:



<target-component>org.exoplatform.services.cms.views.ManageViewService</target-component>

The configuration is applied mainly in packaging/wcm/webapp/src/main/webapp/WEB-INF/conf/dms-extension/dms/dms-views-configuration.xml.

Sample configuration:



<external-component-plugins>
    <target-component>org.exoplatform.services.cms.views.ManageViewService</target-component>
    <component-plugin>
        <name>manage.view.plugin</name>
        <set-method>setManageViewPlugin</set-method>
        <type>org.exoplatform.services.cms.views.impl.ManageViewPlugin</type>
        <description>this plugin manage user view</description>
        <init-params>
            <value-param>
                <name>autoCreateInNewRepository</name>
                <value>true</value>
            </value-param>
            <value-param>
                <name>predefinedViewsLocation</name>
                <value>war:/conf/dms-extension/dms/artifacts</value>
            </value-param>
            <value-param>
                <name>repository</name>
                <value>repository</value>
            </value-param>
            <object-param>
                <name>System-View</name>
                <description>View configuration for System workspace</description>
                <object type="org.exoplatform.services.cms.views.ViewConfig">
                    <field name="name">
                        <string>system-view</string>
                    </field>
                    <field name="permissions">
                        <string>*:/platform/administrators</string>
                    </field>
                    <field name="template">
                        <string>/exo:ecm/views/templates/ecm-explorer/SystemView</string>
                    </field>
                    <field name="tabList">
                        <collection type="java.util.ArrayList">
                            <value>
                                <object type="org.exoplatform.services.cms.views.ViewConfig$Tab">
                                    <field name="tabName">
                                        <string>Info</string>
                                    </field>
                                    <field name="buttons">
                                        <string>viewNodeType; viewPermissions; viewProperties; showJCRStructure</string>
                                    </field>
                                </object>
                            </value>
                        </collection>
                    </field>
                </object>
            </object-param>
            <object-param>
                <name>System Template</name>
                <description>Template for display documents in list style</description>
                <object type="org.exoplatform.services.cms.views.TemplateConfig">
                    <field name="type">
                        <string>ecmExplorerTemplate</string>
                    </field>
                    <field name="name">
                        <string>SystemView</string>
                    </field>
                    <field name="warPath">
                        <string>/ecm-explorer/SystemView.gtmpl</string>
                    </field>
                </object>
            </object-param>
        </init-params>
    </component-plugin>
</external-component-plugins>

In which:

value-param Type Value Description
autoCreateInNewRepository boolean true Allow creating a predefined View in this repository if the value is "true".
predefinedViewsLocation string war:/conf/dms-extension/dms/artifacts The location of the View node in the repository.
repository string repository The repository name.
Field Type Value Description
name string system-view The name of view which must be unique inside WCM.
permissions string *:/platform/administrators Visibility of the view based on eXo rights.
template string /exo:ecm/views/templates/ecm-explorer/SystemView Specify path to the template location.
tabList ArrayList {java.util.ArrayList} Include a set of view names.
Field Type Value Description
tabName string Info The name of tab which must be unique.
button string viewNodeType; viewPermissions; viewProperties; showJCRStructure Specify a set of view component names.
Field Type Vsalue Description
type string ecmExplorerTemplate Specify if a name is truly a class representing all properties of a view.
name string system-view Specify a set of view component names.
warPath string /ecm-explorer/SystemView.gtmpl Specify a template location to view.