| java.lang.Object com.opensymphony.xwork.ActionSupport com.opensymphony.webwork.components.AbstractRichtexteditorConnector
All known Subclasses: com.opensymphony.webwork.components.DefaultRichtexteditorConnector, com.opensymphony.webwork.components.MockRichtexteditorConnector,
AbstractRichtexteditorConnector | abstract public class AbstractRichtexteditorConnector extends ActionSupport implements ServletRequestAware,ServletResponseAware(Code) | |
An abstract class to be extended in order for the Rich text editor to perform server-side
browsing and uploading.
<package name="richtexteditor-browse" extends="webwork-default" namespace="/webwork/richtexteditor/editor/filemanager/browser/default/connectors/jsp">
<action name="connector" class="com.opensymphony.webwork.components.DefaultRichtexteditorConnector" method="browse">
<result name="getFolders" type="richtexteditorGetFolders" />
<result name="getFoldersAndFiles" type="richtexteditorGetFoldersAndFiles" />
<result name="createFolder" type="richtexteditorCreateFolder" />
<result name="fileUpload" type="richtexteditorFileUpload" />
</action>
</package>
<package name="richtexteditor-upload" extends="webwork-default" namespace="/webwork/richtexteditor/editor/filemanager/upload">
<action name="uploader" class="com.opensymphony.webwork.components.DefaultRichtexteditorConnector" method="upload">
<result name="richtexteditorFileUpload" />
</action>
</package>
author: tm_jee version: $Date: 2006-03-08 21:22:35 +0100 (Wed, 08 Mar 2006) $ $Id: AbstractRichtexteditorConnector.java 2338 2006-03-08 20:22:35Z rainerh $ See Also: com.opensymphony.webwork.components.DefaultRichtexteditorConnector |
Inner Class :public static class Folder implements Serializable | |
Inner Class :public static class File implements Serializable | |
Inner Class :public static class FoldersAndFiles implements Serializable | |
Inner Class :public static class CreateFolderResult implements Serializable | |
Inner Class :public static class FileUploadResult implements Serializable | |
Method Summary | |
public String | browse()
The method that does the functionality when the richtexteditor 'browse' command is
issued. | abstract protected String | calculateServerPath(String serverPath, String folderPath, String type)
This method should return the url that could be used to access the server-side
object. | abstract protected CreateFolderResult | createFolder(String virtualFolderPath, String type, String newFolderName)
Method that gets called when a 'CreateFolder' command is issued by the rich text
editor. | abstract protected FileUploadResult | fileUpload(String virtualFolderPath, String type, String filename, String contentType, java.io.File newFile)
Method that gets called when a 'FileUpload' command is issued by the rich text
editor. | public String | getCommand() | public String | getCurrentFolder() | abstract protected Folder[] | getFolders(String virtualFolderPath, String type)
Method that gets called when a 'GetFolders' command is issued by the rich text editor.
This method should search the server-side and return an Folder[] that the server side has.
The folder path queried by the rich text editor is folderPath . | abstract protected FoldersAndFiles | getFoldersAndFiles(String virtualFolderPath, String type)
Method that gets called when a 'GetFoldersAndFiles' command is issued by the rich text
editor. | public java.io.File | getNewFile() | public String | getNewFileContentType() | public String | getNewFileFileName() | public String | getNewFolderName() | public String | getServerPath() | public String | getType() | public void | setCommand(String command) | public void | setCurrentFolder(String currentFolder) | public void | setNewFile(java.io.File newFile) | public void | setNewFileContentType(String newFileContentType) | public void | setNewFileFileName(String newFileFileName) | public void | setNewFolderName(String newFolderName) | public void | setServerPath(String serverPath) | public void | setServletRequest(HttpServletRequest request) | public void | setServletResponse(HttpServletResponse response) | public void | setType(String type) | abstract protected void | unknownCommand(String command, String virtualFolderPath, String type, String filename, String contentType, java.io.File newFile)
Methods that get called when an unrecognized command is issued. | public String | upload()
The method that does the functionality when the richtexteditor 'upload' command is '/webwork/richtexteditor/data/'
issued. |
GET_FOLDERS_AND_FILES | public static String GET_FOLDERS_AND_FILES(Code) | | |
_newFileContentType | protected String _newFileContentType(Code) | | |
browse | public String browse() throws Exception(Code) | |
The method that does the functionality when the richtexteditor 'browse' command is
issued.
Following are the result name that gets returned depending on the actual 'browse'
command.
Browse Command |
Result Name |
GetFolders |
getFolders |
GetFoldersAndFiles |
getFoldersAndFiles |
CreateFolder |
createFolder |
FileUpload |
fileUpload |
result name throws: Exception - |
calculateServerPath | abstract protected String calculateServerPath(String serverPath, String folderPath, String type) throws Exception(Code) | |
This method should return the url that could be used to access the server-side
object. For example, if this methods return '/aaa/bbb/ccc', the say, server-side image
selected is myImage.gif, then the image tag generated might be something like
<img src='/aaa/bbb/ccc/myImage.gif' .... /<
For example, if the folderPath is '/folder1' and the type is 'Image', the
calculated server path might be '/aaa/bbb/ccc/Image/folder1/' such that if the
image is 'myImage.gif' the src attribute of the image tag might be
'/aaa/bbb/ccc/Image/folder1/myImage.gif'.
Parameters: serverPath - the server path provided through setServerPath (by default it is Parameters: folderPath - the current folder path requested Parameters: type - the type (Image, Link or Flash) calculated server path throws: Exception - |
createFolder | abstract protected CreateFolderResult createFolder(String virtualFolderPath, String type, String newFolderName) throws Exception(Code) | |
Method that gets called when a 'CreateFolder' command is issued by the rich text
editor. This method would typically create a folder in the server-side if it is
allowed to do so and return the result through CreateFolderResult object. CreateFolderResult
contains static methods to return the available results.
The folder path queried by the richtexted editor is virtualFolderPath .
While the type could be one of 'Image', 'Link' or 'Flash'. The new folder name
to be created is newFolderName .
Parameters: virtualFolderPath - Parameters: type - Parameters: newFolderName - CreateFolderResult throws: Exception - |
fileUpload | abstract protected FileUploadResult fileUpload(String virtualFolderPath, String type, String filename, String contentType, java.io.File newFile) throws Exception(Code) | |
Method that gets called when a 'FileUpload' command is issued by the rich text
editor. This method would typically handle the file upload and return a
FileUploadResult object. FileUploadResult contains only static methods that
could create the available results.
The folder path queried by the richtexted editor is virtualFolderPath .
While the type could be one of 'Image', 'Link' or 'Flash'. The upload file name
is filename while its content type is conetnType and
its content could be read off the newFile object.
Parameters: virtualFolderPath - Parameters: type - Parameters: filename - Parameters: contentType - Parameters: newFile - FileUploadResult throws: Exception - |
getFolders | abstract protected Folder[] getFolders(String virtualFolderPath, String type) throws Exception(Code) | |
Method that gets called when a 'GetFolders' command is issued by the rich text editor.
This method should search the server-side and return an Folder[] that the server side has.
The folder path queried by the rich text editor is folderPath . While the
type of could be one of 'Image', 'Link' or 'Flash'.
Parameters: virtualFolderPath - Parameters: type - An array of Folders throws: Exception - |
getFoldersAndFiles | abstract protected FoldersAndFiles getFoldersAndFiles(String virtualFolderPath, String type) throws Exception(Code) | |
Method that gets called when a 'GetFoldersAndFiles' command is issued by the rich text
editor. This method should typically search the server-side for files and folders under the
provided virtualFolderPath and return a FoldersAndFiles object.
The folder path queried by the richtexted editor is virtualFolderPath .
While the type could be one of 'Image', 'Link' or 'Flash'.
Parameters: virtualFolderPath - Parameters: type - FoldersAndFiles throws: Exception - |
getNewFileContentType | public String getNewFileContentType()(Code) | | |
setCurrentFolder | public void setCurrentFolder(String currentFolder)(Code) | | |
setNewFileContentType | public void setNewFileContentType(String newFileContentType)(Code) | | |
setNewFileFileName | public void setNewFileFileName(String newFileFileName)(Code) | | |
setNewFolderName | public void setNewFolderName(String newFolderName)(Code) | | |
setServerPath | public void setServerPath(String serverPath)(Code) | | |
unknownCommand | abstract protected void unknownCommand(String command, String virtualFolderPath, String type, String filename, String contentType, java.io.File newFile) throws Exception(Code) | |
Methods that get called when an unrecognized command is issued. Typical usage would
be to log an error message.
Parameters: command - Parameters: virtualFolderPath - Parameters: type - Parameters: filename - Parameters: contentType - Parameters: newFile - throws: Exception - |
upload | public String upload() throws Exception(Code) | |
The method that does the functionality when the richtexteditor 'upload' command is '/webwork/richtexteditor/data/'
issued.
It return a result name of 'fileUpload'.
result name throws: Exception - |
Fields inherited from com.opensymphony.xwork.ActionSupport | final protected static transient Log LOG(Code)(Java Doc)
|
Methods inherited from com.opensymphony.xwork.ActionSupport | public void addActionError(String anErrorMessage)(Code)(Java Doc) public void addActionMessage(String aMessage)(Code)(Java Doc) public void addFieldError(String fieldName, String errorMessage)(Code)(Java Doc) public void clearErrorsAndMessages()(Code)(Java Doc) public Object clone() throws CloneNotSupportedException(Code)(Java Doc) public String doDefault() throws Exception(Code)(Java Doc) public String doInput() throws Exception(Code)(Java Doc) public String execute() throws Exception(Code)(Java Doc) public Collection getActionErrors()(Code)(Java Doc) public Collection getActionMessages()(Code)(Java Doc) public Collection getErrorMessages()(Code)(Java Doc) public Map getErrors()(Code)(Java Doc) public Map getFieldErrors()(Code)(Java Doc) public Locale getLocale()(Code)(Java Doc) public String getText(String aTextName)(Code)(Java Doc) public String getText(String aTextName, String defaultValue)(Code)(Java Doc) public String getText(String aTextName, String defaultValue, String obj)(Code)(Java Doc) public String getText(String aTextName, List args)(Code)(Java Doc) public String getText(String key, String[] args)(Code)(Java Doc) public String getText(String aTextName, String defaultValue, List args)(Code)(Java Doc) public String getText(String key, String defaultValue, String[] args)(Code)(Java Doc) public String getText(String key, String defaultValue, List args, OgnlValueStack stack)(Code)(Java Doc) public String getText(String key, String defaultValue, String[] args, OgnlValueStack stack)(Code)(Java Doc) public ResourceBundle getTexts()(Code)(Java Doc) public ResourceBundle getTexts(String aBundleName)(Code)(Java Doc) public boolean hasActionErrors()(Code)(Java Doc) public boolean hasActionMessages()(Code)(Java Doc) public boolean hasErrors()(Code)(Java Doc) public boolean hasFieldErrors()(Code)(Java Doc) public boolean hasKey(String key)(Code)(Java Doc) public void pause(String result)(Code)(Java Doc) public void setActionErrors(Collection errorMessages)(Code)(Java Doc) public void setActionMessages(Collection messages)(Code)(Java Doc) public void setFieldErrors(Map errorMap)(Code)(Java Doc) public void validate()(Code)(Java Doc)
|
|
|