Class AuthenticationExceptionToLabelConverter
java.lang.Object
de.hybris.platform.cockpit.security.AuthenticationExceptionToLabelConverter
- All Implemented Interfaces:
Converter<org.springframework.security.core.AuthenticationException,,org.zkoss.zul.Label> org.springframework.core.convert.converter.Converter<org.springframework.security.core.AuthenticationException,org.zkoss.zul.Label>
public class AuthenticationExceptionToLabelConverter
extends Object
implements Converter<org.springframework.security.core.AuthenticationException,org.zkoss.zul.Label>
Converts the
AuthenticationException to a localized label key to be displayed on the login form. Use
configurable authenticationExceptionMessageMapping to match labels with authentication exception class.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.zkoss.zul.Labelconvert(org.springframework.security.core.AuthenticationException source) Converts the source object, creating a new instance of the destination typeorg.zkoss.zul.Labelconvert(org.springframework.security.core.AuthenticationException source, org.zkoss.zul.Label prototype) Convert the source object by filling the prototypeprotected StringvoidsetAuthenticationExceptionMessageMapping(Map<Class, String> authenticationExceptionMessageMapping) voidsetDefaultLabel(String defaultLabel) voidsetWarningExceptions(List<Class> warningExceptions) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.servicelayer.dto.converter.Converter
convertAll, convertAllIgnoreExceptions, getLoggerMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
AuthenticationExceptionToLabelConverter
public AuthenticationExceptionToLabelConverter()
-
-
Method Details
-
convert
public org.zkoss.zul.Label convert(org.springframework.security.core.AuthenticationException source) throws ConversionException Description copied from interface:ConverterConverts the source object, creating a new instance of the destination type- Specified by:
convertin interfaceConverter<org.springframework.security.core.AuthenticationException,org.zkoss.zul.Label> - Specified by:
convertin interfaceorg.springframework.core.convert.converter.Converter<org.springframework.security.core.AuthenticationException,org.zkoss.zul.Label> - Parameters:
source- the source object- Returns:
- the converted object
- Throws:
ConversionException- if an error occurs
-
getDefaultLabel
-
convert
public org.zkoss.zul.Label convert(org.springframework.security.core.AuthenticationException source, org.zkoss.zul.Label prototype) throws ConversionException Description copied from interface:ConverterConvert the source object by filling the prototype- Specified by:
convertin interfaceConverter<org.springframework.security.core.AuthenticationException,org.zkoss.zul.Label> - Parameters:
source- the source objectprototype- the prototype to fill- Returns:
- the converted object, identical to the prototype
- Throws:
ConversionException- if an error occurs
-
getAuthenticationExceptionMessageMapping
- Returns:
- the authenticationExceptionMessageMapping
-
setAuthenticationExceptionMessageMapping
public void setAuthenticationExceptionMessageMapping(Map<Class, String> authenticationExceptionMessageMapping) - Parameters:
authenticationExceptionMessageMapping- the authenticationExceptionMessageMapping to set
-
setDefaultLabel
- Parameters:
defaultLabel- the defaultLabel to set
-
getWarningExceptions
- Returns:
- the warningExceptions
-
setWarningExceptions
- Parameters:
warningExceptions- the warningExceptions to set
-