|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.baidubce.AbstractBceClient
com.baidubce.services.doc.DocClient
public class DocClient
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.
Field Summary |
---|
Fields inherited from class com.baidubce.AbstractBceClient |
---|
config, DEFAULT_CONTENT_TYPE, DEFAULT_ENCODING, DEFAULT_SERVICE_DOMAIN, URL_PREFIX |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
CreateDocumentResponse |
createDocument(CreateDocumentRequest request)
Create a Document. |
CreateDocumentResponse |
createDocument(File file,
String title)
Create a Document. |
CreateDocumentResponse |
createDocument(File file,
String title,
String format)
Create a Document. |
CreateDocumentResponse |
createDocument(File file,
String title,
String format,
String notification)
Create a Document. |
CreateDocumentResponse |
createDocument(File file,
String title,
String format,
String notification,
String access)
Create a Document. |
CreateDocumentResponse |
createDocument(File file,
String title,
String format,
String notification,
String access,
String targetType)
Create a Document. |
CreateDocumentFromBosResponse |
createDocumentFromBos(CreateDocumentFromBosRequest request)
Create a Document. |
CreateDocumentFromBosResponse |
createDocumentFromBos(String bucket,
String object,
String title,
String format)
Create a Document. |
CreateDocumentFromBosResponse |
createDocumentFromBos(String bucket,
String object,
String title,
String format,
String notification)
Create a Document. |
CreateDocumentFromBosResponse |
createDocumentFromBos(String bucket,
String object,
String title,
String format,
String notification,
String access)
Create a Document. |
CreateDocumentFromBosResponse |
createDocumentFromBos(String bucket,
String object,
String title,
String format,
String notification,
String access,
String targetType)
Create a Document. |
CreateNotificationResponse |
createNotification(CreateNotificationRequest request)
Create a doc notification in the doc stream service. |
CreateNotificationResponse |
createNotification(String name,
String endpoint)
Create a doc notification in the doc stream service. |
DeleteDocumentResponse |
deleteDocument(DeleteDocumentRequest request)
delete a Document. |
DeleteDocumentResponse |
deleteDocument(String documentId)
delete a Document. |
DeleteNotificationResponse |
deleteNotification(DeleteNotificationRequest request)
Delete your doc notification by doc notification name. |
DeleteNotificationResponse |
deleteNotification(String name)
Delete your doc notification by doc notification name. |
DisableReadTokenResponse |
disableReadToken(DisableReadTokenRequest request)
Disable read token. |
DisableReadTokenResponse |
disableReadToken(String documentId,
String token)
Disable read token. |
GetDocumentResponse |
getDocument(GetDocumentRequest request)
get a Document. |
GetDocumentResponse |
getDocument(String documentId)
get a Document. |
GetDocumentDownloadResponse |
getDocumentDownload(String documentId)
get a Document Download link. |
GetDocumentDownloadResponse |
getDocumentDownload(String documentId,
long expireInSeconds)
get a Document Download link. |
GetDocumentImagesResponse |
getDocumentImages(String documentId)
get a Document Image list if Converted to image. |
GetNotificationResponse |
getNotification(GetNotificationRequest request)
Get your doc notification by doc notification name. |
GetNotificationResponse |
getNotification(String name)
Get your doc notification by doc notification name. |
boolean |
isRegionSupported()
Returns true if the target service supports regions. |
ListDocumentsResponse |
listDocuments()
list all Document. |
ListDocumentsResponse |
listDocuments(String status)
list all Document by status. |
ListDocumentsResponse |
listDocuments(String status,
String marker,
int maxSize)
list all Document by status, marker. |
ListNotificationsResponse |
listNotifications()
List all your doc notifications. |
ReadDocumentResponse |
readDocument(ReadDocumentRequest request)
read a Document, get document reader infomation. |
ReadDocumentResponse |
readDocument(String documentId)
read a Document, get document reader infomation. |
ReadDocumentResponse |
readDocument(String documentId,
long expireInSeconds)
read a Document, get document reader infomation. |
Methods inherited from class com.baidubce.AbstractBceClient |
---|
getClient, getEndpoint, getServiceId, invokeHttpClient, setClient, shutdown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DocClient()
public DocClient(BceClientConfiguration clientConfiguration)
clientConfiguration
- The client configuration options controlling how this client
connects to Document services (e.g. proxy settings, retry counts, etc).Method Detail |
---|
public boolean isRegionSupported()
AbstractBceClient
The result will impact the construction of default service endpoint.
isRegionSupported
in class AbstractBceClient
public CreateDocumentResponse createDocument(File file, String title, String format)
file
- The document .title
- The document title.format
- The document format.
public CreateDocumentResponse createDocument(File file, String title)
file
- The document .title
- The document title.
public CreateDocumentResponse createDocument(File file, String title, String format, String notification)
file
- The document .title
- The document title.format
- The document format.notification
- The document notification name.
public CreateDocumentResponse createDocument(File file, String title, String format, String notification, String access)
file
- The document .title
- The document title.format
- The document format.notification
- The document notification name.access
- The document access privilege(PUBLIC/PRIVATE).
public CreateDocumentResponse createDocument(File file, String title, String format, String notification, String access, String targetType)
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).
public CreateDocumentResponse createDocument(CreateDocumentRequest request)
request
- The request object containing all the parameters to upload a new doc.
public CreateDocumentFromBosResponse createDocumentFromBos(String bucket, String object, String title, String format, String notification)
bucket
- The document bucket.object
- The document object.title
- The document title.format
- The document format.notification
- The document notification name.
public CreateDocumentFromBosResponse createDocumentFromBos(String bucket, String object, String title, String format, String notification, String access)
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).
public CreateDocumentFromBosResponse createDocumentFromBos(String bucket, String object, String title, String format, String notification, String access, String targetType)
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).
public CreateDocumentFromBosResponse createDocumentFromBos(String bucket, String object, String title, String format)
bucket
- The document bucket.object
- The document object.title
- The document title.format
- The document format.
public CreateDocumentFromBosResponse createDocumentFromBos(CreateDocumentFromBosRequest request)
request
- The request object containing all the parameters to upload a new doc.
public GetDocumentResponse getDocument(String documentId)
documentId
- The document id.
public GetDocumentResponse getDocument(GetDocumentRequest request)
request
- The request object containing a docId.
public GetDocumentImagesResponse getDocumentImages(String documentId)
documentId
- the documentId need to get.
public ListDocumentsResponse listDocuments()
public ListDocumentsResponse listDocuments(String status)
status
- the status
public ListDocumentsResponse listDocuments(String status, String marker, int maxSize)
status
- document statusmarker
- the marker, can be ""maxSize
- the maxSize, should be (0, 200]
public DeleteDocumentResponse deleteDocument(String documentId)
documentId
- The document id.
public DeleteDocumentResponse deleteDocument(DeleteDocumentRequest request)
request
- The request object containing a docId.
public GetDocumentDownloadResponse getDocumentDownload(String documentId)
documentId
- the documentId need to download.
public GetDocumentDownloadResponse getDocumentDownload(String documentId, long expireInSeconds)
documentId
- the documentId need to download.expireInSeconds
- the Download link expire time in second. -1 set never expire.
public ReadDocumentResponse readDocument(String documentId)
documentId
- The document id.
public ReadDocumentResponse readDocument(String documentId, long expireInSeconds)
documentId
- The document id.expireInSeconds
- The expire time
public ReadDocumentResponse readDocument(ReadDocumentRequest request)
request
- The request object containing a documentId.
public DisableReadTokenResponse disableReadToken(String documentId, String token)
documentId
- The document id.token
- The token need to disable
public DisableReadTokenResponse disableReadToken(DisableReadTokenRequest request)
request
- The request object containing a documentId.
public ListNotificationsResponse listNotifications()
public DeleteNotificationResponse deleteNotification(String name)
name
- doc notification name.
public DeleteNotificationResponse deleteNotification(DeleteNotificationRequest request)
request
- The request object containing all parameters for deleting dco notification.
public GetNotificationResponse getNotification(String name)
name
- doc notification name.
public GetNotificationResponse getNotification(GetNotificationRequest request)
request
- The request object containing all parameters for getting doc notification.
public CreateNotificationResponse createNotification(String name, String endpoint)
name
- The name of notification.endpoint
- The address to receive notification message.
public CreateNotificationResponse createNotification(CreateNotificationRequest request)
request
- The request object containing all options for creating doc notification.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |