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:jp.tricreo.schemagenerator.domain.lifecycle.factory.impl.ActionFactoryImpl.java
/** * {@inheritDoc}//from w w w .j a v a 2 s.c om * * @param command ?SQL:?ECHO:????? */ @Override public Action<?> newAction(String command) { Validate.notNull(command); Validate.notEmpty(command); Action<?> action = null; if (command.startsWith(ECHO)) { action = new EchoActionImpl(command.substring(ECHO.length())); } else if (command.startsWith(SQL)) { action = new SqlActionImpl(command.substring(SQL.length())); } return action; }
From source file:ar.com.zauber.garfio.modules.jira.model.actions.AddNoteToIssueAction.java
/** Creates the AddNoteToIssueAction. */ public AddNoteToIssueAction(final String id, final JiraTrackerSession session, final String note) { Validate.notEmpty(id); Validate.notNull(session);//from w ww. j a va 2s.com Validate.isTrue(!StringUtils.isBlank(note)); this.id = id; this.session = session; this.note = note; }
From source file:ar.com.zauber.garfio.modules.mantis.model.actions.ResolveIssueAction.java
/** * Creates the ResolveIssueAction./*from ww w . j av a 2 s .co m*/ * * @param issue issue to close * @param session session */ public ResolveIssueAction(final MantisIssue issue, final MantisTrackerSession session, final String uid) { super(issue, session); Validate.notEmpty(uid); this.uid = uid; }
From source file:com.useekm.indexing.algebra.indexer.IdxConstraintQuery.java
/** * @param constraintPattern The joined statement pattern. At least one of the variables should be equal to another {@link IdxQuery} in the same {@link IdxJoin}. *///w ww . j av a 2 s. c o m public IdxConstraintQuery(StatementPattern constraintPattern) { super(constraintPattern.getSubjectVar(), constraintPattern.getPredicateVar(), constraintPattern.getObjectVar()); Validate.isTrue(constraintPattern.getPredicateVar().getValue() instanceof URI); Validate.notEmpty(getSubjectVar().getName()); }
From source file:ar.com.zauber.commons.facebook.utils.controllers.FacebookController.java
/** * Creates the FacebookController./*from ww w .jav a2 s .c o m*/ * * @param view nombre de la vista de success */ public FacebookController(final String view) { Validate.notEmpty(view); this.view = view; }
From source file:ar.com.zauber.garfio.modules.jira.model.actions.UpdateLogWorkAction.java
/** constructor */ public UpdateLogWorkAction(final JiraIssue issue, final JiraTrackerSession session, final String value) { Validate.notNull(issue);//from ww w.j a v a2 s . c om Validate.notNull(session); Validate.notEmpty(value); this.issue = issue; this.session = session; }
From source file:com.mstiles92.plugins.stileslib.player.UUIDFetcher.java
public UUIDFetcher(String... usernames) { Validate.notNull(usernames);/*from w w w .j av a 2s.c o m*/ Validate.notEmpty(usernames); for (String username : usernames) { Validate.notNull(username); Validate.notEmpty(username); } this.usernames = Arrays.asList(usernames); }
From source file:net.iglyduck.utils.sqlbuilder.TempTable.java
public TempTable column(String item) { Validate.notEmpty(item); if (columns == null) { columns = new ArrayList<String>(); }/* ww w .ja va 2s. c om*/ columns.add(item); return this; }
From source file:com.edmunds.etm.management.api.MavenModule.java
/** * Explicit constructor calling out each of the properties. * * @param groupId the group id/*from w ww.j a va2 s . c o m*/ * @param artifactId the artifact id * @param version the maven version */ public MavenModule(String groupId, String artifactId, String version) { Validate.notEmpty(groupId); Validate.notEmpty(artifactId); Validate.notEmpty(version); this.groupId = groupId; this.artifactId = artifactId; this.version = version; // Since all fields are final immutable calculate the hashCode now. this.hashCode = new HashCodeBuilder().append(groupId).append(artifactId).append(version).toHashCode(); }
From source file:com.alibaba.cobar.client.router.rules.AbstractEntityAttributeRule.java
public void setAttributePattern(String attributePattern) { Validate.notEmpty(StringUtils.trimToEmpty(attributePattern)); this.attributePattern = attributePattern; }