Skip to content

platform/registry

Documentation

Overview

Classes

Registry

getContent()

Retrieves the content of a registry resource at the given path, converting it into a JavaScript-friendly byte array format.

ts
static getContent(path: string): void;
ParameterTypeDescription
pathstringThe absolute path to the resource (e.g., "/registry/public/myFile.txt").

Returns

  • Type: void
  • Description: The resource content as a JavaScript byte array.

getContentNative()

Retrieves the content of a registry resource at the given path in its native Java byte array format.

ts
static getContentNative(path: string): void;
ParameterTypeDescription
pathstringThe absolute path to the resource.

Returns

  • Type: void
  • Description: The resource content as a native Java byte array.

getText()

Retrieves the content of a registry resource at the given path as a string.

ts
static getText(path: string): string;
ParameterTypeDescription
pathstringThe absolute path to the resource.

Returns

  • Type: string
  • Description: The resource content as plain text.

find()

Searches the registry starting from a given path for resources matching a glob pattern.

ts
static find(path: string, pattern: string): void;
ParameterTypeDescription
pathstringThe starting path for the search.
patternstringThe glob pattern to match resource names against (e.g., "*.js").

Returns

  • Type: void
  • Description: An array of registry paths (strings) that match the search criteria.

getRoot()

Gets the root directory object for the public registry space.

ts
static getRoot(): Directory;

Returns

  • Type: Directory
  • Description: A Directory instance representing the root public collection.

Artefact

getName()

Gets the name of the artefact (file name).

ts
getName(): string;

Returns

  • Type: string
  • Description: The name.

getPath()

Gets the full registry path of the artefact.

ts
getPath(): string;

Returns

  • Type: string
  • Description: The registry path.

getParent()

Gets the parent directory of this artefact.

ts
getParent(): Directory;

Returns

  • Type: Directory
  • Description: The parent Directory instance.

getInformation()

Gets detailed metadata about the artefact.

ts
getInformation(): ArtefactInformation;

Returns

  • Type: ArtefactInformation
  • Description: The metadata object.

exists()

Checks if the artefact currently exists in the registry.

ts
exists(): boolean;

Returns

  • Type: boolean
  • Description: True if the artefact exists, false otherwise.

isEmpty()

Checks if the artefact (file) is empty (has zero size).

ts
isEmpty(): boolean;

Returns

  • Type: boolean
  • Description: True if the content is empty, false otherwise.

getText()

Gets the content of the artefact as a text string.

ts
getText(): string;

Returns

  • Type: string
  • Description: The text content.

getContent()

Gets the content of the artefact as a JavaScript-friendly byte array.

ts
getContent(): void;

Returns

  • Type: void
  • Description: The content bytes.

getContentNative()

Gets the content of the artefact as its native Java byte array representation.

ts
getContentNative(): void;

Returns

  • Type: void
  • Description: The content bytes.

isBinary()

Checks if the artefact content is determined to be binary.

ts
isBinary(): boolean;

Returns

  • Type: boolean
  • Description: True if binary, false if text.

getContentType()

Gets the content type (MIME type) of the artefact.

ts
getContentType(): string;

Returns

  • Type: string
  • Description: The content type string.

Directory

getName()

Gets the name of the directory (folder name).

ts
getName(): string;

Returns

  • Type: string
  • Description: The name.

getPath()

Gets the full registry path of the directory.

ts
getPath(): string;

Returns

  • Type: string
  • Description: The registry path.

getParent()

Gets the parent directory.

ts
getParent(): Directory;

Returns

  • Type: Directory
  • Description: The parent Directory instance.

getInformation()

Gets detailed metadata about the directory.

ts
getInformation(): ArtefactInformation;

Returns

  • Type: ArtefactInformation
  • Description: The metadata object.

exists()

Checks if the directory currently exists in the registry.

ts
exists(): boolean;

Returns

  • Type: boolean
  • Description: True if the directory exists, false otherwise.

isEmpty()

Checks if the directory is empty (contains no files or sub-directories).

ts
isEmpty(): boolean;

Returns

  • Type: boolean
  • Description: True if empty, false otherwise.

getDirectoriesNames()

Gets the names of all sub-directories within this directory.

ts
getDirectoriesNames(): void;

Returns

  • Type: void
  • Description: An array of sub-directory names.

getDirectory()

Gets a specific sub-directory by name.

ts
getDirectory(name: string): Directory;
ParameterTypeDescription
namestringThe name of the sub-directory.

Returns

  • Type: Directory
  • Description: The child Directory instance.

getArtefactsNames()

Gets the names of all files (artefacts) within this directory.

ts
getArtefactsNames(): void;

Returns

  • Type: void
  • Description: An array of artefact names.

getArtefact()

Gets a specific file (artefact) by name.

ts
getArtefact(name: string): Artefact;
ParameterTypeDescription
namestringThe name of the artefact.

Returns

  • Type: Artefact
  • Description: The child Artefact instance.

ArtefactInformation

getName()

Gets the name of the resource.

ts
getName(): string;

Returns

  • Type: string
  • Description: The name.

getPath()

Gets the full registry path of the resource.

ts
getPath(): string;

Returns

  • Type: string
  • Description: The registry path.

getPermissions()

Gets the access permissions for the resource (typically an integer bitmask).

ts
getPermissions(): number;

Returns

  • Type: number
  • Description: The permissions value.

getSize()

Gets the size of the resource content in bytes.

ts
getSize(): number;

Returns

  • Type: number
  • Description: The size in bytes.

getCreatedBy()

Gets the user who created the resource.

ts
getCreatedBy(): string;

Returns

  • Type: string
  • Description: The creator's name.

getCreatedAt()

Gets the creation timestamp.

ts
getCreatedAt(): Date;

Returns

  • Type: Date
  • Description: The creation date and time.

getModifiedBy()

Gets the user who last modified the resource.

ts
getModifiedBy(): string;

Returns

  • Type: string
  • Description: The modifier's name.

getModifiedAt()

Gets the last modification timestamp.

ts
getModifiedAt(): Date;

Returns

  • Type: Date
  • Description: The modification date and time.