class urn_perun_facility_attribute_def_virt_maxUID extends FacilityVirtualAttributesModuleAbstract implements FacilityVirtualAttributesModuleImplApi {

	@Override
	public void checkAttributeSemantics(PerunSessionImpl sess, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException, WrongAttributeAssignmentException {
		try {
			Attribute uidNamespaceAttribute = getUidNamespaceAttribute(sess, facility);
			if(uidNamespaceAttribute.getValue() == null) throw new WrongReferenceAttributeValueException(attribute, uidNamespaceAttribute);
			Attribute namespaceMaxUidAttribute = getNamespaceMaxUidAttribute(sess, uidNamespaceAttribute.valueAsString());
			sess.getPerunBl().getAttributesManagerBl().checkAttributeSemantics(sess, uidNamespaceAttribute.valueAsString(), namespaceMaxUidAttribute);
		} catch(WrongReferenceAttributeValueException ex) {
			throw new WrongReferenceAttributeValueException(attribute, ex.getReferenceAttribute());
		}

	}

}