Class DefaultWorkspaceManager

  • All Implemented Interfaces:
    WorkspaceManager

    public class DefaultWorkspaceManager
    extends LoggingObject
    implements WorkspaceManager
    Default implementation that uses the ML Java Client API to manage workspaces. By default, workspaces will be exported and imported to/from ~/.qconsole/workspaces/(ML username). This can be overridden by calling setBaseDir.
    • Constructor Detail

      • DefaultWorkspaceManager

        public DefaultWorkspaceManager​(com.marklogic.client.DatabaseClient client)
    • Method Detail

      • exportWorkspaces

        public java.util.List<java.io.File> exportWorkspaces​(java.lang.String user,
                                                             java.lang.String... workspaceNames)
        Specified by:
        exportWorkspaces in interface WorkspaceManager
        Returns:
        a list of files that workspaces for the given user were exported to
      • importWorkspaces

        public java.util.List<java.io.File> importWorkspaces​(java.lang.String user,
                                                             java.lang.String... workspaceNames)
        Specified by:
        importWorkspaces in interface WorkspaceManager
        Returns:
        a list of files that workspaces for the given user were imported from
      • determineImportScriptToUse

        protected java.lang.String determineImportScriptToUse()
      • getDefaultWorkspacesDir

        protected java.io.File getDefaultWorkspacesDir()
        Returns:
        defaults to ~/.qconsole/workspaces
      • setBaseDir

        public void setBaseDir​(java.io.File baseDir)