Module: UU::OS::MetaModel Deprecated
- Extended by:
- MetaModel
- Included in:
- MetaModel
- Defined in:
- uu_os_client-0.10.6/lib/uu/os/meta_model.rb,
uu_os_client-0.10.6/lib/uu/os/meta_model/meta_model_create.rb,
uu_os_client-0.10.6/lib/uu/os/meta_model/meta_model_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/meta_model/meta_model_get_entry_list.rb,
uu_os_client-0.10.6/lib/uu/os/meta_model/meta_model_set_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/meta_model/meta_model_entry_attributes.rb
Overview
Use AppPackage instead.
Meta Model service.
Defined Under Namespace
Classes: MetaModelAttributes, MetaModelCreate, MetaModelEntryAttributes, MetaModelGetEntryList, MetaModelSetAttributes
Constant Summary
- PATH =
Service path
'ues/core/container/UESMetaModel'
Instance Method Summary (collapse)
-
- (UU::OS::UESURI) create(location_uri, meta_model = nil)
Creates a new meta model.
-
- (Object) delete(meta_model_uri)
This command deletes the specified meta model from the system.
-
- (MetaModelAttributes) get_attributes(meta_model_uri)
This command returns attributes representing the meta model specified by the metaModelUri parameter.
-
- (UU::OS::REST::ResultList<MetaModel::MetaModelGetEntryList, MetaModel::MetaModelEntryAttributes>) get_entry_list(meta_model_uri, criteria = nil)
This command returns a list of entries (artifacts, meta artifacts, meta interfaces, containers, meta model dictionaries or shortcuts) enlisted in the specified meta model dictionary.
-
- (UU::OS::UESURI) set_attributes(meta_model_uri, meta_model = nil)
Command for setting attributes of a meta model.
Instance Method Details
- (UU::OS::UESURI) create(location_uri, meta_model = nil)
Creates a new meta model. The command creates a new meta model in a specified location. At the very least meta artifact and name must be specified in MetaModelCreate DTO. Competent role for the 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 MetaModelCreate DTO.
29 30 31 32 33 34 35 36 37 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_model.rb', line 29 def create(location_uri, = nil) svc = UU::OS::REST::RemoteClient.new(MetaModel) payload = UU::OS::MetaModel::MetaModelCreate.new().to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('create', location_uri, payload) return UU::OS::UESURI.new(res) end end |
- (Object) delete(meta_model_uri)
This command deletes the specified meta model from the system. The meta model is deleted even if it contains a locked sheet or attachment. The meta model cannot be deleted when:
the meta model is not empty
the meta model's workflow is not created
a property contains a reference to this meta model
a time sheet exists with a reference to this meta model
80 81 82 83 84 85 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_model.rb', line 80 def delete() svc = UU::OS::REST::RemoteClient.new(MetaModel) UU::OS::QoS::QoSHandler.auto_retry do svc.post('delete', ) end end |
- (MetaModelAttributes) get_attributes(meta_model_uri)
This command returns attributes representing the meta model specified by the metaModelUri parameter. The command does not change the state of the meta model in the system.
46 47 48 49 50 51 52 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_model.rb', line 46 def get_attributes() svc = UU::OS::REST::RemoteClient.new(MetaModel) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getAttributes', ) return MetaModel::MetaModelAttributes.new(res) end end |
- (UU::OS::REST::ResultList<MetaModel::MetaModelGetEntryList, MetaModel::MetaModelEntryAttributes>) get_entry_list(meta_model_uri, criteria = nil)
This command returns a list of entries (artifacts, meta artifacts, meta interfaces, containers, meta model dictionaries or shortcuts) enlisted in the specified meta model dictionary. Command does not return all entries, only a sublist. The list of returned entries could be filtered by the name, code or entityTypeUri 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.
103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_model.rb', line 103 def get_entry_list(, criteria = nil) svc = UU::OS::REST::RemoteClient.new(MetaModel) dto = MetaModel::MetaModelGetEntryList.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', ) return UU::OS::REST::ResultList.new(MetaModel::MetaModelGetEntryList, MetaModel::MetaModelEntryAttributes, res) end end |
- (UU::OS::UESURI) set_attributes(meta_model_uri, meta_model = nil)
Command for setting attributes of a meta model. The command can't modify references to objects like location, competent role and so on.
61 62 63 64 65 66 67 68 69 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_model.rb', line 61 def set_attributes(, = nil) svc = UU::OS::REST::RemoteClient.new(MetaModel) payload = UU::OS::MetaModel::MetaModelSetAttributes.new().to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('setAttributes', , payload) return UU::OS::UESURI.new(res) end end |