com.splunk
Class EntityCollection<T extends Entity>

java.lang.Object
  extended by com.splunk.Resource
      extended by com.splunk.ResourceCollection<T>
          extended by com.splunk.EntityCollection<T>
Type Parameters:
T - The type of members in the collection.
All Implemented Interfaces:
java.util.Map<java.lang.String,T>
Direct Known Subclasses:
EventTypeCollection, InputCollection, JobCollection, LicensePoolCollection, MessageCollection, PasswordCollection, SavedSearchCollection, UserCollection

public class EntityCollection<T extends Entity>
extends ResourceCollection<T>

The EntityCollection class represents a collection of entities.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class com.splunk.ResourceCollection
itemClass, items
 
Fields inherited from class com.splunk.Resource
actions, path, service, title
 
Constructor Summary
EntityCollection(Service service, java.lang.String path, java.lang.Class itemClass)
          Class constructor.
 
Method Summary
 T create(java.lang.String name)
          Creates an entity in this collection.
 T create(java.lang.String name, java.util.Map args)
          Creates an entity in this collection.
 T remove(java.lang.Object key)
          Removes an entity from this collection.
 
Methods inherited from class com.splunk.ResourceCollection
clear, containsKey, containsValue, createItem, createItem, entrySet, equals, get, hashCode, isEmpty, itemKey, itemPath, keySet, list, put, putAll, refresh, size, validate, values
 
Methods inherited from class com.splunk.Resource
getActions, getName, getPath, getService, getTitle, invalidate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityCollection

public EntityCollection(Service service,
                        java.lang.String path,
                        java.lang.Class itemClass)
Class constructor.

Parameters:
service - The connected Service instance.
path - The entity's endpoint.
itemClass - The entity's subclass.
Method Detail

create

public T create(java.lang.String name)
Creates an entity in this collection.

Parameters:
name - The name of the entity.
Returns:
The entity.

create

public T create(java.lang.String name,
                java.util.Map args)
Creates an entity in this collection.

Parameters:
name - The name of the entity.
args - The arguments that are provided for creating the entity.
Returns:
The entity.

remove

public T remove(java.lang.Object key)
Removes an entity from this collection.

Specified by:
remove in interface java.util.Map<java.lang.String,T extends Entity>
Overrides:
remove in class ResourceCollection<T extends Entity>
Parameters:
key - The name of the entity to remove.
Returns:
This collection.