ogre.dms.util.client
Class PhysicalDocumentTransferTool

java.lang.Object
  extended by ogre.dms.util.client.PhysicalDocumentTransferTool

public class PhysicalDocumentTransferTool
extends Object

This is a utility class for DMS client to upload or download physical document through PhysicalDocumentAccessService.

Version:
$Id: PhysicalDocumentTransferTool.java,v 1.2.2.16.2.8.2.1 2010/11/16 05:00:51 esso Exp $

Constructor Summary
PhysicalDocumentTransferTool(PhysicalDocumentAccessService pdaService)
           
 
Method Summary
 void downloadEFromPhysicalDocument(String userID, String pDocKey, OutputStream os, String downloadType, boolean ignoreLock)
          Download PhysicalDocumentItem from EForm.
 void downloadEFromPhysicalDocument(String userID, String pDocKey, OutputStream os, String downloadType, boolean ignoreLock, String mainDocKey)
           
 void downloadExtPhysicalDocument(String userID, String pDocKey, OutputStream os, String downloadType, boolean ignoreLock, String shortcutID)
           
 void downloadPasoPdf(String userID, String pasoID, OutputStream os)
           
 void downloadPhysicalDocument(String userID, String pDocKey, OutputStream os)
           
 void downloadPhysicalDocument(String userID, String pDocKey, OutputStream os, String downloadType, boolean ignoreLock)
           
 void generateWatermarkOnSample(String templateID, String typeName, OutputStream os)
           
 String getDownloadFileName(String userID, String pdocKey, String downloadType, String EFORMMode)
           
 String getDownloadFileName(String userID, String pdocKey, String downloadType, String EFORMMode, String mainDocKey)
           
 String getSubName(String fileName)
           
 void uploadNewPhysicalDocument(String userID, String documentKey, String extension, String originalFileName, InputStream is)
          Upload a file (PhysicalDocumentItem) for a document.
 String uploadPasoFile(String userID, String originalFileName, int originalFileSize, InputStream is)
           
 void uploadPhysicalDocument(String userID, String pDocKey, InputStream is)
          Replace a file (PhysicalDocumentItem).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PhysicalDocumentTransferTool

public PhysicalDocumentTransferTool(PhysicalDocumentAccessService pdaService)
Method Detail

uploadNewPhysicalDocument

public void uploadNewPhysicalDocument(String userID,
                                      String documentKey,
                                      String extension,
                                      String originalFileName,
                                      InputStream is)
Upload a file (PhysicalDocumentItem) for a document.

Parameters:
userID - - UserID of the user who try to upload a new physical document for the specified document
documentKey - - the key of the document which the user wanna upload a new physical document for it
extension - - the type of the uploading physical document
originalFileName - - the original file name of the uploading physical document
is - - the InputStream of the target uploading file

uploadPhysicalDocument

public void uploadPhysicalDocument(String userID,
                                   String pDocKey,
                                   InputStream is)
Replace a file (PhysicalDocumentItem).

Parameters:
userID - - UserID of the user who try to upload (update) a physical document to the server
pDocKey - - Key of target uploading physical document
is - - the InputStream of the target uploading file

uploadPasoFile

public String uploadPasoFile(String userID,
                             String originalFileName,
                             int originalFileSize,
                             InputStream is)
Parameters:
userID - - Member ID
is - - the InputStream of the target uploading file
extension - - the type of the uploading physical document
originalFileName - - the original file name of the uploading physical document

downloadPasoPdf

public void downloadPasoPdf(String userID,
                            String pasoID,
                            OutputStream os)
                     throws Exception
Throws:
Exception

getSubName

public String getSubName(String fileName)

downloadPhysicalDocument

public void downloadPhysicalDocument(String userID,
                                     String pDocKey,
                                     OutputStream os)

downloadPhysicalDocument

public void downloadPhysicalDocument(String userID,
                                     String pDocKey,
                                     OutputStream os,
                                     String downloadType,
                                     boolean ignoreLock)
Parameters:
userID - - UserID of the user who try to download a physical document from server
pDocKey - - Key of target downloading physical document
os - - the OutpuStream to write the download physical document

downloadEFromPhysicalDocument

public void downloadEFromPhysicalDocument(String userID,
                                          String pDocKey,
                                          OutputStream os,
                                          String downloadType,
                                          boolean ignoreLock)
Download PhysicalDocumentItem from EForm.

Parameters:
userID -
pDocKey -
os -
downloadType -
ignoreLock -

downloadEFromPhysicalDocument

public void downloadEFromPhysicalDocument(String userID,
                                          String pDocKey,
                                          OutputStream os,
                                          String downloadType,
                                          boolean ignoreLock,
                                          String mainDocKey)

downloadExtPhysicalDocument

public void downloadExtPhysicalDocument(String userID,
                                        String pDocKey,
                                        OutputStream os,
                                        String downloadType,
                                        boolean ignoreLock,
                                        String shortcutID)
Parameters:
userID - - UserID of the user who try to download a physical document from server
pDocKey - - Key of target downloading physical document
os - - the OutpuStream to write the download physical document
shortcutID - - id of shortcut

getDownloadFileName

public String getDownloadFileName(String userID,
                                  String pdocKey,
                                  String downloadType,
                                  String EFORMMode)
                           throws Exception
Throws:
Exception

getDownloadFileName

public String getDownloadFileName(String userID,
                                  String pdocKey,
                                  String downloadType,
                                  String EFORMMode,
                                  String mainDocKey)
                           throws Exception
Throws:
Exception

generateWatermarkOnSample

public void generateWatermarkOnSample(String templateID,
                                      String typeName,
                                      OutputStream os)
                               throws Exception
Throws:
Exception


Copyright(c) 2005-2012 by Flowring Technology Corp., 12 F., No 120, Sec 2, Gongdao 5th Rd., Hsin-Chu City 300, Taiwan(R.O.C.) All rights reserved.