Iterator Pattern

JOSIF Main Page | JOSIF Guidebook | Modeling | General Patterns | Interaction Patterns | Iterator Pattern


Iterator Protocol Neutral

Iterator Meta-Model Definitions

In the Interface Meta-Model#Operational_Modeling, the Iterator Pattern applies as one of the special Client-Server exchange cases regarding the transfer of (potentially) large set of (bulk) data. The Iterator Pattern allows the following two data transfer interaction styles:

  • A sequential retrieval of the dataset by iteration-style of data batches (pages) from the first to the last one
  • A more controlled retrieval of the dataset to support a pagination-style navigation through the dataset.

In the Interface Meta-Model (TIP Meta-Model), an operation is explicitly identified using the Iterator Pattern when:

The Interface Meta-Model#Operation is marked with*bulkTransferPattern set with ITERATOR, and
At least, one Interface Meta-Model#Parameter is marked with the*isBulkPotential and its multiplicity must allow more than a single instance (array of data).

Iterator Implicit Model Definitions

All Iterator Pattern interface model meta-data definitions are implicitly established (not visible to TIP Interface Model projects) in the Iterator package of the TIP Framework TIP_Generator_Internal_Model sub-project.

Iterator Model Example

The Service_Problem_Management is the very first of the TIP_Interfaces to be using the TIP_Framework.

Its Tigerstripe model includes the following operation definitions using the Iterator interaction pattern.
The below settings define the output parameter objects as an array of ServiceProblem entity instances that can be retrieved using an iterator because it has the potential to be bulk:

TIP service interface:*ServiceProblemInterface
Operation:getServiceProblemsByTemplate*

  • *tipOperation stereotype:
    • *bulkTransferPattern = ITERATOR
    • Argument:
    • Name:objects*
    • Type:org.tmforum.tip.service.problem.ServiceProblem*
    • Multiplicity:*0..*
    • Direction:*out
    • *tipParameter stereotype:
      • *passedById is not set (Entity instances are to be returned as an array).
      • *isBulkPotential is set (Need for an iterator associated with this array of entity data).

Iterator Protocol Specific

Refer to the TIP Framework TIP_Soap_Generator sub-project for XML mapping rule details - TIP_Soap_Generator_Mapping_Rules_-_Part_VI#tipOperation___BulkTransferPattern_-_Iterator