com.atlassian.plugin.loaders
Class FileListScanner

java.lang.Object
  extended by com.atlassian.plugin.loaders.FileListScanner
All Implemented Interfaces:
Scanner

public class FileListScanner
extends Object
implements Scanner

A scanner that simply scans a given set of input files. This scanner will always return the units in the order supplied in the constructor.


Constructor Summary
FileListScanner(Collection<File> files)
           
 
Method Summary
 Collection<DeploymentUnit> getDeploymentUnits()
          Gets all deployment units currently being tracked by the scanner.
 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()
          Reset the scanner.
 Collection<DeploymentUnit> scan()
          Scan for new deployment units.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileListScanner

public FileListScanner(Collection<File> files)
Method Detail

scan

public Collection<DeploymentUnit> scan()
Description copied from interface: Scanner
Scan for new deployment units. On the first scan, all deployment units that the scanner can find will be returned. Subsequent scans will only return deployment units that are new since the last scan (or call to reset() or clear())

Specified by:
scan in interface Scanner
Returns:
all new deployment units since the last scan

getDeploymentUnits

public Collection<DeploymentUnit> getDeploymentUnits()
Description copied from interface: Scanner
Gets all deployment units currently being tracked by the scanner. This will not trigger a scan, meaning that plugins that have been added since the last scan will not be returned.

Specified by:
getDeploymentUnits in interface Scanner
Returns:
a collection of all deployment units currently being tracked by the scanner.

reset

public void reset()
Description copied from interface: Scanner
Reset the scanner. This causes it to forget all state about which plugins have (or haven't) been loaded.

Specified by:
reset in interface Scanner

remove

public void remove(DeploymentUnit unit)
            throws PluginException
Description copied from interface: Scanner
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.

Specified by:
remove in interface Scanner
Parameters:
unit - the deployment unit to remove
Throws:
PluginException - if the unit has not been properly removed: i.e. a restart would mean the unit would be reloaded.


Copyright © 2013 Atlassian. All Rights Reserved.