Example usage for java.lang String concat

List of usage examples for java.lang String concat

Introduction

In this page you can find the example usage for java.lang String concat.

Prototype

public String concat(String str) 

Source Link

Document

Concatenates the specified string to the end of this string.

Usage

From source file:com.adobe.acs.commons.util.InfoWriterTest.java

@Test
public void testPrint_StringVars() throws Exception {
    String expected = "hello world, from ira";

    iw.message("hello {}, from {}", "world", "ira");

    assertEquals(expected.concat(LS), iw.toString());
}

From source file:org.focusns.common.dao.mybatis.MyBatisDaoSupport.java

public Page<M> fetchPage(String selectId, Page<M> page, Map<String, Object> model) {
    ////from w  w  w . jav a2  s  .  co  m
    if (page.isAutoCount()) {
        String countId = selectId.concat("Count");
        long totalCount = selectPageCount(countId, model);
        page.setTotalCount(totalCount);
    }
    //
    RowBounds rowBounds = new RowBounds(page.getFirst() - 1, page.getPageSize());
    List<M> results = getSqlSession().selectList(NAMESPACE.concat(selectId), model, rowBounds);
    //
    return page.setResults(results);
}

From source file:org.n52.sos.soe.HarvestFeaturesWithObservations.java

private void getObservationByFeature(String feature)
        throws ClientProtocolException, IllegalStateException, IOException, XmlException {
    String n = URLEncoder.encode(feature, "UTF-8");
    String url = HttpUtil.resolveServiceURL();

    XmlObject xo = HttpUtil.executeGetAndParseAsXml(url.concat(String.format(
            "GetObservation?service=SOS&version=2.0.0&request=GetObservation&offering=&observedProperty=&procedure=&featureOfInterest=%s&namespaces=&spatialFilter=&temporalFilter=om:phenomenonTime,%s/%s&aggregationType=&responseFormat=&f=xml",
            n, "2014-02-03T14:00:00Z", "2014-03-03T14:00:00Z")));

    int count = checkForObservations(xo);

    logger.info(count + " observations associated with Feature " + feature);
}

From source file:com.microsoft.alm.plugin.idea.git.ui.pullrequest.VcsPullRequestsModel.java

private String getPullRequestWebLink(final String gitRemoteUrl, final int pullRequestId) {
    return gitRemoteUrl.concat(UrlHelper.URL_SEPARATOR).concat("pullrequest")
            .concat(UrlHelper.URL_SEPARATOR + pullRequestId);
}

From source file:com.geoapi.api.server.services.implementations.WebViewService.java

@GET
@Path("js/{parent}/{child}")
@Produces("application/javascript")
public String js(@PathParam("parent") String parent, @PathParam("child") String child) {
    return javascript(parent.concat("/").concat(child));
}

From source file:com.haulmont.cuba.portal.config.SiteSettings.java

/**
 * @param path path relative to the root of webapp
 * @return Full absolute path including protocol, domain and webapp prefix
 *///from w  w  w  .j  a  v  a2  s  .c o  m
public String composeFullAbsolutePath(String path) {
    Configuration configuration = AppBeans.get(Configuration.NAME);
    String webAppUrl = configuration.getConfig(GlobalConfig.class).getWebAppUrl();
    webAppUrl = StringUtils.chomp(webAppUrl, "/"); //remove last slash
    return path.startsWith("/") ? webAppUrl.concat(path) : webAppUrl.concat("/").concat(path);
}

From source file:utils.APIExporter.java

static String getDestinationFolder(ApiImportExportConfiguration config) {
    String destinationFolderPath;
    if (StringUtils.isNotBlank(config.getDestinationPath())) {
        destinationFolderPath = config.getDestinationPath();
    } else {/*w w  w  .  j a v a  2 s  . c  om*/
        log.warn("zip folder of exporting API will be created at user's current directory ");
        destinationFolderPath = System.getProperty(ImportExportConstants.USER_DIR);
    }
    String folderName;
    if (StringUtils.isBlank(config.getDestinationFolderName())) {
        folderName = ImportExportConstants.DEFAULT_FOLDER_NAME;
        log.warn("zip folder will be created with default name ' " + ImportExportConstants.DEFAULT_FOLDER_NAME
                + " ' ");
    } else
        folderName = config.getDestinationFolderName();

    return destinationFolderPath.concat(File.separator + folderName);

}

