public class InputValidator extends Object
| Constructor and Description |
|---|
InputValidator() |
| Modifier and Type | Method and Description |
|---|---|
static void |
validateEffectiveDate(String className,
String methodName,
Date to,
Date from)
Throw an exception if the supplied effective dates are not valid
|
static void |
validateGUIDNotNull(String className,
String methodName,
String guid,
String guidParameter)
Throw an exception if the supplied guid is null
|
static void |
validateNameNotNull(String className,
String methodName,
String name,
String nameParameter)
Throw an exception if the supplied userId is null
|
static void |
validateNodeType(Object... args) |
static void |
validateRemoteServerNameNotNull(String className,
String methodName,
String omasServerURL)
Throw an exception if the metadata server Name (which comes from the configuration has not been supplied on the constructor.
|
static void |
validateRemoteServerURLNotNull(String className,
String methodName,
String omasServerURL)
Throw an exception if the metadata server URL (which comes from the configuration has not been supplied on the constructor.
|
static Status |
validateStatusAndCheckNotDeleted(String className,
String methodName,
String statusName)
Validate the supplied string can be converted to a Status and return that status.
|
static void |
validateUserIdNotNull(String className,
String methodName,
String userId)
Throw an exception if the supplied userId is null
|
public static void validateRemoteServerURLNotNull(String className, String methodName, String omasServerURL) throws InvalidParameterException
className - - name of the class making the call.methodName - - name of the method making the call.omasServerURL - - metadata server url.InvalidParameterException - - the org.odpi.openmetadata.accessservices.subjectarea.server URL is not setpublic static void validateRemoteServerNameNotNull(String className, String methodName, String omasServerURL) throws InvalidParameterException
className - - name of the class making the call.methodName - - name of the method making the call.omasServerURL - - metadata server url.InvalidParameterException - - the org.odpi.openmetadata.accessservices.subjectarea.server URL is not setpublic static void validateUserIdNotNull(String className, String methodName, String userId) throws InvalidParameterException
className - name of the classmethodName - name of the method making the call.userId - user name to validateInvalidParameterException - the userId is nullpublic static void validateEffectiveDate(String className, String methodName, Date to, Date from) throws InvalidParameterException
className - name of the classmethodName - name of the method making the call.to - effective to datefrom - effective from dateInvalidParameterException - the userId is nullpublic static Status validateStatusAndCheckNotDeleted(String className, String methodName, String statusName) throws InvalidParameterException
className - - name of the class making the call.methodName - - name of the method making the call.statusName - - the String name to convert to a StatusInvalidParameterException - invalid statuspublic static void validateGUIDNotNull(String className, String methodName, String guid, String guidParameter) throws InvalidParameterException
className - - name of the class making the call.methodName - - name of the method making the call.guid - - unique identifier to validateguidParameter - - name of the parameter that passed the guidInvalidParameterException - - the guid is nullpublic static void validateNameNotNull(String className, String methodName, String name, String nameParameter) throws InvalidParameterException
className - - name of the class making the call.methodName - - name of the method making the call.name - - unique name to validatenameParameter - - name of the parameter that passed the name.InvalidParameterException - - the guid is nullpublic static void validateNodeType(Object... args) throws InvalidParameterException
InvalidParameterExceptionCopyright © 2018–2020 ODPi. All rights reserved.