platform/registry
Documentation
- source: platform/registry.ts
Overview
Classes
Registry
getContent()
Retrieves the content of a registry resource at the given path, converting it into a JavaScript-friendly byte array format.
tsstatic getContent(path: string): void;
Parameter Type Description 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.
tsstatic getContentNative(path: string): void;
Parameter Type Description 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.
tsstatic getText(path: string): string;
Parameter Type Description 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.
tsstatic find(path: string, pattern: string): void;
Parameter Type Description 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.
tsstatic getRoot(): Directory;Returns
- Type:
Directory- Description: A Directory instance representing the root public collection.
Artefact
getName()
Gets the name of the artefact (file name).
tsgetName(): string;Returns
- Type:
string- Description: The name.
getPath()
Gets the full registry path of the artefact.
tsgetPath(): string;Returns
- Type:
string- Description: The registry path.
getParent()
Gets the parent directory of this artefact.
tsgetParent(): Directory;Returns
- Type:
Directory- Description: The parent Directory instance.
getInformation()
Gets detailed metadata about the artefact.
tsgetInformation(): ArtefactInformation;Returns
- Type:
ArtefactInformation- Description: The metadata object.
exists()
Checks if the artefact currently exists in the registry.
tsexists(): boolean;Returns
- Type:
boolean- Description: True if the artefact exists, false otherwise.
isEmpty()
Checks if the artefact (file) is empty (has zero size).
tsisEmpty(): boolean;Returns
- Type:
boolean- Description: True if the content is empty, false otherwise.
getText()
Gets the content of the artefact as a text string.
tsgetText(): string;Returns
- Type:
string- Description: The text content.
getContent()
Gets the content of the artefact as a JavaScript-friendly byte array.
tsgetContent(): void;Returns
- Type:
void- Description: The content bytes.
getContentNative()
Gets the content of the artefact as its native Java byte array representation.
tsgetContentNative(): void;Returns
- Type:
void- Description: The content bytes.
isBinary()
Checks if the artefact content is determined to be binary.
tsisBinary(): boolean;Returns
- Type:
boolean- Description: True if binary, false if text.
getContentType()
Gets the content type (MIME type) of the artefact.
tsgetContentType(): string;Returns
- Type:
string- Description: The content type string.
Directory
getName()
Gets the name of the directory (folder name).
tsgetName(): string;Returns
- Type:
string- Description: The name.
getPath()
Gets the full registry path of the directory.
tsgetPath(): string;Returns
- Type:
string- Description: The registry path.
getParent()
Gets the parent directory.
tsgetParent(): Directory;Returns
- Type:
Directory- Description: The parent Directory instance.
getInformation()
Gets detailed metadata about the directory.
tsgetInformation(): ArtefactInformation;Returns
- Type:
ArtefactInformation- Description: The metadata object.
exists()
Checks if the directory currently exists in the registry.
tsexists(): 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).
tsisEmpty(): boolean;Returns
- Type:
boolean- Description: True if empty, false otherwise.
getDirectoriesNames()
Gets the names of all sub-directories within this directory.
tsgetDirectoriesNames(): void;Returns
- Type:
void- Description: An array of sub-directory names.
getDirectory()
Gets a specific sub-directory by name.
tsgetDirectory(name: string): Directory;
Parameter Type Description 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.
tsgetArtefactsNames(): void;Returns
- Type:
void- Description: An array of artefact names.
getArtefact()
Gets a specific file (artefact) by name.
tsgetArtefact(name: string): Artefact;
Parameter Type Description namestringThe name of the artefact. Returns
- Type:
Artefact- Description: The child Artefact instance.
ArtefactInformation
getName()
Gets the name of the resource.
tsgetName(): string;Returns
- Type:
string- Description: The name.
getPath()
Gets the full registry path of the resource.
tsgetPath(): string;Returns
- Type:
string- Description: The registry path.
getPermissions()
Gets the access permissions for the resource (typically an integer bitmask).
tsgetPermissions(): number;Returns
- Type:
number- Description: The permissions value.
getSize()
Gets the size of the resource content in bytes.
tsgetSize(): number;Returns
- Type:
number- Description: The size in bytes.
getCreatedBy()
Gets the user who created the resource.
tsgetCreatedBy(): string;Returns
- Type:
string- Description: The creator's name.
getCreatedAt()
Gets the creation timestamp.
tsgetCreatedAt(): Date;Returns
- Type:
Date- Description: The creation date and time.
getModifiedBy()
Gets the user who last modified the resource.
tsgetModifiedBy(): string;Returns
- Type:
string- Description: The modifier's name.
getModifiedAt()
Gets the last modification timestamp.
tsgetModifiedAt(): Date;Returns
- Type:
Date- Description: The modification date and time.
