Module: UU::ADK::App Deprecated

Extended by:
App
Included in:
App
Defined in:
uu_adk-0.28.16/lib/uu/adk/app.rb,
uu_adk-0.28.16/lib/uu/adk/app/app_create.rb,
uu_adk-0.28.16/lib/uu/adk/app/app_attributes.rb,
uu_adk-0.28.16/lib/uu/adk/app/app_set_attributes.rb,
uu_adk-0.28.16/lib/uu/adk/app/app_get_entry_list.rb,
uu_adk-0.28.16/lib/uu/adk/app/app_entry_attributes.rb

Overview

Deprecated.

Use OS::AppMetaModel instead.

App service.

Defined Under Namespace

Classes: AppAttributes, AppCreate, AppEntryAttributes, AppGetEntryList, AppSetAttributes

Constant Summary

PATH =

Service path

'uu/adk/App'

Instance Method Summary (collapse)

Instance Method Details

- (UU::OS::UESURI) create(app_uri, app = nil)

Creates a new app . The command creates a new app in a specified location. At the very least meta artifact must be specified in AppCreate DTO. Competent role for the app will be selected as the most suitable according to specified container and meta artifact (executive/authorized role with connected interface), or can be also specified in AppCreate DTO.

Parameters:

  • app_uri (String, UU::OS::UESURI)

    UESURI of the folder/org. unit/meta model where app will be created.

  • app (AppCreate) (defaults to: nil)

    DTO containing attributes of the new app

Returns:



31
32
33
34
35
36
37
38
39
# File 'uu_adk-0.28.16/lib/uu/adk/app.rb', line 31

def create(app_uri, app = nil)
  svc = UU::OS::REST::RemoteClient.new(App)
  payload = UU::ADK::App::AppCreate.new(app).to_json

  UU::OS::QoS::QoSHandler.auto_retry do
    res = svc.post('create', app_uri, payload)
    return UU::OS::UESURI.new(res)
  end
end

- (AppAttributes) get_attributes(app_uri)

This command returns attributes representing the app specified by the app_uri parameter. The command does not change the state of the app in the system.

Parameters:

  • app_uri (String, UU::OS::UESURI)

    UESURI of an app whose attributes are returned

Returns:



47
48
49
50
51
52
53
# File 'uu_adk-0.28.16/lib/uu/adk/app.rb', line 47

def get_attributes(app_uri)
  svc = UU::OS::REST::RemoteClient.new(App)
  UU::OS::QoS::QoSHandler.auto_retry do
    res = svc.get('getAttributes', app_uri)
    return App::AppAttributes.new(res)
  end
end

- (Object) get_entry_list(organizational_unit_uri, criteria = nil)

This command returns a list of entries (artifacts or shortcuts) enlisted in the specified app . Only entries listed exactly in the specified app s are considered (so subordinate apps are not considered). The command does not return all entries, only a sublist. The list of returned entries could be filtered by the name, code or type of an entry. The list is sorted by the name (and codes in case are equal) of a entry by default, or it can be sorted arbitrarily by any of entry attributes usable for the filtering or these attributes combinations. See the UES query documentation for more information.

name}, code and type

See UESQuery Documentation.

Parameters:

  • organizational_unit_uri (String, UU::OS::UESURI)

    UESURI of the app from where entries (artifacts or shortcuts) are listed.

  • criteria (AppGetEntryList) (defaults to: nil)

    DTO containing criteria for listing entries Available parameters are: {AppEntryAttributes#name

Returns:

  • List of DTO representing entries of the app (artifacts or shortcuts).



85
86
87
88
89
90
91
92
93
94
95
96
# File 'uu_adk-0.28.16/lib/uu/adk/app.rb', line 85

def get_entry_list(organizational_unit_uri, criteria = nil)
  svc = UU::OS::REST::RemoteClient.new(App)
  dto = App::AppGetEntryList.new(criteria)
  svc.add_parameter('pageIndex', dto.page_index)
  svc.add_parameter('pageSize', dto.page_size)
  svc.add_parameter('query', dto.query)
  svc.add_parameter('recursive', dto.recursive)
  UU::OS::QoS::QoSHandler.auto_retry do
    res = svc.get('getEntryList', organizational_unit_uri)
    return UU::OS::REST::ResultList.new(App::AppGetEntryList, App::AppEntryAttributes, res)
  end
end

- (UU::OS::UESURI) set_attributes(app_uri, app = nil)

Command for setting attributes of an app . The command can't modify references to objects like location, competent role and so on.

Parameters:

  • app_uri (String, UU::OS::UESURI)

    UESURI of the app whose attributes are to be changed

  • app (AppSetAttributes) (defaults to: nil)

    DTO containing new attributes the app

Returns:



62
63
64
65
66
67
68
69
70
# File 'uu_adk-0.28.16/lib/uu/adk/app.rb', line 62

def set_attributes(app_uri, app = nil)
  svc = UU::OS::REST::RemoteClient.new(App)
  payload = UU::ADK::App::AppSetAttributes.new(app).to_json

  UU::OS::QoS::QoSHandler.auto_retry do
    res = svc.post('setAttributes', app_uri, payload)
    return UU::OS::UESURI.new(res)
  end
end