C# 클래스 Box.V2.Managers.BoxMetadataManager

Metadata allows users and applications to define and store custom data associated with their files/folders
상속: BoxResourceManager
파일 보기 프로젝트 열기: box/box-windows-sdk-v2 1 사용 예제들

공개 메소드들

메소드 설명
BoxMetadataManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
CreateFileMetadataAsync ( string fileId, object>.Dictionary metadata, string scope, string template ) : object>>.Task

Used to create the metadata template instance for a corresponding Box file. When creating metadata, only values that adhere to the metadata template schema will be accepted.

CreateFolderMetadataAsync ( string folderId, object>.Dictionary metadata, string scope, string template ) : object>>.Task

Used to create the metadata template instance for a corresponding Box folder. When creating metadata, only values that adhere to the metadata template schema will be accepted.

CreateMetadataTemplate ( BoxMetadataTemplate template ) : Task

Used to create a new metadata template with the specified schema.

DeleteFileMetadataAsync ( string fileId, string scope, string template ) : Task

Used to delete the template instance. To delete custom key:value pairs within a template instance, you should refer to the updating metadata section.

DeleteFolderMetadataAsync ( string folderId, string scope, string template ) : Task

Used to delete the template instance. To delete custom key:value pairs within a template instance, you should refer to the updating metadata section.

GetAllFileMetadataTemplatesAsync ( string fileId ) : object>>>.Task

Used to retrieve all metadata associated with a given file

GetAllFolderMetadataTemplatesAsync ( string folderId ) : object>>>.Task

Used to retrieve all metadata associated with a given folder

GetEnterpriseMetadataAsync ( string scope = "enterprise" ) : Task>

Used to retrieve all metadata templates within a user's enterprise. Currently only the enterprise scope is supported.

GetFileMetadataAsync ( string fileId, string scope, string template ) : object>>.Task

Used to retrieve the metadata template instance for a corresponding Box file.

GetFolderMetadataAsync ( string folderId, string scope, string template ) : object>>.Task

Used to retrieve the metadata template instance for a corresponding Box folder.

GetMetadataTemplate ( string scope, string template ) : Task

Used to retrieve the schema for a given metadata template.

UpdateFileMetadataAsync ( string fileId, List updates, string scope, string template ) : object>>.Task

Used to update the template instance. The request body must follow the JSON-Patch specification, which is represented as a JSON array of operation objects (see examples for more details). Updates can be either add, replace, remove , test, move, or copy. The template instance can only be updated if the template instance already exists. When editing metadata, only values that adhere to the metadata template schema will be accepted. The update is applied atomically. If any errors occur during the application of the update operations, the metadata instance remains unchanged.

UpdateFolderMetadataAsync ( string folderId, List updates, string scope, string template ) : object>>.Task

Used to update the template instance. Updates can be either add, replace, remove , or test. The template instance can only be updated if the template instance already exists. When editing metadata, only values that adhere to the metadata template schema will be accepted.

UpdateMetadataTemplate ( List metadataTemplateUpdate, string scope, string template ) : Task

Used to update the schema of an existing template.

비공개 메소드들

메소드 설명
CreateMetadata ( Uri hostUri, string id, object>.Dictionary metadata, string scope, string template ) : object>>.Task
DeleteMetadata ( Uri hostUri, string id, string scope, string template ) : Task
GetMetadata ( Uri hostUri, string id, string scope, string template ) : object>>.Task
UpdateMetadata ( Uri hostUri, string id, List updates, string scope, string template ) : object>>.Task

메소드 상세

BoxMetadataManager() 공개 메소드

public BoxMetadataManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
config IBoxConfig
service IBoxService
converter IBoxConverter
auth IAuthRepository
asUser string
suppressNotifications bool
리턴 Box.V2.Auth

CreateFileMetadataAsync() 공개 메소드

Used to create the metadata template instance for a corresponding Box file. When creating metadata, only values that adhere to the metadata template schema will be accepted.
public CreateFileMetadataAsync ( string fileId, object>.Dictionary metadata, string scope, string template ) : object>>.Task
fileId string Id of file
metadata object>.Dictionary Metadata to create
scope string Scope name. Currently, the only scopes support are enterprise and global
template string Metadata template name
리턴 object>>.Task

CreateFolderMetadataAsync() 공개 메소드

Used to create the metadata template instance for a corresponding Box folder. When creating metadata, only values that adhere to the metadata template schema will be accepted.
public CreateFolderMetadataAsync ( string folderId, object>.Dictionary metadata, string scope, string template ) : object>>.Task
folderId string Id of folder
metadata object>.Dictionary Metadata to create
scope string Scope name. Currently, only the enterprise scope is supported
template string Metadata template name
리턴 object>>.Task

CreateMetadataTemplate() 공개 메소드

Used to create a new metadata template with the specified schema.
public CreateMetadataTemplate ( BoxMetadataTemplate template ) : Task
template Box.V2.Models.BoxMetadataTemplate BoxMetadataTemplate object
리턴 Task

DeleteFileMetadataAsync() 공개 메소드

Used to delete the template instance. To delete custom key:value pairs within a template instance, you should refer to the updating metadata section.
public DeleteFileMetadataAsync ( string fileId, string scope, string template ) : Task
fileId string Id of file
scope string Scope name. Currently, the only scopes support are enterprise and global
template string Metadata template name
리턴 Task

DeleteFolderMetadataAsync() 공개 메소드

Used to delete the template instance. To delete custom key:value pairs within a template instance, you should refer to the updating metadata section.
public DeleteFolderMetadataAsync ( string folderId, string scope, string template ) : Task
folderId string Id of folder
scope string Scope name. Currently, only the enterprise scope is supported
template string Metadata template name
리턴 Task

GetAllFileMetadataTemplatesAsync() 공개 메소드

Used to retrieve all metadata associated with a given file
public GetAllFileMetadataTemplatesAsync ( string fileId ) : object>>>.Task
fileId string Id of file
리턴 object>>>.Task

GetAllFolderMetadataTemplatesAsync() 공개 메소드

Used to retrieve all metadata associated with a given folder
public GetAllFolderMetadataTemplatesAsync ( string folderId ) : object>>>.Task
folderId string Id of folder
리턴 object>>>.Task

GetEnterpriseMetadataAsync() 공개 메소드

Used to retrieve all metadata templates within a user's enterprise. Currently only the enterprise scope is supported.
public GetEnterpriseMetadataAsync ( string scope = "enterprise" ) : Task>
scope string Scope name. Currently, the only scopes support are enterprise and global
리턴 Task>

GetFileMetadataAsync() 공개 메소드

Used to retrieve the metadata template instance for a corresponding Box file.
public GetFileMetadataAsync ( string fileId, string scope, string template ) : object>>.Task
fileId string Id of file
scope string Scope name. Currently, the only scopes supported are enterprise and global
template string Metadata template name
리턴 object>>.Task

GetFolderMetadataAsync() 공개 메소드

Used to retrieve the metadata template instance for a corresponding Box folder.
public GetFolderMetadataAsync ( string folderId, string scope, string template ) : object>>.Task
folderId string Id of folder
scope string Scope name. Currently, only the enterprise scope is supported
template string Metadata template name
리턴 object>>.Task

GetMetadataTemplate() 공개 메소드

Used to retrieve the schema for a given metadata template.
public GetMetadataTemplate ( string scope, string template ) : Task
scope string Scope name. Currently, the only scopes supported are enterprise and global
template string Metadata template name
리턴 Task

UpdateFileMetadataAsync() 공개 메소드

Used to update the template instance. The request body must follow the JSON-Patch specification, which is represented as a JSON array of operation objects (see examples for more details). Updates can be either add, replace, remove , test, move, or copy. The template instance can only be updated if the template instance already exists. When editing metadata, only values that adhere to the metadata template schema will be accepted. The update is applied atomically. If any errors occur during the application of the update operations, the metadata instance remains unchanged.
public UpdateFileMetadataAsync ( string fileId, List updates, string scope, string template ) : object>>.Task
fileId string Id of file
updates List Metadata updates to apply
scope string Scope name. Currently, the only scopes support are enterprise and global
template string Metadata template name
리턴 object>>.Task

UpdateFolderMetadataAsync() 공개 메소드

Used to update the template instance. Updates can be either add, replace, remove , or test. The template instance can only be updated if the template instance already exists. When editing metadata, only values that adhere to the metadata template schema will be accepted.
public UpdateFolderMetadataAsync ( string folderId, List updates, string scope, string template ) : object>>.Task
folderId string Id of folder
updates List Metadata updates to apply
scope string Scope name. Currently, only the enterprise scope is supported
template string Metadata template name
리턴 object>>.Task

UpdateMetadataTemplate() 공개 메소드

Used to update the schema of an existing template.
public UpdateMetadataTemplate ( List metadataTemplateUpdate, string scope, string template ) : Task
metadataTemplateUpdate List BoxMetadataTemplateUpdate object
scope string Scope name. Currently, the only scopes supported are enterprise and global
template string Metadata template name
리턴 Task