class DocumentServiceImpl extends RemoteServiceServlet implements DocumentService {

	@Override
	public void restore(Long[] docIds, long folderId) throws ServerException {
		Session session = ServiceUtil.validateSession(getThreadLocalRequest());

		DocumentDAO docDao = (DocumentDAO) Context.get().getBean(DocumentDAO.class);

		for (Long docId : docIds) {
			if (docId == null)
				continue;
			DocumentHistory transaction = new DocumentHistory();
			transaction.setSession(session);

			try {
				docDao.restore(docId, folderId, transaction);
			} catch (PersistenceException e) {
				log.error(e.getMessage(), e);
			}
		}
	}

}