Package com.alibaba.citrus.service.moduleloader

Examples of com.alibaba.citrus.service.moduleloader.Module


        // ���������template����Ĭ�ϴ�layout
        rundata.setLayoutEnabled(true);

        try {
            Module module = moduleLoaderService.getModuleQuiet(SCREEN_MODULE, moduleName);

            // ��ָ����templateNameʱ������û�е�screen module����������Ⱦģ�塣
            // ������ʵ����page-driven������дģ�壬��Ҫʱ��дһ��module class��֮��Ӧ��
            if (module != null) {
                module.execute();
            } else {
                if (isScreenModuleRequired()) {
                    throw new ModuleNotFoundException("Could not find screen module: " + moduleName);
                }
            }
View Full Code Here


            } else {
                moduleName = mappingRuleService.getMappedName(CONTROL_MODULE_NO_TEMPLATE, target);
            }

            // ִ��control module
            Module controlModule;

            if (templateName == null) {
                // templateNameδָ��ʱ��������module����û�����׳�ModuleNotFoundException
                controlModule = moduleLoaderService.getModule(CONTROL_MODULE, moduleName);
            } else {
                // ��ָ����templateNameʱ������û�е�control module����������Ⱦģ�塣
                // ������ʵ����page-driven������дģ�壬��Ҫʱ��дһ��module class��֮��Ӧ��
                controlModule = moduleLoaderService.getModuleQuiet(CONTROL_MODULE, moduleName);
            }

            if (log.isTraceEnabled()) {
                if (templateName != null) {
                    log.trace("Rendering control: template=" + templateName + ", control=" + moduleName);
                } else {
                    log.trace("Rendering control without template: control=" + moduleName);
                }
            }

            // ���ò���
            this.bufferedRequestContext.pushBuffer();

            try {
                controlParameterStack.addFirst(new ControlParameters()); // ֧��control��Ƕ��

                TurbineRunDataInternal rundata = (TurbineRunDataInternal) TurbineUtil.getTurbineRunData(this.request);
                Context contextForControl = createContextForControl(params, componentName);

                rundata.pushContext(contextForControl, templateName);

                try {
                    if (controlModule != null) {
                        controlModule.execute();
                    }

                    // Control module����ͨ��ע��ControlParameters�ӿ����޸�template��
                    String templateOverriden = rundata.getControlTemplate();
View Full Code Here

        return names;
    }

    public Module getModule(String moduleType, String moduleName) throws ModuleLoaderException, ModuleNotFoundException {
        Module module = getModuleQuiet(moduleType, moduleName);

        if (module == null) {
            throw new ModuleNotFoundException("Module not found: type=" + moduleType + ", name=" + moduleName);
        }
View Full Code Here

        moduleType = moduleKey.getModuleType();
        moduleName = moduleKey.getModuleName();

        // �ȼ��cache
        if (cacheEnabled) {
            Module module = moduleCache.get(moduleKey);

            if (module != null) {
                return module;
            }
        }

        // ��factory��װ��
        Object moduleObject = null;
        Module module = null;

        for (ModuleFactory factory : factories) {
            moduleObject = factory.getModule(moduleType, moduleName);

            if (moduleObject != null) {
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.service.moduleloader.Module

Copyright © 2018 www.massapicom. 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.