@Component public class CKFinder extends Object
Modifier and Type | Field and Description |
---|---|
protected ApplicationContext |
applicationContext |
protected ApplicationEventPublisher |
applicationEventPublisher |
protected Config |
baseConfig |
protected static String |
COMMAND_NAME_PARAM |
protected static String |
CONNECTOR_PREFIX |
protected static org.slf4j.Logger |
logger |
protected MessageConverter |
messageConverter |
protected StaticResourcesHandler |
staticResourcesHandler |
Constructor and Description |
---|
CKFinder() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkAuthentication()
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 concrete
Command 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.
|
protected static final String COMMAND_NAME_PARAM
protected static final String CONNECTOR_PREFIX
protected static org.slf4j.Logger logger
@Autowired protected ApplicationEventPublisher applicationEventPublisher
@Autowired protected ApplicationContext applicationContext
@Autowired @Qualifier(value="baseConfig") protected Config baseConfig
@Autowired protected MessageConverter messageConverter
@Autowired protected StaticResourcesHandler staticResourcesHandler
public void handle(HttpServletRequest request, HttpServletResponse response)
request
- current HTTP requestresponse
- current HTTP responseprotected void processRequest(HttpServletRequest request, HttpServletResponse response) throws Exception
request
- current HTTP requestresponse
- current HTTP responseException
- in case of any processing exceptionprotected void checkAuthentication() throws CKFinderException
CKFinderException
- in case if current HTTP request is not allowed to access CKFinderprotected Command resolveCommand(String commandName, HttpServletRequest request, HttpServletResponse response) throws InvalidCommandException
Command
class instance to handle current HTTP request.commandName
- command namerequest
- current HTTP requestresponse
- current HTTP responseInvalidCommandException
- in case if the command resolution failedprotected void validateCommand(Command command, String commandName, HttpServletRequest request)
command
- current command objectcommandName
- current command namerequest
- current HTTP requestprotected void checkCsrfToken(HttpServletRequest request)
request
- current HTTP requestCopyright © 2007 – 2019 CKSource - Frederico Knabben. All rights reserved.