Skip to content

Commit

Permalink
fix: Remove delete classification (#1222)
Browse files Browse the repository at this point in the history
  • Loading branch information
congminh1254 authored Dec 28, 2023
1 parent f560db8 commit 9814038
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions doc/classifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!-- sample put_metadata_templates_enterprise_securityClassification-6VMVochwUWo_schema delete -->
```java
List<MetadataTemplate.FieldOperation> updates = new ArrayList<MetadataTemplate.FieldOperation>();

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.

<!-- sample delete_metadata_templates_enterprise_securityClassification-6VMVochwUWo_schema -->
```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
--------------------------

Expand Down

0 comments on commit 9814038

Please sign in to comment.