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.11 date: 2023/08/02 14:16:25
user: stefan
file: Demos__WebDemoShopSessions.st directory: goodies/webServer
module: stx stc-classLibrary: webServer

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

copyright

COPYRIGHT (c) 2003 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

defaults
o  canChangeReplyPresenter

o  defaultAllowRobots

o  linkName
return the default linkName path (with slash)

image specs
o  addToCartImage

o  addToCartInImage

o  cartImage

o  cartInImage

o  inImage

o  removeFromCartImage

o  removeFromCartInImage

o  shopHomeImage

o  shopHomeInImage

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
(comment from inherited method)
answer the selectors that are used to configure a service - i.e. those which are
saved in the webServer-settings file.


Private classes:

    Article
    Customer
    Order
    Warehouse

Examples:


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

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


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:19:20 GMT