+

Search Tips   |   Advanced Search


Use WebDAV file store

We can use WebDAV to work with the portal themes.


WebDAV overview and entry point URL

WebDAV is defined by RFC2518 as an HTTP extension framework with a plug point for the access and management of hierarchical data. For example, in content management systems. WebDAV stores the data in collections. We can work with the data in a user interface view that is similar to that of a file system. A folder represents a WebDAV collection. Various tools are available for integrating WebDAV resources into the client file system. Users can use these tools to view and modify resources that they can access with WebDAV.

Note: The HTTP Basic Authentication Trust Association Interceptor (TAI) must be enabled to use WebDAV in HCL WebSphere Portal. This TAI is enabled by default. See the related links for information.We can obtain the entry point URL to the WebDAV file store from the service document under the URL /wps/mycontenthandler/!ut/p/model/service-document. The service document contains the top-level access point as follows:

The entry point URL for themes is as follows:

Examples of URLs for themes are as follows:

To authenticate against a specific virtual portal, we can identify the target virtual portal either by its host name or its URL context. Examples:


Folder structure and reserved folder names

The fs-type1 WebDAV entry points provide the following set of predefined root folders that are used by themes:

The fs-type1 WebDAV entry points also provide the following set of predefined root folders. We can access them using the Remote Model function that is provided by the Enabler API:

The fs-type1 WebDAV entry points provide the following internal folder:

None of the folders that are listed here can be deleted, not even by an administrator.

The two sets of folders differ in the access control policy that guards access to the resources contained in those folders. See the following sections for details.


Theme folders

The following list shows the folder structure for the themes. Each folder represents a WebDAV collection. We administer write access to the theme folders with the virtual resource THEME MANAGEMENT provided by portal access control.

WebDAV prevents the deletion of these folders. Even users with administrator rights cannot delete these folders and the data in them.


Manage access control for Page Builder theme folders


Assigning access control to users and managers for theme resources in WebDAV

To allow non-administrator users to update or modify existing files do the following steps.

  1. cd to the wp_profile_root/ConfigEngine.

  2. Run.

      ConfigEngine.sh export-nodes -DWasPassword=wpsadmin -DPortalAdminPwd=wpsadmin -Dquery="/filestore/fs-type1/themes" -Dwp.content.repository.output.dir="c:\temp\jcr"

  3. Edit the file that was exported in the c:\temp\jcr directory. Add the manager role to a user or group by adding the following code:

    • Code to add the manager role to a user:

        <icm:role icm:actions="actionset:Manager,actions:Traverse,View,Edit,Add_Child,Delete,Join,">                                            
                                                     <icm:principal icm:name="uid=testuser,o=defaultwimfilebasedrealm" icm:type="USER" />                                                  
                                                     </icm:role>
    • Code to add the manager role to a group:

        <icm:role icm:actions="actionset:Manager,actions:Traverse,View,Edit,Add_Child,Delete,Join,">
                                                     <icm:principal icm:name="cn=mygroup,o=defaultWIMFileBasedRealm" icm:type="USER_GROUP" />
                                                     </icm:role>

    Add it after the <icm:owner> element. See the following complete code snippet for reference.

      <icm:node>
                                         <icm:access>                                                         
                                         <icm:wps>                                                           
                                         <icm:owner>                                                        
                                         <icm:principal icm:name="uid=wpsadmin,o=defaultwimfilebasedrealm" icm:type="USER" />                                                   
                                         </icm:owner>                                                       
                                         <icm:role icm:actions="actionset:Manager,actions:Traverse,View,Edit,Add_Child,Delete,Join,">                                             
                                         <icm:principal icm:name="uid=testuser,o=defaultwimfilebasedrealm" icm:type="USER" />                                                   
                                         </icm:role>                                                          
                                         </icm:wps>                                                          
                                         </icm:access>                                                        
                                         </icm:node>       
  4. Import the file with the following ConfigEngine task.

      ConfigEngine.sh import-nodes -DWasPassword=wpsadmin -DPortalAdminPwd=wpsadmin -Dwp.content.repository.input.dir="c:\temp\jcr"


Other folders

The following list shows extra folders. Each of these folders represents a WebDAV collection. The access control policy for them is hardcoded as described for each folder.


File store cache control

The WebDAV file store supports serving timeout values for HTTP Cache Header entries.You can use regular expressions to specify the timeout value for elements in the file store folder structure that match the regular expression. Add the following two custom properties to the WP Config Service resource environment provider with the following key = value properties:

The id value can consist of an arbitrary string. It is used only to establish the mapping between a regular expression and its associated timeout value. If there are multiple regular expressions that match any file store resource, the maximum of the associated timeout values are used. Examples:

  1. All items under the /themes folder have an expiration time of 1800 seconds:

      filestore.cache.expiration.0.re=themes/.* 
                                         filestore.cache.expiration.0.seconds=1800

  2. All items of a certain resource type, such as jpg or gif have an expiration time of 6000 seconds:

      filestore.cache.expiration.1.re=.*\.jpg|.*\.gif 
                                         filestore.cache.expiration.1.seconds=6000
    All CSS files in the themes folder have an expiration time of 8000 seconds:

      filestore.cache.expiration.2.re=themes/.*\.css 
                                         filestore.cache.expiration.2.seconds=8000


Supported HTTP methods

WebDAV file store supports the following HTTP methods:

Parent topic: Use WebDAV with HCL WebSphere Portal