public class FileMetadataManager extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FileMetadataManager.Builder |
| Modifier and Type | Field and Description |
|---|---|
Authentication |
auth |
NetworkSession |
networkSession |
| Modifier | Constructor and Description |
|---|---|
|
FileMetadataManager() |
protected |
FileMetadataManager(FileMetadataManager.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
MetadataFull |
createFileMetadataById(String fileId,
CreateFileMetadataByIdScope scope,
String templateKey,
Map<String,Object> requestBody)
Applies an instance of a metadata template to a file.
|
MetadataFull |
createFileMetadataById(String fileId,
CreateFileMetadataByIdScope scope,
String templateKey,
Map<String,Object> requestBody,
CreateFileMetadataByIdHeaders headers)
Applies an instance of a metadata template to a file.
|
void |
deleteFileMetadataById(String fileId,
DeleteFileMetadataByIdScope scope,
String templateKey)
Deletes a piece of file metadata.
|
void |
deleteFileMetadataById(String fileId,
DeleteFileMetadataByIdScope scope,
String templateKey,
DeleteFileMetadataByIdHeaders headers)
Deletes a piece of file metadata.
|
Authentication |
getAuth() |
Metadatas |
getFileMetadata(String fileId)
Retrieves all metadata for a given file.
|
Metadatas |
getFileMetadata(String fileId,
GetFileMetadataHeaders headers)
Retrieves all metadata for a given file.
|
Metadatas |
getFileMetadata(String fileId,
GetFileMetadataQueryParams queryParams)
Retrieves all metadata for a given file.
|
Metadatas |
getFileMetadata(String fileId,
GetFileMetadataQueryParams queryParams,
GetFileMetadataHeaders headers)
Retrieves all metadata for a given file.
|
MetadataFull |
getFileMetadataById(String fileId,
GetFileMetadataByIdScope scope,
String templateKey)
Retrieves the instance of a metadata template that has been applied to a file.
|
MetadataFull |
getFileMetadataById(String fileId,
GetFileMetadataByIdScope scope,
String templateKey,
GetFileMetadataByIdHeaders headers)
Retrieves the instance of a metadata template that has been applied to a file.
|
MetadataFull |
getFileMetadataById(String fileId,
GetFileMetadataByIdScope scope,
String templateKey,
GetFileMetadataByIdQueryParams queryParams)
Retrieves the instance of a metadata template that has been applied to a file.
|
MetadataFull |
getFileMetadataById(String fileId,
GetFileMetadataByIdScope scope,
String templateKey,
GetFileMetadataByIdQueryParams queryParams,
GetFileMetadataByIdHeaders headers)
Retrieves the instance of a metadata template that has been applied to a file.
|
NetworkSession |
getNetworkSession() |
MetadataFull |
updateFileMetadataById(String fileId,
UpdateFileMetadataByIdScope scope,
String templateKey,
List<UpdateFileMetadataByIdRequestBody> requestBody)
Updates a piece of metadata on a file.
|
MetadataFull |
updateFileMetadataById(String fileId,
UpdateFileMetadataByIdScope scope,
String templateKey,
List<UpdateFileMetadataByIdRequestBody> requestBody,
UpdateFileMetadataByIdHeaders headers)
Updates a piece of metadata on a file.
|
public Authentication auth
public NetworkSession networkSession
public FileMetadataManager()
protected FileMetadataManager(FileMetadataManager.Builder builder)
public Metadatas getFileMetadata(String fileId)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
public Metadatas getFileMetadata(String fileId, GetFileMetadataQueryParams queryParams)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
queryParams - Query parameters of getFileMetadata methodpublic Metadatas getFileMetadata(String fileId, GetFileMetadataHeaders headers)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
headers - Headers of getFileMetadata methodpublic Metadatas getFileMetadata(String fileId, GetFileMetadataQueryParams queryParams, GetFileMetadataHeaders headers)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
queryParams - Query parameters of getFileMetadata methodheaders - Headers of getFileMetadata methodpublic MetadataFull getFileMetadataById(String fileId, GetFileMetadataByIdScope scope, String templateKey)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"public MetadataFull getFileMetadataById(String fileId, GetFileMetadataByIdScope scope, String templateKey, GetFileMetadataByIdQueryParams queryParams)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"queryParams - Query parameters of getFileMetadataById methodpublic MetadataFull getFileMetadataById(String fileId, GetFileMetadataByIdScope scope, String templateKey, GetFileMetadataByIdHeaders headers)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"headers - Headers of getFileMetadataById methodpublic MetadataFull getFileMetadataById(String fileId, GetFileMetadataByIdScope scope, String templateKey, GetFileMetadataByIdQueryParams queryParams, GetFileMetadataByIdHeaders headers)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"queryParams - Query parameters of getFileMetadataById methodheaders - Headers of getFileMetadataById methodpublic MetadataFull createFileMetadataById(String fileId, CreateFileMetadataByIdScope 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.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"requestBody - Request body of createFileMetadataById methodpublic MetadataFull createFileMetadataById(String fileId, CreateFileMetadataByIdScope scope, String templateKey, Map<String,Object> requestBody, CreateFileMetadataByIdHeaders 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.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"requestBody - Request body of createFileMetadataById methodheaders - Headers of createFileMetadataById methodpublic MetadataFull updateFileMetadataById(String fileId, UpdateFileMetadataByIdScope scope, String templateKey, List<UpdateFileMetadataByIdRequestBody> requestBody)
The metadata instance can only be updated if the template has already been applied to the file 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.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"requestBody - Request body of updateFileMetadataById methodpublic MetadataFull updateFileMetadataById(String fileId, UpdateFileMetadataByIdScope scope, String templateKey, List<UpdateFileMetadataByIdRequestBody> requestBody, UpdateFileMetadataByIdHeaders headers)
The metadata instance can only be updated if the template has already been applied to the file 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.
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"requestBody - Request body of updateFileMetadataById methodheaders - Headers of updateFileMetadataById methodpublic void deleteFileMetadataById(String fileId, DeleteFileMetadataByIdScope scope, String templateKey)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"public void deleteFileMetadataById(String fileId, DeleteFileMetadataByIdScope scope, String templateKey, DeleteFileMetadataByIdHeaders headers)
fileId - The unique identifier that represents a file.
The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
scope - The scope of the metadata template. Example: "global"templateKey - The name of the metadata template. Example: "properties"headers - Headers of deleteFileMetadataById methodpublic Authentication getAuth()
public NetworkSession getNetworkSession()