Deleting an Object Body
You can delete only an object body from a KiiObject.
Call the deleteBody()
method to delete an object body as shown in the following sample code:
-
// Assume that the KiiObject "object" has been instantiated. try { // Delete the object body of the KiiObject. object.deleteBody(); } catch (AppException e) { // Handle the error. } catch (IOException e) { // Handle the error. }
-
// Assume that the KiiObject "object" has been instantiated. // Delete the object body of the KiiObject. object.deleteBody(new KiiObjectCallBack() { @Override public void onDeleteBodyCompleted(int token, KiiObject object, Exception exception) { if (exception != null) { // Handle the error. return; } } });
The deleteBody()
method deletes only an object body. It does not delete a KiiObject.
If you delete an object body that has been published, its URL will be disabled too. JSON data representing an error will be returned if a user tries to access the disabled URL with a browser.