class urn_perun_group_resource_attribute_def_def_projectDirPermissions extends GroupResourceAttributesModuleAbstract implements GroupResourceAttributesModuleImplApi {

	@Override
	public void checkAttributeSyntax(PerunSessionImpl sess, Group group, Resource resource, Attribute attribute) throws WrongAttributeValueException {
		Integer permissions = attribute.valueAsInteger();
		//Permissions can be null (if null, it means DEFAULT 750)
		if (permissions == null) return;

		//Only 3 consecutive numbers with value >=0 and <=7 are allowed
		Matcher match = pattern.matcher(permissions.toString());

		if (!match.matches()) {
			throw new WrongAttributeValueException(attribute, group, resource, "Bad format of attribute projectDirPermissions (expected something like '750').");
		}
	}

}