com.ibm.ftt.resources.core.filevalidator
Interface IFileOperationValidator
public interface IFileOperationValidator
Common interface that all file operation validators must implement. File
operation validators are called at the beginning of any file operation by the
core implementation of the resource API. Third party contributed classes
(through the filevalidator extension point) can enforce custom access rules,
by allowing or disallowing an operation from proceeding. An operation is
prevented from proceeding if any one of the registered validators object.
Implementations should have a public 0-argument constructor.
|
Method Summary |
boolean |
checkOperation(FileOperation type,
Object resource)
Used to determine if the specified operation type on the given resource
should be allowed to proceed. |
COPY_RIGHT
static final String COPY_RIGHT
checkOperation
boolean checkOperation(FileOperation type,
Object resource)
throws InvalidOperationException
- Used to determine if the specified operation type on the given resource
should be allowed to proceed. Note that all registered validators must
agree to allow an operation to proceed. Any of the registered validators
have veto power. It is therefore important that implementations of this
interface allow all unknown operations or operations on unknown resource
types to proceed.
- Parameters:
type - specifies the type of operation we are about to performresource - resource the operation will be performed on. Should be either
IPhysicalResource or IOSImage. Note: resource
may not physically exist.
- Returns:
- true
- Throws:
InvalidOperationException - if the validator wants to disallow the operation for any
reason