org.apache.lenya.cms.usecase.scheduling.impl
Class UsecaseSchedulerImpl

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.cms.usecase.scheduling.impl.UsecaseSchedulerImpl
All Implemented Interfaces:
org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, UsecaseScheduler

public class UsecaseSchedulerImpl
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements UsecaseScheduler, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.context.Contextualizable

Usecase scheduler implementation.

The names of the scheduled jobs have the syntax {usecaseName}:{userId}.

Version:
$Id: UsecaseSchedulerImpl.java 535201 2007-05-04 12:24:27Z andreas $

Field Summary
protected  org.apache.avalon.framework.service.ServiceManager manager
           
 
Fields inherited from interface org.apache.lenya.cms.usecase.scheduling.UsecaseScheduler
ROLE
 
Constructor Summary
UsecaseSchedulerImpl()
           
 
Method Summary
 void contextualize(org.apache.avalon.framework.context.Context context)
           
protected  java.lang.String getJobName(Usecase usecase, java.lang.String userId)
           
 org.apache.cocoon.components.cron.JobSchedulerEntry[] getJobs()
           
 void schedule(Usecase usecase, java.util.Date date)
          Schedules a usecase at a certain date.
 void service(org.apache.avalon.framework.service.ServiceManager manager)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected org.apache.avalon.framework.service.ServiceManager manager
Constructor Detail

UsecaseSchedulerImpl

public UsecaseSchedulerImpl()
Method Detail

schedule

public void schedule(Usecase usecase,
                     java.util.Date date)
Description copied from interface: UsecaseScheduler
Schedules a usecase at a certain date.

Specified by:
schedule in interface UsecaseScheduler
Parameters:
usecase - The usecase.
date - The invocation date.
See Also:
UsecaseScheduler.schedule(org.apache.lenya.cms.usecase.Usecase, java.util.Date)

getJobName

protected java.lang.String getJobName(Usecase usecase,
                                      java.lang.String userId)

service

public void service(org.apache.avalon.framework.service.ServiceManager manager)
             throws org.apache.avalon.framework.service.ServiceException
Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Throws:
org.apache.avalon.framework.service.ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable
Throws:
org.apache.avalon.framework.context.ContextException
See Also:
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)

getJobs

public org.apache.cocoon.components.cron.JobSchedulerEntry[] getJobs()
Specified by:
getJobs in interface UsecaseScheduler
Returns:
All scheduled jobs.
See Also:
UsecaseScheduler.getJobs()


Copyright $ Apache Software Foundation. All Rights Reserved.