java.lang.Object | |
↳ | com.esri.core.portal.PortalQueryParams |
Creates query parameters suitable for finding content contained in a Portal. The query can contain multiple parameters that help to limit the content returned back by the Portal such as sort order, sort field, starting index, etc.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | PortalQueryParams.PortalQuerySortOrder | Describes whether the query result order returns in ascending or descending order. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PortalQueryParams()
Creates a PortalQueryParams with default settings.
| |||||||||||
PortalQueryParams(String query)
Creates a PortalQueryParams with default settings.
| |||||||||||
PortalQueryParams(String query, int limit)
Creates a PortalQueryParams with default settings.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
equals(Object obj)
| ||||||||||
Map<String, String> |
generateRequestParams(String orgId, boolean isPre162)
Generate request params for restricted search using the org id.
| ||||||||||
Map<String, String> |
generateRequestParams()
Generate request params.
| ||||||||||
int |
getLimit()
Returns the maximum number of results to be included in the result set response.
| ||||||||||
String |
getQuery()
Retruns the query string to search against.
| ||||||||||
String |
getSortField()
Returns the field to sort the results by.
| ||||||||||
PortalQueryParams.PortalQuerySortOrder |
getSortOrder()
Returns whether the order of results are returned in ascending or descending order.
| ||||||||||
int |
getStartIndex()
Returns the number of the first entry in the result set response.
| ||||||||||
int |
hashCode()
| ||||||||||
boolean |
isCanSearchPublic()
Sets to false for restricted search.
| ||||||||||
void |
setCanSearchPublic(boolean canSearchPublic)
Sets to false for restricted search.
| ||||||||||
PortalQueryParams |
setLimit(int limit)
Sets the maximum number of results to be included in the result set response.
| ||||||||||
PortalQueryParams |
setQuery(PortalItemType type, String groupId, String searchQuery)
Sets a query on the portalQueryParams that will (optionally) find items of a given type that are in a specific
group with a specific search string.
| ||||||||||
PortalQueryParams |
setQuery(String query)
Sets the query string to search against.
| ||||||||||
PortalQueryParams |
setQueryForGroups(String username, String title)
Sets a query on the portalQueryParams that will find groups with a specified owner and title.
| ||||||||||
PortalQueryParams |
setQueryForItemWithId(String itemId)
Sets a query on the portalQueryParams that will find an item with a specified itemId.
| ||||||||||
PortalQueryParams |
setQueryForItemsInGroup(String groupId)
Sets a query on the portalQueryParams that will find items in a specified group.
| ||||||||||
PortalQueryParams |
setSortField(String sortField)
Set the field to sort the results by.
| ||||||||||
PortalQueryParams |
setSortOrder(PortalQueryParams.PortalQuerySortOrder sortOrder)
Sets whether the order of results are returned in ascending or descending order.
| ||||||||||
PortalQueryParams |
setStartIndex(int startIndex)
Set the number of the first entry in the result set response.
| ||||||||||
String |
toString()
| ||||||||||
PortalQueryParams |
withNextStart(int nextStart)
Returns a new copy of the PortalQueryParams with the startIndex field being set to the nextStart parameter.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Creates a PortalQueryParams with default settings. Start Index will be 1, Limit will be 10, and Sort Order will be descending. The query will be null until one is set.
Creates a PortalQueryParams with default settings. This is the same as PortalQueryParams()
, with the
addition of the query being set.
query | - this is a string query passed in by the user format such as OWNER:username AND title:mygroupname |
---|
Creates a PortalQueryParams with default settings. This is the same as PortalQueryParams()
, with the
addition of the query and limit being set.
query | - this is a string query passed in by the user format such as OWNER:username AND title:mygroupname |
---|---|
limit | - the limit is 10 if not set by the user |
Generate request params for restricted search using the org id.
orgId | set null for no restriction. |
---|---|
isPre162 | the is pre162 |
Generate request params.
Returns the maximum number of results to be included in the result set response.
Retruns the query string to search against.
Returns the field to sort the results by.
Returns whether the order of results are returned in ascending or descending order.
Returns the number of the first entry in the result set response. The index number is 1-based.
Sets to false for restricted search.
Sets to false for restricted search.
canSearchPublic | The canSearchPublic to set. |
---|
Sets the maximum number of results to be included in the result set response.
limit | - maximum number of results returned, its preset to 10 until specified otherwise. |
---|
Sets a query on the portalQueryParams that will (optionally) find items of a given type that are in a specific
group with a specific search string.
Any of the parameters may be null, and the query will only be set for the non-null parameters. If all are set, the
query will search for items that match the type AND are in the group AND match the search string. If none are set,
a generic search will be performed.
type | The item type - can be null |
---|---|
groupId | The group's ID - can be null |
searchQuery | The string to search for - can be null |
Sets the query string to search against.
query | - string for searching the portal for groups, e.g. OWNER:user AND TITLE:username |
---|
Sets a query on the portalQueryParams that will find groups with a specified owner and title.
Either username or title may be null, and the query will only be set for the non-null parameter. If both are set,
the query will search for items that are owned by the username AND that match the specified title.
username | - username of the group |
---|---|
title | - title of the group |
Sets a query on the portalQueryParams that will find an item with a specified itemId. Its a convenience method provided in the case where the user already has a portal and groups. Knows the item id and is ready to use it.
itemId | - item id of the item. |
---|
Sets a query on the portalQueryParams that will find items in a specified group.
groupId | - this is the id of the group for which the user needs to find items |
---|
Set the field to sort the results by. You can also sort by multiple fields for an item, comma seperated. The currently allowed field names are title, uploaded, type, owner, avgRating, numRatings, numComments and numViews.
sortField | - the results returned are sorted by the field provided. |
---|
Sets whether the order of results are returned in ascending or descending order.
sortOrder | - the results returned are in the order specified. |
---|
Set the number of the first entry in the result set response. The index number is 1-based.
startIndex | the start index |
---|
Returns a new copy of the PortalQueryParams with the startIndex field being set to the nextStart parameter.
nextStart | the next start |
---|