Class V67Transcoder
java.lang.Object
com.illumon.iris.gui.workspace.compatability.V67Transcoder
- All Implemented Interfaces:
- WorkspaceTranscoder
public class V67Transcoder extends Object
The V7 workspace has a different format for rollup definitions.  This transcoder handles converting them.
- 
Field SummaryFields Modifier and Type Field Description protected com.fishlib.io.logger.Loggerlog
- 
Constructor SummaryConstructors Constructor Description V67Transcoder(com.fishlib.io.logger.Logger log)
- 
Method SummaryModifier and Type Method Description protected voidbackupFiles(WorkspaceManager.Context context)Backs up the workspace under conversion into a folder v3backups in the workspace path in case something goes wrong during conversion.SavedWorkspaceconvertWorkspace(SavedWorkspace workspace, Path destination, boolean isStandalone)Convert the specified workspace toWorkspaceTranscoder.getToVersion().protected voidconvertWorkspace(org.jdom2.Element root, boolean isStandalone)protected PathgetBackupDirectory()intgetFromVersion()SavedWorkspacegetMostRecentWorkspace(String pathStr)Get the most recent workspace this transcoder understands at the specified path.intgetToVersion()Collection<SavedWorkspace>getWorkspaces(String pathStr, 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.
- 
Field Details- 
logprotected final com.fishlib.io.logger.Logger log
 
- 
- 
Constructor Details- 
V67Transcoderpublic V67Transcoder(com.fishlib.io.logger.Logger log)
 
- 
- 
Method Details- 
getBackupDirectory
- 
convertWorkspaceprotected void convertWorkspace(org.jdom2.Element root, boolean isStandalone) throws TranscodingException- Throws:
- TranscodingException
 
- 
getFromVersionpublic int getFromVersion()- Returns:
- The workspace version this transcoder converts from.
 
- 
getToVersionpublic int getToVersion()- Returns:
- The workspace version this transcoder converts to.
 
- 
getMostRecentWorkspaceDescription copied from interface:WorkspaceTranscoderGet the most recent workspace this transcoder understands at the specified path.- Specified by:
- getMostRecentWorkspacein interface- WorkspaceTranscoder
- Parameters:
- pathStr- The path to search in
- Returns:
- The most recent workspace this transcoder understands or null if there are none.
 
- 
getWorkspacespublic Collection<SavedWorkspace> getWorkspaces(String pathStr, WorkspaceManager.SaveType saveType)Description copied from interface:WorkspaceTranscoderGet all of the workspaces this transcoder understands at the specified path.- Specified by:
- getWorkspacesin interface- WorkspaceTranscoder
- Parameters:
- pathStr- The path to search in.
- saveType- The type of workspace save to get
- Returns:
- All of the workspaces this transcoder understands.
 
- 
backupFilesBacks up the workspace under conversion into a folder v3backups in the workspace path in case something goes wrong during conversion.- Parameters:
- context- The context containing the details of the workpsace under conversion.
- Throws:
- IOException- If anything goes wrong with the backup.
 
- 
convertWorkspacepublic SavedWorkspace convertWorkspace(SavedWorkspace workspace, Path destination, boolean isStandalone) throws TranscodingExceptionDescription copied from interface:WorkspaceTranscoderConvert the specified workspace toWorkspaceTranscoder.getToVersion().- Specified by:
- convertWorkspacein interface- WorkspaceTranscoder
- Parameters:
- workspace- The workspace to convert. Must be at- WorkspaceTranscoder.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 SavedWorkspaceat versionWorkspaceTranscoder.getToVersion()
- Throws:
- TranscodingException- If there was an error during conversion
 
- 
tryGetSavedWorkspaceDescription copied from interface:WorkspaceTranscoderTry to create a SavedWorkspace at this transcoder version from the specified path.- Specified by:
- tryGetSavedWorkspacein interface- WorkspaceTranscoder
- Parameters:
- path- The path to the workspace to try to parse
- Returns:
- A SavedWorkspace or null if the workspace couldn't be parsed.
 
 
-