Package net.pricefx.domain
Class User
Object
DomainObject
PersistedObject
PartitionedObject
User
- All Implemented Interfaces:
Persistable
,RenameSoftDeletedInNameConflict
@Entity
public class User
extends PartitionedObject
implements RenameSoftDeletedInNameConflict
-
Nested Class Summary
Nested classes/interfaces inherited from class PersistedObject
PersistedObject.BatchDelete, PersistedObject.BulkloadFilterCheckCallback, PersistedObject.ComputedFieldMapping, PersistedObject.ComputedFields, PersistedObject.ImportManagerEnabled, PersistedObject.PersistedObjectMeta, PersistedObject.VirtualField, PersistedObject.VirtualFieldMapping, PersistedObject.VirtualSearchFields, PersistedObject.VirtualSortFields
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
protected static final String
Fields inherited from class PartitionedObject
FIELD_PARTITION, FIELD_PARTITIONID
Fields inherited from class PersistedObject
FIELD_CREATEDATE, FIELD_CREATEDBY, FIELD_DELETEDATE, FIELD_DELETEDBY, FIELD_ID, FIELD_ISDELETED, FIELD_LASTUPDATEDATE
Fields inherited from class DomainObject
DEFAULT_MAX_PACKET_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRelevantFilter
(Search search) void
auditOperation
(AuditOperation operation, User byUser, CommandContext context, PersistedObjectService objService, String details) Override this method to log certain object operationsboolean
canEdit
(User user, ValidationVisitor validationVisitor, PersistedObjectService objService, Map<String, Object> fieldsToEdit) 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.boolean
checkPassword
(String clearTextPassword) This method checks if a passed clearText password matches the stored password hash@NotNull String
void
Gets all groups of a user including those assigned by a business roleTHIS SHOULD NOT BE USED IN CODE!.Set
<Role> Gets all roles of a user including those assigned by a business roleList
<BusinessRole> getEmail()
Set
<Permission> THIS SHOULD NOT BE USED IN CODE!.List
<Role> getRoles()
String[]
The fields that represent the business key of the object, seePersistedObject.getBusinessKey()
.boolean
hasModuleAccess
(ApplicationModule module) boolean
Override this to enable audit calls on this objectboolean
boolean
boolean
void
onSavedOrUpdated
(PersistedObjectService objService) void
onSaveOrUpdate
(PersistedObjectService objService) Default does nothing.void
renameSoftDeleted
(PersistedObjectService objService) void
setActivated
(Boolean activated) void
setAdditionalInfo1
(BigDecimal additionalInfo1) void
setAdditionalInfo2
(BigDecimal additionalInfo2) void
setAdditionalInfo3
(String additionalInfo3) void
setAdditionalInfo4
(String additionalInfo4) void
setBusinessRoles
(List<BusinessRole> businessroles) void
setCustomerFilterCriteria
(String customerFilterCriteria) void
setDefaultUserGroupEdit
(String defaultUserGroup) void
setDefaultUserGroupViewDetails
(String defaultUserViewDetails) void
void
setEmailLocale
(String emailLocale) void
setExtendedData
(Map<String, Object> extendedData) void
setFirstName
(String firstName) void
void
setLastLogin
(LocalDateTime lastLogin) void
setLastName
(String lastName) void
setLastTermsOfUseAgreedDate
(LocalDateTime lastTermsOfUseAgreedDate) void
setLastTermsOfUseVersionAgreed
(String lastTermsOfUseVersionAgreed) void
setLoginName
(String name) void
setNoSession
(Boolean noSession) void
setPassword
(String clearTextPassword) This convenience method accepts a clear-text password The password will be hashed using the password servicevoid
setPasswordExpiry
(LocalDateTime passwordExpiry) void
setPasswordHash
(String passwordHash) void
setPasswordSalt
(String passwordSalt) void
setPlatformManaged
(Boolean platformManaged) void
setProductFilterCriteria
(String productFilterExpression) void
setReceiveAdminEmail
(Boolean receiveAdminEmail) void
setRequireTFA
(Boolean requireTFA) void
void
setSellerFilterCriteria
(String sellerFilterCriteria) void
setSsoOnly
(Boolean ssoOnly) void
setUniqueLoginName
(String name) void
setWizardDashboardName
(String wizardDashboardName) void
setWorkflowEmailingActivated
(Boolean workflowEmailingActivated) boolean
validate
(ValidationVisitor validationVisitor, PersistedObjectService objService) Override to implement per-object validation rulesMethods inherited from class PartitionedObject
addUniqueConstraint, getLoginNameByUserId, getPartition, setPartition, toString
Methods inherited from class PersistedObject
bumpVersion, canAdd, canDelete, canEdit, canRead, createDate, doHardDelete, entityIsSafeInserted, entityIsSafeInserted, findAnnotationRecursively, getBulkloadMap, getBusinessKey, getCreateDate, getCreatedBy, getDbColumnNameForField, getDefaultSortKey, getDeleteDate, getDeletedBy, getId, getLastUpdateBy, getLastUpdateDate, getTypeCode, getTypedId, getVersion, getVirtualFieldMappings, isDeleted, isVirtualField, notifyOnBusinessKeyChange, onBusinessKeyChange, onDelete, setCreateDate, setCreateDateShouldBeIgnored, setCreateDateTime, setCreatedBy, setDeleted, setDeleteDate, setDeletedBy, setId, setLastUpdateBy, setLastUpdateDate, setLastUpdateDateTime, setTypedId, setVersion, userGroupEditBulkloadFilter, userGroupEditBulkloadFilter
Methods inherited from class DomainObject
deepCopy, getNewMidnightDate, getNewMidnightDateTime, isMidnight, isMidnight, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonDeserialize, jsonSerialize, jsonSerialize, jsonSerialize, jsonSerialize, jsonSerialize, jsonSerialize, jsonSerializedSizeOK, jsonSerializeToBytes, jsonSerializeToBytes, setToDayEnd, setToDayEnd, setToMidnight, setToMidnight, setToMidnightAsLocalDateTime, toPropertyMap
-
Field Details
-
CACHE_REGION_NAME
- See Also:
-
FIELD_ACTIVATED
- See Also:
-
FIELD_EMAIL
- See Also:
-
FIELD_LOGINNAME
- See Also:
-
SYSTEM_USER_NAME
- See Also:
-
SYSTEM_SUPPORT_USER_NAME
- See Also:
-
NEW_PASSWORD_HASH
-
NEW_PASSWORD_NOSESSION_HASH
-
UNKNOWN_HASH
- See Also:
-
-
Constructor Details
-
User
public User() -
User
public User(Partition partition) -
User
-
-
Method Details
-
getSignificantFields
Description copied from class:net.pricefx.domain.PersistedObject
The fields that represent the business key of the object, seePersistedObject.getBusinessKey()
. For some objects, the business key is dynamically generated instead, seeDynamicBusinessKeyObject
.- Overrides:
getSignificantFields
in classPersistedObject
-
getFirstName
-
setFirstName
-
getLastName
-
setLastName
-
computeFullName
-
getEmail
-
setEmail
-
getDefaultUserGroupEdit
-
setDefaultUserGroupEdit
-
getDefaultUserGroupViewDetails
-
setDefaultUserGroupViewDetails
-
getNoSession
-
getRequireTFA
-
setRequireTFA
-
getSsoOnly
-
setSsoOnly
-
getReceiveAdminEmail
-
setReceiveAdminEmail
-
setNoSession
-
getPlatformManaged
-
setPlatformManaged
-
passwordExpiry
-
getPasswordExpiry
-
setPasswordExpiry
-
getPasswordHash
-
setPasswordHash
-
getPasswordSalt
-
setPasswordSalt
-
isSystemUser
public boolean isSystemUser() -
getExtendedData
-
setExtendedData
-
getWizardDashboardName
-
setWizardDashboardName
-
setPassword
This convenience method accepts a clear-text password The password will be hashed using the password service- Parameters:
clearTextPassword
-
-
checkPassword
This method checks if a passed clearText password matches the stored password hash- Parameters:
clearTextPassword
-- Returns:
- true is passwords match
-
getHashMethod
-
getRoles
-
getRoleNames
THIS SHOULD NOT BE USED IN CODE!. Only here for jackson Use : AuthUtil.userHasRole(Role.WF_ADMIN, currentUser)- Returns:
-
getAllRoleNames
THIS SHOULD NOT BE USED IN CODE!. Only here for jackson Use : AuthUtil.userHasRole(Role.WF_ADMIN, currentUser)- Returns:
-
getAllRoles
Gets all roles of a user including those assigned by a business role- Returns:
- All roles or empty list. Never null.
-
setRoles
-
getGroups
-
getAllGroups
Gets all groups of a user including those assigned by a business role- Returns:
- All groups or empty list. Never null.
-
setGroups
-
getBusinessRoles
-
setBusinessRoles
-
isActivated
-
setActivated
-
isWorkflowEmailingActivated
-
setWorkflowEmailingActivated
-
getLastLogin
-
lastUpdateDate
- Overrides:
lastUpdateDate
in classPersistedObject
-
setLastLogin
-
isFirstLogin
public boolean isFirstLogin() -
getFQLoginName
-
getLoginName
-
setLoginName
-
setUniqueLoginName
-
getAdditionalInfo1
-
setAdditionalInfo1
-
getAdditionalInfo2
-
setAdditionalInfo2
-
getAdditionalInfo3
-
setAdditionalInfo3
-
getAdditionalInfo4
-
setAdditionalInfo4
-
getEmailLocale
-
setEmailLocale
-
getProductFilterCriteria
-
setProductFilterCriteria
-
getCustomerFilterCriteria
-
setCustomerFilterCriteria
-
getSellerFilterCriteria
-
setSellerFilterCriteria
-
getLastTermsOfUseVersionAgreed
-
setLastTermsOfUseVersionAgreed
-
getLastTermsOfUseAgreedDate
-
setLastTermsOfUseAgreedDate
-
addRelevantFilter
public void addRelevantFilter(Search search) -
getSkuFilter
-
getCustomerFilter
-
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 classPersistedObject
- Parameters:
operation
- a descriptive string that classifies the operation typebyUser
- 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 classPersistedObject
-
isInGroup
-
renameSoftDeleted
public void renameSoftDeleted(PersistedObjectService objService) - Specified by:
renameSoftDeleted
in interfaceRenameSoftDeletedInNameConflict
-
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 interfacePersistable
- Overrides:
validate
in classPartitionedObject
- Parameters:
validationVisitor
- visitor object that receives validation error detailsobjService
- 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 classPersistedObject
- Parameters:
user
- that requests edit accessvalidationVisitor
- 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 classPersistedObject
-
onSavedOrUpdated
public void onSavedOrUpdated(PersistedObjectService objService) - Overrides:
onSavedOrUpdated
in classPersistedObject
-
emitUserUpdateActionAfterCommit
public void emitUserUpdateActionAfterCommit() -
getPermissions
-