| java.lang.Object com.opensymphony.webwork.views.jsp.ui.AbstractRichtexteditorResult
All known Subclasses: com.opensymphony.webwork.views.jsp.ui.RichtexteditorGetFoldersResult, com.opensymphony.webwork.views.jsp.ui.RichtexteditorGetFoldersAndFilesResult, com.opensymphony.webwork.views.jsp.ui.RichtexteditorFileUploadResult, com.opensymphony.webwork.views.jsp.ui.RichtexteditorCreateFolderResult,
AbstractRichtexteditorResult | abstract public class AbstractRichtexteditorResult implements Result(Code) | |
Abstract result for all Rich Text Editor results. It contains common methods
that might come in handy to its subclass.
Configuration of result necessary in xwork.xml (is already there by default) are
as follows:
<!-- Results necessary when using 'browse server' and 'upload' feature of Richtexteditor -->
<result-type name="richtexteditorGetFolders"
class="com.opensymphony.webwork.views.jsp.ui.RichtexteditorGetFoldersResult" />
<result-type name="richtexteditorGetFoldersAndFiles"
class="com.opensymphony.webwork.views.jsp.ui.RichtexteditorGetFoldersAndFilesResult" />
<result-type name="richtexteditorCreateFolder"
class="com.opensymphony.webwork.views.jsp.ui.RichtexteditorCreateFolderResult" />
<result-type name="richtexteditorFileUpload"
class="com.opensymphony.webwork.views.jsp.ui.RichtexteditorFileUploadResult" />
author: tm_jee version: $Date: 2006-03-08 21:22:35 +0100 (Wed, 08 Mar 2006) $ $Id: AbstractRichtexteditorResult.java 2338 2006-03-08 20:22:35Z rainerh $ |
Method Summary | |
protected Element | buildCommonResponseXml(Document document, String command, String type, String folderPath, String serverPath) Build a common xml structure for all xml based result. | protected Document | buildDocument() | protected String | getCommand(ActionInvocation invocation) Get the command send by the Rich Text Editor. | protected String | getFolderPath(ActionInvocation invocation) Get the folder path send by the Rich Text Editor. | protected String | getServerPath(ActionInvocation invocation) | protected String | getType(ActionInvocation invocation) Get the type send by the Rich Text Editor. | protected CreateFolderResult | richtexteditorCreateFolderResult(ActionInvocation invocation) Get the CreateFolderResult computed from AbstractRichtexteditorConnector or its
decendant through AbstractRichtexteditorConnector#createFolder(String, String, String). | protected FileUploadResult | richtexteditorFileUploadResult(ActionInvocation invocation) Get the FileUploadResult computed from AbstractRichtexteditorConnector or its
decendant through AbstractRichtexteditorConnector#fileUpload(String, String, String, String, File). | protected Folder[] | richtexteditorFolders(ActionInvocation invocation) Get the Folder[] computed from AbstractRichtexteditorConnector or its
decendant through AbstractRichtexteditorConnector#getFolders(String, String). | protected FoldersAndFiles | richtexteditorFoldersAndFiles(ActionInvocation invocation) Get the FoldersAndFiles computed from AbstractRichtexteditorConnector or its
decendant through AbstractRichtexteditorConnector#getFoldersAndFiles(String, String). | protected String | stringFromDocument(Document document) Convert a Document to its string representation. | protected void | writeDocumentToStream(Document document, OutputStream out) |
buildCommonResponseXml | protected Element buildCommonResponseXml(Document document, String command, String type, String folderPath, String serverPath)(Code) | | Build a common xml structure for all xml based result. For example:
<?xml version="1.0" encoding="utf-8" ?>
<Connector command="RequestedCommandName" resourceType=" RequestedResourceType">
<CurrentFolder path="CurrentFolderPath" url="CurrentFolderUrl" />
<!-- Here goes all specific command data -->
</Connector>
Parameters: document - Parameters: command - Parameters: type - Parameters: folderPath - Parameters: serverPath - A common xml structure for all xml based result. |
getCommand | protected String getCommand(ActionInvocation invocation)(Code) | | Get the command send by the Rich Text Editor. It would be one of the followings.
Only valid when rich text editor issue a server-side 'Browse' not 'Upload'.
- GetFolders
- GetFoldersAndFiles
- CreateFolder
- FileUpload
Parameters: invocation - The command send by the Rich Text Editor. |
getFolderPath | protected String getFolderPath(ActionInvocation invocation)(Code) | | Get the folder path send by the Rich Text Editor.
Parameters: invocation - The folder path send by the Rich Text Editor. |
getType | protected String getType(ActionInvocation invocation)(Code) | | Get the type send by the Rich Text Editor. It could be one of the followings:
Parameters: invocation - The type send by the Rich Text Editor. |
|
|