The following example shows the default SPML configuration. The text of the SPML schema definitions have been omitted for brevity.
<Configuration name='SPML' authType='SPML'> <Extension> <Object> <Attribute name='classes'> <List> <Object name='person'> <Attribute name='type' value='User'/> <Attribute name='form' value='SPMLPerson'/> <Attribute name='default' value='true'/> <Attribute name='identifier' value='uid'/> </Object> <!-- Class 'user' defines no form so we'll default to a builtin simplified schema. I don't really like this but SimpleRpc currently depends on it. --> <Object name='user'> <Attribute name='type' value='User'/> <Attribute name='identifier' value='waveset.accountId'/> </Object> <!-- Class 'userview' defines the form "view" which causes the view to pass through unmodified--> <Object name='userview'> <Attribute name='type' value='User'/> <Attribute name='form' value='view'/> <Attribute name='identifier' value='waveset.accountId'/> <Attribute name='multiValuedAttributes'> <List> <String>waveset.resources</String> <String>waveset.roles</String> <String>waveset.applications</String> </List> </Attribute> </Object> <Object name='role'> <Attribute name='type' value='Role'/> <Attribute name='form' value='SPMLRole'/> <Attribute name='default' value='true'/> <Attribute name='identifier' value='name'/> <!-- attribute ...for now? --> </Object> </Configuration>
Two classes are defined in this example:
The standard person class
An Identity Manager extension named request
The following attributes are supported in a class definition:
name – Identifies the class name. The name value can correspond to an <ObjectClassDefinition> element in an SPML schema, although this value is not required. You can use this name as the value for the objectclass attribute in an AddRequest or a SearchRequest.
type – Defines the Identity Manager view type used to manage instances of this class. Generally, this attribute is User, but it can be any repository type that is accessible through a view. For information about views, see Sun Identity Manager Deployment Reference.
form – Identifies the name of a configuration object containing a form. This attribute contains the rules for transforming between the external attributes defined by the class and the internal view attributes.
default – Specify true to indicate that this attribute is the default class for this type only. For more than one SPML class implemented on the same type, you must designate one class as the default.
identifier – Each class typically defines one attribute as the object identity. The identifier attribute in the class definition specifies which attribute represents the identity. Where possible, use the identifier attribute value as the name of the corresponding repository object you create to represent the instance.
filter – When evaluating an SPML search request for a class, you typically include all repository objects associated with that class in that search. This approach is fine for User objects, but some classes might be implemented by using generic types such as TaskDefinition or Configuration, not all of which are considered instances of the SPML class.
To prevent unwanted objects from being included in the search, you can specify the filter attribute. The value is expected to be an <AttributeCondition> element or a <List> of <AttributeCondition> elements. Because custom classes are typically created for the User type, using a filter is uncommon. The default configuration uses filters to expose a subset of the TaskInstance objects that are known to have been created to handle asynchronous SPML requests.