Module: UU::OS::Group
- Extended by:
- Group
- Included in:
- Group
- Defined in:
- uu_os_client-0.10.6/lib/uu/os/group/group_create.rb,
uu_os_client-0.10.6/lib/uu/os/group.rb,
uu_os_client-0.10.6/lib/uu/os/group/group_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/group/group_set_attributes.rb,
uu_os_client-0.10.6/lib/uu/os/group/group_cancel_activities.rb,
uu_os_client-0.10.6/lib/uu/os/group/group_add_role_interface.rb,
uu_os_client-0.10.6/lib/uu/os/group/group_propagate_activities.rb,
uu_os_client-0.10.6/lib/uu/os/group/group_remove_role_interface.rb,
uu_os_client-0.10.6/lib/uu/os/group/group_get_role_interface_list.rb,
uu_os_client-0.10.6/lib/uu/os/group/group_get_role_interface_list_item.rb
Overview
Module Group.
Defined Under Namespace
Classes: GroupAddRoleInterface, GroupAttributes, GroupCancelActivities, GroupCreate, GroupGetRoleInterfaceList, GroupGetRoleInterfaceListItem, GroupPropagateActivities, GroupRemoveRoleInterface, GroupSetAttributes
Constant Summary
- PATH =
Service path
'ues/core/role/UESGroup'
Instance Method Summary (collapse)
-
- (Object) add_role_interface(group_role_uri, group = nil)
This command creates new role interface connection to the specifiedrole.
-
- (Object) cancel_activities(group_role_uri, group = nil)
This command cancels activities which exist due to group roles for thespecified roles.
-
- (UU::OS::UESURI) create(location_uri, group = nil)
Creates a new group role.
-
- (Object) delete(group_uri)
This command deletes the specified group role from the system.
-
- (GroupAttributes) get_attributes(group_uri)
This command returns attributes representing the group role specified bythe groupRoleUri parameter.
-
- (UU::OS::REST::ResultList<Group::GroupGetRoleInterfaceList, Group::GroupGetRoleInterfaceListItem>) get_role_interface_list(group_role_uri, criteria = nil)
Returns list of the role interfaces that are connected to the specifiedgroup role.
-
- (Object) propagate_activities(group_uri, group = nil)
This command propagates activities of the group to its casted roles orcasted groups.
-
- (Object) remove_role_interface(group_role_uri, group = nil)
The command removes role interface connection from the specified grouprole.
-
- (UU::OS::UESURI) set_attributes(group_uri, group = nil)
Command for setting attributes of a group role.
Instance Method Details
- (Object) add_role_interface(group_role_uri, group = nil)
This command creates new role interface connection to the specifiedrole. The role interface has to be in an active state and mustn't bealready connected. The role interface has to be connected to the oneof the authorized roles for this command, or the authorized role hasto be casted to the default group of meta model where the roleinterface is located.
148 149 150 151 152 153 154 155 |
# File 'uu_os_client-0.10.6/lib/uu/os/group.rb', line 148 def add_role_interface(group_role_uri, group = nil) svc = UU::OS::REST::RemoteClient.new(Group) payload = UU::OS::Group::GroupAddRoleInterface.new(group).to_json UU::OS::QoS::QoSHandler.auto_retry do svc.post('addRoleInterface', group_role_uri, payload) end end |
- (Object) cancel_activities(group_role_uri, group = nil)
This command cancels activities which exist due to group roles for thespecified roles.
131 132 133 134 135 136 137 138 |
# File 'uu_os_client-0.10.6/lib/uu/os/group.rb', line 131 def cancel_activities(group_role_uri, group = nil) svc = UU::OS::REST::RemoteClient.new(Group) payload = UU::OS::Group::GroupCancelActivities.new(group).to_json UU::OS::QoS::QoSHandler.auto_retry do svc.post('cancelActivities', group_role_uri, payload) end end |
- (UU::OS::UESURI) create(location_uri, group = nil)
Creates a new group role. The command creates a new group in a specified location. At the very least meta artifact must be specified in GroupCreate DTO. 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 GroupCreate DTO.
52 53 54 55 56 57 58 59 60 |
# File 'uu_os_client-0.10.6/lib/uu/os/group.rb', line 52 def create(location_uri, group = nil) svc = UU::OS::REST::RemoteClient.new(Group) payload = UU::OS::Group::GroupCreate.new(group).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(group_uri)
This command deletes the specified group role from the system. The group is deleted even if it contains a locked sheet or attachment. The group cannot be deleted when: the group is notin an active cast, the group's workflow is not created, a property contains a reference to this group, a time sheet exists with a reference to this group, an activity exists with this role as competent role.
103 104 105 106 107 108 |
# File 'uu_os_client-0.10.6/lib/uu/os/group.rb', line 103 def delete(group_uri) svc = UU::OS::REST::RemoteClient.new(Group) UU::OS::QoS::QoSHandler.auto_retry do svc.post('delete', group_uri) end end |
- (GroupAttributes) get_attributes(group_uri)
This command returns attributes representing the group role specified bythe groupRoleUri parameter. The command does not change the state ofthe group in the system.
69 70 71 72 73 74 75 |
# File 'uu_os_client-0.10.6/lib/uu/os/group.rb', line 69 def get_attributes(group_uri) svc = UU::OS::REST::RemoteClient.new(Group) UU::OS::QoS::QoSHandler.auto_retry do res = svc.get('getAttributes', group_uri) return Group::GroupAttributes.new(res) end end |
- (UU::OS::REST::ResultList<Group::GroupGetRoleInterfaceList, Group::GroupGetRoleInterfaceListItem>) get_role_interface_list(group_role_uri, criteria = nil)
Returns list of the role interfaces that are connected to the specifiedgroup role. The list of returned interfaces could be filtered by thename or code. Returned list does not contain any objects filteredout by executed UESQuery. The list is sorted by the name (and bycode in case are equal) of an interface by default.
184 185 186 187 188 189 190 191 192 193 194 |
# File 'uu_os_client-0.10.6/lib/uu/os/group.rb', line 184 def get_role_interface_list(group_role_uri, criteria = nil) svc = UU::OS::REST::RemoteClient.new(Group) dto = Group::GroupGetRoleInterfaceList.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('getRoleInterfaceList', group_role_uri) return UU::OS::REST::ResultList.new(Group::GroupGetRoleInterfaceList, Group::GroupGetRoleInterfaceListItem, res) end end |
- (Object) propagate_activities(group_uri, group = nil)
This command propagates activities of the group to its casted roles orcasted groups. Only the active activities are propagated, it meansthat they have a state and the state must not be final.
groupwith groupRoleUri and into which the activities will be propagated
117 118 119 120 121 122 123 124 |
# File 'uu_os_client-0.10.6/lib/uu/os/group.rb', line 117 def propagate_activities(group_uri, group = nil) svc = UU::OS::REST::RemoteClient.new(Group) payload = UU::OS::Group::GroupPropagateActivities.new(group).to_json UU::OS::QoS::QoSHandler.auto_retry do svc.post('propagateActivities', group_uri, payload) end end |
- (Object) remove_role_interface(group_role_uri, group = nil)
The command removes role interface connection from the specified grouprole. Only connected interfaces can be disconnected from the grouprole.
162 163 164 165 166 167 168 169 |
# File 'uu_os_client-0.10.6/lib/uu/os/group.rb', line 162 def remove_role_interface(group_role_uri, group = nil) svc = UU::OS::REST::RemoteClient.new(Group) payload = UU::OS::Group::GroupRemoveRoleInterface.new(group).to_json UU::OS::QoS::QoSHandler.auto_retry do svc.post('removeRoleInterface', group_role_uri, payload) end end |
- (UU::OS::UESURI) set_attributes(group_uri, group = nil)
Command for setting attributes of a group role. The command can't modifyreferences to objects like location, competent role and so on.
84 85 86 87 88 89 90 91 92 |
# File 'uu_os_client-0.10.6/lib/uu/os/group.rb', line 84 def set_attributes(group_uri, group = nil) svc = UU::OS::REST::RemoteClient.new(Group) payload = UU::OS::Group::GroupSetAttributes.new(group).to_json UU::OS::QoS::QoSHandler.auto_retry do res = svc.post('setAttributes', group_uri, payload) return UU::OS::UESURI.new(res) end end |