Package org.onebusaway.admin.bundle
Class DirectoryStagingBundleSource
- java.lang.Object
-
- org.onebusaway.admin.bundle.AbstractBundleSource
-
- org.onebusaway.admin.bundle.DirectoryStagingBundleSource
-
- All Implemented Interfaces:
StagingBundleSource
public class DirectoryStagingBundleSource extends AbstractBundleSource implements StagingBundleSource
Represents a staging bundle source where each bundle is saved as a set of files within a directory. The constructor takes a directory which contains multiple subdirectories, one for each bundle.
-
-
Field Summary
-
Fields inherited from class org.onebusaway.admin.bundle.AbstractBundleSource
BUNDLE_DATA_DIRNAME, BUNDLE_INPUT_DIRNAME, BUNDLE_OUTPUT_DIRNAME
-
-
Constructor Summary
Constructors Constructor Description DirectoryStagingBundleSource(String masterBundleDirectory, String stagingDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkIsValidBundleFile(String bundleId, String relativeFilePath)
File
getBundleFile(String bundleId, String relativeFilePath)
File
getMasterBundleDirectory()
File
getStagedBundleDirectory()
void
stage(String env, String bundleDir, String bundleName)
-
Methods inherited from class org.onebusaway.admin.bundle.AbstractBundleSource
arrayContainsItem, getBundleFile, getFilePath
-
-
-
-
Method Detail
-
getStagedBundleDirectory
public File getStagedBundleDirectory()
-
getMasterBundleDirectory
public File getMasterBundleDirectory()
-
stage
public void stage(String env, String bundleDir, String bundleName) throws Exception
- Specified by:
stage
in interfaceStagingBundleSource
- Throws:
Exception
-
getBundleFile
public File getBundleFile(String bundleId, String relativeFilePath) throws FileNotFoundException
- Specified by:
getBundleFile
in interfaceStagingBundleSource
- Throws:
FileNotFoundException
-
checkIsValidBundleFile
public boolean checkIsValidBundleFile(String bundleId, String relativeFilePath)
- Specified by:
checkIsValidBundleFile
in interfaceStagingBundleSource
-
-