public class VFSUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IMPLICIT_MODE
FTPS implicit mode
|
static java.lang.String |
PASSIVE_MODE
Passive mode
|
static java.lang.String |
PROTECTION_MODE |
Modifier and Type | Method and Description |
---|---|
static boolean |
acquireLock(org.apache.commons.vfs2.FileSystemManager fsManager,
org.apache.commons.vfs2.FileObject fo,
org.apache.commons.vfs2.FileSystemOptions fso,
boolean isListener)
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 boolean |
acquireLock(org.apache.commons.vfs2.FileSystemManager fsManager,
org.apache.commons.vfs2.FileObject fo,
VFSParamDTO paramDTO,
org.apache.commons.vfs2.FileSystemOptions fso,
boolean isListener)
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 org.apache.commons.vfs2.FileSystemOptions |
attachFileSystemOptions(java.util.Map<java.lang.String,java.lang.String> options,
org.apache.commons.vfs2.FileSystemManager fsManager) |
static java.lang.String |
getFileName(org.apache.axis2.context.MessageContext msgCtx,
VFSOutTransportInfo vfsOutInfo) |
static java.lang.Long |
getLastModified(org.apache.axis2.context.MessageContext msgCtx)
Helper method to get last modified date from msgCtx
|
static java.lang.String |
getProperty(org.apache.commons.vfs2.FileContent message,
java.lang.String property)
Get a String property from FileContent message
|
static java.lang.String |
getSystemTime(java.lang.String dateFormat) |
static boolean |
isFailRecord(org.apache.commons.vfs2.FileSystemManager fsManager,
org.apache.commons.vfs2.FileObject fo) |
static boolean |
isFailRecord(org.apache.commons.vfs2.FileSystemManager fsManager,
org.apache.commons.vfs2.FileObject fo,
org.apache.commons.vfs2.FileSystemOptions fso) |
static boolean |
isReadyToRead(org.apache.commons.vfs2.FileObject fo,
java.lang.Long waitTimeBeforeRead) |
static void |
markFailRecord(org.apache.commons.vfs2.FileSystemManager fsManager,
org.apache.commons.vfs2.FileObject fo) |
static void |
markFailRecord(org.apache.commons.vfs2.FileSystemManager fsManager,
org.apache.commons.vfs2.FileObject fo,
org.apache.commons.vfs2.FileSystemOptions fso) |
static java.lang.String |
maskURLPassword(java.lang.String url)
Mask the password of the connection url with ***
|
static java.util.Map<java.lang.String,java.lang.String> |
parseSchemeFileOptions(java.lang.String fileURI,
org.apache.axis2.description.ParameterInclude params) |
static java.util.Map<java.lang.String,java.lang.String> |
parseSchemeFileOptions(java.lang.String fileURI,
java.util.Properties vfsProperties) |
static void |
releaseFail(org.apache.commons.vfs2.FileSystemManager fsManager,
org.apache.commons.vfs2.FileObject fo) |
static void |
releaseFail(org.apache.commons.vfs2.FileSystemManager fsManager,
org.apache.commons.vfs2.FileObject fo,
org.apache.commons.vfs2.FileSystemOptions fso) |
static void |
releaseLock(org.apache.commons.vfs2.FileSystemManager fsManager,
org.apache.commons.vfs2.FileObject fo,
org.apache.commons.vfs2.FileSystemOptions fso)
Release a file item lock acquired either by the VFS listener or a sender
|
static java.lang.String |
resolveUriHost(java.lang.String uri)
Function to resolve hostname of the vfs uri
|
static java.lang.String |
resolveUriHost(java.lang.String uri,
java.lang.StringBuilder strBuilder)
Function to resolve the hostname of uri to ip for following vfs protocols.
|
public static final java.lang.String PASSIVE_MODE
public static final java.lang.String IMPLICIT_MODE
public static final java.lang.String PROTECTION_MODE
public static java.lang.String getProperty(org.apache.commons.vfs2.FileContent message, java.lang.String property)
message
- the File messageproperty
- property namepublic static java.lang.String getFileName(org.apache.axis2.context.MessageContext msgCtx, VFSOutTransportInfo vfsOutInfo)
public static boolean acquireLock(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject fo, org.apache.commons.vfs2.FileSystemOptions fso, boolean isListener)
fsManager
- used to resolve the processing filefo
- representing the processing file itemfso
- represents file system options used when resolving file from file system manager.public static boolean acquireLock(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject fo, VFSParamDTO paramDTO, org.apache.commons.vfs2.FileSystemOptions fso, boolean isListener)
fsManager
- used to resolve the processing filefo
- representing the processing file itemfso
- represents file system options used when resolving file from file system manager.public static void releaseLock(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject fo, org.apache.commons.vfs2.FileSystemOptions fso)
fsManager
- which is used to resolve the processed filefo
- representing the processed filefso
- represents file system options used when resolving file from file system manager.public static java.lang.String maskURLPassword(java.lang.String url)
url
- the actual urlpublic static java.lang.String getSystemTime(java.lang.String dateFormat)
public static java.lang.Long getLastModified(org.apache.axis2.context.MessageContext msgCtx)
msgCtx
- public static void markFailRecord(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject fo)
public static void markFailRecord(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject fo, org.apache.commons.vfs2.FileSystemOptions fso)
public static boolean isFailRecord(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject fo)
public static boolean isFailRecord(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject fo, org.apache.commons.vfs2.FileSystemOptions fso)
public static boolean isReadyToRead(org.apache.commons.vfs2.FileObject fo, java.lang.Long waitTimeBeforeRead)
fo
- representing the processed filewaitTimeBeforeRead
- representing the time period in milliseconds to wait before reading the filepublic static void releaseFail(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject fo)
public static void releaseFail(org.apache.commons.vfs2.FileSystemManager fsManager, org.apache.commons.vfs2.FileObject fo, org.apache.commons.vfs2.FileSystemOptions fso)
public static java.util.Map<java.lang.String,java.lang.String> parseSchemeFileOptions(java.lang.String fileURI, org.apache.axis2.description.ParameterInclude params)
public static java.util.Map<java.lang.String,java.lang.String> parseSchemeFileOptions(java.lang.String fileURI, java.util.Properties vfsProperties)
public static org.apache.commons.vfs2.FileSystemOptions attachFileSystemOptions(java.util.Map<java.lang.String,java.lang.String> options, org.apache.commons.vfs2.FileSystemManager fsManager) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemException
public static java.lang.String resolveUriHost(java.lang.String uri) throws org.apache.commons.vfs2.FileSystemException, java.net.UnknownHostException
uri
- URI need to resolveorg.apache.commons.vfs2.FileSystemException
- Unable to decode due to malformed URIjava.net.UnknownHostException
- Error occurred while resolving hostname of URIpublic static java.lang.String resolveUriHost(java.lang.String uri, java.lang.StringBuilder strBuilder) throws org.apache.commons.vfs2.FileSystemException, java.net.UnknownHostException
uri
- URI need to resolvestrBuilder
- string builder to use to build the resulting uriorg.apache.commons.vfs2.FileSystemException
- Unable to decode due to malformed URIjava.net.UnknownHostException
- Error occurred while resolving hostname of URICopyright © 2005-2020 Apache Software Foundation. All Rights Reserved.