public class FolderMetadataManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FolderMetadataManager.Builder |
| Modifier and Type | Field and Description |
|---|---|
Authentication |
auth |
NetworkSession |
networkSession |
| Modifier | Constructor and Description |
|---|---|
|
FolderMetadataManager() |
protected |
FolderMetadataManager(FolderMetadataManager.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
MetadataFull |
createFolderMetadataById(String folderId,
CreateFolderMetadataByIdScope scope,
String templateKey,
Map<String,Object> requestBody)
Applies an instance of a metadata template to a folder.
|
MetadataFull |
createFolderMetadataById(String folderId,
CreateFolderMetadataByIdScope scope,
String templateKey,
Map<String,Object> requestBody,
CreateFolderMetadataByIdHeaders headers)
Applies an instance of a metadata template to a folder.
|
void |
deleteFolderMetadataById(String folderId,
DeleteFolderMetadataByIdScope scope,
String templateKey)
Deletes a piece of folder metadata.
|
void |
deleteFolderMetadataById(String folderId,
DeleteFolderMetadataByIdScope scope,
String templateKey,
DeleteFolderMetadataByIdHeaders headers)
Deletes a piece of folder metadata.
|
Authentication |
getAuth() |
Metadatas |
getFolderMetadata(String folderId)
Retrieves all metadata for a given folder.
|
Metadatas |
getFolderMetadata(String folderId,
GetFolderMetadataHeaders headers)
Retrieves all metadata for a given folder.
|
Metadatas |
getFolderMetadata(String folderId,
GetFolderMetadataQueryParams queryParams)
Retrieves all metadata for a given folder.
|
Metadatas |
getFolderMetadata(String folderId,
GetFolderMetadataQueryParams queryParams,
GetFolderMetadataHeaders headers)
Retrieves all metadata for a given folder.
|
MetadataFull |
getFolderMetadataById(String folderId,
GetFolderMetadataByIdScope scope,
String templateKey)
Retrieves the instance of a metadata template that has been applied to a folder.
|
MetadataFull |
getFolderMetadataById(String folderId,
GetFolderMetadataByIdScope scope,
String templateKey,
GetFolderMetadataByIdHeaders headers)
Retrieves the instance of a metadata template that has been applied to a folder.
|
NetworkSession |
getNetworkSession() |
MetadataFull |
updateFolderMetadataById(String folderId,
UpdateFolderMetadataByIdScope scope,
String templateKey,
List<UpdateFolderMetadataByIdRequestBody> requestBody)
Updates a piece of metadata on a folder.
|
MetadataFull |
updateFolderMetadataById(String folderId,
UpdateFolderMetadataByIdScope scope,
String templateKey,
List<UpdateFolderMetadataByIdRequestBody> requestBody,
UpdateFolderMetadataByIdHeaders headers)
Updates a piece of metadata on a folder.
|
public Authentication auth
public NetworkSession networkSession
public FolderMetadataManager()
protected FolderMetadataManager(FolderMetadataManager.Builder builder)
public Metadatas getFolderMetadata(String folderId)
folderId - The unique identifier that represent a folder.
The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.
The root folder of a Box account is always represented by the ID `0`. Example: "12345"
public Metadatas getFolderMetadata(String folderId, GetFolderMetadataQueryParams queryParams)
folderId - The unique identifier that represent a folder.
The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.
The root folder of a Box account is always represented by the ID `0`. Example: "12345"
queryParams - Query parameters of getFolderMetadata methodpublic Metadatas getFolderMetadata(String folderId, GetFolderMetadataHeaders headers)
folderId - The unique identifier that represent a folder.
The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.
The root folder of a Box account is always represented by the ID `0`. Example: "12345"
headers - Headers of getFolderMetadata methodpublic Metadatas getFolderMetadata(String folderId, GetFolderMetadataQueryParams queryParams, GetFolderMetadataHeaders headers)
folderId - The unique identifier that represent a folder.
The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.
The root folder of a Box account is always represented by the ID `0`. Example: "12345"
queryParams - Query parameters of getFolderMetadata methodheaders - Headers of getFolderMetadata methodpublic MetadataFull getFolderMetadataById(String folderId, GetFolderMetadataByIdScope scope, String templateKey)
folderId - The unique identifier that represent a folder.
The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.
The root folder of a Box account is always represented by the ID `0`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"public MetadataFull getFolderMetadataById(String folderId, GetFolderMetadataByIdScope scope, String templateKey, GetFolderMetadataByIdHeaders headers)
folderId - The unique identifier that represent a folder.
The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.
The root folder of a Box account is always represented by the ID `0`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"headers - Headers of getFolderMetadataById methodpublic MetadataFull createFolderMetadataById(String folderId, CreateFolderMetadataByIdScope scope, String templateKey, Map<String,Object> requestBody)
In most cases only values that are present in the metadata template will be accepted, except for the `global.properties` template which accepts any key-value pair.
To display the metadata template in the Box web app the enterprise needs to be configured to enable **Cascading Folder Level Metadata** for the user in the admin console.
folderId - The unique identifier that represent a folder.
The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.
The root folder of a Box account is always represented by the ID `0`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"requestBody - Request body of createFolderMetadataById methodpublic MetadataFull createFolderMetadataById(String folderId, CreateFolderMetadataByIdScope scope, String templateKey, Map<String,Object> requestBody, CreateFolderMetadataByIdHeaders headers)
In most cases only values that are present in the metadata template will be accepted, except for the `global.properties` template which accepts any key-value pair.
To display the metadata template in the Box web app the enterprise needs to be configured to enable **Cascading Folder Level Metadata** for the user in the admin console.
folderId - The unique identifier that represent a folder.
The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.
The root folder of a Box account is always represented by the ID `0`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"requestBody - Request body of createFolderMetadataById methodheaders - Headers of createFolderMetadataById methodpublic MetadataFull updateFolderMetadataById(String folderId, UpdateFolderMetadataByIdScope scope, String templateKey, List<UpdateFolderMetadataByIdRequestBody> requestBody)
The metadata instance can only be updated if the template has already been applied to the folder before. When editing metadata, only values that match the metadata template schema will be accepted.
The update is applied atomically. If any errors occur during the application of the operations, the metadata instance will not be changed.
folderId - The unique identifier that represent a folder.
The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.
The root folder of a Box account is always represented by the ID `0`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"requestBody - Request body of updateFolderMetadataById methodpublic MetadataFull updateFolderMetadataById(String folderId, UpdateFolderMetadataByIdScope scope, String templateKey, List<UpdateFolderMetadataByIdRequestBody> requestBody, UpdateFolderMetadataByIdHeaders headers)
The metadata instance can only be updated if the template has already been applied to the folder before. When editing metadata, only values that match the metadata template schema will be accepted.
The update is applied atomically. If any errors occur during the application of the operations, the metadata instance will not be changed.
folderId - The unique identifier that represent a folder.
The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.
The root folder of a Box account is always represented by the ID `0`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"requestBody - Request body of updateFolderMetadataById methodheaders - Headers of updateFolderMetadataById methodpublic void deleteFolderMetadataById(String folderId, DeleteFolderMetadataByIdScope scope, String templateKey)
folderId - The unique identifier that represent a folder.
The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.
The root folder of a Box account is always represented by the ID `0`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"public void deleteFolderMetadataById(String folderId, DeleteFolderMetadataByIdScope scope, String templateKey, DeleteFolderMetadataByIdHeaders headers)
folderId - The unique identifier that represent a folder.
The ID for any folder can be determined by visiting this folder in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/folder/123` the `folder_id` is `123`.
The root folder of a Box account is always represented by the ID `0`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"headers - Headers of deleteFolderMetadataById methodpublic Authentication getAuth()
public NetworkSession getNetworkSession()