org.ops4j.pax.scanner.composite.internal
Class CompositeScanner

java.lang.Object
  extended by org.ops4j.pax.scanner.composite.internal.CompositeScanner
All Implemented Interfaces:
Scanner

public class CompositeScanner
extends java.lang.Object
implements Scanner

A scanner that scans plain text file containing other scanning specs.

Since:
0.18.0, March 07, 2007
Author:
Alin Dreghiciu

Field Summary
 
Fields inherited from interface org.ops4j.pax.scanner.Scanner
SCHEMA_PROPERTY
 
Constructor Summary
CompositeScanner(org.ops4j.util.property.PropertyResolver propertyResolver, ProvisionService provisionService)
          Creates a new file scanner.
 
Method Summary
 java.util.List<ScannedBundle> scan(ProvisionSpec provisionSpec)
          Reads the bundles from the file specified by the urlSpec.
 void setResolver(org.ops4j.util.property.PropertyResolver propertyResolver)
          Sets the propertyResolver to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeScanner

public CompositeScanner(org.ops4j.util.property.PropertyResolver propertyResolver,
                        ProvisionService provisionService)
Creates a new file scanner.

Parameters:
propertyResolver - a propertyResolver; mandatory
provisionService - provision service to be used to scan; mandatory
Method Detail

scan

public java.util.List<ScannedBundle> scan(ProvisionSpec provisionSpec)
                                   throws MalformedSpecificationException,
                                          ScannerException
Reads the bundles from the file specified by the urlSpec. Based on the path the scanner should return a list of scanned bundles for bundles that should be installed.

Specified by:
scan in interface Scanner
Parameters:
provisionSpec - provisioning specification
Returns:
a list of bundle references
Throws:
MalformedSpecificationException - - If the path is malformed
ScannerException - - If an exception eccured during scanning

setResolver

public void setResolver(org.ops4j.util.property.PropertyResolver propertyResolver)
Sets the propertyResolver to use.

Parameters:
propertyResolver - a propertyResolver


Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.