Class ApplicationValidator
java.lang.Object
com.broadleafcommerce.tenant.service.validation.ApplicationValidator
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
public class ApplicationValidator
extends Object
implements com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
Validations for
Application
.- Author:
- Samarth Dhruva (samarthd)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
fetchAndValidateIsolatedCatalogs
(Application application, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Performs deeper validation on existence and vendor-associations of assigned isolated catalogs.protected com.broadleafcommerce.data.tracking.core.tenant.service.ApplicationConfigurationProperties
protected CatalogService<Catalog>
Lazy injection to avoid circular dependency exceptions.protected TenantApplicationProperties
Deprecated.void
setApplicationConfigurationProperties
(com.broadleafcommerce.data.tracking.core.tenant.service.ApplicationConfigurationProperties applicationConfigurationProperties) void
setCatalogService
(CatalogService<Catalog> catalogService) Lazy injection to avoid circular dependency exceptions.void
setTenantApplicationProperties
(TenantApplicationProperties tenantApplicationProperties) Deprecated.in favor ofApplicationConfigurationProperties
boolean
supports
(Class<?> serviceClass, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) void
validate
(Object businessInstance, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected void
validateIdentifierType
(org.springframework.validation.Errors errors) protected void
validateIdentifierValue
(org.springframework.validation.Errors errors) protected void
validateIsolatedCatalogs
(Application application, org.springframework.validation.Errors errors) This just performs basic field validations on the requested isolated catalogs.protected void
validateName
(org.springframework.validation.Errors errors) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
validateForCreate, validateForReplace, validateForUpdate
-
Constructor Details
-
ApplicationValidator
public ApplicationValidator()
-
-
Method Details
-
supports
public boolean supports(Class<?> serviceClass, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
supports
in interfacecom.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
-
validate
public void validate(@NonNull Object businessInstance, @NonNull org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
validate
in interfacecom.broadleafcommerce.data.tracking.core.mapping.validation.EntityValidator
-
validateName
protected void validateName(org.springframework.validation.Errors errors) -
validateIdentifierType
protected void validateIdentifierType(org.springframework.validation.Errors errors) -
validateIdentifierValue
protected void validateIdentifierValue(org.springframework.validation.Errors errors) -
validateIsolatedCatalogs
protected void validateIsolatedCatalogs(Application application, org.springframework.validation.Errors errors) This just performs basic field validations on the requested isolated catalogs. For deeper validations, seefetchAndValidateIsolatedCatalogs(Application, Errors, ContextInfo)
.- Parameters:
application
- the application whose isolated catalogs should be validatederrors
- errors instance on which to register errors
-
fetchAndValidateIsolatedCatalogs
protected void fetchAndValidateIsolatedCatalogs(Application application, org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Performs deeper validation on existence and vendor-associations of assigned isolated catalogs. Should only be run after all other basic field validations pass, such asvalidateIsolatedCatalogs(Application, Errors)
.- Parameters:
application
- the application whose isolated catalogs should be validatederrors
- errors instance on which to register errorscontextInfo
- context information around multitenant state
-
getCatalogService
Lazy injection to avoid circular dependency exceptions. -
setCatalogService
Lazy injection to avoid circular dependency exceptions. -
getTenantApplicationProperties
Deprecated.in favor ofApplicationConfigurationProperties
-
setTenantApplicationProperties
@Deprecated @Autowired public void setTenantApplicationProperties(TenantApplicationProperties tenantApplicationProperties) Deprecated.in favor ofApplicationConfigurationProperties
-
getApplicationConfigurationProperties
protected com.broadleafcommerce.data.tracking.core.tenant.service.ApplicationConfigurationProperties getApplicationConfigurationProperties()- Since:
- 1.7.15, 2.0.1
-
setApplicationConfigurationProperties
@Autowired public void setApplicationConfigurationProperties(com.broadleafcommerce.data.tracking.core.tenant.service.ApplicationConfigurationProperties applicationConfigurationProperties) - Since:
- 1.7.15, 2.0.1
-
ApplicationConfigurationProperties