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:ar.com.zauber.garfio.services.impl.FlexibleSvnLogParser.java

/**
 * Creates the ClassicLogParser./* w w w.  j  a v a2  s  . c o  m*/
 *
 * @param session tracker session
 */
public FlexibleSvnLogParser(final TrackerSession session, final String uid) {
    Validate.notNull(session);
    Validate.notEmpty(uid);
    this.session = session;
    this.uid = uid;
}

From source file:ar.com.zauber.commons.message.message.templates.AbstractMessagePartTemplate.java

/** Creates the AbstractMessagePartTemplate. */
public AbstractMessagePartTemplate(final Resource content, final String contentType, final String charset) {
    Validate.notNull(content);/* w  w w  . ja  v a  2  s. co m*/
    Validate.notEmpty(contentType);

    final ByteArrayOutputStream os = copyResource(content);
    try {
        this.content = os.toString(charset);
    } catch (UnsupportedEncodingException e) {
        throw new UnhandledException(e);
    }
    this.contentType = contentType;
}

From source file:ar.com.zauber.commons.wicket.components.ConfirmLink.java

/**
 * Creates the DeleteConfirmLink.//from   www  .j  a  v  a2 s.  c o  m
 *
 * @param id
 */
public ConfirmLink(final String id, final String confirmMessage) {
    super(id);

    Validate.notEmpty(confirmMessage);
    this.confirmMessage = confirmMessage;
}

From source file:ar.com.zauber.garfio.modules.jira.model.JiraTrackerSession.java

/** constructor */
public JiraTrackerSession(final JiraSoapService jiraSoapService, final String token,
        final ActionFactory actionFactory) {
    Validate.notNull(jiraSoapService);//w w  w.  j  av  a 2 s.  c om
    Validate.notEmpty(token);
    Validate.notNull(actionFactory);

    this.jiraSoapService = jiraSoapService;
    this.token = token;
    this.actionFactory = actionFactory;
}

From source file:de.cubeisland.engine.module.travel.storage.TeleportPointModel.java

public TeleportPointModel newTPPoint(Location location, String name, User owner, String welcomeMsg,
        TeleportType type, Visibility visibility) {
    Validate.notNull(location);/*  w w w .  j av  a2  s .c  o  m*/
    Validate.notEmpty(name);
    Validate.notNull(owner);
    Validate.notNull(type);
    Validate.notNull(visibility);

    this.setLocation(location);

    this.setValue(TABLE_TP_POINT.NAME, name);
    this.setValue(TABLE_TP_POINT.OWNER, owner.getEntity().getKey());
    this.setValue(TABLE_TP_POINT.TYPE, type.value);
    this.setValue(TABLE_TP_POINT.VISIBILITY, visibility.value);

    this.setValue(TABLE_TP_POINT.WELCOMEMSG, welcomeMsg);

    return this;
}

From source file:com.useekm.types.AbstractGeo.java

protected AbstractGeo(String value) {
    Validate.notEmpty(value);
    this.value = value;
}

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

/**
 * Creates the MultipartMessageImpl./*from w  w  w . j  av a 2  s  . co  m*/
 *
 * @param parts a list of parts for this message
 * @param subject subject of the message
 * @param fromAddress  who is sending the message?
 */
public MultipartMessageImpl(final Collection<MessagePart> parts, final String subject,
        final NotificationAddress fromAddress) {
    Validate.notEmpty(parts);
    Validate.notNull(subject);
    Validate.notNull(fromAddress);
    this.parts = parts;
    this.subject = subject;
    this.fromAddress = fromAddress;
}

From source file:com.useekm.indexing.postgis.PartitionDef.java

/**
 * @param predicates The predicates for which this partition should be used.
 *        All of the predicates given here will be put in the same partition,
 *        unless the partition is further partitioned by languages.
 *///from ww  w  . j  a va2s.  co  m
public void setPredicates(String[] predicates) {
    Validate.notNull(predicates);
    Validate.notEmpty(predicates);
    this.predicates = predicates;
}

From source file:bigbluej.CreateCommand.java

private CreateCommand(String name, String meetingID, String attendeePW, String moderatorPW, String welcome,
        String dialNumber, String voiceBridge, String webVoice, String logoutURL, boolean record, int duration,
        String meta) {// w w  w .j av  a 2 s .  c  o m
    Validate.notEmpty(meetingID);
    this.name = name;
    this.meetingID = meetingID;
    this.attendeePW = attendeePW;
    this.moderatorPW = moderatorPW;
    this.welcome = welcome;
    this.dialNumber = dialNumber;
    this.voiceBridge = voiceBridge;
    this.webVoice = webVoice;
    this.logoutURL = logoutURL;
    this.record = record;
    this.duration = duration;
    this.meta = meta;
}

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

/**
 * Creates the ClassicLogParser./*from   w  w w .ja v  a  2s  .  co m*/
 *
 * @param session tracker session
 */
public ClassicLogParser(final TrackerSession session, final String uid) {
    Validate.notNull(session);
    Validate.notEmpty(uid);
    this.session = session;
    this.uid = uid;
}