| java.lang.Object com.sun.jbi.binding.file.util.FileBindingUtil
FileBindingUtil | public class FileBindingUtil (Code) | | File binding util class. Util class for doing useful task in file binding.
author: Sun Microsystems, Inc. |
Method Summary | |
public static void | addEntry(String trackid, String filepath) Adds an entry to the file entries table. | public static boolean | canAdd(File file) Checks if the file has already been picked. | public static String | getBaseName(File file) Util method to get the base name of a filename.
Parameters: file - File object. | public static String | getExtension(File file) Util method to get an extension from a file name. | public static String | getFilePath(String trackid) Returns the file path from tracking id.
Parameters: trackid - Track id. | public static synchronized String | getTrackingId() Method to generate tracking id. | public static boolean | moveFile(String trk, String destfolder, String file) Moves the file to processed folder. | public static boolean | moveFile(String trk, File destfolder, File file) Moves the file to processed folder. | public static void | removeEntry(String trackid) Removes entry from the files table. |
addEntry | public static void addEntry(String trackid, String filepath)(Code) | | Adds an entry to the file entries table.
Parameters: trackid - track id. Parameters: filepath - File path. |
canAdd | public static boolean canAdd(File file)(Code) | | Checks if the file has already been picked.
Parameters: file - File true if not picked. |
getBaseName | public static String getBaseName(File file)(Code) | | Util method to get the base name of a filename.
Parameters: file - File object. base name of the file. |
getExtension | public static String getExtension(File file)(Code) | | Util method to get an extension from a file name.
Parameters: file - File object the extension of filename. |
getFilePath | public static String getFilePath(String trackid)(Code) | | Returns the file path from tracking id.
Parameters: trackid - Track id. File path corresponding to track id. |
getTrackingId | public static synchronized String getTrackingId()(Code) | | Method to generate tracking id.
tracking id. |
moveFile | public static boolean moveFile(String trk, String destfolder, String file)(Code) | | Moves the file to processed folder.
Parameters: trk - tracking id to be attached to file name. Parameters: destfolder - destination folder Parameters: file - file name true if success. |
moveFile | public static boolean moveFile(String trk, File destfolder, File file)(Code) | | Moves the file to processed folder.
Parameters: trk - tracking id to be attached to file name. Parameters: destfolder - destination folder Parameters: file - file name true if success. |
removeEntry | public static void removeEntry(String trackid)(Code) | | Removes entry from the files table.
Parameters: trackid - Trackid |
|
|