com.ptc.wvs.server.util
Class FileHelper

java.lang.Object
  extended bycom.ptc.wvs.server.util.FileHelper

public class FileHelper
extends Object


Nested Class Summary
static class FileHelper.Server
           
 
Field Summary
static int BOTH
           
static String CHARSET
           
static int REFERENCES
           
private static boolean retrieveAll
           
private static boolean SERVER
           
private static String SERVER_CLASS
           
private static String URLLIST
           
static int USES
           
static int USES1
           
static String WVS_CURRENT_GENERIC_EPMDOC
           
private static WVSProperties wvsProperties
           
 
Constructor Summary
FileHelper()
           
 
Method Summary
private static File getContentItem(ContentHolder doc, ContentItem ci, String tDir, FileConvert conv, boolean getFile)
           
static ContentItem getEdFile(ContentHolder doc)
           
static ContentItem getEdFile(ContentHolder doc, boolean checkDB)
           
static WTValuedMap getEdFile(WTCollection docs)
           
static String getEdFileCharset(ContentHolder doc)
           
static String getEdFileCharset(ContentItem ci)
           
static File getEdFileContent(ContentHolder doc, File tempDir, FileConvert conv)
           
static File getEdFileContent(ContentHolder doc, String tDir, FileConvert conv)
           
static String getEdFileName(ContentHolder doc)
           
static InputStream getEdFileStream(ContentHolder doc)
           
static InputStream getEdFileStream(ContentItem ci)
           
static Reader getEdFileStreamReader(ContentHolder doc)
           
static Reader getEdFileStreamReader(ContentItem ci)
           
static ContentItem getEdzFile(ContentHolder doc)
           
static ContentItem getEdzFile(ContentHolder doc, boolean checkDB)
           
static WTValuedMap getEdzFile(WTCollection docs)
           
static ZipInputStream getEdzFileStream(ContentHolder doc)
           
static ZipInputStream getEdzFileStream(ContentItem ci)
           
static String[] getFileContent(ContentHolder doc, boolean getPrimary, boolean getSecondary, File tempDir, ConfigSpec cs, int depType)
           
static String[] getFileContent(ContentHolder doc, boolean getPrimary, boolean getSecondary, File tempDir, ConfigSpec cs, int depType, FileConvert conv)
           
static String[] getFileContent(ContentHolder doc, boolean getPrimary, boolean getSecondary, String tDir, ConfigSpec cs, int depType)
           
static String[] getFileContent(ContentHolder doc, boolean getPrimary, boolean getSecondary, String tDir, ConfigSpec cs, int depType, FileConvert conv)
           
static File getFileContent(ContentHolder doc, ContentItem ci, File tempDir, FileConvert conv)
           
static File getFileContent(ContentHolder doc, ContentItem ci, String tDir, FileConvert conv)
           
static String[] getFileContent(ContentHolder doc, ContentRoleType role, boolean getPrimary, boolean getSecondary, String tDir, ConfigSpec cs, int depType, FileConvert conv)
           
static String[] getFileContent(ContentHolder doc, ContentRoleType role, File tempDir)
           
static String[] getFileContent(ContentHolder doc, ContentRoleType role, String tDir)
           
static ZipInputStream getPackageFileStream(ContentHolder doc, String baseName)
           
static String getViewContentURLForType(ContentHolder doc, ContentRoleType role)
           
static WTKeyedMap getViewContentURLForType(WTCollection doc, ContentRoleType role)
           
private static boolean readURLData(URLData urlData, File fileOut, FileConvert conv)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER_CLASS

private static final String SERVER_CLASS

SERVER

private static final boolean SERVER

URLLIST

private static final String URLLIST
See Also:
Constant Field Values

WVS_CURRENT_GENERIC_EPMDOC

public static final String WVS_CURRENT_GENERIC_EPMDOC
See Also:
Constant Field Values

USES

public static final int USES
See Also:
Constant Field Values

REFERENCES

public static final int REFERENCES
See Also:
Constant Field Values

BOTH

public static final int BOTH
See Also:
Constant Field Values

USES1

public static final int USES1
See Also:
Constant Field Values

CHARSET

