Use WebDAV file store for the Page Builder theme and mashup integration
You can use WebDAV to work with the Page Builder theme and mashup integration.
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. It allows you 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 tool to view and modify resources that they can access via WebDAV. For more details about the WebDAV specification refer to the RFC2518 document at the Web link given below. For more information about WebDAV in the portal refer to the topics about Using WebDAV with WebSphere Portal.You 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:
<app:collection href="/webdav/!ut/p/dav/fs-type1/"> <atom:title>fs-type1</atom:title> <app:categories fixed="yes"> . . . . . <atom:category term="webdav"/> <atom:category term="filestore"/> <atom:category term="mashups"/> . . . . . </app:categories> </app:collection>The entry point URL for the Page Builder theme and mashup integration is as follows:
http://server:port/[[Directory structure wp7|PORTAL_HOME]]/mycontenthandler/dav/fs-type1
Examples of URLs for the Page Builder theme are as follows:
http://www.my_company.com:10039/wps/mycontenthandler/dav/fs-type1/
- For theme related resources:
http://my_company.com:10039/wps/mycontenthandler/dav/fs-type1/themes
For skin related resources: http://my_company.com:10039/wps/mycontenthandler/dav/fs-type1/skinsAn example of a URL for mashup integration is as follows:
http://www.my_company.com:10039/wps/mycontenthandler/dav/fs-type1/users/wpsadmin/To authenticate against a specific virtual portal, you can do so by identifying the target virtual portal either by its host name or its URL context. Examples:
- To authenticate to the virtual portal identified by the host name vp.mycompany.com and then connect to the themes folder, use the following URL entry point:
http://vp.mycompany.com:10039/wps/mycontenthandler/dav/fs-type1/themes
To authenticate to the virtual portal identified by the URL context vp1 and then connect to the themes folder, use the following URL entry point: http://localhost:10039/wps/mycontenthandler/vp1/!ut/p/dav/fs-type1/themesFor more details about the WebDAV specification refer to the RFC2518 document at the web link given below.
Configure the WebDAV file store
By default only administrative users can perform write operations on specific folders of the WebDAV file store. This affects public and user owned folders. You can enable write access for all authenticated users on WebDAV file stores folders.To enable write access for all authenticated users, add the following property to the WP ConfigService resource environment provider in the WAS administrative console: filestore.writeaccess.allowed. Set the value for the property to true .
Notes:
- There are several WebDAV entry points. However, the property filestore.writeaccess.allowed applies to the filestore entry points for home directories for each user located at: http://server_name:WC_default_host/wps/mycontenthandler/dav/fs-type1/users/user_name
- Users can modify only their own directories. You must grant additional permissions for users to modify other directories.
Folder structure and reserved folder names
The fs-type1 WebDAV entry points provide the following set of predefined root folders used by the Page Builder theme:The fs-type1 WebDAV entry points provide the following set of predefined root folders used by mashup integration:
- themes
- skins
- layout-templates
- common-resources
- iwidgets
None of these folders can be deleted, not even by an administrator.
- public
- users
- system
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.
Page Builder theme folders
The following list shows the folder structure for the Page Builder themes. Each folder represents a WebDAV collection. You administer write access to the Page Builder theme folders via the virtual resource THEME MANAGEMENT provided by portal access control.
/themesUse this folder to store resources that are associated to themes, such as theme templates. Typically, each subfolder represents one theme.
/skinsUse this folder to store global skins. Typically, each subfolder of this folder represents one global skin.
/layout-templatesUse this folder to store templates for layouts that can be used by individual themes. Typically, each subfolder represents one layout template.
/common-resourcesUse this folder to share common resources between different themes, so that they can be managed in a single place.
/iwidgetsUse this folder to place widgets into it. They become automatically deployed into the portal.
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:All users have view access to all resources in these folders. This includes both anonymous users and authenticated users.
To give users write access to resources contained in these folders, for example to create, modify, or delete such resources, assign the users MANAGER role on the virtual resource THEME MANAGEMENT in portal access control.
Mashup integration folders
The following list shows the folder structure for mashup integration. Each folder represents a WebDAV collection. The mashup integration folders enforce a hard coded access control policy.
/publicAll authenticated users have read and write access to this folder.
Anonymous users have read access only.
/usersAll authenticated users have read access only to this folder.
Anonymous users have read access only.
/users/user_nameOnly the user user_name has access to these files. This folder is created for the individual user user_name when the user accesses the WebDAV file store for the first time. To have human readable folder names, the portal uses the user IDs of the individual users as the names for the users' folders user_name. However, internally the portal uses the VMM ID of the user, so that the data does not need to be moved when the user name is changed.
To programmatically find out the URL entry point to such folder for the current user you can look into the services document for the following entry. The access point for user specific data is provided as follows:
<app:collection href="/webdav/!ut/p/dav/fs-type1/users/<username>"> <atom:title>fs-type1-user</atom:title> <app:categories fixed="yes"> . . . . . <atom:category term="webdav"/> <atom:category term="filestore"/> <atom:category term="mashups"/> <atom:category term="user"/> . . . . . </app:categories> </app:collection>
/users/user_name/publicThe user user_name has read and write access to this folder. This folder contains content that the user user_name shared with other users. Portal access control mapping: inherited.
All authenticated users have read access to this folder.
Anonymous users have read access to this folder.
All other subfolders of /users/user_name can only the accessed by the user user_name.
/systemAdministrators can view this folder in WebDAV. Other portal users cannot view this folder. Portal access control mapping: None.
The mashup integration folders directly under the root folder, that is the folders /public , /users , and /system , are created by the system user ID. The folders /user_name and their subfolders are created under the user IDs the individual users, including folders that the users create new.
Notes:
- WebDAV prevents the deletion of the folders public, users, and system. Even users with administrator rights cannot delete these folders and the data in them.
- The following folder names are reserved for WebDAV or mashup integration. Therefore you cannot use these as folder names:
- /public
- /public/widget-def
- /users/user_name
- /users/user_name/public
- /users/user_name/public/widget-def
Filestore cache control
The WebDAV file store supports serving timeout values for HTTP Cache Header entries.You can use regular expressions to specify the time out value for elements in the filestore folder structure that match the regular expression. You need to add the following two custom properties to the WP Config Service resource environment provider with the following key = value properties:
filestore.cache.expiration.id.re=regular expression filestore.cache.expiration.id.seconds=valueThe 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 a given filestore resource, the maximum of the associated time out values will be used. Examples:
- 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
- All items of a certain resource type, suchas jpg or gif have an expiration time of 6000 seconds:
filestore.cache.expiration.1.re=.*/.jpg|.*/.gif filestore.cache.expiration.1.seconds=6000All 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:
PROPFINDThis allows portal users to find out details about the resource hierarchy, such as the WebDAV collection structure, and details about resources, such as their names, sizes, and dates of last modification.
MKCOLThis allows users to create new folders, that is WebDAV collections.
GETThis allows users to retrieve resources on which they have at least View role access rights.
HEADThis allows users to retrieve HTTP headers of resources on which they have at least View role access rights.
POSTThis allows users to upload new resources.
DELETEThis allows users to delete resources or folders, that is WebDAV collections.
PUTThis allows users to update resources, such as documents or images in a folder.
COPYThis allows users to copy resources or folders, that is WebDAV collections.
MOVEThis is used to move or rename resources or folders, that is WebDAV collections.
Known limitations
The following are known limitations of the WebDAV file store feature for mashup integration:
- The WebDAV file store feature is not supported for multiple production line scenarios. Therefore mashup integration content cannot be shared between multiple production lines.
- WebDAV URLs to the file store can identify a target virtual portal. However, file store content is not scoped to virtual portals. Therefore mashup content that is visible in one virtual portal is also visible in other virtual portals of the same portal installation.
Parent
Use WebDAV with WebSphere Portal
Related tasks
Serving HTTP OPTIONS requests to the server context root by WebDAV clients
Work with WebDAV clients
Use WebDAV with WebSphere Portal
WebDAV specification RFC2518: www.webdav.org/specs/rfc2518.html