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 classUser.Rolestatic classUser.SupervisorLevelThe supervisor level of the operator.static classUser.SystemPrivilegesThe various options/privileges that can be set per user
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringassociatedIDAssociated ID for an operator for additional operator recognitionintattemptsThe amount of failed attempts the user has tried to access the systembyte[]avatarThe bytes for an image/icon representing the user.java.lang.StringcolorThe user color for this operator.intdowntimeInitiatedDetermines if the User is having downtime.java.lang.StringemailAddressThe Operators email addressjava.lang.StringencPassintisTemplateDetermines if this user is a templateintlockedIf the user account has been marked as locked, this will stop the user from being able to log injava.lang.StringpasswordThe unique 4 digit password for this operatorjava.util.DatepasswordExpiryThe Date in which the password will expireintqualifiedintroleWhat Role the Operator has in the system.SitesiteCan be used to allow users to only see data which pertains to a particular siteintsupervisorBoolean value to indicate whether the operators supervisor level.java.lang.DoubletargetPPHTarget packs per hour.java.util.DatetrainingExpirationDateIf set, together with config TrainingDateWarning=1, shows message after logging in of how many days user is permitted to use MESjava.lang.StringtwoStepPasswordThe password for this operatorjava.lang.Stringusername*Primary Key* The unique username of this operatorbyte[]userOptionsAutomatically generated preferences from machine learningbyte[]userPrivilegesUser 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.ColorgetActualColor()java.lang.StringgetAssociatedID()intgetAttempts()byte[]getAvatar()java.awt.image.BufferedImagegetBufferedAvatar()java.lang.StringgetColor()java.util.DategetDeleted()intgetDowntimeInitiated()java.lang.StringgetEmailAddress()java.lang.StringgetEncPass()intgetIsTemplate()intgetLocked()java.lang.StringgetPassword()java.util.DategetPasswordExpiry()intgetQualified()intgetRole()SitegetSite()intgetSupervisor()java.lang.DoublegetTargetPPH()java.util.DategetTrainingExpirationDate()java.lang.StringgetTwoStepPassword()java.lang.StringgetUsername()java.lang.StringgetUserOption(java.lang.String key)byte[]getUserPrivileges()java.lang.StringgetUserPrivileges(java.lang.String key)booleanisAllowed(User.SystemPrivileges privilege)voidsetActualColor(java.awt.Color color)voidsetAssociatedID(java.lang.String associatedID)voidsetAttempts(int attempts)voidsetAvatar(byte[] avatar)voidsetColor(java.lang.String color)voidsetDeleted(java.util.Date deleted)voidsetDowntimeInitiated(int downtimeInitiated)voidsetEmailAddress(java.lang.String emailAddress)voidsetEncodedPassword(java.lang.String rawpass)voidsetEncPass(java.lang.String encPass)voidsetIsTemplate(int isTemplate)voidsetLocked(int locked)voidsetPassword(java.lang.String password)voidsetPasswordExpiry(java.util.Date passwordExpiry)voidsetPrivileges(User.SystemPrivileges priv, boolean enabled)voidsetQualified(int qualified)voidsetRole(int role)voidsetSite(Site site)voidsetSupervisor(int supervisor)voidsetTargetPPH(java.lang.Double targetPPH)voidsetTrainingExpirationDate(java.util.Date trainingExpirationDate)voidsetTwoStepPassword(java.lang.String twoStepPassword)voidsetUsername(java.lang.String username)voidsetUserOption(java.lang.String key, java.lang.String value)voidsetUserOptions(byte[] userOptions)voidsetUserPrivilege(java.lang.String key, java.lang.String value)voidsetUserPrivileges(byte[] userPrivileges)voidstoreUserPrivileges()java.lang.StringtoString()-
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:
toStringin 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)
-
-