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

getImages

Synopsis

ImageInfo[] getImages(SessionId sessionId,
    BItemId itemId,
    GetImagesOptions options)
throws BasketServiceFault;

See also: ImageInfo, SessionId, BItemId, GetImagesOptions, BasketServiceFault

The getImages operation is used to fetch all images stored for a particular basket item.

The itemId parameter must identify an item in the basket item tree maintained for the session identified by sessionId. The operation may be invoked for any type of basket item. Tagged item images can be assigned by setImages; configuration-specific article images are associated with OFML article items.

The operation returns the list of image associated with the specified basket item. Each returned instance of ImageInfo has a distinct tag, multiple instances may reference the same image.

As a special case, article items may return an ImageInfo with an empty tag. If so, the referenced image is said to be the PBK image, as this functionality has been implemented for compatibility with pCon.basket and other applications based on pCon.basket technology. See §Differences Between Online Configurator and pCon.basket for more information.

The item selection options are used as usual. To preserve backwards compatibility, however, the operation continues to take a single item ID instead of a list of item IDs as argument.

Items of type Aggregate may have two default article images, one with sub-articles hidden and one with sub-articles shown (although not necessarily visible). The default article image returned by operation getImages depends on the item type and, if a basket view is used, the merge mode of the view:

  • The default article image of items of type PartialPlanning will always show sub-articles.

  • Default article images of items of all other types do not show sub-articles unless the item is a view item and the view uses merge mode Compact.

The getImages operation never attempts to generate an image. It returns all images generated for a particular item, not only the default article image. However, if the item is an article view item and the view uses merge mode Articles, or it is a view item representing a sub-article and the view uses merge mode SubArticles or Compact, these additional images are not returned.

A BasketServiceFault is returned if any of the following conditions occurs:

  • The sessionId parameter is not a valid string representation of an UUID or does not represent an open session.

  • The itemId parameter does not represent an UUID.

  • The itemId parameter does not identify a basket item.

Option resolveURIs of GetImagesOptions defaults to true. If false, ImageInfo.url returns gen or imp URIs instead of HTTP(S) URLs. Pass such URIs to setImages to reuse existing project image resources for other items without uploading or importing them again.