Examples of FileUploadExecutorManager


Examples of org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager

        }

        //This functionality can be moved to a new method
        if (component.getFileUploadExecutorConfigs() != null
                && component.getFileUploadExecutorConfigs().length > 0) {
            FileUploadExecutorManager executorManager = (FileUploadExecutorManager) fileUploadExecManagerTracker.getService();
            if (executorManager == null) {
                log.error("FileUploadExecutorManager service is not available");
                return;
            }
            FileUploadExecutorConfig[] executorConfigs = component.getFileUploadExecutorConfigs();
            for (FileUploadExecutorConfig executorConfig : executorConfigs) {
                String[] mappingActions = executorConfig.getMappingActionList();
                for (String mappingAction : mappingActions) {
                    if (CarbonConstants.ADD_UI_COMPONENT.equals(action)) {
                        executorManager.addExecutor(mappingAction, executorConfig.getFUploadExecClass());
                    } else if (CarbonConstants.REMOVE_UI_COMPONENT.equals(action)) {
                        executorManager.removeExecutor(mappingAction);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager

    private void processFileUploadExecutorDefinitions(Component component , String action) throws
            CarbonException{
        if (component.getFileUploadExecutorConfigs() != null
                && component.getFileUploadExecutorConfigs().length > 0) {
            FileUploadExecutorManager executorManager =
                    (FileUploadExecutorManager) fileUploadExecManagerTracker.getService();
            if (executorManager == null) {
                log.error("FileUploadExecutorManager service is not available");
                return;
            }
            FileUploadExecutorConfig[] executorConfigs = component.getFileUploadExecutorConfigs();
            for (FileUploadExecutorConfig executorConfig : executorConfigs) {
                String[] mappingActions = executorConfig.getMappingActionList();
                for (String mappingAction : mappingActions) {
                    if (CarbonConstants.ADD_UI_COMPONENT.equals(action)) {
                        executorManager.addExecutor(mappingAction,
                                executorConfig.getFUploadExecClass());
                    } else if (CarbonConstants.REMOVE_UI_COMPONENT.equals(action)) {
                        executorManager.removeExecutor(mappingAction);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of org.wso2.carbon.ui.transports.fileupload.FileUploadExecutorManager


    public void init(ServletConfig servletConfig) throws ServletException {
        this.servletConfig = servletConfig;
        try {
            fileUploadExecutorManager = new FileUploadExecutorManager(bundleContext, configContext, webContext);
            //Registering FileUploadExecutor Manager as an OSGi service
            bundleContext.registerService(FileUploadExecutorManager.class.getName(), fileUploadExecutorManager, null);
        } catch (CarbonException e) {
            log.error("Exception occurred while trying to initialize FileUploadServlet", e);
            throw new ServletException(e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.