Coverage Report - org.mule.transport.quartz.config.AbstractJobConfig
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractJobConfig
0%
0/17
0%
0/2
0
 
 1  
 /*
 2  
  * $Id: AbstractJobConfig.java 20321 2010-11-24 15:21:24Z dfeist $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 package org.mule.transport.quartz.config;
 11  
 
 12  
 import org.mule.api.MuleContext;
 13  
 import org.mule.api.context.MuleContextAware;
 14  
 import org.mule.transport.quartz.QuartzConnector;
 15  
 
 16  
 import org.quartz.Job;
 17  
 import org.quartz.StatefulJob;
 18  
 
 19  
 /**
 20  
  * Base implementation of {@link JobConfig}.
 21  
  */
 22  0
 public abstract class AbstractJobConfig implements JobConfig, MuleContextAware
 23  
 {
 24  0
     private boolean stateful = false;
 25  
 
 26  0
     private String groupName = QuartzConnector.DEFAULT_GROUP_NAME;
 27  
 
 28  0
     private String jobGroupName = QuartzConnector.DEFAULT_GROUP_NAME;
 29  
 
 30  
     private transient MuleContext muleContext;
 31  
 
 32  
     public void setMuleContext(MuleContext context)
 33  
     {
 34  0
         this.muleContext = context;
 35  0
     }
 36  
 
 37  
     public MuleContext getMuleContext()
 38  
     {
 39  0
         return muleContext;
 40  
     }
 41  
 
 42  
     public String getGroupName()
 43  
     {
 44  0
         return groupName;
 45  
     }
 46  
 
 47  
     public void setGroupName(String groupName)
 48  
     {
 49  0
         this.groupName = groupName;
 50  0
     }
 51  
 
 52  
     public String getJobGroupName()
 53  
     {
 54  0
         return jobGroupName;
 55  
     }
 56  
 
 57  
     public void setJobGroupName(String jobGroupName)
 58  
     {
 59  0
         this.jobGroupName = jobGroupName;
 60  0
     }
 61  
 
 62  
     public boolean isStateful()
 63  
     {
 64  0
         return stateful;
 65  
     }
 66  
 
 67  
     public void setStateful(boolean stateful)
 68  
     {
 69  0
         this.stateful = stateful;
 70  0
     }
 71  
 
 72  
     public final Class<? extends Job> getJobClass()
 73  
     {
 74  0
         return (isStateful() ? getStatefulJobClass() : getStatelessJobClass());
 75  
     }
 76  
 
 77  
     protected abstract Class<? extends StatefulJob> getStatefulJobClass();
 78  
     
 79  
     protected abstract Class<? extends Job> getStatelessJobClass();
 80  
 }