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

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

Introduction

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

Prototype

public static String deleteWhitespace(String str) 

Source Link

Document

Deletes all whitespaces from a String as defined by Character#isWhitespace(char) .

Usage

From source file:com.inovaworks.ObservedProperty.java

public ObservedProperty(String property, Object value, String units) {
    this.propertyName = property;
    this.property = StringUtils.deleteWhitespace(property);

    if (value != null)
        this.result.value = "" + value;
    if (units != null)
        this.result.uom = units;
}

From source file:de.tsystems.mms.apm.performancesignature.dynatrace.configuration.ConfigurationTestCase.java

public ConfigurationTestCase(final String name, final List<Dashboard> singleDashboards,
        final List<Dashboard> comparisonDashboards, final String xmlDashboard) {
    this.name = StringUtils.deleteWhitespace(name);
    this.singleDashboards = singleDashboards;
    this.comparisonDashboards = comparisonDashboards;
    this.xmlDashboard = xmlDashboard;
}

From source file:com.photon.maven.plugins.android.common.DeviceHelper.java

/**
 * @return  the manufacturer of the device as set in #MANUFACTURER_PROPERTY, typically "unknown" for emulators
 *///from w  w  w.ja v  a  2s .  co m
public static String getManufacturer(IDevice device) {
    return StringUtils.deleteWhitespace(device.getProperty(MANUFACTURER_PROPERTY));
}

From source file:de.tsystems.mms.apm.performancesignature.util.PerfSigUIUtils.java

public static String generateTitle(final String measure, final String chartDashlet, String aggregation) {
    String chartDashletName;/*  w w w  .ja  v a 2  s.  c o m*/
    if (StringUtils.deleteWhitespace(measure).equalsIgnoreCase(StringUtils.deleteWhitespace(chartDashlet))) {
        chartDashletName = chartDashlet;
    } else {
        chartDashletName = chartDashlet + " - " + measure;
    }
    return chartDashletName + " (" + aggregation + ")";
}

From source file:de.tsystems.mms.apm.performancesignature.PerfSigStartRecording.java

@DataBoundConstructor
public PerfSigStartRecording(final String dynatraceProfile, final String testCase, final String recordingOption,
        final boolean lockSession) {
    this.dynatraceProfile = dynatraceProfile;
    this.testCase = StringUtils.deleteWhitespace(testCase);
    this.recordingOption = recordingOption;
    this.lockSession = lockSession;
}

From source file:com.ewcms.publication.freemarker.directive.page.SkipDirectiveTest.java

@Test
public void testPageCountIsOnlyOne() throws Exception {
    Template template = cfg.getTemplate(getTemplatePath("skip.html"));
    Map<String, Object> params = new HashMap<String, Object>();
    params.put(GlobalVariable.PAGE_NUMBER.toString(), Integer.valueOf(0));
    params.put(GlobalVariable.PAGE_COUNT.toString(), Integer.valueOf(1));
    String value = this.process(template, params);
    value = StringUtils.deleteWhitespace(value);
    Assert.assertEquals("|||", value);
}

From source file:com.photon.maven.plugins.android.common.DeviceHelper.java

/**
 * @return  the model of the device as set in #MODEL_PROPERTY, typically "sdk" for emulators
 *//*w ww  .j a va2 s .  c om*/
public static String getModel(IDevice device) {
    return StringUtils.deleteWhitespace(device.getProperty(MODEL_PROPERTY));
}

From source file:de.tsystems.mms.apm.performancesignature.dynatrace.PerfSigStartRecording.java

@DataBoundConstructor
public PerfSigStartRecording(final String dynatraceProfile, final String testCase) {
    this.dynatraceProfile = dynatraceProfile;
    this.testCase = StringUtils.deleteWhitespace(testCase);
}

From source file:edu.ku.brc.af.core.SpecialMsgNotifier.java

public void checkForMessages() {
    if (blockMsg.get()) {
        return;//from  w w w.ja  va2 s  . co m
    }

    SwingWorker<Integer, Integer> msgCheckWorker = new SwingWorker<Integer, Integer>() {
        protected String msg = null;

        /* (non-Javadoc)
         * @see javax.swing.SwingWorker#doInBackground()
         */
        @Override
        protected Integer doInBackground() throws Exception {
            if (!blockMsg.get()) {
                try {
                    Thread.sleep(15000); // 15 seconds

                    String url = UIRegistry.getResourceString("CGI_BASE_URL") + "/getmsg2.php";
                    String installID = UsageTracker.getInstallId();

                    msg = send(url, installID);
                    msg = StringUtils.deleteWhitespace(msg);

                } catch (Exception ex) {
                    // die silently
                }
            }
            return null;
        }

        @Override
        protected void done() {
            super.done();

            if (msg != null) {
                //System.out.println("["+msg+"]");

                if (StringUtils.isNotEmpty(msg) && !StringUtils.contains(msg, "NOMSG")) {
                    String header = msg.length() > 6 ? msg.substring(0, 7).toUpperCase() : "";
                    if (header.startsWith("<HTML>")) {
                        UIRegistry.showLocalizedError("NO_INTERNET");
                    } else {
                        UIRegistry.showError(JOptionPane.WARNING_MESSAGE, msg);
                    }
                }
            }

        }
    };

    msgCheckWorker.execute();
}

From source file:com.elasticbox.jenkins.k8s.plugin.builders.DeployChartBuildStep.java

@Override
protected void doPerform(Run<?, ?> run, TaskLogger taskLogger, KubernetesCloud kubeCloud, ChartRepo chartRepo)
        throws ServiceException {

    taskLogger.info("Deploying chart: " + getChartName());

    final String namespace = kubeCloud.getNamespace();
    final String runName = (run != null) ? run.toString() : "<NO-RUN>";

    Map<String, String> label = Collections.singletonMap(JENKINS_JOB,
            StringUtils.deleteWhitespace(runName).replace('#', '_'));

    final Chart chart = deploymentService.deployChart(getKubeName(), namespace, chartRepo, chartName, label);
    taskLogger.info("Chart [" + chartName + "] deployed");

    if (deleteChartWhenFinished && run instanceof FreeStyleBuild) {
        taskLogger.info("Chart [" + chartName + "] will be deleted at the end of the run");
        final DeployChartCleanup chartCleanup = new DeployChartCleanup(this, namespace, chart, taskLogger);
        ((FreeStyleBuild) run).getEnvironments().add(0, chartCleanup);
    }//  w  ww  .j  ava  2  s  .c  o  m
}