Package com.xpn.xwiki.web
Class TempResourceAction
- java.lang.Object
-
- com.xpn.xwiki.web.XWikiAction
-
- com.xpn.xwiki.web.TempResourceAction
-
- All Implemented Interfaces:
com.xpn.xwiki.internal.web.LegacyAction
@Component @Named("temp") @Singleton @Deprecated public class TempResourceAction extends XWikiAction
Deprecated.Use the "tmp" resource reference handler instead since 8.3Action responsible for downloading temporary resources created by various modules. The temporary resource is put in the temporary directory in a directory named "temp" and in subdirectories "(module)/(wiki)/(space)/(page)/(file)" where:- (module): it's the 3rd path segment in the request URL (format: {code .../temp/1/2/3/4})
- (wiki): the name of the current wiki (extracted from the URL too)
- (space): it's the 1st path segment in the request URL (format: {code .../temp/1/2/3/4})
- (page): it's the 2nd path segment in the request URL (format: {code .../temp/1/2/3/4})
- (file): it's the 4th path segment in the request URL (format: {code .../temp/1/2/3/4})
http://localhost:8080/xwiki/bin/temp/Main/WebHome/test/test.png
then the resource will be fetched fromTMPDIR/temp/test/xwiki/Main/WebHome/test.png
.- Since:
- 2.4M1
- Version:
- $Id: cf719c9124a2de2a8377a968f6ff08260b235d43 $
-
-
Field Summary
Fields Modifier and Type Field Description static Pattern
URI_PATTERN
Deprecated.URI pattern for this action.-
Fields inherited from class com.xpn.xwiki.web.XWikiAction
ACTION_PROGRESS, componentDescriptor, container, execution, observation, waitForXWikiInitialization
-
-
Constructor Summary
Constructors Constructor Description TempResourceAction()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected File
getTemporaryFile(String uri, XWikiContext context)
Deprecated.Returns the temporary file corresponding to the specified URI.String
render(XWikiContext context)
Deprecated.-
Methods inherited from class com.xpn.xwiki.web.XWikiAction
action, answerJSON, cleanupComponents, csrfTokenCheck, csrfTokenCheck, execute, execute, getContextualAuthorizationManager, getCurrentMixedDocumentReferenceResolver, getCurrentScriptContext, getEntityNameValidationConfiguration, getEntityNameValidationManager, getFormClass, getLocalization, getLocalSerializer, getName, getProgress, getRealPath, getTranslatedDocument, handleRevision, initializeContainerComponent, initializeXWikiContext, initializeXWikiContext, isEntityReferenceNameValid, localizePlainOrKey, readFromTemplate, resolveTemplate, sendGlobalRedirect, sendRedirect, setContentLength, supportRedirections, writeAjaxErrorResponse
-
-
-
-
Field Detail
-
URI_PATTERN
public static final Pattern URI_PATTERN
Deprecated.URI pattern for this action.
-
-
Method Detail
-
render
public String render(XWikiContext context) throws XWikiException
Deprecated.- Overrides:
render
in classXWikiAction
- Throws:
XWikiException
-
getTemporaryFile
protected File getTemporaryFile(String uri, XWikiContext context)
Deprecated.Returns the temporary file corresponding to the specified URI.- Parameters:
uri
- request URI.context
- xwiki context.- Returns:
- temporary file corresponding to the specified URI or null if no such file can be located.
-
-