The XML schema array-manipulator-datatypes-1.1.xsd defines array manipulation functions that can be used in SIS expressions.

The following tables list the array manipulation functions available in the SIS, what they do, and the results they return.

array-add-element

Description

Adds a new element value to an existing array. The value may be specified either as an element attribute or as a nested element. Nested elements may also be compound datatype values. The index is optional and specifies the insertion point for the new value. If the index is less than or equal to zero, the new value is inserted at the beginning of the array. If the index is greater than or equal to the current length of the array, the new value is added to the end of the array. Otherwise, the new value is inserted at the specified index. If the index is not specified, the default behaviour is to add the new value to the end of the array.

Returns

  • a new array with the specified value added.

  • no value, if the specified array variable does not exist; its current value is not an array type; the specified value cannot be evaluated, evaluates to null, or evaluates to a value that is not compatible with the array element type; or the index, if specified, cannot be evaluated to a number

Examples

<assign toVariable="${request-report-bcsm-event.bcsm-events}">
    <array-add-element array="${request-report-bcsm-event.arg.bcsm-events}" value="${user.requested-info}"/>
</assign>
<assign toVariable="${request-report-bcsm-event.arg.bcsm-events}">
    <array-add-element array="${request-report-bcsm-event.arg.bcsm-events}">
        <object class="com.opencloud.slee.resources.cgin.callcontrol.CCBCSMEvent">
            <field name="event-type-bcsm" value="oAnswer"/>
            <field name="monitor-mode" value="interrupted"/>
        </object>
    </array-add-element>
</assign>

array-remove-element

Description

Removes an element from an existing array. If an index is specified, the array element at the specified index is removed. Otherwise, a value must be specified either as an element attribute or as a nested element. Nested elements may also be compound datatype values. Array elements are compared to the specified value using normal Java equality tests. If the value appears multiple times in the array, each occurrence will be removed.

Returns

  • a new array with the specified index or value removed

  • no value, if the specified array variable does not exist; its current value is not an array type; the index, if specified, cannot be evaluated to a number or evaluates to a value out of the array bounds; or the value, if specified, cannot be evaluated, evaluates to null, or evaluates to a value that is not compatible with the array element type

Examples

<assign toVariable="${request-report-bcsm-event.arg.bcsm-events}">
    <array-remove-element array="${request-report-bcsm-event.arg.bcsm-events}" index="3"/>
</assign>
<assign toVariable="${request-report-bcsm-event.arg.bcsm-events}">
    <array-remove-element array="${request-report-bcsm-event.arg.bcsm-events}">
        <object class="com.opencloud.slee.resources.cgin.callcontrol.CCBCSMEvent">
            <field name="event-type-bcsm" value="oAnswer"/>
            <field name="monitor-mode" value="interrupted"/>
        </object>
    </array-remove-element>
</assign>

array-length

Description

Returns the length of an array value.

Returns

  • the array length

  • no value, if the parameter cannot be evaluated to an array value

Example

<assign toVariable="user.bcsm-events.length">
    <array-length array="${request-report-bcsm-events.arg.bcsm-events}"/>
</assign>
Previous page Next page