From 4ce925cb86e01f9e30f1788c4fbf3cef5554990c Mon Sep 17 00:00:00 2001 From: lahma Date: Thu, 11 Dec 2008 11:08:26 +0000 Subject: [PATCH] Documentation fixes, also set treat warnings as errors on --- .../Scheduling/Quartz/CronTriggerObject.cs | 4 +- .../Quartz/IJobDetailAwareTrigger.cs | 4 +- .../MethodInvokingJobDetailFactoryObject.cs | 12 +-- .../Scheduling/Quartz/SchedulerAccessor.cs | 24 ++++-- .../Quartz/SchedulerAccessorObject.cs | 35 ++++++++ .../Quartz/SchedulerFactoryObject.cs | 13 +-- .../Scheduling/Quartz/SimpleTriggerObject.cs | 4 +- .../Quartz/SpringDbProviderAdapter.cs | 85 +++++++++++++++++++ .../Spring.Scheduling.Quartz.2008.csproj | 1 + 9 files changed, 157 insertions(+), 25 deletions(-) diff --git a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/CronTriggerObject.cs b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/CronTriggerObject.cs index 61af0d6d..4bf86237 100644 --- a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/CronTriggerObject.cs +++ b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/CronTriggerObject.cs @@ -48,8 +48,8 @@ namespace Spring.Scheduling.Quartz /// /// /// - /// - /// + /// + /// public class CronTriggerObject : CronTrigger, IJobDetailAwareTrigger, IObjectNameAware, IInitializingObject { private JobDetail jobDetail; diff --git a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/IJobDetailAwareTrigger.cs b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/IJobDetailAwareTrigger.cs index bd64614b..a7a43887 100644 --- a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/IJobDetailAwareTrigger.cs +++ b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/IJobDetailAwareTrigger.cs @@ -34,8 +34,8 @@ namespace Spring.Scheduling.Quartz ///

/// /// Juergen Hoeller - /// - /// + /// + /// /// /// public interface IJobDetailAwareTrigger diff --git a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/MethodInvokingJobDetailFactoryObject.cs b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/MethodInvokingJobDetailFactoryObject.cs index 40a87269..4107965e 100644 --- a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/MethodInvokingJobDetailFactoryObject.cs +++ b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/MethodInvokingJobDetailFactoryObject.cs @@ -78,7 +78,7 @@ namespace Spring.Scheduling.Quartz /// Set the name of the job. /// Default is the object name of this FactoryObject. /// - /// + /// 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. /// - /// + /// /// 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. /// - /// + /// /// public virtual string[] JobListenerNames { @@ -154,10 +154,10 @@ namespace Spring.Scheduling.Quartz /// Set the name of the target object in the Spring object factory. /// /// - /// This is an alternative to specifying + /// This is an alternative to specifying TargetObject /// allowing for non-singleton objects to be invoked. Note that specified - /// "TargetObject" and 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). /// public string TargetObjectName diff --git a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerAccessor.cs b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerAccessor.cs index 384ee892..1d6ba81e 100644 --- a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerAccessor.cs +++ b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerAccessor.cs @@ -36,13 +36,16 @@ namespace Spring.Scheduling.Quartz /// triggers and listeners on a instance. /// /// - ///

For concrete usage, check out the and + /// For concrete usage, check out the and /// classes. /// /// Juergen Hoeller /// Marko Lahma (.NET) public abstract class SchedulerAccessor : IResourceLoaderAware { + ///

+ /// Logger instance. + /// protected readonly ILog logger; private bool overwriteExistingJobs; @@ -59,8 +62,14 @@ namespace Spring.Scheduling.Quartz private ITriggerListener[] triggerListeners; private IPlatformTransactionManager transactionManager; + /// + /// Resource loader instance for sub-classes + /// protected IResourceLoader resourceLoader; + /// + /// Initializes a new instance of the class. + /// protected SchedulerAccessor() { logger = LogManager.GetLogger(GetType()); @@ -105,7 +114,7 @@ namespace Spring.Scheduling.Quartz /// /// Register a list of JobDetail objects with the Scheduler that /// this FactoryObject creates, to be referenced by Triggers. - ///

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. ///

