⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 availableservices.bsh

📁 Sequoia ERP是一个真正的企业级开源ERP解决方案。它提供的模块包括:电子商务应用(e-commerce), POS系统(point of sales),知识管理,存货与仓库管理
💻 BSH
📖 第 1 页 / 共 2 页
字号:
/* *  Copyright (c) 2003 The Open For Business Project - www.ofbiz.org * *  Permission is hereby granted, free of charge, to any person obtaining a  *  copy of this software and associated documentation files (the "Software"),  *  to deal in the Software without restriction, including without limitation  *  the rights to use, copy, modify, merge, publish, distribute, sublicense,  *  and/or sell copies of the Software, and to permit persons to whom the  *  Software is furnished to do so, subject to the following conditions: * *  The above copyright notice and this permission notice shall be included  *  in all copies or substantial portions of the Software. * *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  *  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  *  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT  *  OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR  *  THE USE OR OTHER DEALINGS IN THE SOFTWARE. * *@author     Ashish Hareet(ashish.hareet@cpbinc.com - http://www.cpbinc.com) *@version    $Rev: 5462 $*/import java.util.*;import javax.wsdl.WSDLException;import org.ofbiz.base.util.Debug;import org.ofbiz.base.util.UtilXml;import org.ofbiz.base.util.UtilProperties;import org.ofbiz.service.eca.ServiceEcaUtil;import org.ofbiz.service.ModelPermGroup;import org.ofbiz.service.ModelPermission;getEcaListForService(String selectedService){    ecaMap = org.ofbiz.service.eca.ServiceEcaUtil.getServiceEventMap(selectedService);    if(ecaMap == null) return null;    //ecaMap is a HashMap so get keyset & iterate    ecaMapList = new java.util.ArrayList();    ecaMapIter = ecaMap.keySet().iterator();    while(ecaMapIter.hasNext()){        curRuleKey = ecaMapIter.next(); //get key in ecaMap        curRuleListIter = ecaMap.get(curRuleKey).iterator(); // get rule object from ecaMap using above key        while(curRuleListIter.hasNext()){            curRule = curRuleListIter.next();            curRuleMap = new java.util.HashMap();            curRuleMap.put("ruleKey", curRuleKey);            curRuleClass = curRule.getClass();            //event name for rule            eventName = curRuleClass.getDeclaredField("eventName");            eventName.setAccessible(true);            eventNameVal = eventName.get(curRule);            if(eventNameVal != null){                curRuleMap.put("eventName", eventNameVal+"");            }            eventName.setAccessible(false);            //runOnError            runOnError = curRuleClass.getDeclaredField("runOnError");            runOnError.setAccessible(true);            runOnErrorVal = runOnError.get(curRule);            if(runOnErrorVal != null){                curRuleMap.put("runOnError", runOnErrorVal+"");            }            runOnError.setAccessible(false);            //runOnFailure            runOnFailure = curRuleClass.getDeclaredField("runOnFailure");            runOnFailure.setAccessible(true);            runOnFailureVal = runOnFailure.get(curRule);            if(runOnFailureVal != null){                curRuleMap.put("runOnFailure", runOnFailureVal+"");            }            runOnFailure.setAccessible(false);            //extract actions            actions = curRuleClass.getDeclaredField("actions");                        actions.setAccessible(true);            actionsVal = actions.get(curRule);            if(actionsVal != null){                actionsList = new ArrayList(actionsVal.size());                actionsIter = actionsVal.iterator();                while(actionsVal != null && actionsIter.hasNext()){                    curAction = actionsIter.next();                    actionMap = new HashMap();                    actionClass = curAction.getClass();                    //eventName                    eventName = actionClass.getDeclaredField("eventName");                    eventName.setAccessible(true);                    eventNameVal = eventName.get(curAction);                    if(eventNameVal != null){                        actionMap.put("eventName", eventNameVal+"");                    }                    eventName.setAccessible(false);                    //ignoreError                    ignoreError = actionClass.getDeclaredField("ignoreError");                    ignoreError.setAccessible(true);                    ignoreErrorVal = ignoreError.get(curAction);                    if(ignoreErrorVal != null){                        actionMap.put("ignoreError", ignoreErrorVal+"");                    }                    ignoreError.setAccessible(false);                    //ignoreFailure                    ignoreFailure = actionClass.getDeclaredField("ignoreFailure");                    ignoreFailure.setAccessible(true);                    ignoreFailureVal = ignoreFailure.get(curAction);                    if(ignoreFailureVal != null){                        actionMap.put("ignoreFailure", ignoreFailureVal+"");                    }                    ignoreFailure.setAccessible(false);                    //persist                    persist = actionClass.getDeclaredField("persist");                    persist.setAccessible(true);                    persistVal = persist.get(curAction);                    if(persistVal != null){                        actionMap.put("persist", persistVal+"");                    }                    persist.setAccessible(false);                    //resultMapName                    resultMapName = actionClass.getDeclaredField("resultMapName");                    resultMapName.setAccessible(true);                    resultMapNameVal = resultMapName.get(curAction);                    if(resultMapNameVal != null && resultMapNameVal.length() > 0){                        actionMap.put("resultMapName", resultMapNameVal+"");                    }                    resultMapName.setAccessible(false);                    //resultToContext                    resultToContext = actionClass.getDeclaredField("resultToContext");                    resultToContext.setAccessible(true);                    resultToContextVal = resultToContext.get(curAction);                    if(resultToContextVal != null){                        actionMap.put("resultToContext", resultToContextVal+"");                    }                    resultToContext.setAccessible(false);                    //serviceMode                    serviceMode = actionClass.getDeclaredField("serviceMode");                    serviceMode.setAccessible(true);                    serviceModeVal = serviceMode.get(curAction);                    if(serviceModeVal != null){                        actionMap.put("serviceMode", serviceModeVal+"");                    }                    serviceMode.setAccessible(false);                    //serviceName                    serviceName = actionClass.getDeclaredField("serviceName");                    serviceName.setAccessible(true);                    serviceNameVal = serviceName.get(curAction);                    if(serviceNameVal != null){                        actionMap.put("serviceName", serviceNameVal+"");                    }                    serviceName.setAccessible(false);                    actionsList.add(actionMap);                }                curRuleMap.put("actions", actionsList);            }            actions.setAccessible(true);            //extract conditions            conditions = curRuleClass.getDeclaredField("conditions");            conditions.setAccessible(true);            conditionsVal = conditions.get(curRule);            if(conditionsVal != null){                curRuleMap.put("conditions", runOnFailureVal+"");                condIter = conditionsVal.iterator();                condList = new ArrayList(conditionsVal.size());                while(condIter.hasNext()){                    condVal = condIter.next();                    condValClass = condVal.getClass();                    condMap = new HashMap();                    //compareType                    compareType = condValClass.getDeclaredField("compareType");                    compareType.setAccessible(true);                    compareTypeVal = compareType.get(condVal);                    if(compareTypeVal != null && compareTypeVal.length() > 0){                        condMap.put("compareType", compareTypeVal+"");                    }                    compareType.setAccessible(false);                    //conditionService                    conditionService = condValClass.getDeclaredField("conditionService");                    conditionService.setAccessible(true);                    conditionServiceVal = conditionService.get(condVal);                    if(conditionServiceVal != null && conditionServiceVal.length() > 0){                        condMap.put("conditionService", conditionServiceVal+"");                    }                    conditionService.setAccessible(false);                    //format                    format = condValClass.getDeclaredField("format");                    format.setAccessible(true);                    formatVal = format.get(condVal);                    if(formatVal != null && formatVal.length() > 0){                        condMap.put("format", formatVal+"");                    }                    format.setAccessible(false);                    //isConstant                    isConstant = condValClass.getDeclaredField("isConstant");                    isConstant.setAccessible(true);                    isConstantVal = isConstant.get(condVal);                    if(isConstantVal != null){                        condMap.put("isConstant", isConstantVal+"");                    }                    isConstant.setAccessible(false);                    //isService                    isService = condValClass.getDeclaredField("isService");                    isService.setAccessible(true);                    isServiceVal = isService.get(condVal);                    if(isServiceVal != null){                        condMap.put("isService", isServiceVal+"");                    }                    isService.setAccessible(false);                    //lhsMapName                    lhsMapName = condValClass.getDeclaredField("lhsMapName");                    lhsMapName.setAccessible(true);                    lhsMapNameVal = lhsMapName.get(condVal);                    if(lhsMapNameVal != null && lhsMapNameVal.length() > 0){                        condMap.put("lhsMapName", lhsMapNameVal+"");                    }                    lhsMapName.setAccessible(false);                    //lhsValueName                    lhsValueName = condValClass.getDeclaredField("lhsValueName");                    lhsValueName.setAccessible(true);                    lhsValueNameVal = lhsValueName.get(condVal);                    if(lhsValueNameVal != null && lhsValueNameVal.length() > 0){                        condMap.put("lhsValueName", lhsValueNameVal+"");                    }                    lhsValueName.setAccessible(false);                    //operator                    operator = condValClass.getDeclaredField("operator");                    operator.setAccessible(true);                    operatorVal = operator.get(condVal);                    if(operatorVal != null && operatorVal.length() > 0 ){                        condMap.put("operator", operatorVal+"");                    }                    operator.setAccessible(false);                    //rhsMapName                    rhsMapName = condValClass.getDeclaredField("rhsMapName");                    rhsMapName.setAccessible(true);                    rhsMapNameVal = rhsMapName.get(condVal);                    if(rhsMapNameVal != null && rhsMapNameVal.length() > 0){                        condMap.put("rhsMapName", rhsMapNameVal+"");                    }                    rhsMapName.setAccessible(false);                    //rhsValueName                    rhsValueName = condValClass.getDeclaredField("rhsValueName");                    rhsValueName.setAccessible(true);                    rhsValueNameVal = rhsValueName.get(condVal);                    if(rhsValueNameVal != null && rhsValueNameVal.length() > 0){                        condMap.put("rhsValueName", rhsValueNameVal+"");                    }                    rhsValueName.setAccessible(false);                    condList.add(condMap);                }                curRuleMap.put("conditions", condList);            }            conditions.setAccessible(false);                        ecaMapList.add(curRuleMap);            }    }    return ecaMapList;}/*Local Dispatchersaccounting, content, ecommerce, manufacturing, marketing, ordermgr, partymgr, catalog, facility, workeffort, example, WFDispatcher, webtools, order, wholesale, salesrep, hotelbackend, community*///Ashish: Don't know how to get list of available dispatchers, so hardcoded. Add to this list if I missed some.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -