Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove delete classification #1222

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading