From 82a6ea11fa0ce0e4d7690e59dac4bd4b9d6805e4 Mon Sep 17 00:00:00 2001 From: srosse <none@none> Date: Tue, 15 May 2018 14:19:49 +0200 Subject: [PATCH] no-jira: add audit log before starting to delete a business group --- .../org/olat/group/BusinessGroupImpl.java | 21 ++++++++----------- .../manager/BusinessGroupServiceImpl.java | 2 ++ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/olat/group/BusinessGroupImpl.java b/src/main/java/org/olat/group/BusinessGroupImpl.java index 539d39663b4..1ab9676143d 100644 --- a/src/main/java/org/olat/group/BusinessGroupImpl.java +++ b/src/main/java/org/olat/group/BusinessGroupImpl.java @@ -373,26 +373,14 @@ public class BusinessGroupImpl implements Persistable, ModifiedInfo, BusinessGro } } - /** - * @see org.olat.group.BusinessGroup#getMinParticipants() - */ public Integer getMinParticipants() { return minParticipants; } - /** - * @see org.olat.group.BusinessGroup#setMinParticipants(java.lang.Integer) - */ public void setMinParticipants(Integer minParticipants) { this.minParticipants = minParticipants; } - /** - * @see java.lang.Object#toString() - */ - public String toString() { - return "name=" + name + "::" + "::" + super.toString(); - } public Boolean getAutoCloseRanksEnabled() { return autoCloseRanksEnabled; @@ -434,4 +422,13 @@ public class BusinessGroupImpl implements Persistable, ModifiedInfo, BusinessGro public int hashCode() { return getKey() == null ? 2901 : getKey().hashCode(); } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(256); + sb.append("businessGroup[key=").append(getKey() == null ? "" : getKey()) + .append(";name=").append(getName() == null ? "" : getName()).append("]") + .append(super.toString()); + return sb.toString(); + } } \ No newline at end of file diff --git a/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java b/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java index e65baceb53d..056b1128576 100644 --- a/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java +++ b/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java @@ -747,6 +747,8 @@ public class BusinessGroupServiceImpl implements BusinessGroupService, UserDataD @Override public void deleteBusinessGroup(BusinessGroup group) { try{ + log.audit("Start deleting Business Group", group.toString()); + OLATResourceableJustBeforeDeletedEvent delEv = new OLATResourceableJustBeforeDeletedEvent(group); // notify all (currently running) BusinessGroupXXXcontrollers // about the deletion which will occur. -- GitLab