public class ExtendedWorkspaceDocumentManagerImpl extends 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 ExtendedWorkspaceDocumentManagerImpl |
getInstance() |
boolean |
isExplicitMode() |
boolean |
isFileOpen(Path filePath)
Checks whether the given file is open in workspace.
|
Optional<Lock> |
lockWriteAndEnableExplicitMode(Path tempFile)
Enables explicit mode.
|
void |
openFile(Path filePath,
String content)
Opens the given file in document manager.
|
void |
unlockWriteAndDisableExplicitMode(Lock lock)
Disables explicit mode.
|
void |
updateFile(Path filePath,
String updatedContent)
Updates given file in document manager with new content.
|
lockFilepublic static ExtendedWorkspaceDocumentManagerImpl getInstance()
public boolean isFileOpen(Path filePath)
WorkspaceDocumentManagerisFileOpen in interface WorkspaceDocumentManagerisFileOpen in class WorkspaceDocumentManagerImplfilePath - Path of the filepublic void openFile(Path filePath, String content)
WorkspaceDocumentManageropenFile in interface WorkspaceDocumentManageropenFile in class WorkspaceDocumentManagerImplfilePath - Path of the filecontent - Content of the filepublic void updateFile(Path filePath, String updatedContent)
WorkspaceDocumentManagerupdateFile in interface WorkspaceDocumentManagerupdateFile in class WorkspaceDocumentManagerImplfilePath - Path of the fileupdatedContent - New content of the filepublic void closeFile(Path filePath)
WorkspaceDocumentManagercloseFile in interface WorkspaceDocumentManagercloseFile in class WorkspaceDocumentManagerImplfilePath - Path of the filepublic String getFileContent(Path filePath)
WorkspaceDocumentManagergetFileContent in interface WorkspaceDocumentManagergetFileContent in class WorkspaceDocumentManagerImplfilePath - Path of the filepublic boolean isExplicitMode()
public Optional<Lock> lockWriteAndEnableExplicitMode(Path tempFile)
tempFile - temp file pathpublic void unlockWriteAndDisableExplicitMode(Lock lock)
lock - Copyright © 2018 WSO2. All rights reserved.