Documentation fixes, also set treat warnings as errors on
This commit is contained in:
@@ -48,8 +48,8 @@ namespace Spring.Scheduling.Quartz
|
||||
/// <seealso cref="Trigger.JobName" />
|
||||
/// <seealso cref="Trigger.JobGroup" />
|
||||
/// <seealso cref="JobDetail" />
|
||||
/// <seealso cref="SchedulerFactoryObject.Triggers" />
|
||||
/// <seealso cref="SchedulerFactoryObject.JobDetails" />
|
||||
/// <seealso cref="SchedulerAccessor.Triggers" />
|
||||
/// <seealso cref="SchedulerAccessor.JobDetails" />
|
||||
public class CronTriggerObject : CronTrigger, IJobDetailAwareTrigger, IObjectNameAware, IInitializingObject
|
||||
{
|
||||
private JobDetail jobDetail;
|
||||
|
||||
@@ -34,8 +34,8 @@ namespace Spring.Scheduling.Quartz
|
||||
/// </p>
|
||||
/// </remarks>
|
||||
/// <author>Juergen Hoeller</author>
|
||||
/// <seealso cref="SchedulerFactoryObject.Triggers" />
|
||||
/// <seealso cref="SchedulerFactoryObject.JobDetails" />
|
||||
/// <seealso cref="SchedulerAccessor.Triggers" />
|
||||
/// <seealso cref="SchedulerAccessor.JobDetails" />
|
||||
/// <seealso cref="Trigger.JobName" />
|
||||
/// <seealso cref="Trigger.JobGroup" />
|
||||
public interface IJobDetailAwareTrigger
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Spring.Scheduling.Quartz
|
||||
/// Set the name of the job.
|
||||
/// Default is the object name of this FactoryObject.
|
||||
/// </summary>
|
||||
/// <seealso cref="JobDetail.Name" />
|
||||
/// <seealso cref="Name" />
|
||||
public virtual string Name
|
||||
{
|
||||
set { name = value; }
|
||||
@@ -88,7 +88,7 @@ namespace Spring.Scheduling.Quartz
|
||||
/// Set the group of the job.
|
||||
/// Default is the default group of the Scheduler.
|
||||
/// </summary>
|
||||
/// <seealso cref="JobDetail.Group" />
|
||||
/// <seealso cref="Group" />
|
||||
/// <seealso cref="SchedulerConstants.DefaultGroup" />
|
||||
public virtual string Group
|
||||
{
|
||||
@@ -128,7 +128,7 @@ namespace Spring.Scheduling.Quartz
|
||||
/// A JobListener name always refers to the name returned
|
||||
/// by the JobListener implementation.
|
||||
/// </remarks>
|
||||
/// <seealso cref="SchedulerFactoryObject.JobListeners" />
|
||||
/// <seealso cref="SchedulerAccessor.JobListeners" />
|
||||
/// <seealso cref="IJobListener.Name" />
|
||||
public virtual string[] JobListenerNames
|
||||
{
|
||||
@@ -154,10 +154,10 @@ namespace Spring.Scheduling.Quartz
|
||||
/// Set the name of the target object in the Spring object factory.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is an alternative to specifying <see cref="TargetObject" />
|
||||
/// This is an alternative to specifying TargetObject
|
||||
/// allowing for non-singleton objects to be invoked. Note that specified
|
||||
/// "TargetObject" and <see cref="TargetType" /> values will
|
||||
/// override the corresponding effect of this "targetObjectName" setting
|
||||
/// "TargetObject" and "TargetType" values will
|
||||
/// override the corresponding effect of this "TargetObjectName" setting
|
||||
///(i.e. statically pre-define the object type or even the target object).
|
||||
/// </remarks>
|
||||
public string TargetObjectName
|
||||
|
||||
@@ -36,13 +36,16 @@ namespace Spring.Scheduling.Quartz
|
||||
/// triggers and listeners on a <see cref="IScheduler" /> instance.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <p>For concrete usage, check out the <see cref="SchedulerFactoryObject" /> and
|
||||
/// For concrete usage, check out the <see cref="SchedulerFactoryObject" /> and
|
||||
/// <see cref="SchedulerAccessorObject" /> classes.
|
||||
///</remarks>
|
||||
/// <author>Juergen Hoeller</author>
|
||||
/// <author>Marko Lahma (.NET)</author>
|
||||
public abstract class SchedulerAccessor : IResourceLoaderAware
|
||||
{
|
||||
/// <summary>
|
||||
/// Logger instance.
|
||||
/// </summary>
|
||||
protected readonly ILog logger;
|
||||
private bool overwriteExistingJobs;
|
||||
|
||||
@@ -59,8 +62,14 @@ namespace Spring.Scheduling.Quartz
|
||||
private ITriggerListener[] triggerListeners;
|
||||
|
||||
private IPlatformTransactionManager transactionManager;
|
||||
/// <summary>
|
||||
/// Resource loader instance for sub-classes
|
||||
/// </summary>
|
||||
protected IResourceLoader resourceLoader;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SchedulerAccessor"/> class.
|
||||
/// </summary>
|
||||
protected SchedulerAccessor()
|
||||
{
|
||||
logger = LogManager.GetLogger(GetType());
|
||||
@@ -105,7 +114,7 @@ namespace Spring.Scheduling.Quartz
|
||||
/// <summary>
|
||||
/// Register a list of JobDetail objects with the Scheduler that
|
||||
/// this FactoryObject creates, to be referenced by Triggers.
|
||||
/// <p>This is not necessary when a Trigger determines the JobDetail
|
||||
/// This is not necessary when a Trigger determines the JobDetail
|
||||
/// itself: In this case, the JobDetail will be implicitly registered
|
||||
/// in combination with the Trigger.
|
||||
/// </summary>
|
||||
@@ -137,7 +146,7 @@ namespace Spring.Scheduling.Quartz
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
// Register a list of Trigger objects with the Scheduler that
|
||||
/// Register a list of Trigger objects with the Scheduler that
|
||||
/// this FactoryObject creates.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@@ -180,7 +189,7 @@ namespace Spring.Scheduling.Quartz
|
||||
/// </summary>
|
||||
/// <seealso cref="IJobListener.Name" />
|
||||
/// <seealso cref="JobDetail.AddJobListener" />
|
||||
/// <seealso cref="JobDetailObject.JobListenerNames" />
|
||||
/// <seealso cref="JobDetail.JobListenerNames" />
|
||||
public virtual IJobListener[] JobListeners
|
||||
{
|
||||
set { jobListeners = value; }
|
||||
@@ -202,10 +211,9 @@ namespace Spring.Scheduling.Quartz
|
||||
/// Such TriggerListeners will only apply to Triggers that explicitly activate
|
||||
/// them via their name.
|
||||
/// </summary>
|
||||
/// <seealso cref="ITriggerListener#getName" />
|
||||
/// <seealso cref="Trigger#addTriggerListener" />
|
||||
/// <seealso cref="CronTriggerObject#setTriggerListenerNames" />
|
||||
/// <seealso cref="SimpleTriggerObject#setTriggerListenerNames" />
|
||||
/// <seealso cref="ITriggerListener.Name" />
|
||||
/// <seealso cref="Trigger.AddTriggerListener" />
|
||||
/// <seealso cref="Trigger.TriggerListenerNames" />
|
||||
public virtual ITriggerListener[] TriggerListeners
|
||||
{
|
||||
set { triggerListeners = value; }
|
||||
|
||||
@@ -61,6 +61,10 @@ namespace Spring.Scheduling.Quartz
|
||||
set { scheduler = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Template method that determines the Scheduler to operate on.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected override IScheduler GetScheduler()
|
||||
{
|
||||
return scheduler;
|
||||
@@ -75,6 +79,32 @@ namespace Spring.Scheduling.Quartz
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Invoked by an <see cref="Spring.Objects.Factory.IObjectFactory"/>
|
||||
/// after it has injected all of an object's dependencies.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <p>
|
||||
/// This method allows the object instance to perform the kind of
|
||||
/// initialization only possible when all of it's dependencies have
|
||||
/// been injected (set), and to throw an appropriate exception in the
|
||||
/// event of misconfiguration.
|
||||
/// </p>
|
||||
/// <p>
|
||||
/// Please do consult the class level documentation for the
|
||||
/// <see cref="Spring.Objects.Factory.IObjectFactory"/> interface for a
|
||||
/// description of exactly <i>when</i> this method is invoked. In
|
||||
/// particular, it is worth noting that the
|
||||
/// <see cref="Spring.Objects.Factory.IObjectFactoryAware"/>
|
||||
/// and <see cref="Spring.Context.IApplicationContextAware"/>
|
||||
/// callbacks will have been invoked <i>prior</i> to this method being
|
||||
/// called.
|
||||
/// </p>
|
||||
/// </remarks>
|
||||
/// <exception cref="System.Exception">
|
||||
/// In the event of misconfiguration (such as the failure to set a
|
||||
/// required property) or if initialization fails.
|
||||
/// </exception>
|
||||
public void AfterPropertiesSet()
|
||||
{
|
||||
if (scheduler == null)
|
||||
@@ -92,6 +122,11 @@ namespace Spring.Scheduling.Quartz
|
||||
RegisterJobsAndTriggers();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds the scheduler.
|
||||
/// </summary>
|
||||
/// <param name="schedulerName">Name of the scheduler.</param>
|
||||
/// <returns></returns>
|
||||
protected virtual IScheduler FindScheduler(string schedulerName)
|
||||
{
|
||||
if (objectFactory is IListableObjectFactory)
|
||||
|
||||
@@ -303,13 +303,16 @@ namespace Spring.Scheduling.Quartz
|
||||
}
|
||||
}
|
||||
|
||||
/// Set whether to expose the Spring-managed {@link Scheduler} instance in the
|
||||
/// Quartz {@link SchedulerRepository}. Default is "false", since the Spring-managed
|
||||
/// <summary>
|
||||
/// Set whether to expose the Spring-managed <see cref="IScheduler" /> instance in the
|
||||
/// Quartz <see cref="SchedulerRepository" />. Default is "false", since the Spring-managed
|
||||
/// Scheduler is usually exclusively intended for access within the Spring context.
|
||||
/// <p>Switch this flag to "true" in order to expose the Scheduler globally.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Switch this flag to "true" in order to expose the Scheduler globally.
|
||||
/// This is not recommended unless you have an existing Spring application that
|
||||
/// relies on this behavior. Note that such global exposure was the accidental
|
||||
/// default in earlier Spring versions; this has been fixed as of Spring 2.5.6.
|
||||
/// relies on this behavior.
|
||||
/// </remarks>
|
||||
public virtual bool ExposeSchedulerInRepository
|
||||
{
|
||||
set { exposeSchedulerInRepository = value; }
|
||||
|
||||
@@ -46,8 +46,8 @@ namespace Spring.Scheduling.Quartz
|
||||
/// <seealso cref="Trigger.JobName" />
|
||||
/// <seealso cref="Trigger.JobGroup" />
|
||||
/// <seealso cref="SimpleTriggerObject.JobDetail" />
|
||||
/// <seealso cref="SchedulerFactoryObject.Triggers" />
|
||||
/// <seealso cref="SchedulerFactoryObject.JobDetails" />
|
||||
/// <seealso cref="SchedulerAccessor.Triggers" />
|
||||
/// <seealso cref="SchedulerAccessor.JobDetails" />
|
||||
/// <seealso cref="CronTriggerObject" />
|
||||
public class SimpleTriggerObject : SimpleTrigger, IJobDetailAwareTrigger, IObjectNameAware, IInitializingObject
|
||||
{
|
||||
|
||||
@@ -45,37 +45,64 @@ namespace Spring.Scheduling.Quartz
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates the command.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IDbCommand CreateCommand()
|
||||
{
|
||||
return dbProvider.CreateCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the command builder.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public object CreateCommandBuilder()
|
||||
{
|
||||
return dbProvider.CreateCommandBuilder();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the connection.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IDbConnection CreateConnection()
|
||||
{
|
||||
return dbProvider.CreateConnection();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the parameter.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IDbDataParameter CreateParameter()
|
||||
{
|
||||
return dbProvider.CreateParameter();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Shutdowns this instance.
|
||||
/// </summary>
|
||||
public void Shutdown()
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the connection string.
|
||||
/// </summary>
|
||||
/// <value>The connection string.</value>
|
||||
public string ConnectionString
|
||||
{
|
||||
get { return dbProvider.ConnectionString; }
|
||||
set { dbProvider.ConnectionString = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the metadata.
|
||||
/// </summary>
|
||||
/// <value>The metadata.</value>
|
||||
public DbMetadata Metadata
|
||||
{
|
||||
get { return metadata; }
|
||||
@@ -119,83 +146,141 @@ namespace Spring.Scheduling.Quartz
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the product.
|
||||
/// </summary>
|
||||
/// <value>The name of the product.</value>
|
||||
public override string ProductName
|
||||
{
|
||||
get { return metadata.ProductName; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the connection.
|
||||
/// </summary>
|
||||
/// <value>The type of the connection.</value>
|
||||
public override Type ConnectionType
|
||||
{
|
||||
get { return metadata.ConnectionType; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the command.
|
||||
/// </summary>
|
||||
/// <value>The type of the command.</value>
|
||||
public override Type CommandType
|
||||
{
|
||||
get { return metadata.CommandType; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the parameter.
|
||||
/// </summary>
|
||||
/// <value>The type of the parameter.</value>
|
||||
public override Type ParameterType
|
||||
{
|
||||
get { return metadata.ParameterType; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the command builder.
|
||||
/// </summary>
|
||||
/// <value>The type of the command builder.</value>
|
||||
public override Type CommandBuilderType
|
||||
{
|
||||
get { return metadata.CommandBuilderType; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the command builder derive parameters method.
|
||||
/// </summary>
|
||||
/// <value>The command builder derive parameters method.</value>
|
||||
public override MethodInfo CommandBuilderDeriveParametersMethod
|
||||
{
|
||||
get { return metadata.CommandBuilderDeriveParametersMethod; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parameter name prefix.
|
||||
/// </summary>
|
||||
/// <value>The parameter name prefix.</value>
|
||||
public override string ParameterNamePrefix
|
||||
{
|
||||
get { return metadata.ParameterNamePrefix; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the exception.
|
||||
/// </summary>
|
||||
/// <value>The type of the exception.</value>
|
||||
public override Type ExceptionType
|
||||
{
|
||||
get { return metadata.ExceptionType; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [bind by name].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [bind by name]; otherwise, <c>false</c>.</value>
|
||||
public override bool BindByName
|
||||
{
|
||||
get { return metadata.BindByName; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the parameter db.
|
||||
/// </summary>
|
||||
/// <value>The type of the parameter db.</value>
|
||||
public override Type ParameterDbType
|
||||
{
|
||||
get { return metadata.ParameterDbType; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parameter db type property.
|
||||
/// </summary>
|
||||
/// <value>The parameter db type property.</value>
|
||||
public override PropertyInfo ParameterDbTypeProperty
|
||||
{
|
||||
get { return metadata.ParameterDbTypeProperty; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parameter is nullable property.
|
||||
/// </summary>
|
||||
/// <value>The parameter is nullable property.</value>
|
||||
public override PropertyInfo ParameterIsNullableProperty
|
||||
{
|
||||
get { return metadata.ParameterIsNullableProperty; }
|
||||
set { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the type of the db binary.
|
||||
/// </summary>
|
||||
/// <value>The type of the db binary.</value>
|
||||
public override Enum DbBinaryType
|
||||
{
|
||||
get { return dbTypeBinary; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [use parameter name prefix in parameter collection].
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if [use parameter name prefix in parameter collection]; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public override bool UseParameterNamePrefixInParameterCollection
|
||||
{
|
||||
get { return metadata.UseParameterNamePrefixInParameterCollection; }
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>Spring.Scheduling.Quartz.xml</DocumentationFile>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
||||
Reference in New Issue
Block a user