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:fr.paris.lutece.plugins.profiles.business.ProfileFilter.java

/**
 * Initialize each component of the object
 */
public void init() {
    _strKey = StringUtils.EMPTY;
    _strDescription = StringUtils.EMPTY;
}

From source file:eu.europa.ec.markt.dss.manager.ProxyPreferenceManager.java

/**
 * Get the host of the HTTP proxy/*  w w  w.j  av  a  2  s  .  c  om*/
 * 
 * @return the host
 */
public String getHttpHost() {
    ProxyPreference preference = getProxyDao().get(ProxyKey.HTTP_HOST);
    return preference != null ? preference.getValue() : StringUtils.EMPTY;
}

From source file:info.magnolia.cms.gui.control.Button.java

public void setHtmlPre() {
    if (super.getHtmlPre(null) == null) {
        if (this.getButtonType() == BUTTONTYPE_PUSHBUTTON) {
            this.setHtmlPre(StringUtils.EMPTY);
        } else {/*from w ww . jav a 2s .c o  m*/
            this.setHtmlPre(HTML_PRE_DIVIDED);
        }
    }
}

From source file:com.chadekin.jadys.syntax.SqlNativeQuerySectionDetailedITest.java

@Test
public void shouldBuildAllSqlQuerySection() {
    // Arrange//from  www .  ja v  a  2  s  .  c om
    Calendar calendar = Calendar.getInstance();
    LocalDate localDate = LocalDate.of(2016, Month.DECEMBER, 14);
    Date date = Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
    String internalSql = DynamicSqlFactory.newQuery().select("cus.Id_").count("*", "cus.numberOfLocation")
            .from("dct_customer").as("cus").join("dct_location", "loc").on("loc.customerId").equal("cus.id_")
            .where("cus.companyId").equal(142576).and("cus.customerId").equal(1258).and("cus.customerName")
            .like("BSD GmbH").and("zipCode").like(StringUtils.EMPTY).and("cus.city").like("Paris")
            .and("country").like(null).and("cus.externalId").like("456753").and("cus.customerType")
            .like(CustomerType.KEY_ACCOUNT).and("cus.modifiedDate").greaterThanOrEqual("2016-10-14")
            .and("cus.modifiedDate").lessThanOrEqual(date).and("cus.modifiedByUserId")
            .in(Lists.newArrayList(125, 36, 587)).groupBy("loc.customerId").having("COUNT(loc.customerId)")
            .equal(2).orderBy("cus.externalId").asc().build();

    // Act
    String sql = DynamicSqlFactory.newQuery().select().count().from(internalSql).as("subQuery").build();

    // Assert
    assertThatSelect(sql);
    assertThatFrom(sql);
    assertThatJoin(sql);
    assertThatWhere(sql);
    assertThatAnd(sql);
    assertThatGroupBy(sql);
    assertThatHaving(sql);
    assertThatOrderBy(sql);
    assertThatAll(sql);
}

From source file:com.citruspay.enquiry.gateway.AXISGatewayConnector.java

public String connect(String vpcHost, String queryParameters, EnquiryRequest request) {

    boolean useSSL = false;
    String fileName = "";

    // determine if SSL encryption is being used
    if (vpcHost.substring(0, 8).equalsIgnoreCase("HTTPS://")) {
        useSSL = true;//from  w  w  w .j  a  va2  s  .c om
        // remove 'HTTPS://' from host URL
        vpcHost = vpcHost.substring(8);
        // get the filename from the last section of vpc_URL
        fileName = vpcHost.substring(vpcHost.lastIndexOf("/"));
        // get the IP address of the VPC machine
        vpcHost = vpcHost.substring(0, vpcHost.lastIndexOf("/"));
    }

    try {
        Socket socket = null;
        if (useSSL) {
            socket = getSocket(vpcHost, vpc_Port);
            // use next block of code if NOT using SSL encryption
        } else {
            socket = new Socket(vpcHost, vpc_Port);
        }
        OutputStream os = socket.getOutputStream();
        InputStream is = socket.getInputStream();

        os.write(prepareCompleteQueryString(fileName, queryParameters).getBytes());
        String res = new String(readAll(is));

        // check if a successful connection
        if (res.indexOf("200") < 0) {
            throw new IOException("Connection Refused - " + res);
        }

        if (res.indexOf("404 Not Found") > 0) {
            throw new IOException("File Not Found Error - " + res);
        }

        int resIndex = res.indexOf("\r\n\r\n");
        String body = res.substring(resIndex + 4, res.length());
        return body;

    } catch (IOException ioe) {
    }
    return StringUtils.EMPTY;
}

