GetUserFolders

Short Description

Gets a user's home folder or subfolders.

Category

User interface helper methods

Syntax

rc=DoRequest("<GetUserFolders>...</GetUserFolders>",outMetadata);

Parameters

Method Parameters
Parameter
Type
Direction
Description
<Tree/>
C
in
Metadata property string that gets a home folder or subfolder. See the “Details” section for information about the format of the metadata property string.

Details

The GetUserFolders method is available in the DoRequest interface only. The method and its parameters are specified in an XML input string within the INMETADATA parameter of the DoRequest method. The method's output is returned in the DoRequest method's OUTMETADATA parameter.
User folders are represented in the SAS Metadata Server as Tree metadata objects. The XML input string consists of a <GETUSERFOLDERS> element that passes a metadata property string that identifies a Tree object in the following form:
<Tree PersonName='name' FolderName='folder-type'/>
The PERSONNAME value must specify the Name attribute value of a Person object or be blank. If PERSONNAME is blank and the requesting user has a metadata identity, the user folder belonging to the requesting user is returned. If an IdentityGroup name is specified, the method will return an error. User folders are not supported for IdentityGroups at this time.
The FOLDERNAME value must be one of “Home Folder”, “My Folder”, or “Application Data”, or the method will return an error.
The method uses the AssociatedHomeFolder association defined for the Person object identified by PERSONNAME to locate the folder requested by FOLDERNAME. The method returns the Tree object's 17–character metadata identifier and DisplayName attribute value. The locale used to create the DisplayName value is provided to the SAS Metadata Server in the LOCALE server invocation option or in the sasv9.cfg file.

Example

The following is an example of a DoRequest method that issues a GetUserFolders request. The method requests to get the “My Folder” folder of a person named “SAS Web Administrator.”
outMetadata=""
inMetadata =
"<GetUserFolders>
<Tree PersonName='SAS Web Administrator' FolderName='My Folder'/>
</GetUserFolders>";

rc=DoRequest(inMetadata,outMetadata);
If the request is successful, the XML returned in the OUTMETADATA parameter mirrors the input in the INMETADATA parameter. The output includes the Id and DisplayName values of the specified folder.
The request is rejected with an authorization error if the requesting user is not “SAS Web Administrator,” is not an administrative user of the SAS Metadata Server, or if “SAS Web Administrator” is the name of an IdentityGroup.

Related Methods