Example #1
0
  public void deletePostedSyllabus(SyllabusData data) {
    BaseResourceEdit bre = new BaseResourceEdit(data.getSyllabusId().toString(), data);

    addLiveSyllabusProperties(bre);

    bre.setEvent(EVENT_SYLLABUS_DELETE_POST);

    String emailNotify = data.getEmailNotification();

    int priority;

    // for adding more logging info and not send out email notification
    //    if(emailNotify.equalsIgnoreCase("none"))
    //    {
    //      priority = NotificationService.NOTI_NONE;
    //    }
    //    else if(emailNotify.equalsIgnoreCase("high"))
    //    {
    //      priority = NotificationService.NOTI_REQUIRED;
    //    }
    //    else if(emailNotify.equalsIgnoreCase("low"))
    //    {
    //      priority = NotificationService.NOTI_OPTIONAL;
    //    }
    //    else
    //    {
    //      priority = NotificationService.NOTI_NONE;
    //    }
    priority = NotificationService.NOTI_NONE;

    Event event = EventTrackingService.newEvent(bre.getEvent(), bre.getReference(), true, priority);

    EventTrackingService.post(event);
  }
Example #2
0
  public void postChangeSyllabus(SyllabusData data) {
    BaseResourceEdit bre = new BaseResourceEdit(data.getSyllabusId().toString(), data);

    addLiveSyllabusProperties(bre);

    bre.setEvent(EVENT_SYLLABUS_POST_CHANGE);

    String emailNotify = data.getEmailNotification();

    int priority;

    if (emailNotify.equalsIgnoreCase("none")) {
      priority = NotificationService.NOTI_NONE;
    } else if (emailNotify.equalsIgnoreCase("high")) {
      priority = NotificationService.NOTI_REQUIRED;
    } else if (emailNotify.equalsIgnoreCase("low")) {
      priority = NotificationService.NOTI_OPTIONAL;
    } else {
      priority = NotificationService.NOTI_NONE;
    }

    Event event = EventTrackingService.newEvent(bre.getEvent(), bre.getReference(), true, priority);

    EventTrackingService.post(event);
  }
Example #3
0
  public void draftNewSyllabus(SyllabusData data) {
    BaseResourceEdit bre = new BaseResourceEdit(data.getSyllabusId().toString(), data);

    addLiveSyllabusProperties(bre);

    bre.setEvent(EVENT_SYLLABUS_DRAFT_NEW);

    int priority;

    priority = NotificationService.NOTI_NONE;

    Event event = EventTrackingService.newEvent(bre.getEvent(), bre.getReference(), true, priority);

    EventTrackingService.post(event);
  }
Example #4
0
  protected void addLiveSyllabusProperties(BaseResourceEdit r) {
    ResourcePropertiesEdit p = r.getPropertiesEdit();

    String current = SessionManager.getCurrentSessionUserId();
    p.addProperty(ResourceProperties.PROP_CREATOR, current);
    p.addProperty(ResourceProperties.PROP_MODIFIED_BY, current);

    String now = TimeService.newTime().toString();
    p.addProperty(ResourceProperties.PROP_CREATION_DATE, now);
    p.addProperty(ResourceProperties.PROP_MODIFIED_DATE, now);

    p.addProperty(ResourceProperties.PROP_IS_COLLECTION, "false");
  }
Example #5
0
 // permission convert
 public String getSyllabusApplicationSiteReference(String thisSiteId) {
   BaseResourceEdit bre = new BaseResourceEdit(thisSiteId);
   return bre.getReference();
 }
Example #6
0
 // permission convert
 public String getEntityReference(SyllabusData sd, String thisSiteId) {
   BaseResourceEdit bre = new BaseResourceEdit(sd.getSyllabusId().toString(), sd, thisSiteId);
   return bre.getReference();
 }