package com.ejie.ab78.model.util;

import java.io.Serializable;

public abstract class ResultAjaxOperation implements Serializable {

	private static final long serialVersionUID = 3181980215769854387L;

	private final int result;

	private String callback;

	protected ResultAjaxOperation(int result) {
		this.result = result;
	}

	public int getResult() {
		return result;
	}

	public String getCallback() {
		return callback;
	}

	public void setCallback(String callback) {
		if (callback == null) {
			callback = "";
		}
		if (!"".equals(callback) && (!callback.contains("(") && !callback.contains(")"))) {
			callback = callback.replace("()", "");
		}
		this.callback = callback;
	}

}
