org.netxms.api.client.users
Class AbstractUserObject

java.lang.Object
  extended by org.netxms.api.client.users.AbstractUserObject
Direct Known Subclasses:
User, UserGroup

public abstract class AbstractUserObject
extends java.lang.Object

Abstract NetXMS user database object.


Field Summary
static int CANNOT_CHANGE_PASSWORD
           
static int CHANGE_PASSWORD
           
protected  java.util.Map<java.lang.String,java.lang.String> customAttributes
           
static int DELETED
           
protected  java.lang.String description
           
static int DISABLED
           
protected  int flags
           
protected  java.util.UUID guid
           
protected  long id
           
static int INTRUDER_LOCKOUT
           
static int MODIFIED
           
protected  java.lang.String name
           
protected  int systemRights
           
 
Constructor Summary
AbstractUserObject(AbstractUserObject src)
          Copy constructor
AbstractUserObject(NXCPMessage msg)
          Create object from NXCP message
AbstractUserObject(java.lang.String name)
          Default constructor
 
Method Summary
 java.lang.Object clone()
           
 void fillMessage(NXCPMessage msg)
          Fill NXCP message with object data
 java.lang.String getCustomAttribute(java.lang.String name)
          Get custom attribute
 java.lang.String getDescription()
           
 int getFlags()
           
 java.util.UUID getGuid()
           
 long getId()
           
 java.lang.String getName()
           
 int getSystemRights()
           
 boolean isDeleted()
           
 boolean isDisabled()
          Check if object is disabled
 boolean isPasswordChangeForbidden()
          Check if password change is forbidden
 boolean isPasswordChangeNeeded()
          Check if password should be changed at next logon
 void setCustomAttribute(java.lang.String name, java.lang.String value)
          Set custom attribute's value
 void setDescription(java.lang.String description)
           
 void setFlags(int flags)
           
 void setId(long id)
           
 void setName(java.lang.String name)
           
 void setSystemRights(int systemRights)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODIFIED

public static final int MODIFIED
See Also:
Constant Field Values

DELETED

public static final int DELETED
See Also:
Constant Field Values

DISABLED

public static final int DISABLED
See Also:
Constant Field Values

CHANGE_PASSWORD

public static final int CHANGE_PASSWORD
See Also:
Constant Field Values

CANNOT_CHANGE_PASSWORD

public static final int CANNOT_CHANGE_PASSWORD
See Also:
Constant Field Values

INTRUDER_LOCKOUT

public static final int INTRUDER_LOCKOUT
See Also:
Constant Field Values

id

protected long id

name

protected java.lang.String name

guid

protected java.util.UUID guid

systemRights

protected int systemRights

flags

protected int flags

description

protected java.lang.String description

customAttributes

protected java.util.Map<java.lang.String,java.lang.String> customAttributes
Constructor Detail

AbstractUserObject

public AbstractUserObject(java.lang.String name)
Default constructor


AbstractUserObject

public AbstractUserObject(AbstractUserObject src)
Copy constructor


AbstractUserObject

public AbstractUserObject(NXCPMessage msg)
Create object from NXCP message

Parameters:
msg - Message containing object's data
Method Detail

fillMessage

public void fillMessage(NXCPMessage msg)
Fill NXCP message with object data


isDeleted

public boolean isDeleted()
Returns:
true if user is marked as deleted

getId

public long getId()
Returns:
the id

setId

public void setId(long id)
Parameters:
id - the id to set

getName

public java.lang.String getName()
Returns:
the name

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

getGuid

public java.util.UUID getGuid()
Returns:
the guid

getSystemRights

public int getSystemRights()
Returns:
the systemRights

setSystemRights

public void setSystemRights(int systemRights)
Parameters:
systemRights - the systemRights to set

getFlags

public int getFlags()
Returns:
the flags

setFlags

public void setFlags(int flags)
Parameters:
flags - the flags to set

getDescription

public java.lang.String getDescription()
Returns:
the description

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - the description to set

getCustomAttribute

public java.lang.String getCustomAttribute(java.lang.String name)
Get custom attribute

Parameters:
name - Name of the attribute

setCustomAttribute

public void setCustomAttribute(java.lang.String name,
                               java.lang.String value)
Set custom attribute's value

Parameters:
name - Name of the attribute
value - New value for attribute

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

isDisabled

public boolean isDisabled()
Check if object is disabled

Returns:
true if object is disabled

isPasswordChangeNeeded

public boolean isPasswordChangeNeeded()
Check if password should be changed at next logon

Returns:
true if password should be changed at next logon

isPasswordChangeForbidden

public boolean isPasswordChangeForbidden()
Check if password change is forbidden

Returns:
true if password change is forbidden


Copyright © 2011. All Rights Reserved.