@Service(value="blClassNameRequestParamValidationService") public class ClassNameRequestParamValidationServiceImpl extends Object implements ClassNameRequestParamValidationService
ClassNameRequestParamValidationService| Modifier and Type | Field and Description |
|---|---|
protected AdminNavigationService |
adminNavigationService |
protected javax.persistence.EntityManagerFactory |
factory |
protected DynamicDaoHelper |
helper |
protected PersistenceService |
persistenceService |
| Constructor and Description |
|---|
ClassNameRequestParamValidationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
getClassNameForSection(String sectionKey)
Retrieve a fully qualified classname using a sectionKey.
|
List<SectionCrumb> |
getSectionCrumbs(String crumbList)
Retrieve a list of section crumbs given a delimited string (usually harvested from the "sectionCrumbs" param on a
Http request).
|
boolean |
validateClassNameParams(Map<String,String> requestParamToClassName,
String persistenceUnitName)
Compare a map of request params to fully qualified classname values against the whitelist.
|
protected javax.persistence.EntityManagerFactory factory
protected AdminNavigationService adminNavigationService
protected PersistenceService persistenceService
protected DynamicDaoHelper helper
public ClassNameRequestParamValidationServiceImpl()
public boolean validateClassNameParams(Map<String,String> requestParamToClassName, String persistenceUnitName)
ClassNameRequestParamValidationServicevalidateClassNameParams in interface ClassNameRequestParamValidationServicerequestParamToClassName - a map of request params and associated fully qualified classnames to confirm against the whitelistpersistenceUnitName - the persistence unit the white list is generated frompublic String getClassNameForSection(String sectionKey)
ClassNameRequestParamValidationServiceSectionKeyValidationException instance is
thrown. If thrown from within a Spring MVC controller, this exception will result in an Http 404 status code
back to the requester.getClassNameForSection in interface ClassNameRequestParamValidationServicesectionKey - the sectionKey used to retrieve the fully qualified classnamepublic List<SectionCrumb> getSectionCrumbs(String crumbList)
ClassNameRequestParamValidationServiceClassNameRequestParamValidationService.getClassNameForSection(String). If a sectionKey is found
to be not valid, a SectionKeyValidationException instance is
thrown. If thrown from within a Spring MVC controller, this exception will result in an Http 404 status code
back to the requester.getSectionCrumbs in interface ClassNameRequestParamValidationServicecrumbList - the delimited string (related to the "sectionCrumbs" param in an Http request)Copyright © 2022. All rights reserved.