Class UpsServices


  • public class UpsServices
    extends java.lang.Object
    UPS ShipmentServices
    • Constructor Summary

      Constructors 
      Constructor Description
      UpsServices()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.w3c.dom.Document createAccessRequestDocument​(Delegator delegator, java.lang.String shipmentGatewayConfigId, java.lang.String serviceConfigProps)  
      static void handleErrors​(org.w3c.dom.Element responseElement, java.util.List<java.lang.Object> errorList, java.util.Locale locale)  
      static java.util.Map<java.lang.String,​java.lang.Object> handleUpsAddressValidationResponse​(org.w3c.dom.Document rateResponseDocument, java.util.Locale locale)  
      static java.util.Map<java.lang.String,​java.lang.Object> handleUpsAlternateRatesInquireResponse​(org.w3c.dom.Document rateResponseDocument, java.util.Locale locale)  
      static java.util.Map<java.lang.String,​java.lang.Object> handleUpsRateInquireResponse​(org.w3c.dom.Document rateResponseDocument, java.util.Locale locale)  
      static java.util.Map<java.lang.String,​java.lang.Object> handleUpsShipmentAcceptResponse​(org.w3c.dom.Document shipmentAcceptResponseDocument, GenericValue shipmentRouteSegment, java.util.List<GenericValue> shipmentPackageRouteSegs, Delegator delegator, java.lang.String shipmentGatewayConfigId, java.lang.String resource, java.util.Map<java.lang.String,​? extends java.lang.Object> context, java.util.Locale locale)  
      static java.util.Map<java.lang.String,​java.lang.Object> handleUpsShipmentConfirmResponse​(org.w3c.dom.Document shipmentConfirmResponseDocument, GenericValue shipmentRouteSegment, java.util.Locale locale)  
      static java.util.Map<java.lang.String,​java.lang.Object> handleUpsTrackShipmentResponse​(org.w3c.dom.Document trackResponseDocument, GenericValue shipmentRouteSegment, java.util.List<GenericValue> shipmentPackageRouteSegs, java.util.Locale locale)  
      static java.util.Map<java.lang.String,​java.lang.Object> handleUpsVoidShipmentResponse​(org.w3c.dom.Document voidShipmentResponseDocument, GenericValue shipmentRouteSegment, java.util.Locale locale)  
      static java.lang.String sendUpsRequest​(java.lang.String upsService, java.lang.String xmlString, java.lang.String shipmentGatewayConfigId, java.lang.String resource, Delegator delegator, java.util.Locale locale)
      Opens a URL to UPS and makes a request.
      static java.util.Map<java.lang.String,​java.lang.Object> upsAddressValidation​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> upsEmailReturnLabel​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> upsRateInquire​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> upsRateInquireByPostalCode​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> upsShipmentAccept​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> upsShipmentAlternateRatesInquiry​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> upsShipmentConfirm​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> upsTrackShipment​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      static java.util.Map<java.lang.String,​java.lang.Object> upsVoidShipment​(DispatchContext dctx, java.util.Map<java.lang.String,​? extends java.lang.Object> context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
      • decimals

        public static final int decimals
      • rounding

        public static final java.math.RoundingMode rounding
      • generalRounding

        public static final java.math.MathContext generalRounding
      • dateFormatString

        public static final java.lang.String dateFormatString
        See Also:
        Constant Field Values
    • Constructor Detail

      • UpsServices

        public UpsServices()
    • Method Detail

      • upsShipmentConfirm

        public static java.util.Map<java.lang.String,​java.lang.Object> upsShipmentConfirm​(DispatchContext dctx,
                                                                                                java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • handleUpsShipmentConfirmResponse

        public static java.util.Map<java.lang.String,​java.lang.Object> handleUpsShipmentConfirmResponse​(org.w3c.dom.Document shipmentConfirmResponseDocument,
                                                                                                              GenericValue shipmentRouteSegment,
                                                                                                              java.util.Locale locale)
                                                                                                       throws GenericEntityException
        Throws:
        GenericEntityException
      • upsShipmentAccept

        public static java.util.Map<java.lang.String,​java.lang.Object> upsShipmentAccept​(DispatchContext dctx,
                                                                                               java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • handleUpsShipmentAcceptResponse

        public static java.util.Map<java.lang.String,​java.lang.Object> handleUpsShipmentAcceptResponse​(org.w3c.dom.Document shipmentAcceptResponseDocument,
                                                                                                             GenericValue shipmentRouteSegment,
                                                                                                             java.util.List<GenericValue> shipmentPackageRouteSegs,
                                                                                                             Delegator delegator,
                                                                                                             java.lang.String shipmentGatewayConfigId,
                                                                                                             java.lang.String resource,
                                                                                                             java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                                                                                             java.util.Locale locale)
                                                                                                      throws GenericEntityException
        Throws:
        GenericEntityException
      • upsVoidShipment

        public static java.util.Map<java.lang.String,​java.lang.Object> upsVoidShipment​(DispatchContext dctx,
                                                                                             java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • handleUpsVoidShipmentResponse

        public static java.util.Map<java.lang.String,​java.lang.Object> handleUpsVoidShipmentResponse​(org.w3c.dom.Document voidShipmentResponseDocument,
                                                                                                           GenericValue shipmentRouteSegment,
                                                                                                           java.util.Locale locale)
                                                                                                    throws GenericEntityException
        Throws:
        GenericEntityException
      • upsTrackShipment

        public static java.util.Map<java.lang.String,​java.lang.Object> upsTrackShipment​(DispatchContext dctx,
                                                                                              java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • handleUpsTrackShipmentResponse

        public static java.util.Map<java.lang.String,​java.lang.Object> handleUpsTrackShipmentResponse​(org.w3c.dom.Document trackResponseDocument,
                                                                                                            GenericValue shipmentRouteSegment,
                                                                                                            java.util.List<GenericValue> shipmentPackageRouteSegs,
                                                                                                            java.util.Locale locale)
                                                                                                     throws GenericEntityException
        Throws:
        GenericEntityException
      • upsRateInquire

        public static java.util.Map<java.lang.String,​java.lang.Object> upsRateInquire​(DispatchContext dctx,
                                                                                            java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • handleUpsRateInquireResponse

        public static java.util.Map<java.lang.String,​java.lang.Object> handleUpsRateInquireResponse​(org.w3c.dom.Document rateResponseDocument,
                                                                                                          java.util.Locale locale)
      • createAccessRequestDocument

        public static org.w3c.dom.Document createAccessRequestDocument​(Delegator delegator,
                                                                       java.lang.String shipmentGatewayConfigId,
                                                                       java.lang.String serviceConfigProps)
      • handleErrors

        public static void handleErrors​(org.w3c.dom.Element responseElement,
                                        java.util.List<java.lang.Object> errorList,
                                        java.util.Locale locale)
      • sendUpsRequest

        public static java.lang.String sendUpsRequest​(java.lang.String upsService,
                                                      java.lang.String xmlString,
                                                      java.lang.String shipmentGatewayConfigId,
                                                      java.lang.String resource,
                                                      Delegator delegator,
                                                      java.util.Locale locale)
                                               throws org.apache.ofbiz.shipment.thirdparty.ups.UpsConnectException
        Opens a URL to UPS and makes a request.
        Parameters:
        upsService - Name of the UPS service to invoke
        xmlString - XML message to send
        Returns:
        XML string response from UPS
        Throws:
        org.apache.ofbiz.shipment.thirdparty.ups.UpsConnectException
      • upsRateInquireByPostalCode

        public static java.util.Map<java.lang.String,​java.lang.Object> upsRateInquireByPostalCode​(DispatchContext dctx,
                                                                                                        java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • upsAddressValidation

        public static java.util.Map<java.lang.String,​java.lang.Object> upsAddressValidation​(DispatchContext dctx,
                                                                                                  java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • handleUpsAddressValidationResponse

        public static java.util.Map<java.lang.String,​java.lang.Object> handleUpsAddressValidationResponse​(org.w3c.dom.Document rateResponseDocument,
                                                                                                                java.util.Locale locale)
      • upsEmailReturnLabel

        public static java.util.Map<java.lang.String,​java.lang.Object> upsEmailReturnLabel​(DispatchContext dctx,
                                                                                                 java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • upsShipmentAlternateRatesInquiry

        public static java.util.Map<java.lang.String,​java.lang.Object> upsShipmentAlternateRatesInquiry​(DispatchContext dctx,
                                                                                                              java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      • handleUpsAlternateRatesInquireResponse

        public static java.util.Map<java.lang.String,​java.lang.Object> handleUpsAlternateRatesInquireResponse​(org.w3c.dom.Document rateResponseDocument,
                                                                                                                    java.util.Locale locale)