|
Daraja HTTP Framework 3.0.7-SNAPSHOT
HTTP server framework for Object Pascal
|
Holds all known web component mappings for a context. More...
Public Member Functions | |
| AddUrlPattern (const string UrlPattern, TObject Value) | |
| Add a web component mapping. | |
| CheckExists (const string UrlPattern) | |
| Check if a mapping path exists. | |
| TStrings | GetMatches (const string Path) |
| Return all matching mappings for the given path. | |
| TSpecType | GetSpecType (const string Spec) |
| Boolean | Matches (const string Path, const string Spec) |
| Matches the given path against a specified pattern. | |
Protected Member Functions | |
| Boolean | Matches (const string Path, const string Spec, TSpecType SpecType) |
| Matches a given URL document path against a specified path pattern. | |
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::AddUrlPattern | ( | const string | UrlPattern, |
| TObject | Value ) |
Add a web component mapping.
| UrlPattern | a single component mapping path |
| Value | the mapped web component |
| EWebComponentException |
References Matches().
| TdjPathMap::CheckExists | ( | const string | UrlPattern | ) |
Check if a mapping path exists.
This procedure throws a EWebComponentException if the URL pattern is already registered for this context.
| UrlPattern | a single component mapping path |
| EWebComponentException |
| 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 |
References Create(), GetMatches(), GetSpecType(), Matches(), stDefault, stExact, stPrefix, stSuffix, and stUnknown.
Referenced by GetMatches().
| TSpecType TdjPathMap::GetSpecType | ( | const string | Spec | ) |
| Spec | the path specification |
Referenced by GetMatches().
| Boolean TdjPathMap::Matches | ( | const string | Path, |
| const string | Spec ) |
Matches the given path against a specified pattern.
| Path | The file or directory path to be checked. |
| Spec | The pattern or specification to match against. |
|
protected |
Matches a given URL document path against a specified path pattern.
| Path | the URL document path |
| Spec | the path specification |
| SpecType | the path specification type |
Referenced by AddUrlPattern(), and GetMatches().