Class JpaAuthorizationServer

java.lang.Object
com.broadleafcommerce.auth.server.provider.jpa.domain.JpaAuthorizationServer
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, Serializable

@Entity public class JpaAuthorizationServer extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
See Also:
  • Constructor Details

    • JpaAuthorizationServer

      public JpaAuthorizationServer()
  • Method Details

    • getBusinessDomainType

      public Class<?> getBusinessDomainType()
      Specified by:
      getBusinessDomainType in interface com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
    • fromMe

      public org.modelmapper.ModelMapper fromMe()
      Specified by:
      fromMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
    • fromMePostConverter

      protected AuthorizationServer fromMePostConverter(org.modelmapper.spi.MappingContext<JpaAuthorizationServer,AuthorizationServer> mappingContext)
      Used as the TypeMap.setPostConverter(Converter) for fromMe().

      JPA will eagerly fetch defaultUserRoles and defaultUserPermissions if they exist in the data store, but we have a soft-deletion concept that JPA does not account for. This ensures that any references to entities that have been archived are pruned before being mapped to the business domain. This protects against those entities being usable despite being archived.

      In addition, handles mapping optional boolean values

      Parameters:
      mappingContext - the model mapper mapping context
      Returns:
      the business-domain user after removing any references to archived records
    • toMe

      public org.modelmapper.ModelMapper toMe()
      Specified by:
      toMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
    • toMePostConverter

      @NotNull protected @NotNull org.modelmapper.Converter<AuthorizationServer,JpaAuthorizationServer> toMePostConverter()
    • getId

      public String getId()
    • getTenantId

      public String getTenantId()
    • getName

      public String getName()
    • getFriendlyName

      public String getFriendlyName()
    • getInactivityTimeoutSeconds

      public Integer getInactivityTimeoutSeconds()
    • getRequireLoginTimeoutSeconds

      public Integer getRequireLoginTimeoutSeconds()
    • getTemplatePath

      public String getTemplatePath()
    • isSsoEnabled

      public boolean isSsoEnabled()
    • isCrossOrigin

      public boolean isCrossOrigin()
    • getDefaultUserRoles

      public Set<JpaUserRole> getDefaultUserRoles()
    • getDefaultUserPermissions

      public Set<JpaUserPermission> getDefaultUserPermissions()
    • getAttributes

      public Map<String,Object> getAttributes()
    • getDefaultRedirectUri

      public String getDefaultRedirectUri()
    • getFailedLoginAttemptsAllowed

      public Integer getFailedLoginAttemptsAllowed()
    • getLockoutDurationMinutes

      public Long getLockoutDurationMinutes()
    • getLoginFailDecayMinutes

      public Long getLoginFailDecayMinutes()
    • isEmbeddedLoginEnabled

      public boolean isEmbeddedLoginEnabled()
    • getResetPasswordUnlocksUser

      public Boolean getResetPasswordUnlocksUser()
    • getLockedUserCanResetPassword

      public Boolean getLockedUserCanResetPassword()
    • setId

      public void setId(String id)
    • setTenantId

      public void setTenantId(String tenantId)
    • setName

      public void setName(String name)
    • setFriendlyName

      public void setFriendlyName(String friendlyName)
    • setInactivityTimeoutSeconds

      public void setInactivityTimeoutSeconds(Integer inactivityTimeoutSeconds)
    • setRequireLoginTimeoutSeconds

      public void setRequireLoginTimeoutSeconds(Integer requireLoginTimeoutSeconds)
    • setTemplatePath

      public void setTemplatePath(String templatePath)
    • setSsoEnabled

      public void setSsoEnabled(boolean ssoEnabled)
    • setCrossOrigin

      public void setCrossOrigin(boolean crossOrigin)
    • setDefaultUserRoles

      public void setDefaultUserRoles(Set<JpaUserRole> defaultUserRoles)
    • setDefaultUserPermissions

      public void setDefaultUserPermissions(Set<JpaUserPermission> defaultUserPermissions)
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
    • setDefaultRedirectUri

      public void setDefaultRedirectUri(String defaultRedirectUri)
    • setFailedLoginAttemptsAllowed

      public void setFailedLoginAttemptsAllowed(Integer failedLoginAttemptsAllowed)
    • setLockoutDurationMinutes

      public void setLockoutDurationMinutes(Long lockoutDurationMinutes)
    • setLoginFailDecayMinutes

      public void setLoginFailDecayMinutes(Long loginFailDecayMinutes)
    • setEmbeddedLoginEnabled

      public void setEmbeddedLoginEnabled(boolean embeddedLoginEnabled)
    • setResetPasswordUnlocksUser

      public void setResetPasswordUnlocksUser(Boolean resetPasswordUnlocksUser)
    • setLockedUserCanResetPassword

      public void setLockedUserCanResetPassword(Boolean lockedUserCanResetPassword)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object