de.esprit.netsuite.server.auth

## Class AbstractUser

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.netsuite.server.auth.AbstractUser

- All Implemented Interfaces:
    Renderable, DeepCloneable, Dumpable, User, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
  Direct Known Subclasses:
    DefaultUser

      public abstract class AbstractUser
      extends TransferableObject
      implements User

  This User implementation represents user entries defined in the srv_user.cfg file
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface de.esprit.netsuite.server.auth.User

      `CHANGED_TS, COMMENT, CREATED_TS, EMAIL, FORE_NAME, GID, IS_ADMIN, IS_LOCKED, LANGUAGE, LAST_NAME, LOGIN_NAME, PASSWORD, UID, userDocType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractUser(int uid, int gid, Language lang, java.lang.String loginName, java.lang.String foreName, java.lang.String lastName, java.lang.String email, boolean isAdmin, boolean isLocked, java.lang.String password, java.sql.Timestamp createdTs, java.sql.Timestamp changedTs, java.lang.String comment)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AbstractUser` | `clone()`
    `int` | `compareTo(java.lang.Object o)`
    `boolean` | `equals(java.lang.Object o)` Must compare based on unique userName
    `java.sql.Timestamp` | `getChangedTimestamp()`
    `java.lang.String` | `getComment()` Returns an optional comment for this user.
    `java.sql.Timestamp` | `getCreatedTimestamp()`
    `java.lang.String` | `getEmailAddress()` Returns the user's email address.
    `java.lang.String` | `getForeName()` Returns the user's forename.
    `int` | `getGID()` Specifies an optional group for the user.
    `Language` | `getLanguage()` Returns the `Language` of this user.
    `java.lang.String` | `getLastName()` Returns the user's lastname.
    `java.lang.String` | `getLoginName()` Returns the user's unique login name.
    `java.lang.String` | `getPassword()` Returns the users password as stored on server side.
    `java.awt.Color` | `getRenderColor()`
    `javax.swing.Icon` | `getRenderIcon()`
    `java.lang.String` | `getRenderText()`
    `int` | `getUID()` Returns a unique ID for this user.
    `UserId` | `getUserId()` Returns a shortcut identifier for this User Object
    `int` | `hashCode()`
    `boolean` | `isAdmin()` The user is defined to be the admin user if the userType is 0
    `boolean` | `isLocked()` The user is allowed to log in.
    `void` | `setAdmin(boolean isAdmin)`
    `void` | `setChangedTimestamp(java.sql.Timestamp changedTs)`
    `void` | `setComment(java.lang.String comment)`
    `void` | `setCreatedTimestamp(java.sql.Timestamp createdTs)`
    `void` | `setEmailAddress(java.lang.String email)`
    `void` | `setForeName(java.lang.String foreName)`
    `void` | `setGID(int userType)` Specifies an optional group for the user.
    `void` | `setLanguage(Language language)`
    `void` | `setLastName(java.lang.String lastName)`
    `void` | `setLocked(boolean isLocked)`
    `void` | `setLoginName(java.lang.String userName)` Sets the user's unique login name.
    `void` | `setPassword(java.lang.String password)`
    `void` | `setUID(int uid)` Note that once set the UID will never change.
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.

    - ### Methods inherited from class de.esprit.common.util.TransferableObject

      `copy`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface de.esprit.common.type.Dumpable

      `toDumpString, toString`

