dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #40027
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20268: Javadoc
------------------------------------------------------------
revno: 20268
committer: Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-09-21 16:33:06 +0200
message:
Javadoc
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java 2015-09-18 18:01:58 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/fileresource/FileResourceContentStore.java 2015-09-21 14:33:06 +0000
@@ -35,9 +35,26 @@
*/
public interface FileResourceContentStore
{
+ /**
+ * Get the content bytes of a FileResource from the file store.
+ * @param key the key.
+ * @return a ByteSource which provides a stream to the content or null if the content cannot be found or read.
+ */
ByteSource getFileResourceContent( String key );
-
+
+ /**
+ * Save the content bytes of a FileResource to the file store.
+ * @param key the key to use. Must be unique in the file store.
+ * @param content a ByteSource providing a stream of the content to save.
+ * @param size the byte length of the content.
+ * @param contentMd5 the MD5 digest of the content.
+ * @return the key on success or null if saving failed.
+ */
String saveFileResourceContent( String key, ByteSource content, long size, String contentMd5 );
-
+
+ /**
+ * Delete the content bytes of a file resource.
+ * @param key the key.
+ */
void deleteFileResourceContent( String key );
}