| Constructor and Description |
|---|
RosterFileScanner(File rosterFile)
Create a roster file scanner which loads the given roster file to locate plugins.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<DeploymentUnit> |
getDeploymentUnits()
Gets all deployment units currently being tracked by the scanner.
|
static String |
getListSuffix()
The suffix for a roster file containing a simple plugin list.
|
static boolean |
isKnownRosterFileFormat(File rosterFile)
Check whether a proposed roster file is in a known format.
|
void |
remove(DeploymentUnit deploymentUnit)
Remove the specified deployment unit in such a way as it will not be picked up by subsequent scans, even
if the system is restarted.
|
void |
reset()
Reset the scanner.
|
Collection<DeploymentUnit> |
scan()
Scan for new deployment units.
|
public RosterFileScanner(File rosterFile)
The provided roster file format is determined by its file suffix. Currently supported suffixes are
- getListSuffix(): a list of file paths, one per line
If the format is not recognized, an IllegalArgumentException is thrown. This can be checked before construction
using isKnownRosterFileFormat(File).
rosterFile - the file to load the plugin roster from.IllegalArgumentException - if the suffix of rosterFile is not a supported file formatpublic Collection<DeploymentUnit> scan()
Scannerpublic Collection<DeploymentUnit> getDeploymentUnits()
ScannergetDeploymentUnits in interface Scannerpublic void reset()
Scannerpublic void remove(DeploymentUnit deploymentUnit) throws PluginException
Scannerremove in interface ScannerdeploymentUnit - the deployment unit to removePluginException - if the unit has not been properly removed: i.e. a restart would mean the unit would
be reloaded.public static String getListSuffix()
Roster files with this suffix have one literal path per line. Relative paths are resolved relative to the directory containing the list file. Entries are considered distinct or not based on the path used in the file - no canonicalization is forced.
public static boolean isKnownRosterFileFormat(File rosterFile)
rosterFile - the roster file to check.RosterFileScannerCopyright © 2019 Atlassian. All rights reserved.