Home Reference Source
public class | source

OpsUtil

You can directly use an instance of this class. opsUtil

Extends:

cables-shared-api~SharedOpsUtil → OpsUtil

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

Method Summary

Public Methods
public

addPermissionsToOps(opDocs: *, user: *, teams: *[], project: undefined): *

public

getOpAbsolutePath(opName: *): *

public

getOpAssetPorts(op: *, includeLibraryAssets: boolean): *

public

getOpNameByAbsoluteFileName(fileName: *): string

public

getOpNpmPackages(opName: *): *

public

getOpRenameConsequences(newName: *, oldName: *, targetDir: undefined): *[]

public

getOpRenameProblems(newName: *, oldName: *, userObj: *, teams: *[], newOpProject: undefined, oldOpProject: undefined, opUsages: *[], checkUsages: boolean, targetDir: undefined): *

public

getOpSourceDir(opName: *, relative: boolean): *

public

getOpSourceNoHierarchy(opName: *, relative: boolean): *

public

getOpTargetDir(opName: *, relative: boolean): *

public

getPatchOpNamespace(opName: *): *

public
public

isCoreOp(opName: *): *

public

renameToCoreOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): *

public

renameToExtensionOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): *

public

renameToPatchOp(oldName: *, newName: *, currentUser: *, removeOld: *, newId: *, cb: undefined): *

public

renameToTeamOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): *

public

renameToUserOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): *

public

updateOpCode(opName: *, author: *, code: *): *

public

userHasWriteRightsOp(user: *, opName: *, teams: *[], project: undefined): boolean

public

validateAndFormatOpCode(code: *): {"formatedCode": *, "error": *, "message": *}

Public Constructors

public constructor() source

Public Members

public PREFIX_LOCAL_OPS: string source

Public Methods

public addPermissionsToOps(opDocs: *, user: *, teams: *[], project: undefined): * source

Params:

NameTypeAttributeDescription
opDocs *
user *
teams *[]
  • optional
  • default: []
project undefined
  • optional
  • default: undefined

Return:

*

public getOpAbsolutePath(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getOpAssetPorts(op: *, includeLibraryAssets: boolean): * source

Params:

NameTypeAttributeDescription
op *
includeLibraryAssets boolean
  • optional
  • default: false

Return:

*

public getOpNameByAbsoluteFileName(fileName: *): string source

Params:

NameTypeAttributeDescription
fileName *

Return:

string

public getOpNpmPackages(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getOpRenameConsequences(newName: *, oldName: *, targetDir: undefined): *[] source

Params:

NameTypeAttributeDescription
newName *
oldName *
targetDir undefined
  • optional
  • default: undefined

Return:

*[]

public getOpRenameProblems(newName: *, oldName: *, userObj: *, teams: *[], newOpProject: undefined, oldOpProject: undefined, opUsages: *[], checkUsages: boolean, targetDir: undefined): * source

Params:

NameTypeAttributeDescription
newName *
oldName *
userObj *
teams *[]
  • optional
  • default: []
newOpProject undefined
  • optional
  • default: undefined
oldOpProject undefined
  • optional
  • default: undefined
opUsages *[]
  • optional
  • default: []
checkUsages boolean
  • optional
  • default: true
targetDir undefined
  • optional
  • default: undefined

Return:

*

public getOpSourceDir(opName: *, relative: boolean): * source

Params:

NameTypeAttributeDescription
opName *
relative boolean
  • optional
  • default: false

Return:

*

public getOpSourceNoHierarchy(opName: *, relative: boolean): * source

Params:

NameTypeAttributeDescription
opName *
relative boolean
  • optional
  • default: false

Return:

*

public getOpTargetDir(opName: *, relative: boolean): * source

Params:

NameTypeAttributeDescription
opName *
relative boolean
  • optional
  • default: false

Return:

*

public getPatchOpNamespace(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public getPatchOpsNamespaceForProject(proj: *): * source

Params:

NameTypeAttributeDescription
proj *

Return:

*

public isCoreOp(opName: *): * source

Params:

NameTypeAttributeDescription
opName *

Return:

*

public renameToCoreOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): * source

Params:

NameTypeAttributeDescription
oldName *
newName *
currentUser *
removeOld *
cb undefined
  • optional
  • default: undefined

Return:

*

public renameToExtensionOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): * source

Params:

NameTypeAttributeDescription
oldName *
newName *
currentUser *
removeOld *
cb undefined
  • optional
  • default: undefined

Return:

*

public renameToPatchOp(oldName: *, newName: *, currentUser: *, removeOld: *, newId: *, cb: undefined): * source

Params:

NameTypeAttributeDescription
oldName *
newName *
currentUser *
removeOld *
newId *
cb undefined
  • optional
  • default: undefined

Return:

*

public renameToTeamOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): * source

Params:

NameTypeAttributeDescription
oldName *
newName *
currentUser *
removeOld *
cb undefined
  • optional
  • default: undefined

Return:

*

public renameToUserOp(oldName: *, newName: *, currentUser: *, removeOld: *, cb: undefined): * source

Params:

NameTypeAttributeDescription
oldName *
newName *
currentUser *
removeOld *
cb undefined
  • optional
  • default: undefined

Return:

*

public updateOpCode(opName: *, author: *, code: *): * source

Params:

NameTypeAttributeDescription
opName *
author *
code *

Return:

*

public userHasWriteRightsOp(user: *, opName: *, teams: *[], project: undefined): boolean source

Params:

NameTypeAttributeDescription
user *
opName *
teams *[]
  • optional
  • default: []
project undefined
  • optional
  • default: undefined

Return:

boolean

public validateAndFormatOpCode(code: *): {"formatedCode": *, "error": *, "message": *} source

Params:

NameTypeAttributeDescription
code *

Return:

{"formatedCode": *, "error": *, "message": *}