From d7b990159abbc9cbf46da7d50b859705045d68e0 Mon Sep 17 00:00:00 2001 From: Ralph Callaway Date: Mon, 4 May 2015 08:10:58 -0600 Subject: [PATCH] sync up metadata templates with current remote source so that things work when there are errors retrieving from remote source --- .../ApexClass/ApexClass.cls | 0 .../ApexClass/ApexClassNoConstructor.cls | 0 .../metadata-templates/ApexClass/ApexRest.cls | 23 -- .../ApexClass/BDDUnitTestApexClass.cls | 16 + .../ApexClass/BatchApexClass.cls | 0 .../ApexClass/ControllerExtension.cls | 0 .../ApexClass/DomainClass.cls | 57 +++ .../ApexClass/EmailServiceApexClass.cls | 0 .../ApexClass/ExceptionApexClass.cls | 0 .../ApexClass/HttpCalloutMock.cls | 28 ++ .../ApexClass/SchedulableApexClass.cls | 0 .../ApexClass/SelectorClass.cls | 50 +++ .../ApexClass/ServiceClass.cls | 21 ++ .../ApexClass/TriggerHandler.cls | 84 +++++ .../ApexClass/UnitTestApexClass.cls | 0 .../ApexClass/UrlRewriterApexClass.cls | 0 .../ApexClass/WebServiceMock.cls | 19 + .../ApexClass/WebserviceClass.cls | 0 .../ApexComponent/ApexComponent.component | 0 .../metadata-templates/ApexPage/ApexPage.page | 0 .../ApexPage/HeaderPageBlock.page | 11 + .../ApexTrigger/ApexTrigger.trigger | 0 .../ApexTrigger/ApexTriggerAllEvents.trigger | 17 + .../ApexTrigger/ApexTriggerBulk.trigger | 2 +- .../ApexTrigger/DomainTrigger.trigger | 19 + lib/apex/metadata-templates/package.json | 332 +++++++++++++++--- 26 files changed, 615 insertions(+), 64 deletions(-) mode change 100644 => 100755 lib/apex/metadata-templates/ApexClass/ApexClass.cls mode change 100644 => 100755 lib/apex/metadata-templates/ApexClass/ApexClassNoConstructor.cls delete mode 100644 lib/apex/metadata-templates/ApexClass/ApexRest.cls create mode 100755 lib/apex/metadata-templates/ApexClass/BDDUnitTestApexClass.cls mode change 100644 => 100755 lib/apex/metadata-templates/ApexClass/BatchApexClass.cls mode change 100644 => 100755 lib/apex/metadata-templates/ApexClass/ControllerExtension.cls create mode 100755 lib/apex/metadata-templates/ApexClass/DomainClass.cls mode change 100644 => 100755 lib/apex/metadata-templates/ApexClass/EmailServiceApexClass.cls mode change 100644 => 100755 lib/apex/metadata-templates/ApexClass/ExceptionApexClass.cls create mode 100755 lib/apex/metadata-templates/ApexClass/HttpCalloutMock.cls mode change 100644 => 100755 lib/apex/metadata-templates/ApexClass/SchedulableApexClass.cls create mode 100755 lib/apex/metadata-templates/ApexClass/SelectorClass.cls create mode 100755 lib/apex/metadata-templates/ApexClass/ServiceClass.cls create mode 100755 lib/apex/metadata-templates/ApexClass/TriggerHandler.cls mode change 100644 => 100755 lib/apex/metadata-templates/ApexClass/UnitTestApexClass.cls mode change 100644 => 100755 lib/apex/metadata-templates/ApexClass/UrlRewriterApexClass.cls create mode 100755 lib/apex/metadata-templates/ApexClass/WebServiceMock.cls mode change 100644 => 100755 lib/apex/metadata-templates/ApexClass/WebserviceClass.cls mode change 100644 => 100755 lib/apex/metadata-templates/ApexComponent/ApexComponent.component mode change 100644 => 100755 lib/apex/metadata-templates/ApexPage/ApexPage.page create mode 100755 lib/apex/metadata-templates/ApexPage/HeaderPageBlock.page mode change 100644 => 100755 lib/apex/metadata-templates/ApexTrigger/ApexTrigger.trigger create mode 100755 lib/apex/metadata-templates/ApexTrigger/ApexTriggerAllEvents.trigger mode change 100644 => 100755 lib/apex/metadata-templates/ApexTrigger/ApexTriggerBulk.trigger create mode 100755 lib/apex/metadata-templates/ApexTrigger/DomainTrigger.trigger mode change 100644 => 100755 lib/apex/metadata-templates/package.json diff --git a/lib/apex/metadata-templates/ApexClass/ApexClass.cls b/lib/apex/metadata-templates/ApexClass/ApexClass.cls old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexClass/ApexClassNoConstructor.cls b/lib/apex/metadata-templates/ApexClass/ApexClassNoConstructor.cls old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexClass/ApexRest.cls b/lib/apex/metadata-templates/ApexClass/ApexRest.cls deleted file mode 100644 index 66d7889..0000000 --- a/lib/apex/metadata-templates/ApexClass/ApexRest.cls +++ /dev/null @@ -1,23 +0,0 @@ -@RestResource(urlMapping='/YourCustomResource') -global with sharing class {{ api_name }} { - - @HttpPost - global static void doPost(){ - - } - - @HttpPut - global static void doPut(){ - - } - - @HttpGet - global static void doGet(){ - - } - - @HttpDelete - global static void doDelete(){ - - } -} \ No newline at end of file diff --git a/lib/apex/metadata-templates/ApexClass/BDDUnitTestApexClass.cls b/lib/apex/metadata-templates/ApexClass/BDDUnitTestApexClass.cls new file mode 100755 index 0000000..aa38436 --- /dev/null +++ b/lib/apex/metadata-templates/ApexClass/BDDUnitTestApexClass.cls @@ -0,0 +1,16 @@ +@isTest +private class {{ api_name }} +{ + @isTest + static void itShould() + { + // Given + + + // When + + + // Then + + } +} \ No newline at end of file diff --git a/lib/apex/metadata-templates/ApexClass/BatchApexClass.cls b/lib/apex/metadata-templates/ApexClass/BatchApexClass.cls old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexClass/ControllerExtension.cls b/lib/apex/metadata-templates/ApexClass/ControllerExtension.cls old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexClass/DomainClass.cls b/lib/apex/metadata-templates/ApexClass/DomainClass.cls new file mode 100755 index 0000000..44fa304 --- /dev/null +++ b/lib/apex/metadata-templates/ApexClass/DomainClass.cls @@ -0,0 +1,57 @@ +/** + * See https://github.com/financialforcedev/fflib-apex-common for more info + * + * Install library via + * https://githubsfdeploy.herokuapp.com/app/githubdeploy/financialforcedev/fflib-apex-common + */ + +/** + * Encapsulates all behaviour logic relating to the {{ object_name }} object + * + * For more guidelines and details see + * https://developer.salesforce.com/page/Apex_Enterprise_Patterns_-_Domain_Layer + * + **/ +public class {{ api_name }} extends fflib_SObjectDomain +{ + public {{ api_name }}(List<{{ object_name }}> records) + { + super(records); + } + + public override void onValidate() + { + for({{ object_name }} record : (List<{{ object_name }}>) Records) + { + } + } + + public override void onValidate(Map existingRecords) + { + for({{ object_name }} record : (List<{{ object_name }}>) Records) + { + } + } + + public override void onBeforeInsert() + { + for({{ object_name }} record : (List<{{ object_name }}>) Records) + { + } + } + + public void someMethod() + { + for({{ object_name }} record : (List<{{ object_name }}>) Records) + { + } + } + + public class Constructor implements fflib_SObjectDomain.IConstructable + { + public fflib_SObjectDomain construct(List sObjectList) + { + return new {{ api_name }}(sObjectList); + } + } +} \ No newline at end of file diff --git a/lib/apex/metadata-templates/ApexClass/EmailServiceApexClass.cls b/lib/apex/metadata-templates/ApexClass/EmailServiceApexClass.cls old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexClass/ExceptionApexClass.cls b/lib/apex/metadata-templates/ApexClass/ExceptionApexClass.cls old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexClass/HttpCalloutMock.cls b/lib/apex/metadata-templates/ApexClass/HttpCalloutMock.cls new file mode 100755 index 0000000..3b9761c --- /dev/null +++ b/lib/apex/metadata-templates/ApexClass/HttpCalloutMock.cls @@ -0,0 +1,28 @@ +@isTest +public class {{ api_name }} implements HttpCalloutMock { + + protected Integer code; + protected String status; + protected String body; + protected Map responseHeaders; + + public {{ api_name }}(Integer code, String status, String body, Map responseHeaders) { + this.code = code; + this.status = status; + this.body = body; + this.responseHeaders = responseHeaders; + } + + public HTTPResponse respond(HTTPRequest req) { + //System.assertEquals('http://api.salesforce.com/foo/bar', req.getEndpoint()); + //System.assertEquals('GET', req.getMethod()); + + // Create a fake response + HttpResponse res = new HttpResponse(); + res.setHeader('Content-Type', 'application/json'); + res.setBody('{"foo":"bar"}'); + res.setStatusCode(200); + return res; + } + +} \ No newline at end of file diff --git a/lib/apex/metadata-templates/ApexClass/SchedulableApexClass.cls b/lib/apex/metadata-templates/ApexClass/SchedulableApexClass.cls old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexClass/SelectorClass.cls b/lib/apex/metadata-templates/ApexClass/SelectorClass.cls new file mode 100755 index 0000000..e2df8e3 --- /dev/null +++ b/lib/apex/metadata-templates/ApexClass/SelectorClass.cls @@ -0,0 +1,50 @@ +/** + * See https://github.com/financialforcedev/fflib-apex-common for more info + * + * Install library via + * https://githubsfdeploy.herokuapp.com/app/githubdeploy/financialforcedev/fflib-apex-common + */ + +/** + * Class encapsulates query logic for {{ object_name }} + * + * https://developer.salesforce.com/page/Apex_Enterprise_Patterns_-_Selector_Layer + **/ +public class {{ api_name }} extends fflib_SObjectSelector +{ + public List getSObjectFieldList() + { + return new List { + {{ object_name }}.Id + }; + } + + public Schema.SObjectType getSObjectType() + { + return {{ object_name }}.sObjectType; + } + + public List<{{ object_name }}> selectById(Set idSet) + { + return (List<{{ object_name }}>) selectSObjectsById(idSet); + } + + /* + * For more examples see https://github.com/financialforcedev/fflib-apex-common-samplecode + * + public List<{{ object_name }}> selectBySomethingElse(List somethings) + { + assertIsAccessible(); + return (List<{{ object_name }}>) Database.query( + String.format( + 'select {0}, ' + + 'from {1} ' + + 'where Something__c in :somethings ' + + 'order by {2}', + new List { + getFieldListString(), + getSObjectName(), + getOrderBy() } ) ); + } + */ +} diff --git a/lib/apex/metadata-templates/ApexClass/ServiceClass.cls b/lib/apex/metadata-templates/ApexClass/ServiceClass.cls new file mode 100755 index 0000000..86b54e1 --- /dev/null +++ b/lib/apex/metadata-templates/ApexClass/ServiceClass.cls @@ -0,0 +1,21 @@ +/** + * See https://github.com/financialforcedev/fflib-apex-common for more info + * + * Install library via + * https://githubsfdeploy.herokuapp.com/app/githubdeploy/financialforcedev/fflib-apex-common + */ + +/** + * Encapsulates all service layer logic for a given function or module in the application + * + * For more guidelines and details see + * https://developer.salesforce.com/page/Apex_Enterprise_Patterns_-_Service_Layer + * + **/ +public class {{ api_name }} +{ + public static void doSomething() + { + + } +} \ No newline at end of file diff --git a/lib/apex/metadata-templates/ApexClass/TriggerHandler.cls b/lib/apex/metadata-templates/ApexClass/TriggerHandler.cls new file mode 100755 index 0000000..0c5121b --- /dev/null +++ b/lib/apex/metadata-templates/ApexClass/TriggerHandler.cls @@ -0,0 +1,84 @@ +public class {{ api_name }} +{ + /** + * Enum representing each of before/after CRUD events on Sobjects + */ + public enum Evt + { + afterdelete, afterinsert, afterundelete, + afterupdate, beforedelete, beforeinsert, beforeupdate + } + + /* + * Simplistic handler to implement on any of the event. It doesn't require or enforces any pattern except the + * method name to be "handle()". + */ + public interface HandlerInterface + { + void handle(); + } + + // Internal mapping of handlers + Map> eventHandlerMapping = new Map>(); + + /** + * Core API to bind handlers with events + */ + public {{ api_name }} bind(Evt event, HandlerInterface eh) + { + List handlers = eventHandlerMapping.get(event.name()); + if (handlers == null) + { + handlers = new List(); + eventHandlerMapping.put(event.name(), handlers); + } + handlers.add(eh); + return this; + } + + /** + * Invokes correct handlers as per the context of Trigger and available registered handlers + */ + public void manage() + { + Evt ev = null; + if(Trigger.isInsert && Trigger.isBefore) + { + ev = Evt.beforeinsert; + } + else if(Trigger.isInsert && Trigger.isAfter) + { + ev = Evt.afterinsert; + } + else if(Trigger.isUpdate && Trigger.isBefore) + { + ev = Evt.beforeupdate; + } + else if(Trigger.isUpdate && Trigger.isAfter) + { + ev = Evt.afterupdate; + } + else if(Trigger.isDelete && Trigger.isBefore) + { + ev = Evt.beforedelete; + } + else if(Trigger.isDelete && Trigger.isAfter) + { + ev = Evt.afterdelete; + } + else if(Trigger.isundelete) + { + ev = Evt.afterundelete; + } + + List handlers = eventHandlerMapping.get(ev.name()); + + if (handlers != null && ! handlers.isEmpty()) + { + for (HandlerInterface h : handlers) + { + h.handle(); + } + } + } +} \ No newline at end of file diff --git a/lib/apex/metadata-templates/ApexClass/UnitTestApexClass.cls b/lib/apex/metadata-templates/ApexClass/UnitTestApexClass.cls old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexClass/UrlRewriterApexClass.cls b/lib/apex/metadata-templates/ApexClass/UrlRewriterApexClass.cls old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexClass/WebServiceMock.cls b/lib/apex/metadata-templates/ApexClass/WebServiceMock.cls new file mode 100755 index 0000000..1edf81f --- /dev/null +++ b/lib/apex/metadata-templates/ApexClass/WebServiceMock.cls @@ -0,0 +1,19 @@ +@isTest +public class {{ api_name }} implements WebServiceMock { + public void doInvoke( + Object stub, + Object request, + Map response, + String endpoint, + String soapAction, + String requestName, + String responseNS, + String responseName, + String responseType) { + + // Create response element from the autogenerated class. + // Populate response element. + // Add response element to the response parameter, as follows: + //response.put('response_x', responseElement); + } +} \ No newline at end of file diff --git a/lib/apex/metadata-templates/ApexClass/WebserviceClass.cls b/lib/apex/metadata-templates/ApexClass/WebserviceClass.cls old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexComponent/ApexComponent.component b/lib/apex/metadata-templates/ApexComponent/ApexComponent.component old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexPage/ApexPage.page b/lib/apex/metadata-templates/ApexPage/ApexPage.page old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexPage/HeaderPageBlock.page b/lib/apex/metadata-templates/ApexPage/HeaderPageBlock.page new file mode 100755 index 0000000..8efa57a --- /dev/null +++ b/lib/apex/metadata-templates/ApexPage/HeaderPageBlock.page @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/lib/apex/metadata-templates/ApexTrigger/ApexTrigger.trigger b/lib/apex/metadata-templates/ApexTrigger/ApexTrigger.trigger old mode 100644 new mode 100755 diff --git a/lib/apex/metadata-templates/ApexTrigger/ApexTriggerAllEvents.trigger b/lib/apex/metadata-templates/ApexTrigger/ApexTriggerAllEvents.trigger new file mode 100755 index 0000000..7f5ea22 --- /dev/null +++ b/lib/apex/metadata-templates/ApexTrigger/ApexTriggerAllEvents.trigger @@ -0,0 +1,17 @@ +trigger {{ api_name }} on {{ object_name }} ( + before insert, + before update, + before delete, + after insert, + after update, + after delete, + after undelete) { + + if (Trigger.isBefore) { + //call your handler.before method + + } else if (Trigger.isAfter) { + //call handler.after method + + } +} diff --git a/lib/apex/metadata-templates/ApexTrigger/ApexTriggerBulk.trigger b/lib/apex/metadata-templates/ApexTrigger/ApexTriggerBulk.trigger old mode 100644 new mode 100755 index a7c53cc..8e34b80 --- a/lib/apex/metadata-templates/ApexTrigger/ApexTriggerBulk.trigger +++ b/lib/apex/metadata-templates/ApexTrigger/ApexTriggerBulk.trigger @@ -1,6 +1,6 @@ trigger {{ api_name }} on {{ object_name }} (before insert, before update, before delete, after insert, after update, after delete, after undelete) { - for( {{ object_name }} so : Trigger.new) { + for ({{ object_name }} so : Trigger.new) { //friends remind friends to bulkify } diff --git a/lib/apex/metadata-templates/ApexTrigger/DomainTrigger.trigger b/lib/apex/metadata-templates/ApexTrigger/DomainTrigger.trigger new file mode 100755 index 0000000..efd54fd --- /dev/null +++ b/lib/apex/metadata-templates/ApexTrigger/DomainTrigger.trigger @@ -0,0 +1,19 @@ +/** + * See https://github.com/financialforcedev/fflib-apex-common for more info + * + * Install library via + * https://githubsfdeploy.herokuapp.com/app/githubdeploy/financialforcedev/fflib-apex-common + */ + +/** + * Boiler plate Apex Trigger to route events to the respective Domain class methods + * + * For more guidelines and details see + * https://developer.salesforce.com/page/Apex_Enterprise_Patterns_-_Domain_Layer + **/ +trigger {{ api_name }} on {{ object_name }} (after delete, after insert, after update, + before delete, before insert, before update) +{ + // Creates Domain class instance and calls appropriate methods + fflib_SObjectDomain.triggerHandler({{ api_name }}.class); +} \ No newline at end of file diff --git a/lib/apex/metadata-templates/package.json b/lib/apex/metadata-templates/package.json old mode 100644 new mode 100755 index 3c4ab36..1f1fe6a --- a/lib/apex/metadata-templates/package.json +++ b/lib/apex/metadata-templates/package.json @@ -2,99 +2,351 @@ "ApexClass" : [ { "name" : "Default", - "file_name" : "ApexClass.cls", + "file_name" : "ApexClass.cls", "description" : "The default template for an Apex Class", - "author" : "MavensMate" + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] + }, + { + "name" : "Batch", + "file_name" : "BatchApexClass.cls", + "description" : "Batch Apex Class", + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] + }, + { + "name" : "BDD Unit Test", + "file_name" : "BDDUnitTestApexClass.cls", + "description" : "Behaviour Driven Development Unit test class", + "author" : "Paul Hardaker @comic96", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyBDDClass" + } + ] }, { "name" : "Controller Extension", - "file_name" : "ControllerExtension.cls", + "file_name" : "ControllerExtension.cls", "description" : "Controller extension Apex Class", - "author" : "David Schach @dschach" + "author" : "David Schach @dschach", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] }, { - "name" : "No Constructor", - "file_name" : "ApexClassNoConstructor.cls", - "description" : "The default template for an Apex Class", - "author" : "MavensMate" + "name" : "Custom Exception", + "file_name" : "ExceptionApexClass.cls", + "description" : "A custom exception class", + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] }, { - "name" : "Batch", - "file_name" : "BatchApexClass.cls", - "description" : "Batch Apex Class", - "author" : "MavensMate" + "name" : "DomainClass", + "file_name" : "DomainClass.cls", + "description" : "Apex Enterprise Patterns Domain Class", + "author" : "Andy Fawcett @andyinthecloud", + "params" : [ + { + "name" : "api_name", + "description" : "Domain class name (typically plural)", + "default" : "Invoices" + }, + { + "name" : "object_name", + "description" : "API name of the Standard or Custom Object", + "default" : "Invoice__c" + } + ] }, { "name" : "Email Service", - "file_name" : "EmailServiceApexClass.cls", + "file_name" : "EmailServiceApexClass.cls", "description" : "Template for an Apex Email Service", - "author" : "MavensMate" + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] }, { - "name" : "Custom Exception", - "file_name" : "ExceptionApexClass.cls", - "description" : "A custom exception class", - "author" : "MavensMate" + "name" : "HTTP Callout Mock", + "file_name" : "HttpCalloutMock.cls", + "description" : "Http callout mock class", + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] }, + { + "name" : "No Constructor", + "file_name" : "ApexClassNoConstructor.cls", + "description" : "The default template for an Apex Class", + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] + }, { "name" : "Schedulable", - "file_name" : "SchedulableApexClass.cls", + "file_name" : "SchedulableApexClass.cls", "description" : "A Schedulable class", - "author" : "MavensMate" + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] + }, + { + "name" : "SelectorClass", + "file_name" : "SelectorClass.cls", + "description" : "Apex Enterprise Patterns Selector Class", + "author" : "Andy Fawcett @andyinthecloud", + "params" : [ + { + "name" : "api_name", + "description" : "Selector class name (typically plural e.g. AccountsSelector)", + "default" : "InvoicesSelector" + }, + { + "name" : "object_name", + "description" : "API name of the Standard or Custom Object", + "default" : "Invoice__c" + } + ] + }, + { + "name" : "ServiceClass", + "file_name" : "ServiceClass.cls", + "description" : "Apex Enterprise Patterns Selector Class", + "author" : "Andy Fawcett @andyinthecloud", + "params" : [ + { + "name" : "api_name", + "description" : "Service class name (e.g. InvoiceService)", + "default" : "InvoiceService" + } + ] + }, + { + "name" : "Trigger Handler", + "file_name" : "TriggerHandler.cls", + "description" : "An Interface that handles Trigger actions", + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] }, { "name" : "Unit Test", - "file_name" : "UnitTestApexClass.cls", + "file_name" : "UnitTestApexClass.cls", "description" : "Unit test class", - "author" : "MavensMate" + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] }, { "name" : "URL Rewriter", - "file_name" : "UrlRewriterApexClass.cls", + "file_name" : "UrlRewriterApexClass.cls", "description" : "URL Rewriter class", - "author" : "MavensMate" + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] }, { "name" : "Web Service", - "file_name" : "WebserviceClass.cls", + "file_name" : "WebserviceClass.cls", "description" : "Web service class", - "author" : "MavensMate" + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] }, { - "name" : "Apex Rest Resource", - "file_name" : "ApexRest.cls", - "description" : "Template for custom Apex REST endpoints", - "author" : "Chris Bland @ChrisBland" + "name" : "Web Service Mock", + "file_name" : "WebServiceMock.cls", + "description" : "Web service mock class", + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Class API Name", + "default" : "MyApexClass" + } + ] } ], "ApexComponent" : [ { "name" : "Visualforce Component", - "file_name" : "ApexComponent.component", + "file_name" : "ApexComponent.component", "description" : "Basic Visualforce Component template", - "author" : "MavensMate" + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Visualforce Component API Name", + "default" : "MyVisualforceComponent" + } + ] } ], "ApexPage" : [ { "name" : "Visualforce Page", - "file_name" : "ApexPage.page", + "file_name" : "ApexPage.page", "description" : "Basic Visualforce Page template", - "author" : "MavensMate" + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Visualforce Page API Name", + "default" : "MyVisualforcePageName" + } + ] + }, + { + "name" : "Header and PageBlock", + "file_name" : "HeaderPageBlock.page", + "description" : "Visualforce Page with SectionHeader and PageBlock", + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Visualforce Page API Name", + "default" : "MyVisualforcePageName" + } + ] } ], "ApexTrigger" : [ { "name" : "Apex Trigger", - "file_name" : "ApexTrigger.trigger", + "file_name" : "ApexTrigger.trigger", "description" : "Basic Apex Trigger template", - "author" : "MavensMate" + "author" : "MavensMate", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Trigger API Name", + "default" : "MyCoolTrigger" + }, + { + "name" : "object_name", + "description" : "Object API Name", + "default" : "Account" + } + ] + }, + { + "name" : "Apex Trigger - All Events", + "file_name" : "ApexTriggerAllEvents.trigger", + "description" : "Apex Trigger with all Trigger events", + "author" : "@alexander-brett", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Trigger API Name", + "default" : "MyCoolTrigger" + }, + { + "name" : "object_name", + "description" : "Object API Name", + "default" : "Account" + } + ] }, { - "name" : "Bulkified Apex Trigger", - "file_name" : "ApexTriggerBulk.trigger", + "name" : "Apex Trigger - Bulkified", + "file_name" : "ApexTriggerBulk.trigger", "description" : "Bulk Apex Trigger with all Trigger events", - "author" : "David Schach @dschach" - } + "author" : "David Schach @dschach", + "params" : [ + { + "name" : "api_name", + "description" : "Apex Trigger API Name", + "default" : "MyCoolTrigger" + }, + { + "name" : "object_name", + "description" : "Object API Name", + "default" : "Account" + } + ] + }, + { + "name" : "DomainTrigger", + "file_name" : "DomainTrigger.trigger", + "description" : "Apex Enterprise Patterns Domain Trigger", + "author" : "Andy Fawcett @andyinthecloud", + "params" : [ + { + "name" : "api_name", + "description" : "Domain trigger name, must be same as Domain class name", + "default" : "Invoices" + }, + { + "name" : "object_name", + "description" : "API name of the Standard or Custom Object", + "default" : "Invoice__c" + } + ] + } ] } \ No newline at end of file