Module: UU::OS::RoleInterface
- Extended by:
- RoleInterface
- Included in:
- RoleInterface
- Defined in:
- uu_os_client-0.10.6/lib/uu/os/role_interface/role_interface_export.rb,
uu_os_client-0.10.6/lib/uu/os/role_interface.rb,
uu_os_client-0.10.6/lib/uu/os/role_interface/role_interface_create.rb,
uu_os_client-0.10.6/lib/uu/os/role_interface/role_interface_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/role_interface/role_interface_set_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/role_interface/role_interface_get_export_data.rb,
uu_os_client-0.10.6/lib/uu/os/role_interface/role_interface_add_meta_artifact.rb,
uu_os_client-0.10.6/lib/uu/os/role_interface/role_interface_remove_meta_artifact.rb,
uu_os_client-0.10.6/lib/uu/os/role_interface/role_interface_get_meta_artifact_list.rb,
uu_os_client-0.10.6/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, 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)
The command 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)
This command 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)
This command returns attributes representing the role interface specified by the roleInterfaceUri parameter.
-
- (UU::OS::UESURI) get_export_data(role_interface_uri, role_interface = nil)
Returns a XML file generated by the export command RoleInterface#export.
-
- (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.
-
- (Object) remove_meta_artifact(role_interface_uri, role_interface = nil)
The command 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)
The command creates new meta artifact connection to the specified role interface.
93 94 95 96 97 98 99 100 |
# File 'uu_os_client-0.10.6/lib/uu/os/role_interface.rb', line 93 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.
32 33 34 35 36 37 38 39 40 |
# File 'uu_os_client-0.10.6/lib/uu/os/role_interface.rb', line 32 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)
This command 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 when: 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.
82 83 84 85 86 87 |
# File 'uu_os_client-0.10.6/lib/uu/os/role_interface.rb', line 82 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)
Exports a role interface 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 UU::OS::REST::Future.
154 155 156 157 158 159 160 161 162 |
# File 'uu_os_client-0.10.6/lib/uu/os/role_interface.rb', line 154 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)
This command returns attributes representing the role interface specified by the roleInterfaceUri parameter. The command does not change the state of the role interface in the system.
49 50 51 52 53 54 55 |
# File 'uu_os_client-0.10.6/lib/uu/os/role_interface.rb', line 49 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::UESURI) get_export_data(role_interface_uri, role_interface = nil)
Returns a XML file generated by the export command RoleInterface#export.
181 182 183 184 185 186 187 188 189 190 191 |
# File 'uu_os_client-0.10.6/lib/uu/os/role_interface.rb', line 181 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 res = svc.get('getExportData', role_interface_uri) return UU::OS::REST::BinaryValue.new(res, true) 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.
129 130 131 132 133 134 135 136 137 138 139 |
# File 'uu_os_client-0.10.6/lib/uu/os/role_interface.rb', line 129 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 |
- (Object) remove_meta_artifact(role_interface_uri, role_interface = nil)
The command removes meta artifact connection from the specified role interface. Only connected meta artifacts can be disconnected from the role interface.
107 108 109 110 111 112 113 114 |
# File 'uu_os_client-0.10.6/lib/uu/os/role_interface.rb', line 107 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 can'tmodify references to objects like location, competent role and soon.
64 65 66 67 68 69 70 71 72 |
# File 'uu_os_client-0.10.6/lib/uu/os/role_interface.rb', line 64 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 |