Skip to content
pCon.configurator onlineDocumentation
Esc
↑↓navigate↵open⌘Jpreview
On this page

tmGetText2

Synopsis

TMItem[] tmGetText2(
    SessionId sessionId,
    UUID[] itemIds,
    TMGetTextOptions? options)
throws BasketServiceFault;

See also: TMItem, SessionId, TMGetTextOptions, UUID, BasketServiceFault

Operation tmGetText2 is intended to replace tmGetText which isn’t able to return formatted text.

In addition to being able to return formatted text, tmGetText2 also allows a single operation to return texts for multiple basket items or multiple view items.

Parameter options is optional. Default values apply if no options parameter is specified.

Individual options are:

  • textFormat and preservePlainText – controls the format of the returned text with the same semantics and default values as described for operation getItemProperties; As for getItemProperties, textFormat must not be None.

  • languageMode – restricts the texts returned for individual rows; If Single, a single text is returned looked up based on the effective list of product data languages. If Alpha2, all available texts with und (the undetermined language) or just an ISO 639-1 (Alpha-2) code as their language tag are returned. If LangCode, all available texts are returned.

  • The language field of TMText is set to the language tag of the stored text unless languageMode is Single or the language tag is und, in which case the language field is not set.

  • productTextMode – controls the handling of rows representing product text (text types Short, Long, and Features); The following modes are available:

    • ProductDataText – returns only text provided by OFML product data; User-provided texts are ignored.

    • UserText – returns only user-provided text; Text from OFML product data is ignored.

    • PreferUserText – returns user-provided text if available, and OFML product data text otherwise

    • Omit – returns the rows but without text

    • OmitRow – doesn’t return rows containing product texts

    Despite the option’s name, values Omit and OmitRow affect all item types, including folders and text items. Values ProductDataText, UserText, and PreferUserText affect only article items, and even then they make no real difference for set-article and user article items, which don’t distinguish between product data and user texts.

The following options must be set for tmGetText2 to return the same texts as operations tmGetText and getItemProperties:

  • for tmGetText: textFormat not set, preservePlainText set to false (doesn’t really matter), productTextMode set to ProductDataText, and languageMode set to Single, Alpha2, or LangTag depending on arguments allLanguages and enableLangTags

  • for getItemProperties: textFormat and preservePlainText set the same way as in GetItemPropertiesOptions, languageMode to Single, and productTextMode to Omit

If parameter itemIds is empty, the operation returns a single instance of TMItem with texts provided by the basket text manager. Field itemId of the returned TMItem represents the NIL UUID.

If parameter itemIds is non-empty and option view of the provided instance of TMGetTextOptions has not been set, all item IDs must be valid basket item IDs, and a set of selected basket items is constructed based on the given set of basket item IDs and the given item selection options (base class of TMGetTextOptions). For each selected basket item, the operation returns one instance of TMItem, with its itemId set to the ID of the basket item.

If parameter itemIds is non-empty and option view of the provided instance of TMGetTextOptions has been set to a valid view ID, all item IDs must be item IDs used by that view. A set of selected view items is constructed based on the given set of item IDs and the given item selection options. For each selected view item, the operation returns one instance of TMItem, with its itemId set to the ID of the view item.