Jaya
5/22/2015 - 8:33 PM

00 - Salesforce Snippets: Comment Headers.md

/* Inline Comment Decorators (100 / 80 Column Max) - Created by Vivek.M.Chawla@gmail.com */
//─────────────────────────────────────────────────────────────────────────────────────────────────┐
// 100 chars
//─────────────────────────────────────────────────────────────────────────────────────────────────┘
  //───────────────────────────────────────────────────────────────────────────────────────────────┐
  // 98 chars
  //───────────────────────────────────────────────────────────────────────────────────────────────┘
    //─────────────────────────────────────────────────────────────────────────────────────────────┐
    // 96 chars
    //─────────────────────────────────────────────────────────────────────────────────────────────┘
      //───────────────────────────────────────────────────────────────────────────────────────────┐
      // 94 chars
      //───────────────────────────────────────────────────────────────────────────────────────────┘
        //─────────────────────────────────────────────────────────────────────────────────────────┐
        // 92 chars
        //─────────────────────────────────────────────────────────────────────────────────────────┘
          //───────────────────────────────────────────────────────────────────────────────────────┐
          // 90 chars
          //───────────────────────────────────────────────────────────────────────────────────────┘
            //─────────────────────────────────────────────────────────────────────────────────────┐
            // 88 chars
            //─────────────────────────────────────────────────────────────────────────────────────┘
//─────────────────────────────────────────────────────────────────────────────┐
// 80 chars
//─────────────────────────────────────────────────────────────────────────────┘
  //───────────────────────────────────────────────────────────────────────────┐
  // 78 chars
  //───────────────────────────────────────────────────────────────────────────┘
    //─────────────────────────────────────────────────────────────────────────┐
    // 76 chars
    //─────────────────────────────────────────────────────────────────────────┘
      //───────────────────────────────────────────────────────────────────────┐
      // 74 chars
      //───────────────────────────────────────────────────────────────────────┘
        //─────────────────────────────────────────────────────────────────────┐
        // 72 chars
        //─────────────────────────────────────────────────────────────────────┘
          //───────────────────────────────────────────────────────────────────┐
          // 70 chars
          //───────────────────────────────────────────────────────────────────┘
            //─────────────────────────────────────────────────────────────────┐
            // 68 chars
            //─────────────────────────────────────────────────────────────────┘
  /**
  * ───────────────────────────────────────────────────────────────────────────────────────────────┐
  * Write a single, summary sentence for this test method.
  *
  * Write additional general information about this test method. Describe the functionality that
  * this method is designed to test, including both positive and negative test cases.
  *
  * While writing this comment, use as many lines as necessary, but keep each line within the 100
  * character wide box defined by the top ───┐ and bottom ───┘ brackets.
  * ────────────────────────────────────────────────────────────────────────────────────────────────
  * Test Method Naming Conventions:
  * 
  * All methods marked by the @testMethod annotation should be named in a manner that describes the
  * functional test logic being implemented by using the following pattern:
  *
  *   MethodName_StateUnderTest_ExpectedBehavior
  * 
  * Examples: enrollStudent_InvalidData_ExceptionThrown(), addFollower_ValidData_Success()
  * ────────────────────────────────────────────────────────────────────────────────────────────────
  * FUNCTIONAL TEST LOGIC
  * ────────────────────────────────────────────────────────────────────────────────────────────────
  * 
  * PLEASE FOLLOW THIS LAYOUT EXAMPLE:
  *
  * 1. Step one.
  *    A. Sub-step 1-A
  *    B. Sub-step 1-B
  *       > Additional details within sub-step 1-B
  * 2. Step two.
  *    A. Sub-step 2-A
  *       > Additional details within sub-step 2-A
  *       > ... (process / steps repeat)
  *       > Final detail within sub-step 2-A
  * N. Steps continue until functional logic explanation is complete.
  * ───────────────────────────────────────────────────────────────────────────────────────────────┘
  */


  /**
  * ───────────────────────────────────────────────────────────────────────────────────────────────┐
  * If you can't use the ideal template above, just write a quick summary of what is being tested.
  * Use the same naming conventions detailed in the example above.
  * ───────────────────────────────────────────────────────────────────────────────────────────────┘
  */
    /**
    * ─────────────────────────────────────────────────────────────────────────────────────────────┐
    * One or two sentence description of this Inner Method.
    * ──────────────────────────────────────────────────────────────────────────────────────────────
    * @param    NAME    DESCRIPTION (MENTION PARAMETER TYPE IN DESCRIPTION)
    * @param    NAME    DESCRIPTION (MENTION PARAMETER TYPE IN DESCRIPTION)
    * @return   TYPE    DESCRIPTION (MENTION LIKELY VALUES IN DESCRIPTION)
    * ─────────────────────────────────────────────────────────────────────────────────────────────┘
    */
  /**
  * ───────────────────────────────────────────────────────────────────────────────────────────────┐
  * One or two sentence description of this Outer Method.
  * ────────────────────────────────────────────────────────────────────────────────────────────────
  * @param    NAME    DESCRIPTION (MENTION PARAMETER TYPE IN DESCRIPTION)
  * @param    NAME    DESCRIPTION (MENTION PARAMETER TYPE IN DESCRIPTION)
  * @return   TYPE    DESCRIPTION (MENTION LIKELY VALUES IN DESCRIPTION)
  * ───────────────────────────────────────────────────────────────────────────────────────────────┘
  */
<!--
* ─────────────────────────────────────────────────────────────────────────────────────────────────┐
* One or two sentence summary of this page or component.
*
* Additional information about this page or component should be added here, if available. Add a 
* single line break between the summary and the additional info.  Use as many lines as necessary.
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @author       Vivek M. Chawla   <Vivek_Chawla@Intuit.com>
* @modifiedby   Vivek M. Chawla   <Vivek_Chawla@Intuit.com>
* @ownedby      Vivek M. Chawla   <Vivek_Chawla@Intuit.com>
* @version      1.0
* @created      YYYY-MM-DD
* @modified     YYYY-MM-DD
* @systemlayer  Entrypoint
* @controller   None | Standard | MyCustomController.cls
* @controllerex None | MyControllerExtension.cls
* @see          ????
* @see          ????
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @changes
* vX.X          Vivek_Chawla@Intuit.com
* YYYY-MM-DD    Explanation of the change.  Multiple lines can be used to explain the change, but
*               each line should be indented till left aligned with the previous description text.
*
* vX.X          Vivek_Chawla@Intuit.com
* YYYY-MM-DD    Explanation of the change.  Multiple lines can be used to explain the change, but
*               each line should be indented till left aligned with the previous description text.
* ─────────────────────────────────────────────────────────────────────────────────────────────────┘
-->
/**
* ─────────────────────────────────────────────────────────────────────────────────────────────────┐
* Apex REST class designed to [Insert Summary Description Here].
*
* [Additional information about this class should be added here, if available. Add a single line
* break between the summary and the additional info.  Use as many lines as necessary. Make sure to
* leave a line break between the class description and the URL Mapping, below.]
*
* URL Mapping: [Insert URL Mapping Here]
*
* HTTP Verbs Handled:
*
*   POST    -   [Insert Functional Description Here]
*   GET     -   [Insert Functional Description Here]
*   PUT     -   [Insert Functional Description Here]
*   DELETE  -   [Insert Functional Description Here]
*   PATCH   -   [Insert Functional Description Here]
*
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @author       Vivek M. Chawla   <Vivek_Chawla@Intuit.com>
* @modifiedby   Vivek M. Chawla   <Vivek_Chawla@Intuit.com>
* @ownedby      Vivek M. Chawla   <Vivek_Chawla@Intuit.com>
* @version      1.0
* @created      YYYY-MM-DD
* @modified     YYYY-MM-DD
* @systemlayer  Invocation
* @see          ????
* @see          ????
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @changes
* vX.X          Vivek_Chawla@Intuit.com
* YYYY-MM-DD    Explanation of the change.  Multiple lines can be used to explain the change, but
*               each line should be indented till left aligned with the previous description text.
*
* vX.X          Vivek_Chawla@Intuit.com
* YYYY-MM-DD    Explanation of the change.  Multiple lines can be used to explain the change, but
*               each line should be indented till left aligned with the previous description text.
* ─────────────────────────────────────────────────────────────────────────────────────────────────┘
*/
/**
* ─────────────────────────────────────────────────────────────────────────────────────────────────┐
* One or two sentence summary of this class.
*
* Additional information about this class should be added here, if available. Add a single line
* break between the summary and the additional info.  Use as many lines as necessary.
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @author       Vivek M. Chawla   <Vivek_Chawla@Intuit.com>
* @modifiedby   Vivek M. Chawla   <Vivek_Chawla@Intuit.com>
* @ownedby      Vivek M. Chawla   <Vivek_Chawla@Intuit.com>
* @version      1.0
* @created      YYYY-MM-DD
* @modified     YYYY-MM-DD
* @systemlayer  Invocation | Service | Utility | Selector | Domain | Test
* @see          ????
* @see          ????
* ──────────────────────────────────────────────────────────────────────────────────────────────────
* @changes
* vX.X          Vivek_Chawla@Intuit.com
* YYYY-MM-DD    Explanation of the change.  Multiple lines can be used to explain the change, but
*               each line should be indented till left aligned with the previous description text.
*
* vX.X          Vivek_Chawla@Intuit.com
* YYYY-MM-DD    Explanation of the change.  Multiple lines can be used to explain the change, but
*               each line should be indented till left aligned with the previous description text.
* ─────────────────────────────────────────────────────────────────────────────────────────────────┘
*/

This gist contains multiple files. Each file contains a specific type of Apex or Visualforce comment header.

When code is no longer used, but can not be deleted from your org, add the @deprecated annotation to the File or Method Header.