class urn_perun_resource_attribute_def_def_fairshareGroupName extends ResourceAttributesModuleAbstract implements ResourceAttributesModuleImplApi {

	@Override
	public void checkAttributeSyntax(PerunSessionImpl perunSession, Resource resource, Attribute attribute) throws WrongAttributeValueException {
		//Null is ok, it means this resource is not fairshare group
		if (attribute.getValue() == null) {
			return;
		}

		//Test if gName matchers regex
		Matcher matcher = pattern.matcher(attribute.valueAsString());
		if (!matcher.matches()) {
			throw new WrongAttributeValueException(attribute, resource, "Wrong format of group fairshare name. Max length is 12, only letters are allowed.");
		}
	}

}