com.cloudera.api.model
Class ApiUser

java.lang.Object
  extended by com.cloudera.api.model.ApiUser

public class ApiUser
extends Object

This is the model for user information in the API.

Note that any method that returns user information will not contain any password information. The password property is only used when creating or updating users.


Constructor Summary
ApiUser()
           
 
Method Summary
 void addRole(String role)
           
 boolean equals(Object o)
           
 String getName()
          The username, which is unique within a Cloudera Manager installation.
 String getPassword()
          Returns the user password.
 String getPwHash()
          NOTE: Only available in the "export" view
 Boolean getPwLogin()
          NOTE: Only available in the "export" view
 Long getPwSalt()
          NOTE: Only available in the "export" view
 Set<String> getRoles()
          A list of roles this user belongs to.
 int hashCode()
           
 void setName(String name)
           
 void setPassword(String password)
          Sets the user password.
 void setPwHash(String pwHash)
           
 void setPwLogin(Boolean pwLogin)
           
 void setPwSalt(Long pwSalt)
           
 void setRoles(Set<String> roles)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApiUser

public ApiUser()
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getName

public String getName()
The username, which is unique within a Cloudera Manager installation.


setName

public void setName(String name)

getPassword

public String getPassword()
Returns the user password.

Passwords are not returned when querying user information, so this property will always be empty when reading information from a server.

Returns:
The user's password (may be null).

setPassword

public void setPassword(String password)
Sets the user password.

When creating a user or updating an existing user, this property should contain the plain text user password to be set.

Parameters:
password - Plain text user password.

getRoles

public Set<String> getRoles()
A list of roles this user belongs to.

In Cloudera Express, possible values are:

In Cloudera Enterprise Datahub Edition, additional possible values are: An empty list implies ROLE_USER.

Note that although this interface provides a list of roles, a user should only be assigned a single role at a time.


setRoles

public void setRoles(Set<String> roles)

addRole

public void addRole(String role)

getPwHash

public String getPwHash()
NOTE: Only available in the "export" view

Returns:
The password hash for the user

setPwHash

public void setPwHash(String pwHash)

getPwSalt

public Long getPwSalt()
NOTE: Only available in the "export" view

Returns:
The password salt for the user

setPwSalt

public void setPwSalt(Long pwSalt)

getPwLogin

public Boolean getPwLogin()
NOTE: Only available in the "export" view

Returns:
Whether the user is authenticated using the local password info

setPwLogin

public void setPwLogin(Boolean pwLogin)


Copyright © Cloudera, Inc. Released under Apache License, Version 2.0.