use of org.finos.waltz.model.involvement.Involvement in project waltz by khartec.
the class PermissionGroupService method findPermissions.
public List<Permission> findPermissions(EntityReference parentEntityRef, String username) {
Person person = personService.getPersonByUserId(username);
if (isNull(person)) {
return Collections.emptyList();
}
List<Involvement> involvements = involvementService.findByEmployeeId(person.employeeId()).stream().filter(involvement -> involvement.entityReference().equals(parentEntityRef)).collect(Collectors.toList());
if (involvements.isEmpty()) {
return Collections.emptyList();
}
return permissionGroupDao.getDefaultPermissions();
}
use of org.finos.waltz.model.involvement.Involvement in project waltz by khartec.
the class InvolvementService method removeEntityInvolvement.
public boolean removeEntityInvolvement(String userId, EntityReference entityReference, EntityInvolvementChangeCommand command) {
Involvement involvement = mkInvolvement(entityReference, command);
boolean result = involvementDao.remove(involvement) > 0;
if (result) {
logChange(entityReference, userId, command);
}
return result;
}
use of org.finos.waltz.model.involvement.Involvement in project waltz by khartec.
the class InvolvementService method addEntityInvolvement.
public boolean addEntityInvolvement(String userId, EntityReference entityReference, EntityInvolvementChangeCommand command) {
Involvement involvement = mkInvolvement(entityReference, command);
boolean result = involvementDao.save(involvement) == 1;
if (result) {
logChange(entityReference, userId, command);
}
return result;
}
Aggregations