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 |
---|---|---|---|---|
_files | private | null | FileSource | null | - |
_logger? | private | PackageLogger | undefined | - |
_name | private | string | '' | - |
_version | public | string | '' | - |
_webRoot | public | undefined | string | undefined | - |
dart | public | any | undefined | Entity .dart |
Accessors
author
get
author():User
Who created entity *
Returns
Source
createdOn
get
createdOn():Dayjs
Time when entity was created *
Returns
Dayjs
Source
files
get
files():FileSource
Global application data
Returns
Source
friendlyName
get
friendlyName():string
Entity friendly name
set
friendlyName(x
):void
Parameters
Parameter | Type |
---|---|
x | string |
Returns
string
Source
id
get
id():string
Entity ID (GUID)
set
id(x
):void
Parameters
Parameter | Type |
---|---|
x | string |
Returns
string
Source
logger
get
logger():PackageLogger
Returns
Source
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
name
get
name():string
Package short name
set
name(x
):void
Parameters
Parameter | Type |
---|---|
x | string |
Returns
string
Source
nqName
get
nqName():string
Entity full-qualified name
Returns
string
Source
path
get
path():string
Entity path
Returns
string
Source
updatedOn
get
updatedOn():null
|Dayjs
Time when entity was updated *
Returns
null
| Dayjs
Source
version
get
version():string
set
version(x
):void
Parameters
Parameter | Type |
---|---|
x | string |
Returns
string
Source
webRoot
get
webRoot():string
set
webRoot(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
>
Deprecated. Use getSettings instead. Returns properties for a package.
Returns
Promise
<any
>
Overrides
Source
getSettings()
getSettings():
Promise
<any
>
Returns settings for a package.
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