Java Doc for AbstractRichtexteditorConnector.java in  » J2EE » webwork-2.2.6 » com » opensymphony » webwork » components » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » webwork 2.2.6 » com.opensymphony.webwork.components 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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

Field Summary
public static  StringCREATE_FOLDER
    
public static  StringFILE_UPLOAD
    
public static  StringGET_FOLDERS
    
public static  StringGET_FOLDERS_AND_FILES
    
protected  String_command
    
protected  String_currentFolder
    
protected  java.io.File_newFile
    
protected  String_newFileContentType
    
protected  String_newFileFileName
    
protected  String_newFolderName
    
protected  HttpServletRequest_request
    
protected  HttpServletResponse_response
    
protected  String_serverPath
    
protected  String_type
    


Method Summary
public  Stringbrowse()
     The method that does the functionality when the richtexteditor 'browse' command is issued.
abstract protected  StringcalculateServerPath(String serverPath, String folderPath, String type)
     This method should return the url that could be used to access the server-side object.
abstract protected  CreateFolderResultcreateFolder(String virtualFolderPath, String type, String newFolderName)
     Method that gets called when a 'CreateFolder' command is issued by the rich text editor.
abstract protected  FileUploadResultfileUpload(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  StringgetCommand()
    
public  StringgetCurrentFolder()
    
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  FoldersAndFilesgetFoldersAndFiles(String virtualFolderPath, String type)
     Method that gets called when a 'GetFoldersAndFiles' command is issued by the rich text editor.
public  java.io.FilegetNewFile()
    
public  StringgetNewFileContentType()
    
public  StringgetNewFileFileName()
    
public  StringgetNewFolderName()
    
public  StringgetServerPath()
    
public  StringgetType()
    
public  voidsetCommand(String command)
    
public  voidsetCurrentFolder(String currentFolder)
    
public  voidsetNewFile(java.io.File newFile)
    
public  voidsetNewFileContentType(String newFileContentType)
    
public  voidsetNewFileFileName(String newFileFileName)
    
public  voidsetNewFolderName(String newFolderName)
    
public  voidsetServerPath(String serverPath)
    
public  voidsetServletRequest(HttpServletRequest request)
    
public  voidsetServletResponse(HttpServletResponse response)
    
public  voidsetType(String type)
    
abstract protected  voidunknownCommand(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  Stringupload()
     The method that does the functionality when the richtexteditor 'upload' command is '/webwork/richtexteditor/data/' issued.

Field Detail
CREATE_FOLDER
public static String CREATE_FOLDER(Code)



FILE_UPLOAD
public static String FILE_UPLOAD(Code)



GET_FOLDERS
public static String GET_FOLDERS(Code)



GET_FOLDERS_AND_FILES
public static String GET_FOLDERS_AND_FILES(Code)



_command
protected String _command(Code)



_currentFolder
protected String _currentFolder(Code)



_newFile
protected java.io.File _newFile(Code)



_newFileContentType
protected String _newFileContentType(Code)



_newFileFileName
protected String _newFileFileName(Code)



_newFolderName
protected String _newFolderName(Code)



_request
protected HttpServletRequest _request(Code)



_response
protected HttpServletResponse _response(Code)



_serverPath
protected String _serverPath(Code)



_type
protected String _type(Code)





Method Detail
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 -




getCommand
public String getCommand()(Code)



getCurrentFolder
public String getCurrentFolder()(Code)



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 -




getNewFile
public java.io.File getNewFile()(Code)



getNewFileContentType
public String getNewFileContentType()(Code)



getNewFileFileName
public String getNewFileFileName()(Code)



getNewFolderName
public String getNewFolderName()(Code)



getServerPath
public String getServerPath()(Code)



getType
public String getType()(Code)



setCommand
public void setCommand(String command)(Code)



setCurrentFolder
public void setCurrentFolder(String currentFolder)(Code)



setNewFile
public void setNewFile(java.io.File newFile)(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)



setServletRequest
public void setServletRequest(HttpServletRequest request)(Code)



setServletResponse
public void setServletResponse(HttpServletResponse response)(Code)



setType
public void setType(String type)(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)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.