Class WriteToFTP
java.lang.Object
com.ptc.windchill.esi.lite.tgt.webject.WriteToFile
com.ptc.windchill.esi.lite.tgt.webject.WriteToFTP
Implementation for Write-To-Ftp custom webject for ERPConnector.
Supported API: true
Supported API: true
- See Also:
-
Field Summary
Fields inherited from class com.ptc.windchill.esi.lite.tgt.webject.WriteToFile
WT_HOME -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidUses URL object to upload file to ftp client
Supported API: truestatic com.infoengine.object.factory.TaskwriteToFtp(com.infoengine.object.factory.Task task) Writes a file to the specified ftp location.Methods inherited from class com.ptc.windchill.esi.lite.tgt.webject.WriteToFile
applyXSL, cacheResponse, writeToFile, writeToFile
-
Method Details
-
writeToFtp
public static com.infoengine.object.factory.Task writeToFtp(com.infoengine.object.factory.Task task) throws IOException, com.infoengine.util.IEException, URISyntaxException, WTException Writes a file to the specified ftp location. Expects FILE_NAME, FTP_URL, FTP_MODE and CONTENT parameters to write the file. The FTP_MODE parameter specifies the mode for file transfer - 'A' or "ASCII" is for ASCII mode of transfer while 'I' is for binary mode of transfer. Optionally, XSL_URL, XSL_DBUSER, XSL_PASSWD, XSL_PARAM can be set for the webject if CONTENT needs to be transformed using XSL before writing the file at the location specified by the PATH parameter. The XSL_xxx parameters however are applicable only when sending the output in the ESI XML format.
Supported API: true- Parameters:
task- The input Info*Engine task- Returns:
- The resulting Info*Engine task
- Throws:
com.infoengine.util.IEExceptionIOExceptionURISyntaxExceptionWTException
-
upload
protected static void upload(String ftpServer, String fileName, File sourceFile, String type) throws MalformedURLException, IOException Uses URL object to upload file to ftp client
Supported API: true- Parameters:
ftpServer- the ftp server hostfileName- A file name for uploading the filesourceFile- the source file that needs to be uploadedtype- type of upload- Throws:
MalformedURLExceptionIOException
-