public class B2BCustomerPunchOutCredentialMappingValidateInterceptor extends java.lang.Object implements ValidateInterceptor
B2BCustomerPunchOutCredentialMapping.| Constructor and Description |
|---|
B2BCustomerPunchOutCredentialMappingValidateInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
B2BCustomerService<B2BCustomerModel,B2BUnitModel> |
getCustomerService() |
protected L10NService |
getL10NService() |
PunchOutCredentialService |
getPunchOutCredentialService() |
protected void |
hasCredentials(B2BCustomerPunchOutCredentialMappingModel mapping)
Checks if there are credentials in the mapping.
|
protected void |
isCredentialAlreadyExistent(B2BCustomerPunchOutCredentialMappingModel mapping)
Checks if the credentials in the mapping are not already set to another mapping.
|
protected void |
isCustomerExistent(B2BCustomerPunchOutCredentialMappingModel mapping)
Checks if the B2B Customer on the mapping exists on the system.
|
protected java.lang.String |
localizeForKey(java.lang.String key) |
void |
onValidate(java.lang.Object model,
InterceptorContext ctx)
Called in the
modelService.saveAll() method. |
void |
setCustomerService(B2BCustomerService<B2BCustomerModel,B2BUnitModel> customerService) |
void |
setL10NService(L10NService l10NService) |
void |
setPunchOutCredentialService(PunchOutCredentialService punchOutCredentialService) |
public B2BCustomerPunchOutCredentialMappingValidateInterceptor()
public void onValidate(java.lang.Object model,
InterceptorContext ctx)
throws InterceptorException
ValidateInterceptormodelService.saveAll() method. Validates the values of the given model.onValidate in interface ValidateInterceptormodel - the model which values has to be validatedctx - the InterceptorContextInterceptorException - if any values of the model are not valid.protected void isCustomerExistent(B2BCustomerPunchOutCredentialMappingModel mapping) throws InterceptorException
mapping - The mapping that contains the customer.InterceptorException - If B2B Customer does not exists.protected void hasCredentials(B2BCustomerPunchOutCredentialMappingModel mapping) throws InterceptorException
mapping - The mapping that should contain a set of credentials.InterceptorException - If the mapping does not contain any credentials.protected void isCredentialAlreadyExistent(B2BCustomerPunchOutCredentialMappingModel mapping) throws InterceptorException
mapping - The current mapping to be verified.InterceptorException - If at least one of the credentials on the mapping is already in use by another mapping.protected java.lang.String localizeForKey(java.lang.String key)
protected L10NService getL10NService()
public void setL10NService(L10NService l10NService)
public PunchOutCredentialService getPunchOutCredentialService()
public void setPunchOutCredentialService(PunchOutCredentialService punchOutCredentialService)
public B2BCustomerService<B2BCustomerModel,B2BUnitModel> getCustomerService()
public void setCustomerService(B2BCustomerService<B2BCustomerModel,B2BUnitModel> customerService)
Copyright © 2018 SAP SE. All Rights Reserved.