com.splunk
Class Entity

java.lang.Object
  extended by com.splunk.Resource
      extended by com.splunk.Entity
All Implemented Interfaces:
java.util.Map<java.lang.String,java.lang.Object>
Direct Known Subclasses:
Application, ApplicationArchive, ApplicationSetup, ApplicationUpdate, DeploymentClient, DeploymentServer, DeploymentServerClass, DeploymentTenant, DistributedConfiguration, DistributedPeer, EventType, FiredAlert, FiredAlertGroup, Index, Input, Job, License, LicenseGroup, LicenseMessage, LicensePool, LicenseSlave, LicenseStack, Logger, Message, ModularInputKind, OutputDefault, OutputGroup, OutputServer, OutputServerAllConnections, OutputSyslog, Password, Role, SavedSearch, ServiceInfo, Settings, TcpConnections, UdpConnections, Upload, User

public class Entity
extends Resource
implements java.util.Map<java.lang.String,java.lang.Object>

The Entity class represents a Splunk entity.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
protected  java.util.HashMap<java.lang.String,java.lang.Object> toUpdate
           
 
Fields inherited from class com.splunk.Resource
actions, path, refreshArgs, service, title
 
Method Summary
protected  java.lang.String actionPath(java.lang.String action)
          Returns the path that corresponds to the requested action.
 void clear()
          
 boolean containsKey(java.lang.Object key)
          
 boolean containsValue(java.lang.Object value)
          
 void disable()
          Disables the entity that is named by this endpoint.
 void enable()
          Enables the entity that is named by this endpoint.
 java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()
          
 java.lang.Object get(java.lang.Object key)
          
 EntityMetadata getMetadata()
          Returns the metadata (eai:acl) of this entity.
 boolean isDisabled()
          Indicates whether this entity is disabled.
 boolean isEmpty()
          
protected  boolean isNameChangeAllowed()
          Returns whether this entity's name can be changed via update(java.util.Map).
 java.util.Set<java.lang.String> keySet()
          
 java.lang.Object put(java.lang.String key, java.lang.Object value)
          
 void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> map)
          
 Entity refresh()
          Refreshes the local state of this resource.
 void remove()
          Removes this entity from its corresponding collection.
 java.lang.Object remove(java.lang.Object key)
          
 int size()
          
 void update()
          Updates the entity with the accumulated arguments, established by the individual setter methods for each specific entity class.
 void update(java.util.Map<java.lang.String,java.lang.Object> args)
          Updates the entity with the values you previously set using the setter methods, and any additional specified arguments.
 Entity validate()
          Ensures that the local state of the resource is current, calling refresh if necessary.
 java.util.Collection<java.lang.Object> values()
          
 
Methods inherited from class com.splunk.Resource
getName, getPath, getService, getTitle, invalidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

toUpdate

protected java.util.HashMap<java.lang.String,java.lang.Object> toUpdate
Method Detail

actionPath

protected java.lang.String actionPath(java.lang.String action)
Returns the path that corresponds to the requested action.

Parameters:
action - The requested action.
Returns:
The return path.

clear

public void clear()

Specified by:
clear in interface java.util.Map<java.lang.String,java.lang.Object>

containsKey

public boolean containsKey(java.lang.Object key)

Specified by:
containsKey in interface java.util.Map<java.lang.String,java.lang.Object>

containsValue

public boolean containsValue(java.lang.Object value)

Specified by:
containsValue in interface java.util.Map<java.lang.String,java.lang.Object>

disable

public void disable()
Disables the entity that is named by this endpoint. This method is available on almost every endpoint.


enable

public void enable()
Enables the entity that is named by this endpoint. This method is available on almost every endpoint.


entrySet

public java.util.Set<java.util.Map.Entry<java.lang.String,java.lang.Object>> entrySet()

Specified by:
entrySet in interface java.util.Map<java.lang.String,java.lang.Object>

get

public java.lang.Object get(java.lang.Object key)

Specified by:
get in interface java.util.Map<java.lang.String,java.lang.Object>

getMetadata

public EntityMetadata getMetadata()
Returns the metadata (eai:acl) of this entity. This data includes permissions for accessing the resource, and values that indicate which resource fields are wildcards, required, and optional.

Returns:
The metadata of this entity, or null if none exist.

isEmpty

public boolean isEmpty()

Specified by:
isEmpty in interface java.util.Map<java.lang.String,java.lang.Object>

isDisabled

public boolean isDisabled()
Indicates whether this entity is disabled. This method is available on almost every endpoint.

Returns:
true if this entity is disabled, false if enabled.

isNameChangeAllowed

protected boolean isNameChangeAllowed()
Returns whether this entity's name can be changed via update(java.util.Map). Most entity names cannot be changed in this way.


keySet

public java.util.Set<java.lang.String> keySet()

Specified by:
keySet in interface java.util.Map<java.lang.String,java.lang.Object>

put

public java.lang.Object put(java.lang.String key,
                            java.lang.Object value)

Specified by:
put in interface java.util.Map<java.lang.String,java.lang.Object>

putAll

public void putAll(java.util.Map<? extends java.lang.String,? extends java.lang.Object> map)

Specified by:
putAll in interface java.util.Map<java.lang.String,java.lang.Object>

refresh

public Entity refresh()
Refreshes the local state of this resource.

Specified by:
refresh in class Resource
Returns:
The current Resource instance.

remove

public java.lang.Object remove(java.lang.Object key)

Specified by:
remove in interface java.util.Map<java.lang.String,java.lang.Object>

size

public int size()

Specified by:
size in interface java.util.Map<java.lang.String,java.lang.Object>

update

public void update(java.util.Map<java.lang.String,java.lang.Object> args)
Updates the entity with the values you previously set using the setter methods, and any additional specified arguments. The specified arguments take precedent over the values that were set using the setter methods.

Parameters:
args - The arguments to update.

update

public void update()
Updates the entity with the accumulated arguments, established by the individual setter methods for each specific entity class.


remove

public void remove()
Removes this entity from its corresponding collection.


validate

public Entity validate()
Ensures that the local state of the resource is current, calling refresh if necessary.

Overrides:
validate in class Resource
Returns:
The current Resource instance.

values

public java.util.Collection<java.lang.Object> values()

Specified by:
values in interface java.util.Map<java.lang.String,java.lang.Object>