---
title: "clsMenuAuthorizedItemCollection"
summary: "API reference for clsMenuAuthorizedItemCollection."
status: draft
owner: SAIF documentation team
last_reviewed: 2026-08-17
library: SAIF.Business.Menu
reference_type: package
---

# clsMenuAuthorizedItemCollection

Builds and filters authorized-menu result sets.

## Purpose
- Execute the union query that composes secured items, public items, and favorites.
- Offer filtered views such as `Favorites` and `SecuredAppItems`.

## Context
- Namespace: `SAIF.Business.Menu`
- Assembly/package: `SAIF.Business.Menu.dll`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Item (default, keyed by seq num) | `Default Public Overloads ReadOnly Property Item(ByVal inMenuItemSeqNum As Decimal) As clsMenuAuthorizedItem` | Looks up an authorized item in the loaded collection by its `MenuItemSeqNum` key, returning `Nothing` if no item matches. |
| Item (default, keyed by app/category/page) | `Default Public Overloads ReadOnly Property item(ByVal inAppCode As String, ByVal inCategory As String, ByVal inPageLink As String, Optional ByVal visibleOnly As Boolean = False) As clsMenuAuthorizedItem` | Looks up the first loaded authorized item matching application code, category, and (link-only) page link, optionally restricted to visible items, returning `Nothing` if no item matches. |
| ItemExact | `Public ReadOnly Property ItemExact(ByVal inAppCode As String, ByVal inCategory As String, ByVal inPageLink As String, Optional ByVal visibleOnly As Boolean = False) As clsMenuAuthorizedItem` | Finds the single loaded authorized item that exactly matches application code, category, and page link, used by callers that need the specific item behind a rendered menu link rather than a category-level search. |
| ItemByCategory | `Public ReadOnly Property ItemByCategory(ByVal inCategory As String, ByVal inPageLink As String, Optional ByVal visibleOnly As Boolean = False) As clsMenuAuthorizedItem` | Finds the first loaded authorized item matching the supplied category and page link, letting menu-rendering code resolve an item without knowing its owning application code. |
| DumpAllMenuItemsToString | `Public ReadOnly Property DumpAllMenuItemsToString() As String` | Concatenates each loaded item's `ApplicationPath` and `PageName` into a single comma-separated diagnostic string, used for logging or troubleshooting the composed authorized-menu set. |
| FindPage | `Public ReadOnly Property FindPage(ByVal inAppCode As String, ByVal inPageLink As String) As clsMenuAuthorizedItem` | Locates the first loaded authorized item whose application code and page link match, letting callers resolve a page reference without an exact category match. |
| FindPageExact | `Public ReadOnly Property FindPageExact(ByVal inAppCode As String, ByVal inPageLink As String) As clsMenuAuthorizedItem` | Locates the loaded authorized item that exactly matches the supplied application code and page link, for callers that must resolve one specific page unambiguously. |
| Favorites | `Public ReadOnly Property Favorites() As clsMenuAuthorizedItemCollection` | Returns the favorite-only subset sorted by MenuOrder. |
| ApplicationItems | `Public ReadOnly Property ApplicationItems() As clsMenuAuthorizedItemCollection` | Returns the non-favorite items from the loaded authorized menu. |
| AppItemsByCategory | `Public ReadOnly Property AppItemsByCategory(ByVal inCategory As String) As clsMenuAuthorizedItemCollection` | Returns the non-favorite items in one menu category from the loaded authorized menu. |
| SecuredAppItems | `Public ReadOnly Property SecuredAppItems() As clsMenuAuthorizedItemCollection` | Returns only non-favorite items that are not flagged as public/unsecured. |
| CurrentItem | `Public Shadows ReadOnly Property CurrentItem() As clsMenuAuthorizedItem` | Returns the base collection's current item cast to `clsMenuAuthorizedItem`, avoiding caller-side casting when navigating the composed authorized-menu set. |
| Save | `Public Overrides Function Save() As Boolean` | Persists the current object state through the SAIF data-portal lifecycle. |
| Add | `Public Shadows Function Add(ByVal inclsMenuAuthorizedItem As clsMenuAuthorizedItem) As Integer` | Appends an already-constructed row to the in-memory collection so it participates in the next `Save()` and any collection-wide iteration, without issuing a retrieve. |
| Contains | `Public Overloads Function Contains(ByVal inclsMenuAuthorizedItem As clsMenuAuthorizedItem) As Boolean` | Scans the loaded collection for an item whose `MyGuid` equals the supplied object's `MyGuid` (`clsMenuAuthorizedItem.Equals` compares only that internal GUID identity field). |
| contains | `Public Overloads Function contains(ByVal inApplicationCode As String, ByVal inPageSeq As Decimal) As Boolean` | Scans the loaded collection for an item whose `ApplicationCode` and `MenuPageSeqNum` both equal the supplied values. |
| contains | `Public Overloads Function contains(ByVal inUserID As String, ByVal inMenuItem As clsMenuItem) As Boolean` | Scans the loaded collection for an item whose `MenuItemSeqNum` matches the supplied `clsMenuItem` and whose `MenuUser` (case-insensitive, trimmed) either equals the supplied user id or is the literal `"UNSECURED"` sentinel value, which matches any requested user id for that menu item ([BR-MENU-006](../../business-rules.md#br-menu-006-retrieve-all-uses-the-unsecured-wildcard-sentinel)). |
| ContainsDeleted | `Public Overloads Function ContainsDeleted(ByVal inclsMenuAuthorizedItem As clsMenuAuthorizedItem) As Boolean` | Scans the deleted-items list for an entry whose `MyGuid` equals the supplied object's `MyGuid`. |
| ContainsDeleted | `Public Overloads Function ContainsDeleted(ByVal inMenuAuthorizedItemSeqNum As Decimal) As Boolean` | Scans the deleted-items list for an entry matching the supplied sequence number, via `clsMenuAuthorizedItem.Equals(Object)`.* |
| GetMenuAuthorizedItems | `Public Shared Function GetMenuAuthorizedItems(ByVal inDataportal As IDataPortalInfo, ByVal inMenuUser As String) As clsMenuAuthorizedItemCollection` | Executes the user-scoped authorized-menu query and returns the typed result set. |
| GetAllMenuAuthorizedItems | `Public Shared Function GetAllMenuAuthorizedItems(ByVal inDataportal As IDataPortalInfo) As clsMenuAuthorizedItemCollection` | Executes the all-users authorized-menu query and returns the typed result set. |

## Behavioral notes
- Enforces [BR-MENU-002](../../business-rules.md#br-menu-002-unsecured-menu-items-are-visible-by-default), [BR-MENU-003](../../business-rules.md#br-menu-003-security-group-matching-is-case-insensitive), [BR-MENU-004](../../business-rules.md#br-menu-004-favorites-are-always-included-and-ordered), and [BR-MENU-006](../../business-rules.md#br-menu-006-retrieve-all-uses-the-unsecured-wildcard-sentinel).

## Constraints and usage notes
- Primary read API for callers.

## Inherited public members

No `dependency-resolution.json` was produced for this run, so the members below are a best-effort inference from typical SAIF BOF framework (`clsBusinessCollection(Of T)`) patterns observed elsewhere in this codebase, not a Legends CLI-sourced dependency lookup.**

### From clsBusinessCollection(Of clsMenuAuthorizedItem) (SAIF.BOF.Framework)**

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| Count | `Public ReadOnly Property Count() As Integer` | *Purpose could not be verified beyond the standard collection-indexer contract**; inferred usage is bounding indexed loops that scan the loaded authorized-menu set alongside `Contains`/`contains` and `DumpAllMenuItemsToString`. | `clsBusinessCollection(Of T)` |
| Item | `Public Default ReadOnly Property Item(ByVal index As Integer) As clsMenuAuthorizedItem` | *Purpose could not be verified beyond the standard collection-indexer contract**; inferred usage is positional access to a loaded `clsMenuAuthorizedItem` row during indexed iteration or lookup-by-slot. | `clsBusinessCollection(Of T)` |
| GetEnumerator | `Public Function GetEnumerator() As IEnumerator(Of clsMenuAuthorizedItem)` | Supports `For Each` iteration over the loaded collection; used directly by `DumpAllMenuItemsToString`.** | `clsBusinessCollection(Of T)` |
| IsDirty | `Public Overridable ReadOnly Property IsDirty() As Boolean` | Reports whether any loaded or deleted item in the collection has pending changes.** | `clsBusinessCollection(Of T)` |
| IsValid | `Public Overridable ReadOnly Property IsValid() As Boolean` | Reports whether every loaded item in the collection independently reports itself valid.** | `clsBusinessCollection(Of T)` |

> **Note:** Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `SAIF.Business.Menu\clsMenuAuthorizedItemCollection.vb`
