Skip to content

RecipeTreeViewController

codefriar edited this page Jan 27, 2021 · 16 revisions

layout: default

RecipeTreeViewController class

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

Related

ApexClassUtilities


Properties

APEXRECIPESIDENTIFICATIONTAGString

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

groupToListOfNamesList<String>>


Methods

generateMapOfGroupToListOfNames()List<String>>

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.

Return

Type

List>

Description

Map<String, List<String>>

generateTreeData()List<RecipeTreeData>

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.

Return

Type

List

Description

List<RecipeTreeData>

Example

System.debug(RecipeTreeViewController.generateTreeData());

Inner Classes

RecipeTreeViewController.RecipeTreeData class

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


Properties

expandedBoolean
itemsRecipeTreeData[]
labelString
nameString

Methods

compareTo(Object compareTo)Integer

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.
Return

Type

Integer

Description

Integer


Clone this wiki locally