@Controller @RequestMapping(value="/ajax/dictionary") public class DictionaryDataController extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
DICT_ID_PARAM_NAME |
protected String |
DICT_SERVICE_URL |
protected org.apache.commons.logging.Log |
log |
protected String |
WORD_PARAM_NAME |
| Constructor and Description |
|---|
DictionaryDataController() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getCacheKey(String word,
String dict)
Get a cache key for the specified word and dictionary combination.
|
org.springframework.web.servlet.ModelAndView |
getDefinition(javax.servlet.http.HttpServletRequest request,
String word,
String dict)
Get a definition for the specified word from the specified dictionary.
|
protected String |
getDefinition(String word,
String dict)
Get the definition from the server.
|
void |
setCache(net.sf.ehcache.Cache cache)
Cache of definitions.
|
void |
setDictionaryParsingService(IDictionaryParsingService service)
Set the dictionary parsing service to be used to get a definition from
the DictService server response.
|
protected final org.apache.commons.logging.Log log
protected final String DICT_SERVICE_URL
protected final String DICT_ID_PARAM_NAME
protected final String WORD_PARAM_NAME
@Autowired(required=true) public void setDictionaryParsingService(IDictionaryParsingService service)
service - public void setCache(net.sf.ehcache.Cache cache)
cache - @RequestMapping(method=GET)
public org.springframework.web.servlet.ModelAndView getDefinition(javax.servlet.http.HttpServletRequest request,
@RequestParam(value="word")
String word,
@RequestParam(value="dictId")
String dict)
throws Exception
request - word - dict - Exceptionprotected String getDefinition(String word, String dict)
word - dict - Copyright © 2016 Jasig. All Rights Reserved.