Package com.sgs.common.database
Class User
- java.lang.Object
-
- com.sgs.common.database.HibernateObject
-
- com.sgs.common.database.User
-
public class User extends HibernateObject
This class represents an operator of the system They must be setup for users to gain access to the system Rights can be assigned on a per user basis- Author:
- SGSystems
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
User.Role
static class
User.SupervisorLevel
The supervisor level of the operator.static class
User.SystemPrivileges
The various options/privileges that can be set per user
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
associatedID
Associated ID for an operator for additional operator recognitionint
attempts
The amount of failed attempts the user has tried to access the systembyte[]
avatar
The bytes for an image/icon representing the user.java.lang.String
color
The user color for this operator.int
downtimeInitiated
Determines if the User is having downtime.java.lang.String
emailAddress
The Operators email addressjava.lang.String
encPass
int
isTemplate
Determines if this user is a templateint
locked
If the user account has been marked as locked, this will stop the user from being able to log injava.lang.String
password
The unique 4 digit password for this operatorjava.util.Date
passwordExpiry
The Date in which the password will expireint
qualified
int
role
What Role the Operator has in the system.Site
site
Can be used to allow users to only see data which pertains to a particular siteint
supervisor
Boolean value to indicate whether the operators supervisor level.java.lang.Double
targetPPH
Target packs per hour.java.util.Date
trainingExpirationDate
If set, together with config TrainingDateWarning=1, shows message after logging in of how many days user is permitted to use MESjava.lang.String
twoStepPassword
The password for this operatorjava.lang.String
username
*Primary Key* The unique username of this operatorbyte[]
userOptions
Automatically generated preferences from machine learningbyte[]
userPrivileges
User privileges.-
Fields inherited from class com.sgs.common.database.HibernateObject
ID
-
-
Constructor Summary
Constructors Constructor Description User()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Color
getActualColor()
java.lang.String
getAssociatedID()
int
getAttempts()
byte[]
getAvatar()
java.awt.image.BufferedImage
getBufferedAvatar()
java.lang.String
getColor()
java.util.Date
getDeleted()
int
getDowntimeInitiated()
java.lang.String
getEmailAddress()
java.lang.String
getEncPass()
int
getIsTemplate()
int
getLocked()
java.lang.String
getPassword()
java.util.Date
getPasswordExpiry()
int
getQualified()
int
getRole()
Site
getSite()
int
getSupervisor()
java.lang.Double
getTargetPPH()
java.util.Date
getTrainingExpirationDate()
java.lang.String
getTwoStepPassword()
java.lang.String
getUsername()
java.lang.String
getUserOption(java.lang.String key)
byte[]
getUserPrivileges()
java.lang.String
getUserPrivileges(java.lang.String key)
boolean
isAllowed(User.SystemPrivileges privilege)
void
setActualColor(java.awt.Color color)
void
setAssociatedID(java.lang.String associatedID)
void
setAttempts(int attempts)
void
setAvatar(byte[] avatar)
void
setColor(java.lang.String color)
void
setDeleted(java.util.Date deleted)
void
setDowntimeInitiated(int downtimeInitiated)
void
setEmailAddress(java.lang.String emailAddress)
void
setEncodedPassword(java.lang.String rawpass)
void
setEncPass(java.lang.String encPass)
void
setIsTemplate(int isTemplate)
void
setLocked(int locked)
void
setPassword(java.lang.String password)
void
setPasswordExpiry(java.util.Date passwordExpiry)
void
setPrivileges(User.SystemPrivileges priv, boolean enabled)
void
setQualified(int qualified)
void
setRole(int role)
void
setSite(Site site)
void
setSupervisor(int supervisor)
void
setTargetPPH(java.lang.Double targetPPH)
void
setTrainingExpirationDate(java.util.Date trainingExpirationDate)
void
setTwoStepPassword(java.lang.String twoStepPassword)
void
setUsername(java.lang.String username)
void
setUserOption(java.lang.String key, java.lang.String value)
void
setUserOptions(byte[] userOptions)
void
setUserPrivilege(java.lang.String key, java.lang.String value)
void
setUserPrivileges(byte[] userPrivileges)
void
storeUserPrivileges()
java.lang.String
toString()
-
Methods inherited from class com.sgs.common.database.HibernateObject
getExported, getID, isDontSave, isModified, setDontSave, setExported, setID, setModified
-
-
-
-
Field Detail
-
username
public java.lang.String username
*Primary Key* The unique username of this operator
-
password
public java.lang.String password
The unique 4 digit password for this operator
-
color
public java.lang.String color
The user color for this operator. This will color the UI of all applications to suit the operator color. Helping to identify who has logged in while providing personalization to the system
-
userOptions
public byte[] userOptions
Automatically generated preferences from machine learning
-
supervisor
public int supervisor
Boolean value to indicate whether the operators supervisor level. SeeUser.SupervisorLevel
-
avatar
public byte[] avatar
The bytes for an image/icon representing the user. Can be displayed at terminal level
-
associatedID
public java.lang.String associatedID
Associated ID for an operator for additional operator recognition
-
targetPPH
public java.lang.Double targetPPH
Target packs per hour. Can be used to in FP picking to rate operators based on performance
-
userPrivileges
public byte[] userPrivileges
User privileges. What the operator can and cannot access or perform. SeeUser.SystemPrivileges
-
site
public Site site
Can be used to allow users to only see data which pertains to a particular site
-
twoStepPassword
public java.lang.String twoStepPassword
The password for this operator
-
locked
public int locked
If the user account has been marked as locked, this will stop the user from being able to log in
-
attempts
public int attempts
The amount of failed attempts the user has tried to access the system
-
passwordExpiry
public java.util.Date passwordExpiry
The Date in which the password will expire
-
emailAddress
public java.lang.String emailAddress
The Operators email address
-
isTemplate
public int isTemplate
Determines if this user is a template
-
role
public int role
What Role the Operator has in the system.
-
downtimeInitiated
public int downtimeInitiated
Determines if the User is having downtime.
-
encPass
public java.lang.String encPass
-
qualified
public int qualified
-
trainingExpirationDate
public java.util.Date trainingExpirationDate
If set, together with config TrainingDateWarning=1, shows message after logging in of how many days user is permitted to use MES
-
-
Method Detail
-
setPrivileges
public void setPrivileges(User.SystemPrivileges priv, boolean enabled)
-
getUsername
public java.lang.String getUsername()
-
setUsername
public void setUsername(java.lang.String username)
-
getPassword
public java.lang.String getPassword()
-
setPassword
public void setPassword(java.lang.String password)
-
getColor
public java.lang.String getColor()
-
getActualColor
public java.awt.Color getActualColor()
-
setActualColor
public void setActualColor(java.awt.Color color)
-
setColor
public void setColor(java.lang.String color)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isAllowed
public boolean isAllowed(User.SystemPrivileges privilege)
-
getDeleted
public java.util.Date getDeleted()
-
setDeleted
public void setDeleted(java.util.Date deleted)
-
setUserOptions
public void setUserOptions(byte[] userOptions)
-
setUserOption
public void setUserOption(java.lang.String key, java.lang.String value)
-
getUserOption
public java.lang.String getUserOption(java.lang.String key)
-
getUserPrivileges
public java.lang.String getUserPrivileges(java.lang.String key)
-
setUserPrivilege
public void setUserPrivilege(java.lang.String key, java.lang.String value)
-
storeUserPrivileges
public void storeUserPrivileges()
-
getSupervisor
public int getSupervisor()
-
setSupervisor
public void setSupervisor(int supervisor)
-
getAvatar
public byte[] getAvatar()
-
setAvatar
public void setAvatar(byte[] avatar)
-
getBufferedAvatar
public java.awt.image.BufferedImage getBufferedAvatar()
-
getAssociatedID
public java.lang.String getAssociatedID()
-
setAssociatedID
public void setAssociatedID(java.lang.String associatedID)
-
getTargetPPH
public java.lang.Double getTargetPPH()
-
setTargetPPH
public void setTargetPPH(java.lang.Double targetPPH)
-
getUserPrivileges
public byte[] getUserPrivileges()
-
setUserPrivileges
public void setUserPrivileges(byte[] userPrivileges)
-
getSite
public Site getSite()
-
setSite
public void setSite(Site site)
-
getTwoStepPassword
public java.lang.String getTwoStepPassword()
-
setTwoStepPassword
public void setTwoStepPassword(java.lang.String twoStepPassword)
-
getLocked
public int getLocked()
-
setLocked
public void setLocked(int locked)
-
getAttempts
public int getAttempts()
-
setAttempts
public void setAttempts(int attempts)
-
getPasswordExpiry
public java.util.Date getPasswordExpiry()
-
setPasswordExpiry
public void setPasswordExpiry(java.util.Date passwordExpiry)
-
getEmailAddress
public java.lang.String getEmailAddress()
-
setEmailAddress
public void setEmailAddress(java.lang.String emailAddress)
-
getIsTemplate
public int getIsTemplate()
-
setIsTemplate
public void setIsTemplate(int isTemplate)
-
getRole
public int getRole()
-
setRole
public void setRole(int role)
-
getDowntimeInitiated
public int getDowntimeInitiated()
-
setDowntimeInitiated
public void setDowntimeInitiated(int downtimeInitiated)
-
getEncPass
public java.lang.String getEncPass()
-
setEncPass
public void setEncPass(java.lang.String encPass)
-
setEncodedPassword
public void setEncodedPassword(java.lang.String rawpass)
-
getTrainingExpirationDate
public java.util.Date getTrainingExpirationDate()
-
setTrainingExpirationDate
public void setTrainingExpirationDate(java.util.Date trainingExpirationDate)
-
getQualified
public int getQualified()
-
setQualified
public void setQualified(int qualified)
-
-