Skip to content

A command line tool to generate Apex templates based on the Apex Enterprise Patterns (FFLIB)

License

Notifications You must be signed in to change notification settings

wimvelzeboer/fflib-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fflib-templates

A command line tool to generate Apex templates based on the Apex Enterprise Patterns (FFLIB)

Table of content:

Installation

Linux /

wget -O ~/.local/bin/sft https://github.com/wimvelzeboer/fflib-templates/releases/download/v0.1.2/sft
chmod +x ~/.local/bin/sft

Mac Os /

wget -O /usr/local/bin/sft https://github.com/wimvelzeboer/fflib-templates/releases/download/v0.1.2/sft-macos
chmod +x /usr/local/bin/sft

Windows

https://github.com/wimvelzeboer/fflib-templates/releases/download/v0.1.2/sft.exe

Download the file to a folder that is either added in the PATH or add the folder to it.

How to generate templates

Generating a domain class

Usage:

sft create domain [OPTIONS] --name <DOMAIN_NAME> --type <SOBJECTTYPE>

Options:

-a, --api <API_VERSION> Sets the api version, defaults to: 62.0

-n, --name <DOMAIN_NAME> Sets the base name of the domain (append it with '.class' for DTOs)

-t, --type Sets the (S)ObjectType

-s, --suffix Sets an optional suffix for the class name

-p, --prefix Sets an optional prefix for the class name

-h, --help Print help

Example:

sft create domain --name Accounts --type Account

This creates the following files:

Generating a Selector class

Usage:

sft create selector [OPTIONS] --name <DOMAIN_NAME> --type <SOBJECTTYPE>

Options:

-a, --api <API_VERSION> Sets the api version, defaults to: 62.0

-n, --name <DOMAIN_NAME> Sets the base name of the domain (append it with '.class' for DTOs)

-t, --type Sets the (S)ObjectType

-s, --suffix Sets an optional suffix for the class name

-p, --prefix Sets an optional prefix for the class name

-h, --help Print help

Example:

sft create selector --name Accounts --type Account

This creates the following files:

Generating a Service class

Usage:

sft create service [OPTIONS] --name <DOMAIN_NAME> --type <SOBJECTTYPE>

Options:

-a, --api <API_VERSION> Sets the api version, defaults to: 62.0

-n, --name <DOMAIN_NAME> Sets the base name of the domain (append it with '.class' for DTOs)

-t, --type Sets the (S)ObjectType

-s, --suffix Sets an optional suffix for the class name

-p, --prefix Sets an optional prefix for the class name

-h, --help Print help

Example:

sft create service --name Accounts --type Account

This creates the following files:

Generating a Domain, Selector and Service class

Usage:

sft create base [OPTIONS] --name <DOMAIN_NAME> --type <SOBJECTTYPE>

Options:

-a, --api <API_VERSION> Sets the api version, defaults to: 62.0

-n, --name <DOMAIN_NAME> Sets the base name of the domain (append it with '.class' for DTOs)

-t, --type Sets the (S)ObjectType

-s, --suffix Sets an optional suffix for the class name

-p, --prefix Sets an optional prefix for the class name

-h, --help Print help

Example:

sft create base --name Accounts --type Account

About

A command line tool to generate Apex templates based on the Apex Enterprise Patterns (FFLIB)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages