Class JpaAdminUser
java.lang.Object
com.broadleafcommerce.adminuser.user.provider.jpa.domain.JpaAdminUser
- All Implemented Interfaces:
com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware,com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware,com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable,Serializable
@Entity
public class JpaAdminUser
extends Object
implements Serializable, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
- Author:
- Nathan Moore (nathanmoore)., Samarth Dhruva (samarthd)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanorg.modelmapper.ModelMapperfromMe()protected org.modelmapper.Converter<JpaAdminUser,AdminUser> Class<?>getEmail()getId()getName()List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState>List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState>getNotificationStates(boolean fetch) getPhone()inthashCode()booleanisActive()booleanbooleanbooleanbooleanisGlobal()If true, this user is a global user, meaning that they can access the global applications.booleanIf true, this user can grant any authority, meaning that it can grant any roles or permissions to any users without needing to have those permissions itself.booleanisLocked()booleanbooleanDeprecated.voidpostToMe(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, Object businessDomain) voidsetActive(boolean active) voidsetApplicationAccess(boolean applicationAccess) voidsetApplicationIds(Set<String> applicationIds) voidsetChangePasswordRequired(boolean changePasswordRequired) voidsetDefaultApplicationId(String defaultApplicationId) voidsetDefaultCommunicationPreference(String defaultCommunicationPreference) voidsetDefaultTimeZone(String defaultTimeZone) voidvoidsetExpired(boolean expired) voidsetGlobal(boolean global) If true, this user is a global user, meaning that they can access the global applications.voidsetGrantAnyAuthorityAllowed(boolean grantAnyAuthorityAllowed) If true, this user can grant any authority, meaning that it can grant any roles or permissions to any users without needing to have those permissions itself.voidvoidsetLocked(boolean locked) voidvoidsetNotificationStates(List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> notificationStates) voidsetPermissionIds(Set<String> permissionIds) voidvoidsetRestrictedPermissions(Set<JpaAdminUserRestrictedPermission> restrictedPermissions) voidsetRestrictedRoles(Set<JpaAdminUserRestrictedRole> restrictedRoles) voidsetRestrictions(Set<JpaAdminUserRestriction> restrictions) voidsetRoleIds(Set<String> roleIds) voidsetTenantAccess(boolean tenantAccess) voidsetTenantId(String tenantId) voidsetTenantUser(boolean tenantUser) Deprecated.in favor oftenantAccessvoidsetUsername(String username) org.modelmapper.ModelMappertoMe()protected <U extends AdminUser,J extends JpaAdminUser>
JtoMePostConverter(org.modelmapper.spi.MappingContext<U, J> mappingContext) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
postFromMe, preFromMe, preToMeMethods inherited from interface com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
findNotificationState
-
Constructor Details
-
JpaAdminUser
public JpaAdminUser()
-
-
Method Details
-
setNotificationStates
public void setNotificationStates(List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> notificationStates) - Specified by:
setNotificationStatesin interfacecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
-
getNotificationStates
public List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> getNotificationStates()- Specified by:
getNotificationStatesin interfacecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
-
getNotificationStates
public List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> getNotificationStates(boolean fetch) - Specified by:
getNotificationStatesin interfacecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
-
fromMe
public org.modelmapper.ModelMapper fromMe()- Specified by:
fromMein interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
toMe
public org.modelmapper.ModelMapper toMe()- Specified by:
toMein interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
fromMePostConverter
-
toMePostConverter
protected <U extends AdminUser,J extends JpaAdminUser> J toMePostConverter(org.modelmapper.spi.MappingContext<U, J> mappingContext) Used as theTypeMap.setPostConverter(Converter)forJpaAdminUserintoMe().For each of the parent-user back-references in managed collections like
getRestrictions(),getRestrictedRoles(), andgetRestrictedPermissions()explicitly sets their value to the user instance being mapped.As documented in
TypeMap.include(Class, Class), extensions will not automatically inherit this converter, and must manually set it on the extended type map.- Parameters:
mappingContext- the model mapper mapping context- Returns:
- the persisted-domain user after setting each of its managed collection items' parent references to itself
-
postToMe
public void postToMe(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, Object businessDomain) - Specified by:
postToMein interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
getBusinessDomainType
- Specified by:
getBusinessDomainTypein interfacecom.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
-
getId
-
getName
-
getUsername
-
getEmail
-
getPhone
-
getDefaultCommunicationPreference
-
isActive
public boolean isActive() -
isChangePasswordRequired
public boolean isChangePasswordRequired() -
isLocked
public boolean isLocked() -
isExpired
public boolean isExpired() -
isGlobal
public boolean isGlobal()If true, this user is a global user, meaning that they can access the global applications. If not, the user can only access the applications they are assigned to viaapplicationIds.- Returns:
- true if the user is a global user which can access global applications, false if the user can only access applications they are assigned to
-
isGrantAnyAuthorityAllowed
public boolean isGrantAnyAuthorityAllowed()If true, this user can grant any authority, meaning that it can grant any roles or permissions to any users without needing to have those permissions itself. If false, it can only assign authorities that the user itself has, eitherdirectly assignedor inherited from#roles.- Returns:
- true if the admin user can grant any authority, false if the user can only grant authority that the user itself has
-
getRestrictions
- See Also:
-
AdminUser.restrictionsAdminRestriction
-
getRestrictedRoles
- See Also:
-
AdminUser.restrictedRolesAdminRestrictedRole
-
getRestrictedPermissions
- See Also:
-
AdminUser.restrictedPermissionsAdminRestrictedPermission
-
getApplicationIds
-
getDefaultApplicationId
-
getTenantId
-
isTenantUser
Deprecated.in favor oftenantAccess -
isTenantAccess
public boolean isTenantAccess() -
isApplicationAccess
public boolean isApplicationAccess() -
getRoleIds
-
getPermissionIds
-
getDefaultTimeZone
-
setId
-
setName
-
setUsername
-
setEmail
-
setPhone
-
setDefaultCommunicationPreference
-
setActive
public void setActive(boolean active) -
setChangePasswordRequired
public void setChangePasswordRequired(boolean changePasswordRequired) -
setLocked
public void setLocked(boolean locked) -
setExpired
public void setExpired(boolean expired) -
setGlobal
public void setGlobal(boolean global) If true, this user is a global user, meaning that they can access the global applications. If not, the user can only access the applications they are assigned to viaapplicationIds.- Parameters:
global- true if the user is a global user which can access global applications, false if the user can only access applications they are assigned to
-
setGrantAnyAuthorityAllowed
public void setGrantAnyAuthorityAllowed(boolean grantAnyAuthorityAllowed) If true, this user can grant any authority, meaning that it can grant any roles or permissions to any users without needing to have those permissions itself. If false, it can only assign authorities that the user itself has, eitherdirectly assignedor inherited from#roles.- Parameters:
grantAnyAuthorityAllowed- true if the user can grant any authority, false if the user can only grant authority that the user itself has
-
setRestrictions
- See Also:
-
AdminUser.restrictionsAdminRestriction
-
setRestrictedRoles
- See Also:
-
AdminUser.restrictedRolesAdminRestrictedRole
-
setRestrictedPermissions
- See Also:
-
AdminUser.restrictedPermissionsAdminRestrictedPermission
-
setApplicationIds
-
setDefaultApplicationId
-
setTenantId
-
setTenantUser
Deprecated.in favor oftenantAccess -
setTenantAccess
public void setTenantAccess(boolean tenantAccess) -
setApplicationAccess
public void setApplicationAccess(boolean applicationAccess) -
setRoleIds
-
setPermissionIds
-
setDefaultTimeZone
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-
tenantAccess