/** * Validation method to guarantee that an err value passed in is valid by * smpp 3.4 spec * * @param errorCode * @return */ private static boolean isValidErrorCode(String errorCode) { if (StringUtil.isEmpty(errorCode) || (!StringUtil.isEmpty(errorCode) && errorCode.length() <= FIELD_ERR_MAX_LEN)) return true; else return false; }
/** * Validation method to guarantee that an err value passed in is valid by * smpp 3.4 spec * * @param errorCode * @return */ private static boolean isValidErrorCode(String errorCode) { if (StringUtil.isEmpty(errorCode) || (!StringUtil.isEmpty(errorCode) && errorCode.length() <= FIELD_ERR_MAX_LEN)) return true; else return false; }
/** * Validation method to guarantee that an err value passed in is valid by * smpp 3.4 spec * * @param errorCode * @return */ private static boolean isValidErrorCode(String errorCode) { if (StringUtil.isEmpty(errorCode) || (!StringUtil.isEmpty(errorCode) && errorCode.length() <= FIELD_ERR_MAX_LEN)) return true; else return false; }
/** * Validation method to guarantee that an err value passed in is valid by * smpp 3.4 spec * * @param errorCode * @return */ private static boolean isValidErrorCode(String errorCode) { if (StringUtil.isEmpty(errorCode) || (!StringUtil.isEmpty(errorCode) && errorCode.length() <= FIELD_ERR_MAX_LEN)) return true; else return false; }
public static String[] splitHostFQDN(String fqdn) { String[] result = new String[2]; if (StringUtil.isEmpty(fqdn)) { return result; } // try to determine the domain name int pos = fqdn.indexOf('.'); if (pos >= 0) { result[0] = fqdn.substring(0, pos); if (pos+1 < fqdn.length()) { result[1] = fqdn.substring(pos+1); } } else { // entire string is the host name result[0] = fqdn; } return result; }
public static String[] splitHostFQDN(String fqdn) { String[] result = new String[2]; if (StringUtil.isEmpty(fqdn)) { return result; } // try to determine the domain name int pos = fqdn.indexOf('.'); if (pos >= 0) { result[0] = fqdn.substring(0, pos); if (pos+1 < fqdn.length()) { result[1] = fqdn.substring(pos+1); } } else { // entire string is the host name result[0] = fqdn; } return result; }
StringBuilder url = new StringBuilder(); if (!StringUtil.isEmpty(this.protocol)) { url.append(this.protocol); url.append("://"); if (!StringUtil.isEmpty(this.username)) { url.append(encode(this.username)); if (this.password != null) { if (!StringUtil.isEmpty(this.host)) { url.append(this.host); if (!StringUtil.isEmpty(this.path)) { url.append(this.path); if (!StringUtil.isEmpty(this.query)) { url.append('?'); url.append(this.query);
StringBuilder url = new StringBuilder(); if (!StringUtil.isEmpty(this.protocol)) { url.append(this.protocol); url.append("://"); if (!StringUtil.isEmpty(this.username)) { url.append(encode(this.username)); if (this.password != null) { if (!StringUtil.isEmpty(this.host)) { url.append(this.host); if (!StringUtil.isEmpty(this.path)) { url.append(this.path); if (!StringUtil.isEmpty(this.query)) { url.append('?'); url.append(this.query);
if (!StringUtil.isEmpty(hostFQDN)) {
if (!StringUtil.isEmpty(hostFQDN)) {
if (!StringUtil.isEmpty(fieldValue)) { if (fieldLabel.equalsIgnoreCase(FIELD_ID)) { dlr.messageId = fieldValue; if (StringUtil.isEmpty(dlr.messageId)) { throw new DeliveryReceiptException( "Unable to find [id] field or empty value in delivery receipt message"); if (StringUtil.isEmpty(dlr.rawErrorCode) && dlr.errorCode < 0) { throw new DeliveryReceiptException( "Unable to find [err] field or empty value in delivery receipt message");
if (!StringUtil.isEmpty(fieldValue)) { if (fieldLabel.equalsIgnoreCase(FIELD_ID)) { dlr.messageId = fieldValue; if (StringUtil.isEmpty(dlr.messageId)) { throw new DeliveryReceiptException( "Unable to find [id] field or empty value in delivery receipt message"); if (StringUtil.isEmpty(dlr.rawErrorCode) && dlr.errorCode < 0) { throw new DeliveryReceiptException( "Unable to find [err] field or empty value in delivery receipt message");
if (!StringUtil.isEmpty(fieldValue)) { if (fieldLabel.equalsIgnoreCase(FIELD_ID)) { dlr.messageId = fieldValue; if (StringUtil.isEmpty(dlr.messageId)) { throw new DeliveryReceiptException( "Unable to find [id] field or empty value in delivery receipt message"); if (StringUtil.isEmpty(dlr.rawErrorCode) && dlr.errorCode < 0) { throw new DeliveryReceiptException( "Unable to find [err] field or empty value in delivery receipt message");
if (!StringUtil.isEmpty(fieldValue)) { if (fieldLabel.equalsIgnoreCase(FIELD_ID)) { dlr.messageId = fieldValue; if (StringUtil.isEmpty(dlr.messageId)) { throw new DeliveryReceiptException( "Unable to find [id] field or empty value in delivery receipt message"); if (StringUtil.isEmpty(dlr.rawErrorCode) && dlr.errorCode < 0) { throw new DeliveryReceiptException( "Unable to find [err] field or empty value in delivery receipt message");
XmlBeanProperty annotation = property.getField().getAnnotation(XmlBeanProperty.class); if (annotation != null) { if (!StringUtil.isEmpty(annotation.value())) { valueAttrString = annotation.value(); if (!StringUtil.isEmpty(annotation.key())) { keyAttrString = annotation.key(); if (ch.getKeyProperty() == null) { if (StringUtil.isEmpty(keyAttrString)) { throw new PropertyIsEmptyException(propertyName, node.getPath(), obj.getClass(), "The XML attribute [key] was null or empty and is required"); } else {