2.2.3.11. Manage Drive

This plugin is used to create a predefined drive into a repository. A drive can be considered as a shortcut in the content repository, a quick access to some places for users. You can restrict the visibility of this drive to a group/user and apply a specific view depending on the content you have in this area.

A drive is the combination of:

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


<target-component>org.exoplatform.services.cms.drives.ManageDriveService</target-component>

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

The following structure is used for drives configuration.


<external-component-plugins>
    <target-component>org.exoplatform.services.cms.drives.ManageDriveService</target-component>
    <component-plugin>
        <name>manage.drive.plugin</name>
        <set-method>setManageDrivePlugin</set-method>
        <type>org.exoplatform.services.cms.drives.impl.ManageDrivePlugin</type>
        <description>Nothing</description>
        <init-params>
            <object-param>
                There are initializing attributes of org.exoplatform.services.cms.drives.DriveData object
            </object-param>
        </init-params>
    </component-plugin>
</external-component-plugins>

The file that contains the structure above will be configured in the configuration.xml file as the following:


<import>war:/conf/wcm-extension/dms/drives-configuration.xml</import>

Sample configuration:


<external-component-plugins>
    <target-component>org.exoplatform.services.cms.drives.ManageDriveService</target-component>
    <component-plugin>
        <name>manage.drive.plugin</name>
        <set-method>setManageDrivePlugin</set-method>
        <type>org.exoplatform.services.cms.drives.impl.ManageDrivePlugin</type>
        <description>Nothing</description>
        <init-params>
            <object-param>
                <name>Managed Sites</name>
                <description>Managed Sites</description>
                <object type="org.exoplatform.services.cms.drives.DriveData">
                    <field name="name">
                        <string>Managed Sites</string>
                    </field>
                    <field name="repository">
                        <string>repository</string>
                    </field>
                    <field name="workspace">
                        <string>collaboration</string>
                    </field>
                    <field name="permissions">
                        <string>*:/platform/administrators</string>
                    </field>
                    <field name="homePath">
                        <string>/sites</string>
                    </field>
                    <field name="icon">
                        <string/>
                    </field>
                    <field name="views">
                        <string>wcm-view</string>
                    </field>
                    <field name="viewPreferences">
                        <boolean>false</boolean>
                    </field>
                    <field name="viewNonDocument">
                        <boolean>true</boolean>
                    </field>
                    <field name="viewSideBar">
                        <boolean>true</boolean>
                    </field>
                    <field name="showHiddenNode">
                        <boolean>false</boolean>
                    </field>
                    <field name="allowCreateFolders">
                        <string>nt:folder,nt:unstructured</string>
                    </field>
                    <field name="allowNodeTypesOnTree">
                        <string>*</string>
                    </field>
                </object>
            </object-param>
        </init-params>
    </component-plugin>
</external-component-plugins>

In which:

Field Type Value Description
name String Managed Sites The name of drive which must be unique.
repository String repository Content Repository where to find the root path.
workspace String collaboration Workspace in the Content Repository.
homePath String /sites Root path in the Content Repository. userId can be used to use the userId at runtime in the path.
permissions String *:/platform/administrators Visibility of the drive based on eXo rights. For example: *:/platform/users
icon String N/AURL to the icon.
views String wcm-view The list of views you want to use, separated by commas. For example: simple-view,admin-view
viewPreferences Boolean false The User Preference icon will be visible if true.
viewNonDocument Boolean true Non-document types will be visible in the user view if true.
viewSideBar Boolean true Shows/Hides the left bar (with navigation and filters).
showHiddenNode Boolean false Hidden nodes will be visible if true.
allowCreateFolders String nt:folder,nt:unstructured List of node types that you can create as folders. For example: nt:folder,nt:unstructured.
allowNodeTypesOnTree String *Allows you to filter node types in the navigation tree. For example, the default value is "*" to show all content types.
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus