public class

UploadImageTask

extends AbstractBaseTask
java.lang.Object
   ↳ com.microstrategy.web.tasks.AbstractBaseTask
     ↳ com.microstrategy.web.app.tasks.UploadImageTask

Class Overview

This Task processes the file uploaded from an HTML form

Summary

[Expand]
Inherited Constants
From class com.microstrategy.web.tasks.AbstractBaseTask
[Expand]
Inherited Fields
From class com.microstrategy.web.tasks.AbstractBaseTask
Public Constructors
UploadImageTask()
Creates a new ImportFileTask object.
Public Methods
void processRequest(TaskRequestContext context, MarkupOutput markupOutput)
The default implementation of this version of processRequest is empty.
Protected Methods
PostedFile retrieveUploadedFile(TaskRequestContext context, RequestKeys requestKeys)
Retrieves the uploaded file as an instance of a PostedFile.
String saveFile(PostedFile origFile, String filePath)
[Expand]
Inherited Methods
From class com.microstrategy.web.tasks.AbstractBaseTask
From class java.lang.Object
From interface com.microstrategy.web.tasks.Task

Public Constructors

public UploadImageTask ()

Creates a new ImportFileTask object.

Public Methods

public void processRequest (TaskRequestContext context, MarkupOutput markupOutput)

The default implementation of this version of processRequest is empty. Task implementators may override either version of processRequest.

Parameters
context The TaskRequestContext object that maintains the state of the request.
markupOutput The MarkupOutput that records the contents of the Task response.
Throws
TaskException

Protected Methods

protected PostedFile retrieveUploadedFile (TaskRequestContext context, RequestKeys requestKeys)

Retrieves the uploaded file as an instance of a PostedFile.

Parameters
context The TaskRequestContext that contains all information about the incoming Task request.
requestKeys The RequestKeys that contains all Task parameter values.
Returns
  • A PostedFile that contains the contents of the uploaded file.
Throws
TaskException If there is no file uploaded.

protected String saveFile (PostedFile origFile, String filePath)

Throws
TaskException