Skip navigation links

JD Edwards EnterpriseOne Mobile Framework Java API Reference

Release 1.0.0

E58374-01


com.oracle.e1.jdemf.mediaobject
Class MediaObjectOperations

java.lang.Object
  extended by com.oracle.e1.jdemf.mediaobject.MediaObjectOperations


public abstract class MediaObjectOperations
extends java.lang.Object

MediaObjectOperations Class provides an API for applications to access media objects in EnterpriseOne. Operations supported: list, upload, download, delete.


Field Summary
static java.lang.String HIDE_LOADING_JS_FUNCTION
           
static java.lang.String SHOW_LOADING_JS_FUNCTION
           

 

Constructor Summary
MediaObjectOperations()
           

 

Method Summary
static void deleteAllImagesfromFile(FileAttachment[] fileAttachments)
          deleteAllImagesfromFile deletes all of the files stored on the device based on the list of file attachments
static MediaObjectDeleteResponse deleteMediaObject(MediaObjectDeleteRequest mediaObjectDeleteRequest)
          deleteMediaObject will delete the attachment based on the media object structure, key and squence
static MediaObjectDownloadResponse downloadMediaObject(MediaObjectDownloadRequest mediaObjectDownloadRequest)
          downloadMediaObject allows you to request a single media object file based on the media object structure, key and sequence number, file will be saved to specified download directory location (if not provided the file will not be saved and no file location will be provided in the MediaObjectDownloadResponse).
static FileAttachment fromAlbum(int quality, boolean allowEdit, int targetWidth, int targetHeight)
          Invokes the device manager 'fromAlbum' function to get an image from the album, it re-names the image in the file system with a unique name.
static FileAttachment fromCamera(int quality, boolean allowEdit, int targetWidth, int targetHeight)
          Invokes the device manager 'fromCamera' function to get an image from the device camera, it re-names the image in the file system with a unique name.
static MediaObjectListResponse getMediaObjectList(MediaObjectListRequest mediaObjectListRequest)
          getMediaObjectList - returns the list of media objects based on structure and key, if indicated the list will include base64 encoded thumbnail of images
static MediaObjectGetTextResponse getTextMediaObject(MediaObjectGetTextRequest mediaObgetTextRequest)
          getTextMediaObject allows you to request the text of the first text media object based on the media object structure, key
static int PhotoCount(java.lang.String moKeyValue, java.lang.String moStructure, java.lang.String formName, java.lang.String version)
          photoCount returns the count of photos (jpg,png,gif,jpeg) stored for that media object structure and key, form name and version must be provided for security.
static void removeFromFileSystem(java.lang.String fileLocation)
          Removes a file from the device file system based on file location
static java.lang.String replaceAll(java.lang.String str, java.lang.String replace, java.lang.String replacement)
          replaceAll utility, replacess all strings matching the second parameter with the string in the third parameter, result is returned through the call
static MediaObjectUpdateTextResponse updateTextMediaObject(MediaObjectUpdateTextRequest mediaObgetUpdateTextRequest)
          updateTextMediaObject allows you to update the first text media ogject based on the media object structure, key
static MediaObjectUploadResponse uploadMediaObject(MediaObjectUploadRequest mediaObjectUploadRequest)
          uploadMediaObject - will upload a single file to the media object based on structure and key
static int uploadSignatureToMO(java.lang.String base64Data)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

SHOW_LOADING_JS_FUNCTION

public static final java.lang.String SHOW_LOADING_JS_FUNCTION
See Also:
Constant Field Values

HIDE_LOADING_JS_FUNCTION

public static final java.lang.String HIDE_LOADING_JS_FUNCTION
See Also:
Constant Field Values

Constructor Detail

MediaObjectOperations

public MediaObjectOperations()

Method Detail

getTextMediaObject

public static MediaObjectGetTextResponse getTextMediaObject(MediaObjectGetTextRequest mediaObgetTextRequest)
                                                     throws java.lang.Exception
getTextMediaObject allows you to request the text of the first text media object based on the media object structure, key
Parameters:
mediaObjectTextRequest -
Returns:
MediaObjectGetTextResponse
Throws:
java.lang.Exception

updateTextMediaObject

public static MediaObjectUpdateTextResponse updateTextMediaObject(MediaObjectUpdateTextRequest mediaObgetUpdateTextRequest)
                                                           throws java.lang.Exception
