public class Entity extends Resource implements Map<String,Object>
Entity
class represents a Splunk entity.Modifier and Type | Field and Description |
---|---|
protected Record |
content |
protected HashMap<String,Object> |
toUpdate |
Constructor and Description |
---|
Entity(Service service,
String path)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
protected String |
actionPath(String action)
Returns the path that corresponds to the requested action.
|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
void |
disable()
Disables the entity that is named by this endpoint.
|
void |
enable()
Enables the entity that is named by this endpoint.
|
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(Object key) |
protected Record |
getContent() |
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.lang.String, java.lang.Object>) . |
Set<String> |
keySet() |
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,? extends Object> map) |
Entity |
refresh()
Refreshes the local state of this resource.
|
void |
remove()
Removes this entity from its corresponding collection.
|
Object |
remove(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(Map<String,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. |
Collection<Object> |
values() |
getName, getPath, getService, getTitle, getUpdated, invalidate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
protected String actionPath(String action)
action
- The requested action.public boolean containsKey(Object key)
containsKey
in interface Map<String,Object>
public boolean containsValue(Object value)
containsValue
in interface Map<String,Object>
public void disable()
public void enable()
protected Record getContent()
public EntityMetadata getMetadata()
null
if none exist.public boolean isDisabled()
true
if this entity is disabled, false
if
enabled.protected boolean isNameChangeAllowed()
update(java.util.Map<java.lang.String, java.lang.Object>)
.
Most entity names cannot be changed in this way.public Entity refresh()
public void update(Map<String,Object> args)
args
- The arguments to update.public void update()
public void remove()
public Entity validate()
refresh
if necessary.Copyright © 2022 Splunk, Inc.. All rights reserved.