class DocumentServiceImpl extends RemoteServiceServlet implements DocumentService {

	@Override
	public void updateLink(long id, String type) throws ServerException {
		Session session = ServiceUtil.validateSession(getThreadLocalRequest());

		try {
			DocumentLinkDAO dao = (DocumentLinkDAO) Context.get().getBean(DocumentLinkDAO.class);
			DocumentLink link = dao.findById(id);
			dao.initialize(link);
			link.setType(type);
			dao.store(link);
		} catch (Throwable t) {
			ServiceUtil.throwServerException(session, log, t);
		}
	}

}