XML Import FAQ

Table of Contents

  1. Overview
  2. XML Import Schema Basics
  3. Basic Topics
    1. Deployment Options
    2. MWS Pages & Folders
    3. Content
  4. Advanced Topics
    1. Aliases
    2. Renderers (Relation)
    3. Wiring
    4. Resource Bundles
    5. Includes
    6. Execute Command
    7. Delete
  5. Principals
    1. (System) Users
    2. (System) Groups
    3. Adding principals to Groups and Roles
    4. (Static) Roles
    5. System Directory Service (ldif)
    6. LDAP Directory Service
    7. DB Directory Service
    8. LDAP Query Roles
    9. Dynamic Role Attributes
    10. Dynamic Role Attributes -- User Overrides
  6. Security
    1. Permissions
    2. Authentication Schemes
    3. Security Realms
  7. Reference
  8. External Links

Overview

My webMethods Server was designed to allow the dynamic deployment of any MWS resource to occur at runtime without requiring a restart. This includes the deployment of items such as: Portlets, MWS Pages, Skins, Shells, Aliases, Rules, etc... Since Portlets are developed in the CAF Designer IDE, the technique for deploying Portlets is fairly well documented. The other resources (eg: MWS Pages) are created and configured inside the MWS itself. There are two main techniques for migrating these other types of resources from one MWS to another MWS: Content Migration Wizard and Deployer. Both of these tools are geared towards MWS Administrators running production portal installations. This document focuses on a third use case: CAF Developers who are pre-packaging MWS Pages and other MWS resources for distribution.

XML Import Schema Basics

MWS Resources are imported by xml documents. There isn't a schema or dtd for these documents, but there are some guidelines to follow.

    All xml import documents must start with a <Config> Node.
    The simplest possible xmlImport document (that does nothing) would look like this: <!--Does nothing--> <Config />
    Location/Context: All portal resources live somewhere inside of the MWS's folder structure. In order to create your resources in the appropriate location you should use the <Context> Node to set the current 'root'. The <Context> node takes an attribute: 'alias'.
    The following snippet demonstrates creating a folder inside of Public Folders. <Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <folder name="test folder" /> </Context> </Config>
    Types: All instances of portal resources are identified by their type name (eg: wm_htmltext, wm_wikiobject, etc...) In order to create an instance of any type of portal resource you just use the type name as the Tag name of the xml element.
    The following examples create a bunch of different types of objects with default properties. <Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <wm_bam_tree name="Business Process Tree" /> <wm_htmltext name="Empty Text" /> <wm_folderview name="Current FolderView" /> <wm_xt_wikiobject name="Wiki Page"> <wm_sessionmonitor name="Session Monitor" /> </Context> </Config>
    Properties: You can set any property on a portal resource by using the appropriate property name for that type. NB: These are the portlet descriptor names of the properties and not their display names. (eg: 'Name' vs 'name')
    In the previous examples, we we're already setting the name. The following examples create the some objects and also sets some properties on those resources besides just the name. <Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <wm_htmltext name="Hello World Text Portlet" HTMLText="This is some sample text for this portlet"/> <link name="Link to www.webmethods.com" URL="http://www.webmethods.com" /> <wm_xt_shortcut name="Web Page" URL="/webApp/presManager/webPageRenderer"/> <wm_portletinportlet name="Nested Portlet" proxyThingID="user.current.fabric.home" subrenderer="pageinportlet"> <wm_simplelink name="Home" newWindow="false" proxyThingID="global.navlink.home" reuseWindow="false" truncate="50" visualStyle="1" /> <wm_menubar name="My Folders" listViewTargetURI="user.current.home" sort="name" /> <wm_listoflinks name="Siblings" linkType="basic" pageSize="10" rootFolder="current.resource.parent" showSelectedItem="true" /> </Context> </Config> Furthermore, if you need some more control over setting a property, you can use a variant like the following: <Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <folder name="Folder with a description> <property name="description"> I want to add a fairly long description with "quotes" and other stuff. </property> </folder> </Context> </Config>

Basic Topics

Deployment Options

At the heart of any Importing of MWS Resources is the main xml document containing the MWS resources. As long as the xml import conforms to the guidelines above, it may be deployed in one of three types of packages:

All three of these techniques will iterate through the contents of your xml document creating the resources in your xml document.

MWS Pages & Folders

