public class BoxApiMetadata extends BoxApi
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BOX_API_METADATA |
static java.lang.String |
BOX_API_METADATA_SCHEMA |
static java.lang.String |
BOX_API_METADATA_TEMPLATES |
static java.lang.String |
BOX_API_SCOPE_ENTERPRISE |
static java.lang.String |
BOX_API_SCOPE_GLOBAL |
mBaseUploadUri, mBaseUri, mSession| Constructor and Description |
|---|
BoxApiMetadata(BoxSession session)
Constructs a BoxApiMetadata with the provided BoxSession
|
| Modifier and Type | Method and Description |
|---|---|
BoxRequestsMetadata.AddFileMetadata |
getAddMetadataRequest(java.lang.String id,
java.util.LinkedHashMap<java.lang.String,java.lang.Object> values,
java.lang.String scope,
java.lang.String template)
Gets a request that adds metadata to a file
|
BoxRequestsMetadata.DeleteFileMetadata |
getDeleteMetadataTemplateRequest(java.lang.String id,
java.lang.String template)
Gets a request that deletes the metadata for a specific template on a file
|
protected java.lang.String |
getFileInfoUrl(java.lang.String id)
Gets the URL for file information
|
protected java.lang.String |
getFileMetadataUrl(java.lang.String id)
Gets the URL for all metadata on a file
|
protected java.lang.String |
getFileMetadataUrl(java.lang.String id,
java.lang.String template) |
protected java.lang.String |
getFileMetadataUrl(java.lang.String id,
java.lang.String scope,
java.lang.String template)
Gets the URL for a specific metadata template on a file (scope defaults to BOX_API_SCOPE_ENTERPRISE)
|
protected java.lang.String |
getFilesUrl()
Gets the URL for files
|
BoxRequestsMetadata.GetFileMetadata |
getMetadataRequest(java.lang.String id)
Gets a request that retrieves all the metadata on a file
|
BoxRequestsMetadata.GetFileMetadata |
getMetadataRequest(java.lang.String id,
java.lang.String template)
Gets a request that retrieves the metadata for a specific template on a file
|
BoxRequestsMetadata.GetMetadataTemplateSchema |
getMetadataTemplateSchemaRequest(java.lang.String template) |
BoxRequestsMetadata.GetMetadataTemplateSchema |
getMetadataTemplateSchemaRequest(java.lang.String scope,
java.lang.String template)
Gets a request that retrieves a metadata template schema (scope defaults to BOX_API_SCOPE_ENTERPRISE)
|
BoxRequestsMetadata.GetMetadataTemplates |
getMetadataTemplatesRequest()
Gets a request that retrieves available metadata templates under the enterprise scope
|
protected java.lang.String |
getMetadataTemplatesUrl() |
protected java.lang.String |
getMetadataTemplatesUrl(java.lang.String scope)
Gets the URL for metadata templates (scope defaults to BOX_API_SCOPE_ENTERPRISE)
|
protected java.lang.String |
getMetadataTemplatesUrl(java.lang.String scope,
java.lang.String template)
Gets the URL for a metadata template schema
|
BoxRequestsMetadata.UpdateFileMetadata |
getUpdateMetadataRequest(java.lang.String id,
java.lang.String scope,
java.lang.String template)
Gets a request that updates the metadata for a specific template on a file
|
getBaseUploadUri, getBaseUripublic static final java.lang.String BOX_API_SCOPE_ENTERPRISE
public static final java.lang.String BOX_API_SCOPE_GLOBAL
public static final java.lang.String BOX_API_METADATA
public static final java.lang.String BOX_API_METADATA_TEMPLATES
public static final java.lang.String BOX_API_METADATA_SCHEMA
public BoxApiMetadata(BoxSession session)
session - authenticated session to use with the BoxApiMetadataprotected java.lang.String getFilesUrl()
protected java.lang.String getFileInfoUrl(java.lang.String id)
id - id of the fileprotected java.lang.String getFileMetadataUrl(java.lang.String id)
id - id of the fileprotected java.lang.String getFileMetadataUrl(java.lang.String id,
java.lang.String scope,
java.lang.String template)
id - id of the filescope - The scope of the object. Global and enterprise scopes are currently supported. The Global scope represent the properties template currently, while the enterprise scope pertains to custom template within the enterprise. The id of the enterprise will be appended to the enterprise scope in this format: {scope}_{ENTERPRISE_ID}template - The key of the template. Together with "$parent" and "$scope", this forms a unique identifier for the metadata instance.protected java.lang.String getFileMetadataUrl(java.lang.String id,
java.lang.String template)
protected java.lang.String getMetadataTemplatesUrl(java.lang.String scope)
scope - The scope of the object. Global and enterprise scopes are currently supported. The Global scope represent the properties template currently, while the enterprise scope pertains to custom template within the enterprise. The id of the enterprise will be appended to the enterprise scope in this format: {scope}_{ENTERPRISE_ID}protected java.lang.String getMetadataTemplatesUrl()
protected java.lang.String getMetadataTemplatesUrl(java.lang.String scope,
java.lang.String template)
scope - The scope of the object. Global and enterprise scopes are currently supported. The Global scope represent the properties template currently, while the enterprise scope pertains to custom template within the enterprise. The id of the enterprise will be appended to the enterprise scope in this format: {scope}_{ENTERPRISE_ID}template - The key of the template. Together with "$parent" and "$scope", this forms a unique identifier for the metadata instance.public BoxRequestsMetadata.AddFileMetadata getAddMetadataRequest(java.lang.String id, java.util.LinkedHashMap<java.lang.String,java.lang.Object> values, java.lang.String scope, java.lang.String template)
id - id of the file to add metadata tovalues - mapping of the template keys to their valuesscope - currently only global and enterprise scopes are supportedtemplate - metadata template to usepublic BoxRequestsMetadata.GetFileMetadata getMetadataRequest(java.lang.String id)
id - id of the file to retrieve metadata forpublic BoxRequestsMetadata.GetFileMetadata getMetadataRequest(java.lang.String id, java.lang.String template)
id - id of the file to retrieve metadata fortemplate - metadata template requestedpublic BoxRequestsMetadata.UpdateFileMetadata getUpdateMetadataRequest(java.lang.String id, java.lang.String scope, java.lang.String template)
id - id of the file to retrieve metadata forscope - currently only global and enterprise scopes are supportedtemplate - metadata template to usepublic BoxRequestsMetadata.DeleteFileMetadata getDeleteMetadataTemplateRequest(java.lang.String id, java.lang.String template)
id - id of the file to retrieve metadata fortemplate - metadata template to usepublic BoxRequestsMetadata.GetMetadataTemplates getMetadataTemplatesRequest()
public BoxRequestsMetadata.GetMetadataTemplateSchema getMetadataTemplateSchemaRequest(java.lang.String scope, java.lang.String template)
scope - currently only global and enterprise scopes are supportedtemplate - metadata template to usepublic BoxRequestsMetadata.GetMetadataTemplateSchema getMetadataTemplateSchemaRequest(java.lang.String template)