@@ -137,7 +146,7 @@ namespace Spring.Scheduling.Quartz } /// - // Register a list of Trigger objects with the Scheduler that + /// Register a list of Trigger objects with the Scheduler that /// this FactoryObject creates. /// /// @@ -180,7 +189,7 @@ namespace Spring.Scheduling.Quartz /// /// /// - /// + /// 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. /// - /// - /// - /// - /// + /// + /// + /// public virtual ITriggerListener[] TriggerListeners { set { triggerListeners = value; } diff --git a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerAccessorObject.cs b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerAccessorObject.cs index 9197b2d6..3387b71a 100644 --- a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerAccessorObject.cs +++ b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerAccessorObject.cs @@ -61,6 +61,10 @@ namespace Spring.Scheduling.Quartz set { scheduler = value; } } + /// + /// Template method that determines the Scheduler to operate on. + /// + /// protected override IScheduler GetScheduler() { return scheduler; @@ -75,6 +79,32 @@ namespace Spring.Scheduling.Quartz } + /// + /// Invoked by an + /// after it has injected all of an object's dependencies. + /// + /// + ///

+ /// 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. + ///

+ ///

+ /// Please do consult the class level documentation for the + /// interface for a + /// description of exactly when this method is invoked. In + /// particular, it is worth noting that the + /// + /// and + /// callbacks will have been invoked prior to this method being + /// called. + ///

+ ///
+ /// + /// In the event of misconfiguration (such as the failure to set a + /// required property) or if initialization fails. + /// public void AfterPropertiesSet() { if (scheduler == null) @@ -92,6 +122,11 @@ namespace Spring.Scheduling.Quartz RegisterJobsAndTriggers(); } + /// + /// Finds the scheduler. + /// + /// Name of the scheduler. + /// protected virtual IScheduler FindScheduler(string schedulerName) { if (objectFactory is IListableObjectFactory) diff --git a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerFactoryObject.cs b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerFactoryObject.cs index 8aaaf03f..789f51ec 100644 --- a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerFactoryObject.cs +++ b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SchedulerFactoryObject.cs @@ -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 + /// + /// Set whether to expose the Spring-managed instance in the + /// Quartz . Default is "false", since the Spring-managed /// Scheduler is usually exclusively intended for access within the Spring context. - ///

Switch this flag to "true" in order to expose the Scheduler globally. + ///

