public class WorkspaceDocumentManagerImpl extends Object implements WorkspaceDocumentManager
| Modifier | Constructor and Description |
|---|---|
protected |
WorkspaceDocumentManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
closeFile(Path filePath)
Close the given file in document manager.
|
String |
getFileContent(Path filePath)
Gets uptodate content of the file.
|
static WorkspaceDocumentManagerImpl |
getInstance() |
boolean |
isFileOpen(Path filePath)
Checks whether the given file is open in workspace.
|
Optional<Lock> |
lockFile(Path filePath)
Acquire a file lock.
|
void |
openFile(Path filePath,
String content)
Opens the given file in document manager.
|
void |
updateFile(Path filePath,
String updatedContent)
Updates given file in document manager with new content.
|
public static WorkspaceDocumentManagerImpl getInstance()
public boolean isFileOpen(Path filePath)
WorkspaceDocumentManagerisFileOpen in interface WorkspaceDocumentManagerfilePath - Path of the filepublic void openFile(Path filePath, String content)
WorkspaceDocumentManageropenFile in interface WorkspaceDocumentManagerfilePath - Path of the filecontent - Content of the filepublic void updateFile(Path filePath, String updatedContent)
WorkspaceDocumentManagerupdateFile in interface WorkspaceDocumentManagerfilePath - Path of the fileupdatedContent - New content of the filepublic void closeFile(Path filePath)
WorkspaceDocumentManagercloseFile in interface WorkspaceDocumentManagerfilePath - Path of the filepublic String getFileContent(Path filePath)
WorkspaceDocumentManagergetFileContent in interface WorkspaceDocumentManagerfilePath - Path of the filepublic Optional<Lock> lockFile(Path filePath)
WorkspaceDocumentManagerlockFile in interface WorkspaceDocumentManagerfilePath - Path of the fileCopyright © 2018 WSO2. All rights reserved.