Module: UU::OS::RoleSearch
- Extended by:
- RoleSearch
- Included in:
- RoleSearch
- Defined in:
- uu_os-0.29.16/lib/uu/os/role_search.rb,
uu_os-0.29.16/lib/uu/os/role_search/role_search_query.rb,
uu_os-0.29.16/lib/uu/os/role_search/role_search_result_item.rb
Defined Under Namespace
Classes: RoleSearchQuery, RoleSearchResultItem
Constant Summary
- PATH =
Service path
'ues/core/role/UESRoleSearch'
Instance Method Summary (collapse)
-
- (UU::OS::REST::ResultList<RoleSearch::RoleSearchQuery, RoleSearch::RoleSearchResultItem>) query(location_uri, criteria)
Performs a search for roles with specified criteria.
Instance Method Details
- (UU::OS::REST::ResultList<RoleSearch::RoleSearchQuery, RoleSearch::RoleSearchResultItem>) query(location_uri, criteria)
Performs a search for roles with specified criteria. The search is performed in the location according to the aLocationUri, although it can be widened by using includeSystemArea flag in the search criteria.
Search query contains several search settings - query (what to search, and order settings) and paging settings.
**Recommended usage**
-
if location_uri is an organizational unit, use deepest organizational unit in the structure, so that the result set is restricted as much as possible. If the OU (its nesting level) is near the top of the territory, it might be better for performance to use the territory instead (if possible) - try measuring times in your case and decide based on that.
name, code and stateType : ArtifactStateType.
39 40 41 42 43 44 45 46 47 48 49 |
# File 'uu_os-0.29.16/lib/uu/os/role_search.rb', line 39 def query(location_uri, criteria) svc = UU::OS::REST::RemoteClient.new(RoleSearch) dto = RoleSearch::RoleSearchQuery.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('query', location_uri) return UU::OS::REST::ResultList.new(RoleSearch::RoleSearchQuery, RoleSearch::RoleSearchResultItem, res) end end |