|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectau.gov.nehta.vendorlibrary.clinicalpackage.util.Validation
public final class Validation
Utility class for validation of a package and its contents.
Method Summary | |
---|---|
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
checkFileNameOnlyUri(java.lang.String name,
java.lang.String uri)
Confirms a URI only contains a filename, with no directories or additional path elements. |
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
checkMatches(java.lang.String name,
java.lang.String actual,
java.lang.String expected)
Confirms a supplied string matches the expected string. |
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
checkNotNull(java.lang.String name,
java.lang.Object value)
Confirms an object is not null. |
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
checkNotNullNorBlank(java.lang.String name,
java.lang.String value)
Confirms a string is not null or blank. |
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
checkNotNullNorEmpty(java.lang.String name,
java.util.Collection collection)
Confirms a Collection is not null nor empty null. |
static boolean |
isNotNull(java.lang.Object value)
Checks if an object is not null. |
static boolean |
isNull(java.lang.Object value)
Checks if an object is null. |
static boolean |
isNullOrBlank(java.lang.String value)
Checks if a string is null or blank. |
static boolean |
isNullOrEmpty(java.util.Collection collection)
Checks if a collection is null or empty. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> checkNotNullNorBlank(java.lang.String name, java.lang.String value)
name
- Name of the variable to be checked.value
- String to be checked.
Map
) encountered or an empty map.public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> checkNotNull(java.lang.String name, java.lang.Object value)
name
- Name of the variable to be checked.value
- Object to be checked.
Map
) encountered or an empty map.public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> checkNotNullNorEmpty(java.lang.String name, java.util.Collection collection)
Collection
is not null nor empty null.
name
- Name of the variable to be checked.collection
- Collection to be checked.
Map
) encountered or an empty map.public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> checkFileNameOnlyUri(java.lang.String name, java.lang.String uri)
name
- Name to be checked.uri
- URI to be checked.
Map
) encountered or an empty map.public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> checkMatches(java.lang.String name, java.lang.String actual, java.lang.String expected)
name
- Name of the actual variable to be checked.actual
- Supplied String to compare to the expected value.expected
- Expected String value.
Map
) encountered or an empty map.public static boolean isNullOrEmpty(java.util.Collection collection)
collection
- Collection to be checked.
true
if the collection is null or empty (ie. size == 0); otherwise false
.public static boolean isNullOrBlank(java.lang.String value)
value
- String to be checked.
true
if the String is null, empty/blank; otherwise false
.public static boolean isNull(java.lang.Object value)
value
- Object to be checked.
true
if the object is null; otherwise false
.public static boolean isNotNull(java.lang.Object value)
value
- Object to be checked.
true
if the object is not null; otherwise false
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |