Skip to content

Commit d029d52

Browse files
Merge pull request #326 from dixyushi/updateWholeDoc
added few points
2 parents 0eab93c + 178b0e5 commit d029d52

1 file changed

Lines changed: 28 additions & 22 deletions

File tree

documentation/Functions.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ This function is used when you want to adapt CobiGen templates. See [CobiGen CLI
5353
#### Parameter:
5454
* You don't need any parameters.
5555
#### Example:
56-
adaptTemplatesCobiGen()
56+
* adaptTemplatesCobiGen()
5757

5858
##### Note:
5959
1. No background script will run.
@@ -76,7 +76,7 @@ This function consist of two parameters.
7676
- **Type**- Array of Integers
7777
- **Description**- It is the array of numbers that represent the templates that CobiGen uses to generate code.
7878
#### Example:
79-
cobiGenJava("path/to/java/file/MyEntity.java",[1,3,5,6,8])
79+
* cobiGenJava("path/to/java/file/MyEntity.java",[1,3,5,6,8])
8080
### Details:
8181
| Number | Description |
8282
| --- | -- |
@@ -165,29 +165,32 @@ This function consist of two parameters.
165165
### i. createDevon4jProject <a name="createDevon4jProject"></a>
166166
This function is used to create a [devon4j](https://github.com/devonfw/devon4j) project.
167167
#### Parameter:
168-
This function consist of only one parameter.
169-
1st parameter:
168+
This function consist of only one parameter
169+
170+
1. First parameter:
170171
- **Required**
171172
- **Type**- String
172173
- **Description**- The base package name and it is of type string.
174+
173175
#### Example:
174176
* createDevon4jProject("com.mycustomer.myapplication")
175177

176178
##### Note:
177179
1. This function generates command the Katacoda user has to execute manually.
178180
2. To execute this function, devonfw-ide must be installed.
181+
3. This function will always create the devon4j project with latest devon4j version.
179182

180183
***
181184

182185
### ii. buildJava <a name="buildJava"></a>
183186
This function will build your java project.
184187
#### Parameter:
185188
This function consist two parameter .
186-
1. 1st Parameter:
189+
1. First Parameter:
187190
- **Required**
188191
- **Type**- String
189192
- **Description**- The project directory, relative to workspace.
190-
2. 2nd Parameter:
193+
2. Second Parameter:
191194
- **Optional**
192195
- **Type**- Boolean
193196
- **Description**- Indicator whether tests should be run. Default is false.
@@ -202,11 +205,11 @@ This function consist two parameter .
202205
This function will run your Java application on server.Parameter and assertion information you need to use properly, which is mentioned below.In Katacoda the command will be executed in a new terminal.
203206
#### Parameter:
204207
This functions consists of two parameters.
205-
1. 1st Parameter:
208+
1. First Parameter:
206209
- **Required**
207210
- **Type**- String
208211
- **Description**- Path to the server directory within the Java project.
209-
2. 2nd Parameter:
212+
2. Second Parameter:
210213
- **Required**
211214
- **Type**- JSON object
212215
- **Description**- This parameter consist of three attributes which are the assertion information. Only needed for the console runner to check if the server was started properly.
@@ -391,7 +394,7 @@ This function consist of 2 parameters
391394
* Second attribute: It is Optional. Name of a placeholder
392395
* Third attribute: It is Optional. Line number where you want to insert your code. (Possible lines are: 1...n+1 for N = number of existing lines. File cant be empty)
393396
#### Example:
394-
changeFile("cobigenexample/core/src/main/java/com/example/application/cobigenexample/customermanagement/dataaccess/api/CustomerEntity.java", { "file": "files/Placeholder.java", "placeholder": "private static final long serialVersionUID = 1L;" })
397+
* changeFile("cobigenexample/core/src/main/java/com/example/application/cobigenexample/customermanagement/dataaccess/api/CustomerEntity.java", { "file": "files/Placeholder.java", "placeholder": "private static final long serialVersionUID = 1L;" })
395398
#### Details:
396399
##### Path of the file to get the content from or a string, that should be inserted.
397400
* If you want to add content from a file then use:
@@ -434,11 +437,11 @@ The option to insert at a linenumber uses a placeholder inserted by a script and
434437
This function creates a new file with a specified content. If no content is specified, an empty file is created.
435438
#### Parameter:
436439
This functions consists of two parameter.
437-
1. 1st Parameter:
440+
1. First Parameter:
438441
- **Required**
439442
- **Type**- String
440443
- **Description**- Path of the file to be created (relative path to the workspace directory).
441-
3. 2nd Parameter:
444+
3. Second Parameter:
442445
- **Optional**
443446
- **Type**- String
444447
- **Description**- Path of the file to get the content from. Relative to the playbook directory.
@@ -622,19 +625,21 @@ This function only consist of one parameter.
622625
- **Description**- Name of the workspace repository(Default is the playbook-name).
623626

624627
#### Arguments:
625-
**User**(Optional)
626-
flag: --user
627-
value: GitHub-username (Default is 'devonfw-tutorials')
628+
* **User**
629+
- (Optional)
630+
- flag: --user
631+
- value: GitHub-username (Default is 'devonfw-tutorials')
628632

629-
You can use a forked workspace-repository, if you add the username as argument. If the runner cannot find the workspace repository in the your repositories, it will use devonfw-tutorials instead.
633+
Note: You can use a forked workspace-repository, if you add the username as argument. If the runner cannot find the workspace repository in the your repositories, it will use devonfw-tutorials instead.
630634

631-
**Branch**(Optional)
632-
flag: --branch
633-
value: the working branch (Default is its default-branch)
635+
* **Branch**
636+
- (Optional)
637+
- flag: --branch
638+
- value: the working branch (Default is its default-branch)
634639

635-
You can use a different branch, if you add the working branch as argument. If the runner cannot find the branch in the cloned repository, it will use the default branch instead.
640+
Note: You can use a different branch, if you add the working branch as argument. If the runner cannot find the branch in the cloned repository, it will use the default branch instead.
636641

637-
buildRun.sh --user [username] --branch [branch]
642+
* buildRun.sh --user [username] --branch [branch]
638643

639644
#### Example:
640645

@@ -644,8 +649,9 @@ will clone "https://github.com/devonfw-tutorials/[playbook-name]" into the works
644649
* restoreWorkspace({"workspace": [name]})
645650
will clone "https://github.com/devonfw-tutorials/[name]" into the workspace directory.
646651

647-
**buildRun.sh --user [GitHub-name] --branch [branch]**
648-
* restoreWorkspace()
652+
* **buildRun.sh --user [GitHub-name] --branch [branch]**
653+
restoreWorkspace()
654+
649655
will run "git clone https://github.com/[GitHub-name]/[playbook-name]" and checkout in branch [branch]
650656

651657
#### details

0 commit comments

Comments
 (0)