eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Demos::WebDemoShopSessions':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: WebDemoShopSessions (in Demos)


Inheritance:

   Object
   |
   +--HTTPService
      |
      +--HTTPSelectorService
         |
         +--Demos::WebDemoShopSessions

Package:
stx:goodies/webServer
Category:
Net-Communication-HTTP-Services-Demo-WebApplications
Version:
rev: 1.7 date: 2018/04/26 10:49:13
user: cg
file: Demos__WebDemoShopSessions.st directory: goodies/webServer
module: stx stc-classLibrary: webServer
Author:
Claus Gittinger

Description:


This is a copy of Claus's WebDemoShop. Instead of using cookies directly it uses
HTTPSession to store state.

Only two methods were changed:
    #customerFromRequest:aRequest
    #enterShop:aRequest



[access with:]
    http:<host>:<port>/Shop


Class protocol:

defaults
o  canChangeReplyPresenter

o  defaultAllowRobots

o  linkName
return the default linkName path (with slash)

image specs
o  addToCartImage
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
     self addToCartImage inspect
     ImageEditor openOnClass:self andSelector:#addToCartImage
     Icon flushCachedIcons

o  addToCartInImage
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
     self addToCartInImage inspect
     ImageEditor openOnClass:self andSelector:#addToCartInImage
     Icon flushCachedIcons

o  cartImage
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
     self cartImage inspect
     ImageEditor openOnClass:self andSelector:#cartImage
     Icon flushCachedIcons

o  cartInImage
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
     self cartInImage inspect
     ImageEditor openOnClass:self andSelector:#cartInImage
     Icon flushCachedIcons

o  inImage
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
     self inImage inspect
     ImageEditor openOnClass:self andSelector:#inImage
     Icon flushCachedIcons

o  removeFromCartImage
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
     self removeFromCartImage inspect
     ImageEditor openOnClass:self andSelector:#removeFromCartImage
     Icon flushCachedIcons

o  removeFromCartInImage
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
     self removeFromCartInImage inspect
     ImageEditor openOnClass:self andSelector:#removeFromCartInImage
     Icon flushCachedIcons

o  shopHomeImage
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
     self shopHomeImage inspect
     ImageEditor openOnClass:self andSelector:#shopHomeImage
     Icon flushCachedIcons

o  shopHomeInImage
This resource specification was automatically generated
by the ImageEditor of ST/X.
usage example(s):
     self shopHomeInImage inspect
     ImageEditor openOnClass:self andSelector:#shopHomeInImage
     Icon flushCachedIcons

queries-service
o  settingsApplicationClass
a SettingsApplication class - or nil (used in the settings dialog if non-nil)


Instance protocol:

accessing
o  shopID
return the value of the instance variable 'shopID' (automatically generated)

o  shopID: something
set the value of the instance variable 'shopID' (automatically generated)

initialization
o  addRequiredForeignServicesTo: anHTTPServer
I need a file service for the bitmaps and icons

o  id
self new id

o  initStyle
pageParameters at:#bodyColor put:'"#f6feff"'.

o  initWarehouse

o  initialize

misc
o  cookieName

o  customerFromRequest: aRequest

misc-html
o  shopBodyEndFor: aRequest

o  shopBodyStart: aString for: aRequest
Write a body with a headline

o  shopFooterIn: aRequest
aRequest nextPutLine:'<CENTER>';

o  shopHeaderIn: aRequest

o  shopNavigationFor: aRequest

o  shopPageParameters

o  shopReply: aString for: aRequest

queries-service
o  allowedMessages

o  defaultMessage

serving
o  addItem: aRequest

o  customer: customer reentersShop: aRequest

o  enterShop: aRequest

o  noCookies: aRequest

o  orderItem: aRequest

o  orderItemSubmit: aRequest
already processed - repost

o  reenterShop: aRequest

o  showItems: aRequest

settings persistency
o  settingSelectors


Private classes:

    Article
    Customer
    Order
    Warehouse

Demonstration:


    Demos::HTTPDemoShop registerServiceIn:(HTTPServer runningServers first) as:'TestShop'


Examples:


step1 - registration self new registerServiceAs:'Shop' step2 - open a browser (mozilla, netscape etc.) navigate to: /Shop
|aServer|

aServer := HTTPServer serverOnPort:8081.
self registerServiceIn:aServer.


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Wed, 19 Sep 2018 05:37:05 GMT