当前位置: 首页>>代码示例>>Java>>正文


Java MiniLangException.getMessage方法代码示例

本文整理汇总了Java中org.ofbiz.minilang.MiniLangException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java MiniLangException.getMessage方法的具体用法?Java MiniLangException.getMessage怎么用?Java MiniLangException.getMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.ofbiz.minilang.MiniLangException的用法示例。


在下文中一共展示了MiniLangException.getMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSubContentCache

import org.ofbiz.minilang.MiniLangException; //导入方法依赖的package包/类
public static GenericValue getSubContentCache(Delegator delegator, String contentId, String mapKey, GenericValue userLogin, List<String> assocTypes, Timestamp fromDate, Boolean nullThruDatesOnly, String contentAssocPredicateId) throws GenericEntityException {
    //GenericValue content = null;
    GenericValue view = null;
    if (contentId == null) {
        Debug.logError("ContentId is null", module);
        return view;
    }
    Map<String, Object> results = null;
    List<String> contentTypes = null;
    try {
        // NOTE DEJ20060610: Changed "From" to "To" because it makes the most sense for sub-content renderings using a root-contentId and mapKey to determine the sub-contentId to have the ContentAssoc go from the root to the sub, ie try to determine the contentIdTo from the contentId and mapKey
        // This shouldn't be changed from "To" to "From", but if desired could be parameterized to make this selectable in higher up calling methods
        results = ContentServicesComplex.getAssocAndContentAndDataResourceCacheMethod(delegator, contentId, mapKey, "To", fromDate, null, assocTypes, contentTypes, nullThruDatesOnly, contentAssocPredicateId, null);
    } catch (MiniLangException e) {
        throw new RuntimeException(e.getMessage());
    }
    List<GenericValue> entityList = UtilGenerics.checkList(results.get("entityList"));
    if (UtilValidate.isEmpty(entityList)) {
        //throw new IOException("No subcontent found.");
    } else {
        view = entityList.get(0);
    }
    return view;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:25,代码来源:ContentWorker.java

示例2: selectKids

import org.ofbiz.minilang.MiniLangException; //导入方法依赖的package包/类
public static void selectKids(Map<String, Object> currentNode, Map<String, Object> ctx) {
    Delegator delegator = (Delegator) ctx.get("delegator");
    GenericValue parentContent = (GenericValue) currentNode.get("value");
    String contentAssocTypeId = (String) ctx.get("contentAssocTypeId");
    String contentTypeId = (String) ctx.get("contentTypeId");
    String mapKey = (String) ctx.get("mapKey");
    String parentContentId = (String) parentContent.get("contentId");
    //if (Debug.infoOn()) Debug.logInfo("traverse, contentAssocTypeId:" + contentAssocTypeId,null);
    Map<String, Object> whenMap = UtilGenerics.checkMap(ctx.get("whenMap"));
    List<Map<String, Object>> kids = FastList.newInstance();
    currentNode.put("kids", kids);
    String direction = (String) ctx.get("direction");
    if (UtilValidate.isEmpty(direction)) {
        direction = "From";
    }
    // Timestamp fromDate = (Timestamp) ctx.get("fromDate");
    // Timestamp thruDate = (Timestamp) ctx.get("thruDate");

    List<String> assocTypeList = StringUtil.split(contentAssocTypeId, " ");
    List<String> contentTypeList = StringUtil.split(contentTypeId, " ");
    String contentAssocPredicateId = null;
    Boolean nullThruDatesOnly = Boolean.TRUE;
    Map<String, Object> results = null;
    try {
        results = ContentServicesComplex.getAssocAndContentAndDataResourceCacheMethod(delegator, parentContentId, mapKey, direction, null, null, assocTypeList, contentTypeList, nullThruDatesOnly, contentAssocPredicateId, null);
    } catch (GenericEntityException e) {
        throw new RuntimeException(e.getMessage());
    } catch (MiniLangException e2) {
        throw new RuntimeException(e2.getMessage());
    }
    List<GenericValue> relatedViews = UtilGenerics.checkList(results.get("entityList"));
    //if (Debug.infoOn()) Debug.logInfo("traverse, relatedViews:" + relatedViews,null);
    for (GenericValue assocValue : relatedViews) {
        Map<String, Object> thisNode = ContentWorker.makeNode(assocValue);
        checkConditions(delegator, thisNode, null, whenMap);
        // boolean isReturnBeforePick = booleanDataType(thisNode.get("isReturnBeforePick"));
        // boolean isReturnAfterPick = booleanDataType(thisNode.get("isReturnAfterPick"));
        // boolean isFollow = booleanDataType(thisNode.get("isFollow"));
        boolean isPick = booleanDataType(thisNode.get("isPick"));
        kids.add(thisNode);
        if (isPick) {
                Integer count = (Integer) currentNode.get("count");
                if (count == null) {
                    count = Integer.valueOf(1);
                } else {
                    count = Integer.valueOf(count.intValue() + 1);
                }
                currentNode.put("count", count);
        }
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:52,代码来源:ContentWorker.java


注:本文中的org.ofbiz.minilang.MiniLangException.getMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。