OrderTools

OrderTools

介绍一些OrderTools的属性:

orderTypeClassMap:定义一个order的类的类型,比如可能有两个order的实现类,那么你可以根据需要去指定默认是哪一个之类的,他是一个properties。

 

orderTypeClassMap+=\
    default=com.commerce.order.OrderImpl,\
    shoppingcart=com.commerce.order.OrderImpl

 在创建order的时候,即OrderTools.createOrder:

 

 

String orderClassName = getOrderTypeClassMap().getProperty(pType);
     if (orderClassName == null) {
     throw new InvalidTypeException(ResourceUtils.getMsgResource("InvalidOrderType", "atg.commerce.order.OrderResources", sResourceBundle));
  }

Order order=(Order)Class.forName(orderClassName).newInstance();
     order = (Order)Class.forName(orderClassName).newInstance();
     if ((order instanceof ChangedProperties)) {
       ((ChangedProperties)order).setSaveAllProperties(true);
 }

 defaultOrderType 指定order type class map哪一个order是默认的:

defaultOrderType=default

 

commerceItemTypeClassMap:创建一个commerceItem的时候,你可以有一个或者多个CommerceItem的类型:

 

commerceItemTypeClassMap=\
			default=com.commerce.order.CommerceItemImpl,\
			configurableCommerceItem=com.commerce.order.ConfigurableCommerceItemImpl,\
			subSkuCommerceItem=atg.commerce.order.SubSkuCommerceItem,\
			variablePriceCommerceItem=com.commerce.order.VariablePriceCommerceItemImpl,\
			childCommerceItem=com.commerce.order.ChildCommerceItemImpl

 defaultCommerceItemType:同理,指定哪一个commerce type是,默认的

 

defaultCommerceItemType=default

 

同理,一下的都是同一个意思

shippingTypeClassMap,defaultShippingGroupType

paymentTypeClassMapdefaultPaymentGroupType

relationshipTypeClassMap

 

beanNameToItemDescriptorMap:

This property maps a bean name to an OrderRepository item descriptor name,比如当保存order的时候,procerssor寻找一个Order Repository 用相同的名字,如果没有这样的一个item descriptor被发现,就会从给定的beanNameToItemDescriptorMap 寻找一个,一般情况下,所有的item descriptor都会被影射,格式就是bean name=repository item descriptor:

beanNameToItemDescriptorMap=\
atg.commerce.order.OrderImpl=order,\
atg.commerce.order.CommerceItemImpl=CommerceItem,\
atg.commerce.order.ShippingGroupImpl=shippingGroup,\
atg.commerce.order.HardgoodShippingGroup=hardgoodShippingGroup,\
atg.commerce.order.PaymentGroupImpl=paymentGroup,\
atg.commerce.order.CreditCard=creditCard,\
atg.commerce.order.GiftCertificate=giftCertificate,\
atg.commerce.order.ShippingGroupCommerceItemRelationship=shipItemRel,\
atg.commerce.order.PaymentGroupCommerceItemRelationship=payItemRel,\
atg.commerce.order.PaymentGroupShippingGroupRelationship=payShipRel,\
atg.commerce.order.PaymentGroupOrderRelationship=payOrderRel,\
atg.payment.PaymentStatus=paymentStatus,\
atg.commerce.pricing.OrderPriceInfo=orderPriceInfo,\
atg.commerce.pricing.ItemPriceInfo=itemPriceInfo,\
atg.commerce.pricing.TaxPriceInfo=taxPriceInfo,\
atg.commerce.pricing.ShippingPriceInfo=shippingPriceInfo

 

 当创建Order的时候默认会创建一个空的ShippingGroup 和 PaymentGroup,如果你不希望创建的时候,就有这两个空的,那么你可以在OrderTools中通过createDefaultShippingGroup and createDefaultPaymentGroup 属性去指定设置为false.

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
社会的进步导致人们对于学习的追求永不止境,那么追求农业信息化的方式也从单一的田地教程变成了多样化的学习方式。多样化的学习方式不仅仅是需要人们智慧的依靠,还需要能够通过软件的加持进行信息化的价值体现。软件和系统的产生,从表面上来看是方便了某一行业和某一行业的用户,其实是从本质上来说是提高了社会的进步。就拿我们常见的出行而言,滴滴出行看似是为了打车和出行的人方便,但其实通过另外一种程度上来说,可以通过软件应用的调度和发展来为社会、城市出行的发展做出巨大的贡献。我们国家从最早的中国制造业演变到现在的“智造”,就是因为有软件信息系统的价值,能够将一些智慧的因素加入到制造的过程当中,而这一点就是软件系统来改变生产和现实的需求。在计算机时代日益发展的今天,计算机网络正快速融入这个社会的每一个领域。农业的发展是社会当中一种必有可少的方式。果树在种植和培养是直接影响果农及果商的发展,但在果树的资源管理方面还是有着很大的不同,所以信息多样化的果树管理方式很重要。在传统的果树资源管理上还有着很大的约束,为此开发和设计JSP杏种质资源管理系统,该系统内容丰富多彩,用户可以在线进行果杏树的资源查询等。本文还是使用JSP的方式来进行管理的,但在系统建设过程当中也考虑了许许多多信息安全的保护。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值