Class FlatSubmissionPathPlanner<S extends VilleSubmissionFields>
java.lang.Object
studentrepoloader.filesystem.FlatSubmissionPathPlanner<S>
- Type Parameters:
S
- a subtype ofVilleSubmissionFields
- All Implemented Interfaces:
SubmissionPathPlanner<S>
public class FlatSubmissionPathPlanner<S extends VilleSubmissionFields>
extends Object
implements SubmissionPathPlanner<S>
Strategy that puts all submissions into a single flat directory directly under the root.
Each submission gets its own folder, named according to
VilleSubmission.getFolderName()
.
For example, if the root directory is clones/
, and we have three submissions
with the following folder names:
- zzroot_Root_Rick
- aatest_Test_Annika
- mmnorm_Normal_Nora
clones/ ├── aatest_Test_Annika ├── mmnorm_Normal_Nora └── zzroot_Root_Rick
If two submissions resolve to the same target path, an exception is thrown.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FlatSubmissionPathPlanner
public FlatSubmissionPathPlanner()
-
-
Method Details
-
planPaths
Description copied from interface:SubmissionPathPlanner
Plans directory paths for the given submissions under the specified root directory.- Specified by:
planPaths
in interfaceSubmissionPathPlanner<S extends VilleSubmissionFields>
- Parameters:
submissions
- the list of submissions to organize (assumed sorted as needed)rootDir
- the root directory under which all submission folders will be created (e.g., "clones/")- Returns:
- a map of each submission to its target Path under the root directory
-