use of org.olat.repository.model.RepositoryEntryMembershipModifiedEvent in project OpenOLAT by OpenOLAT.
the class RepositoryManager method removeParticipants.
/**
* remove list of identities as participant of given repository entry.
* @param ureqIdentity
* @param removeIdentities
* @param re
* @param logger
*/
public void removeParticipants(Identity ureqIdentity, List<Identity> removeIdentities, RepositoryEntry re, MailPackage mailing, boolean sendMail) {
List<RepositoryEntryMembershipModifiedEvent> deferredEvents = new ArrayList<>();
for (Identity identity : removeIdentities) {
removeParticipant(ureqIdentity, identity, re, mailing, sendMail);
deferredEvents.add(RepositoryEntryMembershipModifiedEvent.removed(identity, re));
}
dbInstance.commit();
sendDeferredEvents(deferredEvents, re);
}
use of org.olat.repository.model.RepositoryEntryMembershipModifiedEvent in project OpenOLAT by OpenOLAT.
the class RepositoryManager method updateRepositoryEntryMemberships.
public void updateRepositoryEntryMemberships(Identity ureqIdentity, Roles ureqRoles, RepositoryEntry re, List<RepositoryEntryPermissionChangeEvent> changes, MailPackage mailing) {
int count = 0;
List<RepositoryEntryMembershipModifiedEvent> deferredEvents = new ArrayList<>();
for (RepositoryEntryPermissionChangeEvent e : changes) {
updateRepositoryEntryMembership(ureqIdentity, ureqRoles, re, e, mailing, deferredEvents);
if (++count % 100 == 0) {
dbInstance.commitAndCloseSession();
}
}
dbInstance.commitAndCloseSession();
sendDeferredEvents(deferredEvents, re);
}
use of org.olat.repository.model.RepositoryEntryMembershipModifiedEvent in project openolat by klemens.
the class RepositoryManager method removeTutors.
/**
* remove list of identities as tutor of given repository entry.
* @param ureqIdentity
* @param removeIdentities
* @param re
* @param logger
*/
public void removeTutors(Identity ureqIdentity, List<Identity> removeIdentities, RepositoryEntry re, MailPackage mailing) {
List<RepositoryEntryMembershipModifiedEvent> deferredEvents = new ArrayList<>();
for (Identity identity : removeIdentities) {
removeTutor(ureqIdentity, identity, re, mailing);
deferredEvents.add(RepositoryEntryMembershipModifiedEvent.removed(identity, re));
}
dbInstance.commit();
sendDeferredEvents(deferredEvents, re);
}
use of org.olat.repository.model.RepositoryEntryMembershipModifiedEvent in project openolat by klemens.
the class RepositoryManager method removeParticipants.
/**
* remove list of identities as participant of given repository entry.
* @param ureqIdentity
* @param removeIdentities
* @param re
* @param logger
*/
public void removeParticipants(Identity ureqIdentity, List<Identity> removeIdentities, RepositoryEntry re, MailPackage mailing, boolean sendMail) {
List<RepositoryEntryMembershipModifiedEvent> deferredEvents = new ArrayList<>();
for (Identity identity : removeIdentities) {
removeParticipant(ureqIdentity, identity, re, mailing, sendMail);
deferredEvents.add(RepositoryEntryMembershipModifiedEvent.removed(identity, re));
}
dbInstance.commit();
sendDeferredEvents(deferredEvents, re);
}
use of org.olat.repository.model.RepositoryEntryMembershipModifiedEvent in project openolat by klemens.
the class RepositoryManager method updateRepositoryEntryMemberships.
public void updateRepositoryEntryMemberships(Identity ureqIdentity, Roles ureqRoles, RepositoryEntry re, List<RepositoryEntryPermissionChangeEvent> changes, MailPackage mailing) {
int count = 0;
List<RepositoryEntryMembershipModifiedEvent> deferredEvents = new ArrayList<>();
for (RepositoryEntryPermissionChangeEvent e : changes) {
updateRepositoryEntryMembership(ureqIdentity, ureqRoles, re, e, mailing, deferredEvents);
if (++count % 100 == 0) {
dbInstance.commitAndCloseSession();
}
}
dbInstance.commitAndCloseSession();
sendDeferredEvents(deferredEvents, re);
}
Aggregations