- - ### Constructor Detail

    - #### AbstractUser

          public AbstractUser(int uid,
                      int gid,
                      Language lang,
                      java.lang.String loginName,
                      java.lang.String foreName,
                      java.lang.String lastName,
                      java.lang.String email,
                      boolean isAdmin,
                      boolean isLocked,
                      java.lang.String password,
                      java.sql.Timestamp createdTs,
                      java.sql.Timestamp changedTs,
                      java.lang.String comment)

  - ### Method Detail

    - #### getLanguage

          public Language getLanguage()

      Description copied from interface: `User`
      Returns the `Language` of this user. This is the language used for the GUI after Login.
      Specified by:
        `getLanguage` in interface `User`

    - #### setLanguage

          public void setLanguage(Language language)

      Specified by:
        `setLanguage` in interface `User`

    - #### getRenderIcon

          public javax.swing.Icon getRenderIcon()

      Specified by:
        `getRenderIcon` in interface `Renderable`

    - #### getRenderColor

          public java.awt.Color getRenderColor()

      Specified by:
        `getRenderColor` in interface `Renderable`

    - #### getRenderText

          public java.lang.String getRenderText()

      Specified by:
        `getRenderText` in interface `Renderable`

    - #### getChangedTimestamp

          public java.sql.Timestamp getChangedTimestamp()

      Specified by:
        `getChangedTimestamp` in interface `User`

    - #### setChangedTimestamp

          public void setChangedTimestamp(java.sql.Timestamp changedTs)

      Specified by:
        `setChangedTimestamp` in interface `User`

    - #### getCreatedTimestamp

          public java.sql.Timestamp getCreatedTimestamp()

      Specified by:
        `getCreatedTimestamp` in interface `User`

    - #### setCreatedTimestamp

          public void setCreatedTimestamp(java.sql.Timestamp createdTs)

      Specified by:
        `setCreatedTimestamp` in interface `User`

    - #### isAdmin

          public boolean isAdmin()

      Description copied from interface: `User`
      The user is defined to be the admin user if the userType is 0
      Specified by:
        `isAdmin` in interface `User`

    - #### setAdmin

          public void setAdmin(boolean isAdmin)

      Specified by:
        `setAdmin` in interface `User`

    - #### isLocked

          public boolean isLocked()

      Description copied from interface: `User`
      The user is allowed to log in.
      Specified by:
        `isLocked` in interface `User`

    - #### setLocked

          public void setLocked(boolean isLocked)

      Specified by:
        `setLocked` in interface `User`

    - #### getForeName

          public java.lang.String getForeName()

      Description copied from interface: `User`
      Returns the user's forename.
      Specified by:
        `getForeName` in interface `User`

    - #### getLastName

          public java.lang.String getLastName()

      Description copied from interface: `User`
      Returns the user's lastname.
      Specified by:
        `getLastName` in interface `User`

    - #### getEmailAddress

          public java.lang.String getEmailAddress()

      Description copied from interface: `User`
      Returns the user's email address.
      Specified by:
        `getEmailAddress` in interface `User`

    - #### setEmailAddress

          public void setEmailAddress(java.lang.String email)

      Specified by:
        `setEmailAddress` in interface `User`

    - #### getComment

          public java.lang.String getComment()

      Description copied from interface: `User`
      Returns an optional comment for this user.
      Specified by:
        `getComment` in interface `User`

    - #### getGID

          public int getGID()

      Description copied from interface: `User`
      Specifies an optional group for the user. The value 0 means 'unspecified'
      Specified by:
        `getGID` in interface `User`
      See Also:
        `Group`

    - #### setGID

          public void setGID(int userType)

      Description copied from interface: `User`
      Specifies an optional group for the user. The value 0 means 'unspecified'
      Specified by:
        `setGID` in interface `User`
      See Also:
        `Group`

    - #### getPassword

          public java.lang.String getPassword()

      Description copied from interface: `User`
      Returns the users password as stored on server side. Note that in the implementation the password should be transient in order not to be transferred via the network.
      Specified by:
        `getPassword` in interface `User`

    - #### setPassword

          public void setPassword(java.lang.String password)

      Specified by:
        `setPassword` in interface `User`

    - #### getUID

          public int getUID()

      Description copied from interface: `User`
      Returns a unique ID for this user.
      Specified by:
        `getUID` in interface `User`

    - #### setUID

          public void setUID(int uid)

      Description copied from interface: `User`
      Note that once set the UID will never change. It must be settable anyway because it is typically determined by a database system and thus must be adaptable in the User Object.
      Specified by:
        `setUID` in interface `User`
      See Also:
        `User.getUID()`

    - #### getLoginName

          public java.lang.String getLoginName()

      Description copied from interface: `User`
      Returns the user's unique login name. This should be a short name with no white spaces and in lower case letters only.
      Specified by:
        `getLoginName` in interface `User`

    - #### setLoginName

          public void setLoginName(java.lang.String userName)

      Description copied from interface: `User`
      Sets the user's unique login name. This should be a short name with no white spaces and in lower case letters only.
      Specified by:
        `setLoginName` in interface `User`

    - #### setForeName

          public void setForeName(java.lang.String foreName)

      Specified by:
        `setForeName` in interface `User`

    - #### setLastName

          public void setLastName(java.lang.String lastName)

      Specified by:
        `setLastName` in interface `User`

    - #### setComment

          public void setComment(java.lang.String comment)

      Specified by:
        `setComment` in interface `User`

    - #### getUserId

          public UserId getUserId()

      Returns a shortcut identifier for this User Object
      Specified by:
        `getUserId` in interface `User`

    - #### equals

          public boolean equals(java.lang.Object o)

      Must compare based on unique userName
      Overrides:
        `equals` in class `java.lang.Object`

    - #### compareTo

          public int compareTo(java.lang.Object o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### clone

          public AbstractUser clone()

      Specified by:
        `clone` in interface `User`
      Overrides:
        `clone` in class `TransferableObject`

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

Copyright © 2013 EsprIT-Systems. All Rights Reserved.