From source file:com.aionemu.gameserver.network.aion.serverpackets.SM_GROUP_INFO.java

@Override
protected void writeImpl(AionConnection con) {
    writeD(groupId);// w ww  .  jav a  2 s.co m
    writeD(leaderId);
    writeD(groupmapid);
    writeD(lootRules.getLootRule().getId());
    writeD(lootRules.getMisc());
    writeD(lootRules.getCommonItemAbove());
    writeD(lootRules.getSuperiorItemAbove());
    writeD(lootRules.getHeroicItemAbove());
    writeD(lootRules.getFabledItemAbove());
    writeD(lootRules.getEthernalItemAbove());
    writeD(lootRules.getMythicItemAbove());
    //writeD(lootRules.getAutodistribution().getId());
    writeD(2);
    writeC(0);
    writeD(type.getType());
    writeD(type.getSubType());
    writeD(0); //unk
    //writeH(0); // message id
    writeS(StringUtils.EMPTY); // name
}

From source file:info.magnolia.cms.gui.inline.BarEdit.java

public void setButtonEdit() {
    this.setButtonEdit(this.getPath(), this.getNodeCollectionName(StringUtils.EMPTY),
            this.getNodeName(StringUtils.EMPTY), this.getParagraph());
}

From source file:com.envision.envservice.rest.PictureUploadResource.java

@POST
@Consumes(MediaType.APPLICATION_JSON)/*  w w  w.j a v  a 2s  . c o m*/
@Produces(MediaType.APPLICATION_JSON)
public Response addNew(ClgPictureBo clgPicture) throws Exception {
    HttpStatus status = HttpStatus.CREATED;
    String response = StringUtils.EMPTY;
    if (!checkParam(clgPicture)) {
        status = HttpStatus.BAD_REQUEST;
        response = FailResult.toJson(Code.PARAM_ERROR, "?");
    } else {
        List<ClgPicture> list = ClgPictureService.addClgPicture(clgPicture);
        List<Map> maplist = new ArrayList<Map>();
        for (int i = 0; i < list.size(); i++) {
            Map map = new HashMap();
            map.put("id", list.get(i).getId().toString());
            maplist.add(map);
        }
        response = JSONObject.toJSONString(maplist, JSONFilter.UNDERLINEFILTER);
        return Response.status(status.value()).entity(response).build();
    }

    return null;
}

From source file:com.microsoft.alm.plugin.idea.tfvc.ui.settings.ProjectConfigurableFormTest.java

@Test
public void testLoad_TfNotFound() {
    when(mockPropertyService.getProperty(PropertyService.PROP_TF_HOME)).thenReturn(StringUtils.EMPTY);
    when(TfTool.tryDetectTf()).thenReturn(null);

    form.load();//from   w ww. ja  v a2 s  .  c  o m
    assertEquals(StringUtils.EMPTY, form.getCurrentExecutablePath());
}

From source file:ar.com.zauber.commons.web.uri.UriJspFunctionsTest.java

/** Test de UriJsp sin cotexto*/
@Test//from  ww  w  . j  a  v  a  2s  .c  o m
@Ignore(value = "ahora que no se envia el request...")
public final void buildUriDefault() throws Exception {
    setException(true);
    PageContext ctx = getPc();
    HttpServletRequest req = getReq();
    Mockito.when(req.getRequestURI()).thenReturn("/123/abc/asd/asd");
    Mockito.when(req.getContextPath()).thenReturn(StringUtils.EMPTY);
    Assert.assertEquals("../../../abc", UriJspFunctions.buildVarArgs(ctx, "abc", ctx.getRequest()));
}