updateTextMediaObject allows you to update the first text media ogject based on the media object structure, key
Parameters:
mediaObjectUpdateTextRequest -
Returns:
MediaObjectGetTextResponse
Throws:
java.lang.Exception

downloadMediaObject

public static MediaObjectDownloadResponse downloadMediaObject(MediaObjectDownloadRequest mediaObjectDownloadRequest)
                                                       throws java.lang.Exception
downloadMediaObject allows you to request a single media object file based on the media object structure, key and sequence number, file will be saved to specified download directory location (if not provided the file will not be saved and no file location will be provided in the MediaObjectDownloadResponse).
Parameters:
mediaObjectDownloadRequest -
downloadDirectory -
Returns:
MediaObjectDownloadResponse
Throws:
java.lang.Exception

removeFromFileSystem

public static void removeFromFileSystem(java.lang.String fileLocation)
                                 throws java.lang.Exception
Removes a file from the device file system based on file location
Parameters:
fileLocation -
Throws:
java.lang.Exception

deleteAllImagesfromFile

public static void deleteAllImagesfromFile(FileAttachment[] fileAttachments)
                                    throws java.lang.Exception
deleteAllImagesfromFile deletes all of the files stored on the device based on the list of file attachments
Parameters:
fileAttachments -
Throws:
java.lang.Exception

getMediaObjectList

public static MediaObjectListResponse getMediaObjectList(MediaObjectListRequest mediaObjectListRequest)
                                                  throws java.lang.Exception
getMediaObjectList - returns the list of media objects based on structure and key, if indicated the list will include base64 encoded thumbnail of images
Parameters:
mediaObjectListRequest -
Returns:
MediaObjectListResponse
Throws:
java.lang.Exception

replaceAll

public static java.lang.String replaceAll(java.lang.String str,
                                          java.lang.String replace,
                                          java.lang.String replacement)
replaceAll utility, replacess all strings matching the second parameter with the string in the third parameter, result is returned through the call
Parameters:
str -
replace -
replacement -
Returns:

uploadMediaObject

public static MediaObjectUploadResponse uploadMediaObject(MediaObjectUploadRequest mediaObjectUploadRequest)
                                                   throws java.lang.Exception
uploadMediaObject - will upload a single file to the media object based on structure and key
Parameters:
mediaObjectUploadRequest -
Returns:
MediaObjectUploadResponse
Throws:
java.lang.Exception

deleteMediaObject

public static MediaObjectDeleteResponse deleteMediaObject(MediaObjectDeleteRequest mediaObjectDeleteRequest)
                                                   throws java.lang.Exception
deleteMediaObject will delete the attachment based on the media object structure, key and squence
Parameters:
mediaObjectDeleteRequest -
Returns:
MediaObjectDeleteResponse
Throws:
java.lang.Exception

fromAlbum

public static FileAttachment fromAlbum(int quality,
                                       boolean allowEdit,
                                       int targetWidth,
                                       int targetHeight)
Invokes the device manager 'fromAlbum' function to get an image from the album, it re-names the image in the file system with a unique name.
For Android OS it uses base64 method to get the file For iOS it uses the file URI method
Parameters:
quality -
allowEdit -
targetWidth -
targetHeight -
Returns:

fromCamera

public static FileAttachment fromCamera(int quality,
                                        boolean allowEdit,
                                        int targetWidth,
                                        int targetHeight)
Invokes the device manager 'fromCamera' function to get an image from the device camera, it re-names the image in the file system with a unique name.
Parameters:
quality -
allowEdit -
targetWidth -
targetHeight -
Returns:

PhotoCount

public static int PhotoCount(java.lang.String moKeyValue,
                             java.lang.String moStructure,
                             java.lang.String formName,
                             java.lang.String version)
photoCount returns the count of photos (jpg,png,gif,jpeg) stored for that media object structure and key, form name and version must be provided for security.
Parameters:
moKeyValue -
moStructure -
formName -
version -
Returns:
int- the number of photos

uploadSignatureToMO

public static int uploadSignatureToMO(java.lang.String base64Data)

Skip navigation links

JD Edwards EnterpriseOne Mobile Framework Java API Reference

Release 1.0.0

E58374-01


Copyright © 2014 Oracle and/or its affiliates. All Rights Reserved.