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


Java FastMap类代码示例

本文整理汇总了Java中javolution.util.FastMap的典型用法代码示例。如果您正苦于以下问题:Java FastMap类的具体用法?Java FastMap怎么用?Java FastMap使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: buildRequestPrefix

import javolution.util.FastMap; //导入依赖的package包/类
public static String buildRequestPrefix(Delegator delegator, Locale locale, String webSiteId, String https) {
    Map<String, Object> prefixValues = FastMap.newInstance();
    String prefix;

    NotificationServices.setBaseUrl(delegator, webSiteId, prefixValues);
    if (https != null && https.equalsIgnoreCase("true")) {
        prefix = (String) prefixValues.get("baseSecureUrl");
    } else {
        prefix = (String) prefixValues.get("baseUrl");
    }
    if (UtilValidate.isEmpty(prefix)) {
        if (https != null && https.equalsIgnoreCase("true")) {
            prefix = UtilProperties.getMessage("content", "baseSecureUrl", locale);
        } else {
            prefix = UtilProperties.getMessage("content", "baseUrl", locale);
        }
    }

    return prefix;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:21,代码来源:DataResourceWorker.java

示例2: getStaticValue

import javolution.util.FastMap; //导入依赖的package包/类
public static GenericValue getStaticValue(Delegator delegator, String parentPlaceholderId, String webSitePublishPointId, boolean ignoreCache) throws GenericEntityException {
        GenericValue webSitePublishPoint = null;
        // GenericValue staticValue = null;
        if (!ignoreCache) {
            Map<String, Object> subStaticValueMap = cachedStaticValues.get(parentPlaceholderId);
            if (subStaticValueMap == null) {
                subStaticValueMap = FastMap.newInstance();
                cachedStaticValues.put(parentPlaceholderId, subStaticValueMap);
            }
            //Map staticValueMap = (GenericValue)cachedStaticValues.get(web);
        }

/*
        if (webSitePublishPoint == null) {
            webSitePublishPoint = EntityQuery.use(delegator).from("WebSitePublishPoint").where("contentId", contentId).queryOne();
            // If no webSitePublishPoint exists, still try to look for parent by making a dummy value
            if (webSitePublishPoint == null) {
                webSitePublishPoint = delegator.makeValue("WebSitePublishPoint", UtilMisc.toMap("contentId", contentId));
            }
            webSitePublishPoint = overrideStaticValues(delegator, webSitePublishPoint);
            cachedWebSitePublishPoints.put(contentId, webSitePublishPoint);
        }
*/
        return webSitePublishPoint;
    }
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:26,代码来源:ContentManagementWorker.java

示例3: ccAuth

import javolution.util.FastMap; //导入依赖的package包/类
public static Map<String, Object> ccAuth(DispatchContext ctx, Map<String, Object> context) {
    Delegator delegator = ctx.getDelegator();
    Locale locale = (Locale) context.get("locale");
    Map<String, Object> results = ServiceUtil.returnSuccess();
    Map<String, Object> request = FastMap.newInstance();
    Properties props = buildAIMProperties(context, delegator);
    buildMerchantInfo(context, props, request);
    buildGatewayResponeConfig(context, props, request);
    buildCustomerBillingInfo(context, props, request);
    buildEmailSettings(context, props, request);
    buildInvoiceInfo(context, props, request);
    props.put("transType", "AUTH_ONLY");
    buildAuthTransaction(context, props, request);
    Map<String, Object> validateResults = validateRequest(context, props, request);
    String respMsg = (String)validateResults.get(ModelService.RESPONSE_MESSAGE);
    if (ModelService.RESPOND_ERROR.equals(respMsg)) {
        results.put(ModelService.ERROR_MESSAGE, "Validation Failed - invalid values");
        return results;
    }
    Map<String, Object> reply = processCard(request, props, locale);
    //now we need to process the result
    processAuthTransResult(request, reply, results);
    return results;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:25,代码来源:AIMPaymentServices.java

示例4: testCreateInventoryItemsTransfer

import javolution.util.FastMap; //导入依赖的package包/类
public void testCreateInventoryItemsTransfer() throws Exception {
    // create
    Map<String, Object> ctx = FastMap.newInstance();
    String inventoryItemId = "9005";
    ctx.put("inventoryItemId", inventoryItemId);
    ctx.put("statusId", "IXF_REQUESTED");
    ctx.put("facilityId", "ScipioShopWarehouse");
    ctx.put("facilityIdTo", "ScipioShopWarehouse");
    ctx.put("receiveDate", UtilDateTime.nowTimestamp());
    ctx.put("xferQty", transferQty);
    ctx.put("userLogin", userLogin);
    Map<String, Object> resp = dispatcher.runSync("createInventoryTransfer", ctx);
    inventoryTransferId = (String) resp.get("inventoryTransferId");
    assertNotNull(inventoryTransferId);

    // transfer
    ctx = FastMap.newInstance();
    ctx.put("inventoryTransferId", inventoryTransferId);
    ctx.put("inventoryItemId", inventoryItemId);
    ctx.put("statusId", "IXF_COMPLETE");
    ctx.put("userLogin", userLogin);
    resp = dispatcher.runSync("updateInventoryTransfer", ctx);
    String respMsg = (String) resp.get("responseMessage");
    assertNotSame("error", respMsg);
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:26,代码来源:InventoryItemTransferTest.java

示例5: upsShipmentConfirm

import javolution.util.FastMap; //导入依赖的package包/类
protected BigDecimal upsShipmentConfirm() throws GeneralException {
    Delegator delegator = this.getDelegator();
    BigDecimal actualCost = ZERO;
    List<GenericValue> shipmentRouteSegments = EntityQuery.use(delegator).from("ShipmentRouteSegment").where("shipmentId", shipmentId).queryList();
    if (UtilValidate.isNotEmpty(shipmentRouteSegments)) {
        for (GenericValue shipmentRouteSegment : shipmentRouteSegments) {
            Map<String, Object> shipmentRouteSegmentMap = FastMap.newInstance();
            shipmentRouteSegmentMap.put("shipmentId", shipmentId);
            shipmentRouteSegmentMap.put("shipmentRouteSegmentId", shipmentRouteSegment.getString("shipmentRouteSegmentId"));
            shipmentRouteSegmentMap.put("userLogin", userLogin);
            Map<String, Object> shipmentRouteSegmentResult = this.getDispatcher().runSync("upsShipmentConfirm", shipmentRouteSegmentMap);
            if (ServiceUtil.isError(shipmentRouteSegmentResult)) {
                throw new GeneralException(ServiceUtil.getErrorMessage(shipmentRouteSegmentResult));
            }
            GenericValue shipRouteSeg = EntityQuery.use(delegator).from("ShipmentRouteSegment").where("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegment.getString("shipmentRouteSegmentId")).queryOne();
            actualCost = actualCost.add(shipRouteSeg.getBigDecimal("actualCost"));
        }
    }
    return actualCost;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:21,代码来源:WeightPackageSession.java

示例6: printTransResult

import javolution.util.FastMap; //导入依赖的package包/类
private static void printTransResult(ResponseIF response) {
    Map<String, Object> generatedResponse = FastMap.newInstance();
    generatedResponse.put("isGood",  response.isGood());
    generatedResponse.put("isError", response.isError());
    generatedResponse.put("isQuickResponse",  response.isQuickResponse());
    generatedResponse.put("isApproved", response.isApproved());
    generatedResponse.put("isDeclined",  response.isDeclined());
    generatedResponse.put("AuthCode",  response.getAuthCode());
    generatedResponse.put("TxRefNum",  response.getTxRefNum());
    generatedResponse.put("ResponseCode",  response.getResponseCode());
    generatedResponse.put("Status",  response.getStatus());
    generatedResponse.put("Message",  response.getMessage());
    generatedResponse.put("AVSCode",  response.getAVSResponseCode());
    generatedResponse.put("CVV2ResponseCode", response.getCVV2RespCode());

    Debug.logInfo("printTransResult === " + generatedResponse.toString(),module);
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:18,代码来源:OrbitalPaymentServices.java

示例7: applyLineToPackage

import javolution.util.FastMap; //导入依赖的package包/类
protected void applyLineToPackage(String shipmentId, GenericValue userLogin, LocalDispatcher dispatcher, int shipPackSeqId) throws GeneralException {
    String shipmentPackageSeqId = UtilFormatOut.formatPaddedNumber(shipPackSeqId, 5);

    Map<String, Object> packageMap = FastMap.newInstance();
    packageMap.put("shipmentId", shipmentId);
    packageMap.put("shipmentItemSeqId", this.getShipmentItemSeqId());
    // quanity given, by defult one because it is a required field
    packageMap.put("quantity", BigDecimal.ONE);
    packageMap.put("shipmentPackageSeqId", shipmentPackageSeqId);
    packageMap.put("userLogin", userLogin);
    Map<String, Object> packageResp = dispatcher.runSync("addShipmentContentToPackage", packageMap);

    if (ServiceUtil.isError(packageResp)) {
        throw new GeneralException(ServiceUtil.getErrorMessage(packageResp));
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:17,代码来源:WeightPackageSessionLine.java

示例8: completeShipment

import javolution.util.FastMap; //导入依赖的package包/类
public static Map<String, Object> completeShipment(DispatchContext dctx, Map<String, ? extends Object> context) {
    Locale locale = (Locale) context.get("locale");
    Delegator delegator = dctx.getDelegator();
    WeightPackageSession weightPackageSession = (WeightPackageSession) context.get("weightPackageSession");

    String shipmentId = (String) context.get("shipmentId");
    String orderId = (String) context.get("orderId");

    Map<String, Object> response = FastMap.newInstance();
    try {
        String getActualShippingQuoteFromUps = EntityUtilProperties.getPropertyValue("shipment.properties", "shipment.ups.shipping", "N", delegator);
        if (weightPackageSession.completeShipment(orderId, getActualShippingQuoteFromUps)) {
            response.put("shipmentId", shipmentId);
        } else {
            response = ServiceUtil.returnError(UtilProperties.getMessage("ProductErrorUiLabels", "ProductErrorNoItemsCurrentlySetToBeShippedCannotComplete", locale));
        }
    } catch (GeneralException e) {
        return ServiceUtil.returnError(e.getMessage(), e.getMessageList());
    }
    return response;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:22,代码来源:WeightPackageServices.java

示例9: PackingSession

import javolution.util.FastMap; //导入依赖的package包/类
public PackingSession(LocalDispatcher dispatcher, GenericValue userLogin, String facilityId, String binId, String orderId, String shipGrp) {
    this._dispatcher = dispatcher;
    this.dispatcherName = dispatcher.getName();

    this._delegator = _dispatcher.getDelegator();
    this.delegatorName = _delegator.getDelegatorName();

    this.primaryOrderId = orderId;
    this.primaryShipGrp = shipGrp;
    this.picklistBinId = binId;
    this.userLogin = userLogin;
    this.facilityId = facilityId;
    this.packLines = FastList.newInstance();
    this.packEvents = FastList.newInstance();
    this.itemInfos = FastList.newInstance();
    this.packageSeq = 1;
    this.packageWeights = FastMap.newInstance();
    this.shipmentBoxTypes = FastMap.newInstance();
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:20,代码来源:PackingSession.java

示例10: getPackingSessionLinesByPackage

import javolution.util.FastMap; //导入依赖的package包/类
/**
 * <p>Delivers all the packing lines grouped by package.</p>
 * <p>Output map:
 * <ul>
 * <li>packageMap - a Map of type Map<Integer, List<PackingSessionLine>>
 * that maps package sequence ids to the lines that belong in
 * that package</li>
 * <li>sortedKeys - a List of type List<Integer> with the sorted package
 * sequence numbers to index the packageMap</li>
 * @return result Map with packageMap and sortedKeys
 */
public Map<Object, Object> getPackingSessionLinesByPackage() {
    FastMap<Integer, List<PackingSessionLine>> packageMap = FastMap.newInstance();
    for (PackingSessionLine line : packLines) {
       int pSeq = line.getPackageSeq();
       List<PackingSessionLine> packageLineList = packageMap.get(pSeq);
       if (packageLineList == null) {
           packageLineList = FastList.newInstance();
           packageMap.put(pSeq, packageLineList);
       }
       packageLineList.add(line);
    }
    Object[] keys = packageMap.keySet().toArray();
    java.util.Arrays.sort(keys);
    List<Object> sortedKeys = FastList.newInstance();
    for (Object key : keys) {
        sortedKeys.add(key);
    }
    Map<Object, Object> result = FastMap.newInstance();
    result.put("packageMap", packageMap);
    result.put("sortedKeys", sortedKeys);
    return result;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:34,代码来源:PackingSession.java

示例11: createPackages

import javolution.util.FastMap; //导入依赖的package包/类
protected void createPackages() throws GeneralException {
    for (int i = 0; i < packageSeq; i++) {
        String shipmentPackageSeqId = UtilFormatOut.formatPaddedNumber(i+1, 5);

        Map<String, Object> pkgCtx = FastMap.newInstance();
        pkgCtx.put("shipmentId", shipmentId);
        pkgCtx.put("shipmentPackageSeqId", shipmentPackageSeqId);
        pkgCtx.put("shipmentBoxTypeId", getShipmentBoxType(i+1));
        pkgCtx.put("weight", getPackageWeight(i+1));
        pkgCtx.put("weightUomId", getWeightUomId());
        pkgCtx.put("userLogin", userLogin);
        Map<String, Object> newPkgResp = this.getDispatcher().runSync("createShipmentPackage", pkgCtx);

        if (ServiceUtil.isError(newPkgResp)) {
            throw new GeneralException(ServiceUtil.getErrorMessage(newPkgResp));
        }
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:19,代码来源:PackingSession.java

示例12: setPickerOnPicklist

import javolution.util.FastMap; //导入依赖的package包/类
protected void setPickerOnPicklist() throws GeneralException {
    if (picklistBinId != null) {
        // first find the picklist id
        GenericValue bin = this.getDelegator().findOne("PicklistBin", UtilMisc.toMap("picklistBinId", picklistBinId), false);
        if (bin != null) {
            Map<String, Object> ctx = FastMap.newInstance();
            ctx.put("picklistId", bin.getString("picklistId"));
            ctx.put("partyId", pickerPartyId);
            ctx.put("roleTypeId", "PICKER");

            // check if the role already exists and is valid
            List<GenericValue> currentRoles = this.getDelegator().findByAnd("PicklistRole", ctx, null, false);
            currentRoles = EntityUtil.filterByDate(currentRoles);

            // if not; create the role
            if (UtilValidate.isNotEmpty(currentRoles)) {
                ctx.put("userLogin", userLogin);
                Map<String, Object> addRole = this.getDispatcher().runSync("createPicklistRole", ctx);
                if (ServiceUtil.isError(addRole)) {
                    throw new GeneralException(ServiceUtil.getErrorMessage(addRole));
                }
            }
        }
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:26,代码来源:PackingSession.java

示例13: makeNode

import javolution.util.FastMap; //导入依赖的package包/类
public static Map<String, Object> makeNode(GenericValue thisContent) {
    Map<String, Object> thisNode = null;
    if (thisContent == null) {
        return thisNode;
    }

    thisNode = FastMap.newInstance();
    thisNode.put("value", thisContent);
    String contentId = (String)thisContent.get("contentId");
    thisNode.put("contentId", contentId);
    thisNode.put("contentTypeId", thisContent.get("contentTypeId"));
    thisNode.put("isReturnBeforePick", Boolean.FALSE);
    thisNode.put("isReturnAfterPick", Boolean.FALSE);
    thisNode.put("isPick", Boolean.TRUE);
    thisNode.put("isFollow", Boolean.TRUE);
    if (thisContent.getModelEntity().getField("caContentAssocTypeId") != null) {
        thisNode.put("contentAssocTypeId", thisContent.get("caContentAssocTypeId"));
        thisNode.put("mapKey", thisContent.get("caMapKey"));
        thisNode.put("fromDate", thisContent.get("caFromDate"));
    }
    return thisNode;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:23,代码来源:ContentWorker.java

示例14: searchDuplicatedAncestor

import javolution.util.FastMap; //导入依赖的package包/类
/** Returns the ProductAssoc generic value for a duplicate productIdKey
 * ancestor if present, null otherwise.
 * Useful to avoid loops when adding new assocs (components)
 * to a bill of materials.
 * @param dctx the distach context
 * @param context the context 
 * @return returns the ProductAssoc generic value for a duplicate productIdKey ancestor if present 
 */
public static Map<String, Object> searchDuplicatedAncestor(DispatchContext dctx, Map<String, ? extends Object> context) {
    Map<String, Object> result = FastMap.newInstance();
    Delegator delegator = dctx.getDelegator();
    LocalDispatcher dispatcher = dctx.getDispatcher();
    GenericValue userLogin = (GenericValue)context.get("userLogin");
    Locale locale = (Locale) context.get("locale");
    String productId = (String) context.get("productId");
    String productIdKey = (String) context.get("productIdTo");
    Timestamp fromDate = (Timestamp) context.get("fromDate");
    String bomType = (String) context.get("productAssocTypeId");
    if (fromDate == null) {
        fromDate = Timestamp.valueOf((new Date()).toString());
    }
    GenericValue duplicatedProductAssoc = null;
    try {
        duplicatedProductAssoc = BOMHelper.searchDuplicatedAncestor(productId, productIdKey, bomType, fromDate, delegator, dispatcher, userLogin);
    } catch (GenericEntityException gee) {
        return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingBomErrorRunningDuplicatedAncestorSearch", UtilMisc.toMap("errorString", gee.getMessage()), locale));
    }
    result.put("duplicatedProductAssoc", duplicatedProductAssoc);
    return result;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:31,代码来源:BOMServices.java

示例15: getProductionRun

import javolution.util.FastMap; //导入依赖的package包/类
/**
 * Get a Production Run.
 *  <li> check if routing - product link exist
 * @param delegator the delegator
 * @param productionRunId the production run id
 * @return Map with the result of the service, the output parameters are
 * <li> the productionRun
 * <li> the productionRunProduct
 */
public static Map<String, Object> getProductionRun(Delegator delegator, String productionRunId) {
    Map<String, Object> result = FastMap.newInstance();
    
    try {
        if (productionRunId != null) {
            GenericValue productionRun = EntityQuery.use(delegator).from("WorkEffort").where("workEffortId", productionRunId).queryOne();
            if (productionRun != null) {
                List<GenericValue> productionRunProducts = productionRun.getRelated("WorkEffortGoodStandard", UtilMisc.toMap("workEffortGoodStdTypeId", "PRUN_PROD_DELIV"),null, false);
                GenericValue productionRunProduct = EntityUtil.getFirst(productionRunProducts);
                GenericValue productProduced = productionRunProduct.getRelatedOne("Product", true);
                List<GenericValue> productionRunComponents = productionRun.getRelated("WorkEffortGoodStandard", UtilMisc.toMap("workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED"),null, false);
                List<GenericValue> productionRunRoutingTasks = productionRun.getRelated("FromWorkEffortAssoc",UtilMisc.toMap("workEffortTypeId","PROD_ORDER_TASK"),null, false);
                result.put("productionRunProduct", productionRunProduct);
                result.put("productProduced", productProduced);
                result.put("productionRunComponents", productionRunComponents);
                result.put("productionRunRoutingTasks", productionRunRoutingTasks);
            }
        }
    } catch (GenericEntityException e) {
        Debug.logWarning(e.getMessage(), module);
    }
    return result;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:33,代码来源:ProductionRunHelper.java


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