use of org.bedework.calfacade.responses.GetFilterDefResponse in project bw-calendar-engine by Bedework.
the class Filters method get.
@Override
public GetFilterDefResponse get(final String name) {
final GetFilterDefResponse gfdr = new GetFilterDefResponse();
try {
final BwFilterDef fdef = getCal().getFilterDef(name, getEntityOwner(getPrincipal()));
if (fdef == null) {
gfdr.setStatus(Response.Status.notFound);
} else {
gfdr.setStatus(Response.Status.ok);
gfdr.setFilterDef(fdef);
}
} catch (final CalFacadeException cfe) {
gfdr.setStatus(Response.Status.failed);
gfdr.setMessage(cfe.getLocalizedMessage());
}
return gfdr;
}
Aggregations