Skip to content

Commit

Permalink
Updated docs & improvements (#149)
Browse files Browse the repository at this point in the history
* Moved docs folder from gh-pages to main

* Updated docs based on latest codebase

* Updated group names in ApexDocs

* Added powershell script for doc generation
  • Loading branch information
jongpie authored May 23, 2021
1 parent 7ac32e5 commit a4779b7
Show file tree
Hide file tree
Showing 33 changed files with 10,686 additions and 19 deletions.
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
{
"files": "*.{cmp,page,component}",
"options": { "parser": "html" }
},
{
"files": "*.{md}",
"options": { "parser": "markdown" }
}
]
}
2 changes: 1 addition & 1 deletion config/apexdocs-header.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Nebula Logger: Documentation
# Documentation
3 changes: 0 additions & 3 deletions config/apexdocs.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"root": "",
"sourceLanguage": "java",
"home": {
"header": "./config/apexdocs-header.md"
},
"content": {
"startingHeadingLevel": 2,
"includeAuthor": false,
Expand Down
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-minimal
61 changes: 61 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
layout: default
---

# Classes

## Logger Engine

### [FlowLogEntry](logger-engine/FlowLogEntry)

Handles adding new log entries in Flow

### [FlowRecordLogEntry](logger-engine/FlowRecordLogEntry)

Handles adding new log entries in Flow for a particular `SObject` record

### [LogEntryEventBuilder](logger-engine/LogEntryEventBuilder)

Builder class that generates each `LogEntryEvent__e` record

### [LogMessage](logger-engine/LogMessage)

Provides the ability to generate string messages on demand, using String.format()

### [Logger](logger-engine/Logger)

The core class for logging

## Log Management

### [LogBatchPurgeScheduler](log-management/LogBatchPurgeScheduler)

Schedulable class used to schedule the batch job `LogBatchPurger`

### [LogBatchPurger](log-management/LogBatchPurger)

Batch class used to delete old logs, based on `Log__c.LogRetentionDate__c <= :System.today()`

### [LogEntryEventHandler](log-management/LogEntryEventHandler)

Subscribes to `LogEntryEvent__e` platform events and normalizes the data into `Log__c` and `LogEntry__c` records

### [LogEntryFieldSetPicklist](log-management/LogEntryFieldSetPicklist)

Dynamically returns `LogEntry__c` field sets in App Builder when configuring the component RelatedLogEntries

### [LogEntryHandler](log-management/LogEntryHandler)

Manages setting fields on `LogEntry__c` before insert & before update

### [LogHandler](log-management/LogHandler)

Manages setting fields on `Log__c` before insert & before update

### [LogMassDeleteExtension](log-management/LogMassDeleteExtension)

Manages mass deleting `Log__c` records that have been selected by a user on a `Log__c` list view

### [RelatedLogEntriesController](log-management/RelatedLogEntriesController)

Controller class for the component RelatedLogEntries
19 changes: 19 additions & 0 deletions docs/log-management/LogBatchPurgeScheduler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
layout: default
---

## LogBatchPurgeScheduler class

Schedulable class used to schedule the batch job `LogBatchPurger`

### Related

[LogBatchPurger](LogBatchPurger)

---

### Methods

#### `execute(SchedulableContext schedulableContext)``void`

---
23 changes: 23 additions & 0 deletions docs/log-management/LogBatchPurger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
layout: default
---

## LogBatchPurger class

Batch class used to delete old logs, based on `Log__c.LogRetentionDate__c <= :System.today()`

### Related

[LogBatchPurgeScheduler](LogBatchPurgeScheduler)

---

### Methods

#### `execute(Database.BatchableContext batchableContext, List<Log__c> scope)``void`

#### `finish(Database.BatchableContext batchableContext)``void`

#### `start(Database.BatchableContext batchableContext)``Database.QueryLocator`

---
31 changes: 31 additions & 0 deletions docs/log-management/LogEntryEventHandler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
layout: default
---

## LogEntryEventHandler class

Subscribes to `LogEntryEvent__e` platform events and normalizes the data into `Log__c` and `LogEntry__c` records

---

### Constructors

#### `LogEntryEventHandler()`

---

### Properties

#### `releaseNumber``String`

#### `releaseVersion``String`

---

### Methods

#### `execute()``void`

Runs the trigger handler's logic for the `LogEntryEvent__e` platform event object

---
41 changes: 41 additions & 0 deletions docs/log-management/LogEntryFieldSetPicklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
layout: default
---

## LogEntryFieldSetPicklist class

Dynamically returns `LogEntry__c` field sets in App Builder when configuring the component RelatedLogEntries

---

### Methods

#### `getDefaultValue()``VisualEditor.DataRow`

Returns a default value of null - admins must select a field set within App Builder

##### Return

**Type**

VisualEditor.DataRow

**Description**

null (no default value)

#### `getValues()``VisualEditor.DynamicPickListRows`

Returns the list of fields sets on `LogEntry__c`, allowing admins to specify any field set for each instance of the `RelatedLogEntries` component

##### Return

**Type**

VisualEditor.DynamicPickListRows

**Description**

The list of field sets on the LogEntry\_\_c object

---
23 changes: 23 additions & 0 deletions docs/log-management/LogEntryHandler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
layout: default
---

## LogEntryHandler class

Manages setting fields on `LogEntry__c` before insert & before update

---

### Constructors

#### `LogEntryHandler()`

---

### Methods

#### `execute()``void`

Runs the trigger handler's logic for the `LogEntry__c` custom object

---
23 changes: 23 additions & 0 deletions docs/log-management/LogHandler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
layout: default
---

## LogHandler class

Manages setting fields on `Log__c` before insert & before update

---

### Constructors

#### `LogHandler()`

---

### Methods

#### `execute()``void`

Runs the trigger handler's logic for the `Log__c` custom object

---
55 changes: 55 additions & 0 deletions docs/log-management/LogMassDeleteExtension.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
layout: default
---

## LogMassDeleteExtension class

Manages mass deleting `Log__c` records that have been selected by a user on a `Log__c` list view

---

### Constructors

#### `LogMassDeleteExtension(ApexPages.StandardSetController controller)`

LogMassDeleteExtension description

##### Parameters

| Param | Description |
| ------------ | ---------------------- |
| `controller` | controller description |

---

### Methods

#### `deleteSelectedLogs()``PageReference`

Deletes the list of selected `Log__c` records (if the current user has delete access for the `Log__c` object)

##### Return

**Type**

PageReference

**Description**

The PageReference of the previous page (based on `controller.cancel()`)

#### `getDeletableLogs()``List<Log__c>`

Filters the list of selected `Log__c` records to only include records that the current user can delete (based on object-level access)

##### Return

**Type**

List<Log\_\_c>

**Description**

The matching `Log__c` records that the current user has access to delete

---
Loading

0 comments on commit a4779b7

Please sign in to comment.