com.ptc.epm.commands.util
Class FileLoader
java.lang.Object
com.ptc.epm.commands.util.FileLoader
- public class FileLoader
- extends Object
Facilitate uploading and downloading of content from
existing folder structure.
Method Summary |
static void |
downloadFile(ApplicationData appData,
String name,
String file_name)
|
static ECADDocument |
getDesignDoc(String type,
ECADAssembly assembly)
|
static boolean |
isFileGroupDirectory(File file)
|
protected static boolean |
isProductViewFile(String fileName)
|
private static void |
listFileGroupNumbers(HashSet fgNames)
|
private static void |
removeUnusedLinks(ECADDesign design,
Vector myContents,
ECADTransaction transaction)
|
static void |
uploadFile(ECADDocument document,
File file,
boolean asPrimary,
ECADTransaction transaction)
Upload a given file as content for the given underlying
EPMDocument using an ECADTransaction. |
static void |
uploadFile(ECADDocument document,
String fileName,
File file,
boolean asPrimary,
ECADTransaction transaction)
Upload a given file as content for the given underlying
EPMDocument using an ECADTransaction. |
static void |
uploadFileGroups(HashSet fgNames,
Vector myContents,
File myZIPFile,
ECADDesign design,
ECADTransaction transaction)
|
static void |
uploadFiles(Vector fileGroup,
ECADDocument doc,
File myZIPFile,
ECADTransaction transaction)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BUF_SIZE
private static final int BUF_SIZE
- See Also:
- Constant Field Values
ECADRESOURCE
private static final String ECADRESOURCE
- See Also:
- Constant Field Values
ASSEMBLY
private static final String ASSEMBLY
- See Also:
- Constant Field Values
BOARD
private static final String BOARD
- See Also:
- Constant Field Values
SCHEMATIC
private static final String SCHEMATIC
- See Also:
- Constant Field Values
SOURCE
private static final String SOURCE
- See Also:
- Constant Field Values
FileLoader
public FileLoader()
uploadFile
public static void uploadFile(ECADDocument document,
File file,
boolean asPrimary,
ECADTransaction transaction)
throws WTException,
FileNotFoundException
- Upload a given file as content for the given underlying
EPMDocument using an ECADTransaction.
- Throws:
WTException
FileNotFoundException
downloadFile
public static void downloadFile(ApplicationData appData,
String name,
String file_name)
throws WTException,
IOException
- Throws:
WTException
IOException
isFileGroupDirectory
public static boolean isFileGroupDirectory(File file)
getDesignDoc
public static ECADDocument getDesignDoc(String type,
ECADAssembly assembly)
isProductViewFile
protected static boolean isProductViewFile(String fileName)
uploadFileGroups
public static void uploadFileGroups(HashSet fgNames,
Vector myContents,
File myZIPFile,
ECADDesign design,
ECADTransaction transaction)
throws WTException,
WTPropertyVetoException
- Throws:
WTException
WTPropertyVetoException
uploadFiles
public static void uploadFiles(Vector fileGroup,
ECADDocument doc,
File myZIPFile,
ECADTransaction transaction)
throws WTException
- Throws:
WTException
uploadFile
public static void uploadFile(ECADDocument document,
String fileName,
File file,
boolean asPrimary,
ECADTransaction transaction)
throws WTException,
FileNotFoundException
- Upload a given file as content for the given underlying
EPMDocument using an ECADTransaction.
- Throws:
WTException
FileNotFoundException
listFileGroupNumbers
private static void listFileGroupNumbers(HashSet fgNames)
removeUnusedLinks
private static void removeUnusedLinks(ECADDesign design,
Vector myContents,
ECADTransaction transaction)
throws WTException
- Throws:
WTException