All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clockworksms.xml.XmlResponse Maven / Gradle / Ivy

package com.clockworksms.xml;

import javax.xml.bind.annotation.XmlElement;

import com.clockworksms.ClockworkException;


public abstract class XmlResponse {

	private int errorNumber;
	private String errorDescription;

	public boolean hasError() {
		return this.errorNumber > 0;
	}
	
	public ClockworkException getException() {
		return new ClockworkException(this.errorDescription, this.errorNumber);
	}

	@XmlElement(name = "ErrNo")
	public int getErrorNumber() {
		return errorNumber;
	}

	public void setErrorNumber(int errorNumber) {
		this.errorNumber = errorNumber;
	}

	@XmlElement(name = "ErrDesc")
	public String getErrorDescription() {
		return errorDescription;
	}

	public void setErrorDescription(String errorDescription) {
		this.errorDescription = errorDescription;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy