Package com.newmediaworks.taglib.payment
Class PropertyHelper
java.lang.Object
com.newmediaworks.taglib.payment.PropertyHelper
Provides utilities to assign properties to the correct tags when the properties exist in multiple places.
This is to reduce code duplication.
- Author:
- New Media Works
-
Method Summary
Modifier and TypeMethodDescriptionstatic <V> void
setAddressProperty
(V value, String fromName, ServletRequest request, BiConsumer<? super StoreCreditCardTag, ? super V> storeCreditCardSetter, BiConsumerE<? super CreditCardTag, ? super V, ? extends JspException> creditCardSetter, BiConsumerE<? super ShippingAddressTag, ? super V, ? extends JspException> shippingAddressSetter) Sets a value on aStoreCreditCardTag
,CreditCardTag
, orShippingAddressTag
while verifying correct tag nesting.static <V> void
setCardProperty
(V value, String fromName, ServletRequest request, BiConsumer<? super StoreCreditCardTag, ? super V> storeCreditCardSetter, BiConsumerE<? super CreditCardTag, ? super V, ? extends JspException> creditCardSetter) Sets a value on aStoreCreditCardTag
orCreditCardTag
while verifying correct tag nesting.
-
Method Details
-
setCardProperty
public static <V> void setCardProperty(V value, String fromName, ServletRequest request, BiConsumer<? super StoreCreditCardTag, ? super V> storeCreditCardSetter, BiConsumerE<? super CreditCardTag, throws JspException? super V, ? extends JspException> creditCardSetter) Sets a value on aStoreCreditCardTag
orCreditCardTag
while verifying correct tag nesting.- Throws:
JspException
-
setAddressProperty
public static <V> void setAddressProperty(V value, String fromName, ServletRequest request, BiConsumer<? super StoreCreditCardTag, ? super V> storeCreditCardSetter, BiConsumerE<? super CreditCardTag, throws JspException? super V, ? extends JspException> creditCardSetter, BiConsumerE<? super ShippingAddressTag, ? super V, ? extends JspException> shippingAddressSetter) Sets a value on aStoreCreditCardTag
,CreditCardTag
, orShippingAddressTag
while verifying correct tag nesting.- Throws:
JspException
-