Package com.xwiki.admintools.download
Interface DataResource
-
@Role public interface DataResourceAccess server files.- Version:
- $Id$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddZipEntry(ZipOutputStream zipOutputStream, Map<String,String[]> filters)Retrieves the content of a system file and adds it as an entry inside aZipOutputStream.byte[]getByteData(Map<String,String[]> params)Retrieve the content of a system file.StringgetIdentifier()Get the hint of a component.
-
-
-
Method Detail
-
addZipEntry
void addZipEntry(ZipOutputStream zipOutputStream, Map<String,String[]> filters)
Retrieves the content of a system file and adds it as an entry inside aZipOutputStream.- Parameters:
zipOutputStream-ZipOutputStreamrepresents the zip archive in which the entry is written.filters- store filters that can be used for file selection.
-
getByteData
byte[] getByteData(Map<String,String[]> params) throws Exception
Retrieve the content of a system file.- Parameters:
params- can be used to send additional info to the component.- Returns:
- the content of the file as a
Bytearray. - Throws:
IOException- when there are errors while handling searched files.NumberFormatException- when there is an invalid numeric input.Exception
-
getIdentifier
String getIdentifier()
Get the hint of a component.- Returns:
- the component hint.
-
-