ProtoObjectObjectWARequestHandlerWAEntryPointWADispatcher
| entryPoints |
| default |
| instance | class |
|---|---|
| private public | as yet unclassified |
| entryPoints |
|---|
|
|
| default |
|---|
|
|
| private |
|---|
| handlerForRequest: aRequest |
| path name | path _ aRequest url. (path beginsWith: basePath) ifTrue: [name _ ((path allButFirst: basePath size) findTokens: '/') at: 1 ifAbsent: []. entryPoints at: name ifPresent: [:n | ^ n]]. ^ WANotFoundHandler new |
| initialize |
entryPoints _ Dictionary new |
| public |
|---|
| basePath: newPath |
| base | basePath _ newPath. base _ (newPath isEmpty or: [newPath last ~= $/]) ifTrue: [newPath, '/'] ifFalse: [newPath]. entryPoints keysAndValuesDo: [:key :component | component basePath: base, key] |
| configurationComponent |
^ WADispatcherEditor new dispatcher: self |
| entryPoints |
^ entryPoints |
| handleRequest: aRequest |
^ (self handlerForRequest: aRequest) handleRequest: aRequest |
| registerEntryPoint: entryPoint at: aString |
| path | entryPoints at: aString put: entryPoint. path _ basePath last = $/ ifTrue: [basePath, aString] ifFalse: [basePath, '/', aString]. entryPoint basePath: path |
| removeEntryPoint: anObject |
entryPoints removeKey: (entryPoints keyAtValue: anObject) |
| as yet unclassified |
|---|
| default |
default ifNil: [default _ self new]. default basePath ifNil: [default basePath: '/seaside']. ^ default |
| description |
^ 'Subdirectory' |
| new |
^ super new initialize |