/** * * Static method to get enum instance given localName XsdString * * @param localName a XsdString used as localname (typically tag name as defined in xsd) * @return the enum instance */ public static Tag forName(String localName) { final Tag element = MAP.get(localName); return element == null ? UNKNOWN.value(localName) : element; }
private void partialCommonValidate() throws ValidateException { if (this.allocationRetry != null && this.allocationRetry < 0) throw new ValidateException(bundle.invalidNegative(Tag.ALLOCATION_RETRY.getLocalName())); if (this.blockingTimeoutMillis != null && this.blockingTimeoutMillis < 0) throw new ValidateException(bundle.invalidNegative(Tag.BLOCKING_TIMEOUT_MILLIS.getLocalName())); if (this.allocationRetryWaitMillis != null && this.allocationRetryWaitMillis < 0) throw new ValidateException(bundle.invalidNegative(Tag.ALLOCATION_RETRY_WAIT_MILLIS.getLocalName())); if (this.idleTimeoutMinutes != null && this.idleTimeoutMinutes < 0) throw new ValidateException(bundle.invalidNegative(Tag.IDLE_TIMEOUT_MINUTES.getLocalName())); if (this.xaResourceTimeout != null && this.xaResourceTimeout < 0) throw new ValidateException(bundle.invalidNegative(Tag.XA_RESOURCE_TIMEOUT.getLocalName())); }