Module: UU::OS::RoleInterface
- Extended by:
- RoleInterface
- Included in:
- RoleInterface
- Defined in:
- uu_os-0.29.16/lib/uu/os/role_interface.rb,
uu_os-0.29.16/lib/uu/os/role_interface/role_interface_export.rb,
uu_os-0.29.16/lib/uu/os/role_interface/role_interface_create.rb,
uu_os-0.29.16/lib/uu/os/role_interface/role_interface_attributes.rb,
uu_os-0.29.16/lib/uu/os/role_interface/role_interface_get_role_list.rb,
uu_os-0.29.16/lib/uu/os/role_interface/role_interface_set_attributes.rb,
uu_os-0.29.16/lib/uu/os/role_interface/role_interface_get_export_data.rb,
uu_os-0.29.16/lib/uu/os/role_interface/role_interface_add_meta_artifact.rb,
uu_os-0.29.16/lib/uu/os/role_interface/role_interface_get_role_list_item.rb,
uu_os-0.29.16/lib/uu/os/role_interface/role_interface_remove_meta_artifact.rb,
uu_os-0.29.16/lib/uu/os/role_interface/role_interface_get_meta_artifact_list.rb,
uu_os-0.29.16/lib/uu/os/role_interface/role_interface_get_meta_artifact_list_item.rb
Overview
Module Role Interface.
Defined Under Namespace
Classes: RoleInterfaceAddMetaArtifact, RoleInterfaceAttributes, RoleInterfaceCreate, RoleInterfaceExport, RoleInterfaceGetExportData, RoleInterfaceGetMetaArtifactList, RoleInterfaceGetMetaArtifactListItem, RoleInterfaceGetRoleList, RoleInterfaceGetRoleListItem, RoleInterfaceRemoveMetaArtifact, RoleInterfaceSetAttributes
Constant Summary
- PATH =
Service path
'ues/core/role/UESRoleInterface'
Instance Method Summary (collapse)
-
- (Object) add_meta_artifact(role_interface_uri, role_interface = nil)
Creates new meta artifact connection to the specified role interface.
-
- (UU::OS::UESURI) create(location_uri, role_interface = nil)
Creates a new role interface.
-
- (Object) delete(role_interface_uri)
Deletes the specified role interface from the system.
-
- (UU::OS::UESURI) export(role_interface_uri)
Exports a role interface to the XML file, which is saved to the export storage.
-
- (RoleInterfaceAttributes) get_attributes(role_interface_uri)
Returns attributes representing the role interface specified by the role_interface_uri parameter.
-
- (UU::OS::REST::BinaryValue) get_export_data(role_interface_uri, role_interface = nil)
Returns a XML file generated by the export command.
-
- (UU::OS::REST::ResultList<RoleInterface::RoleInterfaceGetMetaArtifactList, RoleInterface::RoleInterfaceGetMetaArtifactListItem>) get_meta_artifact_list(role_interface_uri, criteria = nil)
Returns list of the meta artifacts that are connected to the specified role interface.
-
- (UU::OS::REST::ResultList<RoleInterface::RoleInterfaceGetRoleList, RoleInterface::RoleInterfaceGetRoleListItem>) get_role_list(role_interface_uri, criteria = nil)
Returns list of roles, which the specified role interface is connected to.
-
- (Object) remove_meta_artifact(role_interface_uri, role_interface = nil)
Removes meta artifact connection from the specified role interface.
-
- (UU::OS::UESURI) set_attributes(role_interface_uri, role_interface = nil)
Command for setting attributes of a role interface.
Instance Method Details
- (Object) add_meta_artifact(role_interface_uri, role_interface = nil)
Creates new meta artifact connection to the specified role interface.
141 142 143 144 145 146 147 148 |
# File 'uu_os-0.29.16/lib/uu/os/role_interface.rb', line 141 def (role_interface_uri, role_interface = nil) svc = UU::OS::REST::RemoteClient.new(RoleInterface) payload = UU::OS::RoleInterface::RoleInterfaceAddMetaArtifact.new(role_interface).to_json UU::OS::QoS::QoSHandler.auto_retry do svc.post('addMetaArtifact', role_interface_uri, payload) end end |
- (UU::OS::UESURI) create(location_uri, role_interface = nil)
Creates a new role interface. The command creates a new role interface in a specified meta model dictionary. At the very least meta artifact, name and code must be specified in RoleInterfaceCreate Object. Competent role for the new group 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 RoleInterfaceCreate Object.
50 51 52 53 54 55 56 57 58 |
# File 'uu_os-0.29.16/lib/uu/os/role_interface.rb', line 50 def create(location_uri, role_interface = nil) svc = UU::OS::REST::RemoteClient.new(RoleInterface) payload = UU::OS::RoleInterface::RoleInterfaceCreate.new(role_interface).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(role_interface_uri)
Deletes the specified role interface from the system. The role interface is deleted even if it contains a locked sheet or attachment. The role interface cannot be deleted if: the role interface's workflow is not created, a property contains a reference to this role interface, a time sheet exists with a reference to this role interface.
123 124 125 126 127 128 |
# File 'uu_os-0.29.16/lib/uu/os/role_interface.rb', line 123 def delete(role_interface_uri) svc = UU::OS::REST::RemoteClient.new(RoleInterface) UU::OS::QoS::QoSHandler.auto_retry do svc.post('delete', role_interface_uri) end end |
- (UU::OS::UESURI) export(role_interface_uri)
218 219 220 221 222 223 224 225 226 |
# File 'uu_os-0.29.16/lib/uu/os/role_interface.rb', line 218 def export(role_interface_uri) svc = UU::OS::REST::RemoteClient.new(RoleInterface) payload = UU::OS::RoleInterface::RoleInterfaceExport.new(nil).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('export', role_interface_uri, payload) return UU::OS::UESURI.new(res) end end |
- (RoleInterfaceAttributes) get_attributes(role_interface_uri)
Returns attributes representing the role interface specified by the role_interface_uri parameter. The command does not change the state of the role interface in the system.
71 72 73 74 75 76 77 |
# File 'uu_os-0.29.16/lib/uu/os/role_interface.rb', line 71 def get_attributes(role_interface_uri) svc = UU::OS::REST::RemoteClient.new(RoleInterface) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getAttributes', role_interface_uri) return RoleInterface::RoleInterfaceAttributes.new(res) end end |
- (UU::OS::REST::BinaryValue) get_export_data(role_interface_uri, role_interface = nil)
Returns a XML file generated by the export command.
245 246 247 248 249 250 251 252 253 254 |
# File 'uu_os-0.29.16/lib/uu/os/role_interface.rb', line 245 def get_export_data(role_interface_uri, role_interface = nil) svc = UU::OS::REST::RemoteClient.new(RoleInterface) dto = UU::OS::RoleInterface::RoleInterfaceGetExportData.new(role_interface) 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', role_interface_uri) end end |
- (UU::OS::REST::ResultList<RoleInterface::RoleInterfaceGetMetaArtifactList, RoleInterface::RoleInterfaceGetMetaArtifactListItem>) get_meta_artifact_list(role_interface_uri, criteria = nil)
Returns list of the meta artifacts that are connected to the specified role interface. Returned list does not contain any objects filtered out by executed UESQuery. The list of returned meta artifacts could be filtered by the name or code. The list is sorted by the name (and codes in case are equal). See the UES query documentation for more information.
193 194 195 196 197 198 199 200 201 202 203 |
# File 'uu_os-0.29.16/lib/uu/os/role_interface.rb', line 193 def (role_interface_uri, criteria = nil) svc = UU::OS::REST::RemoteClient.new(RoleInterface) dto = RoleInterface::RoleInterfaceGetMetaArtifactList.new(criteria) svc.add_parameter('pageIndex', dto.page_index) svc.add_parameter('pageSize', dto.page_size) svc.add_parameter('query', dto.query) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getMetaArtifactList', role_interface_uri) return UU::OS::REST::ResultList.new(RoleInterface::RoleInterfaceGetMetaArtifactList, RoleInterface::RoleInterfaceGetMetaArtifactListItem, res) end end |
- (UU::OS::REST::ResultList<RoleInterface::RoleInterfaceGetRoleList, RoleInterface::RoleInterfaceGetRoleListItem>) get_role_list(role_interface_uri, criteria = nil)
Returns list of roles, which the specified role interface is connected to.
266 267 268 269 270 271 272 273 274 275 276 |
# File 'uu_os-0.29.16/lib/uu/os/role_interface.rb', line 266 def get_role_list(role_interface_uri, criteria = nil) svc = UU::OS::REST::RemoteClient.new(RoleInterface) dto = RoleInterfaceGetRoleList.new(criteria) svc.add_parameter('pageIndex', dto.page_index) svc.add_parameter('pageSize', dto.page_size) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getRoleList', role_interface_uri) return UU::OS::REST::ResultList.new(RoleInterface::RoleInterfaceGetRoleList, RoleInterface::RoleInterfaceGetRoleListItem, res) end end |
- (Object) remove_meta_artifact(role_interface_uri, role_interface = nil)
Removes meta artifact connection from the specified role interface. Only connected meta artifacts can be disconnected from the role interface.
162 163 164 165 166 167 168 169 |
# File 'uu_os-0.29.16/lib/uu/os/role_interface.rb', line 162 def (role_interface_uri, role_interface = nil) svc = UU::OS::REST::RemoteClient.new(RoleInterface) payload = UU::OS::RoleInterface::RoleInterfaceRemoveMetaArtifact.new(role_interface).to_json UU::OS::QoS::QoSHandler.auto_retry do svc.post('removeMetaArtifact', role_interface_uri, payload) end end |
- (UU::OS::UESURI) set_attributes(role_interface_uri, role_interface = nil)
Command for setting attributes of a role interface. The command cannot modify references to objects like location, competent role and so on.
101 102 103 104 105 106 107 108 109 |
# File 'uu_os-0.29.16/lib/uu/os/role_interface.rb', line 101 def set_attributes(role_interface_uri, role_interface = nil) svc = UU::OS::REST::RemoteClient.new(RoleInterface) payload = UU::OS::RoleInterface::RoleInterfaceSetAttributes.new(role_interface).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('setAttributes', role_interface_uri, payload) return UU::OS::UESURI.new(res) end end |