class urn_perun_facility_attribute_def_def_quotaEnabled extends FacilityAttributesModuleAbstract implements FacilityAttributesModuleImplApi {

	@Override
	public void checkAttributeSyntax(PerunSessionImpl perunSession, Facility facility, Attribute attribute) throws WrongAttributeValueException {
		//Null means the same like 0 (not enabled)
		if(attribute.getValue() == null) return;
		
		Integer quotaEnabled = attribute.valueAsInteger();
		if(quotaEnabled > 1 || quotaEnabled < 0) throw new WrongAttributeValueException(attribute, facility, "Attribute has only two possible options for quota: 0 - means not enabled, 1 - means enabled.");
		 
	}

}