|
Daraja HTTP Framework 3.0-MS1
HTTP server framework for Object Pascal
|
Holds all known web component mappings for a context. More...
Inheritance diagram for TdjPathMap:Public Member Functions | |
| TSpecType | GetSpecType (const string Spec) |
| Boolean | Matches (const string Path, const string Spec) |
| CheckExists (const string PathSpec) | |
| Check if a mapping path exists. | |
| AddPathSpec (const string PathSpec, TObject Value) | |
| Add a web component mapping. | |
| TStrings | GetMatches (const string Path) |
| Return all matching mappings for the given path. | |
Protected Member Functions | |
| Boolean | Matches (const string Path, const string Spec, TSpecType SpecType) |
Holds all known web component mappings for a context.
Matching is performed in the following order Exact match Longest prefix match Longest suffix match
| TdjPathMap::AddPathSpec | ( | const string | PathSpec, |
| TObject | Value ) |
Add a web component mapping.
| PathSpec | a single component mapping path (for example, '*.html' or '/*') |
| Value | the mapped web component |
| EWebComponentException |
References CheckExists().
| TdjPathMap::CheckExists | ( | const string | PathSpec | ) |
Check if a mapping path exists.
This procedure throws a EWebComponentException if the PathSpec is already registered for this context.
| PathSpec | a single component mapping path (for example, '*.html' or '/*') |
| EWebComponentException |
Referenced by AddPathSpec().
| TStrings TdjPathMap::GetMatches | ( | const string | Path | ) |
Return all matching mappings for the given path.
The best match will be the first entry.
| Path | the URL path (without context), for example 'test.html' |
| class TSpecType TdjPathMap::GetSpecType | ( | const string | Spec | ) |
| Spec | the path specification (for example, '/*') |
|
protected |
| Path | the URL document path |
| Spec | the path specification (for example, '/*') |
| SpecType | the path specification type |