Class User

Object
DomainObject
PersistedObject
PartitionedObject
User
All Implemented Interfaces:
Persistable, RenameSoftDeletedInNameConflict

@Entity public class User extends PartitionedObject implements RenameSoftDeletedInNameConflict
  • Field Details

  • Constructor Details

    • User

      public User()
    • User

      public User(Partition partition)
    • User

      public User(Partition partition, String loginName, String firstName, String lastName, String clearTextPassword)
  • Method Details

    • getSignificantFields

      public String[] getSignificantFields()
      Description copied from class: net.pricefx.domain.PersistedObject
      The fields that represent the business key of the object, see PersistedObject.getBusinessKey(). For some objects, the business key is dynamically generated instead, see DynamicBusinessKeyObject.
      Overrides:
      getSignificantFields in class PersistedObject
    • getFirstName

      public String getFirstName()
    • setFirstName

      public void setFirstName(String firstName)
    • getLastName

      public String getLastName()
    • setLastName

      public void setLastName(String lastName)
    • computeFullName

      @NotNull public @NotNull String computeFullName()
    • getEmail

      public String getEmail()
    • setEmail

      public void setEmail(String email)
    • getDefaultUserGroupEdit

      public String getDefaultUserGroupEdit()
    • setDefaultUserGroupEdit

      public void setDefaultUserGroupEdit(String defaultUserGroup)
    • getDefaultUserGroupViewDetails

      public String getDefaultUserGroupViewDetails()
    • setDefaultUserGroupViewDetails

      public void setDefaultUserGroupViewDetails(String defaultUserViewDetails)
    • getNoSession

      public Boolean getNoSession()
    • getRequireTFA

      public Boolean getRequireTFA()
    • setRequireTFA

      public void setRequireTFA(Boolean requireTFA)
    • getSsoOnly

      public Boolean getSsoOnly()
    • setSsoOnly

      public void setSsoOnly(Boolean ssoOnly)
    • getReceiveAdminEmail

      public Boolean getReceiveAdminEmail()
    • setReceiveAdminEmail

      public void setReceiveAdminEmail(Boolean receiveAdminEmail)
    • setNoSession

      public void setNoSession(Boolean noSession)
    • getPlatformManaged

      public Boolean getPlatformManaged()
    • setPlatformManaged

      public void setPlatformManaged(Boolean platformManaged)
    • passwordExpiry

      public String passwordExpiry()
    • getPasswordExpiry

      public LocalDateTime getPasswordExpiry()
    • setPasswordExpiry

      public void setPasswordExpiry(LocalDateTime passwordExpiry)
    • getPasswordHash

      public String getPasswordHash()
    • setPasswordHash

      public void setPasswordHash(String passwordHash)
    • getPasswordSalt

      public String getPasswordSalt()
    • setPasswordSalt

      public void setPasswordSalt(String passwordSalt)
    • isSystemUser

      public boolean isSystemUser()
    • getExtendedData

      public Map<String,Object> getExtendedData()
    • setExtendedData

      public void setExtendedData(Map<String,Object> extendedData)
    • getWizardDashboardName

      public String getWizardDashboardName()
    • setWizardDashboardName

      public void setWizardDashboardName(String wizardDashboardName)
    • setPassword

      public void setPassword(String clearTextPassword)
      This convenience method accepts a clear-text password The password will be hashed using the password service
      Parameters:
      clearTextPassword -
    • checkPassword

      public boolean checkPassword(String clearTextPassword)
      This method checks if a passed clearText password matches the stored password hash
      Parameters:
      clearTextPassword -
      Returns:
      true is passwords match
    • getHashMethod

      public String getHashMethod()
    • getRoles

      public List<Role> getRoles()
    • getRoleNames

      public List<String> getRoleNames()
      THIS SHOULD NOT BE USED IN CODE!. Only here for jackson Use : AuthUtil.userHasRole(Role.WF_ADMIN, currentUser)
      Returns:
    • getAllRoleNames

      public Set<String> getAllRoleNames()
      THIS SHOULD NOT BE USED IN CODE!. Only here for jackson Use : AuthUtil.userHasRole(Role.WF_ADMIN, currentUser)
      Returns:
    • getAllRoles

      public Set<Role> getAllRoles()
      Gets all roles of a user including those assigned by a business role
      Returns:
      All roles or empty list. Never null.
    • setRoles

      public void setRoles(List<Role> roles)
    • getGroups

      public List<UserGroup> getGroups()
    • getAllGroups

      public Set<UserGroup> getAllGroups()
      Gets all groups of a user including those assigned by a business role
      Returns:
      All groups or empty list. Never null.
    • setGroups

      public void setGroups(List<UserGroup> groups)
    • getBusinessRoles

      public List<BusinessRole> getBusinessRoles()
    • setBusinessRoles

      public void setBusinessRoles(List<BusinessRole> businessroles)
    • isActivated

      public Boolean isActivated()
    • setActivated

      public void setActivated(Boolean activated)
    • isWorkflowEmailingActivated

      public Boolean isWorkflowEmailingActivated()
    • setWorkflowEmailingActivated

      public void setWorkflowEmailingActivated(Boolean workflowEmailingActivated)
    • getLastLogin

      public LocalDateTime getLastLogin()
    • lastUpdateDate

      public String lastUpdateDate()
      Overrides:
      lastUpdateDate in class PersistedObject
    • setLastLogin

      public void setLastLogin(LocalDateTime lastLogin)
    • isFirstLogin

      public boolean isFirstLogin()
    • getFQLoginName

      public String getFQLoginName()
    • getLoginName

      public String getLoginName()
    • setLoginName

      public void setLoginName(String name)
    • setUniqueLoginName

      public void setUniqueLoginName(String name)
    • getAdditionalInfo1

      public BigDecimal getAdditionalInfo1()
    • setAdditionalInfo1

      public void setAdditionalInfo1(BigDecimal additionalInfo1)
    • getAdditionalInfo2

      public BigDecimal getAdditionalInfo2()
    • setAdditionalInfo2

      public void setAdditionalInfo2(BigDecimal additionalInfo2)
    • getAdditionalInfo3

      public String getAdditionalInfo3()
    • setAdditionalInfo3

      public void setAdditionalInfo3(String additionalInfo3)
    • getAdditionalInfo4

      public String getAdditionalInfo4()
    • setAdditionalInfo4

      public void setAdditionalInfo4(String additionalInfo4)
    • getEmailLocale

      public String getEmailLocale()
    • setEmailLocale

      public void setEmailLocale(String emailLocale)
    • getProductFilterCriteria

      public String getProductFilterCriteria()
    • setProductFilterCriteria

      public void setProductFilterCriteria(String productFilterExpression)
    • getCustomerFilterCriteria

      public String getCustomerFilterCriteria()
    • setCustomerFilterCriteria

      public void setCustomerFilterCriteria(String customerFilterCriteria)
    • getSellerFilterCriteria

      public String getSellerFilterCriteria()
    • setSellerFilterCriteria

      public void setSellerFilterCriteria(String sellerFilterCriteria)
    • getLastTermsOfUseVersionAgreed

      public String getLastTermsOfUseVersionAgreed()
    • setLastTermsOfUseVersionAgreed

      public void setLastTermsOfUseVersionAgreed(String lastTermsOfUseVersionAgreed)
    • getLastTermsOfUseAgreedDate

      public LocalDateTime getLastTermsOfUseAgreedDate()
    • setLastTermsOfUseAgreedDate

      public void setLastTermsOfUseAgreedDate(LocalDateTime lastTermsOfUseAgreedDate)
    • addRelevantFilter

      public void addRelevantFilter(Search search)
    • getSkuFilter

      public Filter getSkuFilter()
    • getCustomerFilter

      public Filter getCustomerFilter()
    • getSellerFilter

      public Filter getSellerFilter()
    • hasModuleAccess

      public boolean hasModuleAccess(ApplicationModule module)
    • auditOperation

      public void auditOperation(AuditOperation operation, User byUser, CommandContext context, PersistedObjectService objService, String details)
      Description copied from class: net.pricefx.domain.PersistedObject
      Override this method to log certain object operations
      Overrides:
      auditOperation in class PersistedObject
      Parameters:
      operation - a descriptive string that classifies the operation type
      byUser - the user that requested the operation
    • isAudited

      public boolean isAudited()
      Description copied from class: net.pricefx.domain.PersistedObject
      Override this to enable audit calls on this object
      Overrides:
      isAudited in class PersistedObject
    • isInGroup

      public boolean isInGroup(UserGroup userGroup)
    • renameSoftDeleted

      public void renameSoftDeleted(PersistedObjectService objService)
      Specified by:
      renameSoftDeleted in interface RenameSoftDeletedInNameConflict
    • validate

      public boolean validate(ValidationVisitor validationVisitor, PersistedObjectService objService)
      Description copied from class: net.pricefx.domain.PersistedObject
      Override to implement per-object validation rules
      Specified by:
      validate in interface Persistable
      Overrides:
      validate in class PartitionedObject
      Parameters:
      validationVisitor - visitor object that receives validation error details
      objService - PersistedObjectService instance. May be null, so be cautious when requiring it
    • canEdit

      public boolean canEdit(User user, ValidationVisitor validationVisitor, PersistedObjectService objService, Map<String,Object> fieldsToEdit)
      Description copied from class: net.pricefx.domain.PersistedObject
      Override this method to do edit-ability checks based on request details and object data (or related object data) and new data from request In case of a false return value a validation error should be added.
      Overrides:
      canEdit in class PersistedObject
      Parameters:
      user - that requests edit access
      validationVisitor - receives any "not allowed messages"
      objService - needed for cross object edit-ability checks. Implemented as parameter to optimize performance (vs. new object creation)
      fieldsToEdit - fields and their values that are about to be modified. To implement more fine-grained edit-ability checks (like e.g. allow tree repositioning while the object is otherwise locked)
      Returns:
      true if edit is allowed, false otherwise
    • onSaveOrUpdate

      public void onSaveOrUpdate(PersistedObjectService objService)
      Description copied from class: net.pricefx.domain.PersistedObject
      Default does nothing. Method is called when object is about to be saved or updated Override point
      Overrides:
      onSaveOrUpdate in class PersistedObject
    • onSavedOrUpdated

      public void onSavedOrUpdated(PersistedObjectService objService)
      Overrides:
      onSavedOrUpdated in class PersistedObject
    • emitUserUpdateActionAfterCommit

      public void emitUserUpdateActionAfterCommit()
    • getPermissions

      public Set<Permission> getPermissions()