| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IOBiz
API for importing and exporting media.
| Nested Class Summary | |
|---|---|
| static interface | IOBiz.TwoPhaseExportRequestExtension of WorkBiz.WorkRequestto allow for two-phase export
 media reqeust handling. | 
| Field Summary | |
|---|---|
| static java.lang.String | IMPORT_MEDIA_XML_METADATA_NAMEThe name of the XML metadata file within a zip archive used by importMedia(AddMediaCommand, BizContext). | 
| Method Summary | |
|---|---|
|  int | clearCacheFiles(User user,
                java.util.Set<MediaSize> ofSize)Clear all cache files for a particular user, optionally of a particular size only. | 
|  int | deleteMedia(java.util.List<MediaItem> itemsToDelete)Delete media item files. | 
|  WorkBiz.WorkInfo | exportItems(ExportItemsCommand command,
            MediaRequest request,
            MediaResponse response,
            BizContext context)Export a set of media items as a Zip archive. | 
|  WorkBiz.WorkInfo | exportMedia(MediaRequest request,
            MediaResponse response,
            BizContext context)Export media from the application. | 
|  WorkBiz.WorkInfo | importMedia(AddMediaCommand command,
            BizContext context)Import media into the application. | 
|  int | moveMedia(java.util.List<MediaItem> itemsToMove,
          Collection toCollection)Move media item files to a new directory. | 
| Field Detail | 
|---|
static final java.lang.String IMPORT_MEDIA_XML_METADATA_NAME
importMedia(AddMediaCommand, BizContext).
| Method Detail | 
|---|
WorkBiz.WorkInfo importMedia(AddMediaCommand command,
                             BizContext context)
This method is designed to allow for imports that take 
 some time to run, and thus should happen asynchronously. Thus 
 a WorkInfo object is returned, which will give
 details of the status of the import job. The 
 WorkBiz.getInfo(long) method can be used to query the 
 status of the job at a later point, using the ticket returned
 by WorkBiz.WorkInfo.getTicket().
command - the media to importcontext - the biz context
WorkBiz.WorkInfo exportMedia(MediaRequest request,
                             MediaResponse response,
                             BizContext context)
request - the requestresponse - the responsecontext - the biz context
WorkBiz.WorkInfo exportItems(ExportItemsCommand command,
                             MediaRequest request,
                             MediaResponse response,
                             BizContext context)
If ExportItemsCommand.getAlbumId() or 
 ExportItemsCommand.getAlbumKey() is non-null, then this will
 export all the items of that album into a zip archive. Otherwise
 it will export all the items specified by 
 ExportItemsCommand.getItemIds(). The quality and 
 size parameters are not used, it will instead rely on 
 the setting in the MediaRequest.
This method should support two-phase procesing if the 
 MediaResponse is null. The method should return a 
 WorkInfo as normal but the WorkRequest returned by
 WorkBiz.WorkInfo.getWorkRequest() must implement IOBiz.TwoPhaseExportRequest.
 The work to export the items should not begin until a later time when 
 IOBiz.TwoPhaseExportRequest.setMediaResponse(MediaResponse)
 is called. The implementation must wait only for a finite amount
 of time for setMediaResponse to be called, after which time 
 the job can be discarded.
This is to allow for flexibility with the calling applicaiton GUI where the work ticket is needed before the actual OutputStream is ready for the exported items.
command - the export commandrequest - the request (for all media in the album)response - the responsecontext - the context
int deleteMedia(java.util.List<MediaItem> itemsToDelete)
This method deletes the files associated with the MediaItem instances, but does not delete the MediaItem instances from the backend database. It should also clean up any cache files for the associated items.
itemsToDelete - the items to delete
int moveMedia(java.util.List<MediaItem> itemsToMove,
              Collection toCollection)
itemsToMove - the items to movetoCollection - the Collection to move them to
int clearCacheFiles(User user,
                    java.util.Set<MediaSize> ofSize)
user - the user to clear cache files forofSize - if specified, a set of sizes to clear
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||