Home Reference Source
import {SharedExportService} from 'cables-shared-api'
public class | source

SharedExportService

Extends:

cables_dev/shared/utils/shared_util.js~SharedUtil → SharedExportService

Static Method Summary

Static Public Methods
public static abstract

getExportOptions(_user: *, _teams: *, _project: *, _exportQuota: *)

public static abstract

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

assetInfos: *[]

public

exportLog: *[]

public

files: {}

public

finalAssetPath: string

public

finalJsPath: string

public

options: {}

public
public get

Method Summary

Public Methods
public

addLog(str: *)

public

addLogError(str: *, level: string)

public

append(content: *, options: *)

public

appendFile(filePath: *, zipFilePath: *, handleAssets: *): *

public abstract

collectFiles(projectId: *, callbackFilesCollected: *, callbackError: *, options: *, next: *)

public abstract

doExport(_projectId: *, cb: *)

public

getName(): *

public

writeFilesToTempDir(fileData: *, finishedCallback: *)

Private Methods
private

_addAssets(proj: *, allFiles: *, options: *)

private

_addBackups(backupProject: *, options: *)

private

_addInfoFiles(proj: *, options: *)

private

_addProjectHtmlCode(proj: *, options: *, libs: *, coreLibs: *, template: string)

private

_addProjectJsCode(proj: *, opsCode: *, libs: *, coreLibs: *, replacedOpIds: *, jsCode: *, options: *): *

private

_addProjectOpCode(usedOps: *, options: *, includeAllOps: boolean): *

private abstract

_doAfterCombine(jsCode: *, options: *): *

called after jsCode has been combined, if selected

private abstract

_doAfterExport(originalProject: *, credentials: *, exportNumber: *): *

called after export finished without error

private

_embeddingDoc(proj: *): *

private

_exportProject(originalProject: *, callbackFilesCollected: *, callbackError: *, options: *, next: *)

private

_getAssetPath(file: *): *

private

_getCoreLibUrls(coreLibs: *): *

private

_getCredits(project: *): *

private

_getDependencyUrls(dependencies: *): *

private abstract

_getFilesForProjects(theProjects: *, options: *, cb: *)

private

_getLibsUrls(libs: *): *

private
private

_getNameForZipEntry(fn: *, allFiles: *): *

private

_getOpExportSubdir(opName: *): *

private

_getPortValueReplacement(filePathAndName: *, fn: *, lzipFileName: *): *

private

_getProjectDependencies(proj: *, options: *, cb: *)

private

_getProjectJson(proj: *, replacedOpIds: *, options: *): *

private

_replaceAssetFilePathes(proj: *, handleAssets: *): *

private

_replaceInString(replacements: *, theString: *): *

private

_resolveFileName(filePathAndName: *, pathStr: *, project: *): *

Static Public Methods

public static abstract getExportOptions(_user: *, _teams: *, _project: *, _exportQuota: *) source

Params:

NameTypeAttributeDescription
_user *
_teams *
_project *
_exportQuota *

public static abstract getName() source

Public Constructors

public constructor() source

Public Members

public assetInfos: *[] source

public exportLog: *[] source

public files: {} source

public finalAssetPath: string source

public finalJsPath: string source

public options: {} source

public startTimeExport: * source

public get utilName: * source

Public Methods

public addLog(str: *) source

Params:

NameTypeAttributeDescription
str *

public addLogError(str: *, level: string) source

Params:

NameTypeAttributeDescription
str *
level string
  • optional
  • default: error

public append(content: *, options: *) source

Params:

NameTypeAttributeDescription
content *
options *

public appendFile(filePath: *, zipFilePath: *, handleAssets: *): * source

Params:

NameTypeAttributeDescription
filePath *
zipFilePath *
handleAssets *

Return:

*

public abstract collectFiles(projectId: *, callbackFilesCollected: *, callbackError: *, options: *, next: *) source

Params:

NameTypeAttributeDescription
projectId *
callbackFilesCollected *
callbackError *
options *
next *

public abstract doExport(_projectId: *, cb: *) source

Params:

NameTypeAttributeDescription
_projectId *
cb *

