hudson.plugins.filesfoundtrigger
Class FilesFoundTrigger

java.lang.Object
  extended by hudson.triggers.Trigger<hudson.model.BuildableItem>
      extended by hudson.plugins.filesfoundtrigger.FilesFoundTrigger
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.triggers.Trigger<?>>

public class FilesFoundTrigger
extends hudson.triggers.Trigger<hudson.model.BuildableItem>

Build trigger that schedules a build when certain files are found. These files are declared using Ant-style file patterns.

Author:
Steven G. Brown

Nested Class Summary
static class FilesFoundTrigger.ConverterImpl
          Converter implementation for XStream.
static class FilesFoundTrigger.DescriptorImpl
          Registers FilesFoundTrigger as a Trigger extension.
 
Nested classes/interfaces inherited from class hudson.triggers.Trigger
hudson.triggers.Trigger.Cron
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.triggers.Trigger
job, spec, tabs, timer
 
Constructor Summary
FilesFoundTrigger(java.lang.String timerSpec, java.lang.String directory, java.lang.String files, java.lang.String ignoredFiles)
          Create a new FilesFoundTrigger.
 
Method Summary
 java.lang.String getDirectory()
          Get the base directory to use when locating files.
 java.lang.String getFiles()
          Get the pattern of files to locate under the base directory.
 java.lang.String getIgnoredFiles()
          Get the pattern of files to ignore when searching under the base directory.
 void run()
          
 
Methods inherited from class hudson.triggers.Trigger
all, checkTriggers, for_, getDescriptor, getProjectAction, getProjectActions, getSpec, init, readResolve, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilesFoundTrigger

@DataBoundConstructor
public FilesFoundTrigger(java.lang.String timerSpec,
                                              java.lang.String directory,
                                              java.lang.String files,
                                              java.lang.String ignoredFiles)
                  throws antlr.ANTLRException
Create a new FilesFoundTrigger.

Parameters:
timerSpec - crontab specification that defines how often to poll the directory
directory - the base directory to use when locating files
files - the pattern of files to locate under the base directory
ignoredFiles - the pattern of files to ignore when searching under the base directory
Throws:
antlr.ANTLRException - if unable to parse the crontab specification
Method Detail

getDirectory

public java.lang.String getDirectory()
Get the base directory to use when locating files.

Returns:
the base directory

getFiles

public java.lang.String getFiles()
Get the pattern of files to locate under the base directory.

Returns:
the files to find

getIgnoredFiles

public java.lang.String getIgnoredFiles()
Get the pattern of files to ignore when searching under the base directory.

Returns:
the files to ignore

run

public void run()

Overrides:
run in class hudson.triggers.Trigger<hudson.model.BuildableItem>


Copyright © 2010. All Rights Reserved.