Module: UU::OS::AppPackage
- Extended by:
- AppPackage
- Included in:
- AppPackage
- Defined in:
- uu_os-0.29.16/lib/uu/os/app_package/app_package_export.rb,
uu_os-0.29.16/lib/uu/os/app_package.rb,
uu_os-0.29.16/lib/uu/os/app_package/app_package_create.rb,
uu_os-0.29.16/lib/uu/os/app_package/app_package_attributes.rb,
uu_os-0.29.16/lib/uu/os/app_package/app_package_set_attributes.rb,
uu_os-0.29.16/lib/uu/os/app_package/app_package_get_entry_list.rb,
uu_os-0.29.16/lib/uu/os/app_package/app_package_get_export_data.rb,
uu_os-0.29.16/lib/uu/os/app_package/app_package_entry_attributes.rb
Overview
Module App Package.
Defined Under Namespace
Classes: AppPackageAttributes, AppPackageCreate, AppPackageEntryAttributes, AppPackageExport, AppPackageGetEntryList, AppPackageGetExportData, AppPackageSetAttributes
Constant Summary
- PATH =
Service path
'uu/os/AppPackage'
Instance Method Summary (collapse)
-
- (UU::OS::UESURI) create(location_uri, app_package = nil)
Creates a new app package.
-
- (Object) delete(app_package_uri)
Deletes the specified app package from the system.
-
- (UU::OS::UESURI) export(app_package_uri)
Exports an app package to the XML file, which is saved to the export storage.
-
- (AppPackageAttributes) get_attributes(app_package_uri)
Returns attributes representing the app package specified by the app_package_uri parameter.
-
- (UU::OS::REST::ResultList<AppPackage::AppPackageGetEntryList, AppPackage::AppPackageEntryAttributes>) get_entry_list(app_package_uri, criteria = nil)
Returns a list of entries (artifacts, meta artifacts, meta interfaces, containers, app package dictionaries or shortcuts) enlisted in the specified app package dictionary.
-
- (UU::OS::REST::BinaryValue) get_export_data(app_package_uri, app_package = nil)
Returns a XML file generated by the export command.
-
- (UU::OS::UESURI) set_attributes(app_package_uri, app_package = nil)
Command for setting attributes of an app package.
Instance Method Details
- (UU::OS::UESURI) create(location_uri, app_package = nil)
Creates a new app package. The command creates a new app package in a specified location. At the very least meta artifact and name must be specified in AppPackageCreate Object. Competent role for the app package 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 AppPackageCreate Object.
41 42 43 44 45 46 47 48 49 |
# File 'uu_os-0.29.16/lib/uu/os/app_package.rb', line 41 def create(location_uri, app_package = nil) svc = UU::OS::REST::RemoteClient.new(AppPackage) payload = UU::OS::AppPackage::AppPackageCreate.new(app_package).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(app_package_uri)
Deletes the specified app package from the system. The app package is deleted even if it contains a locked sheet or attachment. The app package cannot be deleted when:
the app package is not empty
the app package's workflow is not created
a property contains a reference to this app package
a time sheet exists with a reference to this app package
109 110 111 112 113 114 |
# File 'uu_os-0.29.16/lib/uu/os/app_package.rb', line 109 def delete(app_package_uri) svc = UU::OS::REST::RemoteClient.new(AppPackage) UU::OS::QoS::QoSHandler.auto_retry do svc.post('delete', app_package_uri) end end |
- (UU::OS::UESURI) export(app_package_uri)
160 161 162 163 164 165 166 167 168 |
# File 'uu_os-0.29.16/lib/uu/os/app_package.rb', line 160 def export(app_package_uri) svc = UU::OS::REST::RemoteClient.new(AppPackage) payload = UU::OS::AppPackage::AppPackageExport.new(nil).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('export', app_package_uri, payload) return UU::OS::UESURI.new(res) end end |
- (AppPackageAttributes) get_attributes(app_package_uri)
Returns attributes representing the app package specified by the app_package_uri parameter. The command does not change the state of the app package in the system.
62 63 64 65 66 67 68 |
# File 'uu_os-0.29.16/lib/uu/os/app_package.rb', line 62 def get_attributes(app_package_uri) svc = UU::OS::REST::RemoteClient.new(AppPackage) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getAttributes', app_package_uri) return AppPackage::AppPackageAttributes.new(res) end end |
- (UU::OS::REST::ResultList<AppPackage::AppPackageGetEntryList, AppPackage::AppPackageEntryAttributes>) get_entry_list(app_package_uri, criteria = nil)
Returns a list of entries (artifacts, meta artifacts, meta interfaces, containers, app package dictionaries or shortcuts) enlisted in the specified app package 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.
134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'uu_os-0.29.16/lib/uu/os/app_package.rb', line 134 def get_entry_list(app_package_uri, criteria = nil) svc = UU::OS::REST::RemoteClient.new(AppPackage) dto = AppPackage::AppPackageGetEntryList.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', app_package_uri) return UU::OS::REST::ResultList.new(AppPackage::AppPackageGetEntryList, AppPackage::AppPackageEntryAttributes, res) end end |
- (UU::OS::REST::BinaryValue) get_export_data(app_package_uri, app_package = nil)
Returns a XML file generated by the export command.
187 188 189 190 191 192 193 194 195 196 |
# File 'uu_os-0.29.16/lib/uu/os/app_package.rb', line 187 def get_export_data(app_package_uri, app_package = nil) svc = UU::OS::REST::RemoteClient.new(AppPackage) dto = UU::OS::AppPackage::AppPackageGetExportData.new(app_package) if dto.requested_mime_type svc.add_parameter('requestedMimeType', dto.requested_mime_type) end UU::OS::QoS::QoSHandler.auto_retry do return svc.get_binary('getExportData', app_package_uri) end end |
- (UU::OS::UESURI) set_attributes(app_package_uri, app_package = nil)
Command for setting attributes of an app package. The command can't modify references to objects like location, competent role and so on.
86 87 88 89 90 91 92 93 94 |
# File 'uu_os-0.29.16/lib/uu/os/app_package.rb', line 86 def set_attributes(app_package_uri, app_package = nil) svc = UU::OS::REST::RemoteClient.new(AppPackage) payload = UU::OS::AppPackage::AppPackageSetAttributes.new(app_package).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('setAttributes', app_package_uri, payload) return UU::OS::UESURI.new(res) end end |