|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.loaders.DirectoryScanner
public class DirectoryScanner
Scans the filesystem for changed or added plugin files and stores a map of the currently known ones. Files beginning with "." are ignored.
| Constructor Summary | |
|---|---|
DirectoryScanner(java.io.File pluginsDirectory)
Constructor for scanner. |
|
| Method Summary | |
|---|---|
void |
clear(java.io.File file)
Tells the Scanner to forget about a file it has loaded so that it will reload it next time it scans. |
java.util.Collection<DeploymentUnit> |
getDeploymentUnits()
Retrieve all the DeploymentUnits currently stored. |
DeploymentUnit |
locateDeploymentUnit(java.io.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. |
java.util.Collection<DeploymentUnit> |
scan()
Scans for all files and directories that have been added or modified since the last call to scan. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectoryScanner(java.io.File pluginsDirectory)
pluginsDirectory - the directory that the scanner should monitor for plugins| Method Detail |
|---|
public DeploymentUnit locateDeploymentUnit(java.io.File file)
file - a jar file.
public void clear(java.io.File file)
file - a file that may have already been scanned.public java.util.Collection<DeploymentUnit> scan()
scan in interface ScannerDeploymentUnits that describe newly added files or directories.public java.util.Collection<DeploymentUnit> getDeploymentUnits()
DeploymentUnits currently stored.
getDeploymentUnits in interface ScannerDeploymentUnits.public void reset()
reset in interface Scanner
public void remove(DeploymentUnit unit)
throws PluginException
Scanner
remove in interface Scannerunit - the deployment unit to remove
PluginException - if the unit has not been properly removed: i.e. a restart would mean the unit would
be reloaded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||