Examples of TimerEvent


Examples of evolaris.framework.smsservices.datamodel.TimerEvent

   *      javax.servlet.http.HttpServletResponse)
   */
  public ActionForward createIncludingInteractions(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse resp)  {
    TimerEventEnterOrEditForm f = (TimerEventEnterOrEditForm)form;
   
    TimerEvent oldTimerEvent = entryFromDatabase(f.getId());
    if (oldTimerEvent == null){
      throw new InputException(getResources(req).getMessage(locale, "admin.entryNotAvailable"));
    }
    checkAccessRights(req,oldTimerEvent.getGroup(),null);
    req.getSession().setAttribute("oldInteractionListId", oldTimerEvent.getId());
    Set<CommandEntry> commandEntries = oldTimerEvent.getCommandEntries();
    f.setOwningUserId(webUser.getId());
    TimerEvent editedTimerEvent = f.toEntry(new TimerEvent(), locale, session, getResources(req));
    req.getSession().setAttribute("newTimerEvent", editedTimerEvent)// needed when we duplicate or come back
   
    // mapping from command entries of the duplication source
    MappingSet mappingSet = new MappingSet(commandEntries,editedTimerEvent.getGroup(), locale, session);
   
    req.getSession().setAttribute("mappingSet", mappingSet);
    req.getSession().setAttribute("destinationGroupId", editedTimerEvent.getGroup().getId());
    return mapping.findForward("duplicateIncludingInteractions");
  }
View Full Code Here

Examples of evolaris.framework.smsservices.datamodel.TimerEvent

   */
  protected ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse resp) {
    ActionForward actionForward = super.edit(mapping, form, req, resp);
    TimerEventEnterOrEditForm f = (TimerEventEnterOrEditForm)form;
    requestingUserAndUserSetPreparation(f, groupPreparation(req, f.getGroupId()), req);
    TimerEvent entry = entryFromDatabase(f.getId());
    if (entry == null){
      throw new InputException(getLocalizedMessage("SystemWeb", "sys.entryNotAvailable"),"id = " + f.getId(),null,null);
    }
    req.getSession().setAttribute("deleteMode", entry.getCommandEntries().size() == 0 ? "delete" : "deleteIncludingInteractions");   
    return actionForward;
  }
View Full Code Here

Examples of evolaris.framework.smsservices.datamodel.TimerEvent

   
    Object oldTimerEventId = req.getSession().getAttribute("oldInteractionListId");
    if (oldTimerEventId == null || !(oldTimerEventId instanceof Long)){
      throw new InputException(getResources(req).getMessage(locale, "admin.entryNotAvailable"),"old timer event entry not found in session",null,null);
    }
    TimerEvent oldTimerEvent = new SmsServiceDbManager(locale,session).getTimerEvent((Long)oldTimerEventId);
    if (oldTimerEvent == null){
      throw new InputException(getResources(req).getMessage(locale, "admin.entryNotAvailable"),"old timer event entry #" + oldTimerEventId + " not found",null,null);
    }
    checkAccessRights(req,oldTimerEvent.getGroup(),null);

    Object newEntry = req.getSession().getAttribute("newTimerEvent");
    if (newEntry == null || !(newEntry instanceof TimerEvent)){
      throw new InputException(getResources(req).getMessage(locale, "admin.entryNotAvailable"),"new timer event entry not found in session",null,null);
    }
   
    // reload references in current session
    TimerEvent newTimerEvent = (TimerEvent)newEntry;
    f.initialize(newTimerEvent,locale,session,getResources(req));
    newTimerEvent = new TimerEvent();
    f.toEntry(newTimerEvent, locale, session, getResources(req));
    checkAccessRights(req, newTimerEvent.getGroup(),null);
   
    // group assignment is not editable => perform source to destination automatically
    mappingSet.add(new Entry(oldTimerEvent.getGroup()), new Entry(newTimerEvent.getGroup()));
   
    // Create duplicated command entries according to the original execution order
    CommandEntryManager commandEntryManager = new CommandEntryManager(locale,session);
    SortedSet<CommandEntry> newCommandEntries = new TreeSet<CommandEntry>(new CommandEntryManager.CommandEntryComparator());
    Set<CommandEntry> oldCommandEntries = oldTimerEvent.getCommandEntries();
    SortedSet<CommandEntry> sortedOldCommandEntries = new TreeSet<CommandEntry>(new CommandEntryManager.CommandEntryComparator());
    sortedOldCommandEntries.addAll(oldCommandEntries);
    for (CommandEntry oldCommandEntry : sortedOldCommandEntries) {
      CommandEntryExtender extender = commandEntryManager.createCommandEntryExtender(oldCommandEntry);
      CommandEntry duplicatedCommandEntry = extender.duplicateCommandEntry(newTimerEvent.getGroup(),mappingSet);
      Set<TimerEvent> timerEvents = new TreeSet<TimerEvent>();
      timerEvents.add(newTimerEvent);
      duplicatedCommandEntry.setTimerEvents(timerEvents);
      commandEntryManager.create(duplicatedCommandEntry)// also sets the ID for sorting
      newCommandEntries.add(duplicatedCommandEntry);
    }
    newTimerEvent.setCommandEntries(newCommandEntries);
    new SmsServiceDbManager(locale,session).createTimerEvent(newTimerEvent);
     return mapping.findForward("duplicated");
  }
View Full Code Here

Examples of org.gudy.azureus2.core3.util.TimerEvent

    for ( TRTrackerAnnouncer announcer: to_destroy ){
   
      announcer.destroy();
    }
   
    TimerEvent  ev = event;
   
    if ( ev != null ){
     
      ev.cancel();
    }
  }
View Full Code Here

Examples of pl.edu.pw.elka.mmarkiew.controller.queueevents.TimerEvent

    {
      while (true)
      {
        try
        {
          blockingQueue.put(new TimerEvent());
          Thread.sleep(TIMEOUT);
        }
        catch (InterruptedException e)
        {
          e.printStackTrace();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.