|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.webwork.views.jsp.ui.AbstractRichtexteditorResult
public abstract class AbstractRichtexteditorResult
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" />
Constructor Summary | |
---|---|
AbstractRichtexteditorResult()
|
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()
Build an xml Document |
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)
Get the server path calculated from AbstractRichtexteditoConnector or its decendant through AbstractRichtexteditorConnector#calculate#calculateServerPath(String, String String) |
protected String |
getType(ActionInvocation invocation)
Get the type send by the Rich Text Editor. |
protected AbstractRichtexteditorConnector.CreateFolderResult |
richtexteditorCreateFolderResult(ActionInvocation invocation)
Get the CreateFolderResult computed from AbstractRichtexteditorConnector or its
decendant through AbstractRichtexteditorConnector#createFolder(String, String, String). |
protected AbstractRichtexteditorConnector.FileUploadResult |
richtexteditorFileUploadResult(ActionInvocation invocation)
Get the FileUploadResult computed from AbstractRichtexteditorConnector or its
decendant through AbstractRichtexteditorConnector#fileUpload(String, String, String, String, File). |
protected AbstractRichtexteditorConnector.Folder[] |
richtexteditorFolders(ActionInvocation invocation)
Get the Folder[] computed from AbstractRichtexteditorConnector or its
decendant through AbstractRichtexteditorConnector#getFolders(String, String). |
protected AbstractRichtexteditorConnector.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 |
protected void |
writeDocumentToStream(Document document,
OutputStream out)
Write a Document to an OutputStream out |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.opensymphony.xwork.Result |
---|
execute |
Constructor Detail |
---|
public AbstractRichtexteditorResult()
Method Detail |
---|
protected Document buildDocument() throws ParserConfigurationException
Document
ParserConfigurationException
protected Element buildCommonResponseXml(Document document, String command, String type, String folderPath, String serverPath)
<?xml version="1.0" encoding="utf-8" ?> <Connector command="RequestedCommandName" resourceType=" RequestedResourceType"> <CurrentFolder path="CurrentFolderPath" url="CurrentFolderUrl" /> <!-- Here goes all specific command data --> </Connector>
document
- command
- type
- folderPath
- serverPath
-
protected String stringFromDocument(Document document) throws TransformerConfigurationException, TransformerException
Document to its string representation.
- Parameters:
document
-
- Returns:
- The documents String representation.
- Throws:
TransformerConfigurationException
TransformerException
protected void writeDocumentToStream(Document document, OutputStream out) throws TransformerConfigurationException, TransformerException
Document
to an OutputStream out
document
- out
-
TransformerConfigurationException
TransformerException
protected String getCommand(ActionInvocation invocation)
invocation
-
protected String getType(ActionInvocation invocation)
invocation
-
protected String getFolderPath(ActionInvocation invocation)
invocation
-
protected String getServerPath(ActionInvocation invocation)
invocation
-
AbstractRichtexteditorConnector.calculateServerPath(String, String, String)
protected AbstractRichtexteditorConnector.Folder[] richtexteditorFolders(ActionInvocation invocation)
Folder[]
computed from AbstractRichtexteditorConnector or its
decendant through AbstractRichtexteditorConnector#getFolders(String, String). Only
valid if it is a 'GetFolder' command.
invocation
-
Folder[]
computed from AbstractRichtexteditorConnectorAbstractRichtexteditorConnector.getFolders(String, String)
protected AbstractRichtexteditorConnector.FoldersAndFiles richtexteditorFoldersAndFiles(ActionInvocation invocation)
FoldersAndFiles
computed from AbstractRichtexteditorConnector or its
decendant through AbstractRichtexteditorConnector#getFoldersAndFiles(String, String). Only
valid if it is a 'GetFoldersAndFiles' command.
invocation
-
FoldersAndFiles
computed from AbstractRichtexteditorConnectorAbstractRichtexteditorConnector.getFoldersAndFiles(String, String)
protected AbstractRichtexteditorConnector.CreateFolderResult richtexteditorCreateFolderResult(ActionInvocation invocation)
CreateFolderResult
computed from AbstractRichtexteditorConnector or its
decendant through AbstractRichtexteditorConnector#createFolder(String, String, String). Only
valid if it is a 'CreateFolder' command.
invocation
-
CreateFolderResult
computed from AbstractRichtexteditorConnectorAbstractRichtexteditorConnector.createFolder(String, String, String)
protected AbstractRichtexteditorConnector.FileUploadResult richtexteditorFileUploadResult(ActionInvocation invocation)
FileUploadResult
computed from AbstractRichtexteditorConnector or its
decendant through AbstractRichtexteditorConnector#fileUpload(String, String, String, String, File).
Only valid if it is a 'FileUpload' command
invocation
-
FileUploadResult
computed from AbstractRichtexteditorConnectorAbstractRichtexteditorConnector.fileUpload(String, String, String, String, java.io.File)
|
WebWork Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |