|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.bundle.Controller
org.torweg.pulse.component.shop.ShoppingCartController
public class ShoppingCartController
controls the ShoppingCart.
The methods displayCart(Bundle, ServiceRequest) and
updateCart(Bundle, ServiceRequest) accept the Parameter
named like MODE_PARAMETER_NAME, containing one of the values
specified by ShoppingCartController.DisplayMode.
| Nested Class Summary | |
|---|---|
static class |
ShoppingCartController.DisplayMode
the display modes for the ShoppingCart. |
| Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller |
|---|
Controller.AlwaysRun |
| Field Summary | |
|---|---|
static java.lang.String |
MODE_PARAMETER_NAME
the name of the Parameter used to request a special
DisplayMode. |
| Constructor Summary | |
|---|---|
ShoppingCartController()
|
|
| Method Summary | |
|---|---|
ShoppingCartResult |
addCartPosition(Bundle bundle, ServiceRequest request)
adds the given ShoppingCartPosition and returns the changes
honouring the display mode. |
ShoppingCartResult |
displayCart(Bundle bundle, ServiceRequest request)
displays the current ShoppingCart except one of the AJAX actions
of this Controller is called. |
void |
getPrice(Bundle bundle, ServiceRequest request)
returns the Price for the given ShopItem and the given
order size for the current User associated with the
ServiceRequest via JSON. |
void |
init(ConfigBean c)
configures the controller. |
void |
modifyCartPosition(Bundle bundle, ServiceRequest request)
alters the given ShoppingCartPosition and returns the changes via
JSON. |
ShoppingCartResult |
removeCartPosition(Bundle bundle, ServiceRequest request)
removes the given ShoppingCartPosition and returns the changes
honouring the display mode. |
ShoppingCartResult |
updateCart(Bundle bundle, ServiceRequest request)
updates the complete ShoppingCart honouring the display mode. |
| Methods inherited from class org.torweg.pulse.bundle.Controller |
|---|
getAlwaysRun, isAlwaysRun, setAlwaysRun |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MODE_PARAMETER_NAME
Parameter used to request a special
DisplayMode.
| Constructor Detail |
|---|
public ShoppingCartController()
| Method Detail |
|---|
@AnyAction @Action(value="displayCart", generate=true, stripSitemapID=false) @Permission(value="useShoppingCart") public final ShoppingCartResult displayCart(Bundle bundle, ServiceRequest request)
ShoppingCart except one of the AJAX actions
of this Controller is called.
bundle - the current bundlerequest - the current request
ShoppingCartResult or an
null, if an AJAX action of this controller is called@Action(value="updateCart", generate=true, stripSitemapID=false) @Permission(value="useShoppingCart") public final ShoppingCartResult updateCart(Bundle bundle, ServiceRequest request)
ShoppingCart honouring the display mode.
All positions of the cart have to be transmitted with valid shop-item-ids
(ShopItem.getShopItemId()).
bundle - the current bundlerequest - the current request
ShoppingCartResult@Action(value="removeCartPosition", generate=true, stripSitemapID=false) @Permission(value="useShoppingCart") public final ShoppingCartResult removeCartPosition(Bundle bundle, ServiceRequest request)
ShoppingCartPosition and returns the changes
honouring the display mode.
bundle - the current bundlerequest - the current request
ShoppingCartResult@Action(value="addCartPosition", generate=true, stripSitemapID=false) @Permission(value="useShoppingCart") public final ShoppingCartResult addCartPosition(Bundle bundle, ServiceRequest request)
ShoppingCartPosition and returns the changes
honouring the display mode.
bundle - the current bundlerequest - the current request
ShoppingCartResult@Action(value="modifyCartPosition", generate=true) @Permission(value="useShoppingCart") public final void modifyCartPosition(Bundle bundle, ServiceRequest request)
ShoppingCartPosition and returns the changes via
JSON.
bundle - the current bundlerequest - the current request@Action(value="getPrice", generate=true) @Permission(value="useShoppingCart") public final void getPrice(Bundle bundle, ServiceRequest request)
Price for the given ShopItem and the given
order size for the current User associated with the
ServiceRequest via JSON.
bundle - the current bundlerequest - the current requestpublic void init(ConfigBean c)
init in interface DeprecatedConfigurablec - the configurationDeprecatedConfigurable.init(org.torweg.pulse.configuration.ConfigBean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||