| java.lang.Object | |||
| ↳ | com.microstrategy.web.tasks.AbstractBaseTask | ||
| ↳ | com.microstrategy.web.app.tasks.AbstractAppTask | ||
| ↳ | com.microstrategy.web.app.tasks.UploadVisualizationZipTask | ||
This Task processes the file uploaded from an HTML form and write into Plugins folder
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.microstrategy.web.tasks.AbstractBaseTask
| |||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.microstrategy.web.tasks.AbstractBaseTask
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
UploadVisualizationZipTask()
Creates a new UploadFileTask object.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
processRequest(TaskRequestContext context, TaskOutput taskOutput)
This method uploads the contents of a file and processes it for
use in the MicroStrategy Prompts page.
| ||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void | renderErrorMessages(MarkupOutput mo, String message) | ||||||||||
| void | renderSuccessfulMessage(MarkupOutput mo, String visName) | ||||||||||
| void |
renderTitle(MarkupOutput mo)
Render the response result page
| ||||||||||
| PostedFile |
retrieveUploadedFile(TaskRequestContext context, RequestKeys requestKeys)
Retrieves the uploaded file as an instance of a PostedFile.
| ||||||||||
| void |
validateExtension(RequestKeys requestKeys, PostedFile file)
Validates whether the extension of the file is acceptable or
not.
| ||||||||||
| void |
validateMaxSize(RequestKeys requestKeys, PostedFile file)
Validate that the maximum size of the uploaded file does not
exceed the maximum specified.
| ||||||||||
| void |
validateUploadedFile(RequestKeys requestKeys, PostedFile file)
Performs a validation of the uploaded file.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.microstrategy.web.app.tasks.AbstractAppTask
| |||||||||||
From class
com.microstrategy.web.tasks.AbstractBaseTask
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.microstrategy.web.tasks.Task
| |||||||||||
Creates a new UploadFileTask object.
This method uploads the contents of a file and processes it for use in the MicroStrategy Prompts page. It follows through these steps:
retrieveUploadedFile(TaskRequestContext, RequestKeys).validateUploadedFile(RequestKeys, PostedFile).| context | The TaskRequestContext that contains all
information about this Task invocation. |
|---|---|
| taskOutput | The TaskOutput that contains our response. |
| TaskException | If anything fails along the way. See the individual methods invoked by this method. |
|---|
Retrieves the uploaded file as an instance of a PostedFile.
| context | The TaskRequestContext that contains all
information about the incoming Task request. |
|---|---|
| requestKeys | The RequestKeys that contains all Task
parameter values. |
PostedFile that contains the contents of the uploaded
file.| TaskException | If there is no file uploaded. |
|---|
Validates whether the extension of the file is acceptable or not.
| requestKeys | The RequestKeys instance that contains all
values of Task parameters. |
|---|---|
| file | The PostedFile that represents our uploaded file. |
| TaskException | If validation fails. |
|---|
Validate that the maximum size of the uploaded file does not exceed the maximum specified.
| requestKeys | The RequestKeys instance that contains all
values of Task parameters. |
|---|---|
| file | The PostedFile that represents our uploaded file. |
| TaskException | If validation fails. |
|---|
Performs a validation of the uploaded file. In this particular instance, it performs two checks:
validateMaxSize(RequestKeys, PostedFile).validateExtension(RequestKeys, PostedFile).| requestKeys | The RequestKeys instance that contains all
values of Task parameters. |
|---|---|
| file | The PostedFile that represents our uploaded file. |
| TaskException | If any validation fails. |
|---|