+ /// + /// 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. + /// public virtual bool ExposeSchedulerInRepository { set { exposeSchedulerInRepository = value; } diff --git a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SimpleTriggerObject.cs b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SimpleTriggerObject.cs index 85d17d31..1d3e82e0 100644 --- a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SimpleTriggerObject.cs +++ b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SimpleTriggerObject.cs @@ -46,8 +46,8 @@ namespace Spring.Scheduling.Quartz /// /// /// - /// - /// + /// + /// /// public class SimpleTriggerObject : SimpleTrigger, IJobDetailAwareTrigger, IObjectNameAware, IInitializingObject { diff --git a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SpringDbProviderAdapter.cs b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SpringDbProviderAdapter.cs index 1b7f9484..66202081 100644 --- a/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SpringDbProviderAdapter.cs +++ b/src/Spring/Spring.Scheduling.Quartz/Scheduling/Quartz/SpringDbProviderAdapter.cs @@ -45,37 +45,64 @@ namespace Spring.Scheduling.Quartz } + /// + /// Creates the command. + /// + /// public IDbCommand CreateCommand() { return dbProvider.CreateCommand(); } + /// + /// Creates the command builder. + /// + /// public object CreateCommandBuilder() { return dbProvider.CreateCommandBuilder(); } + /// + /// Creates the connection. + /// + /// public IDbConnection CreateConnection() { return dbProvider.CreateConnection(); } + /// + /// Creates the parameter. + /// + /// public IDbDataParameter CreateParameter() { return dbProvider.CreateParameter(); } + /// + /// Shutdowns this instance. + /// public void Shutdown() { // no-op } + /// + /// Gets or sets the connection string. + /// + /// The connection string. public string ConnectionString { get { return dbProvider.ConnectionString; } set { dbProvider.ConnectionString = value; } } + /// + /// Gets the metadata. + /// + /// The metadata. public DbMetadata Metadata { get { return metadata; } @@ -119,83 +146,141 @@ namespace Spring.Scheduling.Quartz } + /// + /// Gets or sets the name of the product. + /// + /// The name of the product. public override string ProductName { get { return metadata.ProductName; } set { throw new NotImplementedException(); } } + /// + /// Gets or sets the type of the connection. + /// + /// The type of the connection. public override Type ConnectionType { get { return metadata.ConnectionType; } set { throw new NotImplementedException(); } } + /// + /// Gets or sets the type of the command. + /// + /// The type of the command. public override Type CommandType { get { return metadata.CommandType; } set { throw new NotImplementedException(); } } + /// + /// Gets or sets the type of the parameter. + /// + /// The type of the parameter. public override Type ParameterType { get { return metadata.ParameterType; } set { throw new NotImplementedException(); } } + /// + /// Gets or sets the type of the command builder. + /// + /// The type of the command builder. public override Type CommandBuilderType { get { return metadata.CommandBuilderType; } set { throw new NotImplementedException(); } } + /// + /// Gets or sets the command builder derive parameters method. + /// + /// The command builder derive parameters method. public override MethodInfo CommandBuilderDeriveParametersMethod { get { return metadata.CommandBuilderDeriveParametersMethod; } set { throw new NotImplementedException(); } } + /// + /// Gets or sets the parameter name prefix. + /// + /// The parameter name prefix. public override string ParameterNamePrefix { get { return metadata.ParameterNamePrefix; } set { throw new NotImplementedException(); } } + /// + /// Gets or sets the type of the exception. + /// + /// The type of the exception. public override Type ExceptionType { get { return metadata.ExceptionType; } set { throw new NotImplementedException(); } } + /// + /// Gets or sets a value indicating whether [bind by name]. + /// + /// true if [bind by name]; otherwise, false. public override bool BindByName { get { return metadata.BindByName; } set { throw new NotImplementedException(); } } + /// + /// Gets or sets the type of the parameter db. + /// + /// The type of the parameter db. public override Type ParameterDbType { get { return metadata.ParameterDbType; } set { throw new NotImplementedException(); } } + /// + /// Gets or sets the parameter db type property. + /// + /// The parameter db type property. public override PropertyInfo ParameterDbTypeProperty { get { return metadata.ParameterDbTypeProperty; } set { throw new NotImplementedException(); } } + /// + /// Gets or sets the parameter is nullable property. + /// + /// The parameter is nullable property. public override PropertyInfo ParameterIsNullableProperty { get { return metadata.ParameterIsNullableProperty; } set { throw new NotImplementedException(); } } + /// + /// Gets the type of the db binary. + /// + /// The type of the db binary. public override Enum DbBinaryType { get { return dbTypeBinary; } } + /// + /// Gets or sets a value indicating whether [use parameter name prefix in parameter collection]. + /// + /// + /// true if [use parameter name prefix in parameter collection]; otherwise, false. + /// public override bool UseParameterNamePrefixInParameterCollection { get { return metadata.UseParameterNamePrefixInParameterCollection; } diff --git a/src/Spring/Spring.Scheduling.Quartz/Spring.Scheduling.Quartz.2008.csproj b/src/Spring/Spring.Scheduling.Quartz/Spring.Scheduling.Quartz.2008.csproj index 37e7f168..f45eb061 100644 --- a/src/Spring/Spring.Scheduling.Quartz/Spring.Scheduling.Quartz.2008.csproj +++ b/src/Spring/Spring.Scheduling.Quartz/Spring.Scheduling.Quartz.2008.csproj @@ -20,6 +20,7 @@ prompt 4 Spring.Scheduling.Quartz.xml + true pdbonly