
package com.netsteadfast.greenstep.action.utils;

import org.apache.commons.lang.math.NumberUtils;

import com.netsteadfast.greenstep.base.exception.ControllerException;
import com.netsteadfast.greenstep.base.model.IActionFieldsCheckUtils;
import com.netsteadfast.greenstep.util.SimpleUtils;

public class PositiveIntegerFieldCheckUtils implements IActionFieldsCheckUtils {
	
	@Override
	public boolean check(String value) throws ControllerException {
		if (NumberUtils.isNumber(value) && SimpleUtils.getInt(value, -1) > -1) {
			return true;
		}
		return false;
	}

}
