Module: UU::OS::MetaArtifact
- Extended by:
- MetaArtifact
- Included in:
- MetaArtifact
- Defined in:
- uu_os_client-0.10.6/lib/uu/os/meta_artifact.rb,
uu_os_client-0.10.6/lib/uu/os/meta_artifact/meta_artifact_copy.rb,
uu_os_client-0.10.6/lib/uu/os/meta_artifact/meta_artifact_export.rb,
uu_os_client-0.10.6/lib/uu/os/meta_artifact/meta_artifact_create.rb,
uu_os_client-0.10.6/lib/uu/os/meta_artifact/meta_artifact_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/meta_artifact/meta_artifact_set_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/meta_artifact/meta_artifact_get_export_data.rb,
uu_os_client-0.10.6/lib/uu/os/meta_artifact/meta_artifact_presentation_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/meta_artifact/meta_artifact_set_presentation_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/meta_artifact/meta_artifact_default_presentation_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/meta_artifact/meta_artifact_set_default_presentation_attributes.rb
Overview
Module Meta Artifact.
Defined Under Namespace
Classes: MetaArtifactAttributes, MetaArtifactCopy, MetaArtifactCreate, MetaArtifactDefaultPresentationAttributes, MetaArtifactExport, MetaArtifactGetExportData, MetaArtifactPresentationAttributes, MetaArtifactSetAttributes, MetaArtifactSetDefaultPresentationAttributes, MetaArtifactSetPresentationAttributes
Constant Summary
- PATH =
Service path
'ues/core/artifact/UESMetaArtifact'
Instance Method Summary (collapse)
-
- (UU::OS::UESURI) copy(source_meta_artifact_uri, meta_artifact = nil)
Copy a meta artifact.
-
- (UU::OS::UESURI) create(location_uri, meta_artifact = nil)
deprecated
Deprecated.
The uuCommand MetaArtifact.create is used for creating meta artifact from the XML file temporarily. This feature will be removed in a future version and replaced by the specific uuCommands for creating template objects.
-
- (UU::OS::UESURI) export(meta_artifact_uri)
The uuCommand exports a meta artifact to the XML file, which is saved to the export storage.
-
- (UU::OS::MetaArtifact::MetaArtifactAttributes) get_attributes(meta_artifact_uri)
This command returns attributes representing the meta artifact specified by the metaArtifactUri parameter.
-
- (UU::OS::MetaArtifact::MetaArtifactDefaultPresentationAttributes) get_default_presentation_attributes(meta_artifact_uri)
Retrieves an artifact presentation template.
-
- (UU::OS::UESURI) get_export_data(meta_artifact_uri, meta_artifact = nil)
The uuCommand returns a XML file generated by the export command.
-
- (UU::OS::MetaArtifact::MetaArtifactPresentationAttributes) get_presentation_attributes(meta_artifact_uri)
This command gets an meta artifact presentation settings.
-
- (UU::OS::UESURI) set_attributes(meta_artifact_uri, meta_artifact = nil)
Command for setting attributes of a meta artifact.
-
- (UU::OS::UESURI) set_default_presentation_attributes(meta_artifact_uri, presentation_attributes = nil)
Configures an artifact presentation template.
-
- (UU::OS::UESURI) set_presentation_attributes(meta_artifact_uri, presentation_attributes = nil)
Configures meta artifact presentation settings.
Instance Method Details
- (UU::OS::UESURI) copy(source_meta_artifact_uri, meta_artifact = nil)
Copy a meta artifact. The command creates a new meta artifact according to specified source meta artifact in a specified location in the same territory as source meta artifact. At the very least location and name must be specified in MetaArtifactCopy DTO. Only basic meta artifact types can be copied by this command (no meta role, meta group, etc.). Competent role for the new meta artifact copy 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 MetaArtifactCopy DTO.
72 73 74 75 76 77 78 79 80 81 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_artifact.rb', line 72 def copy(, = nil) svc = UU::OS::REST::RemoteClient.new(MetaArtifact) svc.timeout = 120 # may take longer than default 60 seconds payload = UU::OS::MetaArtifact::MetaArtifactCopy.new().to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('copy', , payload) return UU::OS::UESURI.new(res) end end |
- (UU::OS::UESURI) create(location_uri, meta_artifact = nil)
The uuCommand MetaArtifact.create is used for creating meta artifact from the XML file temporarily. This feature will be removed in a future version and replaced by the specific uuCommands for creating template objects.
The uuCommand creates a meta artifact from an exported XML file in the specified location. Source meta artifact must be derived (at least indirectly) from a meta artifact which is a part of UU.OS uuApp.
150 151 152 153 154 155 156 157 158 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_artifact.rb', line 150 def create(location_uri, = nil) svc = UU::OS::REST::RemoteClient.new(MetaArtifact) payload = UU::OS::MetaArtifact::MetaArtifactCreate.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 |
- (UU::OS::UESURI) export(meta_artifact_uri)
The uuCommand exports a meta artifact to the XML file, which is saved to
the export storage. The export is an asynchronous process.
It is
possible to wait for the end of the process. More information in
Env::Process and in REST::Future.
To get exported
data from the storage use #get_export_data.
100 101 102 103 104 105 106 107 108 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_artifact.rb', line 100 def export() svc = UU::OS::REST::RemoteClient.new(MetaArtifact) payload = UU::OS::MetaArtifact::MetaArtifactExport.new(nil).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('export', , payload) return UU::OS::UESURI.new(res) end end |
- (UU::OS::MetaArtifact::MetaArtifactAttributes) get_attributes(meta_artifact_uri)
This command returns attributes representing the meta artifact specified by the metaArtifactUri parameter. Only basic meta artifact types attributes can be returned by this command (no meta role, meta group, etc.). The command does not change the state of the meta artifact in the system.
34 35 36 37 38 39 40 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_artifact.rb', line 34 def get_attributes() svc = UU::OS::REST::RemoteClient.new(MetaArtifact) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getAttributes', ) return MetaArtifact::MetaArtifactAttributes.new(res) end end |
- (UU::OS::MetaArtifact::MetaArtifactDefaultPresentationAttributes) get_default_presentation_attributes(meta_artifact_uri)
Retrieves an artifact presentation template. Artifact presentation template consist of width, header visibility, toolbar visibility, and context menu visibility. All of these attributes control default presentation of an artifact created with this meta artifact. When viewing an artifact, presentation settings are looked up in the following order: User settings, artifact presentation settings, meta artifact template presentation settings, and layout artifact, if it is configured, or default system settings otherwise. Attribute lockSettings on the DTO can make user settings and artifact presentation settings to be ignored.
229 230 231 232 233 234 235 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_artifact.rb', line 229 def get_default_presentation_attributes() svc = UU::OS::REST::RemoteClient.new(MetaArtifact) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getDefaultPresentationAttributes', ) return MetaArtifact::MetaArtifactDefaultPresentationAttributes.new(res) end end |
- (UU::OS::UESURI) get_export_data(meta_artifact_uri, meta_artifact = nil)
The uuCommand returns a XML file generated by the export command.
177 178 179 180 181 182 183 184 185 186 187 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_artifact.rb', line 177 def get_export_data(, = nil) svc = UU::OS::REST::RemoteClient.new(MetaArtifact) dto = UU::OS::MetaArtifact::MetaArtifactGetExportData.new() if dto.requested_mime_type svc.add_parameter('requestedMimeType', dto.requested_mime_type) end UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getExportData', ) return UU::OS::REST::BinaryValue.new(res, true) end end |
- (UU::OS::MetaArtifact::MetaArtifactPresentationAttributes) get_presentation_attributes(meta_artifact_uri)
This command gets an meta artifact presentation settings. Meta artifact presentation settings consists of width, layout artifact UESURI, header visibility, toolbar visibility or context menu visibility. All of this attributes control presentation of meta artifact. For default setting of this attributes will be meta artifact presentation resolved by algorithm looking for setting on user setting than on artifact presentation setting than on meta artifact template presentation setting then on layout artifact if is configured end if not is used system default setting.
264 265 266 267 268 269 270 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_artifact.rb', line 264 def get_presentation_attributes() svc = UU::OS::REST::RemoteClient.new(MetaArtifact) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getPresentationAttributes', ) return MetaArtifact::MetaArtifactPresentationAttributes.new(res) end end |
- (UU::OS::UESURI) set_attributes(meta_artifact_uri, meta_artifact = nil)
Command for setting attributes of a meta artifact. The command can't modify references to objects like location, competent role and so on.
49 50 51 52 53 54 55 56 57 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_artifact.rb', line 49 def set_attributes(, = nil) svc = UU::OS::REST::RemoteClient.new(MetaArtifact) payload = UU::OS::MetaArtifact::MetaArtifactSetAttributes.new().to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('setAttributes', , payload) return UU::OS::UESURI.new(res) end end |
- (UU::OS::UESURI) set_default_presentation_attributes(meta_artifact_uri, presentation_attributes = nil)
Configures an artifact presentation template. Artifact presentation template consist of width, header visibility, toolbar visibility, and context menu visibility. All of these attributes control default presentation of an artifact created with this meta artifact. When viewing an artifact, presentation settings are looked up in the following order: User settings, artifact presentation settings, meta artifact template presentation settings, and layout artifact, if it is configured, or default system settings otherwise. Attribute lockSettings on the DTO can make user settings and artifact presentation settings to be ignored.
206 207 208 209 210 211 212 213 214 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_artifact.rb', line 206 def set_default_presentation_attributes(, presentation_attributes = nil) svc = UU::OS::REST::RemoteClient.new(MetaArtifact) payload = UU::OS::MetaArtifact::MetaArtifactSetDefaultPresentationAttributes.new(presentation_attributes).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('setDefaultPresentationAttributes', , payload) return UU::OS::UESURI.new(res) end end |
- (UU::OS::UESURI) set_presentation_attributes(meta_artifact_uri, presentation_attributes = nil)
Configures meta artifact presentation settings. Meta artifact presentation settings consist of width, layout artifact UESURI, header visibility, toolbar visibility, and context menu visibility. All of these attributes control presentation of the meta artifact. When viewing a meta artifact, presentation settings are looked up in the following order: User settings, meta artifact presentation settings, meta artifact template presentation settings, and layout artifact, if it is configured, or default system settings otherwise.
246 247 248 249 250 251 252 253 254 |
# File 'uu_os_client-0.10.6/lib/uu/os/meta_artifact.rb', line 246 def set_presentation_attributes(, presentation_attributes = nil) svc = UU::OS::REST::RemoteClient.new(MetaArtifact) payload = UU::OS::MetaArtifact::MetaArtifactSetPresentationAttributes.new(presentation_attributes).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('setPresentationAttributes', , payload) return UU::OS::UESURI.new(res) end end |