Module: UU::OS::ImageCatalog

Extended by:
ImageCatalog
Included in:
ImageCatalog
Defined in:
uu_os-0.29.16/lib/uu/os/image_catalog.rb,
uu_os-0.29.16/lib/uu/os/image_catalog/image_catalog_get_image_list.rb,
uu_os-0.29.16/lib/uu/os/image_catalog/image_catalog_image_entry_attributes.rb

Overview

ImageCatalog service.

Defined Under Namespace

Classes: ImageCatalogGetImageList, ImageCatalogImageEntryAttributes

Constant Summary

PATH =

Service path

'ues/core/imagecatalog/UESImageCatalog'

Instance Method Summary (collapse)

Instance Method Details

- (UU::OS::REST::ResultList<ImageCatalog::ImageCatalogGetImageList, ImageCatalog::ImageCatalogImageEntryAttributes>) get_image_list(artifact_uri, criteria = nil)

Returns List of Objects representing image entries.

Examples:

# get 3rd page of images using default ordering
image_list = UU::OS::ImageCatalog.get_image_list('ues:TERRITORY:VUC_VIEW', :page_size => 50, :page_index => 2)

# get all icons whose codes start with ICON/ and use custom ordering
image_list = UU::OS::ImageCatalog.get_image_list('ues:TERRITORY:MY_ART', :query => 'code LIKE ${var} ORDER BY code DESC',
    :query_parameters => { :var => 'ICON/%' })

Returns:



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'uu_os-0.29.16/lib/uu/os/image_catalog.rb', line 34

def get_image_list(artifact_uri, criteria = nil)
  svc = UU::OS::REST::RemoteClient.new(ImageCatalog)
  dto = ImageCatalog::ImageCatalogGetImageList.new(criteria)
  svc.add_parameter('pageIndex', dto.page_index)
  svc.add_parameter('pageSize', dto.page_size)
  svc.add_parameter('query', dto.query)
  if ((dto.query_parameters.kind_of?Hash) && (dto.query_parameters.size > 0))
    svc.add_parameter(:queryParameters, dto.query_parameters.to_json)
  end
  UU::OS::QoS::QoSHandler.auto_retry do
    res = svc.get('getImageList', artifact_uri)
    return UU::OS::REST::ResultList.new(ImageCatalog::ImageCatalogGetImageList, ImageCatalog::ImageCatalogImageEntryAttributes, res)
  end
end