com.ibm.commerce.rest.bod.helpers

Class CouponHelper

  • java.lang.Object
    • com.ibm.commerce.rest.bod.helpers.CouponHelper


  • public class CouponHelper
    extends java.lang.Object
    The WalletItemHelper is a helper utility class for CouponHandler to make the OAGIS calls and get the data area for constructing the response.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright notice field.
      static java.lang.String DEFAULT_ACCESS_PROFILE
      The default access profile, used when an access profile is not specified using the accessProfile query parameter.
      static java.lang.String FIND_BY_WALLETID_XPATH
      The XPATH expression, used to retrieve the WalletItem by WalletId
      static java.lang.String FIND_WALLET_BY_NAME_XPATH
      The XPATH expression, used to retrieve the Wallet by Name
      static java.lang.String FIND_WALLETITEM_BY_COUPONID_XPATH
      The XPATH expression, used to retrieve the WalletItem by coupon id.
    • Constructor Summary

      Constructors 
      Constructor and Description
      CouponHelper() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      commonj.sdo.DataObject composeEmptyWalletItem()
      This method composes the empty wallet item data object.
      java.util.Map<java.lang.String,java.lang.Object> deleteCoupon(java.util.Map<java.lang.String,java.lang.Object> parameters, BusinessContextType bContext, javax.security.auth.callback.CallbackHandler cbh)
      Delete wallet item to be processed.
      java.lang.String getAccessProfile()
      This method returns the access profile for the OAGIS service call.
      commonj.sdo.DataObject getWallet(BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler callbackHandler, java.lang.String expression, java.lang.String accessProfile)
      This method retrieves the wallet details for the specified expression.
      commonj.sdo.DataObject getWalletItem(BusinessContextType businessContext, javax.security.auth.callback.CallbackHandler callbackHandler, java.lang.String expression, java.lang.String accessProfile, int pageNumber, int pageSize)
      This method retrieves the wallet details for the specified expression.
      • Methods inherited from class java.lang.Object

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

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
      • DEFAULT_ACCESS_PROFILE

        public static final java.lang.String DEFAULT_ACCESS_PROFILE
        The default access profile, used when an access profile is not specified using the accessProfile query parameter.
        See Also:
        Constant Field Values
      • FIND_BY_WALLETID_XPATH

        public static final java.lang.String FIND_BY_WALLETID_XPATH
        The XPATH expression, used to retrieve the WalletItem by WalletId
        See Also:
        Constant Field Values
      • FIND_WALLET_BY_NAME_XPATH

        public static final java.lang.String FIND_WALLET_BY_NAME_XPATH
        The XPATH expression, used to retrieve the Wallet by Name
        See Also:
        Constant Field Values
      • FIND_WALLETITEM_BY_COUPONID_XPATH

        public static final java.lang.String FIND_WALLETITEM_BY_COUPONID_XPATH
        The XPATH expression, used to retrieve the WalletItem by coupon id.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CouponHelper

        public CouponHelper()
    • Method Detail

      • getWallet

        public commonj.sdo.DataObject getWallet(BusinessContextType businessContext,
                                                javax.security.auth.callback.CallbackHandler callbackHandler,
                                                java.lang.String expression,
                                                java.lang.String accessProfile)
                                         throws WalletException
        This method retrieves the wallet details for the specified expression.
        Parameters:
        businessContext - the business context.
        callbackHandler - the callback handler.
        expression - the XPath expression.
        accessProfile - the specified access profile.
        Returns:
        the data object for the wallet.
        Throws:
        WalletException - the wallet exception
      • getWalletItem

        public commonj.sdo.DataObject getWalletItem(BusinessContextType businessContext,
                                                    javax.security.auth.callback.CallbackHandler callbackHandler,
                                                    java.lang.String expression,
                                                    java.lang.String accessProfile,
                                                    int pageNumber,
                                                    int pageSize)
                                             throws WalletItemException
        This method retrieves the wallet details for the specified expression.
        Parameters:
        businessContext - the business context.
        callbackHandler - the callback handler.
        expression - the XPath expression.
        accessProfile - the specified access profile.
        pageNumber - the page number.
        pageSize - the page size.
        Returns:
        the data object for the wallet.
        Throws:
        WalletItemException - the wallet exception
      • composeEmptyWalletItem

        public commonj.sdo.DataObject composeEmptyWalletItem()
        This method composes the empty wallet item data object.
        Returns:
        the data object with empty wallet item.
      • deleteCoupon

        public java.util.Map<java.lang.String,java.lang.Object> deleteCoupon(java.util.Map<java.lang.String,java.lang.Object> parameters,
                                                                             BusinessContextType bContext,
                                                                             javax.security.auth.callback.CallbackHandler cbh)
                                                                      throws WalletException
        Delete wallet item to be processed.
        Parameters:
        parameters - the parameters
        bContext - business context
        cbh - the cbh
        Returns:
        A map of String [] that contains the delete info, mainly wallet item id
        Throws:
        WalletException - the wallet exception
      • getAccessProfile

        public java.lang.String getAccessProfile()
        This method returns the access profile for the OAGIS service call. This method can be overridden to change the access profile.
        Returns:
        the access profile