com.splunk
Class CollectionArgs

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<java.lang.String,java.lang.Object>
              extended by com.splunk.Args
                  extended by com.splunk.CollectionArgs
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>
Direct Known Subclasses:
IndexCollectionArgs, SavedSearchCollectionArgs

public class CollectionArgs
extends Args

The CollectionArgs class contains arguments for retrieving and listing entities from a collection, such as the number of entities to return and how to sort them.

See Also:
Serialized Form

Nested Class Summary
static class CollectionArgs.SortDirection
          Indicates whether to sort entries in ascending or descending order.
static class CollectionArgs.SortMode
          Indicates the sorting mode for entries.
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
CollectionArgs()
          Class constructor.
 
Method Summary
 void setApp(java.lang.String app)
          Sets the app context in which to list the collection.
 void setCount(int count)
          Sets the maximum number of entries to return.
 void setOffset(int offset)
          Sets the index of the first entry to return.
 void setOwner(java.lang.String owner)
          Sets the owner context in which to list the collection.
 void setSearch(java.lang.String search)
          Sets a search query to filter the response.
 void setSharing(java.lang.String sharing)
          Sets the sharing context in which to list the collection.
 void setSortDirection(CollectionArgs.SortDirection sortDirection)
          Sets the direction to sort entries.
 void setSortKey(java.lang.String sortKey)
          Sets the field to use for sorting.
 void setSortMode(CollectionArgs.SortMode sortMode)
          Sets the mode to use for sorting.
 
Methods inherited from class com.splunk.Args
add, create, create, create, encode, encode, encode, get
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get, removeEldestEntry
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

CollectionArgs

public CollectionArgs()
Class constructor.

Method Detail

setApp

public void setApp(java.lang.String app)
Sets the app context in which to list the collection.

Parameters:
app - The app context in which to list the collection. A null value indicates no app context, and a value of "-" indicates an app wildcard.

setOwner

public void setOwner(java.lang.String owner)
Sets the owner context in which to list the collection.

Parameters:
owner - The owner context in which to list the collection. A value of "-" indicates a wildcard, and a null value indicates no owner context.

setSharing

public void setSharing(java.lang.String sharing)
Sets the sharing context in which to list the collection.

Parameters:
sharing - The sharing context in which to list the collection. Valid values are "user", "app", "global", and "system".

setCount

public void setCount(int count)
Sets the maximum number of entries to return.

Parameters:
count - The maximum number of entries to return. To return all entries, specify 0.

setOffset

public void setOffset(int offset)
Sets the index of the first entry to return.

Parameters:
offset - The index of the first entry to return.

setSearch

public void setSearch(java.lang.String search)
Sets a search query to filter the response. The response matches field values against the search query. For example, "foo" matches any object that has "foo" as a substring in a field, and "field_name=field_value" restricts the match to a single field.

Parameters:
search - A search query to filter the response.

setSortDirection

public void setSortDirection(CollectionArgs.SortDirection sortDirection)
Sets the direction to sort entries.

Parameters:
sortDirection - The sorting order--ascending or descending.

setSortKey

public void setSortKey(java.lang.String sortKey)
Sets the field to use for sorting.

Parameters:
sortKey - The field to sort by.

setSortMode

public void setSortMode(CollectionArgs.SortMode sortMode)
Sets the mode to use for sorting.

Parameters:
sortMode - The collating sequence for sorting entries.