use of javax.transaction.Transactional in project CollectiveOneWebapp by CollectiveOne.
the class ActivityService method initiativeEdited.
@Transactional
public void initiativeEdited(Initiative initiative, AppUser triggerUser, String oldName, String oldDriver) {
Activity activity = new Activity();
activity.setType(ActivityType.INITIATIVE_EDITED);
activity.setTriggerUser(triggerUser);
activity.setInitiative(initiative);
activity.setTimestamp(new Timestamp(System.currentTimeMillis()));
activity.setOldName(oldName);
activity.setOldDriver(oldDriver);
activity = activityRepository.save(activity);
addInitiativeActivityNotifications(activity);
}
use of javax.transaction.Transactional in project CollectiveOneWebapp by CollectiveOne.
the class ActivityService method assignationDeleted.
@Transactional
public void assignationDeleted(Assignation assignation, AppUser triggerUser) {
Activity activity = new Activity();
activity.setType(ActivityType.ASSIGNATION_DELETED);
activity.setTriggerUser(triggerUser);
activity.setInitiative(assignation.getInitiative());
activity.setTimestamp(new Timestamp(System.currentTimeMillis()));
activity.setAssignation(assignation);
activity = activityRepository.save(activity);
addInitiativeActivityNotifications(activity);
}
use of javax.transaction.Transactional in project CollectiveOneWebapp by CollectiveOne.
the class ActivityService method peerReviewedAssignationDone.
@Transactional
public void peerReviewedAssignationDone(Assignation assignation) {
Activity activity = new Activity();
activity.setType(ActivityType.PR_ASSIGNATION_DONE);
activity.setTriggerUser(assignation.getCreator());
activity.setInitiative(assignation.getInitiative());
activity.setTimestamp(new Timestamp(System.currentTimeMillis()));
activity.setAssignation(assignation);
activity = activityRepository.save(activity);
addInitiativeActivityNotifications(activity);
}
use of javax.transaction.Transactional in project CollectiveOneWebapp by CollectiveOne.
the class ActivityService method initiativeDeleted.
@Transactional
public void initiativeDeleted(Initiative initiative, AppUser triggerUser) {
Activity activity = new Activity();
activity.setType(ActivityType.INITIATIVE_DELETED);
activity.setTriggerUser(triggerUser);
activity.setInitiative(initiative);
activity.setTimestamp(new Timestamp(System.currentTimeMillis()));
activity = activityRepository.save(activity);
addInitiativeActivityNotifications(activity);
}
use of javax.transaction.Transactional in project CollectiveOneWebapp by CollectiveOne.
the class ActivityService method peerReviewedAssignationCreated.
@Transactional
public void peerReviewedAssignationCreated(Assignation assignation, AppUser triggerUser) {
Activity activity = new Activity();
activity.setType(ActivityType.PR_ASSIGNATION_CREATED);
activity.setTriggerUser(triggerUser);
activity.setInitiative(assignation.getInitiative());
activity.setTimestamp(new Timestamp(System.currentTimeMillis()));
activity.setAssignation(assignation);
activity = activityRepository.save(activity);
addInitiativeActivityNotifications(activity);
}
Aggregations