private void scanResourceForSearchParams(Class<? extends IResource> theClass, RuntimeResourceDefinition theResourceDef) {
for (Field nextField : theClass.getFields()) {
SearchParamDefinition searchParam = nextField.getAnnotation(SearchParamDefinition.class);
if (searchParam != null) {
SearchParamTypeEnum paramType = SearchParamTypeEnum.valueOf(searchParam.type().toUpperCase());
if (paramType == null) {
throw new ConfigurationException("Searc param " + searchParam.name() + " has an invalid type: " + searchParam.type());
}
RuntimeSearchParam param = new RuntimeSearchParam(searchParam.name(), searchParam.description(), searchParam.path(), paramType);
theResourceDef.addSearchParam(param);