Returns the DirectoryPrincipal for a specified type and ID.

Class Name

atg.userprofiling.GetDirectoryPrincipal

Component

/atg/dynamo/droplet/GetDirectoryPrincipal

Required Input Parameters

type

Type of principal, set to one of the following:

id

The identity to look up. The value of this parameter depends on the value specified for the type parameter:

Optional Input Parameters

directory

The UserDirectory to use when looking up identities. If omitted, the default UserDirectory specified by the userDirectory property is used.

Output Parameters

principal

Set to the DirectoryPrincipal object that corresponds to the given type and id.

persona

If the userDirectoryUserAuthority property is set, set to the Persona corresponding to the DirectoryPrincipal that the principal parameter is set to.

Open Parameters

output

Rendered if the DirectoryPrincipal is found.

empty

Rendered if the DirectoryPrincipal with the given type and id cannot be found.

Usage Notes

GetDirectoryPrincipal displays the atg.userdirectory.DirectoryPrincipal that corresponds to the specified input type and id parameters. GetDirectoryPrincipal can also display the atg.security.Persona corresponding to the directory principal it finds.

Example

The following example finds the DirectoryPrincipal for the Approver role:

<dsp:droplet name="/atg/dynamo/droplet/GetDirectoryPrincipal">
  <dsp:param name="type" value="role"/>
  <dsp:param name="id" value="Approver"/>
  <dsp:oparam name="output">
    Found directory principal <dsp:valueof param="principal.name"/>.
  </dsp:oparam>
</dsp:droplet>