au.com.prunge.jgenfile.impl
Class ConstantCanGetChildrenOperation
java.lang.Object
|
+--au.com.prunge.jgenfile.impl.AbstractOperation
|
+--au.com.prunge.jgenfile.impl.AbstractItemOperation
|
+--au.com.prunge.jgenfile.impl.AbstractDirectoryOperation
|
+--au.com.prunge.jgenfile.impl.ConstantCanGetChildrenOperation
- All Implemented Interfaces:
- CanGetChildrenOperation, ConstantOperation, DirectoryOperation, ItemOperation, Operation
- public class ConstantCanGetChildrenOperation
- extends AbstractDirectoryOperation
- implements CanGetChildrenOperation, ConstantOperation
A can get children operation that returns either
true or false for canGetChildren().
- Version:
- 1.0
- Author:
- Peter Runge
Constructor Summary |
ConstantCanGetChildrenOperation(au.com.prunge.jgenfile.Directory directory,
boolean canGetChildren)
Constructs a ConstantCanGetChildrenOperation . |
Method Summary |
boolean |
canGetChildren()
Returns whether the children of the directory can be acquired. |
void |
runImpl()
The actual run() implementation goes in this method. |
Methods inherited from class au.com.prunge.jgenfile.impl.AbstractOperation |
abort, addOperationHints, checkRun, getLastRunException, getOperationHint, getOperationHints, hasRun, run, setLastRunException, setOperationHint, setOperationHints |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantCanGetChildrenOperation
public ConstantCanGetChildrenOperation(au.com.prunge.jgenfile.Directory directory,
boolean canGetChildren)
- Constructs a
ConstantCanGetChildrenOperation
.
- Parameters:
directory
- the directory this operation is for.canGetChildren
- the constant result of this operation.
canGetChildren
public boolean canGetChildren()
throws OperationNotFinishedException,
JGenFileException
- Description copied from interface:
CanGetChildrenOperation
- Returns whether the children of the directory can be acquired.
- Specified by:
canGetChildren
in interface CanGetChildrenOperation
- Returns:
- true if the children can be acquired, false if not.
- Throws:
JGenFileException
- if another error occurs.
OperationNotFinishedException
- if this method
was called and the run() method has not
finished or has not been called.- See Also:
CanGetChildrenOperation.canGetChildren()
runImpl
public void runImpl()
throws JGenFileException
- Description copied from class:
AbstractOperation
- The actual run() implementation goes in this method.
Setting the last run exception and setting hasRun to
true is not required by this method as it is handled
by the run() method in this class.
If this method completes successfully (i.e. without
throwing an exception), the last run exception is
set to null indicating no exception occurred and
subsequent calls to hasRun() will return true.
If this method throws an exception, the last run exception
is filled in and hasRun() subsequent calls to hasRun()
will return false.
- Specified by:
runImpl
in class AbstractOperation
- Throws:
JGenFileException
- if an error occurs.- See Also:
au.com.prunge.jgenfile.AbstractOperation#runImpl()