public getName(): * source

Return:

*

public writeFilesToTempDir(fileData: *, finishedCallback: *) source

Params:

NameTypeAttributeDescription
fileData *
finishedCallback *

Private Methods

private _addAssets(proj: *, allFiles: *, options: *) source

Params:

NameTypeAttributeDescription
proj *
allFiles *
options *

private _addBackups(backupProject: *, options: *) source

Params:

NameTypeAttributeDescription
backupProject *
options *

private _addInfoFiles(proj: *, options: *) source

Params:

NameTypeAttributeDescription
proj *
options *

private _addProjectHtmlCode(proj: *, options: *, libs: *, coreLibs: *, template: string) source

Params:

NameTypeAttributeDescription
proj *
options *
libs *
coreLibs *
template string
  • optional
  • default: /patchview/patchview_export.html

private _addProjectJsCode(proj: *, opsCode: *, libs: *, coreLibs: *, replacedOpIds: *, jsCode: *, options: *): * source

Params:

NameTypeAttributeDescription
proj *
opsCode *
libs *
coreLibs *
replacedOpIds *
jsCode *
options *

Return:

*

private _addProjectOpCode(usedOps: *, options: *, includeAllOps: boolean): * source

Params:

NameTypeAttributeDescription
usedOps *
options *
includeAllOps boolean
  • optional
  • default: false

Return:

*

private abstract _doAfterCombine(jsCode: *, options: *): * source

called after jsCode has been combined, if selected

Params:

NameTypeAttributeDescription
jsCode *
options *

Return:

*

jsCode

private abstract _doAfterExport(originalProject: *, credentials: *, exportNumber: *): * source

called after export finished without error

Params:

NameTypeAttributeDescription
originalProject *
credentials *
exportNumber *

Return:

*

originalProject

private _embeddingDoc(proj: *): * source

Params:

NameTypeAttributeDescription
proj *

Return:

*

private _exportProject(originalProject: *, callbackFilesCollected: *, callbackError: *, options: *, next: *) source

Params:

NameTypeAttributeDescription
originalProject *
callbackFilesCollected *
callbackError *
options *
next *

private _getAssetPath(file: *): * source

Params:

NameTypeAttributeDescription
file *

Return:

*

private _getCoreLibUrls(coreLibs: *): * source

Params:

NameTypeAttributeDescription
coreLibs *

Return:

*

private _getCredits(project: *): * source

Params:

NameTypeAttributeDescription
project *

Return:

*

private _getDependencyUrls(dependencies: *): * source

Params:

NameTypeAttributeDescription
dependencies *

Return:

*

private abstract _getFilesForProjects(theProjects: *, options: *, cb: *) source

Params:

NameTypeAttributeDescription
theProjects *
options *
cb *

private _getLibsUrls(libs: *): * source

Params:

NameTypeAttributeDescription
libs *

Return:

*

private _getLicence(): * source

Return:

*

private _getNameForZipEntry(fn: *, allFiles: *): * source

Params:

NameTypeAttributeDescription
fn *
allFiles *

Return:

*

private _getOpExportSubdir(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

private _getPortValueReplacement(filePathAndName: *, fn: *, lzipFileName: *): * source

Params:

NameTypeAttributeDescription
filePathAndName *
fn *
lzipFileName *

Return:

*

private _getProjectDependencies(proj: *, options: *, cb: *) source

Params:

NameTypeAttributeDescription
proj *
options *
cb *

private _getProjectJson(proj: *, replacedOpIds: *, options: *): * source

Params:

NameTypeAttributeDescription
proj *
replacedOpIds *
options *

Return:

*

private _replaceAssetFilePathes(proj: *, handleAssets: *): * source

Params:

NameTypeAttributeDescription
proj *
handleAssets *

Return:

*

private _replaceInString(replacements: *, theString: *): * source

Params:

NameTypeAttributeDescription
replacements *
theString *

Return:

*

private _resolveFileName(filePathAndName: *, pathStr: *, project: *): * source

Params:

NameTypeAttributeDescription
filePathAndName *
pathStr *
project *

Return:

*