use of cz.metacentrum.perun.core.api.RichAttribute in project perun by CESNET.
the class AttributesManagerBlImpl method removeAttribute.
public void removeAttribute(PerunSession sess, User user, AttributeDefinition attribute) throws InternalErrorException, WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException {
if (removeAttributeWithoutCheck(sess, user, attribute)) {
checkAttributeValue(sess, user, new Attribute(attribute));
this.checkAttributeDependencies(sess, new RichAttribute(user, null, new Attribute(attribute)));
}
}
use of cz.metacentrum.perun.core.api.RichAttribute in project perun by CESNET.
the class AttributesManagerBlImpl method removeAttribute.
@Override
public void removeAttribute(PerunSession sess, Member member, Group group, AttributeDefinition attribute) throws InternalErrorException, WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException {
if (removeAttributeWithoutCheck(sess, member, group, attribute)) {
checkAttributeValue(sess, member, group, new Attribute(attribute));
this.checkAttributeDependencies(sess, new RichAttribute(member, group, new Attribute(attribute)));
}
}
use of cz.metacentrum.perun.core.api.RichAttribute in project perun by CESNET.
the class AttributesManagerBlImpl method setAttribute.
@Override
public void setAttribute(PerunSession sess, Member member, Group group, Attribute attribute) throws InternalErrorException, AttributeNotExistsException, WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException {
if (attribute.getValue() == null) {
removeAttribute(sess, member, group, attribute);
return;
}
if (setAttributeWithoutCheck(sess, member, group, attribute, false)) {
checkAttributeValue(sess, member, group, attribute);
this.checkAttributeDependencies(sess, new RichAttribute(member, group, attribute));
}
}
use of cz.metacentrum.perun.core.api.RichAttribute in project perun by CESNET.
the class AttributesManagerBlImpl method removeAttribute.
public void removeAttribute(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute) throws InternalErrorException, WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException {
if (removeAttributeWithoutCheck(sess, resource, group, attribute)) {
checkAttributeValue(sess, resource, group, new Attribute(attribute));
this.checkAttributeDependencies(sess, new RichAttribute(resource, group, new Attribute(attribute)));
}
}
use of cz.metacentrum.perun.core.api.RichAttribute in project perun by CESNET.
the class AttributesManagerBlImpl method setAttribute.
public void setAttribute(PerunSession sess, Host host, Attribute attribute) throws InternalErrorException, WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException, WrongReferenceAttributeValueException {
if (attribute.getValue() == null) {
removeAttribute(sess, host, attribute);
return;
}
if (setAttributeWithoutCheck(sess, host, attribute)) {
checkAttributeValue(sess, host, attribute);
this.checkAttributeDependencies(sess, new RichAttribute(host, null, attribute));
}
}
Aggregations