eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Demos::WebSlideShow':

Home

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

Class: WebSlideShow (in Demos)


Inheritance:

   Object
   |
   +--HTTPService
      |
      +--Demos::WebSlideShow

Package:
stx:goodies/webServer
Category:
Net-Communication-HTTP-Services-Demo-WebApplications
Version:
rev: 1.120 date: 2023/08/11 09:50:21
user: cg
file: WebSlideShow.st directory: goodies/webServer
module: stx stc-classLibrary: webServer

Description:


Provides a thumbnailed slides presentation;
for the given slideDirectory, referring pages are synthesized,
and thumbnails automatically generated, as required.
To add more slides, simply create a sub-folder of the slidesDirectory,
put the slides there, and open a browser; that's it - all done automatically
and on the fly.

To start:

  start the HTTPServer at some port:
      aServer := HTTPServer startServerOnPort:8080

  register the class (towards the HTTPServer) with:
      service := Demos::WebSlideShow new.
      service slideDirectory:'someDirectory'.
      service registerServiceOn:(HTTPServer runningServers first) as:'slides'.

Open a netscape or internet explorer (somewhere);
enter the URL:
    httP://host:port/slides

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  defaultReplyPresenterClass

o  isThreadSafe

o  linkName
return the default path (with slash)

o  newSetIndicationFile

o  slideDirectory
my default slides directory

queries-service
o  settingsApplicationClass
my application in the settings dialog


Instance protocol:

accessing
o  allowSlideShow

o  allowSlideShow: aBoolean

o  allowUploads

o  allowUploads: something

o  numberOfColumns
the number of columns to generate (default: 5)

o  numberOfColumns: something
set the number of columns to generate

o  numberOfSlidesPerPage
the number of thumbs per page (default: 25)

o  numberOfSlidesPerPage: something
set the number of thumbs per page

o  showExeptFrame
old instance var keep selector for loading old settings files

o  showExeptFrame: aBoolean
old instance var keep selector for loading old settings files

o  showFileNames

o  showFileNames: aBoolean

o  showFileSizes

o  showFileSizes: aBoolean

o  slideDirectory
where the slides are

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

o  slideShowDelay

o  smoothThumbs

o  thumbBorders

o  thumbBorders: aBoolean

o  thumbFileFormat
^ #gif

o  thumbSize
the size of the generated thumbs (default: 128@128)

o  thumbSize: anExtent
the size of the generated thumbs (default: 128@128)

o  thumbStyle

o  thumbStyle: aSymbol

o  uploadRealm

o  uploadRealm: something

o  withImageWidthOption

o  withImageWidthOption: something

helpers
o  areAnyImagesIn: aDirectory
true if there are any files with an image mimeType in aDirectory

o  criticalDirectoryAccessIn: anAbsolutePath do: aBlock
synchronized critical update of the thumb directory

o  filesInDirectory: path

o  imageFilesInDirectory: path

o  newSetIn: aDirectory
true if there are any files with an image mimeType in aDirectory

maintenance html presentation
o  specificChangeFromRequest: aRequest
extracts parameter from an html-maintenance post-request

o  specificInputFieldsForRequest: aRequest
generates the html-fragment for the maintenance form

misc
o  flushCachedThumbImages
self allInstancesDo:#flushCachedThumbImages

o  styleDescriptionsAndSymbols
('Cartoon' #cartoon) "/ does not work yet

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

request handling
o  process: aRequest
process an http request

serving-private
o  authenticateUploadFor: aRequest

o  createNewImageSet: aRequest forRelativePath: relPath
self showExeptFrame ifTrue:[

o  doFormActions: aRequest forRelativePath: relPath
process all the form actions

o  file: absolutePathToFile for: aRequest
return a files complete contents

o  generateTableForSlidesIn: path relative: relativePath for: aRequest
generate an html table containing the thumbs

o  generateTableForSubdirectoriesIn: path relative: relativePath for: aRequest
generate an html table containing links to subdirectories

o  generateZipLinksForFilesIn: path relative: relativePath for: aRequest
generate a link for zip/tgz files

o  image: absolutePathToImage for: aRequest
return a full image

o  imagePageBody: aRequest for: path relative: relativePath
the body of an image page

o  isDirectoryVisible: aDirectory

o  linkToThumbFor: aRealativeImageFilename
generate a hyperlink to a thumb

o  pageFinish: aRequest
showExeptFrame ifTrue:[

o  slidePage: aRequest forRelativePath: relativePathOfSlideDirectory
after validating the request, generate a page containing the tables

o  slidePageBody: aRequest for: path relative: relativePath
the body of a slide page

o  slidePageTables: aRequest for: path relative: relativePath
generates the two tables

o  thumb: absolutePathToThumb for: aRequest
look for or create and cache a thumb image.
When invoked for the first time, generate a dithered 8-bit version.

o  upLoadImage: aRequest forRelativePath: relPath

o  upLoadInputFor: aRequest relative: relativePath

serving-thumbs
o  generateButtonImageFor: anImage buttonLevel: bw

o  generateCartoonImageFor: anImage
must convert - GIF only supports Depth8.

o  generateGrayImageFor: anImage

o  generateShadowImageFor: anImage shadowWidth: sw

o  generateSlideImageFor: anImage
must convert - GIF only supports Depth8.

o  generateThumbFor: anImage
must convert - GIF only supports Depth8.

settings persistency
o  settingSelectors
answer the selectors that are used to configure a service - i.e. those which are
saved in the webServer-settings file.

Usage example(s):

     HTTPService new settingSelectors
     self new settingSelectors


Private classes:

    CachedDirectoryEntry

Examples:


start the HTTPServer at some port and register the class (towards the HTTPServer) Open a netscape or internet explorer (somewhere); enter the URL: http://host:port/WebSlideShow
|aServer service|

aServer := HTTPServer serverOnPort:8081.

service := Demos::WebSlideShow new.
service slideDirectory:'/phys/exept/unsaved3/cg/camp smalltalk bilder'.
service numberOfColumns:5.
service numberOfSlidesPerPage:30.
service registerServiceOn:aServer as:'campSmalltalk'.


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Thu, 03 Oct 2024 16:36:27 GMT