Class PunchOutCredentialValidateInterceptor
- java.lang.Object
-
- de.hybris.platform.b2b.punchout.interceptor.PunchOutCredentialValidateInterceptor
-
- All Implemented Interfaces:
Interceptor,ValidateInterceptor
public class PunchOutCredentialValidateInterceptor extends java.lang.Object implements ValidateInterceptor
Validator for entityPunchOutCredential.
-
-
Constructor Summary
Constructors Constructor Description PunchOutCredentialValidateInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidexistentCredential(PunchOutCredentialModel credential)Check if there is already a credential for the same domain and identity in the system.protected L10NServicegetL10NService()PunchOutCredentialServicegetPunchOutCredentialService()protected java.lang.StringlocalizeForKey(java.lang.String key)voidonValidate(java.lang.Object model, InterceptorContext ctx)Called in themodelService.saveAll()method.voidsetL10NService(L10NService l10NService)voidsetPunchOutCredentialService(PunchOutCredentialService punchOutCredentialService)
-
-
-
Method Detail
-
onValidate
public void onValidate(java.lang.Object model, InterceptorContext ctx) throws InterceptorExceptionDescription copied from interface:ValidateInterceptorCalled in themodelService.saveAll()method. Validates the values of the given model.- Specified by:
onValidatein interfaceValidateInterceptor- Parameters:
model- the model which values has to be validatedctx- theInterceptorContext- Throws:
InterceptorException- if any values of the model are not valid.
-
existentCredential
protected void existentCredential(PunchOutCredentialModel credential) throws InterceptorException
Check if there is already a credential for the same domain and identity in the system.- Parameters:
credential- The credential to be checked.- Throws:
InterceptorException- If there is already an existent credential for the same main values.
-
localizeForKey
protected java.lang.String localizeForKey(java.lang.String key)
-
getL10NService
protected L10NService getL10NService()
-
setL10NService
public void setL10NService(L10NService l10NService)
-
getPunchOutCredentialService
public PunchOutCredentialService getPunchOutCredentialService()
-
setPunchOutCredentialService
public void setPunchOutCredentialService(PunchOutCredentialService punchOutCredentialService)
-
-