Class Validate
java.lang.Object
org.jboss.arquillian.container.spi.client.deployment.Validate
Validate
Validation utility
- Version:
- $Revision: $
- Author:
- Aslak Knutsen, Tommy Tynjä
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanarchiveHasExpectedFileExtension(org.jboss.shrinkwrap.api.Archive<?> archive) static voidconfigurationDirectoryExists(String string, String message) Checks that string is not null and not empty and it represents a path to a valid directorystatic StringgetArchiveExpression(Class<? extends org.jboss.shrinkwrap.api.Archive<?>> type) static booleanisArchiveOfType(Class<? extends org.jboss.shrinkwrap.api.Archive<?>> type, org.jboss.shrinkwrap.api.Archive<?> archive) static voidChecks that object is not null, throws exception if it is.static voidnotNullOrEmpty(String string, String message) Checks that the specified String is not null or empty, throws exception if it is.static voidstateNotNull(Object obj, String message) Checks that obj is not null, throws exception if it is.
-
Method Details
-
getArchiveExpression
-
archiveHasExpectedFileExtension
public static boolean archiveHasExpectedFileExtension(org.jboss.shrinkwrap.api.Archive<?> archive) -
isArchiveOfType
public static boolean isArchiveOfType(Class<? extends org.jboss.shrinkwrap.api.Archive<?>> type, org.jboss.shrinkwrap.api.Archive<?> archive) -
notNull
Checks that object is not null, throws exception if it is.- Parameters:
obj- The object to checkmessage- The exception message- Throws:
IllegalArgumentException- Thrown if obj is null
-
notNullOrEmpty
Checks that the specified String is not null or empty, throws exception if it is.- Parameters:
string- The object to checkmessage- The exception message- Throws:
IllegalArgumentException- Thrown if obj is null
-
stateNotNull
Checks that obj is not null, throws exception if it is.- Parameters:
obj- The object to checkmessage- The exception message- Throws:
IllegalStateException- Thrown if obj is null
-
configurationDirectoryExists
public static void configurationDirectoryExists(String string, String message) throws ConfigurationException Checks that string is not null and not empty and it represents a path to a valid directory- Parameters:
string- The path to checkmessage- The exception message- Throws:
ConfigurationException- Thrown if string is empty, null or it does not represent a path the a valid directory
-