Set Properties

Description

Set the properties associated with an object. See properties for a discussion of properties.

The service sets all the properties at once.  The list of existing properties are replaced with those passed to the service.

Leading and trailing whitespace is removed from property names.
Trailing whitespace is removed from property values.

The service looks for the following errors in the properties, which it treats as user errors:

  • Duplicate property name
  • Property name or property value missing

(Missing both property name and property value is not considered an error - these empty entries are ignored.)

Input

<SetProperties>
<userLogonReference>userid</userLogonReference>
<password>password</password>
<objectType>type of object</objectType>
<objectReference>reference for object</objectReference>
<PropertyList>
<Property> (repeats)
<name>propertyName</name>
<value>Property value</value>
</Property>
</PropertyList>
</SetProperties>

Output

If the service works, it simply returns:

<SetProperties>
<errorNumber>0</errorNumber>
</SetProperties>

If it encounters an error other than a user error, it returns the error number and description in the standard format.

If the service encounters a user error, it returns details of the error, details of the object, and details of the properties that were passed to it.  This allows the output from SetProperties to be processed in the same way as the output from GetProperties, to show the errors to the user.

<SetProperties>
<errorNumber>105</errorNumber>
<errorDescription>User error in service SetProperties.</errorDescription>
<errorMessage>Suitable error message</errorMessage>
<errorFields>list of error fields</errorFields>
<objectType>anObjectType</objectType>
<objectReference>anObjectReference</objectReference>
<objectTypeName>Object type</objectTypeName>
<objectName>Object Name</objectName>
<propertyAuthority>update</propertyAuthority>
<PropertyList>
<Property> (repeats)
<name>propertyName</name>
<value>Property value</value>
</Property>
</PropertyList>
</SetProperties>

propertyAuthority is always update (if the user is not authorised to update, error 101 is returned).

The property list is as passed to the service, with whitespace trimmed and empty entries removed.

errorFields is a blank-delimited list of the names of the input data in error.  These are of the format propertyNameX or propertyValueX, where X is the ordinal position of the property in the list.  For example, "propertyName2 propertyName3 propertyValue4" means that the names on properties 2 and 3 are in error, and the value on property 4 is in error.

Errors

101 - Not authorised
102 - Not found
103 - Parameter error
105 - User error

Class

com.metrici.xerula.SetPropertiesService