ByQuery(FluentLoader<E, K> loader, String queryString) { Preconditions.checkNotEmptyString(queryString, "queryString is empty"); this.loader = loader; this.queryString = queryString; }
@Override public Resource getIconResource(String iconPath) { checkNotEmptyString(iconPath, "Icon path should not be empty"); String iconName = iconPath.contains(":") ? iconPath.split(":")[1] : iconPath; return iconsCache.getUnchecked(iconName); }
@Override public Resource getIconResource(String iconPath) { Preconditions.checkNotEmptyString(iconPath, "Icon path should not be empty"); String icon = iconPath.substring(THEME_PREFIX.length()); return new ThemeResource(icon); }
@Override public Resource getIconResource(String iconPath) { Preconditions.checkNotEmptyString(iconPath, "Icon path should not be empty"); String icon = iconPath.substring(FILE_PREFIX.length()); File iconFile = new File(icon); if (!iconFile.exists()) { throw new IllegalArgumentException("Icon file does not exist: " + icon); } return new FileResource(iconFile); }
@Override public Resource getIconResource(String iconPath) { Preconditions.checkNotEmptyString(iconPath, "Icon path should not be empty"); String icon = iconPath.substring(CLASSPATH_PREFIX.length()); return new ClassResource(icon); }
@Override public Resource getIconResource(String iconPath) { Preconditions.checkNotEmptyString(iconPath, "Icon path should not be empty"); return new ThemeResource(iconPath); }
public static void replaceState(String navigationState) { checkNotEmptyString(navigationState, "Unable to replace by empty navigation state"); if (headless()) { log.debug("Unable to replace navigation state in headless mode"); return; } Page.getCurrent().replaceState("#" + navigationState); }
public static void pushState(String navigationState) { checkNotEmptyString(navigationState, "Unable to push empty navigation state"); if (headless()) { log.debug("Unable to push navigation state in headless mode"); return; } Page.getCurrent().setUriFragment(navigationState, false); }