com.splunk
Class User

java.lang.Object
  extended by com.splunk.Resource
      extended by com.splunk.Entity
          extended by com.splunk.User
All Implemented Interfaces:
java.util.Map<java.lang.String,java.lang.Object>

public class User
extends Entity

The User class represents a Splunk user who is registered on the current Splunk server.


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.Entity
content, toUpdate
 
Fields inherited from class com.splunk.Resource
actions, path, refreshArgs, service, title
 
Method Summary
 java.lang.String getDefaultApp()
          Returns the user's default app.
 boolean getDefaultAppIsUserOverride()
          Indicates whether the user's default app was set specifically by the user.
 java.lang.String getDefaultAppSourceRole()
          Returns the name of the role that the default app was inherited from, or system if it was inherited from the default system setting.
 java.lang.String getEmail()
          Returns the user's email address.
 java.lang.String getPassword()
          Returns the user's password.
 java.lang.String getRealName()
          Returns the full name associated with this user.
 java.lang.String[] getRoles()
          Returns an array of roles assigned to this user.
 java.lang.String getType()
          Returns the authentication method responsible for this user.
 java.lang.String getTz()
          Returns the time zone to use when displaying dates for this user.
 void setDefaultApp(java.lang.String defaultApp)
          Sets the default app for this user.
 void setEmail(java.lang.String email)
          Sets the email address for this user.
 void setPassword(java.lang.String password)
          Sets this user's password.
 void setRealName(java.lang.String realname)
          Sets this user's real name.
 void setRestartBackgroundJobs(boolean restart_background_jobs)
          Sets whether to restart background search jobs when Splunk restarts.
 void setRoles(java.lang.String role)
          Sets this user's role.
 void setRoles(java.lang.String[] roles)
          Sets the roles for this user.
 void setTz(java.lang.String tz)
          Sets this user's time zone, which is used for display purposes.
 
Methods inherited from class com.splunk.Entity
actionPath, clear, containsKey, containsValue, disable, enable, entrySet, get, getContent, getMetadata, isDisabled, isEmpty, isNameChangeAllowed, keySet, put, putAll, refresh, remove, remove, size, update, update, validate, 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
 

Method Detail

getDefaultApp

public java.lang.String getDefaultApp()
Returns the user's default app.

Returns:
The default app.

getDefaultAppIsUserOverride

public boolean getDefaultAppIsUserOverride()
Indicates whether the user's default app was set specifically by the user.

Returns:
true if the default app was set by the user, false if not.

getDefaultAppSourceRole

public java.lang.String getDefaultAppSourceRole()
Returns the name of the role that the default app was inherited from, or system if it was inherited from the default system setting.

Returns:
The name of the role the default app was inherited from, or system if it was inherited from the default system settings.

getEmail

public java.lang.String getEmail()
Returns the user's email address.

Returns:
The user's email address.

getPassword

public java.lang.String getPassword()
Returns the user's password.

Returns:
The user's password.

getRealName

public java.lang.String getRealName()
Returns the full name associated with this user.

Returns:
The user's full name.

getRoles

public java.lang.String[] getRoles()
Returns an array of roles assigned to this user.

Returns:
An array of roles.

getType

public java.lang.String getType()
Returns the authentication method responsible for this user.

Returns:
The authentication method for the user.

getTz

public java.lang.String getTz()
Returns the time zone to use when displaying dates for this user.

Returns:
The user's time zone.

setDefaultApp

public void setDefaultApp(java.lang.String defaultApp)
Sets the default app for this user.

Parameters:
defaultApp - The default app.

setEmail

public void setEmail(java.lang.String email)
Sets the email address for this user.

Parameters:
email - The email address.

setPassword

public void setPassword(java.lang.String password)
Sets this user's password.

Parameters:
password - The password.

setRealName

public void setRealName(java.lang.String realname)
Sets this user's real name.

Parameters:
realname - The real name.

setRestartBackgroundJobs

public void setRestartBackgroundJobs(boolean restart_background_jobs)
Sets whether to restart background search jobs when Splunk restarts. When true, a background search job for this user that has not completed is restarted when Splunk restarts.

Parameters:
restart_background_jobs - true to restart background search jobs, false if not.

setRoles

public void setRoles(java.lang.String[] roles)
Sets the roles for this user.

Parameters:
roles - An array of roles.

setRoles

public void setRoles(java.lang.String role)
Sets this user's role. Use this method to set a single role rather than an array.

Parameters:
role - The role.

setTz

public void setTz(java.lang.String tz)
Sets this user's time zone, which is used for display purposes.

Note: This attribute is valid in Splunk 4.3 and later.

Parameters:
tz - The timezone.