}
@OPTIONS
@Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_HTML, MediaType.APPLICATION_XML})
public OptionsResult options() {
OptionsResult optionsResult =
new OptionsResult(__resourceUtil.getResourceName(uriInfo));
try {
//GET meta data
optionsResult.putMethodMetaData("GET", new MethodMetaData());
/////optionsResult.putMethodMetaData("POST", new MethodMetaData());
MethodMetaData postMethodMetaData = __resourceUtil.getMethodMetaData(
(ConfigBean) Dom.unwrap(getEntity()));
postMethodMetaData.setDescription("Update");
optionsResult.putMethodMetaData("POST", postMethodMetaData);
//DELETE meta data
String command = getDeleteCommand();
if (command != null) {
MethodMetaData deleteMethodMetaData = __resourceUtil.getMethodMetaData(
command, RestService.getHabitat(), RestService.logger);
//In case of delete operation(command), do not display/provide id attribute.
deleteMethodMetaData.removeParamMetaData("id");
optionsResult.putMethodMetaData("DELETE", deleteMethodMetaData);
}
} catch (Exception e) {
throw new WebApplicationException(e, Response.Status.INTERNAL_SERVER_ERROR);
}