Package com.cksource.ckfinder
Class CKFinder
java.lang.Object
com.cksource.ckfinder.CKFinder
Main CKFinder service.
-
Field Summary
Modifier and TypeFieldDescriptionprotected ApplicationContext
protected ApplicationEventPublisher
protected Config
protected static final String
protected static final String
protected static Logger
protected MessageConverter
protected StaticResourcesHandler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Checks if current HTTP request should be allowed to access CKFinder.protected void
checkCsrfToken
(HttpServletRequest request) Checks the CSRF token.void
handle
(HttpServletRequest request, HttpServletResponse response) Handles the HTTP request and writes the HTTP response.protected void
processRequest
(HttpServletRequest request, HttpServletResponse response) Processes current HTTP request.protected Command
resolveCommand
(String commandName, HttpServletRequest request, HttpServletResponse response) Resolves the concreteCommand
class instance to handle current HTTP request.protected void
validateCommand
(Command command, String commandName, HttpServletRequest request) Validates if all the requirements set for current command are present.
-
Field Details
-
COMMAND_NAME_PARAM
- See Also:
-
CONNECTOR_PREFIX
- See Also:
-
logger
-
applicationEventPublisher
-
applicationContext
-
baseConfig
-
messageConverter
-
staticResourcesHandler
-
-
Constructor Details
-
CKFinder
public CKFinder()
-
-
Method Details
-
handle
Handles the HTTP request and writes the HTTP response.- Parameters:
request
- current HTTP requestresponse
- current HTTP response
-
processRequest
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws Exception Processes current HTTP request.- Parameters:
request
- current HTTP requestresponse
- current HTTP response- Throws:
Exception
- in case of any processing exception
-
checkAuthentication
Checks if current HTTP request should be allowed to access CKFinder.- Throws:
CKFinderException
- in case if current HTTP request is not allowed to access CKFinder
-
resolveCommand
protected Command resolveCommand(String commandName, HttpServletRequest request, HttpServletResponse response) throws InvalidCommandException Resolves the concreteCommand
class instance to handle current HTTP request.- Parameters:
commandName
- command namerequest
- current HTTP requestresponse
- current HTTP response- Returns:
- command object
- Throws:
InvalidCommandException
- in case if the command resolution failed
-
validateCommand
Validates if all the requirements set for current command are present.- Parameters:
command
- current command objectcommandName
- current command namerequest
- current HTTP request
-
checkCsrfToken
Checks the CSRF token.- Parameters:
request
- current HTTP request
-