Search in sources :

Example 51 with Transactional

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);
}
Also used : Timestamp(java.sql.Timestamp) Transactional(javax.transaction.Transactional)

Example 52 with Transactional

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);
}
Also used : Timestamp(java.sql.Timestamp) Transactional(javax.transaction.Transactional)

Example 53 with Transactional

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);
}
Also used : Timestamp(java.sql.Timestamp) Transactional(javax.transaction.Transactional)

Example 54 with Transactional

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);
}
Also used : Timestamp(java.sql.Timestamp) Transactional(javax.transaction.Transactional)

Example 55 with Transactional

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);
}
Also used : Timestamp(java.sql.Timestamp) Transactional(javax.transaction.Transactional)

Aggregations

Transactional (javax.transaction.Transactional)299 Test (org.junit.Test)99 PostResult (org.collectiveone.common.dto.PostResult)29 ArrayList (java.util.ArrayList)24 UserDO (org.neusoft.neubbs.entity.UserDO)21 Timestamp (java.sql.Timestamp)18 TopicDO (org.neusoft.neubbs.entity.TopicDO)18 Initiative (org.collectiveone.modules.initiatives.Initiative)16 GetResult (org.collectiveone.common.dto.GetResult)15 BadRequestException (com.sequenceiq.cloudbreak.controller.BadRequestException)13 TopicReplyDO (org.neusoft.neubbs.entity.TopicReplyDO)13 HashMap (java.util.HashMap)12 Date (java.util.Date)11 AppUser (org.collectiveone.modules.users.AppUser)11 UUID (java.util.UUID)10 RolesAllowed (javax.annotation.security.RolesAllowed)10 PeerReviewedAssignation (org.collectiveone.modules.assignations.evaluationlogic.PeerReviewedAssignation)10 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)10 IOException (java.io.IOException)9 TopicContentDO (org.neusoft.neubbs.entity.TopicContentDO)9