org.cofax.cms
Class CofaxToolsFTP


java.lang.Object

  |

  +--org.cofax.cms.CofaxToolsFTP


public class CofaxToolsFTP
extends java.lang.Object

CofaxToolsFTP: Handles FTP transactions and menus for Cofax Tools to allow access to templates and images on remote file systems.

Author:
Charles Harvey

Constructor Summary
CofaxToolsFTP()
           
 
Method Summary
static boolean containsFourDigits(java.lang.String name)
          Determine if a String contains four consecutive numbers; return true if so, false if not.
static java.lang.String getImportFileBody(java.lang.String fileName, javax.servlet.http.HttpSession session)
          Retrieves a file via FTP from the import server, writes the file to the local transfer folder, reads in file contents, and returns the body as a string so it may be placed into the creat article tool.
static java.lang.String getUploadDeleteComboBox(java.lang.String fromMode, java.lang.String fromFolder, java.lang.String action, java.lang.String object, javax.servlet.http.HttpSession session)
          Returns an HTML Combo Box of media or templates to be uploaded from the beta server or deleted from the live server.
static java.util.ArrayList splitServers(java.lang.String servers)
          Splits a String of comma separated servers (or any String) and returns an arrayList.
static java.lang.String stripName(java.lang.String mediaName)
          Returns String folderpath after stripping filename from original String.
static java.lang.String stripPath(java.lang.String mediaName)
          Returns String filename after stripping filepath from original String.
static java.lang.String uploadArticleMedia(java.lang.String articleImageName, java.lang.String mediaName, java.lang.String year, java.lang.String month, java.lang.String day, javax.servlet.http.HttpSession session)
          Handles media upload associated with articles from the user desktop to the tools server, then on to the live servers.
static java.lang.String uploadOrDeleteMediaOrTemplates(java.lang.String action, java.lang.String object, java.lang.String numElements, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpSession session)
          Completes file transfer actions to upload or delete templates or images via FTP.
static java.lang.String[] viewFilesToImport(javax.servlet.http.HttpSession session)
          Returns a String[] of any files that exist in the current publications' import folder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CofaxToolsFTP


public CofaxToolsFTP()
Method Detail

uploadArticleMedia


public static java.lang.String uploadArticleMedia(java.lang.String articleImageName,

                                                  java.lang.String mediaName,

                                                  java.lang.String year,

                                                  java.lang.String month,

                                                  java.lang.String day,

                                                  javax.servlet.http.HttpSession session)
Handles media upload associated with articles from the user desktop to the tools server, then on to the live servers.

stripPath


public static java.lang.String stripPath(java.lang.String mediaName)
Returns String filename after stripping filepath from original String.

stripName


public static java.lang.String stripName(java.lang.String mediaName)
Returns String folderpath after stripping filename from original String.

splitServers


public static java.util.ArrayList splitServers(java.lang.String servers)
Splits a String of comma separated servers (or any String) and returns an arrayList. Returns populated with one server or original String if no commas exist in String.

viewFilesToImport


public static java.lang.String[] viewFilesToImport(javax.servlet.http.HttpSession session)
Returns a String[] of any files that exist in the current publications' import folder.

getImportFileBody


public static java.lang.String getImportFileBody(java.lang.String fileName,

                                                 javax.servlet.http.HttpSession session)
Retrieves a file via FTP from the import server, writes the file to the local transfer folder, reads in file contents, and returns the body as a string so it may be placed into the creat article tool.

getUploadDeleteComboBox


public static java.lang.String getUploadDeleteComboBox(java.lang.String fromMode,

                                                       java.lang.String fromFolder,

                                                       java.lang.String action,

                                                       java.lang.String object,

                                                       javax.servlet.http.HttpSession session)
Returns an HTML Combo Box of media or templates to be uploaded from the beta server or deleted from the live server.

uploadOrDeleteMediaOrTemplates


public static java.lang.String uploadOrDeleteMediaOrTemplates(java.lang.String action,

                                                              java.lang.String object,

                                                              java.lang.String numElements,

                                                              javax.servlet.http.HttpServletRequest req,

                                                              javax.servlet.http.HttpSession session)
Completes file transfer actions to upload or delete templates or images via FTP.

containsFourDigits


public static boolean containsFourDigits(java.lang.String name)
Determine if a String contains four consecutive numbers; return true if so, false if not. Used to determine if we are currently browsing through the /year/month/day sections under the objects/ images folders.


Copyright 2001 KnightRidder.com. All Rights Reserved.