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

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

Introduction

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

Prototype

public static String chomp(String str, String separator) 

Source Link

Document

Removes separator from the end of str if it's there, otherwise leave it alone.

Usage

From source file:com.google.gdt.eclipse.designer.util.DefaultModuleDescription.java

@Override
public String getSimpleName() {
    return StringUtils.chomp(m_file.getName(), Constants.GWT_XML_EXT);
}

From source file:com.egt.ejb.toolkit.ToolKitUtils.java

public static String mkLibDir(String root, String project, String subproject) {
    String sep = System.getProperties().getProperty("file.separator");
    String sub = StringUtils.isBlank(subproject) ? "" : sep + subproject.replace("-", sep).replace(".", sep);
    String dir = StringUtils.chomp(root, sep) + sep + project + sub;
    mkdirs(dir);/*from   w  ww  . j  a  va2 s.c o  m*/
    return dir + sep;
}

From source file:com.linkedin.pinot.controller.helix.ControllerRequestURLBuilder.java

public String forBrokerTenantCreate(String tenantName) {
    return StringUtil.join("/", StringUtils.chomp(_baseUrl, "/"), "tenants", tenantName,
            "instances?type=broker");
}

From source file:com.linkedin.pinot.controller.helix.ControllerRequestURLBuilder.java

public String forTenantGet() {
    return StringUtil.join("/", StringUtils.chomp(_baseUrl, "/"), "tenants");
}

From source file:com.linkedin.pinot.controller.helix.ControllerRequestURLBuilder.java

public String forTenantGet(String tenantName) {
    return StringUtil.join("/", StringUtils.chomp(_baseUrl, "/"), "tenants", tenantName);
}

From source file:com.egt.ejb.toolkit.ToolKitUtils.java

public static String makeNetBeansWebProjectDirectoryTree(String root, String project) {
    String sep = System.getProperties().getProperty("file.separator");
    String com = PREFIJO_PAQUETE.replace(".", sep);
    String web = getWebPackageName(project).replace(".", sep);
    String dir = StringUtils.chomp(root, sep) + sep + project + sep;
    mkdirs(dir + "nbproject" + sep + "private");
    mkdirs(dir + "setup");
    mkdirs(dir + "src" + sep + "conf");
    mkdirs(dir + "src" + sep + "java" + sep + com + sep + web);
    mkdirs(dir + "test");
    mkdirs(dir + "web" + sep + "resources");
    mkdirs(dir + "web" + sep + "WEB-INF");
    return dir;/*from  w  w  w  . j  a va 2 s. com*/
}

From source file:com.linkedin.pinot.controller.helix.ControllerRequestURLBuilder.java

public String forBrokerTenantGet(String tenantName) {
    return StringUtil.join("/", StringUtils.chomp(_baseUrl, "/"), "tenants", tenantName, "?type=broker");
}

From source file:com.linkedin.pinot.controller.helix.ControllerRequestURLBuilder.java

public String forServerTenantGet(String tenantName) {
    return StringUtil.join("/", StringUtils.chomp(_baseUrl, "/"), "tenants", tenantName, "?type=server");
}

From source file:com.linkedin.pinot.controller.helix.ControllerRequestURLBuilder.java

public String forBrokerTenantDelete(String tenantName) {
    return StringUtil.join("/", StringUtils.chomp(_baseUrl, "/"), "tenants", tenantName, "?type=broker");
}

From source file:com.linkedin.pinot.controller.helix.ControllerRequestURLBuilder.java

public String forServerTenantDelete(String tenantName) {
    return StringUtil.join("/", StringUtils.chomp(_baseUrl, "/"), "tenants", tenantName, "?type=server");
}