Interface WorkspaceTranscoder

All Known Implementing Classes:
V01Transcoder, V12Transcoder, V23Transcoder, V34Transcoder, V45Transcoder, V56Transcoder, V67Transcoder

public interface WorkspaceTranscoder
A class that converts workspaces between two distinct versions.
  • Method Details

    • getFromVersion

      int getFromVersion()
      Returns:
      The workspace version this transcoder converts from.
    • getToVersion

      int getToVersion()
      Returns:
      The workspace version this transcoder converts to.
    • getMostRecentWorkspace

      SavedWorkspace getMostRecentWorkspace(String path)
      Get the most recent workspace this transcoder understands at the specified path.
      Parameters:
      path - The path to search in
      Returns:
      The most recent workspace this transcoder understands or null if there are none.
    • getWorkspaces

      Collection<SavedWorkspace> getWorkspaces(String path, WorkspaceManager.SaveType saveType)
      Get all of the workspaces this transcoder understands at the specified path.
      Parameters:
      path - The path to search in.
      saveType - The type of workspace save to get
      Returns:
      All of the workspaces this transcoder understands.
    • convertWorkspace

      SavedWorkspace convertWorkspace(SavedWorkspace workspace, Path destination, boolean isStandalone) throws TranscodingException
      Convert the specified workspace to getToVersion().
      Parameters:
      workspace - The workspace to convert. Must be at getFromVersion()
      destination - The path for writing out the new file, this may be adjusted by the transcoder as necessary
      isStandalone - if the console is in standalone mode
      Returns:
      A new SavedWorkspace at version getToVersion()
      Throws:
      TranscodingException - If there was an error during conversion
    • tryGetSavedWorkspace

      SavedWorkspace tryGetSavedWorkspace(Path path)
      Try to create a SavedWorkspace at this transcoder version from the specified path.
      Parameters:
      path - The path to the workspace to try to parse
      Returns:
      A SavedWorkspace or null if the workspace couldn't be parsed.