A MWS Page is created with the <folder> tag. Because it is a container, it can contain nested child nodes of other portlets and portal resources like the following:

<Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <folder name="parent folder"> <link name="child link 1" /> <link name="child link 2" /> <folder name="child folder 3"> <link name="grandchild link 1" /> <link name="grandchild link 2" /> </folder> </folder> </Context> </Config> A folder may also contain Page Layout information. In the MWS UI, you can create complex MWS Page Layouts including wiring, and auto-positioned portlets. Any layout that can be accomplished in the MWS Page Editor, may also be described in the xml import. The layout information uses the following tags: <page>, <column>, <hobos> and <row>. The following example demonstrates a MWS Page with two rows and two columns. <Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <folder name="MWS Page with two rows and two columns"> <page> <row> <column> <folder name="Row 1 Column 1" /> </column> <column> <folder name="Row 1 Column 2" /> </column> </row> <row> <column> <folder name="Row 2 Column 1" /> </column> <column> <folder name="Row 2 Column 2" /> </column> </row> </page> </folder> </Context> </Config>

In the example above, there are no attributes set on the <page>, <column>, or <row>. However, you may set some attributes on both the <column>, or <row> as in the following:

<Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <folder name="MWS Page with one rows and two columns"> <page> <row> <column width="60%" align="left" valign="middle"> <folder name="column aligned left" /> </column> <column width="40%" align="right" valign="middle" wrap="true"> <folder name="column aligned right" /> </column> </row> </page> </folder> </Context> </Config>

