Example usage for org.apache.commons.lang3 StringUtils EMPTY

List of usage examples for org.apache.commons.lang3 StringUtils EMPTY

Introduction

In this page you can find the example usage for org.apache.commons.lang3 StringUtils EMPTY.

Prototype

String EMPTY

To view the source code for org.apache.commons.lang3 StringUtils EMPTY.

Click Source Link

Document

The empty String "" .

Usage

From source file:ch.cyberduck.core.s3.S3LifecycleConfiguration.java

@Override
public void setConfiguration(final Path file, final LifecycleConfiguration configuration)
        throws BackgroundException {
    final Path container = containerService.getContainer(file);
    try {//from   w ww  . j ava2 s . c o m
        if (configuration.getTransition() != null || configuration.getExpiration() != null) {
            final LifecycleConfig config = new LifecycleConfig();
            // Unique identifier for the rule. The value cannot be longer than 255 characters. When you specify an empty prefix, the rule applies to all objects in the bucket
            final LifecycleConfig.Rule rule = config
                    .newRule(String.format("%s-%s", PreferencesFactory.get().getProperty("application.name"),
                            new AlphanumericRandomStringService().random()), StringUtils.EMPTY, true);
            if (configuration.getTransition() != null) {
                rule.newTransition().setDays(configuration.getTransition());
            }
            if (configuration.getExpiration() != null) {
                rule.newExpiration().setDays(configuration.getExpiration());
            }
            session.getClient().setLifecycleConfig(container.getName(), config);
        } else {
            session.getClient().deleteLifecycleConfig(container.getName());
        }
    } catch (ServiceException e) {
        throw new S3ExceptionMappingService().map("Failure to write attributes of {0}", e, container);
    }
}

From source file:com.stefanbrenner.droplet.model.internal.AbstractDevice.java

@Override
public void reset() {
    setName(getDeviceType());
    setDescription(StringUtils.EMPTY);
}

From source file:monasca.log.api.model.Log.java

@Transient
public String getApplicationType() {
    final String val = (String) this.get(KEY_APPLICATION_TYPE);
    return val != null ? val : StringUtils.EMPTY;
}

From source file:de.blizzy.documentr.web.access.UserController.java

@RequestMapping(value = "/add", method = RequestMethod.GET)
@PreAuthorize("hasApplicationPermission(ADMIN)")
public String addUser(Model model) {
    UserForm form = new UserForm(StringUtils.EMPTY, StringUtils.EMPTY, StringUtils.EMPTY, StringUtils.EMPTY,
            StringUtils.EMPTY, false, null);
    model.addAttribute("userForm", form); //$NON-NLS-1$
    return "/user/edit"; //$NON-NLS-1$
}

From source file:com.vrem.wifianalyzer.wifi.channelgraph.InRangePredicateTest.java

private WiFiDetail makeWiFiDetail(int frequency) {
    WiFiSignal wiFiSignal = new WiFiSignal(frequency + 20, frequency, WiFiWidth.MHZ_20, -10);
    return new WiFiDetail("SSID", "BSSID", StringUtils.EMPTY, wiFiSignal, WiFiAdditional.EMPTY);
}

From source file:costumetrade.common.scene.constant.Scene.java

/**
 *  ?code??/*w  w w. j  a  v a 2s .co  m*/
 *  @param code ?
 *  @return ??
 */
public static String getName(String code) {
    Scene[] scenes = Scene.values();
    for (Scene scene : scenes) {
        if (scene.code.equals(code)) {
            return scene.name;
        }
    }
    return StringUtils.EMPTY;
}

From source file:com.vrem.wifianalyzer.wifi.model.WiFiDetailTest.java

@Test
public void testGetTitleWithEmptySSID() throws Exception {
    // setup/*from  w ww .j  a  v a  2 s . co  m*/
    String expectedTitle = "*** (" + BSSID + ")";
    fixture = new WiFiDetail(StringUtils.EMPTY, BSSID, WPA, wiFiSignal);
    // validate
    assertEquals(expectedTitle, fixture.getTitle());
}

From source file:com.nridge.core.base.ds.DSCriterion.java

/**
 * Constructor accepts a field name, operator and a single value
 * and initializes the DSCriterion accordingly.
 *
 * @param aName Field name./* ww w . ja v a 2s. c o m*/
 * @param anOperator Field operator.
 * @param aValue Field value.
 */
public DSCriterion(String aName, Field.Operator anOperator, String aValue) {
    mOperator = anOperator;
    mIsCaseInsensitive = false;
    mField = new DataTextField(aName, StringUtils.EMPTY, aValue);
}

From source file:info.magnolia.ui.form.field.converter.StringToCalendarConverter.java

@Override
public String convertToPresentation(Calendar value, Class<? extends String> targetType, Locale locale)
        throws ConversionException {
    if (value == null) {
        return StringUtils.EMPTY;
    }/*from w  w  w. ja  v a2s  .  co m*/
    return dateConverter.convertToPresentation(value.getTime(), targetType, locale);
}

From source file:de.blizzy.backup.vfs.RemoteLocation.java

public void saveSettings(IDialogSettings section) {
    section.put("host", host); //$NON-NLS-1$
    section.put("port", String.valueOf(port)); //$NON-NLS-1$
    section.put("login", StringUtils.isNotBlank(login) ? login : StringUtils.EMPTY); //$NON-NLS-1$
    section.put("password", StringUtils.isNotBlank(password) ? password : StringUtils.EMPTY); //$NON-NLS-1$
    section.put("folder", folder); //$NON-NLS-1$
}