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
| Parameter | Type | Default value |
|---|---|---|
dart | any | undefined |
Returns
Overrides
Source
Properties
| Property | Modifier | Type | Default value | Inherited from |
|---|---|---|---|---|
_logger? | private | PackageLogger | undefined | - |
_name | private | string | '' | - |
_version | public | string | '' | - |
_webRoot | public | undefined | string | undefined | - |
dart | public | any | undefined | Entity.dart |
Accessors
author
getauthor():User
Who created entity *
Returns
Source
createdOn
getcreatedOn():Dayjs
Time when entity was created *
Returns
Dayjs
Source
files
getfiles():FileSource
Global application data
Returns
Source
friendlyName
getfriendlyName():string
Entity friendly name
setfriendlyName(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
id
getid():string
Entity ID (GUID)
setid(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
logger
getlogger():PackageLogger
Returns
Source
meta
getmeta():null|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
null | object
Source
name
getname():string
Package short name
setname(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
nqName
getnqName():string
Entity full-qualified name
Returns
string
Source
packageOwner
getpackageOwner():string
Returns
string
Source
path
getpath():string
Entity path
Returns
string
Source
settings
getsettings():object
Returns settings for a package.
Returns
object
Source
updatedOn
getupdatedOn():null|Dayjs
Time when entity was updated *
Returns
null | Dayjs
Source
version
getversion():string
setversion(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
webRoot
getwebRoot():string
setwebRoot(x):void
Parameters
| Parameter | Type |
|---|---|
x | string |
Returns
string
Source
Methods
getCredentials()
getCredentials():
Promise<Credentials>
Returns credentials for package.
Returns
Promise <Credentials>
Source
getIconUrl()
getIconUrl():
string
Returns
string
Source
getModule()
getModule(
file):any
Returns a JavaScript module for this package.
Parameters
| Parameter | Type |
|---|---|
file | string |
Returns
any
Source
getModuleName()
getModuleName(
file):string
Parameters
| Parameter | Type |
|---|---|
file | string |
Returns
string
Source
getProperties()
getProperties():
Promise<any>
Returns
Promise<any>
Overrides
Deprecated
The getProperties should not be used. Use settings instead
Source
getSettings()
getSettings():
Promise<Map<string,any>>
Returns
Promise<Map<string, any>>
Deprecated
The getSettings should not be used. Use settings instead
Source
getTests()
getTests(
core):Promise<any>
Parameters
| Parameter | Type | Default value |
|---|---|---|
core | boolean | false |
Returns
Promise<any>
Source
hasTag()
hasTag(
tag):boolean
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
Source
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
load()
load(
options?):Promise<Package>
Loads package.
Parameters
| Parameter | Type |
|---|---|
options? | object |
options.file? | string |
Returns
Promise <Package>
Source
newId()
newId():
void
Generates new id for this entity.
Returns
void
Inherited from
Source
setProperties()
setProperties(
props):Promise<any>
Sets entity properties
Parameters
| Parameter | Type |
|---|---|
props | object |
Returns
Promise<any>
Inherited from
Source
setSettings()
setSettings(
props,group):Promise<void>
Updates settings for a package.
Parameters
| Parameter | Type |
|---|---|
props | Map<string, any> |
group | Group |
Returns
Promise<void>
Source
tag()
tag(
tag):boolean
Adds a specified tag
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean
Inherited from
Source
toString()
toString():
string
Returns a string representing the object
Returns
string
Inherited from
Source
unTag()
unTag(
tag):boolean
Removes a specified tag
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
boolean