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

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

Introduction

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

Prototype

String EMPTY

To view the source code for org.apache.commons.lang StringUtils EMPTY.

Click Source Link

Document

The empty String "".

Usage

From source file:com.fengduo.bee.commons.util.DateViewTools.java

public static String format(Date date, String pattern) {
    if (date == null) {
        return StringUtils.EMPTY;
    }/*  ww w  .  j ava 2  s  . co  m*/
    return getFormat(pattern).format(date);
}

From source file:com.chadekin.jadys.commons.formatters.SqlValueFormatter.java

public default String format(Object value) {
    String result = StringUtils.EMPTY;
    if (value != null) {
        setValue((T) value);//from   w w w.  j a  v a2s  .  com
        result = build();
    }
    return result;
}

From source file:com.chadekin.jadys.commons.formatters.DefaultValueFormatter.java

@Override
public void setValue(Object value) {
    this.value = (value == null) ? StringUtils.EMPTY : value.toString();
}

From source file:com.ms.commons.utilities.StaticContentDeploy.java

private static String getStaticVersion() {
    String property = System.getProperty(KEY_DATA_SOURCE_PROPERTIES);
    if (StringUtils.isBlank(property)) {
        logger.warn("can not find system property:" + KEY_DATA_SOURCE_PROPERTIES);
        return StringUtils.EMPTY;
    }// ww w.  j a  v a 2  s  . co m
    File propertyFile = new File(property);
    if (!propertyFile.exists()) {
        logger.warn("property file not exists:" + property);
        return StringUtils.EMPTY;
    }
    String staticVersion = getPropertyFromFile(propertyFile, STATIC_VERSION);
    return staticVersion;
}

From source file:com.mmj.app.web.tools.EnumViewTools.java

public static String rightMenuEnumName(Integer v) {
    if (v == null) {
        return StringUtils.EMPTY;
    }// ww w  .j a v a  2s  . c om
    return RightMenuEnum.getAction(v).getName();
}

From source file:fr.paris.lutece.portal.business.user.parameter.DefaultUserParameterHome.java

/**
 * Load the parameter value./*from   w ww . j a va2  s .c  o  m*/
 *
 * @param strParameterKey the parameter key
 * @return The parameter value
 */
public static String findByKey(String strParameterKey) {
    return DatastoreService.getDataValue(strParameterKey, StringUtils.EMPTY);
}

From source file:com.opengamma.web.security.WebSecuritiesResourceTest.java

public void testGetAllSecurities() throws Exception {
    MultivaluedMap<String, String> queryParameters = _uriInfo.getQueryParameters();
    queryParameters.putSingle("name", StringUtils.EMPTY);
    queryParameters.putSingle("identifier", StringUtils.EMPTY);
    queryParameters.putSingle("type", StringUtils.EMPTY);
    queryParameters.put("securityId", Collections.<String>emptyList());

    String resultJson = _webSecuritiesResource.getJSON(null, null, null, null, queryParameters.getFirst("name"),
            queryParameters.getFirst("identifier"), queryParameters.getFirst("type"),
            queryParameters.get("securityId"), _uriInfo);
    assertNotNull(resultJson);//from  w w  w  .j  a  v  a 2  s . com
    assertJSONObjectEquals(loadJson("com/opengamma/web/security/allSecuritiesJson.txt"),
            new JSONObject(resultJson));
}

From source file:edu.northwestern.bioinformatics.studycalendar.xml.validators.ActivityXMLValidatorTest.java

public void testValidate() {
    BindException errors = new BindException(valid, StringUtils.EMPTY);
    ValidationUtils.invokeValidator(SPRING_ACTIVITY_VALIDATOR_INSTANCE, valid, errors);

    assertFalse(errors.hasErrors());//from  w  w w.  j a  va2 s . c om
}

From source file:com.chadekin.jadys.commons.formatters.ArrayValueFormatter.java

@Override
public String format(Object value) {
    String result = StringUtils.EMPTY;
    if (value != null) {
        List convertedValue = Lists.newArrayList();
        for (int index = 0; index < Array.getLength(value); index++) {
            convertedValue.add(Array.get(value, index));
        }/*from   ww w  . j a v a2 s .co m*/
        result = super.format(convertedValue);
    }
    return result;
}

From source file:indexer.PDFDocument.java

@Override
public String getContents() {
    PDFTextExtractor extractor = new PDFTextExtractor();
    try {//from   ww w  .  jav a2  s .  c  om
        return extractor.extractText(Paths.get(path).toString());
    } catch (IOException e) {
        log.error("Error while extracting text from: " + getName());
    }
    return StringUtils.EMPTY;
}