Package org.teiid.resource.adapter.file
Class FileConnectionImpl
- java.lang.Object
-
- org.teiid.resource.adapter.file.FileConnectionImpl
-
- All Implemented Interfaces:
javax.resource.cci.Connection
,VirtualFileConnection
,Connection
,ResourceConnection
public class FileConnectionImpl extends Object implements VirtualFileConnection, ResourceConnection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.teiid.file.VirtualFileConnection
VirtualFileConnection.FileMetadata, VirtualFileConnection.Util
-
-
Constructor Summary
Constructors Constructor Description FileConnectionImpl(String parentDirectory, Map<String,String> fileMapping, boolean allowParentPaths)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(InputStream in, String path)
Add a filevoid
close()
VirtualFile[]
getFiles(String location)
Return a list of files by a given file patternboolean
remove(String path)
Remove a file-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.teiid.resource.spi.ResourceConnection
cleanUp, createInteraction, getLocalTransaction, getMetaData, getResultSetInfo, getXAResource, isAlive
-
Methods inherited from interface org.teiid.file.VirtualFileConnection
add, areFilesUsableAfterClose
-
-
-
-
Method Detail
-
add
public void add(InputStream in, String path) throws TranslatorException
Description copied from interface:VirtualFileConnection
Add a file- Specified by:
add
in interfaceVirtualFileConnection
- Throws:
TranslatorException
-
remove
public boolean remove(String path) throws TranslatorException
Description copied from interface:VirtualFileConnection
Remove a file- Specified by:
remove
in interfaceVirtualFileConnection
- Returns:
- Throws:
TranslatorException
-
getFiles
public VirtualFile[] getFiles(String location) throws TranslatorException
Description copied from interface:VirtualFileConnection
Return a list of files by a given file pattern- Specified by:
getFiles
in interfaceVirtualFileConnection
- Parameters:
location
- - the syntax and pattern. The wildcard character * is supported in the filename only.- Returns:
- Throws:
TranslatorException
-
close
public void close() throws javax.resource.ResourceException
- Specified by:
close
in interfacejavax.resource.cci.Connection
- Specified by:
close
in interfaceConnection
- Throws:
javax.resource.ResourceException
-
-