Home Reference Source
public class | source

ProjectsUtil

You can directly use an instance of this class. projectsUtil

Extends:

cables-shared-api~SharedProjectsUtil → ProjectsUtil

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
Private Members
private
private

Method Summary

Public Methods
public

addOpDir(project: *, opDir: *, atTop: boolean): *

public

generateNewProject(owner: *): {"_id": *, "shortId": *, "name": *, "description": *, "userId": *, "cachedUsername": *, "created": *, "updated": *, "visibility": string, "ops": *, "settings": *, "userList": *, "teams": *, "log": *}

public
public

getAssetPath(projectId: *): *

public

getAssetPathUrl(projectId: *): string

public

getNewProjectName(randomize: boolean): string

public

getOpDirs(currentProject: *): *

public

getOpDocsInProjectDirs(project: *, rebuildCache: boolean): *

public

getProjectFileName(project: *): *

public

getProjectOpDirs(project: *, includeOsDir: boolean, reverse: boolean, addLocalCoreIfPackaged: boolean): *

public

getScreenShotFileName(proj: *, ext: *): *

public

getScreenShotPath(pId: *): *

public

getSummary(project: *): {"allowEdit": boolean, "title": *, "owner": *, "description": *, "licence": *}

public

getUsedAssetFilenames(project: *, includeLibraryAssets: boolean): *

public
public
public

removeOpDir(project: *, opDir: *): *

public

reorderOpDirs(currentProject: *, order: *): *

public

writeProjectToFile(projectFile: *, project: undefined, patch: undefined)

Public Constructors

public constructor() source

Public Members

public CABLES_PROJECT_FILE_EXTENSION: string source

Private Members

private _dirInfos: * source

private _projectOpDocs: * source

Public Methods

public addOpDir(project: *, opDir: *, atTop: boolean): * source

Params:

NameTypeAttributeDescription
project *
opDir *
atTop boolean
  • optional
  • default: false

Return:

*

public generateNewProject(owner: *): {"_id": *, "shortId": *, "name": *, "description": *, "userId": *, "cachedUsername": *, "created": *, "updated": *, "visibility": string, "ops": *, "settings": *, "userList": *, "teams": *, "log": *} source

Params:

NameTypeAttributeDescription
owner *

Return:

{"_id": *, "shortId": *, "name": *, "description": *, "userId": *, "cachedUsername": *, "created": *, "updated": *, "visibility": string, "ops": *, "settings": *, "userList": *, "teams": *, "log": *}

public getAbsoluteOpDirFromHierarchy(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getAssetPath(projectId: *): * source

Params:

NameTypeAttributeDescription
projectId *

Return:

*

public getAssetPathUrl(projectId: *): string source

Params:

NameTypeAttributeDescription
projectId *

Return:

string

public getNewProjectName(randomize: boolean): string source

Params:

NameTypeAttributeDescription
randomize boolean
  • optional
  • default: false

Return:

string

public getOpDirs(currentProject: *): * source

Params:

NameTypeAttributeDescription
currentProject *

Return:

*

public getOpDocsInProjectDirs(project: *, rebuildCache: boolean): * source

Params:

NameTypeAttributeDescription
project *
rebuildCache boolean
  • optional
  • default: false

Return:

*

public getProjectFileName(project: *): * source

Params:

NameTypeAttributeDescription
project *

Return:

*

public getProjectOpDirs(project: *, includeOsDir: boolean, reverse: boolean, addLocalCoreIfPackaged: boolean): * source

Params:

NameTypeAttributeDescription
project *
includeOsDir boolean
  • optional
  • default: true
reverse boolean
  • optional
  • default: false
addLocalCoreIfPackaged boolean
  • optional
  • default: true

Return:

*

public getScreenShotFileName(proj: *, ext: *): * source

Params:

NameTypeAttributeDescription
proj *
ext *

Return:

*

public getScreenShotPath(pId: *): * source

Params:

NameTypeAttributeDescription
pId *

Return:

*

public getSummary(project: *): {"allowEdit": boolean, "title": *, "owner": *, "description": *, "licence": *} source

Params:

NameTypeAttributeDescription
project *

Return:

{"allowEdit": boolean, "title": *, "owner": *, "description": *, "licence": *}

public getUsedAssetFilenames(project: *, includeLibraryAssets: boolean): * source

Params:

NameTypeAttributeDescription
project *
includeLibraryAssets boolean
  • optional
  • default: false

Return:

*

public invalidateProjectCaches() source

public isFixedPositionOpDir(dir: *): * source

Params:

NameTypeAttributeDescription
dir *

Return:

*

public removeOpDir(project: *, opDir: *): * source

Params:

NameTypeAttributeDescription
project *
opDir *

Return:

*

public reorderOpDirs(currentProject: *, order: *): * source

Params:

NameTypeAttributeDescription
currentProject *
order *

Return:

*

public writeProjectToFile(projectFile: *, project: undefined, patch: undefined) source

Params:

NameTypeAttributeDescription
projectFile *
project undefined
  • optional
  • default: undefined
patch undefined
  • optional
  • default: undefined