Class LocalRepositoryDao

java.lang.Object
org.eclipse.dirigible.repository.local.LocalRepositoryDao

public class LocalRepositoryDao
extends Object
The Local Repository Dao.
  • Constructor Details

  • Method Details

    • getRepository

      public FileSystemRepository getRepository()
      Gets the repository.
      Returns:
      the repository
    • createFile

      public void createFile​(String path, byte[] content, boolean isBinary, String contentType) throws LocalRepositoryException
      Creates the file.
      Parameters:
      path - the path
      content - the content
      isBinary - the is binary
      contentType - the content type
      Throws:
      LocalRepositoryException - the local repository exception
    • checkInitialized

      public void checkInitialized()
      Check initialized.
    • setFileContent

      public void setFileContent​(LocalFile localFile, byte[] content)
      Sets the file content.
      Parameters:
      localFile - the local file
      content - the content
    • getFileContent

      public byte[] getFileContent​(LocalFile localFile)
      Gets the file content.
      Parameters:
      localFile - the local file
      Returns:
      the file content
    • renameFile

      public void renameFile​(String path, String newPath)
      Rename file.
      Parameters:
      path - the path
      newPath - the new path
    • copyFile

      public void copyFile​(String path, String newPath)
      Copy file.
      Parameters:
      path - the path
      newPath - the new path
    • removeFileByPath

      public void removeFileByPath​(String path)
      Removes the file by path.
      Parameters:
      path - the path
    • removeFolderByPath

      public void removeFolderByPath​(String path)
      Removes the folder by path.
      Parameters:
      path - the path
    • createFolder

      public void createFolder​(String normalizePath)
      Creates the folder.
      Parameters:
      normalizePath - the normalize path
    • renameFolder

      public void renameFolder​(String path, String newPath)
      Rename folder.
      Parameters:
      path - the path
      newPath - the new path
    • copyFolder

      public void copyFolder​(String path, String newPath)
      Copy folder.
      Parameters:
      path - the path
      newPath - the new path
    • getObjectByPath

      public LocalObject getObjectByPath​(String path)
      Gets the object by path.
      Parameters:
      path - the path
      Returns:
      the object by path
    • getChildrenByFolder

      public List<LocalObject> getChildrenByFolder​(String path)
      Gets the children by folder.
      Parameters:
      path - the path
      Returns:
      the children by folder
    • fileExists

      public boolean fileExists​(String path)
      Check whether the file exists.
      Parameters:
      path - the path
      Returns:
      true if exists
    • directoryExists

      public boolean directoryExists​(String path)
      Check whether the directory exists.
      Parameters:
      path - the path
      Returns:
      true if exists