List of usage examples for org.apache.commons.lang.builder ToStringStyle SHORT_PREFIX_STYLE
ToStringStyle SHORT_PREFIX_STYLE
To view the source code for org.apache.commons.lang.builder ToStringStyle SHORT_PREFIX_STYLE.
Click Source Link
From source file:jenkins.plugins.publish_over_ftp.BapFtpCredentials.java
public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("username", username) .append("password", "***").toString(); }
From source file:com.xtructure.xneat.genetics.link.UTestLinkGeneImpl.java
public void toStringReturnsExpectedString() { assertThat("", // LINK_GENE.toString(), // isEqualTo(new ToStringBuilder(LINK_GENE, ToStringStyle.SHORT_PREFIX_STYLE)// .append("id", LINK_GENE.getId())// .append("source", LINK_GENE.getSourceId())// .append("target", LINK_GENE.getTargetId())// .append("inn", LINK_GENE.getInnovation())// .append("fields", LINK_GENE.getFieldMap())// .toString()));/*from w w w . ja v a 2s .c om*/ }
From source file:net.ripe.rpki.commons.crypto.cms.roa.RoaPrefix.java
@Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("prefix", getPrefix()) .append("maximumLength", maximumLength).toString(); }
From source file:de.iteratec.iteraplan.businesslogic.exchange.legacyExcel.importer.TextAttData.java
/** * {@inheritDoc}/* w w w . ja v a2 s .c om*/ */ @Override public String toString() { ToStringBuilder toStringBuilder = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE); toStringBuilder.append("name", getName().getAttributeValue()); toStringBuilder.append("oldName", getOldName().getAttributeValue()); toStringBuilder.append("description", getDescription().getAttributeValue()); toStringBuilder.append("groupName", getGroupName().getAttributeValue()); toStringBuilder.append("mandatory", getMandatory().getAttributeValue()); toStringBuilder.append("active", getActive().getAttributeValue()); toStringBuilder.append("multiline", getMultiline().getAttributeValue()); return toStringBuilder.toString(); }
From source file:jp.primecloud.auto.common.component.DnsStrategy.java
/** * TODO: /*from w w w. j a v a 2 s . c om*/ * * @param fqdn * @param ipAddress */ public void addForward(String fqdn, String ipAddress) { List<String> commands = createCommands(); List<String> stdins = createStdinsCommon(); stdins.addAll(createAddForward(fqdn, ipAddress)); stdins.add("quit"); CommandResult result = execute(commands, stdins); if (result.getExitValue() != 0) { // ???? AutoException exception = new AutoException("ECOMMON-000201", fqdn, ipAddress); exception.addDetailInfo( "result=" + ReflectionToStringBuilder.toString(result, ToStringStyle.SHORT_PREFIX_STYLE)); throw exception; } // ???? long timeout = 10000L; long startTime = System.currentTimeMillis(); while (true) { String hostAddress = getHostAddress(fqdn); if (StringUtils.equals(ipAddress, hostAddress)) { break; } if (System.currentTimeMillis() - startTime > timeout) { // throw new AutoException("ECOMMON-000202", fqdn, ipAddress, hostAddress); } try { Thread.sleep(1000); } catch (InterruptedException ignore) { } } }
From source file:com.shopzilla.api.client.model.MerchantInfo.java
@Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append(id).append(name).append(url) .append(merchantUrl).append(logoUrl).append(countryCode).append(ratings).toString(); }
From source file:jp.primecloud.auto.zabbix.client.ItemClientTest.java
@Test @Ignore//from w ww . j a v a 2s . co m public void testGet() { // ? ItemGetParam param = new ItemGetParam(); // List<String> list = new ArrayList<String>(); // list.add("18359"); // param.setItemids(list); param.setOutput("extend"); List<String> hostids = new ArrayList<String>(); hostids.add("10001"); param.setHostids(hostids); List<Item> items = client.item().get(param); for (Item item : items) { log.debug(ReflectionToStringBuilder.toString(item, ToStringStyle.SHORT_PREFIX_STYLE)); } /* if (items.size() > 0) { // ItemId??? List<Integer> itemIds = new ArrayList<Integer>(); itemIds.add(items.get(0).getItemId()); param.set(tempids); List<Template> templates2 = client.template().get(param); assertEquals(1, templates2.size()); assertEquals(templates.get(0).getTemplateid(), templates2.get(0).getTemplateid()); }*/ }
From source file:bazaar4idea.BzrFile.java
@Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("repo", vcsRoot) .append("file", file).append("relativePath", getRelativePath()).toString(); }
From source file:jp.primecloud.auto.zabbix.client.HostClientTest.java
@Test @Ignore//from ww w. j a v a 2 s.c om public void testGet() { // ? HostGetParam param = new HostGetParam(); param.setOutput("extend"); List<Host> hosts = client.host().get(param); for (Host host : hosts) { log.trace(ReflectionToStringBuilder.toString(host, ToStringStyle.SHORT_PREFIX_STYLE)); } if (hosts.size() > 0) { // hostid??? List<String> hostids = new ArrayList<String>(); hostids.add(hosts.get(0).getHostid().toString()); param.setHostids(hostids); param.setSelectParentTemplates("extend"); param.setSelectGroups("extend"); List<Host> hosts2 = client.host().get(param); assertEquals(1, hosts2.size()); assertEquals(hosts.get(0).getHostid(), hosts2.get(0).getHostid()); Host host = hosts2.get(0); log.trace(ReflectionToStringBuilder.toString(host, ToStringStyle.SHORT_PREFIX_STYLE)); //for (Template template : host.getTemplates()) { for (Template template : host.getParenttemplates()) { log.trace(ReflectionToStringBuilder.toString(template, ToStringStyle.SHORT_PREFIX_STYLE)); } for (Hostgroup hostgroup : host.getGroups()) { log.trace(ReflectionToStringBuilder.toString(hostgroup, ToStringStyle.SHORT_PREFIX_STYLE)); } } }
From source file:jp.primecloud.auto.zabbix.client.HostgroupClientTest.java
@Test @Ignore/* w ww . ja va2 s.com*/ public void testGet() { // ? HostgroupGetParam param = new HostgroupGetParam(); param.setOutput("extend"); List<Hostgroup> hostgroups = client.hostgroup().get(param); for (Hostgroup hostgroup : hostgroups) { log.trace(ReflectionToStringBuilder.toString(hostgroup, ToStringStyle.SHORT_PREFIX_STYLE)); } if (hostgroups.size() > 0) { // hostgroupid??? List<String> hostgroupids = new ArrayList<String>(); hostgroupids.add(hostgroups.get(0).getGroupid()); param.setGroupids(hostgroupids); List<Hostgroup> hostgroups2 = client.hostgroup().get(param); assertEquals(1, hostgroups2.size()); assertEquals(hostgroups.get(0).getGroupid(), hostgroups2.get(0).getGroupid()); } }