List of usage examples for org.apache.commons.lang3 StringUtils EMPTY
String EMPTY
To view the source code for org.apache.commons.lang3 StringUtils EMPTY.
Click Source Link
From source file:com.sirius.hadoop.job.onlinetime.StatusKey.java
@Override public void write(DataOutput out) throws IOException { out.writeUTF(userId != null ? userId : StringUtils.EMPTY); out.writeLong(time); }
From source file:de.micromata.genome.util.i18n.PlaceholderTranslationProvider.java
@Override public Object getTranslationForKey(String key) { Object value = super.getTranslationForKey(key); if ((value instanceof String) == false) { return value; }//from ww w . ja v a2s . com String svalue = (String) value; String resolved = PlaceHolderReplacer.resolveReplace(svalue, "I{", "}", new StringResolver() { @Override public String resolve(String placeholder) { return Objects.toString(getTranslationForKey(placeholder), StringUtils.EMPTY); } }); return resolved; }
From source file:de.blizzy.documentr.markdown.macro.impl.PanelMacro.java
@Override public String getHtml(IMacroContext macroContext) { String params = macroContext.getParameters(); String width = StringUtils.substringBefore(params, " ").trim(); //$NON-NLS-1$ boolean border = StringUtils.indexOf(params, " border") >= 0; //$NON-NLS-1$ return "<div class=\"span" + StringEscapeUtils.escapeHtml4(width) + "\">" + //$NON-NLS-1$ //$NON-NLS-2$ (border ? "<div class=\"span12 panel-border\">" : StringUtils.EMPTY) + //$NON-NLS-1$ macroContext.getBody() + (border ? "</div>" : StringUtils.EMPTY) + //$NON-NLS-1$ "</div>"; //$NON-NLS-1$ }
From source file:com.aqnote.app.wifianalyzer.wifi.model.ChannelRatingTest.java
@Before public void setUp() { wiFiDetail1 = new WiFiDetail("SSID1", "20:cf:30:ce:1d:71", StringUtils.EMPTY, new WiFiSignal(2432, 2432, WiFiWidth.MHZ_20, -50), new WiFiAdditional(StringUtils.EMPTY, "192.168.1.1", 11)); wiFiDetail2 = new WiFiDetail("SSID2", "58:6d:8f:fa:ae:c0", StringUtils.EMPTY, new WiFiSignal(2442, 2442, WiFiWidth.MHZ_20, -70), WiFiAdditional.EMPTY); wiFiDetail3 = new WiFiDetail("SSID3", "84:94:8c:9d:40:68", StringUtils.EMPTY, new WiFiSignal(2452, 2452, WiFiWidth.MHZ_20, -60), WiFiAdditional.EMPTY); wiFiDetail4 = new WiFiDetail("SSID3", "64:A4:8c:90:10:12", StringUtils.EMPTY, new WiFiSignal(2452, 2452, WiFiWidth.MHZ_20, -80), WiFiAdditional.EMPTY); fixture = new ChannelRating(); }
From source file:com.inkubator.hrm.web.converter.ModeRefConverter.java
@Override public String getAsString(FacesContext context, UIComponent component, Object value) { String message = StringUtils.EMPTY; // Pay Salary Component id String paySalaryComponentId = component.getAttributes().get("paySalaryComponentId").toString(); try {/* ww w. j ava2 s . c o m*/ //get specifik from paysalaryComponent->modelComponent->specifik PaySalaryComponentService paySalaryComponentService = (PaySalaryComponentService) ServiceWebUtil .getService("paySalaryComponentService"); PaySalaryComponent paySalaryComponent = paySalaryComponentService .getEntityByPkWithDetail(Long.valueOf(paySalaryComponentId)); //if specific == loan schema if (Objects.equals(paySalaryComponent.getModelComponent().getSpesific(), HRMConstant.MODEL_COMP_LOAN)) { LoanNewTypeService loanSchemaService = (LoanNewTypeService) ServiceWebUtil .getService("loanNewTypeService"); LoanNewType loanNewType = loanSchemaService .getEntiyByPK(Long.valueOf(paySalaryComponent.getModelReffernsil())); message = loanNewType.getLoanTypeName(); } //if specific == reimbursment schema if (Objects.equals(paySalaryComponent.getModelComponent().getSpesific(), HRMConstant.MODEL_COMP_REIMBURSEMENT)) { // RmbsTypeService rmbsTypeService = (RmbsTypeService) ServiceWebUtil.getService("rmbsTypeService"); RmbsType rmbsType = rmbsTypeService .getEntiyByPK(Long.valueOf(paySalaryComponent.getModelReffernsil())); message = rmbsType.getName(); } //if specific ==benefit group if (Objects.equals(paySalaryComponent.getModelComponent().getSpesific(), HRMConstant.MODEL_COMP_BENEFIT_TABLE)) { BenefitGroupService benefitGroupService = (BenefitGroupService) ServiceWebUtil .getService("benefitGroupService"); BenefitGroup benefitGroup = benefitGroupService .getEntiyByPK(Long.valueOf(paySalaryComponent.getModelReffernsil())); message = benefitGroup.getName(); } } catch (Exception ex) { Logger.getLogger(ModelReferensiConverter.class.getName()).log(Level.SEVERE, null, ex); } return message; }
From source file:com.aqnote.app.wifianalyzer.wifi.model.WiFiAdditional.java
public WiFiAdditional(@NonNull String vendorName, boolean configuredNetwork) { this(vendorName, StringUtils.EMPTY, WiFiConnection.LINK_SPEED_INVALID, configuredNetwork); }
From source file:com.aqnote.app.wifianalyzer.wifi.graph.time.TimeAxisLabelTest.java
@Test public void testXAxis() throws Exception { assertEquals(StringUtils.EMPTY, fixture.formatLabel(-2, true)); assertEquals(StringUtils.EMPTY, fixture.formatLabel(-1, true)); assertEquals(StringUtils.EMPTY, fixture.formatLabel(0, true)); assertEquals(StringUtils.EMPTY, fixture.formatLabel(1, true)); assertEquals("2", fixture.formatLabel(2, true)); assertEquals("10", fixture.formatLabel(10, true)); }
From source file:ch.cyberduck.ui.cocoa.CreateSymlinkController.java
public CreateSymlinkController(final BrowserController parent, final Cache<Path> cache) { super(parent, cache, NSAlert.alert(LocaleFactory.localizedString("Create new symbolic link", "File"), StringUtils.EMPTY, LocaleFactory.localizedString("Create", "File"), null, LocaleFactory.localizedString("Cancel", "File"))); alert.setIcon(IconCacheFactory.<NSImage>get().aliasIcon(null, 64)); final Path selected = this.getSelected(); inputField.setStringValue(FilenameUtils.getBaseName(selected.getName())); this.setMessage(MessageFormat.format( LocaleFactory.localizedString("Enter the name for the new symbolic link for {0}:", "File"), selected.getName()));/*from w w w . j a v a2 s .c o m*/ }
From source file:com.capgemini.b2bassets.storefront.web.mvc.AcceleratorUrlPathHelperTest.java
@Test public void testGetPathWithinServletMapping() { final AcceleratorUrlPathHelper pathHelper = new AcceleratorUrlPathHelper(); request.setAttribute(WebUtils.INCLUDE_SERVLET_PATH_ATTRIBUTE, StringUtils.EMPTY); final String result = pathHelper.getPathWithinServletMapping(request); Assertions.assertThat(result.equals("/")).isTrue(); }
From source file:com.omnigon.aem.handlebars.helpers.OrHelper.java
private Boolean isValidValue(Object value) { if (value == null || StringUtils.EMPTY.equals(value) || Boolean.FALSE.equals(value)) { return Boolean.FALSE; }// w ww .j a v a2 s.co m return Boolean.TRUE; }