Skip to main content

%Net.Cloud.Storage.Client

class %Net.Cloud.Storage.Client extends %Library.RegisteredObject

Property Inventory

Method Inventory

Parameters

parameter BUFFERLENGTH = 32000;

Properties

property gateway as %External.JavaGateway;
Connection to a Java Gateway
Property methods: gatewayGet(), gatewayGetSwizzled(), gatewayIsValid(), gatewayNewObject(), gatewaySet()
property jclient as %Net.Remote.Object;
Remote Java client object to Azure, Google or S3
Property methods: jclientGet(), jclientGetSwizzled(), jclientIsValid(), jclientNewObject(), jclientSet()

Methods

method BlobExists(bucketName As %String, blobName As %String) as %Boolean
Test if a blob exists
method BucketExists(bucketName As %String) as %Boolean
Test if a bucket exists
method Close()
Close storage client and disconnect Java gateway
method CreateBucket(bucketName As %String)
Create a new bucket
classmethod CreateClient(javaServer As %RawString = "", storageProvider As %Integer, credentialsFile As %String, region As %String, Output sc As %Status) as Client
Factory method to create a cloud storage client. javaServer: Java gateway name, default to default Java gateway. storageProvider: Specify storage provider. 0: Amazon S3, 1: Azure Blob, 2: Google Cloud Storage. credentialsFile: File name containing credentials for specific storage provider. region: Cloud storage region for specific storage provider. sc: returning status code.
method DeleteBlob(bucketName As %String, blobName As %String)
Delete a blob from the cloud
method DeleteBucket(bucketName As %String)
Delete a bucket from the cloud
method DownloadBlobToFile(bucketName As %String, blobName As %String, filePath As %String)
Download a blob from the cloud to a file
method DownloadBlobToStream(bucketName As %String, blobName As %String, blobEncoding As %String = "") as %Stream.Object
Download a blob from the cloud to a stream blobEncoding name follows Java convention If blobEncoding = "", the returning stream is %GlobalBinarayStream; otherwise, it is %GlobalCharacterStream.
method DownloadBlobToString(bucketName As %String, blobName As %String, blobEncoding As %String = "") as %String
Download a blob from the cloud to a string blobEncoding: Blob content encoding, the name follows Java convention. If blobEncoding = "", treat the blob content as encoded in UTF-8.
method GetBlobInfo(bucketName As %String, blobName As %String) as BlobInfo
Get blob info
method GetBucketInfo(bucketName As %String) as BucketInfo
Get bucket info
method IsBucketPublicAccessible(bucketName As %String) as %Boolean
Test if a bucket is public accessible
method ListBlobs(bucketName As %String, blobNamePrefix As %String = "", blobNamePattern As %String = "") as %ListOfObjects
List all blobs within a bucket, filtered by blobNamePrefix and blobNamePattern. bucketName: bucket name blobNamePrefix: blob name prefix, used to filter the result on the server. blobNamePattern: blob name pattern, used to filter the result by the client. Support wild cards "?" and "*".
method ListBuckets() as %ListOfObjects
List all buckets
method UploadBlobFromFile(bucketName As %String, blobName As %String, filePath As %String)
Upload a file blob to the cloud
method UploadBlobFromStream(bucketName As %String, blobName As %String, stream As %Stream.Object)
Upload a binary or character stream blob to the cloud For character stream, its content is converted to UTF-8 first, then uploaded as binary stream.
method UploadBlobFromString(bucketName As %String, blobName As %String, content As %String)
Upload a string blob to the cloud String content will be encoded as UTF-8

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab