use of cz.metacentrum.perun.core.api.ServiceAttributes in project perun by CESNET.
the class ServicesManagerBlImpl method getDataWithVo.
private ServiceAttributes getDataWithVo(PerunSession sess, Service service, Facility facility, Vo vo, List<Resource> resources) throws InternalErrorException {
ServiceAttributes voServiceAttributes = new ServiceAttributes();
voServiceAttributes.addAttributes(getPerunBl().getAttributesManagerBl().getRequiredAttributes(sess, service, vo));
for (Resource resource : resources) {
ServiceAttributes resourceServiceAttributes = getDataWithGroups(sess, service, facility, resource);
voServiceAttributes.addChildElement(resourceServiceAttributes);
}
return voServiceAttributes;
}
use of cz.metacentrum.perun.core.api.ServiceAttributes in project perun by CESNET.
the class ServicesManagerBlImpl method getData.
private ServiceAttributes getData(PerunSession sess, Service service, Facility facility, Resource resource, Member member) throws InternalErrorException {
ServiceAttributes memberServiceAttributes = new ServiceAttributes();
User user;
try {
user = getPerunBl().getUsersManagerBl().getUserById(sess, member.getUserId());
memberServiceAttributes.addAttributes(getPerunBl().getAttributesManagerBl().getRequiredAttributes(sess, service, facility, resource, user, member));
} catch (UserNotExistsException e) {
throw new ConsistencyErrorException("Member has assigned non-existing user.", e);
} catch (WrongAttributeAssignmentException ex) {
throw new InternalErrorException(ex);
}
return memberServiceAttributes;
}
Aggregations