KiiCloudStorageSDK : KiiCorp.Cloud.Storage Namespace

KiiGroup Class

Provides APIs for Group features.

Syntax

public class KiiGroup : KiiSubject

Remarks

GroupName doesn't have unique constraints, so developers can create 3 groups whose names are the same one.

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]
ID string . Returns the ID of this group.
[read-only]
Name string . Gets or sets the group name.
[read-only]
Owner KiiUser . Gets the owner.
[read-only]
Subject string . Gets the subject string.
[read-only]
Uri Uri . Gets the URI of this group.

Public Methods

AddUser (KiiUser)
Adds the user to this group.
Bucket (string) : KiiBucket
Gets the KiiBucket whose scope is this group
ChangeName (string)
Changes the name of this group.
ChangeName (string, KiiGroupCallback)
Changes the name of this group.
static
CreateByUri (Uri) : KiiGroup
Creates KiiGroup by Uri
Delete ()
Delete this group from KiiCloud.
Delete (KiiGroupCallback)
Delete this group from KiiCloud.
static
GroupWithID (string) : KiiGroup
Instantiate KiiGroup that refers to existing group which has specified ID.
ListMembers () : IList<KiiUser>
Gets the list of members in this group.
ListMembers (KiiUserListCallback)
Gets the list of members in this group.
ListTopics () : KiiListResult<KiiTopic>
Gets the list of topics in this group scope.
ListTopics (KiiGenericsCallback<KiiListResult<KiiTopic>>)
Asynchronous call for KiiGroup.ListTopics.
ListTopics (string) : KiiListResult<KiiTopic>
Gets the list of next page of topics in this group scope.
ListTopics (string, KiiGenericsCallback<KiiListResult<KiiTopic>>)
Asynchronous call for KiiGroup.ListTopics(string).
Refresh ()
Gets the latest information of this group.
Refresh (KiiGroupCallback)
Gets the latest information of this group.
static
RegisterGroupWithID (string, string, List<KiiUser>) : KiiGroup
Creates new group own by current user on Kii Cloud with specified ID.
static
RegisterGroupWithID (string, string, IList<KiiUser>, KiiGenericsCallback<KiiGroup>)
Creates new group own by current user on Kii Cloud with specified ID.
RemoveUser (KiiUser)
Removes the user from this group.
Save ()
Save this KiiGroup on KiiCloud
Save (KiiGroupCallback)
Save this KiiGroup on KiiCloud
Topic (string) : KiiTopic
Get instance of group scope topic. The topic bound to this group

Member Details

AddUser Method

Adds the user to this group.

Syntax

public void AddUser (KiiUser user)

Parameters

user
User you want to add

Exceptions

Type Reason
ArgumentException Is thrown when user is null or doesn't have ID

Remarks

If user is already added, this API does nothing.

Requirements

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

Bucket Method

Gets the KiiBucket whose scope is this group

Syntax

public KiiBucket Bucket (string bucketName)

Parameters

bucketName
Bucket name.

Returns

KiiBucket instance whose scope is this group. If bucket is not in KiiCloud, it will be created when object in it is saved.

Remarks

Bucket name must be valid.

Requirements

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

ChangeName Method

Changes the name of this group.

Syntax

public void ChangeName (string name)

Parameters

name
New group name.

Exceptions

Type Reason
ArgumentException Is thrown when an argument is empty.
InvalidOperationException Is thrown when this group doesn't have ID.
KiiCorp.Cloud.Storage.GroupOperationException Is thrown when the group operation is failed.

Remarks

New group name must no be empty.

Requirements

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

ChangeName Method

Changes the name of this group.

Syntax

public void ChangeName (string name, KiiGroupCallback callback)

Parameters

name
New group name.
callback
Callback.

Remarks

New group name must no be empty.

Requirements

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

CreateByUri Method

Creates KiiGroup by Uri

Syntax

public static KiiGroup CreateByUri (Uri uri)

Parameters

uri
Uri of KiiGroup

Returns

KiiGroup instance.

Exceptions

Type Reason
ArgumentException Is thrown when Uri is invalid.

Remarks

To get the latest information from server, need to call Refresh().

Requirements

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

Delete Method

Delete this group from KiiCloud.

Syntax

public void Delete ()

Exceptions

Type Reason
InvalidOperationException Is thrown when this group doesn't have ID.
KiiCorp.Cloud.Storage.GroupOperationException Is thrown when the group operation is failed.

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 group from KiiCloud.

Syntax

public void Delete (KiiGroupCallback callback)

Parameters

callback
Callback.

Remarks

This API sends a request to KiiCloud.

Requirements

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

GroupWithID Method

Instantiate KiiGroup that refers to existing group which has specified ID.

Syntax

public static KiiGroup GroupWithID (string groupID)

Parameters

groupID
ID of the group to instantiate.

Returns

KiiGroup instance.

Exceptions

Type Reason
ArgumentException Is thrown when specified groupID is null or empty.

Remarks

You have to specify the ID of existing KiiGroup. Unlike KiiObject, you can not assign ID in the client side. This API does not access to the server. After instantiation, call KiiGroup.Refresh to fetch the properties.

Requirements

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

ID Property

Returns the ID of this group.

Syntax

public string ID { get; }

Value

The group ID.

Remarks

If the group has not saved to the cloud, returns null.

Requirements

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

ListMembers Method

Gets the list of members in this group.

Syntax

public IList<KiiUser> ListMembers ()

