ProjectManager

Yanru MuAbout 2 min

ProjectManager

CreateProject(projectName)

Return: Project

Creates and returns a project if projectName (text) is unique, and None if it is not.

DeleteProject(projectName)

Return: Bool

Delete project in the current folder if not currently loaded

LoadProject(projectName)

Return: Project

Loads and returns the project with name = projectName (text) if there is a match found, and None if there is no matching Project.

GetCurrentProject()

Return: Project

Returns the currently loaded Resolve project.

SaveProject()

Return: Bool

Saves the currently loaded project with its own name. Returns True if successful.

CloseProject(project)

Return: Bool

Closes the specified project without saving.

CreateFolder(folderName)

Return: Bool

Creates a folder if folderName (text) is unique.

DeleteFolder(folderName)

Return: Bool

Deletes the specified folder if it exists. Returns True in case of success.

GetProjectListInCurrentFolder()

Return: [project names...]

Returns an array of project names in current folder.

Note

Old version GetProjectsInCurrentFolder() Deprecated

GetFolderListInCurrentFolder()

Return: [folder names...]

Returns an array of folder names in current folder.

Note

Old version GetFoldersInCurrentFolder() Deprecated

GotoRootFolder()

Return: Bool

Opens root folder in database.

GotoParentFolder()

Return: Bool

Opens parent folder of current folder in database if current folder has parent.

GetCurrentFolder()

Return: string

Returns the current folder name.

OpenFolder(folderName)

Return: Bool

Opens folder under given name.

ImportProject(filePath)

Return: Bool

Imports a project under given file path. Returns true in case of success.

ExportProject(projectName, filePath)

Return: Bool

Exports a project based on given name into provided file path. Returns true in case of success.

RestoreProject(filePath)

Return: Bool

Restores a project under given backup file path. Returns true in case of success.

GetCurrentDatabase()

Return: {dbInfo}

Returns a dictionary (with keys 'DbType', 'DbName' and optional 'IpAddress') corresponding to the current database connection

GetDatabaseList()

Return: [{dbInfo}]

Returns a list of dictionary items (with keys 'DbType', 'DbName' and optional 'IpAddress') corresponding to all the databases added to Resolve

SetCurrentDatabase({dbInfo})

Return: Bool

Switches current database connection to the database specified by the keys below, and closes any open project.

  • 'DbType': 'Disk' or 'PostgreSQL' (string)
  • 'DbName': database name (string)
  • 'IpAddress': IP address of the PostgreSQL server (string, optional key - defaults to '127.0.0.1')
Last update:
Contributors: muyanru