Example usage for org.apache.commons.lang Validate notEmpty

List of usage examples for org.apache.commons.lang Validate notEmpty

Introduction

In this page you can find the example usage for org.apache.commons.lang Validate notEmpty.

Prototype

public static void notEmpty(String string) 

Source Link

Document

Validate an argument, throwing IllegalArgumentException if the argument String is empty (null or zero length).

 Validate.notEmpty(myString); 

The message in the exception is 'The validated string is empty'.

Usage

From source file:com.zauberlabs.commons.ws.security.BasicCredential.java

/**
 * Creates the BasicCredentials./*  w w w  . j  a v a 2s  . c  o  m*/
 *
 * @param username
 * @param password
 */
public BasicCredential(final String username, final String password) {
    Validate.notEmpty(username);
    Validate.notEmpty(password);
    this.username = username;
    this.password = password;
}

From source file:com.tripod.api.query.result.FacetCount.java

public FacetCount(final String value, final Long count) {
    this.value = value;
    this.count = count;
    Validate.notEmpty(value);
    Validate.notNull(count);// ww w.j av a  2 s . c om
}

From source file:ar.com.zauber.garfio.services.impl.SvnCommitCommand.java

/**
 * Creates the SvnCommitCommand./*from w  w  w . ja  v  a 2 s  .  co m*/
 *
 * @param revision una revision
 * @param repoName repository name
 */
public SvnCommitCommand(final String revision, final String repoName) {
    Validate.notEmpty(revision);
    Validate.notEmpty(repoName);

    this.revision = revision;
    this.repoName = repoName;
}

From source file:com.vmware.identity.saml.Advice.java

public Advice(String sourceURI, List<Attribute> attributes) {
    Validate.notNull(sourceURI);//from w ww .j  a v  a  2  s  .co  m
    Validate.notEmpty(attributes);

    this.sourceURI = sourceURI;
    this.attributes = shallowCopy(attributes);
}

From source file:ar.com.zauber.garfio.services.impl.CompositeTimeConverter.java

/** constructor */
public CompositeTimeConverter(final Collection<TimeConverter> converters) {
    Validate.notEmpty(converters);

    this.converters = converters;
}

From source file:ar.com.zauber.commons.message.message.StringMessagePart.java

/**
 * Creates the StringMessagePart.// w  ww  . ja v a  2  s. co  m
 *
 * @param contentType
 * @param content
 */
public StringMessagePart(final String contentType, final String content) {
    super();
    Validate.notEmpty(contentType);
    Validate.notEmpty(content);
    this.contentType = contentType;
    this.content = content;
}

From source file:bigbluej.Api.java

private Api(String url, String sharedSecret) {
    Validate.notEmpty(url);
    Validate.notEmpty(sharedSecret);
    client = new Client(url, sharedSecret);
}

From source file:com.tripod.api.query.result.Highlight.java

public Highlight(final String field, final List<String> snippets) {
    this.field = field;
    this.snippets = snippets;
    Validate.notNull(this.field);
    Validate.notEmpty(this.snippets);
}

From source file:com.googlecode.t7mp.configuration.LocalMavenRepositoryArtifactResolver.java

public LocalMavenRepositoryArtifactResolver(String localMavenRepositoryPath) {
    Validate.notEmpty(localMavenRepositoryPath);
    localMavenRepository = createLocalMavenRepository(new File(localMavenRepositoryPath));
}

From source file:de.hsos.ecs.richwps.wpsmonitor.client.resource.WpsProcessResource.java

public WpsProcessResource(final WpsResource wpsResource, final String processIdentifier,
        final Map<String, WpsMetricResource> metrics) {
    Validate.notNull(processIdentifier);
    Validate.notEmpty(processIdentifier);
    Validate.notNull(metrics);/*from  w ww.  j a  v  a 2  s . c  om*/

    this.processIdentifier = processIdentifier;
    this.metrics = metrics;
    this.wpsResource = wpsResource;
}