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 boolean
boolean
org.modelmapper.ModelMapper
fromMe()
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()
int
hashCode()
boolean
isActive()
boolean
boolean
boolean
boolean
isGlobal()
If true, this user is a global user, meaning that they can access the global applications.boolean
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.boolean
isLocked()
boolean
boolean
Deprecated.void
postToMe
(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, Object businessDomain) void
setActive
(boolean active) void
setApplicationAccess
(boolean applicationAccess) void
setApplicationIds
(Set<String> applicationIds) void
setChangePasswordRequired
(boolean changePasswordRequired) void
setDefaultApplicationId
(String defaultApplicationId) void
setDefaultCommunicationPreference
(String defaultCommunicationPreference) void
setDefaultTimeZone
(String defaultTimeZone) void
void
setExpired
(boolean expired) void
setGlobal
(boolean global) If true, this user is a global user, meaning that they can access the global applications.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.void
void
setLocked
(boolean locked) void
void
setNotificationStates
(List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> notificationStates) void
setPermissionIds
(Set<String> permissionIds) void
void
setRestrictedPermissions
(Set<JpaAdminUserRestrictedPermission> restrictedPermissions) void
setRestrictedRoles
(Set<JpaAdminUserRestrictedRole> restrictedRoles) void
setRestrictions
(Set<JpaAdminUserRestriction> restrictions) void
setRoleIds
(Set<String> roleIds) void
setTenantAccess
(boolean tenantAccess) void
setTenantId
(String tenantId) void
setTenantUser
(boolean tenantUser) Deprecated.in favor oftenantAccess
void
setUsername
(String username) org.modelmapper.ModelMapper
toMe()
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, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
postFromMe, preFromMe, preToMe
Methods 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:
setNotificationStates
in interfacecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
-
getNotificationStates
public List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> getNotificationStates()- Specified by:
getNotificationStates
in interfacecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
-
getNotificationStates
public List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> getNotificationStates(boolean fetch) - Specified by:
getNotificationStates
in interfacecom.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
-
fromMe
public org.modelmapper.ModelMapper fromMe()- Specified by:
fromMe
in interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
toMe
public org.modelmapper.ModelMapper toMe()- Specified by:
toMe
in 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)
forJpaAdminUser
intoMe()
.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:
postToMe
in interfacecom.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
-
getBusinessDomainType
- Specified by:
getBusinessDomainType
in 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 assigned
or 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.restrictions
AdminRestriction
-
getRestrictedRoles
- See Also:
-
AdminUser.restrictedRoles
AdminRestrictedRole
-
getRestrictedPermissions
- See Also:
-
AdminUser.restrictedPermissions
AdminRestrictedPermission
-
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 assigned
or 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.restrictions
AdminRestriction
-
setRestrictedRoles
- See Also:
-
AdminUser.restrictedRoles
AdminRestrictedRole
-
setRestrictedPermissions
- See Also:
-
AdminUser.restrictedPermissions
AdminRestrictedPermission
-
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