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