Package org.ofbiz.base.component

Examples of org.ofbiz.base.component.ComponentConfig$WebappInfo


        Collection<ComponentConfig> componentConfigs = ComponentConfig.getAllComponents();
        if (componentConfigs != null) {

            for (Object componentConfig : componentConfigs) {

                ComponentConfig component = (ComponentConfig) componentConfig;

                for (ComponentConfig.WebappInfo webappInfo : component.getWebappInfos()) {

                    List<String> virtualHosts = webappInfo.getVirtualHosts();
                    Map<String, String> initParameters = webappInfo.getInitParameters();

                    Server server = servers.get(webappInfo.server);

                    if (server == null) {
                        Debug.logWarning("Server with name [" + webappInfo.server + "] not found; not mounting [" + webappInfo.name + "]", module);
                    } else {

                        // set the root location (make sure we set the paths correctly)
                        String location = component.getRootLocation() + webappInfo.location;
                        location = location.replace('\\', '/');
                        if (location.endsWith("/")) {
                            location = location.substring(0, location.lastIndexOf("/"));
                        }
View Full Code Here


            location = def.location;
        } else {
            location = parentPath + "/" + def.location;
        }
        if (def.type == ComponentLoaderConfig.SINGLE_COMPONENT) {
            ComponentConfig config = null;
            try {
                config = ComponentConfig.getComponentConfig(def.name, location);
                if (UtilValidate.isEmpty(def.name)) {
                    def.name = config.getGlobalName();
                }
            } catch (ComponentException e) {
                Debug.logError("Cannot load component : " + def.name + " @ " + def.location + " : " + e.getMessage(), module);
            }
            if (config == null) {
View Full Code Here

                        if (componentPath.isDirectory() && !sub.equals("CVS") && !sub.equals(".svn")) {
                            // make sure we have a component configuraton file
                            String componentLocation = componentPath.getCanonicalPath();
                            File configFile = new File(componentLocation + "/ofbiz-component.xml");
                            if (configFile.exists()) {
                                ComponentConfig config = null;
                                try {
                                    // pass null for the name, will default to the internal component name
                                    config = ComponentConfig.getComponentConfig(null, componentLocation);
                                } catch (ComponentException e) {
                                    Debug.logError(e, "Cannot load component : " + componentPath.getName() + " @ " + componentLocation + " : " + e.getMessage(), module);
View Full Code Here

        // load the applications
        Collection componentConfigs = ComponentConfig.getAllComponents();
        if (componentConfigs != null) {
            Iterator components = componentConfigs.iterator();
            while (components.hasNext()) {
                ComponentConfig component = (ComponentConfig) components.next();
                Iterator appInfos = component.getWebappInfos().iterator();
                while (appInfos.hasNext()) {
                    ComponentConfig.WebappInfo appInfo = (ComponentConfig.WebappInfo) appInfos.next();
                    List virtualHosts = appInfo.getVirtualHosts();
                    Map initParameters = appInfo.getInitParameters();
                    Server server = (Server) servers.get(appInfo.server);
                    if (server == null) {
                        Debug.logWarning("Server with name [" + appInfo.server + "] not found; not mounting [" + appInfo.name + "]", module);
                    } else {
                        try {
                            // set the root location (make sure we set the paths correctly)
                            String location = component.getRootLocation() + appInfo.location;
                            location = location.replace('\\', '/');
                            if (!location.endsWith("/")) {
                                location = location + "/";
                            }
View Full Code Here

        // load the applications
        Collection componentConfigs = ComponentConfig.getAllComponents();
        if (componentConfigs != null) {
            Iterator components = componentConfigs.iterator();
            while (components.hasNext()) {
                ComponentConfig component = (ComponentConfig) components.next();
                Iterator appInfos = component.getWebappInfos().iterator();
                while (appInfos.hasNext()) {
                    ComponentConfig.WebappInfo appInfo = (ComponentConfig.WebappInfo) appInfos.next();
                    createContext(appInfo);
                }
            }
View Full Code Here

        Debug.logInfo("All components loaded", module);
    }

    private void loadComponentFromConfig(ComponentLoaderConfig.ComponentDef def) {
        if (def.type == ComponentLoaderConfig.SINGLE_COMPONENT) {
            ComponentConfig config = null;
            try {
                config = ComponentConfig.getComponentConfig(def.name, def.location);
                if (UtilValidate.isEmpty(def.name)) {
                    def.name = config.getGlobalName();
                }
            } catch (ComponentException e) {
                Debug.logError("Cannot load component : " + def.name + " @ " + def.location + " : " + e.getMessage(), module);
            }
            if (config == null) {
View Full Code Here

                        if (componentPath.isDirectory() && !subs[i].equals("CVS") && !subs[i].equals(".svn")) {
                            // make sure we have a component configuraton file
                            String componentLocation = componentPath.getCanonicalPath();
                            File configFile = new File(componentLocation + "/ofbiz-component.xml");
                            if (configFile.exists()) {
                                ComponentConfig config = null;
                                try {
                                    // pass null for the name, will default to the internal component name
                                    config = ComponentConfig.getComponentConfig(null, componentLocation);
                                } catch (ComponentException e) {
                                    Debug.logError(e, "Cannot load component : " + componentPath.getName() + " @ " + componentLocation + " : " + e.getMessage(), module);
View Full Code Here

TOP

Related Classes of org.ofbiz.base.component.ComponentConfig$WebappInfo

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.