class DocumentServiceImpl extends RemoteServiceServlet implements DocumentService {

	@Override
	public void deleteLinks(long[] ids) throws ServerException {
		Session session = ServiceUtil.validateSession(getThreadLocalRequest());

		try {
			DocumentLinkDAO dao = (DocumentLinkDAO) Context.get().getBean(DocumentLinkDAO.class);
			for (long id : ids) {
				boolean deleted = dao.delete(id);
				if (!deleted)
					throw new Exception("Bookmarks have not been deleted");
			}
		} catch (Throwable t) {
			ServiceUtil.throwServerException(session, log, t);
		}
	}

}