Returns

The list of members

Exceptions

Type Reason
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when server sends broken Json
KiiCorp.Cloud.Storage.GroupOperationException Is thrown when the group operation is failed.

Remarks

This api sends a request to KiiCloud.

Requirements

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

ListMembers Method

Gets the list of members in this group.

Syntax

public void ListMembers (KiiUserListCallback callback)

Parameters

callback
Callback.

Remarks

This api sends a request to KiiCloud.

Requirements

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

ListTopics Method

Gets the list of topics in this group scope.

Syntax

public KiiListResult<KiiTopic> ListTopics ()

Returns

A list of the topics in this group scope.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.CloudException Is thrown when server sends error response.
KiiCorp.Cloud.Storage.UnauthorizedException Is thrown when this method called by anonymous user.
InvalidOperationException Is thrown when this group doesn't have ID.

Remarks

This api sends a request to server.

Requirements

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

ListTopics Method

Asynchronous call for KiiGroup.ListTopics.

Syntax

Parameters

callback
Callback.

Exceptions

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

Remarks

This api sends a request to server.

Requirements

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

ListTopics Method

Gets the list of next page of topics in this group scope.

Syntax

public KiiListResult<KiiTopic> ListTopics (string paginationKey)

Parameters

paginationKey
Specifies the pagination key that is obtained by KiiListResult`1.PaginationKey. If specified null or empty, it's same as the KiiGroup.ListTopics.

Returns

A list of the topics in this group scope.

Exceptions

Type Reason
KiiCorp.Cloud.Storage.CloudException Is thrown when server sends error response.
KiiCorp.Cloud.Storage.UnauthorizedException Is thrown when this method called by anonymous user.

Remarks

This api sends a request to server.

Requirements

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

ListTopics Method

Asynchronous call for KiiGroup.ListTopics(string).

Syntax

public void ListTopics (string paginationKey, KiiGenericsCallback<KiiListResult<KiiTopic>> callback)

Parameters

paginationKey
Specifies the pagination key that is obtained by KiiListResult`1.PaginationKey. If specified null or empty, it's same as the KiiGroup.ListTopics(KiiGenericsCallback<KiiListResult<KiiTopic>>).
callback
Callback.

Exceptions

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

Remarks

This api sends a request to server.

Requirements

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

Name Property

Gets or sets the group name.

Syntax

public string Name { get; }

Value

The group name.

Remarks

Developers can use this name for UI label etc.

Requirements

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

Owner Property

Gets the owner.

Syntax

public KiiUser Owner { get; }

Value

The owner. Null if Group has been created by app admin.

Remarks

Developers can use this for showing group owner. If displayName is needed, please call KiiUser.Refresh()/>

Requirements

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

Refresh Method

Gets the latest information of this group.

Syntax

public void Refresh ()

Exceptions

Type Reason
InvalidOperationException Is thrown when this group doesn't have ID.
KiiCorp.Cloud.Storage.IllegalKiiBaseObjectFormatException Is thrown when server sends broken Json.
KiiCorp.Cloud.Storage.GroupOperationException Is thrown when server sends error response.

Remarks

This api sends a request to server.

Requirements

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

Refresh Method

Gets the latest information of this group.

Syntax

public void Refresh (KiiGroupCallback callback)

Parameters

callback
Callback.

Remarks

This api sends a request to server.

Requirements

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

RegisterGroupWithID Method

Creates new group own by current user on Kii Cloud with specified ID.

Syntax

public static KiiGroup RegisterGroupWithID (string id, string name, List<KiiUser> members)

Parameters

id
ID of the KiiGroup.
name
Name of the KiiGroup.
members
Members of the group. Group owner will be added as a group member no matter owner is in the list or not.

Returns

KiiGroup instance.

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

RegisterGroupWithID Method

Creates new group own by current user on Kii Cloud with specified ID.

Syntax

public static void RegisterGroupWithID (string id, string name, IList<KiiUser> members, KiiGenericsCallback<KiiGroup> callback)

Parameters

id
ID of the KiiGroup.
name
Name of the KiiGroup.
members
Members of the group. Group owner will be added as a group member no matter owner is in the list or not.
callback
Callback

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

RemoveUser Method

Removes the user from this group.

Syntax

public void RemoveUser (KiiUser user)

Parameters

user
User you want to remove

Exceptions

Type Reason
ArgumentException Is thrown when user is null or doesn't have ID.

Remarks

User mut not be null.

Requirements

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

Save Method

Save this KiiGroup on KiiCloud

Syntax

public void Save ()

Remarks

This API sends some requests to KiiCloud.

Requirements

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

Save Method

Save this KiiGroup on KiiCloud

Syntax

public void Save (KiiGroupCallback callback)

Parameters

callback
Callback.

Remarks

This API sends some requests to KiiCloud.

Requirements

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

Subject Property

Gets the subject string.

Syntax

public string Subject { get; }

Value

The subject string.

Remarks

Developers don't need to use this property in their apps.

Requirements

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

Topic Method

Get instance of group scope topic. The topic bound to this group

Syntax

public KiiTopic Topic (string name)

Parameters

name
Name of topic.

Returns

KiiTopic bound to this group.

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

Uri Property

Gets the URI of this group.

Syntax

public Uri Uri { get; }

Value

The URI.

Remarks

Developers can use this for getting KiiGroup instance by KiiGroup.CreateByUri(Uri)

Requirements

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