au.com.prunge.jgenfile.impl
Class NullCreateLinkOperation
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.NullCreateLinkOperation
- All Implemented Interfaces:
- CreateLinkOperation, DirectoryOperation, ItemOperation, Operation
- public class NullCreateLinkOperation
- extends AbstractDirectoryOperation
- implements CreateLinkOperation
A create link operation that always fails with
an operation not supported exception.
- Version:
- 1.0
- Author:
- Peter Runge
Constructor Summary |
NullCreateLinkOperation(au.com.prunge.jgenfile.Directory directory,
au.com.prunge.jgenfile.Item targetItem)
Constructs a NullCreateLinkOperation . |
Method Summary |
au.com.prunge.jgenfile.Link |
getLink()
Returns the link that was created by this operation. |
au.com.prunge.jgenfile.Item |
getTargetItem()
Returns the target item of the link. |
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 |
NullCreateLinkOperation
public NullCreateLinkOperation(au.com.prunge.jgenfile.Directory directory,
au.com.prunge.jgenfile.Item targetItem)
- Constructs a
NullCreateLinkOperation
.
- Parameters:
directory
- the directory to create the link in.targetItem
- the item the link will point to.
getTargetItem
public au.com.prunge.jgenfile.Item getTargetItem()
- Description copied from interface:
CreateLinkOperation
- Returns the target item of the link.
- Specified by:
getTargetItem
in interface CreateLinkOperation
- Returns:
- the target item.
- See Also:
CreateLinkOperation.getTargetItem()
getLink
public au.com.prunge.jgenfile.Link getLink()
throws OperationNotFinishedException,
JGenFileException
- Description copied from interface:
CreateLinkOperation
- Returns the link that was created by this operation.
- Specified by:
getLink
in interface CreateLinkOperation
- Returns:
- the link that was created by this operation.
- Throws:
OperationNotFinishedException
- if this method
was called and the run() method has not
finished or has not been called.
JGenFileException
- if another error occurs.- See Also:
CreateLinkOperation.getLink()
runImpl
public void runImpl()
throws OperationNotSupportedException
- 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
OperationNotSupportedException
- See Also:
au.com.prunge.jgenfile.AbstractOperation#runImpl()