public abstract class AbstractAdminI18NAjaxEndpoint<T extends AbstractI18NMetadata> extends AbstractController
Modifier and Type | Field and Description |
---|---|
private I18NJsonEncoder |
encoder |
private static org.slf4j.Logger |
LOGGER |
Constructor and Description |
---|
AbstractAdminI18NAjaxEndpoint() |
Modifier and Type | Method and Description |
---|---|
private void |
checkIdentifier(String id) |
protected abstract T |
create(String id) |
String |
get() |
String |
get(String id) |
protected ContentCacheUpdate |
getContentCacheUpdate(T i18n) |
private I18NDAO<T> |
getDao() |
protected abstract Class<T> |
getType() |
protected abstract boolean |
isValid(ContentCache cache,
String id) |
String |
onError(JSONException e) |
String |
onError(NoImplementationFoundException e) |
String |
onError(NoSuchIdentifierException e) |
String |
onError(OwsExceptionReport e) |
void |
update(String json) |
getBasePath, getContext, getDatabaseSettingsHandler, getMetaDataHandler, getSettingsManager, parseBoolean, parseBoolean, setContext, toJSONValueMap
private static final org.slf4j.Logger LOGGER
private final I18NJsonEncoder encoder
@ResponseBody @ResponseStatus(value=INTERNAL_SERVER_ERROR) @ExceptionHandler(value=NoImplementationFoundException.class) public String onError(NoImplementationFoundException e)
@ResponseBody @ResponseStatus(value=INTERNAL_SERVER_ERROR) @ExceptionHandler(value=OwsExceptionReport.class) public String onError(OwsExceptionReport e)
@ResponseBody @ResponseStatus(value=BAD_REQUEST) @ExceptionHandler(value=JSONException.class) public String onError(JSONException e)
@ResponseBody @ResponseStatus(value=NOT_FOUND) @ExceptionHandler(value=NoSuchIdentifierException.class) public String onError(NoSuchIdentifierException e)
@ResponseBody @ResponseStatus(value=OK) @RequestMapping(method=GET, produces="application/json; charset=UTF-8") public String get() throws NoImplementationFoundException, JSONException, OwsExceptionReport
@ResponseBody @ResponseStatus(value=OK) @RequestMapping(params="id", method=GET, produces="application/json; charset=UTF-8") public String get(@RequestParam(value="id") String id) throws NoImplementationFoundException, JSONException, NoSuchIdentifierException, OwsExceptionReport
@ResponseStatus(value=NO_CONTENT) @RequestMapping(method=POST, consumes="application/json") public void update(@RequestBody String json) throws NoImplementationFoundException, JSONException, NoSuchIdentifierException, OwsExceptionReport, IOException
private void checkIdentifier(String id) throws NoSuchIdentifierException
NoSuchIdentifierException
private I18NDAO<T> getDao() throws NoImplementationFoundException
NoImplementationFoundException
protected abstract boolean isValid(ContentCache cache, String id)
protected ContentCacheUpdate getContentCacheUpdate(T i18n)
Copyright © 2012-2015 52north.org. All Rights Reserved.