|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.plugin.XWikiDefaultPlugin
com.xpn.xwiki.plugin.fileupload.FileUploadPlugin
public class FileUploadPlugin
Field Summary | |
---|---|
private static org.apache.commons.logging.Log |
mLogger
|
private static long |
UPLOAD_DEFAULT_MAXSIZE
|
private static long |
UPLOAD_DEFAULT_SIZETHRESHOLD
|
Constructor Summary | |
---|---|
FileUploadPlugin(java.lang.String name,
java.lang.String className,
XWikiContext context)
|
Method Summary | |
---|---|
void |
cleanFileList(XWikiContext context)
Deletes all temporary files of the upload |
void |
endRendering(XWikiContext context)
endRendering to make sure we don't leave files in temp directories |
java.lang.String |
getFileItem(java.lang.String name,
XWikiContext context)
Allows to retrieve the data of FileItem named name loadFileList needs to be called beforehand |
byte[] |
getFileItemData(java.lang.String name,
XWikiContext context)
Allows to retrieve the data of FileItem named name loadFileList needs to be called beforehand |
java.util.List |
getFileItemNames(XWikiContext context)
Allows to retrieve the list of FileItem names loadFileList needs to be called beforehand |
java.util.List |
getFileItems(XWikiContext context)
Allows to retrieve the current FileItem list loadFileList needs to be called beforehand |
java.lang.String |
getFileName(java.lang.String name,
XWikiContext context)
Get file name from FileItem |
java.lang.String |
getName()
Allow to get the plugin name |
Api |
getPluginApi(XWikiPluginInterface plugin,
XWikiContext context)
|
void |
init(XWikiContext context)
|
void |
loadFileList(long uploadMaxSize,
int uploadSizeThreashold,
java.lang.String tempdir,
XWikiContext context)
Allows to load the file list in the context if there is a file upload |
void |
loadFileList(XWikiContext context)
Allows to load the file list in the context if there is a file upload Default uploadMaxSize, uploadSizeThreashold and temporary directory are used |
void |
virtualInit(XWikiContext context)
|
Methods inherited from class com.xpn.xwiki.plugin.XWikiDefaultPlugin |
---|
beginRendering, commonTagsHandler, downloadAttachment, endRenderingHandler, flushCache, getClassName, insidePREHandler, outsidePREHandler, setClassName, setName, startRenderingHandler |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.xpn.xwiki.plugin.XWikiPluginInterface |
---|
beginRendering, commonTagsHandler, downloadAttachment, endRenderingHandler, flushCache, getClassName, insidePREHandler, outsidePREHandler, setClassName, setName, startRenderingHandler |
Field Detail |
---|
private static org.apache.commons.logging.Log mLogger
private static final long UPLOAD_DEFAULT_MAXSIZE
private static final long UPLOAD_DEFAULT_SIZETHRESHOLD
Constructor Detail |
---|
public FileUploadPlugin(java.lang.String name, java.lang.String className, XWikiContext context)
Method Detail |
---|
public java.lang.String getName()
getName
in interface XWikiPluginInterface
getName
in class XWikiDefaultPlugin
public void init(XWikiContext context)
init
in interface XWikiPluginInterface
init
in class XWikiDefaultPlugin
public void virtualInit(XWikiContext context)
virtualInit
in interface XWikiPluginInterface
virtualInit
in class XWikiDefaultPlugin
public Api getPluginApi(XWikiPluginInterface plugin, XWikiContext context)
getPluginApi
in interface XWikiPluginInterface
getPluginApi
in class XWikiDefaultPlugin
public void endRendering(XWikiContext context)
endRendering
in interface XWikiPluginInterface
endRendering
in class XWikiDefaultPlugin
context
- Context of the requestpublic void cleanFileList(XWikiContext context)
context
- Context of the requestpublic void loadFileList(XWikiContext context) throws XWikiException
context
- Context of the request
XWikiException
- An XWikiException is thrown if the request could not be parserpublic void loadFileList(long uploadMaxSize, int uploadSizeThreashold, java.lang.String tempdir, XWikiContext context) throws XWikiException
uploadMaxSize
- Maximum size of the requestuploadSizeThreashold
- Threashold over which the data should be on disk and not in memorytempdir
- Temporary Directory to store temp datacontext
- Context of the request
XWikiException
- An XWikiException is thrown if the request could not be parserpublic java.util.List getFileItems(XWikiContext context)
context
- Context of the request
public byte[] getFileItemData(java.lang.String name, XWikiContext context) throws XWikiException
name
- Name of the itemcontext
- Context of the request
XWikiException
- Exception is thrown if the data could not be readpublic java.lang.String getFileItem(java.lang.String name, XWikiContext context) throws XWikiException
name
- Name of the itemcontext
- Context of the requestname
- context
-
XWikiException
- Exception is thrown if the data could not be read
XWikiException
public java.util.List getFileItemNames(XWikiContext context)
context
- Context of the request
public java.lang.String getFileName(java.lang.String name, XWikiContext context)
name
- of the fieldcontext
- Context of the request
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |