Class FilenameChoiceListProvider
java.lang.Object
hudson.model.AbstractDescribableImpl<ChoiceListProvider>
jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProvider
jp.ikedam.jenkins.plugins.extensible_choice_parameter.FilenameChoiceListProvider
- All Implemented Interfaces:
ExtensionPoint
,Describable<ChoiceListProvider>
,Serializable
Create a choice list from a list of files.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Class for view.static enum
static enum
A type specifying what type of files to scan to list.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorsConstructorDescriptionFilenameChoiceListProvider
(String baseDirPath, String includePattern, String excludePattern, FilenameChoiceListProvider.ScanType scanType) Deprecated.FilenameChoiceListProvider
(String baseDirPath, String includePattern, String excludePattern, FilenameChoiceListProvider.ScanType scanType, boolean reverseOrder) Deprecated.FilenameChoiceListProvider
(String baseDirPath, String includePattern, String excludePattern, FilenameChoiceListProvider.ScanType scanType, boolean reverseOrder, FilenameChoiceListProvider.EmptyChoiceType emptyChoiceType) The constructor called when a user posts a form. -
Method Summary
Modifier and TypeMethodDescriptionprotected File
Returns a directory to scan for files.protected static File
getBaseDir
(String baseDirPath) Returns a directory to scan for files from the passed path.Returns a path to a directory to scan for files.Returns the list of choices to show.Returns a pattern for files to exclude.getFileList
(File baseDir, String includePattern, String excludePattern, FilenameChoiceListProvider.ScanType scanType) Deprecated.getFileList
(File baseDir, String includePattern, String excludePattern, FilenameChoiceListProvider.ScanType scanType, boolean reverseOrder) Deprecated.getFileList
(File baseDir, String includePattern, String excludePattern, FilenameChoiceListProvider.ScanType scanType, boolean reverseOrder, FilenameChoiceListProvider.EmptyChoiceType emptyChoiceType) List files from passed parameters.Returns a pattern for files to include.Returns what type of files to list.boolean
Methods inherited from class jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProvider
all, getDefaultChoice, onBuildCompletedWithValue, onBuildTriggeredWithValue, requiresBuildPermission
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
FilenameChoiceListProvider
@DataBoundConstructor public FilenameChoiceListProvider(String baseDirPath, String includePattern, String excludePattern, FilenameChoiceListProvider.ScanType scanType, boolean reverseOrder, FilenameChoiceListProvider.EmptyChoiceType emptyChoiceType) The constructor called when a user posts a form.- Parameters:
baseDirPath
- a path to the directory to scan.includePattern
- a pattern of file names to include to the list.excludePattern
- a pattern of file names to exclude from the list.scanType
- a type of files to list.emptyChoiceType
- whether and where to put an empty choice.
-
FilenameChoiceListProvider
@Deprecated public FilenameChoiceListProvider(String baseDirPath, String includePattern, String excludePattern, FilenameChoiceListProvider.ScanType scanType, boolean reverseOrder) Deprecated. -
FilenameChoiceListProvider
@Deprecated public FilenameChoiceListProvider(String baseDirPath, String includePattern, String excludePattern, FilenameChoiceListProvider.ScanType scanType) For backward compatibility.- Parameters:
baseDirPath
-includePattern
-excludePattern
-scanType
-
-
-
Method Details
-
getBaseDirPath
Returns a path to a directory to scan for files. If this path is absolute, it is used as specified. If this path is relative, it is considered relative from JENKINS_HOME.- Returns:
- the baseDirPath
-
getBaseDir
Returns a directory to scan for files from the passed path. Whether the path is relative or absolute, is resolved here.- Parameters:
baseDirPath
- a path string to the directory.- Returns:
- A file object specifying the proper path of the directory.
-
getBaseDir
Returns a directory to scan for files.- Returns:
- A file object specifying the proper path to the directory to scan.
-
getIncludePattern
Returns a pattern for files to include.- Returns:
- the include pattern
-
getScanType
Returns what type of files to list.- Returns:
- what type of files to list
-
getExcludePattern
Returns a pattern for files to exclude.- Returns:
- the exclude pattern
-
isReverseOrder
public boolean isReverseOrder()- Returns:
-
getEmptyChoiceType
- Returns:
- whether and where to put an empty choice.
-
getFileList
protected static List<String> getFileList(File baseDir, String includePattern, String excludePattern, FilenameChoiceListProvider.ScanType scanType, boolean reverseOrder, FilenameChoiceListProvider.EmptyChoiceType emptyChoiceType) List files from passed parameters.- Parameters:
baseDir
-includePattern
-excludePattern
-scanType
-reverseOrder
-- Returns:
-
getFileList
@Deprecated protected static List<String> getFileList(File baseDir, String includePattern, String excludePattern, FilenameChoiceListProvider.ScanType scanType, boolean reverseOrder) Deprecated. -
getFileList
@Deprecated protected static List<String> getFileList(File baseDir, String includePattern, String excludePattern, FilenameChoiceListProvider.ScanType scanType) Deprecated.For backward compatibility.- Parameters:
baseDir
-includePattern
-excludePattern
-scanType
-- Returns:
-
getChoiceList
Returns the list of choices to show.- Specified by:
getChoiceList
in classChoiceListProvider
- Returns:
- See Also:
-
FilenameChoiceListProvider(String, String, String, ScanType, boolean)