Skip to main content

Package

Represents a package, which is a unit of distribution of content in the Datagrok platform.

Extends

Constructors

new Package()

new Package(dart): Package

Parameters

ParameterTypeDefault value
dartanyundefined

Returns

Package

Overrides

Entity . constructor

Source

src/entities.ts:1001

Properties

PropertyModifierTypeDefault valueInherited from
_filesprivatenull | FileSourcenull-
_logger?privatePackageLoggerundefined-
_nameprivatestring''-
_versionpublicstring''-
_webRootpublicundefined | stringundefined-
dartpublicanyundefinedEntity.dart

Accessors

author

get author(): User

Who created entity *

Returns

User

Source

src/entities.ts:108


createdOn

get createdOn(): Dayjs

Time when entity was created *

Returns

Dayjs

Source

src/entities.ts:99


files

get files(): FileSource

Global application data

Returns

FileSource

Source

src/entities.ts:1123


friendlyName

get friendlyName(): string

Entity friendly name

set friendlyName(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities.ts:85


id

get id(): string

Entity ID (GUID)

set id(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities.ts:77


logger

get logger(): PackageLogger

Returns

PackageLogger

Source

src/entities.ts:1091


meta

get meta(): object

Returns metadata associated with the package. The metadata gets generated when the package is built. It is a concatenation of JSON files located under the /meta folder. See example: /packages/PowerPack.

Returns

object

Source

src/entities.ts:1080


name

get name(): string

Package short name

set name(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities.ts:1043


nqName

get nqName(): string

Entity full-qualified name

Returns

string

Source

src/entities.ts:93


path

get path(): string

Entity path

Returns

string

Source

src/entities.ts:96


updatedOn

get updatedOn(): null | Dayjs

Time when entity was updated *

Returns

null | Dayjs

Source

src/entities.ts:102


version

get version(): string

set version(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities.ts:1028


webRoot

get webRoot(): string

set webRoot(x): void

Parameters

ParameterType
xstring

Returns

string

Source

src/entities.ts:1017

Methods

getCredentials()

getCredentials(): Promise <Credentials>

Returns credentials for package.

Returns

Promise <Credentials>

Source

src/entities.ts:1098


getIconUrl()

getIconUrl(): string

Returns

string

Source

src/entities.ts:1064


getModule()

getModule(file): any

Returns a JavaScript module for this package.

Parameters

ParameterType
filestring

Returns

any

Source

src/entities.ts:1069


getModuleName()

getModuleName(file): string

Parameters

ParameterType
filestring

Returns

string

Source

src/entities.ts:1057


getProperties()

getProperties(): Promise<any>

Deprecated. Use getSettings instead. Returns properties for a package.

Returns

Promise<any>

Overrides

Entity . getProperties

Source

src/entities.ts:1106


getSettings()

getSettings(): Promise<any>

Returns settings for a package.

Returns

Promise<any>

Source

src/entities.ts:1111


hasTag()

hasTag(tag): boolean

Parameters

ParameterType
tagstring

Returns

boolean

Inherited from

Entity . hasTag

Source

src/entities.ts:123


init()

init(): Promise<null>

Override init() method to provide package-specific initialization. It is guaranteed to get called exactly once before the execution of any function below.

Returns

Promise<null>

Source

src/entities.ts:1013


load()

load(options?): Promise <Package>

Loads package.

Parameters

ParameterType
options?object
options.file?string

Returns

Promise <Package>

Source

src/entities.ts:1085


newId()

newId(): void

Generates new id for this entity.

Returns

void

Inherited from

Entity . newId

Source

src/entities.ts:81


setProperties()

setProperties(props): Promise<any>

Sets entity properties

Parameters

ParameterType
propsobject

Returns

Promise<any>

Inherited from

Entity . setProperties

Source

src/entities.ts:116


setSettings()

setSettings(props, group): Promise<void>

Updates settings for a package.

Parameters

ParameterType
propsMap<string, any>
groupGroup

Returns

Promise<void>

Source

src/entities.ts:1116


tag()

tag(tag): boolean

Adds a specified tag

Parameters

ParameterType
tagstring

Returns

boolean

Inherited from

Entity . tag

Source

src/entities.ts:126


toString()

toString(): string

Returns a string representing the object

Returns

string

Inherited from

Entity . toString

Source

src/entities.ts:121


unTag()

unTag(tag): boolean

Removes a specified tag

Parameters

ParameterType
tagstring

Returns

boolean

Inherited from

Entity . unTag

Source

src/entities.ts:129