Skip to content

RecipeTreeViewController

pozil edited this page Jul 26, 2023 · 16 revisions

layout: default

RecipeTreeViewController

Provides the necessary data to populate a lightning-tree base component with recipe and group information

Group Shared Code

See ApexClassUtilities

Fields

private APEXRECIPESIDENTIFICATIONTAGString

The String here represents a relatively unique tag that Apex Recipe uses to help group related classes.

private groupToListOfNamesMap<String,List<String>>


Methods

public static generateTreeData()

AURAENABLED

Generates a recursive list of RecipeTreeData objects to feed to a Lightning-tree-view component. Importantly, the returning array has two RecipeTreeData objects - One for Recipes, the other for our supporting, shared code.

Returns

Type Description
List List<RecipeTreeData>

Example

System.debug(RecipeTreeViewController.generateTreeData());

private static generateMapOfGroupToListOfNames()

SUPPRESSWARNINGS

Generates a map containing Group names as the Keys tied to a List of class names. Note: this method contains a false-positive PMD violation. Normally, we'd want to check for FLS/CRUD here, but for ApexClass a system level object that Admins and users cannot really change we're ok.

Returns

Type Description
Map<String,List> Map<String, List<String>>

Classes

RecipeTreeData

Used to marshall data between Apex and the LWC component that uses this data

Implemented types

Comparable

Fields

public expandedBoolean

AURAENABLED

public itemsRecipeTreeData

AURAENABLED

public labelString

AURAENABLED

public nameString

AURAENABLED


Methods

public compareTo(Object compareTo)

Required by the Comparable interface, this method, once implemented allows us to sort of this object type.

Parameters
Param Description
compareTo A RecipeTreeData object to compare this instance against.
Returns
Type Description
Integer Integer


Clone this wiki locally