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 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));
}
}
use of cz.metacentrum.perun.core.api.RichAttribute in project perun by CESNET.
the class AttributesManagerBlImpl method setAttribute.
public void setAttribute(PerunSession sess, Group group, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException {
if (attribute.getValue() == null) {
removeAttribute(sess, group, attribute);
return;
}
if (setAttributeWithoutCheck(sess, group, attribute)) {
checkAttributeValue(sess, group, attribute);
this.checkAttributeDependencies(sess, new RichAttribute(group, null, attribute));
}
}
use of cz.metacentrum.perun.core.api.RichAttribute in project perun by CESNET.
the class AttributesManagerBlImpl method setAttribute.
public void setAttribute(PerunSession sess, Resource resource, Member member, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException {
if (attribute.getValue() == null) {
removeAttribute(sess, resource, member, attribute);
return;
}
if (setAttributeWithoutCheck(sess, resource, member, attribute, false)) {
checkAttributeValue(sess, resource, member, attribute);
this.checkAttributeDependencies(sess, new RichAttribute(resource, member, attribute));
}
}
use of cz.metacentrum.perun.core.api.RichAttribute in project perun by CESNET.
the class AttributesManagerBlImpl method setAttribute.
public void setAttribute(PerunSession sess, UserExtSource ues, Attribute attribute) throws InternalErrorException, WrongAttributeValueException, WrongAttributeAssignmentException, WrongReferenceAttributeValueException {
if (attribute.getValue() == null) {
removeAttribute(sess, ues, attribute);
return;
}
if (setAttributeWithoutCheck(sess, ues, attribute)) {
checkAttributeValue(sess, ues, attribute);
this.checkAttributeDependencies(sess, new RichAttribute(ues, null, attribute));
}
}
Aggregations