- public Optional<Resource> perform(Resource parent, Path file) {
- return Optional.empty();
+ public Optional<Resource> perform(Resource possibleSelection, Path file) throws Exception {
+ if(possibleSelection != null) {
+ //Make sure the selection is of valid type here
+ return Optional.ofNullable(ExcelImport.importBookR(possibleSelection, file.toFile()));
+ } else {
+ throw new NullPointerException("No selection provided - Cannot import book");
+ }