Class DownloadManager
java.lang.Object
de.xima.fc.servlet.manager.DownloadManager
Manager for handling downloads of public form resources. Responds to HTTP requests for public resources by writing
the content of the requested resource to the response.
- Author:
- XIMA MEDIA GmbH
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidhandleAttachment(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, XfcSession xfs, UserContext uc) Deprecated, for removal: This API element is subject to removal in a future version.static voidhandleProjektRessource(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, XfcSession xfs, UserContext uc) Deprecated, for removal: This API element is subject to removal in a future version.static booleanhandlePublicMandantRessourceByName(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc) Deprecated, for removal: This API element is subject to removal in a future version.static booleanhandlePublicMandantRessourceByName(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc, String contentType) Deprecated, for removal: This API element is subject to removal in a future version.static booleanhandlePublicPluginRessourceByName(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc, String contentType) Deprecated, for removal: This API element is subject to removal in a future version.static booleanhandlePublicPluginRessourceByUUID(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc, String contentType) Deprecated, for removal: This API element is subject to removal in a future version.static booleanhandlePublicProjektRessourceByName(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc) Deprecated, for removal: This API element is subject to removal in a future version.static booleanhandlePublicProjektRessourceByName(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc, String contentType) Deprecated, for removal: This API element is subject to removal in a future version.static voidhandlePublicResourceRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc) Handles the given request by writing the content of the requested to the response (if it exists).static voidhandlePublicRessourceByName(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc, String contentType) Deprecated, for removal: This API element is subject to removal in a future version.static booleanChecks whether the resource with the given file name can be accessed publicly.
-
Field Details
-
PARAMETER_NAME
Deprecated.UseCmnConst.DownloadManagerParams.PARAMETER_NAMEinstead.The name of the URL parameter that contains the name of the resource to download.- See Also:
-
-
Constructor Details
-
DownloadManager
public DownloadManager()
-
-
Method Details
-
handleAttachment
@Deprecated(forRemoval=true, since="8.3.0") public static void handleAttachment(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, XfcSession xfs, UserContext uc) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Handles the given request by writing content of theattachmentto the response (if it exists).- Parameters:
req- The HTTP request to handle.resp- The HTTP response to write the attachment to.xfs- The session to use for the request.uc- The user context to use for the request.- Throws:
IOException- If an error occurs while writing the attachment to the response.
-
handleProjektRessource
@Deprecated(forRemoval=true, since="8.3.0") public static void handleProjektRessource(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, XfcSession xfs, UserContext uc) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Handles the given request by writing the content of the publicproject resourceto the response (if it exists).- Parameters:
req- The HTTP request to handle.resp- The HTTP response to write the resource to.xfs- The session to use for the request.uc- The user context to use for the request.- Throws:
IOException- If an error occurs while writing the resource to the response.
-
handlePublicMandantRessourceByName
@Deprecated(forRemoval=true, since="8.3.0") public static boolean handlePublicMandantRessourceByName(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Handles the given request by writing the content of the publicclient resourceto the response (if it exists).- Parameters:
req- The HTTP request to handle.resp- The HTTP response to write the resource to.uc- The user context to use for the request.- Returns:
trueif the resource was found and written to the response,falseotherwise.- Throws:
IOException- If an error occurs while writing the resource to the response.
-
handlePublicMandantRessourceByName
@Deprecated(forRemoval=true, since="8.3.0") public static boolean handlePublicMandantRessourceByName(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc, String contentType) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Handles the given request by writing the content of the publicclient resourceto the response (if it exists).- Parameters:
req- The HTTP request to handle.resp- The HTTP response to write the resource to.uc- The user context to use for the request.contentType- The content type of the resource.- Returns:
trueif the resource was found and written to the response,falseotherwise.- Throws:
IOException- If an error occurs while writing the resource to the response.
-
handlePublicPluginRessourceByName
@Deprecated(forRemoval=true, since="8.3.0") public static boolean handlePublicPluginRessourceByName(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc, String contentType) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Handles the given request by writing the content of the publicform resource pluginto the response (if it exists).- Parameters:
req- The HTTP request to handle.resp- The HTTP response to write the resource to.uc- The user context to use for the request.contentType- The content type of the resource.- Returns:
trueif the resource was found and written to the response,falseotherwise.- Throws:
IOException- If an error occurs while writing the resource to the response.
-
handlePublicPluginRessourceByUUID
@Deprecated(forRemoval=true, since="8.3.0") public static boolean handlePublicPluginRessourceByUUID(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc, String contentType) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Handles the given request by writing the content of the publicform resource pluginto the response (if it exists).- Parameters:
req- The HTTP request to handle.resp- The HTTP response to write the resource to.uc- The user context to use for the request.contentType- The content type of the resource.- Returns:
trueif the resource was found and written to the response,falseotherwise.- Throws:
IOException- If an error occurs while writing the resource to the response.
-
handlePublicProjektRessourceByName
@Deprecated(forRemoval=true, since="8.3.0") public static boolean handlePublicProjektRessourceByName(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Handles the given request by writing the content of the publicproject resourceto the response (if it exists).- Parameters:
req- The HTTP request to handle.resp- The HTTP response to write the resource to.uc- The user context to use for the request.- Returns:
trueif the resource was found and written to the response,falseotherwise.- Throws:
IOException- If an error occurs while writing the resource to the response.
-
handlePublicProjektRessourceByName
@Deprecated(forRemoval=true, since="8.3.0") public static boolean handlePublicProjektRessourceByName(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc, String contentType) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Handles the given request by writing the content of the publicproject resourceto the response (if it exists).- Parameters:
req- The HTTP request to handle.resp- The HTTP response to write the resource to.uc- The user context to use for the request.contentType- The content type of the resource.- Returns:
trueif the resource was found and written to the response,falseotherwise.- Throws:
IOException- If an error occurs while writing the resource to the response.
-
handlePublicResourceRequest
public static void handlePublicResourceRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc) Handles the given request by writing the content of the requested to the response (if it exists). This method determines the resource from the parameters of the request.- Parameters:
req- The HTTP request to handle.resp- The HTTP response to write the resource to.uc- The user context to use for the request.- Since:
- 8.3.0
-
handlePublicRessourceByName
@Deprecated(forRemoval=true, since="8.3.0") public static void handlePublicRessourceByName(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, UserContext uc, String contentType) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Handles the given request by writing the content of the requested to the response (if it exists). This method determines the resource from the parameters of the request.- Parameters:
req- The HTTP request to handle.resp- The HTTP response to write the resource to.uc- The user context to use for the request.contentType- The content type of the resource.- Throws:
IOException- If an error occurs while writing the resource to the response.
-
isPublic
Checks whether the resource with the given file name can be accessed publicly. If this returns false, the resource cannot be accessed and no URLs should be generated for it.- Parameters:
resourceName- The name of the resource to check.- Returns:
trueif the resource can be accessed publicly,falseotherwise.
-
CmnConst.DownloadManagerParams.PARAMETER_NAMEinstead.