Skip to content

Commit 1521452

Browse files
committed
Fixing typo with CLI configuration name
1 parent 229883c commit 1521452

19 files changed

+922
-1
lines changed

examples/markdown/docs/index.md

Lines changed: 109 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,112 @@ Custom object for tracking sales orders.
2424

2525
### [Speaker__c](custom-objects/Speaker__c.md)
2626

27-
Represents a speaker at an event.
27+
Represents a speaker at an event.
28+
29+
## Miscellaneous
30+
31+
### [BaseClass](miscellaneous/BaseClass.md)
32+
33+
### [MultiInheritanceClass](miscellaneous/MultiInheritanceClass.md)
34+
35+
### [ParentInterface](miscellaneous/ParentInterface.md)
36+
37+
### [ReferencedEnum](miscellaneous/ReferencedEnum.md)
38+
39+
### [SampleException](miscellaneous/SampleException.md)
40+
41+
This is a sample exception.
42+
43+
### [SampleInterface](miscellaneous/SampleInterface.md)
44+
45+
This is a sample interface
46+
47+
### [Url](miscellaneous/Url.md)
48+
49+
Represents a uniform resource locator (URL) and provides access to parts of the URL.
50+
Enables access to the base URL used to access your Salesforce org.
51+
52+
## Usage
53+
Use the methods of the `System.URL` class to create links to objects in your organization. Such objects can be files, images,
54+
logos, or records that you want to include in external emails, in activities, or in Chatter posts. For example, you can create
55+
a link to a file uploaded as an attachment to a Chatter post by concatenating the Salesforce base URL with the file ID:
56+
57+
```apex
58+
// Get a file uploaded through Chatter.
59+
ContentDocument doc = [SELECT Id FROM ContentDocument
60+
WHERE Title = 'myfile'];
61+
// Create a link to the file.
62+
String fullFileURL = URL.getOrgDomainURL().toExternalForm() +
63+
'/' + doc.id;
64+
system.debug(fullFileURL);
65+
```
66+
67+
68+
The following example creates a link to a Salesforce record. The full URL is created by concatenating the Salesforce base
69+
URL with the record ID.
70+
71+
```ape
72+
Account acct = [SELECT Id FROM Account WHERE Name = 'Acme' LIMIT 1];
73+
String fullRecordURL = URL.getOrgDomainURL().toExternalForm() + '/' + acct.Id;
74+
```
75+
76+
77+
## Example
78+
In this example, the base URL and the full request URL of the current Salesforce server instance are retrieved. Next, a URL
79+
pointing to a specific account object is created. Finally, components of the base and full URL are obtained. This example
80+
prints out all the results to the debug log output.
81+
82+
```apex
83+
// Create a new account called Acme that we will create a link for later.
84+
Account myAccount = new Account(Name='Acme');
85+
insert myAccount;
86+
87+
// Get the base URL.
88+
String sfdcBaseURL = URL.getOrgDomainURL().toExternalForm();
89+
System.debug('Base URL: ' + sfdcBaseURL );
90+
91+
// Get the URL for the current request.
92+
String currentRequestURL = URL.getCurrentRequestUrl().toExternalForm();
93+
System.debug('Current request URL: ' + currentRequestURL);
94+
95+
// Create the account URL from the base URL.
96+
String accountURL = URL.getOrgDomainURL().toExternalForm() +
97+
'/' + myAccount.Id;
98+
System.debug('URL of a particular account: ' + accountURL);
99+
100+
// Get some parts of the base URL.
101+
System.debug('Host: ' + URL.getOrgDomainURL().getHost());
102+
System.debug('Protocol: ' + URL.getOrgDomainURL().getProtocol());
103+
104+
// Get the query string of the current request.
105+
System.debug('Query: ' + URL.getCurrentRequestUrl().getQuery());
106+
```
107+
108+
109+
## Version Behavior Changes
110+
In API version 41.0 and later, Apex URL objects are represented by the java.net.URI type, not the java.net.URL type.
111+
The API version in which the URL object was instantiated determines the behavior of subsequent method calls to the
112+
specific instance. Salesforce strongly encourages you to use API 41.0 and later versions for fully RFC-compliant URL
113+
parsing that includes proper handling of edge cases of complex URL structures. API 41.0 and later versions also enforce
114+
that inputs are valid, RFC-compliant URL or URI strings.
115+
116+
* [URL Constructors](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_url.htm#apex_System_URL_constructors)
117+
* [URL Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_url.htm#apex_System_URL_methods)
118+
119+
**See Also**
120+
* [URL Class](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_url.htm)
121+
122+
## Sample Enums
123+
124+
### [SampleEnum](sample-enums/SampleEnum.md)
125+
126+
This is a sample enum. This references [ReferencedEnum](miscellaneous/ReferencedEnum.md) .
127+
128+
This description has several lines
129+
130+
## SampleGroup
131+
132+
### [SampleClass](samplegroup/SampleClass.md)
133+
134+
aliquip ex sunt officia ullamco anim deserunt magna aliquip nisi eiusmod in sit officia veniam ex
135+
deserunt ea officia exercitation laboris enim in duis quis enim eiusmod eu amet cupidatat.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# BaseClass Class
2+
`abstract`
3+
4+
## Namespace
5+
ns
6+
7+
## Fields
8+
### `sampleEnumFromBase`
9+
10+
#### Signature
11+
```apex
12+
public sampleEnumFromBase
13+
```
14+
15+
#### Type
16+
[SampleEnum](../sample-enums/SampleEnum.md)
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# MultiInheritanceClass Class
2+
3+
## Namespace
4+
ns
5+
6+
**Inheritance**
7+
8+
[SampleClass](../samplegroup/SampleClass.md) < [BaseClass](BaseClass.md)
9+
10+
## Fields
11+
### `sampleEnumFromBase`
12+
13+
*Inherited*
14+
15+
#### Signature
16+
```apex
17+
public sampleEnumFromBase
18+
```
19+
20+
#### Type
21+
[SampleEnum](../sample-enums/SampleEnum.md)
22+
23+
## Properties
24+
### Group Name
25+
#### `someProperty`
26+
27+
*Inherited*
28+
29+
##### Signature
30+
```apex
31+
public someProperty
32+
```
33+
34+
##### Type
35+
String
36+
37+
## Methods
38+
### Available Methods
39+
#### `doSomething()`
40+
41+
*Inherited*
42+
43+
##### Signature
44+
```apex
45+
public void doSomething()
46+
```
47+
48+
##### Return Type
49+
**void**
50+
51+
### Deprecated Methods
52+
#### `sayHello()`
53+
54+
*Inherited*
55+
56+
`DEPRECATED`
57+
58+
This is a sample method.
59+
60+
##### Signature
61+
```apex
62+
public virtual String sayHello()
63+
```
64+
65+
##### Return Type
66+
**String**
67+
68+
A string value.
69+
70+
##### Example
71+
SampleClass sample &#x3D; new SampleClass();
72+
sample.doSomething();
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# ParentInterface Interface
2+
3+
## Namespace
4+
ns
5+
6+
## Methods
7+
### `sampleParentMethod()`
8+
9+
#### Signature
10+
```apex
11+
public void sampleParentMethod()
12+
```
13+
14+
#### Return Type
15+
**void**
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ReferencedEnum Enum
2+
3+
## Namespace
4+
ns
5+
6+
## Values
7+
| Value | Description |
8+
|-------|-------------|
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SampleException Class
2+
3+
This is a sample exception.
4+
5+
**Usage**
6+
7+
You can use the exception the following way.
8+
You can also take a look at [SampleClass](../samplegroup/SampleClass.md) to see how it is used.
9+
This is a dangerous HTML tag: &lt;script&gt;alert(&#x27;Hello&#x27;);&lt;/script&gt;
10+
11+
```apex
12+
try {
13+
throw new SampleException();
14+
} catch (SampleException e) {
15+
System.debug('Caught exception');
16+
}
17+
```
18+
19+
## Namespace
20+
ns
21+
22+
**Inheritance**
23+
24+
Exception
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# SampleInterface Interface
2+
3+
`NAMESPACEACCESSIBLE`
4+
5+
This is a sample interface
6+
7+
**Mermaid**
8+
9+
```mermaid
10+
graph TD
11+
A[SampleInterface] -->|extends| B[ParentInterface]
12+
B -->|extends| C[GrandParentInterface]
13+
C -->|extends| D[GreatGrandParentInterface]
14+
```
15+
16+
**Author** John Doe
17+
18+
**Date** 2020-01-01
19+
20+
**See** [SampleEnum](../sample-enums/SampleEnum.md)
21+
22+
**See** [ReferencedEnum](ReferencedEnum.md)
23+
24+
## Namespace
25+
ns
26+
27+
## Example
28+
```apex
29+
SampleInterface sampleInterface = new SampleInterface();
30+
sampleInterface.sampleMethod();
31+
```
32+
33+
**Extends**
34+
[ParentInterface](ParentInterface.md)
35+
36+
## Methods
37+
### `sampleMethod()`
38+
39+
`NAMESPACEACCESSIBLE`
40+
41+
This is a sample method
42+
43+
**Custom Tag**
44+
45+
This is a custom tag
46+
47+
**Another Custom Tag**
48+
49+
This is another custom tag
50+
51+
**Mermaid**
52+
53+
graph TD
54+
A[SampleInterface] --&gt;|extends| B[ParentInterface]
55+
B --&gt;|extends| C[GrandParentInterface]
56+
C --&gt;|extends| D[GreatGrandParentInterface]
57+
58+
#### Signature
59+
```apex
60+
public String sampleMethod()
61+
```
62+
63+
#### Return Type
64+
**String**
65+
66+
Some return value
67+
68+
#### Throws
69+
[SampleException](SampleException.md): This is a sample exception
70+
71+
AnotherSampleException: This is another sample exception
72+
73+
#### Example
74+
SampleInterface sampleInterface &#x3D; new SampleInterface();
75+
sampleInterface.sampleMethod();
76+
77+
---
78+
79+
### `sampleMethodWithParams(param1, param2, theEnum)`
80+
81+
`NAMESPACEACCESSIBLE`
82+
`DEPRECATED`
83+
84+
This is a sample method with parameters
85+
Sometimes it won&#x27;t be possible to find a NonExistent link.
86+
87+
#### Signature
88+
```apex
89+
public SampleEnum sampleMethodWithParams(String param1, Integer param2, SampleEnum theEnum)
90+
```
91+
92+
#### Parameters
93+
| Name | Type | Description |
94+
|------|------|-------------|
95+
| param1 | String | This is the first parameter |
96+
| param2 | Integer | This is the second parameter |
97+
| theEnum | [SampleEnum](../sample-enums/SampleEnum.md) | This is an enum parameter |
98+
99+
#### Return Type
100+
**[SampleEnum](../sample-enums/SampleEnum.md)**
101+
102+
Some return value
103+
104+
---
105+
106+
### `sampleParentMethod()`
107+
108+
*Inherited*
109+
110+
#### Signature
111+
```apex
112+
public void sampleParentMethod()
113+
```
114+
115+
#### Return Type
116+
**void**

0 commit comments

Comments
 (0)