Establish banner defaults¶
Establish the environment-driven defaults that the render step depends on. Called from OnInit when the BannerControl is not in design mode.
| Field | Value |
|---|---|
| Operation ID | OP-V2-002 |
| Trigger | Called from OnInit when the BannerControl is not in design mode. |
| Inputs | AppGlobal.EnvironmentService.IsClientExternal, the current HttpContext, the template source directory. |
| Outputs | Internal/insider flag, default link visibility flags, resolved banner path, LoggingIn flag. |
| Primary components | BannerControl.SetBannerControlDefaults |
| Entry point | SAIF.Presentation.Web.Controls.V2/Banner.vb |
Steps¶
- Read
AppGlobal.EnvironmentService.IsClientExternaland set the internal ("insider") flag to its negation. (BR-V2-015) -
Origin:
AppGlobal.EnvironmentServiceis imported from theSAIF.Framework.Securitynamespace; its owning assembly could not be confirmed from this repository.** - Default feedback, banner and logout visibility to "visible only for external clients". (BR-V2-016)
- If an
HttpContextexists, map/RESOURCES/SITEBANNER.XMLto a physical path; if the file does not exist, clear the path so rendering is skipped. (BR-V2-017, BR-V2-003) - Derive the current application name from the last segment of the mapped template source directory (upper-cased) and set
LoggingInwhen it equalsONLINELOGIN. (BR-V2-018)
Process flow¶
The following diagram visualizes this operation's control flow.
flowchart TD
Start([SetBannerControlDefaults]) --> S1[Read IsClientExternal, invert to Insider flag]
S1 --> S2[Default link visibility for external clients]
S2 --> S3{HttpContext exists?}
S3 -->|Yes| S4[MapPath SiteBanner.xml]
S4 --> S5{File exists?}
S5 -->|No| Clear[Clear banner path]
S5 -->|Yes| S6[Derive application name]
S3 -->|No| S6
Clear --> S6
S6 --> EndOk([Defaults established])
Failure and edge-case behavior¶
- No exceptional failure handling beyond the branches described in Steps was found in the analysis findings.*
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with**could not be confirmed; treat as unknown until verified.
Sources¶
SAIF.Presentation.Web.Controls.V2/Banner.vb