public class Samba2FileSystem extends FileSystemBase<String> implements IWritableFileSystem<String>
Modifier and Type | Class and Description |
---|---|
static class |
Samba2FileSystem.Samba2AuthType |
log
Constructor and Description |
---|
Samba2FileSystem() |
Modifier and Type | Method and Description |
---|---|
OutputStream |
appendFile(String f) |
void |
close() |
void |
configure() |
String |
copyFile(String f,
String destinationFolder,
boolean createFolder,
boolean resultantMustBeReturned)
Copies the file to a another folder.
|
OutputStream |
createFile(String f) |
void |
createFolder(String folder) |
void |
deleteFile(String f) |
boolean |
exists(String f) |
boolean |
folderExists(String folder) |
Map<String,Object> |
getAdditionalFileProperties(String f) |
String |
getCanonicalName(String f) |
long |
getFileSize(String f) |
Date |
getModificationTime(String f) |
String |
getName(String f)
Get a string representation of an identification of a file.
|
String |
getParentFolder(String f) |
String |
getPhysicalDestinationName() |
boolean |
isFolder(String f) |
DirectoryStream<String> |
listFiles(String folder)
Lists all files in 'folder' or in the 'root' of the filesystem (when folder is null).
|
String |
moveFile(String f,
String destinationFolder,
boolean createFolder,
boolean resultantMustBeReturned)
Moves the file to a another folder.
|
void |
open() |
Message |
readFile(String filename,
String charset) |
void |
removeFolder(String folder,
boolean removeNonEmptyFolder) |
String |
renameFile(String source,
String destination)
Renames the file to a new name, possibly in a another folder.
|
void |
setAuthAlias(String authAlias)
alias used to obtain credentials for the smb share
|
void |
setAuthenticationDomain(String domain)
domain, in case the user account is bound to a domain
|
void |
setAuthType(Samba2FileSystem.Samba2AuthType authType)
Type of the authentication either 'NTLM' or 'SPNEGO'
|
void |
setDomain(String domain)
Deprecated.
|
void |
setKdc(String kdc)
Kerberos Domain Controller, as set in java.security.krb5.kdc
|
void |
setListHiddenFiles(boolean listHiddenFiles)
controls whether hidden files are seen or not
|
void |
setPassword(String password)
the smb share password
|
void |
setRealm(String realm)
Kerberos Realm, as set in java.security.krb5.realm
|
void |
setShare(String share)
the destination, aka smb://xxx/yyy share
|
void |
setUsername(String username)
the smb share username
|
String |
toFile(String filename)
Get a file 'F' representation of an identification of a file.
|
String |
toFile(String folder,
String filename)
Creates a reference to a file.
|
getMaxNumberOfMessagesToList, getNumberOfFilesInFolder, isOpen, setMaxNumberOfMessagesToList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNumberOfFilesInFolder, isOpen
getDomain
public void configure() throws ConfigurationException
configure
in interface IBasicFileSystem<String>
ConfigurationException
public void open() throws FileSystemException
open
in interface IBasicFileSystem<String>
open
in class FileSystemBase<String>
FileSystemException
public void close() throws FileSystemException
close
in interface IBasicFileSystem<String>
close
in class FileSystemBase<String>
FileSystemException
public String toFile(String filename) throws FileSystemException
IBasicFileSystem
IBasicFileSystem.getName(Object)
.toFile
in interface IBasicFileSystem<String>
FileSystemException
public String toFile(String folder, String filename) throws FileSystemException
IBasicFileSystem
toFile
in interface IBasicFileSystem<String>
FileSystemException
public DirectoryStream<String> listFiles(String folder) throws FileSystemException
IBasicFileSystem
listFiles
in interface IBasicFileSystem<String>
FileSystemException
public boolean exists(String f) throws FileSystemException
exists
in interface IBasicFileSystem<String>
FileSystemException
public OutputStream createFile(String f) throws FileSystemException, IOException
createFile
in interface IWritableFileSystem<String>
FileSystemException
IOException
public OutputStream appendFile(String f) throws FileSystemException, IOException
appendFile
in interface IWritableFileSystem<String>
FileSystemException
IOException
public Message readFile(String filename, String charset) throws FileSystemException, IOException
readFile
in interface IBasicFileSystem<String>
FileSystemException
IOException
public void deleteFile(String f) throws FileSystemException
deleteFile
in interface IBasicFileSystem<String>
FileSystemException
public String renameFile(String source, String destination) throws FileSystemException
IWritableFileSystem
renameFile
in interface IWritableFileSystem<String>
FileSystemException
public String moveFile(String f, String destinationFolder, boolean createFolder, boolean resultantMustBeReturned) throws FileSystemException
IBasicFileSystem
resultantMustBeReturned
is set, then an Exception must be thrown, preferably before the file is moved;resultantMustBeReturned
is not set, then a null result returned might also mean the file was moved successfully, but with unknown destination;moveFile
in interface IBasicFileSystem<String>
resultantMustBeReturned
- TODOFileSystemException
public String copyFile(String f, String destinationFolder, boolean createFolder, boolean resultantMustBeReturned) throws FileSystemException
IBasicFileSystem
resultantMustBeReturned
is set, then an Exception must be thrown, preferably before the file is copied;resultantMustBeReturned
is not set, then a null result returned might also mean the file was copied successfully, but with unknown destination;copyFile
in interface IBasicFileSystem<String>
resultantMustBeReturned
- TODOFileSystemException
public Map<String,Object> getAdditionalFileProperties(String f)
getAdditionalFileProperties
in interface IBasicFileSystem<String>
public boolean isFolder(String f) throws FileSystemException
FileSystemException
public boolean folderExists(String folder) throws FileSystemException
folderExists
in interface IBasicFileSystem<String>
FileSystemException
public void createFolder(String folder) throws FileSystemException
createFolder
in interface IBasicFileSystem<String>
FileSystemException
public void removeFolder(String folder, boolean removeNonEmptyFolder) throws FileSystemException
removeFolder
in interface IBasicFileSystem<String>
FileSystemException
public long getFileSize(String f) throws FileSystemException
getFileSize
in interface IBasicFileSystem<String>
FileSystemException
public String getName(String f)
IBasicFileSystem
IBasicFileSystem.toFile(String)
.
Can reflect name a file has in its folder, is not expected to be unique over folders.getName
in interface IBasicFileSystem<String>
public String getParentFolder(String f)
getParentFolder
in interface IBasicFileSystem<String>
public String getCanonicalName(String f) throws FileSystemException
getCanonicalName
in interface IBasicFileSystem<String>
FileSystemException
public Date getModificationTime(String f) throws FileSystemException
getModificationTime
in interface IBasicFileSystem<String>
FileSystemException
public String getPhysicalDestinationName()
getPhysicalDestinationName
in interface HasPhysicalDestination
public void setShare(String share)
public void setUsername(String username)
public void setPassword(String password)
public void setAuthAlias(String authAlias)
public void setAuthenticationDomain(String domain)
@Deprecated @ConfigurationWarning(value="Please use attribute authenticationDomain instead") public void setDomain(String domain)
public void setAuthType(Samba2FileSystem.Samba2AuthType authType)
public void setKdc(String kdc)
public void setRealm(String realm)
public void setListHiddenFiles(boolean listHiddenFiles)
Copyright © 2023 Frank!Framework. All rights reserved.