class PositiveIntegerValidator implements ServiceAttributeValidator {

    @Override
    public boolean validate(Set<String> values) {
        if (values.isEmpty()) {
            return false;
        }

        for (String value : values) {
            int intValue;
            try {
                intValue = Integer.parseInt(value);
            } catch (NumberFormatException nfe) {
                return false;
            }
            if (intValue <= 0) {
                return false;
            }
        }
        return true;
    }

}