Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
$URL$ $Id$ Copyright (c) 2003, 2004, 2005, 2006, 2008 The Sakai Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.opensource.org/licenses/ECL-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. /
 
 
 package org.sakaiproject.component.app.scheduler;
 
 import java.util.Date;
 import java.util.List;
 
 import  org.quartz.JobExecutionContext;
 import  org.quartz.Trigger;
 import  org.quartz.TriggerListener;
 import  org.sakaiproject.component.api.ServerConfigurationService;
 
 public class GlobalTriggerListener implements TriggerListener
 {
 
   private boolean isViewAllSelected = false;
   private TriggerEventManager eventManager = null;
   private ServerConfigurationService serverConfigurationService = null;
 
   public void setTriggerEventManager (TriggerEventManager eMgr)
   {
        = eMgr;
   }
 
   public void setServerConfigurationService(ServerConfigurationService serverConfigurationService)
   {
     this. = serverConfigurationService;
   }
 
   public String getName()
   {
     return "GlobalTriggerListener";
   }

  
Get the id of this instance

Returns:
 
   private String getServerId() {
 	  return .getServerId();
   }
   
   public void triggerFired(Trigger trigger,
       JobExecutionContext jobExecutionContext)
   {
 	  
       .createTriggerEvent (..jobExecutionContext.getJobDetail().getName(), trigger.getName(), new Date(), "Trigger fired"getServerId());
   }
 
   public boolean vetoJobExecution(Trigger trigger,
       JobExecutionContext jobExecutionContext)
   {
     return false;
   }
 
   public void triggerMisfired(Trigger trigger)
   {
   }
 
   public void triggerComplete(Trigger trigger,
       JobExecutionContext jobExecutionContextint triggerInstructionCode)
   {
       .createTriggerEvent (..jobExecutionContext.getJobDetail().getName(), trigger.getName(), new Date(), "Trigger complete"getServerId());
   }

  

Returns:
Returns the triggerEvents.
 
   {
     if ()
     {
       return .getTriggerEvents();
     }
     else
     {
       Calendar cal = Calendar.getInstance();
      cal.set(., 0);
      cal.set(., 0);
      cal.set(., 0);
      
      Date midnightToday = new Date(cal.getTimeInMillis());      
      return .getTriggerEvents (midnightTodaynullnullnullnull);
/*
      for (Iterator<TriggerEventImpl> i = triggerEvents.iterator(); i.hasNext();)
      {
        TriggerEventImpl te = (TriggerEventImpl) i.next();
        if (te.getTime().after(midnightToday))
        {
          todaysTriggerEvents.add(te);
        }
      }
      return todaysTriggerEvents;
*/
    }
  }

  

Returns:
Returns the isViewAllSelected.
  public boolean getIsViewAllSelected()
  {
    return ;
  }

  

Parameters:
isViewAllSelected The isViewAllSelected to set.
  public void setIsViewAllSelected(boolean isViewAllSelected)
  {
    this. = isViewAllSelected;
  }
  public String processSelect()
  {
    return null;
  }
New to GrepCode? Check out our FAQ X