| Constructor and Description |
|---|
DirectoryScanner(File pluginsDirectory)
Constructor for scanner.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear(File file)
Tells the Scanner to forget about a file it has loaded so that it will reload it
next time it scans.
|
Collection<DeploymentUnit> |
getDeploymentUnits()
Retrieve all the
DeploymentUnits currently stored. |
DeploymentUnit |
locateDeploymentUnit(File file)
Given a file, finds the deployment unit for it if one has already been scanned.
|
void |
remove(DeploymentUnit unit)
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()
Clears the list of scanned deployment units.
|
Collection<DeploymentUnit> |
scan()
Scans for all files and directories that have been added or modified since the
last call to scan.
|
public DirectoryScanner(File pluginsDirectory)
pluginsDirectory - the directory that the scanner should monitor for pluginspublic DeploymentUnit locateDeploymentUnit(File file)
file - a jar file.public void clear(File file)
file - a file that may have already been scanned.public Collection<DeploymentUnit> scan()
scan in interface ScannerDeploymentUnits that describe newly added files or directories.public Collection<DeploymentUnit> getDeploymentUnits()
DeploymentUnits currently stored.getDeploymentUnits in interface ScannerDeploymentUnits.public void reset()
public void remove(DeploymentUnit unit) throws PluginException
Scannerremove in interface Scannerunit - the deployment unit to removePluginException - if the unit has not been properly removed: i.e. a restart would mean the unit would
be reloaded.Copyright © 2014 Atlassian. All rights reserved.