Class AbstractFileOperationProvider
java.lang.Object
org.apache.commons.vfs.operations.AbstractFileOperationProvider
- All Implemented Interfaces:
FileOperationProvider
todo: add class description here
- Since:
- 0.1
- Author:
- Siarhei Baidun
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
addOperation
(Class operationClass) final void
collectOperations
(Collection operationsList, FileObject file) Gather available operations for the specified FileObject and put them into specified operationsList.protected abstract void
doCollectOperations
(Collection availableOperations, Collection resultList, FileObject file) final FileOperation
getOperation
(FileObject file, Class operationClass) protected abstract FileOperation
instantiateOperation
(FileObject file, Class operationClass) protected final Class
lookupOperation
(Class operationClass)
-
Constructor Details
-
AbstractFileOperationProvider
public AbstractFileOperationProvider()
-
-
Method Details
-
collectOperations
public final void collectOperations(Collection operationsList, FileObject file) throws FileSystemException Gather available operations for the specified FileObject and put them into specified operationsList.- Specified by:
collectOperations
in interfaceFileOperationProvider
- Parameters:
operationsList
- the list of available operations for the specivied FileObject. The operationList contains classes of available operations, e.g. Class objects.file
- the FileObject for which we want to get the list of available operations.- Throws:
FileSystemException
- if list of operations cannto be retrieved.
-
doCollectOperations
protected abstract void doCollectOperations(Collection availableOperations, Collection resultList, FileObject file) throws FileSystemException - Throws:
FileSystemException
-
getOperation
public final FileOperation getOperation(FileObject file, Class operationClass) throws FileSystemException - Specified by:
getOperation
in interfaceFileOperationProvider
- Parameters:
file
- the FileObject for which we need a operation.operationClass
- the Class which instance we are needed.- Returns:
- the requried operation instance.
- Throws:
FileSystemException
- if operation cannot be retrieved.
-
instantiateOperation
protected abstract FileOperation instantiateOperation(FileObject file, Class operationClass) throws FileSystemException - Parameters:
operationClass
-- Returns:
- Throws:
FileSystemException
-
lookupOperation
- Parameters:
operationClass
-- Returns:
- never returns null
- Throws:
FileSystemException
-
addOperation
- Parameters:
operationClass
-- Throws:
FileSystemException
-