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

setPreferredIconSize

Synopsis

void setPreferredIconSize(SessionId sessionId, int size)
throws CatalogServiceFault;

See also: SessionId, CatalogServiceFault

The setPreferredIconSize operation can be used to tell the Online Configurator about the preferred icon size of the client. The Online Configurator interprets the size parameter as a hint. There is no guarantee that the icon URL returned as part of the CatalogItem structure references an image of the specified size.

The current implementation of the Online Configurator interprets the size parameter as follows: If the preferred icon size has not been explicitly set, or has been set to zero, then the base name of the image directory is image. Otherwise (if the preferred icon size has been set to a positive value), the name of the icon directory is the concatenation of image, the dot character (.), and the requested icon size, formatted as a decimal integer consisting of at least four decimal digits (the necessary number of zeros (0) is prepended if the preferred icon size is less than one thousand).

Furthermore, if $data is the data directory of the catalog package, manu, prog, DR, and n are the OFML manufacturer, program, distribution region and major version number of the catalog package, and $image is the base name of the image directory as selected above, then the Online Configurator uses $data/manu/prog/DR/n/$image as the directory containing the image files for catalog items of this catalog package.

If this image directory exists, then the Online Configurator returns an icon URL as part of the CatalogItem structure that references the icon file (whose base name is read from the catalog database) within the image directory. If the image directory does not exist1, the Online Configurator returns an empty string instead.

Note: By convention, the maximum of width and height in pixels of each icon image stored in an image directory for a particular preferred icon size should be equal to the preferred icon size.

A CatalogServiceFault 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 size parameter is negative.

Footnotes

  1. Whether or not the icon file itself exists has no effect. ↩