Skip to content

Commit 0b7c29a

Browse files
Javadoc & JSDoc links to "current"
1 parent 636c7e6 commit 0b7c29a

File tree

10 files changed

+286
-286
lines changed

10 files changed

+286
-286
lines changed

docs/documentation/core/basic-code-examples.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ For more details on **Rhino** scripting you can check [the Mozilla Rhino documen
1313

1414
> **Note**:
1515
>
16-
> Object code can be written in Java (or JavaScript which will be executed by the Rhino server-side engine, just like the executed fields), but good practice is to prefer Java language which
16+
> Object code can be written in Java (or JavaScript which will be executed by the Rhino server-side engine, just like the executed fields), but good practice is to prefer Java language which
1717
> include a compilation step and ensure that the syntax of the script is correct. In advanced use cases that are not part of this tutorial, the use of Java gives access > to all of the classic application development tools: step-by-step debugging, unit tests, development in a Java IDE, code quality analysis with Sonar etc..
1818
1919
> Examples are provided both in Rhino and Java so as you can see the syntax differences.
@@ -31,8 +31,8 @@ Recommended naming conventions are:
3131
- Name field as you would name a Java variable (do not start by a capital letter, but afterwards put a capital
3232
letter at the beginning of each word, e.g. `myFirstName`)
3333

34-
Since version 4, the platform includes automatic naming convention validation (activated by a SYNTAX system parameter whose value is yes by default).
35-
This is available for objects, functions, groups, domains and actions.
34+
Since version 4, the platform includes automatic naming convention validation (activated by a SYNTAX system parameter whose value is yes by default).
35+
This is available for objects, functions, groups, domains and actions.
3636

3737
Packages inclusions
3838
-------------------
@@ -117,7 +117,7 @@ AppLog.fatal(e,getGrant()); // Fatal level message
117117
```
118118

119119
<details>
120-
<summary>Rhino JavaScript equivalent</summary>
120+
<summary>Rhino JavaScript equivalent</summary>
121121

122122
```javascript
123123
console.debug("Hello world !"); // Debug level message
@@ -126,7 +126,7 @@ console.warning("Hello world !"); // Warning level message
126126
console.error("Hello world !"); // Error level message
127127
console.fatal("Hello world !"); // Fatal level message
128128
```
129-
</details>
129+
</details>
130130

131131
It is also possible to link a message to an explicit log code:
132132

@@ -171,7 +171,7 @@ protected void hookBegin(String hook, int maxTime, int maxStack) throws HookExce
171171
maxTime = 10000; // warning after 10s in ms
172172

173173
// default duration is 2s by default
174-
// default stack is set 20 to stop infinite calls loop => HookException
174+
// default stack is set 20 to stop infinite calls loop => HookException
175175
super.hookBegin(hook, maxTime, maxStack);
176176
}
177177

@@ -268,7 +268,7 @@ synchronized (o.getLock()) {
268268
o.resetOrders();
269269
o.getField("myField1").setOrder(1); // order by myField1 ascendant
270270
o.getField("myField2").setOrder(-2); // then order by myField2 descendant
271-
271+
272272
// A non-paginated search can consume a lot of memory
273273
// The designer must ensure that the search is limited/filtered
274274
for (String[] row : o.search()) {
@@ -384,25 +384,25 @@ The setSearchSpec is a method that allows you to set an SQL where clause on your
384384
For example , users can only read, update the data they have created
385385
users can only view or modify the data to which they are assigned...etc
386386

387-
If it's a static filter that never changes, use the postLoad hook to define your search spec.
388-
The object's table alias is t.
389-
The alias of the related object table is t_logical name technical key.
387+
If it's a static filter that never changes, use the postLoad hook to define your search spec.
388+
The object's table alias is t.
389+
The alias of the related object table is t_logical name technical key.
390390

391391
#### Java
392392

393393
```java
394-
@Override
395-
public void postLoad() {
396-
if (getGrant().hasResponsibility(USER_GROUP))
397-
setSearchSpec("t.column1='abc' or t.column2>123");
394+
@Override
395+
public void postLoad() {
396+
if (getGrant().hasResponsibility(USER_GROUP))
397+
setSearchSpec("t.column1='abc' or t.column2>123");
398398
}
399399

400-
@Override
401-
public void postLoad() {
402-
if (getGrant().hasResponsibility(USER_GROUP))
403-
setSearchSpec(getSearchSpec() + " and exists(select 1 FROM table1 where t_userAssignedId.row_id=" + getGrant().getUserId());
400+
@Override
401+
public void postLoad() {
402+
if (getGrant().hasResponsibility(USER_GROUP))
403+
setSearchSpec(getSearchSpec() + " and exists(select 1 FROM table1 where t_userAssignedId.row_id=" + getGrant().getUserId());
404404
}
405-
```
405+
```
406406

407407
Others
408408
------
@@ -414,12 +414,12 @@ Others
414414
```java
415415
ObjectDB obj = getGrant().getTmpObject("myObject");
416416
ObjectField myObjectFile = obj.getField("myObjFile"); // must be of type file
417-
418-
// https://platform.simplicite.io/resources/latest/javadoc/com/simplicite/util/tools/MailTool.html
417+
418+
// https://platform.simplicite.io/current/javadoc/com/simplicite/util/tools/MailTool.html
419419
MailTool mail = new MailTool(getGrant());
420420
mail.addRcpt("[email protected]");
421421
mail.setSubject("Test Mail");
422-
mail.addAttach(obj, myObjectFile);
422+
mail.addAttach(obj, myObjectFile);
423423
mail.setBody("<p>Hello</p>");
424424
mail.send();
425425
);

docs/documentation/core/expressions.md

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Here is a summary of available preprocessed tags that can be used in expressions
2525

2626
> **Note**: The comprehensive descriptions below (and the [JavaDoc](https://platform.simplicite.io/current/javadoc/)) contains additional information.
2727
28-
| [Grant level](https://platform.simplicite.io/current/javadoc/com/simplicite/util/GrantCore.html#prepareExpression-java.lang.String-java.lang.String-boolean-boolean-) | [Object level](https://platform.simplicite.io/documentation/00-versions/4.0/javadoc/com/simplicite/util/ObjectCore.html#prepareExpression-java.lang.String-java.lang.String:A-boolean-boolean-) | [External object level](https://platform.simplicite.io/documentation/00-versions/4.0/javadoc/com/simplicite/util/ExternalObject.html#prepareExpression-java.lang.String-) |
28+
| [Grant level](https://platform.simplicite.io/current/javadoc/com/simplicite/util/GrantCore.html#prepareExpression-java.lang.String-java.lang.String-boolean-boolean-) | [Object level](https://platform.simplicite.io/current/javadoc/com/simplicite/util/ObjectCore.html#prepareExpression-java.lang.String-java.lang.String:A-boolean-boolean-) | [External object level](https://platform.simplicite.io/current/javadoc/com/simplicite/util/ExternalObject.html#prepareExpression-java.lang.String-) |
2929
|:-----------------:|:-------------------------------------------------:|:-------------------------:|
3030
| | All of Grant + following: | All of Grant + following: |
3131
| `[APPNAME]` | `[CONTEXT:context]` | `[OBJECTID]` |
@@ -74,14 +74,14 @@ Here is the list of available substituted tags that you can use in expressions:
7474

7575
#### Available tags:
7676

77-
- `[HOMEURL]` : Home URL (without quotes)
78-
_ `[EXTOBJECTURL:<external object name>[:<optional URL parameters>]]` : External object URL (without quotes)
79-
- `[EXTOBJECTPUBLICURL:<external object name>[:<optional URL parameters>]]` : External object URL (without quotes)
80-
- `[CONTENTURL:<static content file name>]` : Static content URL (without quotes)
81-
- `[IMAGERESOURCEURL:<resource code>[:<OBJECT|EXTOBJECT|DISPOSITION>:<business object or external object or disposition name>]]` : Image resource URL (without quotes)
82-
- `[ICONRESOURCEURL:<resource code>[:<OBJECT|EXTOBJECT|DISPOSITION>:<business object or external object or disposition name>]]` : Icon resource URL (without quotes)
83-
- `[CSSRESOURCEURL:<resource code>[:<OBJECT|EXTOBJECT|DISPOSITION>:<business object or external object or disposition name>]]` : CSS stylesheet resource URL (without quotes)
84-
- `[JSRESOURCEURL:<resource code>[:<OBJECT|EXTOBJECT|DISPOSITION>:<business object or external object or disposition name>]]` : JavaScript resource URL (without quotes)
77+
- `[HOMEURL]` : Home URL (without quotes)
78+
_ `[EXTOBJECTURL:<external object name>[:<optional URL parameters>]]` : External object URL (without quotes)
79+
- `[EXTOBJECTPUBLICURL:<external object name>[:<optional URL parameters>]]` : External object URL (without quotes)
80+
- `[CONTENTURL:<static content file name>]` : Static content URL (without quotes)
81+
- `[IMAGERESOURCEURL:<resource code>[:<OBJECT|EXTOBJECT|DISPOSITION>:<business object or external object or disposition name>]]` : Image resource URL (without quotes)
82+
- `[ICONRESOURCEURL:<resource code>[:<OBJECT|EXTOBJECT|DISPOSITION>:<business object or external object or disposition name>]]` : Icon resource URL (without quotes)
83+
- `[CSSRESOURCEURL:<resource code>[:<OBJECT|EXTOBJECT|DISPOSITION>:<business object or external object or disposition name>]]` : CSS stylesheet resource URL (without quotes)
84+
- `[JSRESOURCEURL:<resource code>[:<OBJECT|EXTOBJECT|DISPOSITION>:<business object or external object or disposition name>]]` : JavaScript resource URL (without quotes)
8585
- `[HTMLRESOURCEURL:<resource code>[:<OBJECT|EXTOBJECT|DISPOSITION>:<business object or external object or disposition name>]]` : HTML resource URL (without quotes)
8686

8787
### Grant level
@@ -92,23 +92,23 @@ _ `[EXTOBJECTURL:<external object name>[:<optional URL parameters>]]` : External
9292

9393
#### Available tags:
9494

95-
- `[GRANT]`: the user grant
96-
- `[LOGIN]`: the user login
97-
- `[USERID]`: the user row ID
98-
- `[LANG]`: the user language
99-
- `[HASRESP:<group>]` or `[HASRESPONSIBILITY:<group>]`: check if user has specified responsibility
100-
- `[TEXT:<code>]`: value of a static text
95+
- `[GRANT]`: the user grant
96+
- `[LOGIN]`: the user login
97+
- `[USERID]`: the user row ID
98+
- `[LANG]`: the user language
99+
- `[HASRESP:<group>]` or `[HASRESPONSIBILITY:<group>]`: check if user has specified responsibility
100+
- `[TEXT:<code>]`: value of a static text
101101
- `[SYSPARAM:<name>]`: value of a system parameter (without surrounding quotes because a system parameter can be numeric)
102-
- `[APPLICATION]` or `[APPNAME]`: the application name
103-
- `[ENCODING]`: the application encoding
104-
- `[NOW]` (deprecated) or `[DATE`[:day offset]`]`: current date in service format yyyy-MM-dd (with optional day offset)
105-
- `[TIME`[:millisecond offset]`]`: current time in internal format hh:mm:ss (with optional millisecond offset)
106-
- `[DATETIME`[:millisecond offset]`]`: current datetime in service format yyyy-MM-dd HH:mm:ss (with optional millisecond offset)
107-
- `[MONTH]`: current month in format MM
108-
- `[WEEK]`: current week in format WW
109-
- `[LOV:<list name>:<code>]` or `[LISTVALUE:<list name>:<code>]`: value of a list of values code
110-
- `[TEXT:<code>]`: static text in user language
111-
- `[OBJECT:<object name>[:<optional object instance name>]]`: the specified object (by default it uses temporary instance)
102+
- `[APPLICATION]` or `[APPNAME]`: the application name
103+
- `[ENCODING]`: the application encoding
104+
- `[NOW]` (deprecated) or `[DATE`[:day offset]`]`: current date in service format yyyy-MM-dd (with optional day offset)
105+
- `[TIME`[:millisecond offset]`]`: current time in internal format hh:mm:ss (with optional millisecond offset)
106+
- `[DATETIME`[:millisecond offset]`]`: current datetime in service format yyyy-MM-dd HH:mm:ss (with optional millisecond offset)
107+
- `[MONTH]`: current month in format MM
108+
- `[WEEK]`: current week in format WW
109+
- `[LOV:<list name>:<code>]` or `[LISTVALUE:<list name>:<code>]`: value of a list of values code
110+
- `[TEXT:<code>]`: static text in user language
111+
- `[OBJECT:<object name>[:<optional object instance name>]]`: the specified object (by default it uses temporary instance)
112112

113113
> **Note**: the UI URLs tags are also avilable at grant-level
114114
@@ -126,33 +126,33 @@ _ `[EXTOBJECTURL:<external object name>[:<optional URL parameters>]]` : External
126126
127127
#### Available tags:
128128

129-
- `[OBJECT]`: the current object
129+
- `[OBJECT]`: the current object
130130
- `[TABLE]`: the current object table name (when applicable)
131-
- `[OBJECTID]`: the current object's row ID
132-
- `[OBJECTNAME]` or `[OBJNAME]`: the current object name
133-
- `[OBJECTLABEL]` or `[OBJLABEL]`: the current object label
134-
- `[OBJECTINSTANCENAME]` or `[OBJINST]`: the current object instance name
135-
- `[PARENTOBJECT]` or `[PARENT]`: the current object parent object
136-
- `[PARENTOBJECTNAME]` or `[PARENTNAME]`: the current object parent object name
137-
- `[PARENTOBJECTLABEL]` or `[PARENTLABEL]`: the current object parent object label
138-
- `[PARENTOBJECTINSTANCENAME]` or `[PARENTINSTANCENAME]` or `[PARENTINST]`: the current object parent object instance name
139-
- `[CHILDOF:<parent object name>[:<optional parent ref field>]]`: check if current object is child object of specified object (thru optional specified ref field)
140-
- `[PANELOF:<parent object name>[:<optional parent ref field>]]`: check if current object is panel child object of specified object (thru optional specified ref field)
141-
- `[REFFROM:<object name>[:<optional ref field>]]` or `[REFERENCEDFROM:<object name>[:<optional ref field>]]`: check if current object is referenced object from specified object (thru optional specified ref field)
142-
- `[DATAMAPFROM:<object name>]` or `[DATAMAPPEDFROM:<object name>]`: check if current object is data mapped object from specified object
143-
- `[CONTEXT:<context>]`: check if in specified context
144-
- `[OBJECTSTATUS]` or `[STATUS]`: the object current status (if object has a status)
145-
- `[OBJECTOLDSTATUS]` or `[OLDSTATUS]`: the old object status if any (if object has a status, not available on lists)
146-
- `[OBJECTSTATUSCHANGED]` or `[STATUSCHANGED]`: check if the object status has changed
147-
- `[ISNEW]`: Check if object is in creation
148-
- `[ISCOPIED]`: Check if object is in creation as a copy
149-
- `[ROWID]`: Row ID value
150-
- `[FIELD:<name>]` or `[INPUT:<input name>]`: the specified field
151-
- `[COLUMN:<field input name>]`: the specified field column name
152-
- `[LABEL:<field input name>]`: the specified field label
153-
- `[VALUE:<field input name>]`: the specified input field current value
154-
- `[OLDVALUE:<field input name>]`: the specified input field old value (not available on lists)
155-
- `[PARAM:<parameter name>]`: object parameter value
131+
- `[OBJECTID]`: the current object's row ID
132+
- `[OBJECTNAME]` or `[OBJNAME]`: the current object name
133+
- `[OBJECTLABEL]` or `[OBJLABEL]`: the current object label
134+
- `[OBJECTINSTANCENAME]` or `[OBJINST]`: the current object instance name
135+
- `[PARENTOBJECT]` or `[PARENT]`: the current object parent object
136+
- `[PARENTOBJECTNAME]` or `[PARENTNAME]`: the current object parent object name
137+
- `[PARENTOBJECTLABEL]` or `[PARENTLABEL]`: the current object parent object label
138+
- `[PARENTOBJECTINSTANCENAME]` or `[PARENTINSTANCENAME]` or `[PARENTINST]`: the current object parent object instance name
139+
- `[CHILDOF:<parent object name>[:<optional parent ref field>]]`: check if current object is child object of specified object (thru optional specified ref field)
140+
- `[PANELOF:<parent object name>[:<optional parent ref field>]]`: check if current object is panel child object of specified object (thru optional specified ref field)
141+
- `[REFFROM:<object name>[:<optional ref field>]]` or `[REFERENCEDFROM:<object name>[:<optional ref field>]]`: check if current object is referenced object from specified object (thru optional specified ref field)
142+
- `[DATAMAPFROM:<object name>]` or `[DATAMAPPEDFROM:<object name>]`: check if current object is data mapped object from specified object
143+
- `[CONTEXT:<context>]`: check if in specified context
144+
- `[OBJECTSTATUS]` or `[STATUS]`: the object current status (if object has a status)
145+
- `[OBJECTOLDSTATUS]` or `[OLDSTATUS]`: the old object status if any (if object has a status, not available on lists)
146+
- `[OBJECTSTATUSCHANGED]` or `[STATUSCHANGED]`: check if the object status has changed
147+
- `[ISNEW]`: Check if object is in creation
148+
- `[ISCOPIED]`: Check if object is in creation as a copy
149+
- `[ROWID]`: Row ID value
150+
- `[FIELD:<name>]` or `[INPUT:<input name>]`: the specified field
151+
- `[COLUMN:<field input name>]`: the specified field column name
152+
- `[LABEL:<field input name>]`: the specified field label
153+
- `[VALUE:<field input name>]`: the specified input field current value
154+
- `[OLDVALUE:<field input name>]`: the specified input field old value (not available on lists)
155+
- `[PARAM:<parameter name>]`: object parameter value
156156

157157
> **Note**: The UI URLs and grant level tags are also available at business object level.
158158

0 commit comments

Comments
 (0)