public interface IFileStore
Modifier and Type | Method and Description |
---|---|
void |
addUpdate(UpdateResource update)
Add an update request to the set of changes that need to be made as a result of
applying this gramar
|
void |
commit(String comment,
IGramarContext context)
Commit to the file store all pending resource changes
|
void |
configure(Properties properties)
Configure the filestore with values from the given properties file.
|
void |
createFolder(String pathName) |
void |
createProject(String projectName,
String altPath)
Create a target project with the given name.
|
void |
free()
Free any cached resources
|
InputStream |
getFileByteContent(String path)
Retrieve the content of the specified file.
|
Reader |
getFileContent(String path)
Retrieve the content of the specified file.
|
void |
log(String message)
Logs a message in a FileStore-appropriate way
|
void |
reset()
Initialize to prepare for gramar application.
|
boolean |
resourceExists(String path)
Answers a boolean indicating that the resource at the given path exists (true) or
that it does not (false)
|
boolean |
sameBytes(String path,
InputStream stream)
Return whether the file at the given path has the same byte content as the
given input stream.
|
void |
setFileContent(String path,
InputStream stream)
Store the content of the specified file.
|
void |
setFileContent(String path,
Reader reader)
Store the content of the specified file.
|
Reader getFileContent(String path) throws NoSuchResourceException
NoSuchResourceException
void setFileContent(String path, Reader reader) throws NoSuchResourceException, IOException
NoSuchResourceException
IOException
InputStream getFileByteContent(String path) throws NoSuchResourceException
NoSuchResourceException
void setFileContent(String path, InputStream stream) throws NoSuchResourceException, IOException
NoSuchResourceException
IOException
boolean resourceExists(String path)
boolean sameBytes(String path, InputStream stream) throws IOException
path
- stream
- IOException
NoSuchResourceException
void createProject(String projectName, String altPath) throws Exception
Exception
void createFolder(String pathName) throws NoSuchResourceException, IOException
NoSuchResourceException
IOException
void reset()
void commit(String comment, IGramarContext context) throws GramarException
GramarException
void addUpdate(UpdateResource update)
void log(String message)
void free()
void configure(Properties properties) throws GramarException
properties
- GramarException
Copyright © 2015. All rights reserved.