com.splunk
Class Resource

java.lang.Object
  extended by com.splunk.Resource
Direct Known Subclasses:
Entity, ResourceCollection

public abstract class Resource
extends java.lang.Object

The Resource abstract base class represents a Splunk resource.


Field Summary
protected  java.util.Map<java.lang.String,java.lang.String> actions
           
protected  java.lang.String path
           
protected  Args refreshArgs
           
protected  Service service
           
protected  java.lang.String title
           
 
Method Summary
 java.lang.String getName()
          Returns the resource name.
 java.lang.String getPath()
          Returns the path to this resource.
 Service getService()
          Returns the Service instance this resource is connected to.
 java.lang.String getTitle()
          Return the title of this resource, which corresponds to the Atom <title> element.
 Resource invalidate()
          Marks the local state of this resource as no longer current.
abstract  Resource refresh()
          Refreshes the local state of this resource.
 Resource validate()
          Ensures that the local state of the resource is current, calling refresh if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

service

protected Service service

path

protected java.lang.String path

refreshArgs

protected Args refreshArgs

actions

protected java.util.Map<java.lang.String,java.lang.String> actions

title

protected java.lang.String title
Method Detail

getName

public java.lang.String getName()
Returns the resource name. By default, the name is the resource title. This name can also be used as the key for the resource if it belongs to a container resource (for example, an entity that belongs to an entity collection).

Returns:
The resource name.

getPath

public java.lang.String getPath()
Returns the path to this resource.

Returns:
The resource path.

getService

public Service getService()
Returns the Service instance this resource is connected to.

Returns:
The Service instance.

getTitle

public java.lang.String getTitle()
Return the title of this resource, which corresponds to the Atom <title> element.

Returns:
The resource title.

invalidate

public Resource invalidate()
Marks the local state of this resource as no longer current.

Returns:
The current Resource instance.

refresh

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

Returns:
The current Resource instance.

validate

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

Returns:
The current Resource instance.