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 Summary
Modifier and Type Method Description SavedWorkspaceconvertWorkspace(SavedWorkspace workspace, Path destination, boolean isStandalone)Convert the specified workspace togetToVersion().intgetFromVersion()SavedWorkspacegetMostRecentWorkspace(String path)Get the most recent workspace this transcoder understands at the specified path.intgetToVersion()Collection<SavedWorkspace>getWorkspaces(String path, WorkspaceManager.SaveType saveType)Get all of the workspaces this transcoder understands at the specified path.SavedWorkspacetryGetSavedWorkspace(Path path)Try to create a SavedWorkspace at this transcoder version from the specified path.
-
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
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
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 TranscodingExceptionConvert the specified workspace togetToVersion().- Parameters:
workspace- The workspace to convert. Must be atgetFromVersion()destination- The path for writing out the new file, this may be adjusted by the transcoder as necessaryisStandalone- if the console is in standalone mode- Returns:
- A new
SavedWorkspaceat versiongetToVersion() - Throws:
TranscodingException- If there was an error during conversion
-
tryGetSavedWorkspace
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.
-