com.ibm.commerce.payment.beans

Class PaymentPolicyInfo

  • java.lang.Object
    • com.ibm.commerce.payment.beans.PaymentPolicyInfo
  • All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    PaymentTCInfo


    public class PaymentPolicyInfo
    extends java.lang.Object
    implements java.lang.Cloneable
    The PaymentPolicyInfo class is a data holder that is used by the PaymentPolicyListDataBean to hold information about the Payment Policy that the Store could use.
    • Constructor Summary

      Constructors 
      Constructor and Description
      PaymentPolicyInfo(PaymentPolicyInfo info)
      PaymentPolicyInfo constructor.
      PaymentPolicyInfo(java.lang.String astrPolicyId, java.lang.String astrPolicyName, java.lang.String astrStoreEntityId)
      PaymentPolicyInfo constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object clone()
      Override the clone() function of Object class
      static PaymentPolicyInfo createFromAccessBean(BusinessPolicyAccessBean abPolicy, CommandContext cmdCtx)
      Creates a new instance of a PaymentPolicyInfo Bean from the specified BusinessPolicyAccessBean.
      java.lang.String getAttrPageName()
      Returns the attrPageName property of the payment policy.
      java.lang.String getAttrTelesalesPageName()
      Returns the attrTelesalesPageName property of the payment policy.
      java.lang.String getBrand()
      Returns the brand property of the PaymentPolicyInfo object.
      java.lang.String getCashierProfile()
      Returns the profileName Property of the payment policy.
      java.lang.String getCassetteName()
      Returns the cassetteName Property of the payment policy.
      java.lang.String getCompatibleMode()
      Indicates whether or not this payment policy is in compatible mode.
      java.lang.String getInStorePaymentMode()
      Indicates whether or not this payment policy is In Store Payment mode.
      java.lang.String getLongDescription()
      Returns the long description of the payment policy appended with the brand property if the brand property is a non-empty String.
      java.lang.String getOfflineMethod()
      Returns the offlineMethod property of the payment policy.
      TypedProperty getPaymentAttributes()
      Returns the TypedProperty object containing payment attributes saved.
      java.lang.String getPaymentConfigurationId()
      Returns the payment configuration id property of the payment policy.
      java.lang.String getPolicyId()
      Returns the ID of the payment policy in String form.
      java.lang.String getPolicyName()
      Returns the policyName of the payment policy.
      java.lang.String getPolicyType()
      Returns the policyType of the payment policy.
      java.lang.String getShortDescription()
      Returns the short description of the payment policy appended with the brand property if the brand property is a non-empty String.
      java.lang.String getStoreEntityId()
      Returns the Store Entity ID that this payment policy is defined for.
      java.util.Vector getSupportedCurrencies()
      Returns a Vector of currencies supported by this payment policy if known.
      boolean isDisplayAllowed()
      Indicates whether or not this payment policy should be displayed to the shopper.
      boolean isNotForDefaultTC()
      Indicates whether or not this payment policy is intended for default PaymentTC.
      PaymentPolicyInfo newCopy()
      Creates a new copy of the PaymentPolicyInfo object from this object.
      boolean requiresExplicitTC()
      Indicates whether or not this payment policy requires an explicit PaymentTC to be used.
      void setBrand(java.lang.String astrBrand)
      Sets the brand property of the PaymentPolicyInfo object.
      void setFieldsFromPolicyAB(BusinessPolicyAccessBean abPolicy, java.lang.Integer nLanguageId)
      Sets the other fields of the bean from the BusinessPolicyAccessBean that represents the Payment Policy object.
      void setFieldsFromPolicyAB(BusinessPolicyAccessBean abPolicy, java.lang.Integer nLanguageId, java.lang.Integer anStoreId)
      Sets the other fields of the bean from the BusinessPolicyAccessBean that represents the Payment Policy object.
      void setLongDescription(java.lang.String description)
      Sets the longDescription property of the Bean.
      void setPaymentAttributes(TypedProperty attributes)
      Saves the TypedProperty object containing payment attributes.
      void setShortDescription(java.lang.String description)
      Sets the shortDescription property of the Bean.
      void setSupportedCurrencies(java.util.Vector vec)
      Sets the supportedCurrencies property of the Bean representing the currencies supported by this payment policy.
      java.lang.String toString()
      Method toString - creates a String representation of the object.
      boolean useWallet()
      Indicates whether or not this payment policy requires the use of a Wallet application.
      • Methods inherited from class java.lang.Object

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

      • POLICY_PROP_ATTR_PAGE_NAME

        public static final java.lang.String POLICY_PROP_ATTR_PAGE_NAME
        String constant for the policy property name "attrPageName". This policy property is used to specify the name of the Payment Attribute Java Server Page associated with this Payment Policy.
        See Also:
        Constant Field Values
      • POLICY_PROP_PAYMENT_CFG_ID

        public static final java.lang.String POLICY_PROP_PAYMENT_CFG_ID
        String constant for the policy property name "paymentConfigurationId". This policy property is used to specify which payment configuration in payment rules engine is used with this payment policy.
        See Also:
        Constant Field Values
      • POLICY_PROP_CASSETTE_NAME

        public static final java.lang.String POLICY_PROP_CASSETTE_NAME
        String constant for the policy property name "cassetteName". This policy property is used to specify the name of the Payment cassette to be used with this Payment Policy.
        See Also:
        Constant Field Values
      • POLICY_PROP_PROFILE_NAME

        public static final java.lang.String POLICY_PROP_PROFILE_NAME
        String constant for the policy property name "profileName". This policy property is used to specify the name of the cashier profile to be used with this Payment Policy.
        See Also:
        Constant Field Values
      • POLICY_PROP_CURRENCY_ALLOWED

        public static final java.lang.String POLICY_PROP_CURRENCY_ALLOWED
        String constant for the policy property name "currencyAllowed". This policy property is used to specify the currency that is allowed with this Payment Policy.
        See Also:
        Constant Field Values
      • POLICY_PROP_OFFLINE_METHOD

        public static final java.lang.String POLICY_PROP_OFFLINE_METHOD
        String constant for the policy property name "offlineMethod". This policy property is used to specify the name of the offline payment method to be used with this Payment Policy.
        See Also:
        Constant Field Values
      • POLICY_PROP_USE_WALLET

        public static final java.lang.String POLICY_PROP_USE_WALLET
        String constant for the policy property name "useWallet". This policy property is used to specify the use of a wallet application program is expected with this Payment Policy.
        See Also:
        Constant Field Values
      • POLICY_PROP_DISPLAY

        public static final java.lang.String POLICY_PROP_DISPLAY
        String constant for the policy property name "display". This policy property is used to specify if this payment policy should be displayed to shopper in the store front or telesales client.
        See Also:
        Constant Field Values
      • POLICY_PROP_COMPATIBLE_MODE

        public static final java.lang.String POLICY_PROP_COMPATIBLE_MODE
        String constant for the policy property name "compatibleMode". This policy property is used to specify if this payment policy is kept for compatibility with payment policy commands in WebSphere Commerce v5.x. The payment policies not in compatible mode will be processed by Payment Plug-in Controller.
        See Also:
        Constant Field Values
      • POLICY_PROP_IN_STORE_PAYMENT_MODE

        public static final java.lang.String POLICY_PROP_IN_STORE_PAYMENT_MODE
        String constant for the policy property name "InStorePaymentMode". This policy property is used to specify if this payment policy is for in store payment.
        See Also:
        Constant Field Values
      • POLICY_PROP_ATTR_TELESALES_PAGE_NAME

        public static final java.lang.String POLICY_PROP_ATTR_TELESALES_PAGE_NAME
        String constant for the policy property name "attrTelesalesPageName". This policy property is used to specify the name of the telesales Attribute Java Server Page associated with this Payment Policy.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PaymentPolicyInfo

        public PaymentPolicyInfo(PaymentPolicyInfo info)
        PaymentPolicyInfo constructor. Creates a new PaymentPolicyInfo instance with elements having the same value as another instance.
        Parameters:
        info - an instance of PaymentPolicyInfo whose values are to be copied to the new instance
      • PaymentPolicyInfo

        public PaymentPolicyInfo(java.lang.String astrPolicyId,
                                 java.lang.String astrPolicyName,
                                 java.lang.String astrStoreEntityId)
        PaymentPolicyInfo constructor. Creates a new PaymentPolicyInfo instance with the specified policy ID, policy name and Store Entity ID. The other attributes for this new instance will be set to empty String or null initially.
        Parameters:
        astrPolicyId - the policy ID
        astrPolicyName - the policy name
        astrStoreEntityId - the Store Entity ID
    • Method Detail

      • createFromAccessBean

        public static PaymentPolicyInfo createFromAccessBean(BusinessPolicyAccessBean abPolicy,
                                                             CommandContext cmdCtx)
                                                      throws ECException
        Creates a new instance of a PaymentPolicyInfo Bean from the specified BusinessPolicyAccessBean. If the specified BusinessPolicyAccessBean is not of the right type, return null.
        Parameters:
        abPolicy - the BusinessPolicyAccessBean for the creation of the new PaymentPoilicyInfo Bean instance.
        cmdCtx - the CommandContext
        Returns:
        the newly created PaymentPolicyInfo Bean.
        Throws:
        ECException.
        ECException
      • getAttrPageName

        public java.lang.String getAttrPageName()
        Returns the attrPageName property of the payment policy. The attrPageName property of the payment policy represents the file name of the JSP file (without the .jsp suffix). It may be used to present a small Form to the user to specify Payment Information.
        Returns:
        the attrPageName property of the payment policy.
      • getAttrTelesalesPageName

        public java.lang.String getAttrTelesalesPageName()
        Returns the attrTelesalesPageName property of the payment policy. The attrTelesalesPageName property of the payment policy represents the file name of the JSP file (without the .jsp suffix). It may be used to present a small Form to the user to specify Telesales Information.
        Returns:
        the attrTelesalesPageName property of the payment policy.
      • getPaymentConfigurationId

        public java.lang.String getPaymentConfigurationId()
        Returns the payment configuration id property of the payment policy. The paymentConfigurationId property of the payment policy tells Payment Rules Engine which configuration should be used to handle payment event.
        Returns:
        the paymentConfigurationId property of the payment policy.
      • getBrand

        public java.lang.String getBrand()
        Returns the brand property of the PaymentPolicyInfo object. This method returns an empty String if the PaymentPolicyInfo object does not have brand property defined.
        Returns:
        the String representing the brand property of the PaymentPolicyInfo object.
      • getCashierProfile

        public java.lang.String getCashierProfile()
        Returns the profileName Property of the payment policy.

        This payment policy property specifies the name of the Cashier Profile (without the .profile suffix) to use with this policy.

        This payment policy property is defined for policy that is based on WebSphere Commerce Payments cassette.

        Returns:
        the base name of the cashier profile
      • getCassetteName

        public java.lang.String getCassetteName()
        Returns the cassetteName Property of the payment policy.

        This payment policy property specifies the name of the Payments cassette that the payment policy is used for.

        This payment policy property is defined for policy that is based on WebSphere Commerce Payments cassette. It matches the value of the PAYMENTTYPE Parameter in the Cashier Profile specified with the profileName property.

        Returns:
        the cassetteName Property of the payment policy.
      • getLongDescription

        public java.lang.String getLongDescription()
        Returns the long description of the payment policy appended with the brand property if the brand property is a non-empty String.
        Returns:
        the long policy description
      • getOfflineMethod

        public java.lang.String getOfflineMethod()
        Returns the offlineMethod property of the payment policy.

        This property is defined for payment policy that uses the CustomOffline Payments cassette. It matches the value specified for the $METHOD Parameter in the Cashier Profile specified with the profileName property.

        Returns:
        the String representing the offlineMethod property of the payment policy.
      • getPaymentAttributes

        public TypedProperty getPaymentAttributes()
        Returns the TypedProperty object containing payment attributes saved.
        Returns:
        the payment attributes saved or null if none was saved
      • getPolicyId

        public java.lang.String getPolicyId()
        Returns the ID of the payment policy in String form.
        Returns:
        java.lang.String
      • getPolicyName

        public java.lang.String getPolicyName()
        Returns the policyName of the payment policy.
        Returns:
        java.lang.String
      • getPolicyType

        public java.lang.String getPolicyType()
        Returns the policyType of the payment policy. For all payment policy this method returns the String "Payment".
        Returns:
        the policyType ID
      • getShortDescription

        public java.lang.String getShortDescription()
        Returns the short description of the payment policy appended with the brand property if the brand property is a non-empty String.
        Returns:
        the short policy description appended with the brand
      • getStoreEntityId

        public java.lang.String getStoreEntityId()
        Returns the Store Entity ID that this payment policy is defined for. This may be the Id of a Store or Store Group.
        Returns:
        the Store Entity ID.
      • getSupportedCurrencies

        public java.util.Vector getSupportedCurrencies()
        Returns a Vector of currencies supported by this payment policy if known. Returns an empty Vector if the supported current is not known.
        Returns:
        the Vector of currencies known to be supported by this payment policy
      • isNotForDefaultTC

        public boolean isNotForDefaultTC()
        Indicates whether or not this payment policy is intended for default PaymentTC. Default PaymentTCs are used by TradingAgreements that do not have explicit Payment Terms and Conditions.
        Returns:
        true if this payment policy is NOT intended for use with default PaymentTCs.
      • newCopy

        public PaymentPolicyInfo newCopy()
        Creates a new copy of the PaymentPolicyInfo object from this object.
        Returns:
        a new copy of this PaymentPolicyInfo object.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Override the clone() function of Object class
        Overrides:
        clone in class java.lang.Object
        Returns:
        Object
        Throws:
        java.lang.CloneNotSupportedException
      • requiresExplicitTC

        public boolean requiresExplicitTC()
        Indicates whether or not this payment policy requires an explicit PaymentTC to be used.
        Returns:
        true if this payment policy must be used with an explicit PaymentTC.
      • setBrand

        public void setBrand(java.lang.String astrBrand)
        Sets the brand property of the PaymentPolicyInfo object.
        Parameters:
        astrBrand - the name of the credit card brand.
      • setFieldsFromPolicyAB

        public void setFieldsFromPolicyAB(BusinessPolicyAccessBean abPolicy,
                                          java.lang.Integer nLanguageId)
                                   throws ECException
        Sets the other fields of the bean from the BusinessPolicyAccessBean that represents the Payment Policy object. These fields include the various properties in the Policy Properties field and the descriptions (both long and short) of the Policy in the specified language.
        Parameters:
        abPolicy - the BusinessPolicyAccessBean representing the Payment Policy object.
        nLanguageId - the language ID that identifies the language to be used for language-specific fields.
        Throws:
        ECException
      • setFieldsFromPolicyAB

        public void setFieldsFromPolicyAB(BusinessPolicyAccessBean abPolicy,
                                          java.lang.Integer nLanguageId,
                                          java.lang.Integer anStoreId)
                                   throws ECException
        Sets the other fields of the bean from the BusinessPolicyAccessBean that represents the Payment Policy object. These fields include the various properties in the Policy Properties field and the descriptions (both long and short) of the Policy in the specified language.
        Parameters:
        abPolicy - the BusinessPolicyAccessBean representing the Payment Policy object.
        nLanguageId - the language ID that identifies the language to be used for language-specific fields.
        anStoreId - the storeId used to locate the descriptions using the alternative languages for the specified store. If this is null, then the storeId from of the abPolicy bean is used.
        Throws:
        ECException
      • setLongDescription

        public void setLongDescription(java.lang.String description)
        Sets the longDescription property of the Bean.
        Parameters:
        description - a long description of the Payment Policy.
      • setPaymentAttributes

        public void setPaymentAttributes(TypedProperty attributes)
        Saves the TypedProperty object containing payment attributes.
        Parameters:
        attributes - the TypedProperty object containing the payment attributes to save.
      • setShortDescription

        public void setShortDescription(java.lang.String description)
        Sets the shortDescription property of the Bean.
        Parameters:
        description - a short description of the Payment Policy.
      • setSupportedCurrencies

        public void setSupportedCurrencies(java.util.Vector vec)
        Sets the supportedCurrencies property of the Bean representing the currencies supported by this payment policy.
        Parameters:
        vec - the Vector containing the Strings representing the currencies supported by this payment policy.
      • useWallet

        public boolean useWallet()
        Indicates whether or not this payment policy requires the use of a Wallet application.
        Returns:
        true if this payment policy requires the use of a Wallet application.
      • isDisplayAllowed

        public boolean isDisplayAllowed()
        Indicates whether or not this payment policy should be displayed to the shopper.
        Returns:
        true if this payment policy can be displayed to the shopper.
      • getCompatibleMode

        public java.lang.String getCompatibleMode()
        Indicates whether or not this payment policy is in compatible mode. One payment policy is in compatible mode means this payment policy uses the payment policy commands in WebSphere Commerce v5.x.
        Returns:
        String "true" if this payment policy is in compatible mode, "false" for others.
      • getInStorePaymentMode

        public java.lang.String getInStorePaymentMode()
        Indicates whether or not this payment policy is In Store Payment mode.
        Returns:
        String "true" if this payment policy is in store payment mode, "false" for others.
      • toString

        public java.lang.String toString()

        Method toString - creates a String representation of the object.

        Overrides:
        toString in class java.lang.Object
        Returns:
        the String representation