org.gcube.contentmanagement.baselayer.streamutils
Class DeleteContentAction
java.lang.Object
org.gcube.contentmanagement.baselayer.streamutils.DeleteContentAction
- All Implemented Interfaces:
- FinishingAction
public class DeleteContentAction
- extends java.lang.Object
- implements FinishingAction
This action deletes some defined content using the given content manager.
|
Method Summary |
void |
finish(FinishingActionStream fas)
This method needs to be implemeted according to whatever task should be
performed. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeleteContentAction
public DeleteContentAction(RawFileContentManager manager,
RawContentLocation locationToDelete,
BasicStorageHints hints,
boolean deleteIfStreamUnread)
- Constructs a new action
- Parameters:
manager - the manager to uselocationToDelete - the location to deletehints - the hints to be useddeleteIfStreamUnread - if set to false, the content will only get
deleted, if at least one byte has been read; if set to
true, the content will get removed no matter if
the stream was read or not as soon as the stream gets closed.
finish
public void finish(FinishingActionStream fas)
throws java.io.IOException
- This method needs to be implemeted according to whatever task should be
performed.
- Specified by:
finish in interface FinishingAction
- Parameters:
fas - the stream operate on, normally this is invoked inside a
FinishingActionStream.finish(this);
- Throws:
java.io.IOException - in order to comlpy with the streams used by Java, only
IOExceptions can be thrown from stream operations.