public interface ClassNameRequestParamValidationService
Modifier and Type | Method and Description |
---|---|
String |
getClassNameForSection(String sectionKey,
String persistenceUnitName)
Retrieve a fully qualified classname using a sectionKey.
|
List<SectionCrumb> |
getSectionCrumbs(String crumbList,
String persistenceUnitName)
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.
|
boolean validateClassNameParams(Map<String,String> requestParamToClassName, String persistenceUnitName)
requestParamToClassName
- a map of request params and associated fully qualified classnames to confirm against the whitelistpersistenceUnitName
- the persistence unit the white list is generated fromString getClassNameForSection(String sectionKey, String persistenceUnitName)
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.sectionKey
- the sectionKey used to retrieve the fully qualified classnamepersistenceUnitName
- the persistence unit the white list is generated fromList<SectionCrumb> getSectionCrumbs(String crumbList, String persistenceUnitName)
getClassNameForSection(String, 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.crumbList
- the delimited string (related to the "sectionCrumbs" param in an Http request)persistenceUnitName
- the persistence unit the white list is generated fromCopyright © 2020. All rights reserved.