If you are using the WebPage renderer which hides any Auto-Positioned Portlets, then you will want to use <hobos> tag. This is demonstrated in the example below. (Please note, the relation tag hasn't been defined yet, but will be in the Advanced Topics section)

<Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <folder name="MWS Page with an autopositioned portlet"> <relation path="folder.presManager.renderers/webpagerenderer" type="renderer"/> <page> <row> <column width="60%" align="left" valign="middle"> <folder name="column aligned left" /> </column> </row> </page> <hobos> <folder name="Auto Positioned folder" /> </hobos> </folder> </Context> </Config>

Another common thing when modifying a MWS Page Layout is to hide the titlebars and/or the borders of portlets. This technique uses the <layout> tag as in the following example.

<Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <folder name="Portlets with hidden titlebars and borders"> <page> <row> <column width="60%" align="left" valign="middle"> <link name="Link with no titlebar" URL="http://www.webmethods.com"> <layout name="titlebar" value="false"/> </link> <link name="Link with no border" URL="http://www.webmethods.com"> <layout name="border" value="false"/> </link> <link name="Link with no titlebar and no border" URL="http://www.webmethods.com"> <layout name="titlebar" value="false"/> <layout name="border" value="false"/> </link> </column> </row> </page> </folder> </Context> </Config>

Content

Content (documents) can be created in the same manner as any other MWS resource. The one key thing to note is that the actual contents of the file must be available with the xml import as well (eg: the bytes of the file whether it is plain text or binary). This means that you have can need to use either the cdp or the pdp option when deploying an xmlimport with content. (see Deployment Options). When defining a content item to import you must set a special attribute 'content' which points to the location inside of your deployable component as in the following example:

<Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <content content="deploytemp:/resources/PDFDocument.pdf" mimeType="application/pdf" name="Special PDF Document" origFileName="PDFDocument.pdf" /> </Context> </Config> Inside of your pdp, you should have a folder structure like: /resources/PDFDocument.pdf so that the xmlImport classes can find the contents of your document. In this example we also set the mimeType and same name attributes as well.

Advanced Topics

Aliases

Aliases are a portable, convenient mechanism to uniquely identify MWS Resources. Every MWS Resource has a unique ID, but those ids are not portable from one MWS installation to another, where aliases are portable. Aliases come in two flavors: system aliases and non-system aliases. There is no difference in their behavior, just in whether they can be easily edited or removed. (You get a warning in the Alias Administration Portlet if you attempt to remove or modify a system alias.) The following examples demonstrate how to set multiple aliases on multiple resources.

<Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <link name="Link with two system aliases" alias="link1,link1alias" /> <link name="Link with three non-system aliases" userAlias="alias1,alias2,alias3" /> </Context> </Config>

Renderers (Relation)

Renderers are an important concept in the MWS that helps to decide how a specific MWS Page should be displayed. Some common renderers are: MWS Page Renderer, Folder Details Renderer, Web Page Renderer, Thumbnail Renderer, etc... As a MWS administrator/user you would typically set these by browsing to the Properties page of an item and modify its Display Properties. There are two main types of display properties you can set: Full Page View and Portlet View. They represent how an item will appear when it's Maximized, and how the item will appear when it is placed on a MWS Page. The following table shows some of the common renderers that are available:
Name Type Description Alias Usage
Properties Full Page Used to draw the properties page of a MWS Resource renderers.properties <folder name="Show Properties"> <relation path="renderers.properties" type="renderer"/> </folder>
Folder Details Full Page Used to draw the current MWS page as a detailed list renderers.details <folder name="Show Folder Details"> <relation path="renderers.details" type="renderer"/> </folder>
Thumbnails Full Page Used to draw the current MWS page as a series of thumbnails renderers.thumbnails <folder name="Show Folder Thumbnails"> <relation path="renderers.thumbnails" type="renderer"/> </folder>
WebPage Full Page Used to draw the current MWS page as a MWS page but hides any auto-positioned portlets folder.presManager.renderers/webpagerenderer <folder name="Show Web Page View"> <relation path="folder.presManager.renderers/webpagerenderer" type="renderer"/> </folder>
Folder Details Portlet View Used to draw the current folder in details on a MWS Page portlet.pseudo.folderview <folder name="Show Folder Details in MWS Page"> <relation path="portlet.pseudo.folderview" type="portlet.pseudo"/> </folder>
Simple FolderView Details Portlet View Used to draw the current folder in simple details on a MWS Page portlet.pseudo.folderview.simple <folder name="Show Simple Folder in MWS Page"> <relation path="portlet.pseudo.folderview.simple" type="portlet.pseudo"/> </folder>
List of Links Portlet View Used to draw the current folder with a simple List of Links on a MWS Page portlet.pseudo.listoflinks <folder name="Show List of Links in MWS Page"> <relation path="portlet.pseudo.listoflinks" type="portlet.pseudo"/> </folder>
Thumbnails Portlet View Used to draw the current folder with thumbnails on a MWS Page portlet.pseudo.folderview.thumbnails <folder name="Show Thumbnails in MWS Page"> <relation path="portlet.pseudo.folderview.thumbnails" type="portlet.pseudo"/> </folder>

Wiring

When creating Composite Applications, you typically will be wiring properties from one portal to the next. The following example demonstrates how to create an xmlImport that captures this wiring information. Please note, that all wired properties must use aliases instead of IThingIDs.

<Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <wm_htmltext name="My Wiring Source" HTMLText="98117, 98024" userAlias="my.wiring.source" /> <wm_accuweather name="My Wired Weather"> <wiring name="zipCodes" portlet="my.wiring.source" property="HTMLText"/> </wm_accuweather> </Context> </Config> In this example, the htmltext portlet is used as the wiring source, and the Accuweather portlet has a property wired to the htmltext portlet.

Resource Bundles

Resource Bundles are generally only used deploying HTMLText portlets with localizable strings. The following demonstrates this technique:

<Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <wm_htmltext name="Localizable text"> <property name="HTMLText" resourceBundleClass="com.webmethods.portal.portlet.wm_portalcontent.resources.MWSContentResources" key="POP.012.0018.wm_portalcontent"/> </wm_htmltext> </Context> </Config> In this example, the htmltext will be pulled from the ResourceBundle deployed along with the Portlet that contains the xmlImport.xml

Includes

Occasionally, the xmlImport files get so large that you want to split them into smaller pieces. Using the include will assist with this:

<Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <include include="deploytemp:/resources/pages/customPage.xmli"/> </Context> </Config> Note, the other documents should also include the Config Node as well.

Execute Command

This statement allows you to exectue MWS Verbs (aka Commands). The following examples demonstrate this technique:

<Config> <!-- Renaming default Start Page if it exists --> <context alias="start.page"> <executecommand commandName="updateProperties" resourceURI="start.page" name="MWS Start (6.2)"/> </context> <!-- Undeploying portlets --> <executecommand commandName="uninstallComponent" componentLocation="deploy:/wm_aliasadmin.pdp"/> </Config>

Delete

This is a short cut for invoking the delete command.

<Config> <!-- Deleting obsolete character set --> <context alias="folder.encodings"> <delete name="custom"/> </context> </Config>

Principals

Just like other MWS Resources Principals (Users, Groups and Roles) may also be imported. However, the storage of Principals in the MWS is not quite as straightfoward as storing Folders, Documents and Links. There are also numerous limitations such as you are unable to import users from an external Directory Service, however you may import an external directory service itself.

(System) Users

Users can be imported into the MWS's internal System Directory Service much like you would import a folder into the MWS.

<context alias="system.directory.user.storage"> <wm_xt_sysdiruser name="newUserID" alias="system.user.newUserID" firstName="Brand New" lastName="User" password="password" dn="uid=newUserID,ou=People,o=webmethods"/> </context> In this example, we created a new user (of type wm_xt_sysdiruser) and set the user's ID: 'newUserID' as well as some other attributes. One important thing to note is that the user's DN should have an identical uid attribute as the name. This user will be able to login with the following credentials: newUserID/password

(System) Groups

Similar to users, Groups can be created in the same fashion. Notice how the following example takes care to have the same attributes for name, groupName and the cn part of the dn.

<context alias="system.directory.group.storage"> <wm_xt_sysdirgroup name="Custom Developers" alias="dir.customdevelopers.group" groupName="Custom Developers" dn="cn=Custom Developers,o=webmethods"/> </context>

Adding principals to Groups and Roles

Now that we've created some internal users and groups, we might want to add some of these users to some of the groups or roles. The following command demonstrates this as well as why you would want to assign aliases to the previously imported users and groups and roles.

<executecommand commandName="addPrincipalToGroup" principalURI="system.user.newUserID" groupURI="dir.customdevelopers.group"/> <executecommand commandName="addPrincipalToRole" principalURI="system.user.newUserID" roleURI="dir.custom.role"/>

(Static) Roles

Roles come in a variety of 'flavors' depending on their implemenetation. The simplest type of role is a Static Role where the members are statically defined from any available user, group or role in the MWS Directory System. Static Roles are fairly similar to users and groups, but due to the ability to have different implementation patterns, in order to define a static role you need to define both the storage of the role and the MWS System definition of a role. In the following example we add the previous group and user to a new static role:

<!--role storage--> <context alias="role.provider.storage"> <wm_xt_staticrole name="Custom Role Storage" principals="system.user.newUserID,dir.customdevelopers.group" alias="dir.custom.role.storage" targetURI="dir.custom.role.storage"/> </context> <!--role definition--> <context alias="role.provider.roles"> <wm_xt_role name="Custom Role" roleProviderURI="role.static.provider" alias="dir.custom.role"> <relation path="dir.custom.role.storage" type="role.relation"/> </wm_xt_role> </context>

System Directory Service (ldif)

We've seen how to incrementally add a user and a group, but we also have the ability to perform a bulk import by using the LDIF standard. This gives us the ability to define users, groups and group membership in one file. In order to perform a bulk ldif import you will need to use two files, the xmlImport file as well as the ldif file. In order to create the simplest possible cdp for an ldif import create the following directory structure:

wm_your_component_name wm_your_component_name/data/import.ldif wm_your_component_name/WEB-INF/xmlImport.xml and then use the following xmlImport and ldif examples for xmlImport.xml and import.ldif respectively. <!--xmlImport.xml--> <CONFIG> <executecommand commandName="importldif_wm_xt_sysdirsvc" resourceURI="system.directory.service" ldifFile="deploytemp:/data/import.ldif"/> </CONFIG> <!--import.ldif--> dn: cn=Test1,ou=Groups,o=webMethods.com description: A collection of geeks objectclass: top objectclass: groupofuniquenames cn: Test1 dn: cn=Test2,ou=Groups,o=webMethods.com description: A collection of geeks objectclass: top objectclass: groupofuniquenames cn: Test2 uniquemember: uid=user1, ou=People, o=webMethods.com uniquemember: uid=user2, ou=People, o=webMethods.com dn: uid=user1, ou=People, o=webMethods.com cn: User 1 sn: 1 givenname: user objectclass: top objectclass: person objectclass: organizationalPerson objectclass: inetOrgPerson uid: user1 mail: user1@webMethods.com userpassword: password dn: uid=user2, ou=People, o=webMethods.com cn: User 2 sn: 2 givenname: user objectclass: top objectclass: person objectclass: organizationalPerson objectclass: inetOrgPerson uid: user2 mail: user2@webMethods.com userpassword: password

LDAP Directory Service

In order to automatically import a connection to an external ldap directory service you can use the following example that specifies the minimum necessary connection info. The exact parameters may vary based on your customized LDAP directory service (AD/ADAM/etc...)

<context alias="dir.svc.container"> <!--Common LDAP dir service--> <wm_xt_ldapdirsvc name="Seattle Sun LDAP" providerURL="ldap://seattlesun.seattle.webmethods.com:389" baseDN="dc=webmethods,dc=com" securityPrincipal="uid=portal, ou=People, dc=webmethods, dc=com" securityCredentials="connectionpassword" alias="mycustom.ldap.dir.svc" /> <!--Common AD dir service--> <wm_xt_ldapdirsvc name="Seattle Active Directory" providerURL="ldap://tbar:389" baseDN="CN=Users2,DC=standalone,DC=local" securityPrincipal="CN=Administrator,CN=Users,DC=standalone,DC=local" securityCredentials="connectionpassword" userID="cn" firstName="givenName" lastName="sn" fullName="displayName" password="unicodePwd" members="member" groupName="cn" groupObjectClass="group" /> </context>

DB Directory Service

The databased directory service is similiar in concept to the LDAP dir service but there are many more parameters that are highly dependent on the external database schema.

<context alias="dir.svc.container"> <wm_xt_dbdirsvc attributeGroupDN="dn" attributeGroupEmail="email" attributeGroupID="groupname" attributeGroupName="name" attributeUserDN="dn" attributeUserEmail="email" attributeUserFirstName="firstName" attributeUserFullName="fullName" attributeUserID="username" attributeUserLastName="lastName" authHandler="_{portlet.dbdir.auth.cleartext}_" authLevel="forms" authenticate="select password from users where lower(username) = lower('{uid}')" cacheCapacity="1000" cacheEnabled="true" cacheTimeout="86400" datasource="" grpMembership="select parentgroupname groupname from groupmembership where childgroupname = '{uid}'" listGroups="select * from groups" listUsers="select * from users" lookGroupByID="select groupName, name, email, 'groupName=' + groupname + ',dc=webmethods' dn from groups where lower(groupname) = lower('{uid}')" lookUserByID="select u.*, 'uid=' + username + ',dc=webmethods' dn from users u where lower(username) = lower('{uid}')" membersGroup="select childgroupname groupname from groupmembership where parentgroupname = '{uid}'" membersUser="select username from usermembership where groupname = '{uid}'" name="test_db" searchGroups="select * from groups where lower(groupname) like lower('%{query}%')" searchUsers="select * from users where lower(username) like lower('%{query}%')" tempAlias="temp_alias_3" usrMembership="select groupname from usermembership where username = '{uid}'"/> </context>

LDAP Query Roles

In a previous step we've created both static roles and created connections to an external ldap directory service. Now we can combine those techniques and create a role based upon an ldap query.

<!--role storage--> <context alias="role.provider.storage"> <wm_xt_ldapqueryprovider name="My LDAP Query Role Storage" alias="dir.my.ldap.query.role.storage" isSimpleQuery="true" ldapQuery="uid=*" principalType="users" ldapDirServiceID="mycustom.ldap.dir.svc" /> </context> <!--role definition--> <context alias="role.provider.roles"> <wm_xt_role name="My LDAP Query Custom Role" roleProviderURI="role.ldap.query.provider" alias="dir.my.ldap.query.custom.role"> <relation path="dir.my.ldap.query.role.storage" type="role.relation"/> </wm_xt_role> </context>

Dynamic Role Attributes

In order to assign dynamic attributes to roles, you will execute four different ModifyPrincipal commands. They will separately modify:

The following example describes setting nine different attributes on a role: <executecommand commandName="ModifyPrincipal" principalURI="dir.my.ldap.query.custom.role" attrName="displayList" attrValue="Role 1 Attribute 1,Role 1 Attribute 2,Primary Role,Role 1 Integer 1,Role 1 Boolean 1,Role 1 Long 1,Role 1 Float 1,Role 1 Double 1,Role 1 Date 1" principalAttributeProviderID="pap.role.attribmap"/> <executecommand commandName="ModifyPrincipal" principalURI="dir.my.ldap.query.custom.role" attrName="nameList" attrValue="role1attrib1,role1attrib1,primaryRole,role1int1,role1bool1,role1long1,role1float1,role1double1,role1date1" principalAttributeProviderID="pap.role.attribmap"/> <executecommand commandName="ModifyPrincipal" principalURI="dir.my.ldap.query.custom.role" attrName="typeList" attrValue="string,string,string,integer,boolean,long,float,double,date" principalAttributeProviderID="pap.role.attribmap"/> <executecommand commandName="ModifyPrincipal" principalURI="dir.my.ldap.query.custom.role" attrName="valueList" attrValue="r1a1,r1a2,Test Role 1,1,true,123456789,1.2,1.23456789,2005-06-23 11:44" principalAttributeProviderID="pap.role.attribmap"/>

Dynamic Role Attributes -- User Overrides

In some cases, you may want to override on a per user basis the value of one of these dynamic role attributes. This is done with yet again another call to ModifyPrincipal. In the following example, we provide a different attribute value for the attributes: role1date1 and role1float1.

<executecommand commandName="ModifyPrincipal" principalURI="system.user.newUserID" attrName="attribList" attrValue="role1date1=2005-06-23 11:55,role1float1=1.256" principalAttributeProviderID="pap.user.role.member"/>

Security

Security information can be set like nearly any other MWS data via xmlImport as well. You can set ACLs/ACEs, GRANT and DENY privileges, add/remove items from Security realms and set authentication schemes.

Permissions

The ACL tag creates a new set of permissions exclusively for the Everyone Group and sets an alias. Later that alias can be used on any resource that you choose. The following example creates a named ACL that allows the Everyone Group READ and MODIFY access and then applies that acl to a new folder under Public Folders. Note how the aclName attribute must match the alias of the ACL. Valid values for different access rights may be found on the SDK site (http://ajax-softwareag.com/) and searching for IAccessRight.java

<acl name="helpRights" alias="acl.everyone.customPublic" value="READ, MODIFY"/> <context alias="folder.public> <folder name="Custom Public" aclName="acl.everyone.customPublic" /> </context>

The more flexible tag: ACE allows you fine-grained control over the complete ACL. It allows you to specify users, groups and roles (Not just the Everyone Group). It allows you to grant and deny any available Permission, and it allows you to optinally set this ACE recursively. Finally, it also allows you to remove any existing ACEs. This tag is applied on the specific resource that you want to modify security for as a child resource. In the following example, the My webMethods Administrators Role is Granted ALL rights to the public folder recursively.

<context alias="folder.public"> <ace action="add" uid="My webMethods Administrators" recursive="true"> <right delegate="false" deny="false" grant="true" name="ALL"/> </ace> </context>

The right tag has the following boolean attributes: [delegate|grant|deny]
The ace tag has an action attribute that has the valid attributes: [add|remove|removeAll]. The add action requires the right child tag to determine what to add. The remove action just removes any security setting for the principal referenced by the uid attribute. The removeAll value will remove all of the ACEs for that resource.
The recusrive boolean attribute determines whether or not to apply this change to all descendents.
In the next example, the ability to add multiple rights together is demonstrated.

<context alias="folder.public"> <ace action="add" uid="My webMethods Administrators" recursive="true"> <right delegate="false" deny="false" grant="true" name="READ"/> <right delegate="false" deny="false" grant="true" name="MODIFY"/> <right delegate="false" deny="false" grant="true" name="MODIFY_PERMISSION"/> </ace> </context>

Authentication Schemes

An authentication scheme can be placed on any resource by setting the authLevel property. This allows you to designate resources as anonymous, requiring BASIC auth, NTLM auth, or whathever auth scheme you require. Valid auth schemes can be determined by looking at the English names of the auth schemes listed in the System Folder: "folder.auth.schemes" (this is an alias). In the following example, the public folder is changed to be anonymous.

<context alias="folder.public"> <property name="authLevel" value="anonymous" /> </context>

Security Realms

Security Realms are a single ACL that is shared by many different resources. They are created just like any other resource and you set the security on them using the ACE tag. Configuring a resource to be part of a security realm doesn't have a unique tag, instead it is performed by using the executecommand tag. In the following example, a new Security Realm is created and configured, and then a new folder is added to the Security Realm. You should note that the security realm must have an alias in order to be able to reference it from the executecommand tag.

<!-- create the new security realm in a custom folder under the system security realms folder --> <context alias="folder.system.securityrealms"> <folder name="Custom Security Realms"> <wm_securityrealm name="Administrative Security Realm" alias="securityrealm.custom.administrative"> <ace action="add" uid="My webMethods Administrators"> <right delegate="false" deny="false" grant="true" name="ALL"/> </ace> <ace action="remove" uid="Everyone"/> </wm_securityrealm> </folder> </context> <!-- create the folder that you want to add to the security realm --> <context alias="folder.public"> <folder name="Administrative folder" alias="custom.admin.folder" /> </context> <!-- add the custom admin folder and all of its children to the security realm --> <executecommand commandName="setSecurityRealm" itemID="custom.admin.folder" securityRealmID="securityrealm.custom.administrative" recursive="true" />

Reference

Name Type Description Example Relates to
alias (userAlias) Attribute used to identify the alias of a MWS resource <Context alias="folder.public" /> Context, Any MWS Resource
Column Tag used to create a new column in a MWS Page Layout <folder name="MWS Page with two columns"> <page> <row> <column width="40%" align="left" wrap="true"><folder name="Column 1" /></column> <column width="60%" align="left"><folder name="Column 2" /></column> </row> </page> </folder> Any MWS Page
Config Tag Root Node of xml import document <Config />  
Content Tag Imports a document to the MWS <Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <content content="deploytemp:/resources/PDFDocument.pdf" mimeType="application/pdf" name="Special PDF Document" origFileName="PDFDocument.pdf" /> </Context> </Config>  
Context Tag Sets the current MWS Resource node <Context alias="folder.public"> <folder name="new folder" /> </Context>  
Executecommand Tag Runs a portal command <Config> <!-- Renaming default Start Page if it exists --> <context alias="start.page"> <executecommand commandName="updateProperties" resourceURI="start.page" name="MWS Start (6.2)"/> </context> </Config>  
Hobos Tag used to create auto positioned portlets in a MWS Page Layout <folder name="MWS Page with two columns"> <page> <row> <column width="40%" align="left" wrap="true"><folder name="Column 1" /></column> </row> </page> <hobos> <folder name="Auto Positioned folder" /> </hobos> </folder> Any MWS Page
Include Tag Includes external xml import documents <Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <include include="deploytemp:/resources/pages/customPage.xmli"/> </Context> </Config>  
Layout Tag used to hide titlebars and borders on any MWS Resource in a MWS Page Layout <folder name="MWS Page with two columns"> <page> <row><column> <link name="Link with no titlebar and no border" URL="http://www.webmethods.com"> <layout name="titlebar" value="false"/> <layout name="border" value="false"/> </link> </column></row> </page> </folder> Any MWS Resource in a MWS Page
name Attribute used to identify the name of a MWS resource <folder name="My New Folder" /> Any MWS Resource
Page Tag Starts the layout information of a MWS Page <folder name="MWS Page with one row and one columnumn"> <page> <row> <column> <folder name="Row 1 Column 1" /> </column> </row> </page> </folder> Any MWS Page
Property Tag Sets the value of named property of a MWS Resources <folder name="Folder with a description> <property name="description"> I want to add a fairly long description with "quotes" and other stuff. </property> </folder> Any MWS Resource
Relation Tag Sets a renderer (using a relation) on a MWS Resource. <folder name="Show Thumbnails in MWS Page"> <relation path="portlet.pseudo.folderview.thumbnails" type="portlet.pseudo"/> </folder> Any MWS Resource
resourceBundleClass Attribute used to identify the location of localizable text for html text portlets <wm_htmltext name="Localizable text"> <property name="HTMLText" resourceBundleClass="com.webmethods.portal.portlet.wm_portalcontent.resources.MWSContentResources" key="POP.012.0018.wm_portalcontent"/> </wm_htmltext> Any MWS Resource
Row Tag used to create a new row in a MWS Page Layout <folder name="MWS Page with two rows"> <page> <row> <column><folder name="Row 1 Column 1" /></column> </row> <row> <column><folder name="Row 2 Column 1" /></column> </row> </page> </folder> Any MWS Page
Wiring Tag Configures wiring between any two MWS Resources <Config> <!--Set the current 'root' to be the public folder--> <Context alias="folder.public"> <wm_htmltext name="My Wiring Source" HTMLText="98117, 98024" userAlias="my.wiring.source" /> <wm_accuweather name="My Wired Weather"> <wiring name="zipCodes" portlet="my.wiring.source" property="HTMLText"/> </wm_accuweather> </Context> </Config> Any two MWS Resources