List of usage examples for org.apache.commons.lang3 StringUtils isNotBlank
public static boolean isNotBlank(final CharSequence cs)
Checks if a CharSequence is not empty (""), not null and not whitespace only.
StringUtils.isNotBlank(null) = false StringUtils.isNotBlank("") = false StringUtils.isNotBlank(" ") = false StringUtils.isNotBlank("bob") = true StringUtils.isNotBlank(" bob ") = true
From source file:jp.massbank.spectrumsearch.entity.file.MassBankRecord.java
public boolean isAvailable() { return StringUtils.isNotBlank(id); }
From source file:edu.usu.sdl.openstorefront.core.view.ComponentIntegrationView.java
public static ComponentIntegrationView toView(ComponentIntegration integration) { Service serviceProxy = ServiceProxyFactory.getServiceProxy(); ComponentIntegrationView view = new ComponentIntegrationView(); String componentName = serviceProxy.getComponentService().getComponentName(integration.getComponentId()); view.setComponentName(componentName); view.setComponentId(integration.getComponentId()); view.setRefreshRate(integration.getRefreshRate()); view.setStatus(integration.getStatus()); view.setLastEndTime(integration.getLastEndTime()); view.setLastStartTime(integration.getLastStartTime()); view.setActiveStatus(integration.getActiveStatus()); view.toStandardView(integration);/*from w w w . j a va 2 s . c o m*/ if (StringUtils.isNotBlank(view.getRefreshRate())) { try { view.setCronExpressionDescription( CronExpressionDescriptor.getDescription(integration.getRefreshRate())); } catch (ParseException ex) { view.setCronExpressionDescription("Unable to parse expression"); } } return view; }
From source file:com.dominion.salud.mpr.negocio.service.maestros.impl.SexosServiceImpl.java
@Override public Sexos findByCodSexoAndInsert(Sexos sexos) { try {// w ww.j a v a 2 s . c om if (StringUtils.isNotBlank(sexos.getCodSexo()) && StringUtils.isNotBlank(sexos.getTxtSexo())) { logger.debug(" Buscando SEXOS (" + sexos.getCodSexo() + ") " + sexos.getTxtSexo()); return sexosRepository.findByCodSexo(sexos); } } catch (NoResultException nre) { logger.debug(" No se ha encontrado registro, insertando SEXOS (" + sexos.getCodSexo() + ") " + sexos.getTxtSexo()); return sexosRepository.save(sexos); } return null; }
From source file:com.xylocore.copybook.generator.domain.ElementDictionary.java
/** * Returns <tt>true</tt> if the dictionary contains an element with the * specified element name./*from w ww. j ava 2 s . c om*/ * * @param aElementName * The element name of interest. * * @return <tt>true</tt> if the dictionary contains an element with * the specified element name. */ public boolean isElementNameAvailable(String aElementName) { assert StringUtils.isNotBlank(aElementName); return elementNameMappings.containsKey(aElementName); }
From source file:de.micromata.mgc.application.jetty.JettyWarServer.java
/** * Create a ServletContextHandler or WebAppContext. * /*from ww w . j a v a2s. co m*/ * @return the handler */ protected ServletContextHandler createDirWarContextHandler(JettyConfigModel config) { WebAppContext war = new WebAppContext(); war.setContextPath(getContextPath(config)); // String warDir = new File(localsettings.getProperty("genome.wardir", "src/main/webapp")).getPath(); String warDir = getWarDir(config); String descriptor = getWebDescritorFile(config, warDir); if (StringUtils.isNotBlank(descriptor) == true) { war.setDescriptor(descriptor); } // TODO RK?? initExtraWarCp(localsettings, war); war.setWar(warDir); return war; }
From source file:io.github.moosbusch.lumpi.gui.impl.Expression.java
private void parseExpression(String expr) { clear();/*from w w w . java 2 s .c om*/ if (StringUtils.isNotBlank(expr)) { String[] exprTokens = StringUtils.split(LumpiUtil.requireNotBlank(expr), getSeparatorChar()); for (String exprToken : exprTokens) { add(StringUtils.deleteWhitespace(exprToken)); } } }
From source file:com.apus.hades.admin.web.controller.log.LogController.java
/** * ./*from w ww .j a va2 s . c o m*/ * * @return */ public String list() { Map<String, Object> params = new HashMap<String, Object>(); String user_name = Struts2Utils.getParameter("user_name"); String role_names = Struts2Utils.getParameter("role_names"); String begin_time = Struts2Utils.getParameter("begin_time"); String end_time = Struts2Utils.getParameter("end_time"); if (StringUtils.isNotBlank(user_name)) { params.put("user_name", user_name); Struts2Utils.setAttribute("user_name", user_name); } if (StringUtils.isNotBlank(role_names)) { params.put("role_names", role_names); Struts2Utils.setAttribute("role_names", role_names); } if (StringUtils.isNotBlank(begin_time)) { params.put("begin_time", begin_time); Struts2Utils.setAttribute("begin_time", begin_time); } if (StringUtils.isNotBlank(end_time)) { params.put("end_time", end_time); Struts2Utils.setAttribute("end_time", end_time); } pages = userOperatLogManager.findByPage(params, new PageBounds(pagination.getPageNo(), pagination.getPageSize())); if (null != pages) { this.setPagination(pages.getPagination()); } return "list"; }
From source file:de.micromata.genome.gwiki.pagelifecycle_1_0.action.PlcActionBeanBase.java
protected Object goBack() { if (StringUtils.isNotBlank(backUrl)) { return backUrl; }/*from w w w . j av a 2s .com*/ return wikiContext.getWikiWeb().getHomeElement(wikiContext); }
From source file:com.algaworks.repository.Clientes.java
public List<Cliente> filtrados(ClienteFilter filtro) { Session session = manager.unwrap(Session.class); Criteria criteria = session.createCriteria(Cliente.class); if (StringUtils.isNotBlank(filtro.getDocumentoReceitaFederal())) criteria.add(Restrictions.ilike("documentoReceitaFederal", filtro.getDocumentoReceitaFederal(), MatchMode.ANYWHERE));//from www .j av a2s.c om if (StringUtils.isNotBlank(filtro.getNome())) criteria.add(Restrictions.ilike("nome", filtro.getNome(), MatchMode.ANYWHERE)); return criteria.addOrder(Order.asc("nome")).list(); }
From source file:com.dominion.salud.mpr.negocio.service.maestros.impl.MarcasServiceImpl.java
@Override public Marcas findByCodNacAndInsert(Marcas marcas) { try {/*ww w . j a v a 2 s .c om*/ if (StringUtils.isNotBlank(marcas.getCodNac()) && StringUtils.isNotBlank(marcas.getTxtMarca())) { logger.debug(" Buscando MARCAS (" + marcas.getCodNac() + ") " + marcas.getTxtMarca()); return marcasRepository.findByCodNac(marcas); } } catch (NoResultException nre) { logger.debug(" No se ha encontrado registro, insertando MARCAS (" + marcas.getCodNac() + ") " + marcas.getTxtMarca()); return marcasRepository.save(marcas); } return null; }