Example usage for org.apache.commons.lang StringUtils isNotEmpty

List of usage examples for org.apache.commons.lang StringUtils isNotEmpty

Introduction

In this page you can find the example usage for org.apache.commons.lang StringUtils isNotEmpty.

Prototype

public static boolean isNotEmpty(String str) 

Source Link

Document

Checks if a String is not empty ("") and not null.

Usage

From source file:com.bstek.dorado.common.proxy.PatternMethodInterceptorFilter.java

public boolean filter(MethodInterceptor methodInterceptor, MethodInvocation methodInvocation) {
    boolean accept = true;
    if (methodInterceptor instanceof PatternMethodInterceptor) {
        PatternMethodInterceptor patternMethodInterceptor = (PatternMethodInterceptor) methodInterceptor;
        String pattern = patternMethodInterceptor.getPattern();
        if (StringUtils.isNotEmpty(pattern)) {
            accept = PathUtils.match(pattern, targetName);
        }/*from  w  ww .  j  a v a 2 s  . com*/
        if (accept) {
            String excludePattern = patternMethodInterceptor.getExcludePattern();
            if (StringUtils.isNotEmpty(excludePattern)) {
                accept = !PathUtils.match(excludePattern, targetName);
            }
        }
    }
    return accept;
}

From source file:com.qcloud.project.macaovehicle.web.handler.impl.CarOwnerPurchaseHandlerImpl.java

@Override
public CarOwnerPurchaseVO toVO(CarOwnerPurchase carOwnerPurchase) {

    String json = Json.toJson(carOwnerPurchase);
    CarOwnerPurchaseVO vo = Json.toObject(json, CarOwnerPurchaseVO.class, true);
    vo.setLicenseUid(fileSDKClient.urlToUid(vo.getLicense()));
    if (StringUtils.isNotEmpty(vo.getLicense())) {
        vo.setLicense(vo.getLicense());// w w w . j  av  a2 s.  c om
    }

    //
    return vo;
}

From source file:cn.vlabs.duckling.vwb.FetchToSession.java

public FetchToSession(String paramStr) {
    if (StringUtils.isNotEmpty(paramStr)) {
        paramStr = paramStr.trim();/*w  w  w .  ja v  a  2  s. co m*/
        paramSet = new HashSet<String>();
        String[] paramArray = paramStr.split(":");
        for (String param : paramArray) {
            if (StringUtils.isNotEmpty(param)) {
                paramSet.add(param);
            }
        }
    } else {
        paramSet = null;
    }
}

From source file:com.baifendian.swordfish.common.job.struct.node.storm.param.StormShellParam.java

@Override
public boolean checkValid() {
    return resources != null && StringUtils.isNotEmpty(command);
}

From source file:au.org.ala.delta.editor.slotfile.directive.DirOutCharNotes.java

@Override
public void writeDirectiveArguments(DirectiveInOutState state) {

    MutableDeltaDataSet dataSet = state.getDataSet();
    writeLine(state, "");

    for (int i = 1; i <= dataSet.getNumberOfCharacters(); i++) {
        Character character = dataSet.getCharacter(i);
        String notes = character.getNotes();
        if (StringUtils.isNotEmpty(notes)) {
            notes = Utils.despaceRtf(notes, false);
            writeLine(state, "#" + i + ". " + notes);
        }/*w w w . ja  v a 2  s . co  m*/
    }
}

From source file:cec.easyshop.storefront.security.impl.DefaultCommerceRedirectStrategy.java

@Override
public void sendRedirect(final HttpServletRequest request, final HttpServletResponse response, final String url)
        throws IOException {
    String redirectUrl = url;/*  www  . j  a  v  a 2s  . c  om*/

    if (Boolean.valueOf(checkoutFlowFacade.isExpressCheckoutEnabledForStore())
            && StringUtils.isNotEmpty(request.getParameter("expressCheckoutEnabled"))) {
        redirectUrl = getExpressTargetUrl();
    }
    super.sendRedirect(request, response, redirectUrl);
}

From source file:com.googlecode.jtiger.modules.ecside.table.cell.FilterCell.java

public String getHtmlDisplay(TableModel model, Column column) {
    HtmlBuilder html = new HtmlBuilder();

    html.td(2);/*w ww  .j  a v a  2s  . co m*/

    if (StringUtils.isNotEmpty(column.getFilterClass())) {
        html.styleClass(column.getFilterClass());
    }

    if (StringUtils.isNotEmpty(column.getFilterStyle())) {
        html.style(column.getFilterStyle());
    }

    if (StringUtils.isNotEmpty(column.getWidth())) {
        html.width(column.getWidth());
    }

    html.close();

    if (!column.isFilterable()) {
        html.append("");
    } else {
        html.append(input(model, column));
    }

    html.tdEnd();

    return html.toString();
}

From source file:com.ctc.storefront.security.impl.DefaultCommerceRedirectStrategy.java

@Override
public void sendRedirect(final HttpServletRequest request, final HttpServletResponse response, final String url)
        throws IOException {
    String redirectUrl = url;//from   w w  w.jav  a 2  s .  c  o  m

    if (checkoutFlowFacade.isExpressCheckoutEnabledForStore()
            && StringUtils.isNotEmpty(request.getParameter("expressCheckoutEnabled"))) {
        redirectUrl = getExpressTargetUrl();
    }
    super.sendRedirect(request, response, redirectUrl);
}

From source file:com.jaspersoft.jasperserver.war.cascade.handlers.converters.FloatDataConverter.java

@Override
public Float stringToValue(String rawData) {
    return StringUtils.isNotEmpty(rawData) ? Float.parseFloat(rawData.replace(",", ".")) : null;
}

From source file:com.clican.pluto.dataprocess.spring.parser.TimerProcessorParser.java

@SuppressWarnings("unchecked")

public void customiseBeanDefinition(BeanDefinition beanDef, Element element, ParserContext parserContext) {
    String cronExpression = element.getAttribute("cronExpression");
    String startTime = element.getAttribute("startTime");
    String endTime = element.getAttribute("endTime");
    String taskScheduler = element.getAttribute("taskScheduler");
    String concurrent = element.getAttribute("concurrent");
    if (StringUtils.isEmpty(taskScheduler)) {
        taskScheduler = "taskScheduler";
    }/*from   w w w  .j  a  v a 2 s.  c o  m*/
    String stepCommit = element.getAttribute("stepCommit");
    if (StringUtils.isNotEmpty(stepCommit)) {
        beanDef.getPropertyValues().addPropertyValue("stepCommit", Boolean.parseBoolean(stepCommit));
    }
    beanDef.getPropertyValues().addPropertyValue("cronExpression", cronExpression);
    beanDef.getPropertyValues().addPropertyValue("startTime", startTime);
    beanDef.getPropertyValues().addPropertyValue("endTime", endTime);
    beanDef.getPropertyValues().addPropertyValue("taskScheduler", new RuntimeBeanReference(taskScheduler));
    if (StringUtils.isNotEmpty(concurrent)) {
        beanDef.getPropertyValues().addPropertyValue("concurrent", Boolean.parseBoolean(concurrent));
    }
    String[] timerProcessors = element.getAttribute("timerProcessors").split(",");
    List partitionProcessorList = new ManagedList();
    for (String timerProcessor : timerProcessors) {
        partitionProcessorList.add(new RuntimeBeanReference(timerProcessor.trim()));
    }
    beanDef.getPropertyValues().addPropertyValue("timerProcessors", partitionProcessorList);

}