Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Summer '18 Release #85

Closed
wants to merge 69 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
3923bfc
Removed SObjectRecordTypes.cls
jongpie Jun 4, 2018
5693c50
Switched to Soql.cls & Sosl.cls in SObjectRepository
jongpie Jun 4, 2018
d8c5cea
Added meta xml files for Soql & Sosl
jongpie Jun 4, 2018
456f8c1
Removed several QueryBuilder-related classes
jongpie Jun 4, 2018
da20c64
Removed record type & sobject query builder custom settings, renamed …
jongpie Jun 4, 2018
72d4945
Removed some more query builder classes
jongpie Jun 4, 2018
57875d8
Upgraded remaining classes to API v43.0
jongpie Jun 4, 2018
cfffa43
Removed Environment.cls
jongpie Jun 4, 2018
15e13d1
Renamed IDML/DML to IDml/Dml
jongpie Jun 4, 2018
cdddf76
Fixed sort order in package.xml
jongpie Jun 4, 2018
67eaa45
Updated labels for logger & trigger handler settings
jongpie Jun 4, 2018
7da349f
Renamed UUID to Uuid
jongpie Jun 4, 2018
e4191f5
Deleted IAggregateResultQueryBuilder.cls
jongpie Jun 4, 2018
e61348c
Removed the unfinished ApexDocs comments
jongpie Jun 4, 2018
041e28e
Standardized SObject to Sobject naming convention, replaced TestSObje…
jongpie Jun 4, 2018
afd0cfd
Removed Nebula app from package.xml
jongpie Jun 4, 2018
590f269
Added SobjectRepository.getSoql(), renamed some methods
jongpie Jun 4, 2018
26f00dc
Standardized 'Sobject' in ISobjectRepository class name
jongpie Jun 4, 2018
25263e8
Temp rename
jongpie Jun 5, 2018
649f145
Rename revert
jongpie Jun 5, 2018
9766140
Fixed 'SObject' in ISobjectTriggerHandler.cls
jongpie Jun 5, 2018
f849b4e
Updated capitalization of Trigger.operationType
jongpie Jun 5, 2018
2c38bc6
Added license note on a few classes
jongpie Jun 5, 2018
d220a8f
Added new constructor & field category in Soql
jongpie Jun 5, 2018
88005ba
Added object-level validation/control in Dml.cls
jongpie Jun 5, 2018
6968833
Renamed some methods in ISobjectRepository.cls
jongpie Jun 5, 2018
f604803
Removed unfinished Soql.Results subclass
jongpie Jun 5, 2018
293d66f
Reverted some method names in ISobjectRepository
jongpie Jun 5, 2018
adbd6e7
Updated capitalization of 'instanceOf'
jongpie Jun 5, 2018
fffa582
Added interface method setMode to DmlMock.cls
jongpie Jun 5, 2018
ebf6a6f
Fixed old references in sobject repo classes
jongpie Jun 5, 2018
db16c5b
Renamed TestingUtils to TestUtils
jongpie Jun 5, 2018
b53d00f
Updated references from TestingUtils to TestUtils
jongpie Jun 5, 2018
1b13978
Renamed Dml to SobjectDml
jongpie Jun 5, 2018
7e54416
Updated all code references of Dml to SobjectDml
jongpie Jun 5, 2018
25733b9
Upgraded a few more classes to API v43.0
jongpie Jun 5, 2018
18c09a7
Formatting/cleanup in Scheduler.cls
jongpie Jun 6, 2018
ce14307
Formatting/cleanup in TestUtils.cls
jongpie Jun 6, 2018
35cf166
Updated SobjectDml reference in SobjectRepository
jongpie Jun 6, 2018
5d495cd
Updated SobjectDmlMock in SobjectRepositoryMocks
jongpie Jun 6, 2018
7bfe8dc
Upgraded NebulaCore to API v43.0
jongpie Jun 6, 2018
77fb22f
Renamed SobjectTriggerHandlerSettings__c, removed Logger refs in trig…
jongpie Jun 6, 2018
c22f151
Deleted NebulaSettings.cls
jongpie Jun 6, 2018
420e31b
Standardized capitalization of Uuid
jongpie Jun 6, 2018
c4849f3
Made some constants private in Scheduler
jongpie Jun 6, 2018
26b1b5c
Fixed a variable reference in Scheduler_Tests
jongpie Jun 9, 2018
3086302
Fixed my fix
jongpie Jun 9, 2018
6d2a546
Switched to v0.8.0-beta of Nebula Logger
jongpie Jun 11, 2018
444a67e
Fixed a test in SobjectRepository_Tests & bug in SobjectDml
jongpie Jun 11, 2018
db964a8
Updated the label of SobjectTriggerHandlerSettings__c.object
jongpie Jun 11, 2018
da0a1f5
Removed gender tag on LogEntry__c
jongpie Jun 11, 2018
de24af2
Added null handling in Soql.filterWhere method
jongpie Jun 11, 2018
c0d180c
Formatting in SobjectRepository
jongpie Jun 11, 2018
376be14
Commenting out a broken test for now
jongpie Jun 11, 2018
e6fe2f0
Updated README
jongpie Jun 11, 2018
9be6d59
Updated repo notes for trigger handler and query & search classes
jongpie Jun 11, 2018
cf7a12d
Made some tweaks to README.md
jongpie Jun 11, 2018
19c31bf
Delete INebulaCore/NebulaCore
jongpie Jun 11, 2018
9277797
Upgraded to v3 of Nebula Query & Search
jongpie Jul 23, 2018
17e0e29
Removed old tests from previous version of Query & Search
jongpie Jul 23, 2018
f96f943
Updated SobjectRepository to reflect newest changed to Query & Search
jongpie Jul 23, 2018
fd1a696
Updated SobjectRepositoryMocks to reflect changes to Query & Search
jongpie Jul 23, 2018
5066884
Added ISobjectRepository.getSobjectSearchBuilder method
jongpie Jul 23, 2018
a5b699d
Replaced the old Logger with the new Nebula Logger v0.12.0-beta
jongpie Jul 23, 2018
d4e4371
Added SobjectComparator for easily comparing 2 versions of an sobject…
jongpie Jul 23, 2018
6300d79
Updated year in LICENSE
jongpie Jul 23, 2018
f010491
Changed Scheduler methods to use integers instead of strings
jongpie Jul 23, 2018
e7e1103
Removed references to an unfinished enhancement for polymorphic fields
jongpie Jul 23, 2018
8c0962d
Removed more references to an unfinished enhancement for polymorphic …
jongpie Jul 23, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 Jonathan Gillespie
Copyright (c) 2018 Jonathan Gillespie

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Nebula Framework for Salesforce Apex
[![Deploy to Salesforce](https://img.shields.io/badge/salesforce-deploy-blue.svg)](https://githubsfdeploy.herokuapp.com)
[![License: MIT](https://img.shields.io/badge/license-MIT-d742f4.svg)](https://opensource.org/licenses/MIT)
[![Travis CI](https://img.shields.io/travis/jongpie/NebulaFramework/master.svg)](https://travis-ci.org/jongpie/NebulaFramework)
[![Code Climate](https://img.shields.io/codeclimate/github/jongpie/NebulaFramework.svg)](https://codeclimate.com/github/jongpie/NebulaFramework)

<a href="https://githubsfdeploy.herokuapp.com" target="_blank">
<img alt="Deploy to Salesforce" src="https://raw.githubusercontent.com/afawcett/githubsfdeploy/master/deploy.png">
</a>

Nebula is a development framework for Salesforce's Apex language on the Force.com platform. It aims to...
1. Provide a foundation for Apex development, with the flexibility to be easily adapted to meet your implementation needs
Expand All @@ -11,14 +12,14 @@ Nebula is a development framework for Salesforce's Apex language on the Force.co
4. Overcome some gaps in Apex and the Force.com platform

## Features
Nebula focusses on streamlining how you work with SObjects
1. **SObjectRepository.cls** - this module handles all DML actions & querying needs for an SObject, making the implementation of SObjects much easier & faster
* **QueryBuilder.cls** powers Nebula's querying, allowing you to dynamically build reusable SOQL & SOSL queries
* **SObjectRepositoryMock.cls** can be used in unit tests for test-driven development (TDD) & to drastically reduce the time of your unit tests.
2. **SObjectTriggerHandler.cls** - this module provides a trigger framework to handle all trigger contexts provided by Salesforce, along with additional features like recursion prevention
Nebula focusses on streamlining how you work with Sobjects
1. **SobjectTriggerHandler.cls** - provides a trigger framework to handle all trigger contexts provided by Salesforce, along with additional features like recursion prevention
2. **SobjectRepository.cls** - handles all DML actions & querying needs for an Sobject, making the implementation of Sobjects much easier & faster
* **Soql.cls and Sosl.cls** powers Nebula's querying & searching, allowing you to dynamically build reusable SOQL & SOSL queries
* **SobjectRepositoryMock.cls** can be used in unit tests for test-driven development (TDD) & to drastically reduce the time of your unit tests.

The framework also provides several additional classes to make development easier
1. **SObjectRecordTypes.cls** - record types are an important feature of the Force.com platform. Unfortunately, Apex has limitations with handling them - record types have a field called DeveloperName that (you guessed it!) should be used by developers... but native Apex describe methods cannot access this field. Nebula tries to overcome this by providing cacheable query results of record types so you can access the DeveloperName.
1. **SobjectRecordTypes.cls** - record types are an important feature of the Force.com platform. Unfortunately, Apex has limitations with handling them - record types have a field called DeveloperName that (you guessed it!) should be used by developers... but native Apex describe methods cannot access this field. Nebula tries to overcome this by providing cacheable query results of record types so you can access the DeveloperName.
2. **Logger.cls** - a flexible logging solution for Apex, leveraged by the framework itself
3. **Environment.cls** - provides information about the current Salesforce environment
4. **UUID.cls** - used to reate a randomly-generated unique ID in your code, using the Universally Unique Identifier (UUID) standard
Expand All @@ -34,7 +35,7 @@ Nebula also leverages custom settings to give you control over how the framework
* Select if you want to include managed record types
3. **Repository Settings (API Name: NebulaRepositorySettings__c)**
* Automatically include common fields in your queries, like record ID, audit fields (CreatedById, CreatedDate, etc), Name field (or Subject field, where applicable) and more
4. **Trigger Handler Settings (API Name: NebulaTriggerHandlerSettings__c)**
4. **Trigger Handler Settings (API Name: NebulaTriggerHandlerSettings__c)**
* Easily disable all triggers & handlers (great for data migration and other admin tasks),
* Enable or disable recursion prevention

Expand Down
7 changes: 0 additions & 7 deletions src/applications/Nebula.app

This file was deleted.

26 changes: 26 additions & 0 deletions src/aura/logger/logger.cmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<aura:component controller="Logger">

<!-- Private Attributes -->
<aura:attribute name="logEntries" type="LightningLogEntry[]" access="private" />

<!-- Public Functions -->
<aura:method name="addDebugEntry" action="{!c.addDebugEntry}">
<aura:attribute name="component" type="Object" required="true" />
<aura:attribute name="loggingLevelName" type="String" />
<aura:attribute name="message" type="String" />
<aura:attribute name="originLocation" type="String" required="true" />
<aura:attribute name="topics" type="String[]" />
<aura:attribute name="callback" type="function" />
</aura:method>

<aura:method name="addExceptionEntry" action="{!c.addExceptionEntry}">
<aura:attribute name="component" type="Object" required="true" />
<aura:attribute name="error" type="Error" />
<aura:attribute name="originLocation" type="String" required="true" />
<aura:attribute name="topics" type="String[]" />
<aura:attribute name="callback" type="function" />
</aura:method>

<aura:method name="save" action="{!c.save}" />

</aura:component>
5 changes: 5 additions & 0 deletions src/aura/logger/logger.cmp-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>43.0</apiVersion>
<description>Logger for Lightning</description>
</AuraDefinitionBundle>
11 changes: 11 additions & 0 deletions src/aura/logger/loggerController.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
({
addDebugEntry : function(component, event, helper) {
helper.addEntry(component, event);
},
addExceptionEntry : function(component, event, helper) {
helper.addEntry(component, event);
},
save : function(component, event, helper) {
helper.save(component, event);
}
})
51 changes: 51 additions & 0 deletions src/aura/logger/loggerHelper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
({
addEntry : function(component, event) {
var timestamp = new Date().toISOString();

var logEntries = component.get('v.logEntries');
if(logEntries == undefined || logEntries == null) logEntries = [];
var args = event.getParam('arguments');

var error;
if(args.error && args.error.message) {
error = {
columnNumber: args.error.columnNumber,
lineNumber: args.error.lineNumber,
message: args.error.message,
stack: args.error.stack
};
}

var logEntry = {
componentName: args.component.getName(),
message: args.message,
error: error,
loggingLevelName: args.loggingLevelName,
originLocation: args.originLocation,
topics: args.topics,
timestamp: timestamp
};
console.log('New Log Entry Added');
console.log(logEntry);
logEntries.push(logEntry);
component.set('v.logEntries', logEntries);
},
save : function(component, event) {
var logEntries = component.get('v.logEntries');

if(logEntries.size == 0) return;

var action = component.get('c.saveLightningEntries');
action.setParams({
logEntriesJson : JSON.stringify(logEntries)
});
action.setCallback(this, function(response) {
if(response.getState() === 'SUCCESS') {
component.set('v.logEntries', []);
} else if(response.getState() === 'ERROR') {
// TODO this.processCallbackErrors(response);
}
});
$A.enqueueAction(action);
}
})
Loading