Package org.serviceconnector.cmd

Examples of org.serviceconnector.cmd.SCMPValidatorException


   * @throws SCMPValidatorException
   *             the SCMP validator exception
   */
  public static void validateLong(long lowerLimitInc, String longStringValue, SCMPError error) throws SCMPValidatorException {
    if (longStringValue == null) {
      throw new SCMPValidatorException(error, "Numeric value is missing");
    }
    long longValue = 0;
    try {
      longValue = Long.parseLong(longStringValue);
    } catch (NumberFormatException ex) {
      throw new SCMPValidatorException(error, "LongValue=" + longStringValue + " must be numeric");
    }
    ValidatorUtility.validateLong(lowerLimitInc, longValue, error);
  }
View Full Code Here


   * @throws SCMPValidatorException
   *             the SCMP validator exception
   */
  public static void validateLong(long lowerLimitInc, long longValue, SCMPError error) throws SCMPValidatorException {
    if (longValue < lowerLimitInc) {
      throw new SCMPValidatorException(error, "LongValue=" + longValue + " too low");
    }
  }
View Full Code Here

   *             the SCMP validator exception
   */
  public static void validateLong(long lowerLimitInc, String longStringValue, long upperLimitInc, SCMPError error)
      throws SCMPValidatorException {
    if (longStringValue == null) {
      throw new SCMPValidatorException(error, "Numeric value is missing");
    }
    long longValue = 0;
    try {
      longValue = Long.parseLong(longStringValue);
    } catch (NumberFormatException ex) {
      throw new SCMPValidatorException(error, "LongValue=" + longStringValue + " must be numeric");
    }
    ValidatorUtility.validateLong(lowerLimitInc, longValue, upperLimitInc, error);
  }
View Full Code Here

   *             the SCMP validator exception
   */
  public static void validateLong(long lowerLimitInc, long longValue, long upperLimitInc, SCMPError error)
      throws SCMPValidatorException {
    if (longValue < lowerLimitInc || longValue > upperLimitInc) {
      throw new SCMPValidatorException(error, "LongValue=" + longValue + " is not in range (" + lowerLimitInc + "-"
          + upperLimitInc + ")");
    }
  }
View Full Code Here

   * @throws SCMPValidatorException
   *             the SCMP validator exception
   */
  public static void validateIpAddressList(String ipAddressListString) throws SCMPValidatorException {
    if (ipAddressListString == null) {
      throw new SCMPValidatorException(SCMPError.HV_ERROR, "ipAddressList is missing");
    }
    Matcher m = PAT_IPLIST.matcher(ipAddressListString);
    if (!m.matches()) {
      throw new SCMPValidatorException(SCMPError.HV_WRONG_IPLIST, ipAddressListString);
    }
  }
View Full Code Here

   * @throws SCMPValidatorException
   *             the SCMP validator exception
   */
  public static void validateInt(int lowerLimitInc, String intStringValue, SCMPError error) throws SCMPValidatorException {
    if (intStringValue == null) {
      throw new SCMPValidatorException(error, "Numeric value is missing");
    }
    int intValue = 0;
    try {
      intValue = Integer.parseInt(intStringValue);
    } catch (NumberFormatException ex) {
      throw new SCMPValidatorException(error, "IntValue=" + intStringValue + " must be numeric");
    }
    ValidatorUtility.validateInt(lowerLimitInc, intValue, error);
  }
View Full Code Here

   * @throws SCMPValidatorException
   *             the SCMP validator exception
   */
  public static void validateInt(int lowerLimitInc, int intValue, SCMPError error) throws SCMPValidatorException {
    if (intValue < lowerLimitInc) {
      throw new SCMPValidatorException(error, "IntValue=" + intValue + " too low");
    }
  }
View Full Code Here

   *             the SCMP validator exception
   */
  public static void validateInt(int lowerLimitInc, String intStringValue, int upperLimitInc, SCMPError error)
      throws SCMPValidatorException {
    if (intStringValue == null) {
      throw new SCMPValidatorException(error, "Numeric value is missing");
    }
    int intValue = 0;
    try {
      intValue = Integer.parseInt(intStringValue);
    } catch (NumberFormatException ex) {
      throw new SCMPValidatorException(error, "IntValue=" + intStringValue + " must be numeric");
    }
    ValidatorUtility.validateInt(lowerLimitInc, intValue, upperLimitInc, error);
  }
View Full Code Here

   *             the SCMP validator exception
   */
  public static void validateInt(int lowerLimitInc, int intValue, int upperLimitInc, SCMPError error)
      throws SCMPValidatorException {
    if (intValue < lowerLimitInc || intValue > upperLimitInc) {
      throw new SCMPValidatorException(error, "IntValue=" + intValue + " is not in range (" + lowerLimitInc + "-"
          + upperLimitInc + ")");
    }
  }
View Full Code Here

   *             the SCMP validator exception
   */
  public static void validateStringLengthTrim(int minSizeInc, String stringValue, int maxSizeInc, SCMPError error)
      throws SCMPValidatorException {
    if (stringValue == null) {
      throw new SCMPValidatorException(error, "String value is missing");
    }
    ValidatorUtility.validateStringLength(minSizeInc, stringValue.trim(), maxSizeInc, error);
  }
View Full Code Here

TOP

Related Classes of org.serviceconnector.cmd.SCMPValidatorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.