From source file:com.jagornet.dhcp.client.GenerateTestConfig.java

public void generate() {
    try {//from ww w  .j a  va 2 s  . c  o m
        DhcpServerConfig config = DhcpServerConfig.Factory.newInstance();

        V6ServerIdOption serverId = V6ServerIdOption.Factory.newInstance();
        serverId.setOpaqueData(OpaqueDataUtil.generateDUID_LLT());
        config.setV6ServerIdOption(serverId);

        V4ServerIdOption v4ServerId = V4ServerIdOption.Factory.newInstance();
        String myIp = ipv4Address.getHostAddress();
        v4ServerId.setIpAddress(myIp);
        config.setV4ServerIdOption(v4ServerId);

        PoliciesType policies = PoliciesType.Factory.newInstance();
        Policy policy = policies.addNewPolicy();
        policy.setName("dhcp.ignoreSelfPackets");
        policy.setValue("false");
        config.setPolicies(policies);

        LinksType links = LinksType.Factory.newInstance();

        Link v4Link = links.addNewLink();
        v4Link.setName("Test IPv4 Client Link");
        // assume the client is on a /24 size IPv4 subnet
        int p = myIp.lastIndexOf('.');
        String myNet = myIp.substring(0, p + 1);
        v4Link.setAddress(myNet.concat("0/24"));
        V4ConfigOptionsType v4Options = v4Link.addNewV4ConfigOptions();
        v4Options.addNewV4SubnetMaskOption().setIpAddress("255.255.255.0");
        // assume the router is at .1
        v4Options.addNewV4RoutersOption().addIpAddress(myNet.concat("1"));
        v4Options.addNewV4DomainServersOption().addIpAddress("10.0.0.1");
        v4Options.addNewV4DomainNameOption().setString("jagornet.test.com");
        V4AddressPoolsType v4Pools = v4Link.addNewV4AddrPools();
        // create a pool of 50 addresses at the end of subnet
        v4Pools.addNewPool().setRange(myNet + "200-" + myNet + "250");

        Link v6Link = links.addNewLink();
        v6Link.setName("Test IPv6 Client Link");
        String myIf = networkInterface.getName();
        v6Link.setInterface(myIf);
        V6ConfigOptionsType v6Options = v6Link.addNewV6MsgConfigOptions();
        v6Options.addNewV6DnsServersOption().addIpAddress("2001:db8:1::1");
        v6Options.addNewV6DomainSearchListOption().addDomainName("jagornet.test.com");
        V6AddressPoolsType v6Pools = v6Link.addNewV6NaAddrPools();
        v6Pools.addNewPool().setRange("2001:db8:1::/64");

        config.setLinks(links);
        DhcpServerConfiguration.saveConfig(config, filename);

    } catch (UnknownHostException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

}

From source file:conexionSiabra.ConexionSiabra.java

public JSONObject modificarPermisosPorPalabras(List<String> permisos) {
    String sPermisosLista = "[";
    for (int i = 0; i < permisos.size(); i++) {
        sPermisosLista = sPermisosLista.concat("" + permisos.get(i) + ",");
    }//from  ww w  .j  ava 2s.  com
    sPermisosLista = sPermisosLista.concat("]");
    sPermisosLista = sPermisosLista.replace(",]", "]");
    Pair<String, String> elemento = new Pair<String, String>("permisos", sPermisosLista);
    ArrayList<Pair<String, String>> elementos = new ArrayList<Pair<String, String>>();
    elementos.add(elemento);
    return oauth.peticionPost(elementos, url_modificar_permisos_por_palabras);
}

From source file:com.mediaworx.ziputils.Zipper.java

/**
 * Adds a directory entry with the given relative path to the zip.
 * @param zipRelativePath   the path of the directory relative to the zip root
 * @throws IOException Exceptions from the underlying package framework are bubbled up
 *///from   w  w  w  .j av a2s . co  m
public void addDirectory(String zipRelativePath) throws IOException {
    if (!zipRelativePath.endsWith("/")) {
        zipRelativePath = zipRelativePath.concat("/");
    }
    zip.putArchiveEntry(new ZipArchiveEntry(zipRelativePath));
    zip.closeArchiveEntry();
}