public class ImageXServiceImpl extends BaseServiceImpl implements IImageXService
apiInfoList, serviceInfo
getAccessKey, getApiInfoList, getHttpClient, getISigner, getRegion, getSecretKey, getServiceInfo, getSessionToken, getSignUrl, json, post, put, putData, putDataWithResponse, query, setAccessKey, setClientNoReuse, setConnectionTimeout, setHost, setHttpClient, setRegion, setScheme, setSecretKey, setServiceInfo, setSessionToken, setSocketTimeout, signSts2
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAccessKey, getRegion, getSecretKey, getSessionToken, getSignUrl, json, post, put, putData, query, setAccessKey, setClientNoReuse, setConnectionTimeout, setHost, setHttpClient, setRegion, setScheme, setSecretKey, setServiceInfo, setSessionToken, setSocketTimeout, signSts2
public static IImageXService getInstance()
public static IImageXService getInstance(String region) throws Exception
Exception
public ApplyImageUploadResponse applyImageUpload(ApplyImageUploadRequest req) throws Exception
IImageXService
applyImageUpload
in interface IImageXService
req
- the apply upload requestException
- the exceptionpublic CommitImageUploadResponse commitImageUpload(CommitImageUploadRequest req) throws Exception
IImageXService
commitImageUpload
in interface IImageXService
req
- the commit upload requestException
- the exceptionpublic CommitImageUploadResponse uploadImages(ApplyImageUploadRequest request, List<byte[]> imageDatas) throws Exception
IImageXService
uploadImages
in interface IImageXService
request
- the apply upload requestimageDatas
- image data arrayException
- the exceptionpublic String getUploadToken(Map<String,String> params) throws Exception
IImageXService
getUploadToken
in interface IImageXService
params
- the paramsException
- the exceptionpublic SecurityToken2 getUploadSts2(List<String> serviceIds) throws Exception
IImageXService
getUploadSts2
in interface IImageXService
serviceIds
- service id list allowed to upload image toException
- the exceptionpublic SecurityToken2 getUploadSts2WithExpire(List<String> serviceIds, long expire) throws Exception
IImageXService
getUploadSts2WithExpire
in interface IImageXService
serviceIds
- service id list allowed to upload image toexpire
- expire time in millisecondsException
- the exceptionpublic SecurityToken2 getUploadSts2WithKeyPtn(List<String> serviceIds, long expire, String keyPtn) throws Exception
IImageXService
getUploadSts2WithKeyPtn
in interface IImageXService
serviceIds
- service id list allowed to upload image toexpire
- expire time in millisecondskeyPtn
- upload store key pattern, * for no restriction. default to empty.Exception
- the exceptionpublic DeleteImageResp deleteImages(DeleteImageReq req) throws Exception
IImageXService
deleteImages
in interface IImageXService
req
- delete image reqException
- the exceptionpublic UpdateImageFilesResponse updateImageUrls(UpdateImageFilesRequest req) throws Exception
IImageXService
updateImageUrls
in interface IImageXService
req
- update image urls reqException
- the exceptionpublic CommonResponse getImageX(String action, Map<String,String> param) throws Exception
IImageXService
getImageX
in interface IImageXService
action
- api action nameparam
- api query paramException
- the exceptionpublic CommonResponse postImageX(String action, Map<String,String> param, Object req) throws Exception
IImageXService
postImageX
in interface IImageXService
action
- api action nameparam
- api query paramreq
- api json paramException
- the exceptionpublic GetImageOCRResponse getImageOCR(Map<String,String> param) throws Exception
IImageXService
getImageOCR
in interface IImageXService
param
- api query paramException
- the exceptionpublic EmbedImageHmResponse embedImageHm(EmbedImageHmRequest req) throws Exception
IImageXService
embedImageHm
in interface IImageXService
req
- embed image hm requestException
- the exceptionpublic ExtractImageHmResponse extractImageHm(ExtractImageHmRequest req) throws Exception
IImageXService
extractImageHm
in interface IImageXService
req
- extract hidden mark from imageException
- the exceptionpublic GetImageSegmentResponse getImageSegment(GetImageSegmentRequest req) throws Exception
IImageXService
getImageSegment
in interface IImageXService
req
- get image segment requestException
- the exceptionCopyright © 2022. All rights reserved.