类 DocClient
- java.lang.Object
-
- com.baidubce.AbstractBceClient
-
- com.baidubce.services.doc.DocClient
-
public class DocClient extends AbstractBceClient
Client for accessing Document Transcoder Services. All service calls made using this client are blocking, and will not return until the service call completes. Created by xuchuan on 2015/4/20.
-
-
字段概要
-
从类继承的字段 com.baidubce.AbstractBceClient
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX
-
-
构造器概要
构造器 构造器 说明 DocClient()Constructs a new Document client to invoke service methods on Document Transcoder.DocClient(BceClientConfiguration clientConfiguration)Constructs a new client using the client configuration to access Document Transcoder services.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 CreateDocumentResponsecreateDocument(CreateDocumentRequest request)Create a Document.CreateDocumentResponsecreateDocument(File file, String title)Create a Document.CreateDocumentResponsecreateDocument(File file, String title, String format)Create a Document.CreateDocumentResponsecreateDocument(File file, String title, String format, String notification)Create a Document.CreateDocumentResponsecreateDocument(File file, String title, String format, String notification, String access)Create a Document.CreateDocumentResponsecreateDocument(File file, String title, String format, String notification, String access, String targetType)Create a Document.CreateDocumentFromBosResponsecreateDocumentFromBos(CreateDocumentFromBosRequest request)Create a Document.CreateDocumentFromBosResponsecreateDocumentFromBos(String bucket, String object, String title, String format)Create a Document.CreateDocumentFromBosResponsecreateDocumentFromBos(String bucket, String object, String title, String format, String notification)Create a Document.CreateDocumentFromBosResponsecreateDocumentFromBos(String bucket, String object, String title, String format, String notification, String access)Create a Document.CreateDocumentFromBosResponsecreateDocumentFromBos(String bucket, String object, String title, String format, String notification, String access, String targetType)Create a Document.CreateNotificationResponsecreateNotification(CreateNotificationRequest request)Create a doc notification in the doc stream service.CreateNotificationResponsecreateNotification(String name, String endpoint)Create a doc notification in the doc stream service.DeleteDocumentResponsedeleteDocument(DeleteDocumentRequest request)delete a Document.DeleteDocumentResponsedeleteDocument(String documentId)delete a Document.DeleteNotificationResponsedeleteNotification(DeleteNotificationRequest request)Delete your doc notification by doc notification name.DeleteNotificationResponsedeleteNotification(String name)Delete your doc notification by doc notification name.DisableReadTokenResponsedisableReadToken(DisableReadTokenRequest request)Disable read token.DisableReadTokenResponsedisableReadToken(String documentId, String token)Disable read token.GetDocumentResponsegetDocument(GetDocumentRequest request)get a Document.GetDocumentResponsegetDocument(String documentId)get a Document.GetDocumentDownloadResponsegetDocumentDownload(String documentId)get a Document Download link.GetDocumentDownloadResponsegetDocumentDownload(String documentId, long expireInSeconds)get a Document Download link.GetDocumentImagesResponsegetDocumentImages(String documentId)get a Document Image list if Converted to image.GetNotificationResponsegetNotification(GetNotificationRequest request)Get your doc notification by doc notification name.GetNotificationResponsegetNotification(String name)Get your doc notification by doc notification name.booleanisRegionSupported()Returns true if the target service supports regions.ListDocumentsResponselistDocuments()list all Document.ListDocumentsResponselistDocuments(String status)list all Document by status.ListDocumentsResponselistDocuments(String status, String marker, int maxSize)list all Document by status, marker.ListNotificationsResponselistNotifications()List all your doc notifications.ReadDocumentResponsereadDocument(ReadDocumentRequest request)read a Document, get document reader infomation.ReadDocumentResponsereadDocument(String documentId)read a Document, get document reader infomation.ReadDocumentResponsereadDocument(String documentId, long expireInSeconds)read a Document, get document reader infomation.-
从类继承的方法 com.baidubce.AbstractBceClient
computeBktVirEndpoint, computeServiceId, getBktVirEndpoint, getClient, getEndpoint, getServiceId, invokeHttpClient, setClient, shutdown
-
-
-
-
构造器详细资料
-
DocClient
public DocClient()
Constructs a new Document client to invoke service methods on Document Transcoder.
-
DocClient
public DocClient(BceClientConfiguration clientConfiguration)
Constructs a new client using the client configuration to access Document Transcoder services.- 参数:
clientConfiguration- The client configuration options controlling how this client connects to Document services (e.g. proxy settings, retry counts, etc).
-
-
方法详细资料
-
isRegionSupported
public boolean isRegionSupported()
从类复制的说明:AbstractBceClientReturns true if the target service supports regions.The result will impact the construction of default service endpoint.
- 覆盖:
isRegionSupported在类中AbstractBceClient- 返回:
- true if the target service supports regions.
-
createDocument
public CreateDocumentResponse createDocument(File file, String title, String format)
Create a Document.- 参数:
file- The document .title- The document title.format- The document format.- 返回:
- A CreateDocumentResponse object containing the information returned by Document.
-
createDocument
public CreateDocumentResponse createDocument(File file, String title)
Create a Document.- 参数:
file- The document .title- The document title.- 返回:
- A CreateDocumentResponse object containing the information returned by Document.
-
createDocument
public CreateDocumentResponse createDocument(File file, String title, String format, String notification)
Create a Document.- 参数:
file- The document .title- The document title.format- The document format.notification- The document notification name.- 返回:
- A CreateDocumentResponse object containing the information returned by Document.
-
createDocument
public CreateDocumentResponse createDocument(File file, String title, String format, String notification, String access)
Create a Document.- 参数:
file- The document .title- The document title.format- The document format.notification- The document notification name.access- The document access privilege(PUBLIC/PRIVATE).- 返回:
- A CreateDocumentResponse object containing the information returned by Document.
-
createDocument
public CreateDocumentResponse createDocument(File file, String title, String format, String notification, String access, String targetType)
Create a Document.- 参数:
file- The document .title- The document title.format- The document format.notification- The document notification name.access- The document access privilege(PUBLIC/PRIVATE).targetType- The document converts type(h5/image).- 返回:
- A CreateDocumentResponse object containing the information returned by Document.
-
createDocument
public CreateDocumentResponse createDocument(CreateDocumentRequest request)
Create a Document.- 参数:
request- The request object containing all the parameters to upload a new doc.- 返回:
- A CreateDocumentResponse object containing the information returned by Document.
-
createDocumentFromBos
public CreateDocumentFromBosResponse createDocumentFromBos(String bucket, String object, String title, String format, String notification)
Create a Document.- 参数:
bucket- The document bucket.object- The document object.title- The document title.format- The document format.notification- The document notification name.- 返回:
- A CreateDocumentFromBosResponse object containing the information returned by Document.
-
createDocumentFromBos
public CreateDocumentFromBosResponse createDocumentFromBos(String bucket, String object, String title, String format, String notification, String access)
Create a Document.- 参数:
bucket- The document bucket.object- The document object.title- The document title.format- The document format.notification- The document notification name.access- The document access privilege(PUBLIC/PRIVATE).- 返回:
- A CreateDocumentFromBosResponse object containing the information returned by Document.
-
createDocumentFromBos
public CreateDocumentFromBosResponse createDocumentFromBos(String bucket, String object, String title, String format, String notification, String access, String targetType)
Create a Document.- 参数:
bucket- The document bucket.object- The document object.title- The document title.format- The document format.notification- The document notification name.access- The document access privilege(PUBLIC/PRIVATE).targetType- The document converts type(h5/image).- 返回:
- A CreateDocumentFromBosResponse object containing the information returned by Document.
-
createDocumentFromBos
public CreateDocumentFromBosResponse createDocumentFromBos(String bucket, String object, String title, String format)
Create a Document.- 参数:
bucket- The document bucket.object- The document object.title- The document title.format- The document format.- 返回:
- A CreateDocumentFromBosResponse object containing the information returned by Document.
-
createDocumentFromBos
public CreateDocumentFromBosResponse createDocumentFromBos(CreateDocumentFromBosRequest request)
Create a Document.- 参数:
request- The request object containing all the parameters to upload a new doc.- 返回:
- A CreateDocumentResponse object containing the information returned by Document.
-
getDocument
public GetDocumentResponse getDocument(String documentId)
get a Document.- 参数:
documentId- The document id.- 返回:
- A GetDocumentResponse object containing the information returned by Document.
-
getDocument
public GetDocumentResponse getDocument(GetDocumentRequest request)
get a Document.- 参数:
request- The request object containing a docId.- 返回:
- A GetDocumentResponse object containing the information returned by Document.
-
getDocumentImages
public GetDocumentImagesResponse getDocumentImages(String documentId)
get a Document Image list if Converted to image. Make Sure the Document convert type is image, otherwise will throw BceServiceException- 参数:
documentId- the documentId need to get.- 返回:
- A GetDocumentImageResponse object containing the information returned by Document.
-
listDocuments
public ListDocumentsResponse listDocuments()
list all Document.- 返回:
- A ListDocumentsResponse object containing the information returned by Document.
-
listDocuments
public ListDocumentsResponse listDocuments(String status)
list all Document by status.- 参数:
status- the status- 返回:
- A ListDocumentsResponse object containing the information returned by Document.
-
listDocuments
public ListDocumentsResponse listDocuments(String status, String marker, int maxSize)
list all Document by status, marker.- 参数:
status- document statusmarker- the marker, can be ""maxSize- the maxSize, should be (0, 200]- 返回:
- A ListDocumentsResponse object containing the information returned by Document.
-
deleteDocument
public DeleteDocumentResponse deleteDocument(String documentId)
delete a Document.- 参数:
documentId- The document id.- 返回:
- A DeleteDocumentResponse object containing the information returned by Document.
-
deleteDocument
public DeleteDocumentResponse deleteDocument(DeleteDocumentRequest request)
delete a Document.- 参数:
request- The request object containing a docId.- 返回:
- A DeleteDocumentResponse object containing the information returned by Document.
-
getDocumentDownload
public GetDocumentDownloadResponse getDocumentDownload(String documentId)
get a Document Download link.- 参数:
documentId- the documentId need to download.- 返回:
- A GetDocumentDownloadResponse object containing the information returned by Document.
-
getDocumentDownload
public GetDocumentDownloadResponse getDocumentDownload(String documentId, long expireInSeconds)
get a Document Download link.- 参数:
documentId- the documentId need to download.expireInSeconds- the Download link expire time in second. -1 set never expire.- 返回:
- A GetDocumentDownloadResponse object containing the information returned by Document.
-
readDocument
public ReadDocumentResponse readDocument(String documentId)
read a Document, get document reader infomation.- 参数:
documentId- The document id.- 返回:
- A ReadDocumentResponse object containing the information returned by Document.
-
readDocument
public ReadDocumentResponse readDocument(String documentId, long expireInSeconds)
read a Document, get document reader infomation.- 参数:
documentId- The document id.expireInSeconds- The expire time- 返回:
- A ReadDocumentResponse object containing the information returned by Document.
-
readDocument
public ReadDocumentResponse readDocument(ReadDocumentRequest request)
read a Document, get document reader infomation.- 参数:
request- The request object containing a documentId.- 返回:
- A ReadDocumentResponse object containing the information returned by Document.
-
disableReadToken
public DisableReadTokenResponse disableReadToken(String documentId, String token)
Disable read token.- 参数:
documentId- The document id.token- The token need to disable- 返回:
- A DisableReadTokenResponse object.
-
disableReadToken
public DisableReadTokenResponse disableReadToken(DisableReadTokenRequest request)
Disable read token.- 参数:
request- The request object containing a documentId.- 返回:
- A DisableReadTokenResponse object.
-
listNotifications
public ListNotificationsResponse listNotifications()
List all your doc notifications.- 返回:
- The list of all your doc notifications
-
deleteNotification
public DeleteNotificationResponse deleteNotification(String name)
Delete your doc notification by doc notification name.- 参数:
name- doc notification name.- 返回:
- the response
-
deleteNotification
public DeleteNotificationResponse deleteNotification(DeleteNotificationRequest request)
Delete your doc notification by doc notification name.- 参数:
request- The request object containing all parameters for deleting dco notification.- 返回:
- the response
-
getNotification
public GetNotificationResponse getNotification(String name)
Get your doc notification by doc notification name.- 参数:
name- doc notification name.- 返回:
- Your doc notification.
-
getNotification
public GetNotificationResponse getNotification(GetNotificationRequest request)
Get your doc notification by doc notification name.- 参数:
request- The request object containing all parameters for getting doc notification.- 返回:
- Your doc notification.
-
createNotification
public CreateNotificationResponse createNotification(String name, String endpoint)
Create a doc notification in the doc stream service.- 参数:
name- The name of notification.endpoint- The address to receive notification message.- 返回:
- the response
-
createNotification
public CreateNotificationResponse createNotification(CreateNotificationRequest request)
Create a doc notification in the doc stream service.- 参数:
request- The request object containing all options for creating doc notification.- 返回:
- the response
-
-