KiiObject の削除
KiiObject を削除するには、次の例のように delete()
メソッドを実行します。
-
// Instantiate a KiiObject with its URI. Uri objUri = Uri.parse("Set the URI of an existing KiiObject here"); KiiObject object = KiiObject.createByUri(objUri); try { // Delete the KiiObject. object.delete(); } catch (AppException e) { // Handle the error. } catch (IOException e) { // Handle the error. }
-
// Instantiate a KiiObject with its URI. Uri objUri = Uri.parse("Set the URI of an existing KiiObject here"); KiiObject object = KiiObject.createByUri(objUri); // Delete the KiiObject. object.delete(new KiiObjectCallBack() { @Override public void onDeleteCompleted(int token, Exception exception) { if (exception != null) { // Handle the error. return; } } });
delete()
メソッドにより KiiObject の削除要求が Kii Cloud に送信されます。別途 save()
メソッドをコールする必要はありません。
削除対象 KiiObject が Object Body を持っていた場合は、Object Body とその公開済み URL も同時に削除されます。詳細は Object Body の削除 をご覧ください。
複数件の KiiObject をまとめて削除する API はありませんが、Bucket ごとまとめて削除することは可能です。詳細は Bucket の削除 をご覧ください。