public static final String CHARSET
See Also:
Constant Field Values

wvsProperties

private static WVSProperties wvsProperties

retrieveAll

private static boolean retrieveAll
Constructor Detail

FileHelper

public FileHelper()
Method Detail

getFileContent

public static String[] getFileContent(ContentHolder doc,
                                      ContentRoleType role,
                                      File tempDir)

getFileContent

public static String[] getFileContent(ContentHolder doc,
                                      ContentRoleType role,
                                      String tDir)

getFileContent

public static String[] getFileContent(ContentHolder doc,
                                      boolean getPrimary,
                                      boolean getSecondary,
                                      File tempDir,
                                      ConfigSpec cs,
                                      int depType)

getFileContent

public static String[] getFileContent(ContentHolder doc,
                                      boolean getPrimary,
                                      boolean getSecondary,
                                      String tDir,
                                      ConfigSpec cs,
                                      int depType)

getFileContent

public static String[] getFileContent(ContentHolder doc,
                                      boolean getPrimary,
                                      boolean getSecondary,
                                      File tempDir,
                                      ConfigSpec cs,
                                      int depType,
                                      FileConvert conv)

getFileContent

public static String[] getFileContent(ContentHolder doc,
                                      boolean getPrimary,
                                      boolean getSecondary,
                                      String tDir,
                                      ConfigSpec cs,
                                      int depType,
                                      FileConvert conv)

getFileContent

public static String[] getFileContent(ContentHolder doc,
                                      ContentRoleType role,
                                      boolean getPrimary,
                                      boolean getSecondary,
                                      String tDir,
                                      ConfigSpec cs,
                                      int depType,
                                      FileConvert conv)

getFileContent

public static File getFileContent(ContentHolder doc,
                                  ContentItem ci,
                                  File tempDir,
                                  FileConvert conv)

getFileContent

public static File getFileContent(ContentHolder doc,
                                  ContentItem ci,
                                  String tDir,
                                  FileConvert conv)

getEdFileContent

public static File getEdFileContent(ContentHolder doc,
                                    File tempDir,
                                    FileConvert conv)

getEdFileContent

public static File getEdFileContent(ContentHolder doc,
                                    String tDir,
                                    FileConvert conv)

getEdFileName

public static String getEdFileName(ContentHolder doc)

getViewContentURLForType

public static String getViewContentURLForType(ContentHolder doc,
                                              ContentRoleType role)

getViewContentURLForType

public static WTKeyedMap getViewContentURLForType(WTCollection doc,
                                                  ContentRoleType role)

getEdFileStream

public static InputStream getEdFileStream(ContentHolder doc)

getEdFileStream

public static InputStream getEdFileStream(ContentItem ci)

getEdFileStreamReader

public static Reader getEdFileStreamReader(ContentHolder doc)

getEdFileStreamReader

public static Reader getEdFileStreamReader(ContentItem ci)

getEdFileCharset

public static String getEdFileCharset(ContentHolder doc)

getEdFileCharset

public static String getEdFileCharset(ContentItem ci)

getEdzFileStream

public static ZipInputStream getEdzFileStream(ContentHolder doc)

getEdzFileStream

public static ZipInputStream getEdzFileStream(ContentItem ci)

getPackageFileStream

public static ZipInputStream getPackageFileStream(ContentHolder doc,
                                                  String baseName)

getEdFile

public static ContentItem getEdFile(ContentHolder doc)

getEdFile

public static ContentItem getEdFile(ContentHolder doc,
                                    boolean checkDB)

getEdFile

public static WTValuedMap getEdFile(WTCollection docs)

getEdzFile

public static ContentItem getEdzFile(ContentHolder doc)

getEdzFile

public static ContentItem getEdzFile(ContentHolder doc,
                                     boolean checkDB)

getEdzFile

public static WTValuedMap getEdzFile(WTCollection docs)

getContentItem

private static File getContentItem(ContentHolder doc,
                                   ContentItem ci,
                                   String tDir,
                                   FileConvert conv,
                                   boolean getFile)
                            throws Exception
Throws:
Exception

readURLData

private static boolean readURLData(URLData urlData,
                                   File fileOut,
                                   FileConvert conv)