org.apache.synapse.transport.vfs
Class VFSUtils

java.lang.Object
  extended by org.apache.axis2.transport.base.BaseUtils
      extended by org.apache.synapse.transport.vfs.VFSUtils

public class VFSUtils
extends org.apache.axis2.transport.base.BaseUtils


Constructor Summary
VFSUtils()
           
 
Method Summary
static boolean acquireLock(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject fo)
          Acquires a file item lock before processing the item, guaranteing that the file is not processed while it is being uploaded and/or the item is not processed by two listeners
static String getFileName(MessageContext msgCtx, VFSOutTransportInfo vfsOutInfo)
           
static String getProperty(org.apache.commons.vfs2.FileContent message, String property)
          Get a String property from FileContent message
static String getSystemTime(String dateFormat)
           
static String maskURLPassword(String url)
          Mask the password of the connection url with ***
static void releaseLock(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject fo)
          Release a file item lock acquired either by the VFS listener or a sender
 
Methods inherited from class org.apache.axis2.transport.base.BaseUtils
getEnvelope, getEPRProperties, getMessageFormatter, getOMOutputFormat, getQNameFromString, handleException, handleException, isBlank, isUsingTransport, loadProperties, markServiceAsFaulty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VFSUtils

public VFSUtils()
Method Detail

getProperty

public static String getProperty(org.apache.commons.vfs2.FileContent message,
                                 String property)
Get a String property from FileContent message

Parameters:
message - the File message
property - property name
Returns:
property value

getFileName

public static String getFileName(MessageContext msgCtx,
                                 VFSOutTransportInfo vfsOutInfo)

acquireLock

public static boolean acquireLock(org.apache.commons.vfs2.FileSystemManager fsManager,
                                  org.apache.commons.vfs2.FileObject fo)
Acquires a file item lock before processing the item, guaranteing that the file is not processed while it is being uploaded and/or the item is not processed by two listeners

Parameters:
fsManager - used to resolve the processing file
fo - representing the processign file item
Returns:
boolean true if the lock has been acquired or false if not

getSystemTime

public static String getSystemTime(String dateFormat)

releaseLock

public static void releaseLock(org.apache.commons.vfs2.FileSystemManager fsManager,
                               org.apache.commons.vfs2.FileObject fo)
Release a file item lock acquired either by the VFS listener or a sender

Parameters:
fsManager - which is used to resolve the processed file
fo - representing the processed file

maskURLPassword

public static String maskURLPassword(String url)
Mask the password of the connection url with ***

Parameters:
url - the actual url
Returns:
the masked url


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.