Package org.cdlib.mrt.core
Class StorageAddClient
java.lang.Object
org.cdlib.mrt.core.StorageAddClient
AddClient for Storage
- Author:
- loy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addNameValue
(List<org.apache.http.NameValuePair> nvps, String key, String value) addVersion
(String link, int nodeID, Identifier objectID, String localContext, String localID, String manifestS, String urlS, Long size, String type, String value, String formatType, int timeout, int retry) addVersion
(String link, String nodeIDS, String objectIDS, String localContext, String localID, String manifestS, String urlS, String validate, String formatType) void
protected Properties
processResponse
(org.apache.http.HttpResponse response) org.apache.http.HttpResponse
sendAddMultipart
(String link, Integer nodeID, Identifier objectID, String localContext, String localID, File manifest, String url, Long size, String type, String value, String formatType) org.apache.http.HttpResponse
sendAddMultipart
(String link, Integer nodeID, Identifier objectID, String localContext, String localID, File manifest, String url, Long size, String type, String value, String formatType, int timeout) org.apache.http.HttpResponse
sendAddMultipartRetry
(String link, Integer nodeID, Identifier objectID, String localContext, String localID, File manifestFile, String urlS, Long size, String type, String value, String formatType, int timeout, int retry) getObject with timeout and retrysendAddMultipartRetryProperties
(String link, Integer nodeID, Identifier objectID, String localContext, String localID, File manifestFile, String urlS, Long size, String type, String value, String formatType, int timeout, int retry) Send a multipart storage add requestorg.apache.http.HttpResponse
sendAddPost
(String link, int nodeID, Identifier objectID, String context, String identifier, File manifest, String url, Long size, String type, String value, String formatType)
-
Field Details
-
NL
-
FORMAT_NAME_POST
- See Also:
-
FORMAT_NAME_MULTIPART
- See Also:
-
logger
-
-
Constructor Details
-
StorageAddClient
-
StorageAddClient
public StorageAddClient()
-
-
Method Details
-
addVersion
public Properties addVersion(String link, String nodeIDS, String objectIDS, String localContext, String localID, String manifestS, String urlS, String validate, String formatType) throws TException - Throws:
TException
-
addVersion
public Properties addVersion(String link, int nodeID, Identifier objectID, String localContext, String localID, String manifestS, String urlS, Long size, String type, String value, String formatType, int timeout, int retry) throws TException - Throws:
TException
-
sendAddMultipartRetry
public org.apache.http.HttpResponse sendAddMultipartRetry(String link, Integer nodeID, Identifier objectID, String localContext, String localID, File manifestFile, String urlS, Long size, String type, String value, String formatType, int timeout, int retry) throws TException getObject with timeout and retry- Parameters:
requestURL
- build inputStream to this URLtimeout
- milliseconds for timeoutretry
- number of retry attemps- Returns:
- InputStream to URL service
- Throws:
TException
-
sendAddMultipartRetryProperties
public Properties sendAddMultipartRetryProperties(String link, Integer nodeID, Identifier objectID, String localContext, String localID, File manifestFile, String urlS, Long size, String type, String value, String formatType, int timeout, int retry) throws TException Send a multipart storage add request- Parameters:
link
- base storage URLnodeID
- node identifierobjectID
- object identifierlocalContext
- authorization context for localIDlocalID
- local identifiermanifestFile
- manifest as file (exclusive of urlS)urlS
- link to manifest (exclusive of manifestFile)size
- size of manifest datatype
- checksumType of manifest datavalue
- checksum of manifest dataformatType
- output format typetimeout
- milli-seconds for timeoutretry
- number of retries- Returns:
- response properties
- Throws:
TException
-
processResponse
- Throws:
TException
-
sendAddMultipart
public org.apache.http.HttpResponse sendAddMultipart(String link, Integer nodeID, Identifier objectID, String localContext, String localID, File manifest, String url, Long size, String type, String value, String formatType) throws TException - Throws:
TException
-
sendAddMultipart
public org.apache.http.HttpResponse sendAddMultipart(String link, Integer nodeID, Identifier objectID, String localContext, String localID, File manifest, String url, Long size, String type, String value, String formatType, int timeout) throws TException - Throws:
TException
-
sendAddPost
public org.apache.http.HttpResponse sendAddPost(String link, int nodeID, Identifier objectID, String context, String identifier, File manifest, String url, Long size, String type, String value, String formatType) throws TException - Throws:
TException
-
log
-
addNameValue
-