-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/move leva doc cache temporal (#92)
* uniform chache and add cache to tempoFolder
- Loading branch information
Showing
36 changed files
with
65 additions
and
2,541 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ct/data/StartupApplicationListener.groovy → ...doc/gen/StartupApplicationListener.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 10 additions & 2 deletions
12
src/main/groovy/org/ods/doc/gen/core/FileSystemHelper.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
package org.ods.doc.gen.core | ||
|
||
import groovy.io.FileType | ||
import groovy.util.logging.Slf4j | ||
import org.springframework.cache.annotation.Cacheable | ||
import org.springframework.stereotype.Service | ||
|
||
import java.nio.file.Files | ||
import java.nio.file.Path | ||
|
||
@Slf4j | ||
@Service | ||
class FileSystemHelper { | ||
|
||
@Cacheable(value = "temporalFolder", key = '#id') | ||
Path createTempDirectory(String id){ | ||
return Files.createTempDirectory(id) | ||
} | ||
|
||
List<File> loadFilesFromPath(String path, String fileExtension) { | ||
def result = [] | ||
try { | ||
new File(path).traverse(nameFilter: ~/.*\.${fileExtension}$/, type: groovy.io.FileType.FILES) { file -> | ||
new File(path).traverse(nameFilter: ~/.*\.${fileExtension}$/, type: FileType.FILES) { file -> | ||
result << file | ||
} | ||
} catch (FileNotFoundException e) {} | ||
} catch (FileNotFoundException e) { | ||
log.warn("No file of type ${fileExtension}, found here:${path}") | ||
} | ||
|
||
return result | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
src/main/groovy/org/ods/doc/gen/leva/doc/services/DocumentHistoryEntry.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 3 additions & 5 deletions
8
src/main/groovy/org/ods/doc/gen/pdf/builder/repository/DocumentTemplatesRepository.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
src/main/groovy/org/ods/doc/gen/project/data/ReleaseManagerRepo.groovy
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.