Module: UU::OS::AppMetaModel

Extended by:
AppMetaModel
Included in:
AppMetaModel
Defined in:
uu_os_client-0.10.6/lib/uu/os/app_meta_model.rb,
uu_os_client-0.10.6/lib/uu/os/app_meta_model/app_meta_model_create.rb,
uu_os_client-0.10.6/lib/uu/os/app_meta_model/app_meta_model_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/app_meta_model/app_meta_model_set_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/app_meta_model/app_meta_model_get_entry_list.rb,
uu_os_client-0.10.6/lib/uu/os/app_meta_model/app_meta_model_entry_attributes.rb

Defined Under Namespace

Classes: AppMetaModelAttributes, AppMetaModelCreate, AppMetaModelEntryAttributes, AppMetaModelGetEntryList, AppMetaModelSetAttributes

Constant Summary

PATH =

Service path

'uu/os/AppMetaModel'

Instance Method Summary (collapse)

Instance Method Details

- (UU::OS::UESURI) create(app_meta_model_uri, app_meta_model = nil)

Creates a new app meta model. The command creates a new app meta model in a specified location. At the very least meta artifact must be specified in AppMetaModelCreate DTO. Competent role for the app meta model 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 AppMetaModelCreate DTO.

Parameters:

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

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

  • app_meta_model (AppMetaModelCreate) (defaults to: nil)

    DTO containing attributes of the new app meta model

Returns:



29
30
31
32
33
34
35
36
37
# File 'uu_os_client-0.10.6/lib/uu/os/app_meta_model.rb', line 29

def create(app_meta_model_uri, app_meta_model = nil)
  svc = UU::OS::REST::RemoteClient.new(AppMetaModel)
  payload = UU::OS::AppMetaModel::AppMetaModelCreate.new(app_meta_model).to_json

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

- (AppMetaModelAttributes) get_attributes(app_meta_model_uri)

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

Parameters:

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

    UESURI of an app meta model whose attributes are returned

Returns:



45
46
47
48
49
50
51
# File 'uu_os_client-0.10.6/lib/uu/os/app_meta_model.rb', line 45

def get_attributes(app_meta_model_uri)
  svc = UU::OS::REST::RemoteClient.new(AppMetaModel)
  UU::OS::QoS::QoSHandler.auto_retry do
    res = svc.get('getAttributes', app_meta_model_uri)
    return AppMetaModel::AppMetaModelAttributes.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 meta model. Only entries listed exactly in the specified app meta models are considered (so subordinate app meta models 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 meta model from where entries (artifacts or shortcuts) are listed.

  • criteria (AppMetaModelGetEntryList) (defaults to: nil)

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

Returns:

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



83
84
85
86
87
88
89
90
91
92
93
94
# File 'uu_os_client-0.10.6/lib/uu/os/app_meta_model.rb', line 83

def get_entry_list(organizational_unit_uri, criteria = nil)
  svc = UU::OS::REST::RemoteClient.new(AppMetaModel)
  dto = AppMetaModel::AppMetaModelGetEntryList.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(AppMetaModel::AppMetaModelGetEntryList, AppMetaModel::AppMetaModelEntryAttributes, res)
  end
end

- (UU::OS::UESURI) set_attributes(app_meta_model_uri, app_meta_model = nil)

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

Parameters:

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

    UESURI of the app meta model whose attributes are to be changed

  • app_meta_model (AppMetaModelSetAttributes) (defaults to: nil)

    DTO containing new attributes the app meta model

Returns:



60
61
62
63
64
65
66
67
68
# File 'uu_os_client-0.10.6/lib/uu/os/app_meta_model.rb', line 60

def set_attributes(app_meta_model_uri, app_meta_model = nil)
  svc = UU::OS::REST::RemoteClient.new(AppMetaModel)
  payload = UU::OS::AppMetaModel::AppMetaModelSetAttributes.new(app_meta_model).to_json

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