亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? serviceutil.java

?? Sequoia ERP是一個真正的企業級開源ERP解決方案。它提供的模塊包括:電子商務應用(e-commerce), POS系統(point of sales),知識管理,存貨與倉庫管理
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * $Id: ServiceUtil.java 7027 2006-03-20 18:21:03Z jaz $ * * Copyright (c) 2001-2005 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. * */package org.ofbiz.service;import java.sql.Timestamp;import java.util.Calendar;import java.util.Iterator;import java.util.LinkedList;import java.util.List;import java.util.Locale;import java.util.Map;import javax.servlet.http.HttpServletRequest;import javax.transaction.Transaction;import javolution.util.FastMap;import javolution.util.FastList;import org.ofbiz.base.util.Debug;import org.ofbiz.base.util.UtilDateTime;import org.ofbiz.base.util.UtilMisc;import org.ofbiz.base.util.UtilProperties;import org.ofbiz.base.util.UtilValidate;import org.ofbiz.entity.GenericDelegator;import org.ofbiz.entity.GenericEntityException;import org.ofbiz.entity.GenericValue;import org.ofbiz.entity.transaction.TransactionUtil;import org.ofbiz.entity.transaction.GenericTransactionException;import org.ofbiz.entity.condition.EntityCondition;import org.ofbiz.entity.condition.EntityConditionList;import org.ofbiz.entity.condition.EntityExpr;import org.ofbiz.entity.condition.EntityOperator;import org.ofbiz.entity.util.EntityFindOptions;import org.ofbiz.entity.util.EntityListIterator;import org.ofbiz.security.Security;import org.ofbiz.service.config.ServiceConfigUtil;/** * Generic Service Utility Class * * @author     <a href="mailto:jaz@ofbiz.org">Andy Zeneski</a> * @version    $Rev: 7027 $ * @since      2.0 */public class ServiceUtil {    public static final String module = ServiceUtil.class.getName();    public static final String resource = "ServiceErrorUiLabels";    /** A little short-cut method to check to see if a service returned an error */    public static boolean isError(Map results) {        if (results == null || results.get(ModelService.RESPONSE_MESSAGE) == null) {            return false;        }        return ModelService.RESPOND_ERROR.equals(results.get(ModelService.RESPONSE_MESSAGE));    }    public static boolean isFailure(Map results) {        if (results == null || results.get(ModelService.RESPONSE_MESSAGE) == null) {            return false;        }        return ModelService.RESPOND_FAIL.equals(results.get(ModelService.RESPONSE_MESSAGE));    }    /** A small routine used all over to improve code efficiency, make a result map with the message and the error response code */    public static Map returnError(String errorMessage) {        return returnProblem(ModelService.RESPOND_ERROR, errorMessage, null, null, null);    }    /** A small routine used all over to improve code efficiency, make a result map with the message and the error response code */    public static Map returnError(String errorMessage, List errorMessageList) {        return returnProblem(ModelService.RESPOND_ERROR, errorMessage, errorMessageList, null, null);    }    /** A small routine used all over to improve code efficiency, make a result map with the message and the error response code */    public static Map returnError(List errorMessageList) {        return returnProblem(ModelService.RESPOND_ERROR, null, errorMessageList, null, null);    }    public static Map returnFailure(String errorMessage) {        return returnProblem(ModelService.RESPOND_FAIL, errorMessage, null, null, null);    }     public static Map returnFailure(List errorMessageList) {        return returnProblem(ModelService.RESPOND_FAIL, null, errorMessageList, null, null);    }    /** A small routine used all over to improve code efficiency, make a result map with the message and the error response code, also forwards any error messages from the nestedResult */    public static Map returnError(String errorMessage, List errorMessageList, Map errorMessageMap, Map nestedResult) {        return returnProblem(ModelService.RESPOND_ERROR, errorMessage, errorMessageList, errorMessageMap, nestedResult);    }    public static Map returnProblem(String returnType, String errorMessage, List errorMessageList, Map errorMessageMap, Map nestedResult) {        Map result = FastMap.newInstance();        result.put(ModelService.RESPONSE_MESSAGE, returnType);        if (errorMessage != null) {            result.put(ModelService.ERROR_MESSAGE, errorMessage);        }        List errorList = new LinkedList();        if (errorMessageList != null) {            errorList.addAll(errorMessageList);        }        Map errorMap = FastMap.newInstance();        if (errorMessageMap != null) {            errorMap.putAll(errorMessageMap);        }        if (nestedResult != null) {            if (nestedResult.get(ModelService.ERROR_MESSAGE) != null) {                errorList.add(nestedResult.get(ModelService.ERROR_MESSAGE));            }            if (nestedResult.get(ModelService.ERROR_MESSAGE_LIST) != null) {                errorList.addAll((List) nestedResult.get(ModelService.ERROR_MESSAGE_LIST));            }            if (nestedResult.get(ModelService.ERROR_MESSAGE_MAP) != null) {                errorMap.putAll((Map) nestedResult.get(ModelService.ERROR_MESSAGE_MAP));            }        }        if (errorList.size() > 0) {            result.put(ModelService.ERROR_MESSAGE_LIST, errorList);        }        if (errorMap.size() > 0) {            result.put(ModelService.ERROR_MESSAGE_MAP, errorMap);        }        return result;    }    /** A small routine used all over to improve code efficiency, make a result map with the message and the success response code */    public static Map returnSuccess(String successMessage) {        return returnMessage(ModelService.RESPOND_SUCCESS, successMessage);    }    /** A small routine used all over to improve code efficiency, make a result map with the message and the success response code */    public static Map returnSuccess() {        return returnMessage(ModelService.RESPOND_SUCCESS, null);    }    /** A small routine to make a result map with the message and the response code     * NOTE: This brings out some bad points to our message convention: we should be using a single message or message list     *  and what type of message that is should be determined by the RESPONSE_MESSAGE (and there's another annoyance, it should be RESPONSE_CODE)     */    public static Map returnMessage(String code, String message) {        Map result = FastMap.newInstance();        if (code != null) result.put(ModelService.RESPONSE_MESSAGE, code);        if (message != null) result.put(ModelService.SUCCESS_MESSAGE, message);        return result;    }    /** A small routine used all over to improve code efficiency, get the partyId and does a security check     *<b>security check</b>: userLogin partyId must equal partyId, or must have [secEntity][secOperation] permission     */    public static String getPartyIdCheckSecurity(GenericValue userLogin, Security security, Map context, Map result, String secEntity, String secOperation) {        String partyId = (String) context.get("partyId");        Locale locale = getLocale(context);        if (partyId == null || partyId.length() == 0) {            partyId = userLogin.getString("partyId");        }        // partyId might be null, so check it        if (partyId == null || partyId.length() == 0) {            result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR);            String errMsg = UtilProperties.getMessage(ServiceUtil.resource, "serviceUtil.party_id_missing", locale) + ".";            result.put(ModelService.ERROR_MESSAGE, errMsg);            return partyId;        }        // <b>security check</b>: userLogin partyId must equal partyId, or must have PARTYMGR_CREATE permission        if (!partyId.equals(userLogin.getString("partyId"))) {            if (!security.hasEntityPermission(secEntity, secOperation, userLogin)) {                result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR);                String errMsg = UtilProperties.getMessage(ServiceUtil.resource, "serviceUtil.no_permission_to_operation", locale) + ".";                result.put(ModelService.ERROR_MESSAGE, errMsg);                return partyId;            }        }        return partyId;    }    public static void setMessages(HttpServletRequest request, String errorMessage, String eventMessage, String defaultMessage) {        if (UtilValidate.isNotEmpty(errorMessage))            request.setAttribute("_ERROR_MESSAGE_", errorMessage);        if (UtilValidate.isNotEmpty(eventMessage))            request.setAttribute("_EVENT_MESSAGE_", eventMessage);        if (UtilValidate.isEmpty(errorMessage) && UtilValidate.isEmpty(eventMessage) && UtilValidate.isNotEmpty(defaultMessage))            request.setAttribute("_EVENT_MESSAGE_", defaultMessage);    }    public static void getMessages(HttpServletRequest request, Map result, String defaultMessage) {        getMessages(request, result, defaultMessage, null, null, null, null, null, null);    }    public static void getMessages(HttpServletRequest request, Map result, String defaultMessage,                                   String msgPrefix, String msgSuffix, String errorPrefix, String errorSuffix, String successPrefix, String successSuffix) {        String errorMessage = ServiceUtil.makeErrorMessage(result, msgPrefix, msgSuffix, errorPrefix, errorSuffix);        String successMessage = ServiceUtil.makeSuccessMessage(result, msgPrefix, msgSuffix, successPrefix, successSuffix);        setMessages(request, errorMessage, successMessage, defaultMessage);    }    public static String getErrorMessage(Map result) {        StringBuffer errorMessage = new StringBuffer();        if (result.get(ModelService.ERROR_MESSAGE) != null) errorMessage.append((String) result.get(ModelService.ERROR_MESSAGE));        if (result.get(ModelService.ERROR_MESSAGE_LIST) != null) {            List errors = (List) result.get(ModelService.ERROR_MESSAGE_LIST);            Iterator errorIter = errors.iterator();            while (errorIter.hasNext()) {                // NOTE: this MUST use toString and not cast to String because it may be a MessageString object                String curMessage = errorIter.next().toString();                if (errorMessage.length() > 0) {                    errorMessage.append(", ");                }                errorMessage.append(curMessage);            }        }        return errorMessage.toString();    }    public static String makeErrorMessage(Map result, String msgPrefix, String msgSuffix, String errorPrefix, String errorSuffix) {        if (result == null) {            Debug.logWarning("A null result map was passed", module);            return null;        }        String errorMsg = (String) result.get(ModelService.ERROR_MESSAGE);        List errorMsgList = (List) result.get(ModelService.ERROR_MESSAGE_LIST);        Map errorMsgMap = (Map) result.get(ModelService.ERROR_MESSAGE_MAP);        StringBuffer outMsg = new StringBuffer();        if (errorMsg != null) {            if (msgPrefix != null) outMsg.append(msgPrefix);            outMsg.append(errorMsg);            if (msgSuffix != null) outMsg.append(msgSuffix);        }        outMsg.append(makeMessageList(errorMsgList, msgPrefix, msgSuffix));        if (errorMsgMap != null) {            Iterator mapIter = errorMsgMap.entrySet().iterator();            while (mapIter.hasNext()) {                Map.Entry entry = (Map.Entry) mapIter.next();                outMsg.append(msgPrefix);                outMsg.append(entry.getKey());                outMsg.append(": ");                outMsg.append(entry.getValue());                outMsg.append(msgSuffix);            }        }        if (outMsg.length() > 0) {            StringBuffer strBuf = new StringBuffer();            if (errorPrefix != null) strBuf.append(errorPrefix);            strBuf.append(outMsg.toString());            if (errorSuffix != null) strBuf.append(errorSuffix);            return strBuf.toString();        } else {            return null;        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久蜜臀国产一区二区| 奇米影视7777精品一区二区| 亚洲地区一二三色| 国产乱子轮精品视频| 欧美日韩精品三区| 国产精品成人免费| 麻豆成人在线观看| 欧美日韩二区三区| 亚洲女厕所小便bbb| 国产一区二区三区美女| 在线综合亚洲欧美在线视频| 日本成人在线不卡视频| 不卡av在线免费观看| 日韩精品在线一区| 亚洲成人激情社区| 一本到一区二区三区| 国产区在线观看成人精品| 亚洲午夜影视影院在线观看| 成人福利在线看| 国产无一区二区| 国产在线精品不卡| 精品国产123| 久久精品免费观看| 7777精品伊人久久久大香线蕉| |精品福利一区二区三区| 国产成人精品免费一区二区| 精品国产91乱码一区二区三区 | 久久久国产午夜精品| 日韩国产欧美在线视频| 欧美美女bb生活片| 日韩和欧美的一区| 91精品婷婷国产综合久久竹菊| 亚洲五码中文字幕| 欧美日韩一二三区| 日韩精品1区2区3区| 欧美三电影在线| 亚洲大片精品永久免费| 欧美视频第二页| 日韩va亚洲va欧美va久久| 91精品国产综合久久久久久久久久 | 欧美高清激情brazzers| 日韩和欧美一区二区| 欧美一区永久视频免费观看| 美女在线一区二区| 久久久久久久久伊人| 丁香六月久久综合狠狠色| 中文字幕在线一区| 在线看日本不卡| 三级影片在线观看欧美日韩一区二区| 欧美精品在欧美一区二区少妇| 日韩二区三区四区| 亚洲精品一区二区三区蜜桃下载| 国产91在线|亚洲| 亚洲色图制服诱惑| 欧美美女激情18p| 九色综合狠狠综合久久| 国产精品免费免费| 欧美视频一区二区三区四区| 蜜桃视频在线一区| 国产精品拍天天在线| 欧美日韩亚洲综合| 国产一本一道久久香蕉| 国产精品美女视频| 欧美日韩在线精品一区二区三区激情 | 国产网站一区二区三区| av不卡免费在线观看| 日韩精品每日更新| 欧美国产1区2区| 欧美日韩在线三级| 国产成人av电影在线观看| 日韩av一级电影| 中文字幕一区二区三区在线不卡 | 91色综合久久久久婷婷| 青青草精品视频| 亚洲国产精华液网站w| 精品视频一区三区九区| 国产成人啪免费观看软件| 亚洲影院理伦片| 久久久久免费观看| 欧美日韩精品二区第二页| 国内精品久久久久影院薰衣草| 亚洲精品乱码久久久久久黑人| 欧美一区二区三区不卡| 一本到不卡精品视频在线观看| 麻豆传媒一区二区三区| 亚洲午夜久久久久久久久电影网| 精品999久久久| 欧美日韩亚洲高清一区二区| 风间由美一区二区三区在线观看| 日韩高清一区二区| 亚洲影院理伦片| 亚洲天堂精品视频| 国产丝袜美腿一区二区三区| 欧美一级爆毛片| 欧美日韩亚洲综合在线 | 欧美日韩一区小说| 99久久免费精品高清特色大片| 激情文学综合网| 日韩国产欧美在线视频| 一区二区三区资源| 中文字幕成人av| 久久久精品影视| 精品国产乱码久久久久久影片| 在线播放中文一区| 欧美做爰猛烈大尺度电影无法无天| 成人三级在线视频| 国产精品亚洲午夜一区二区三区 | 亚洲二区视频在线| 亚洲一二三区视频在线观看| 亚洲精品国产视频| 一区二区三区波多野结衣在线观看| 中文字幕一区二区三区四区| 中文字幕 久热精品 视频在线| 精品99一区二区| 久久蜜臀精品av| 欧美大片一区二区三区| 精品福利在线导航| 久久精品一区二区| 日本一区二区免费在线| 日本一区二区三区视频视频| 国产精品国产自产拍高清av| 国产精品久久久久桃色tv| 国产精品毛片久久久久久久| 国产精品国产馆在线真实露脸| 国产精品麻豆99久久久久久| 亚洲男人的天堂网| 亚洲无线码一区二区三区| 五月婷婷激情综合| 六月丁香婷婷久久| 国产盗摄视频一区二区三区| av成人老司机| 欧美日韩色综合| 欧美变态口味重另类| 国产精品私人影院| 一片黄亚洲嫩模| 喷白浆一区二区| 国产另类ts人妖一区二区| 成人av综合在线| 欧美日韩黄色一区二区| 日韩精品一区二区三区在线观看| 久久久久久免费毛片精品| 亚洲欧美日韩中文播放| 日韩高清电影一区| 国产在线精品一区在线观看麻豆| 成人国产一区二区三区精品| 欧美日韩高清影院| 久久精品视频一区二区三区| 亚洲免费资源在线播放| 免费观看一级特黄欧美大片| 成人动漫一区二区| 欧美三级中文字| 国产日韩欧美不卡| 婷婷国产v国产偷v亚洲高清| 国产精品亚洲综合一区在线观看| 在线一区二区三区| 精品国产露脸精彩对白| 一区二区三区.www| 国产成人a级片| 欧美精品 日韩| 日韩毛片在线免费观看| 久久99精品国产.久久久久久| 色婷婷精品大视频在线蜜桃视频| 制服丝袜亚洲播放| 国产精品成人免费精品自在线观看| 奇米综合一区二区三区精品视频| 99久久国产免费看| 久久久九九九九| 日本美女一区二区三区| 色噜噜夜夜夜综合网| 久久亚洲捆绑美女| 日本不卡高清视频| 在线观看视频一区二区| 国产欧美一区二区三区在线老狼| 日韩精品一二三| 91成人国产精品| 欧美激情综合五月色丁香小说| 美女视频黄免费的久久| 欧美三级三级三级| 亚洲精品视频在线看| 国产成人综合精品三级| 日韩欧美高清dvd碟片| 午夜精品久久久久久久99水蜜桃 | 欧美精品v日韩精品v韩国精品v| 亚洲国产精品黑人久久久| 韩国三级中文字幕hd久久精品| 9191成人精品久久| 亚洲一区av在线| 色综合天天综合网国产成人综合天 | 成人精品gif动图一区| 欧美成人精品3d动漫h| 日韩中文字幕亚洲一区二区va在线| 99国产精品一区| 中文字幕一区免费在线观看| 国产成人精品免费在线| 国产婷婷色一区二区三区在线| 精品影视av免费| www国产亚洲精品久久麻豆| 麻豆视频一区二区| 日韩精品影音先锋| 国产一区二区主播在线|