Changeset 1986

Show
Ignore:
Timestamp:
2008-05-10 21:58:17 (3 months ago)
Author:
mosipov
Message:

Improved doc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor.Java/branches/2.4/src/site/apt/connector.apt

    r1972 r1986  
    3434  [[1]]  Declare the ConnectorServlet in your <<<web.xml>>> 
    3535 
    36 +-------------------------------------------------------------------+ 
     36+--------------------------------------------------+ 
    3737  <web-app version="2.4"> 
    3838    ... 
     
    5353    ... 
    5454  </web-app> 
    55 +-------------------------------------------------------------------+ 
     55+--------------------------------------------------+ 
    5656 
    5757  Assuming you installed the editor in the <<</fckeditor>>> folder in your webapp.\ 
     
    6161  [[2]] Create a <<<fckeditor.properties>>> file in your classpath and add: 
    6262 
    63 +-------------------------------------------------------------------+ 
     63+------------------------------------------------------------------------+ 
    6464  connector.userActionImpl=net.fckeditor.requestcycle.impl.UserActionImpl 
    65 +-------------------------------------------------------------------+ 
     65+------------------------------------------------------------------------+ 
    6666 
    6767  [] 
     
    7474             Connector. 
    7575 
    76   The basic idea of extending the Connector is to provide some interfaces for special user depended interactions, 
    77   which can be implemented by the developer of a webapp. All methods get the <<<HttpServletRequest>>>-object, 
    78   so the developer could identify the user with a session attribute for example and return a user 
    79   specific value. We intentionally make no suggestions how to do this, so you have the free of choice to 
    80   implement whatever and however you like. 
     76  The basic idea of extending the Connector is to provide interfaces for user-dependent 
     77  interactions which can be implemented by the web application developer. All 
     78  methods are passed the current <<<HttpServletRequest>>> instance in order to 
     79  retrieve request and/or session attributes and to assemble a user-specific 
     80  return value. We intentionally do not impose any contraints or indorse any 
     81  particular implementation approach to give you the freedom to implement the 
     82  interfaces the way it fits best in your environment. 
    8183 
    82   The fully-qualified class name of the implemented classes can now be set as described in 
    83   {{{properties.html}Configuration settings}}. 
     84  Suppy the fully-qualified class names of the implemented classes as described in 
     85  the {{{properties.html}Configuration settings}}. 
    8486 
    85   At the moment, the integration pack provides two interfaces to extend the connector: 
     87  Right now, the integration pack provides two interfaces to extend the Connector: 
    8688 
    8789  [[1]] {{{java-core/apidocs/net/fckeditor/requestcycle/UserPathBuilder.html}<<<net.fckeditor.requestcycle.UserPathBuilder>>>}} 
    8890 
    89   In this interface there is only one method <<<getUserFilesPath(final HttpServletRequest request)>>>, 
    90   return value is a string. There you can implement a user dependent construction of the 'BaseDir' path, 
    91   the path for all resource files. 
     91        This interface consists only of one method <<<#getUserFilesPath(final HttpServletRequest)>>> 
     92        which returns a string. You are able to construct a user-dependent  
     93        <<<UserFilesPath>>>, e.g. <<</userfiles/johndoe>>> if johndoe is a valid  
     94        username. 
    9295 
    9396  [[2]] {{{java-core/apidocs/net/fckeditor/requestcycle/UserAction.html}<<<net.fckeditor.requestcycle.UserAction>>>}} 
    9497 
    95   There are two methods to authorize users to do file based actions: 
     98        There are two methods to authorize users to do file-based actions: 
    9699 
    97   * <<<#isEnabledForFileUpload(HttpServletRequest)>>> Enables/disables the user for uploading files. 
     100        * <<<#isEnabledForFileBrowsing(HttpServletRequest)>>> which returns a  
     101          <<<boolean>>> denoting the user's ability to browse files on the server. 
     102   
     103        * <<<#isEnabledForFileUpload(HttpServletRequest)>>> which returns a  
     104          <<<boolean>>> denoting the user's ability to upload files to the server. 
    98105 
    99   * <<<#isEnabledForFileBrowsing(HttpServletRequest)>>> Enables/disables the user for browsing files. 
     106        [] 
     107 
     108        For those who want to enable all users to browse and upload files, there  
     109        is a ready-to-use implementation <<<{{{java-core/apidocs/net/fckeditor/requestcycle/impl/UserActionImpl.html}UserActionImpl}}>>>. 
    100110 
    101111  [] 
    102  
    103   For those who wants to enable all users for browsing and uploading files, there is an implementation 
    104   of <<<UserAction>>> you can use: {{{java-core/apidocs/net/fckeditor/requestcycle/impl/UserActionImpl.html}UserActionImpl}}