|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.core.portal.PortalQueryParams
public class 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 Class Summary | |
---|---|
static class |
PortalQueryParams.PortalQuerySortOrder
Describes whether the query result order returns in ascending or descending order. |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Map<String,String> |
generateRequestParams()
Generate request params. |
Map<String,String> |
generateRequestParams(String orgId,
boolean isPre162)
Generate request params for restricted search using the org id. |
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 |
setQueryForItemsInGroup(String groupId)
Sets a query on the portalQueryParams that will find items in a specified group. |
PortalQueryParams |
setQueryForItemWithId(String itemId)
Sets a query on the portalQueryParams that will find an item with a specified itemId. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PortalQueryParams()
public PortalQueryParams(String query)
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:mygroupnamepublic PortalQueryParams(String query, int limit)
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:mygroupnamelimit
- - the limit is 10 if not set by the userMethod Detail |
---|
public PortalQueryParams withNextStart(int nextStart)
nextStart
- the next start
public PortalQueryParams setQueryForItemsInGroup(String groupId)
groupId
- - this is the id of the group for which the user needs to find items
public PortalQueryParams setQueryForGroups(String username, String title)
username
- - username of the grouptitle
- - title of the group
public PortalQueryParams setQuery(PortalItemType type, String groupId, String searchQuery)
type
- The item type - can be nullgroupId
- The group's ID - can be nullsearchQuery
- The string to search for - can be null
public PortalQueryParams setQueryForItemWithId(String itemId)
itemId
- - item id of the item.
public Map<String,String> generateRequestParams()
public Map<String,String> generateRequestParams(String orgId, boolean isPre162)
orgId
- set null for no restriction.isPre162
- the is pre162
public String getQuery()
public PortalQueryParams setQuery(String query)
query
- - string for searching the portal for groups, e.g. OWNER:user AND TITLE:username
public String getSortField()
setSortField(String)
public PortalQueryParams setSortField(String sortField)
sortField
- - the results returned are sorted by the field provided.
public PortalQueryParams.PortalQuerySortOrder getSortOrder()
public PortalQueryParams setSortOrder(PortalQueryParams.PortalQuerySortOrder sortOrder)
sortOrder
- - the results returned are in the order specified.
public int getStartIndex()
public PortalQueryParams setStartIndex(int startIndex)
startIndex
- the start index
public int getLimit()
public PortalQueryParams setLimit(int limit)
limit
- - maximum number of results returned, its preset to 10 until specified otherwise.
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public boolean isCanSearchPublic()
public void setCanSearchPublic(boolean canSearchPublic)
canSearchPublic
- The canSearchPublic to set.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |