List of usage examples for com.vaadin.ui Image getDescription
@Override
public String getDescription()
From source file:edu.nps.moves.mmowgli.AppMaster.java
License:Open Source License
@SuppressWarnings("unchecked") public String getMobileQRUrlStringTL() { String rets = "errorInAppMaster.getMobileQRUrlStringTL()"; // error default try {/*from w w w. j av a 2 s . co m*/ rets = ImageServlet.getBaseImageUrl().toURI().toString() + MOBILE_QR_IMAGE_NAME; List<Image> iLis = HSess.get().createCriteria(Image.class) .add(Restrictions.eq("name", MOBILE_QR_IMAGE_NAME)).list(); if (iLis == null || iLis.size() <= 0) { createQrImageTL(); } else { Image img = iLis.get(0); if (!img.getDescription().equals(MmowgliMobileVaadinServlet.getBaseMobileUrl().toExternalForm())) { // deployment url has changed Image.deleteTL(img); createQrImageTL(); } } } catch (Exception ex) { System.err.println("Program error in AppMaster.getMobileQRUrlStringTL(): " + ex.getClass().getSimpleName() + "/ " + ex.getLocalizedMessage()); } return rets; }