Class SchemaFileManifest
- java.lang.Object
-
- io.github.deweyjose.graphqlcodegen.SchemaFileManifest
-
public class SchemaFileManifest extends Object
-
-
Constructor Summary
Constructors Constructor Description SchemaFileManifest(File manifestPath)SchemaFileManifest(Set<File> files, File manifestPath)Manifest constructor loads the properties file into memory.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Set<File>findGraphQLSFiles(File directory)Traverse the directory structure collecting .graphql(s) files.static StringgenerateChecksum(File path)Set<File>getChangedFiles()Computes the Set of files that have changed or are new and need to trigger code generation.static booleanisGraphqlFile(File file)We only care about files ending with .graphql(s)static PropertiesloadManifest(File manifestPath)voidsetFiles(Set<File> files)voidsyncManifest()Clear the old manifest, compute new checksums for each file and save the properties file.
-
-
-
Constructor Detail
-
SchemaFileManifest
public SchemaFileManifest(Set<File> files, File manifestPath)
Manifest constructor loads the properties file into memory. The properties file has a property for each path with the previous known checksum.- Parameters:
files-manifestPath-
-
SchemaFileManifest
public SchemaFileManifest(File manifestPath)
-
-
Method Detail
-
getChangedFiles
public Set<File> getChangedFiles()
Computes the Set of files that have changed or are new and need to trigger code generation.- Returns:
- Set
-
syncManifest
public void syncManifest()
Clear the old manifest, compute new checksums for each file and save the properties file.
-
loadManifest
public static Properties loadManifest(File manifestPath)
-
isGraphqlFile
public static boolean isGraphqlFile(File file)
We only care about files ending with .graphql(s)- Parameters:
file-- Returns:
- boolean
-
-