Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CartridgeNode

An implementation of CartridgeNodeInterface

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected _log

_log: loglevel.Logger

name

name: string

Accessors

type

Methods

addChild

  • addChild(child: Node, position?: number): Node
  • Parameters

    • child: Node
    • Optional position: number

    Returns Node

findChild

  • findChild(child: Node): number
  • Parameters

    • child: Node

    Returns number

getChildByName

  • getChildByName(name: string): Node
  • Parameters

    • name: string

    Returns Node

getChildren

  • getChildren(): Node[]
  • Returns Node[]

getData

  • getData(key: string): any
  • Parameters

    • key: string

    Returns any

getLevel

  • getLevel(): number
  • Returns number

getNodeByPath

  • getNodeByPath(path: string, pathSeparator?: string): Bluebird<Node>
  • Parameters

    • path: string
    • Optional pathSeparator: string

    Returns Bluebird<Node>

getNodeByPathArray

  • getNodeByPathArray(pathNodes: Array<string>, absolute: boolean): Bluebird<Node>
  • Parameters

    • pathNodes: Array<string>
    • absolute: boolean

    Returns Bluebird<Node>

getParent

  • getParent(): Node
  • Returns Node

getPath

  • getPath(pathSeparator?: string): Bluebird<string>
  • Parameters

    • Optional pathSeparator: string

    Returns Bluebird<string>

getPathNodes

  • getPathNodes(): Bluebird<Array<Node>>
  • Returns Bluebird<Array<Node>>

getRoot

  • getRoot(): Node
  • Returns Node

isRoot

  • isRoot(): boolean
  • Returns boolean

readContent

  • readContent(): Bluebird<any>

removeChild

  • removeChild(child: Node | number): void
  • Parameters

    • child: Node | number

    Returns void

setData

  • setData(key: string, value: any): Node
  • Parameters

    • key: string
    • value: any

    Returns Node

setParent

  • setParent(node: Node): void
  • Parameters

    • node: Node

    Returns void

toJSON

  • toJSON(): string
  • Returns string

walk

  • walk(direction: Direction | Direction[], action: ActionFunction): Bluebird<void>
  • Parameters

    • direction: Direction | Direction[]
    • action: ActionFunction

    Returns Bluebird<void>

writeContent

  • writeContent(content: any): Bluebird<void>

Generated using TypeDoc