public class InputValidator extends Object
| Constructor and Description |
|---|
InputValidator() |
| Modifier and Type | Method and Description |
|---|---|
static void |
validateGUIDNotNull(String className,
String actionDescription,
String guid,
String guidParameter)
Throw an exception if the supplied userId is null
|
static void |
validateNameNotNull(String className,
String actionDescription,
String name,
String nameParameter)
Throw an exception if the supplied userId is null
|
static void |
validateNodeType(Object... args) |
static void |
validateRemoteServerNameNotNull(String className,
String actionDescription,
String omasServerName)
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 actionDescription,
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 actionDescription,
String statusName)
Validate the supplied string can be converted to a Status and return that status.
|
static void |
validateUserIdNotNull(String className,
String actionDescription,
String userId)
Throw an exception if the supplied userId is null
|
public static void validateRemoteServerURLNotNull(String className, String actionDescription, String omasServerURL) throws InvalidParameterException
className - - name of the class making the call.actionDescription - - action descriptionomasServerURL - - metadata server url.InvalidParameterException - - the org.odpi.openmetadata.accessservices.subjectarea.server URL is not setpublic static void validateRemoteServerNameNotNull(String className, String actionDescription, String omasServerName) throws InvalidParameterException
className - - name of the class making the call.actionDescription - - action descriptionomasServerName - - metadata server nameInvalidParameterException - - the org.odpi.openmetadata.accessservices.subjectarea.server URL is not setpublic static void validateUserIdNotNull(String className, String actionDescription, String userId) throws InvalidParameterException
className - name of the classactionDescription - - action descriptionuserId - user name to validateInvalidParameterException - the userId is nullpublic static Status validateStatusAndCheckNotDeleted(String className, String actionDescription, String statusName) throws InvalidParameterException
className - - name of the class making the call.actionDescription - - name of the method making the call.statusName - - the String name to convert to a StatusInvalidParameterException - invalid statuspublic static void validateGUIDNotNull(String className, String actionDescription, String guid, String guidParameter) throws InvalidParameterException
className - - name of the class making the call.actionDescription - - name of the method making the call.guid - - unique identifier to validateguidParameter - - name of the parameter that passed the userIdInvalidParameterException - - the userId is nullpublic static void validateNameNotNull(String className, String actionDescription, String name, String nameParameter) throws InvalidParameterException
className - - name of the class making the call.actionDescription - - name of the method making the call.name - - unique name to validatenameParameter - - name of the parameter that passed the name.InvalidParameterException - - the userId is nullpublic static void validateNodeType(Object... args) throws InvalidParameterException
InvalidParameterExceptionCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.