com.ptc.wvs.server.util
Interface FileConvert

All Superinterfaces:
Serializable
All Known Subinterfaces:
CadConvert
All Known Implementing Classes:
CadConvertACAD, CadConvertCADDS5, CadConvertCATIA, CadConvertCATIAV5, CadConvertECAD, CadConvertIDEAS, CadConvertINVENTOR, CadConvertOTHER, CadConvertPRODESKTOP, CadConvertPROE, CadConvertPROEForDLL, CadConvertSOLIDDESIGNER, CadConvertSOLIDWORKS, CadConvertUG, ConvertDocument

public interface FileConvert
extends Serializable


Method Summary
 String getAuthenticationString(URLData urlData)
          Gets a encrypted authentication string for the specified url data This is will be passed to the distributed CadAgent to allow it to retieve file from the source, typicall ProIntralink Called by file download for URLData items

Supported API: false
 boolean getLocalFileContentFromContentItem(ContentItem ci, File localFile)
          Downloads the ContentItem for this CAD system to the local file specified.
 String getLocalFileNameFromContentItem(ContentItem ci)
          Returns the local file name for a ContentItem of this CAD system Called by file download for both ApplicationData and URLData items

Supported API: false
 URLConnection getURLDataConnection(URLData urlData)
          Gets a URLConnection for the default mechanisn to download file content.
 boolean useDistributedCadAgent(String url)
          Returns if a distributed CadAgent could service the conversion of the url data.
 

Method Detail

getLocalFileNameFromContentItem

public String getLocalFileNameFromContentItem(ContentItem ci)
Returns the local file name for a ContentItem of this CAD system Called by file download for both ApplicationData and URLData items

Supported API: false

Parameters:
ci - the ContentItem
Returns:
String local file name

getLocalFileContentFromContentItem

public boolean getLocalFileContentFromContentItem(ContentItem ci,
                                                  File localFile)
Downloads the ContentItem for this CAD system to the local file specified. The local file will be the full path, an the file name portion of this will have been determined by a call to getLocalFileNameFromContentItem This method can decide if it will download the file, and return true. if this method decides not to download the file it should return false. The download mechanism will then use ContentServerHelper.service.writeContentStream for Application data and a read of the URL (see getURLDataConnection) for URLData. It is expected that most CAD conveters will simply return false for this method and allow the default mechanism to be used. Called by file download for both ApplicationData and URLData items

Supported API: false

Parameters:
ci - the ContentItem
localFile - the local file name
Returns:
true this the file has been downloaded, false if not

getURLDataConnection

public URLConnection getURLDataConnection(URLData urlData)
Gets a URLConnection for the default mechanisn to download file content. If getLocalFileContentFRomContentItem has returned true, then that will have downloaded the data and this method will not be called. Typically this method would deal with authentication. Called by file download for URLData items

Supported API: false

Parameters:
urlData - the URLData
Returns:
URLConnection

getAuthenticationString

public String getAuthenticationString(URLData urlData)
Gets a encrypted authentication string for the specified url data This is will be passed to the distributed CadAgent to allow it to retieve file from the source, typicall ProIntralink Called by file download for URLData items

Supported API: false

Parameters:
urlData - the URLData
Returns:
String

useDistributedCadAgent

public boolean useDistributedCadAgent(String url)
Returns if a distributed CadAgent could service the conversion of the url data. Although this will be called for each url assocaited to the content of the object, the first takes precedence Currently only Gateway data will return true. Called by file download for URLData items

Supported API: false

Parameters:
url - the url String
Returns:
boolean