public class SubmissionMediaParams extends BazaarParams
media| Constructor and Description |
|---|
SubmissionMediaParams(MediaParamsContentType contentType)
Create a new instance of SubmissionMediaParams with a given
"Content Type" parameter.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPostParameters(java.lang.String apiVersion,
java.lang.String passKey,
BazaarRequest request)
Add multipart parameters to the Http request
|
MediaParamsContentType |
getContentType()
Get the "Content Type" parameter for the submission.
|
java.lang.String |
getLocale()
Get the "Locale" parameter for the submission.
|
java.lang.String |
getPhotoUrl()
Get the "PhotoUrl" parameter for the submission.
|
java.lang.String |
getUserId()
Get the "UserId" parameter for the submission.
|
void |
setContentType(MediaParamsContentType contentType)
The content type for which this media is being submitted.
|
void |
setLocale(java.lang.String locale)
Locale to display Labels, Configuration, Product Attributes and Category Attributes in.
|
void |
setPhoto(android.graphics.Bitmap bitmap,
java.lang.String filename)
Sets photo directly from a bitmap
|
void |
setPhoto(byte[] bytes,
java.lang.String filename)
Set a photo as the media object.
|
void |
setPhoto(java.io.File file)
Read a file and set it as the media object.
|
void |
setPhotoUrl(java.lang.String photoUrl)
URL of the photo to be uploaded.
|
void |
setUserId(java.lang.String userId)
User's external ID.
|
void |
setVideo(byte[] bytes,
java.lang.String filename)
Set a video as the media object.
|
void |
setVideo(java.io.File file)
Read a file and set it as the media object.
|
protected java.lang.String |
toURL(java.lang.String apiVersion,
java.lang.String passKey)
Convert the class into a url parameters string.
|
addMultipartParameter, addMultipartParameter, addMultipartParameter, addNthURLParamsFromList, addToMap, addURLParameter, addURLParameter, addURLParameter, encode, getMediapublic SubmissionMediaParams(MediaParamsContentType contentType)
contentType - the content for which the media will be submittedpublic MediaParamsContentType getContentType()
public void setContentType(MediaParamsContentType contentType)
contentType - a content typepublic java.lang.String getLocale()
public void setLocale(java.lang.String locale)
locale - a localepublic java.lang.String getUserId()
public void setUserId(java.lang.String userId)
userId - a user idpublic void setPhoto(java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException
file - the file to read the data fromjava.io.FileNotFoundException - thrown if the file does not existjava.io.IOException - thrown if the file cannot be readpublic void setPhoto(byte[] bytes,
java.lang.String filename)
bytes - the raw photo data (jpeg, png etc)filename - the filename of the object. This is important for determining
the MIME type. Make sure you use the right extension for the
data, ie .jpg .avi etcpublic void setPhoto(android.graphics.Bitmap bitmap,
java.lang.String filename)
bitmap - the bitmap representation of the image to uploadfilename - the filename of the photo to upload -- this is necessary to determine mime typepublic java.lang.String getPhotoUrl()
public void setPhotoUrl(java.lang.String photoUrl)
photoUrl - a photo urlpublic void setVideo(java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException
file - the file to read the data fromjava.io.FileNotFoundException - thrown if the file does not existjava.io.IOException - thrown if the file cannot be readpublic void setVideo(byte[] bytes,
java.lang.String filename)
bytes - the raw video data (avi, etc)filename - the filename of the object. This is important for determining
the MIME type. Make sure you use the right extension for the
data, ie .jpg .avi etcprotected java.lang.String toURL(java.lang.String apiVersion,
java.lang.String passKey)
BazaarParamstoURL in class BazaarParamsapiVersion - Conversations API VersionpassKey - Conversations API Keyprotected void addPostParameters(java.lang.String apiVersion,
java.lang.String passKey,
BazaarRequest request)
BazaarParamsaddPostParameters in class BazaarParamsapiVersion - Conversations API VersionpassKey - Conversations API Keyrequest - Request that params should be added to