From 981403896b4cd16a42c9feeecf30e75e1e8fa072 Mon Sep 17 00:00:00 2001 From: Minh Nguyen Cong Date: Thu, 28 Dec 2023 11:46:24 +0100 Subject: [PATCH] fix: Remove delete classification (#1222) --- doc/classifications.md | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/doc/classifications.md b/doc/classifications.md index 6b31f6557..f468bd807 100644 --- a/doc/classifications.md +++ b/doc/classifications.md @@ -109,38 +109,6 @@ updates.add(new MetadataTemplate.FieldOperation(addCategoryFieldJSON)); MetadataTemplate.updateMetadataTemplate(api, Metadata.ENTERPRISE_METADATA_SCOPE, Metadata.CLASSIFICATION_TEMPLATE_KEY, updates); ``` -Delete a classification ------------------------ - -To remove an existing classification, call the -[`updateMetadataTemplate`][update-metadata-template] -method with the an operation to remove the existing classification from the metadata template. - - -```java -List updates = new ArrayList(); - -String update = "{\n op: \"removeEnumOption\",\n fieldKey: \"Box__Security__Classification__Key\",\n enumOptionKey: \"Sensitive\"\n}"; - -updates.add(new MetadataTemplate.FieldOperation(addCategoryFieldJSON)); - -MetadataTemplate.updateMetadataTemplate(api, Metadata.ENTERPRISE_METADATA_SCOPE, Metadata.CLASSIFICATION_TEMPLATE_KEY, updates); -``` - -Delete all classifications --------------------------- - -To remove all classifications in an enterprise, call the -[`deleteMetadataTemplate`][delete-metadata-template] -method with the an name of the classification metadata template. - - -```java -MetadataTemplate.deleteMetadataTemplate(api, Metadata.ENTERPRISE_METADATA_SCOPE, Metadata.CLASSIFICATION_TEMPLATE_KEY); -``` - -[delete-metadata-template]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/MetadataTemplate.html#deleteMetadataTemplate-com.box.sdk.BoxAPIConnection-java.lang.String-java.lang.String- - Add classification to file --------------------------