diff --git a/common/source/java/ch/systemsx/cisd/common/utilities/IPathHandler.java b/common/source/java/ch/systemsx/cisd/common/utilities/IPathHandler.java index ab74113da289de629ed527e3a28caae464c4282e..d775b9049a87fa6e27ea523577c001caf04d4a9b 100644 --- a/common/source/java/ch/systemsx/cisd/common/utilities/IPathHandler.java +++ b/common/source/java/ch/systemsx/cisd/common/utilities/IPathHandler.java @@ -22,9 +22,9 @@ import java.io.File; * A role for handling paths. The paths are supposed to go away when they have been handled * successfully. * + * @see IStoreHandler * @author Bernd Rinn */ -// TODO 2008-05-13, Christian Ribeaud: very similar to IStoreHandler. Should be merged with it. public interface IPathHandler { /** diff --git a/common/source/java/ch/systemsx/cisd/common/utilities/IStoreHandler.java b/common/source/java/ch/systemsx/cisd/common/utilities/IStoreHandler.java index 7a9dacf81c8c09b60e0309bd844fae3a8c1ea91a..28a8a9c8a811f4e60ec0a300f9990a51dff09440 100644 --- a/common/source/java/ch/systemsx/cisd/common/utilities/IStoreHandler.java +++ b/common/source/java/ch/systemsx/cisd/common/utilities/IStoreHandler.java @@ -16,15 +16,31 @@ package ch.systemsx.cisd.common.utilities; +import java.io.File; + /** - * Handles items in the file store + * Handles items in the file store. + * <p> + * Note that this interface is a higher abstraction of {@link IPathHandler} which works with + * {@link File}. + * </p> * + * @see IPathHandler * @author Tomasz Pylak */ -// TODO 2008-05-13, Christian Ribeaud: very similar to IPathHandler. Should be merged with it. public interface IStoreHandler { + /** + * Handles given <var>item</var>. Successful handling is indicated by <var>item</var> being + * gone when the method returns. + */ void handle(StoreItem item); + /** + * Whether given <var>item</var> may be handled or not. + * <p> + * This method is called just before {@link #handle(StoreItem)}. + * </p> + */ boolean mayHandle(StoreItem item); }