List of usage examples for org.apache.commons.lang Validate notEmpty
public static void notEmpty(String string)
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'.
From source file:ar.com.zauber.commons.conversion.util.FirstElementConverter.java
/** @Converter#convert(java.lang.Object, ConversionContext) */ public final T convert(final List<T> source, final ConversionContext ctx) { Validate.notNull(source);/*from w w w. j a va 2 s . c o m*/ Validate.notEmpty(source); return source.get(0); }
From source file:com.zaubersoftware.mule.module.github.schema.Push.java
/** Constructor none of the parameters can be null or empty*/ public Push(final User pusher, final Repository repository, final List<Commit> commits, final String ref) { super();/*from w ww .j a v a2s . c om*/ Validate.notEmpty(commits); Validate.notNull(repository); Validate.notNull(pusher); Validate.notEmpty(ref); this.pusher = pusher; this.commits = commits; this.repository = repository; this.ref = ref; }
From source file:com.alibaba.cobar.client.router.rules.AbstractEntityAttributeRule.java
public AbstractEntityAttributeRule(String typePattern, String action, String attributePattern) { super(typePattern, action); Validate.notEmpty(StringUtils.trimToEmpty(attributePattern)); this.attributePattern = attributePattern; }
From source file:ar.com.zauber.garfio.modules.mock.model.actions.MockNumberUpdateCustomFieldAction.java
/** * Creates the MockNumberUpdateCustomField. * * @param issue/*from w ww. j av a2s.c o m*/ * @param field * @param value */ public MockNumberUpdateCustomFieldAction(final Issue issue, final String value) { Validate.notNull(issue); Validate.notEmpty(value); this.issue = issue; this.value = value; }
From source file:ar.com.zauber.commons.wicket.components.ConfirmLink.java
/** Creates the DeleteConfirmLink. */ public ConfirmLink(final String id, final IModel<T> model, final String confirmMessage) { super(id, model); Validate.notEmpty(confirmMessage); this.confirmMessage = confirmMessage; }
From source file:com.alibaba.cobar.client.router.rules.AbstractEntityTypeRule.java
public AbstractEntityTypeRule(String pattern, String action) { Validate.notEmpty(StringUtils.trim(pattern)); Validate.notEmpty(StringUtils.trim(action)); this.typePatten = pattern; this.action = action; }
From source file:com.evolveum.midpoint.repo.sql.query2.hqm.EntityReference.java
public EntityReference(String alias, String name) { Validate.notEmpty(alias); Validate.notEmpty(name); this.alias = alias; this.name = name; }
From source file:ar.com.zauber.commons.repository.utils.AnonymousAuthenticationUserMapper.java
/** constructor */ public AnonymousAuthenticationUserMapper(final String username) { Validate.notEmpty(username); this.username = username; }
From source file:net.iglyduck.utils.sqlbuilder.WrapTable.java
public WrapTable(String table, String aliasName) { Validate.notEmpty(table); Validate.isTrue(!table.startsWith("(")); Validate.isTrue(!table.endsWith(")")); Validate.notEmpty(aliasName);//from ww w . j a v a 2 s. c om this.table = table; this.aliasName = aliasName; }
From source file:com.edmunds.etm.management.api.HttpMonitor.java
/** * Creates a new HttpMonitor with the specified values. * * @param url the URL to monitor/*www. j av a2 s .co m*/ * @param content content expected to appear in the response body */ public HttpMonitor(String url, String content) { Validate.notEmpty(url); Validate.notEmpty(content); this.url = url; this.content = content; }