KiiCloudStorageSDK : KiiCorp.Cloud.Storage Namespace

KiiBucket Class

Provides APIs for bucket features.

Syntax

public class KiiBucket : AccessControllable, KiiBaseBucket<KiiObject>, KiiSubscribable

Remarks

This instance is created by KiiUser.Bucket(string)

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Members

See Also: Inherited members from object.

Public Properties

[read-only]
Name string . Gets the bucket name.
[read-only]
Uri Uri . Gets the URI of this instance.

Public Methods

Acl (BucketAction) : KiiBucketAcl
Gets the acl for this bucket.
Count () : int
Execute count aggregation of all clause query on current bucket.
Count (CountCallback)
Asynchronous version of KiiBucket.Count.
Count (KiiQuery) : int
Execute count aggregation of specified query on current bucket.
Count (KiiQuery, CountCallback)
Asynchronous version of KiiBucket.Count(KiiQuery).
Delete ()
Delete this bucket.
Delete (KiiBucketCallback)
Delete this bucket.
static
IsValidBucketName (string) : bool
Determines whether an argument is valid bucket name.
ListAclEntries () : IList<KiiACLEntry<KiiBucket, BucketAction>>
Lists the acl entries of this bucket
ListAclEntries (KiiACLListCallback<KiiBucket, BucketAction>)
Lists the acl entries of this bucket
NewKiiObject () : KiiObject
Create a new KiiCorp.Cloud.Storage.KiiObject.
NewKiiObject (string) : KiiObject
Create a new KiiCorp.Cloud.Storage.KiiObject specifying its ID.
Query (KiiQuery) : KiiQueryResult<KiiObject>
Query KiiObjects in this bucket.
Query (KiiQuery, KiiQueryCallback<KiiObject>)
Query KiiObjects in this bucket.

Member Details

Acl Method

Gets the acl for this bucket.

Syntax

public KiiBucketAcl Acl (BucketAction action)

Parameters

action
Bucket action.

Returns

KiiBucket ACL.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Count Method

Execute count aggregation of all clause query on current bucket.

Syntax

public int Count ()

Returns

number of objects in the bucket.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.CloudException Is thrown when server sends error response.

Remarks

NOTE: This api access to server. Should not be executed in UI/Main thread.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Count Method

Asynchronous version of KiiBucket.Count.

Syntax

public void Count (CountCallback callback)

Parameters

callback
Executes when count execution completed.

Exceptions

Type Reason
ArgumentException Is thrown when callback is null.

Remarks

This API sends a request to KiiCloud.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Count Method

Execute count aggregation of specified query on current bucket.

Syntax

public int Count (KiiQuery query)

Parameters

query
query to be executed. If null, the operation will be same as KiiBucket.Count.

Returns

number of objects in the bucket.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.CloudException Is thrown when server sends error response.

Remarks

Query generated from KiiQueryResult.NextKiiQuery is not supported, KiiCorp.Cloud.Storage.CloudException will be thrown in this case. NOTE: This api access to server. Should not be executed in UI/Main thread.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Count Method

Asynchronous version of KiiBucket.Count(KiiQuery).

Syntax

public void Count (KiiQuery query, CountCallback callback)

Parameters

query
query to be executed. If null, the operation will be same as KiiBucket.Count(CountCallback).
callback
Executes when count execution completed.

Exceptions

Type Reason
ArgumentException Is thrown when callback is null.

Remarks

This API sends a request to KiiCloud.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Delete Method

Delete this bucket.

Syntax

public void Delete ()

Exceptions

Type Reason
KiiCorp.Cloud.Storage.CloudException Is thrown when server sends error response.

Remarks

Delete this bucket. All KiiObject in this bucket will be deleted at the same time.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Delete Method

Delete this bucket.

Syntax

public void Delete (KiiBucketCallback callback)

Parameters

callback
Callback.

Remarks

Delete this bucket. All KiiObject in this bucket will be deleted at the same time.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

IsValidBucketName Method

Determines whether an argument is valid bucket name.

Syntax

public static bool IsValidBucketName (string name)

Parameters

name
Bucket name you want to check.

Returns

true if an argument is valid bucket name ; otherwise, false.

Remarks

Valid bucket name is
  • Not null
  • Matches ^[a-zA-Z0-9-_]{1,50}$

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

ListAclEntries Method

Lists the acl entries of this bucket

Syntax

Returns

The list of acl entries.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

ListAclEntries Method

Lists the acl entries of this bucket

Syntax

public void ListAclEntries (KiiACLListCallback<KiiBucket, BucketAction> callback)

Parameters

callback
Callback.

Returns

The list of acl entries.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Name Property

Gets the bucket name.

Syntax

public string Name { get; }

Value

The bucket name.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

NewKiiObject Method

Syntax

public KiiObject NewKiiObject ()

Returns

New KiiObject.

Remarks

The scope of created object is this bucket.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

NewKiiObject Method

Create a new KiiCorp.Cloud.Storage.KiiObject specifying its ID.

Syntax

public KiiObject NewKiiObject (string objectID)

Parameters

objectID
ID of KiiObject you want to instantiate.

Returns

New KiiObject.

Exceptions

Type Reason
ArgumentException Is thrown when specified objectID is null/empty or not acceptable. Use Utils.ValidateObjectID(string) for details of acceptable string.

Remarks

If the object has not exist on KiiCloud, KiiObject.SaveAllFields(bool) or KiiObject.SaveAllFields(bool, KiiObjectCallback) will create new Object which has ID specified in the argument. If the object exist in KiiCloud, references the existing object which has specified ID. Use KiiObject.Refresh to retrieve the contents of KiiObject.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Query Method

Query KiiObjects in this bucket.

Syntax

public KiiQueryResult<KiiObject> Query (KiiQuery query)

Parameters

query
Query conditions.

Returns

List of KiiObject. If number of result is big, please call GetNextQueryResult()

Exceptions

Type Reason
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when server sends broken Json.
KiiCorp.Cloud.Storage.CloudException Is thrown when server sends error response.

Remarks

Query KiiObjects in this bucket with conditions given by argument.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Query Method

Query KiiObjects in this bucket.

Syntax

public void Query (KiiQuery query, KiiQueryCallback<KiiObject> callback)

Parameters

query
Query conditions.
callback
Callback.

Returns

List of KiiObject. If number of result is big, please call GetNextQueryResult()

Remarks

Query KiiObjects in this bucket with conditions given by argument.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0

Uri Property

Gets the URI of this instance.

Syntax

public Uri Uri { get; }

Value

The URI.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: KiiCorp.Cloud.Storage
Assembly: KiiCloudStorageSDK (in KiiCloudStorageSDK.dll)
Assembly Versions: 3.2.10.0