class urn_perun_facility_attribute_def_virt_GIDRanges extends FacilityVirtualAttributesModuleAbstract implements FacilityVirtualAttributesModuleImplApi {

	@Override
	public void checkAttributeSemantics(PerunSessionImpl sess, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException, WrongAttributeAssignmentException {
		try {
			Attribute gidNamespaceAttribute = getUnixGIDNamespaceAttribute(sess, facility);
			if(gidNamespaceAttribute.getValue() == null) throw new WrongReferenceAttributeValueException(attribute, gidNamespaceAttribute, "There is missing GID namespace on the facility.");
			Attribute namespaceGIDRangesAttribute = getNamespaceGIDRangesAttribute(sess, gidNamespaceAttribute.valueAsString());
			sess.getPerunBl().getAttributesManagerBl().checkAttributeSemantics(sess, gidNamespaceAttribute.valueAsString(), namespaceGIDRangesAttribute);
		} catch(WrongReferenceAttributeValueException ex) {
			throw new WrongReferenceAttributeValueException(attribute, ex.getReferenceAttribute());
		}
	}

}