Skip to content

Commit b46b616

Browse files
committed
Migrated to Mx 9.12.0
1 parent 4310bc6 commit b46b616

File tree

675 files changed

+60204
-35133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

675 files changed

+60204
-35133
lines changed

DOCS/module.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# The module
22

3-
<h2>Table of contents</h2>
3+
## Table of contents
44

5+
- [Table of contents](#table-of-contents)
56
- [Requirements](#requirements)
67
- [Dependencies](#dependencies)
78
- [Terminology and Process](#terminology-and-process)
@@ -42,7 +43,7 @@ Use Docmosis Cloud Console to upload the template.
4243

4344
In your app you have to collect all required data and structure it in such a way that it is compatible with the template you created. The module includes a utility that supports you in generating a non-persistent example data structure based on your template.
4445

45-
If you want to create the structure manually then you can skip the remainder of this paragraph. Otherwise continue reading to see how the example data utility works. The [example app](example-app.md) shows it in operation.
46+
If you want to create the structure manually then you can skip the remainder of this paragraph. Otherwise continue reading to see how the example data utility works. The [example app](https://github.com/Docmosis/mendix-integration/blob/main/DOCS/example-app.md) shows it in operation.
4647

4748
<img align="right" src="assets/getsampledata-microflows.png" alt="GetSampleData microflows">
4849

@@ -66,7 +67,7 @@ Once you have a template and a matching data structure then you can render the d
6667
First initialize the request using microflow `RenderRequest_Initialize`:
6768

6869
- **TemplateName**: path and name of the template to use, for example *samples/InvoiceTemplate.docx*
69-
- **OutputName**: name of the rendered document, for example *invoice-21I000388.pdf*. Docmosis will use the file extension to determine the format of document to generate, in this case *pdf*,
70+
- **OutputName**: name of the rendered document, for example *invoice-21I000388.pdf*. Docmosis will use the file extension to determine the format of document to generate, in this case *pdf*,
7071
- common parameters are [documented here](#common-request-initialization-parameters)
7172

7273
<img align="right" src="assets/render-microflows.png" alt="Render microflows">
@@ -94,7 +95,7 @@ It is extremely flexible and powerful. To help you get started quickly here are
9495
> Attribute `StreamResultInResponse` is enforced to `true` for module implementation reasons. Changing it yourself will not change the behavior.
9596
> Attribute `Data` will be populated with your data. Any data you put in here will be overwritten. See the next paragraph for details.
9697
97-
The next step is equally or maybe even more important: the data to be merged with the template. Your app has to generate a JSON string that matches the template. Typically that is a flow that involves data retrieval, creating one or more non-persistent objects and export it to JSON; see also paragraph [Generate the data structure in your app](#generate-the-data-structure-in-your-app). As that is completely specific to your app exact details cannot be given here. The [example app](DOCS/example-app.md) can be used as a guide.
98+
The next step is equally or maybe even more important: the data to be merged with the template. Your app has to generate a JSON string that matches the template. Typically that is a flow that involves data retrieval, creating one or more non-persistent objects and export it to JSON; see also paragraph [Generate the data structure in your app](#generate-the-data-structure-in-your-app). As that is completely specific to your app exact details cannot be given here. The [example app](https://github.com/Docmosis/mendix-integration/blob/main/DOCS/example-app.md) can be used as a guide.
9899

99100
When the `RenderRequest` object is set as required and a string with JSON data is available then call microflow `CWS_Render` to render the document.
100101

Docmosis Cloud.mpr

-28 KB
Binary file not shown.

dist/DocmosisCloud101.mpk

67.2 KB
Binary file not shown.

dist/DocmosisCloud200.mpk

63.6 KB
Binary file not shown.

javasource/administration/proxies/Account.java

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public enum MemberNames
2323
Password("Password"),
2424
LastLogin("LastLogin"),
2525
Blocked("Blocked"),
26+
BlockedSince("BlockedSince"),
2627
Active("Active"),
2728
FailedLogins("FailedLogins"),
2829
WebServiceUser("WebServiceUser"),
@@ -31,7 +32,7 @@ public enum MemberNames
3132
User_Language("System.User_Language"),
3233
User_TimeZone("System.User_TimeZone");
3334

34-
private java.lang.String metaName;
35+
private final java.lang.String metaName;
3536

3637
MemberNames(java.lang.String s)
3738
{
@@ -47,14 +48,15 @@ public java.lang.String toString()
4748

4849
public Account(com.mendix.systemwideinterfaces.core.IContext context)
4950
{
50-
this(context, com.mendix.core.Core.instantiate(context, "Administration.Account"));
51+
this(context, com.mendix.core.Core.instantiate(context, entityName));
5152
}
5253

5354
protected Account(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject accountMendixObject)
5455
{
5556
super(context, accountMendixObject);
56-
if (!com.mendix.core.Core.isSubClassOf("Administration.Account", accountMendixObject.getType()))
57-
throw new java.lang.IllegalArgumentException("The given object is not a Administration.Account");
57+
if (!com.mendix.core.Core.isSubClassOf(entityName, accountMendixObject.getType())) {
58+
throw new java.lang.IllegalArgumentException(String.format("The given object is not a %s", entityName));
59+
}
5860
}
5961

6062
/**
@@ -69,6 +71,9 @@ public static administration.proxies.Account initialize(com.mendix.systemwideint
6971
/**
7072
* Initialize a proxy using context (recommended). This context will be used for security checking when the get- and set-methods without context parameters are called.
7173
* The get- and set-methods with context parameter should be used when for instance sudo access is necessary (IContext.createSudoClone() can be used to obtain sudo access).
74+
* @param context The context to be used
75+
* @param mendixObject The Mendix object for the new instance
76+
* @return a new instance of this proxy class
7277
*/
7378
public static administration.proxies.Account initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject)
7479
{
@@ -83,10 +88,11 @@ public static administration.proxies.Account load(com.mendix.systemwideinterface
8388

8489
public static java.util.List<administration.proxies.Account> load(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String xpathConstraint) throws com.mendix.core.CoreException
8590
{
86-
java.util.List<administration.proxies.Account> result = new java.util.ArrayList<administration.proxies.Account>();
87-
for (com.mendix.systemwideinterfaces.core.IMendixObject obj : com.mendix.core.Core.retrieveXPathQuery(context, "//Administration.Account" + xpathConstraint))
88-
result.add(administration.proxies.Account.initialize(context, obj));
89-
return result;
91+
return com.mendix.core.Core.createXPathQuery(String.format("//%1$s%2$s", entityName, xpathConstraint))
92+
.execute(context)
93+
.stream()
94+
.map(obj -> administration.proxies.Account.initialize(context, obj))
95+
.collect(java.util.stream.Collectors.toList());
9096
}
9197

9298
/**
@@ -200,9 +206,9 @@ public final void setIsLocalUser(com.mendix.systemwideinterfaces.core.IContext c
200206
@java.lang.Override
201207
public boolean equals(Object obj)
202208
{
203-
if (obj == this)
209+
if (obj == this) {
204210
return true;
205-
211+
}
206212
if (obj != null && getClass().equals(obj.getClass()))
207213
{
208214
final administration.proxies.Account that = (administration.proxies.Account) obj;
@@ -222,7 +228,7 @@ public int hashCode()
222228
*/
223229
public static java.lang.String getType()
224230
{
225-
return "Administration.Account";
231+
return entityName;
226232
}
227233

228234
/**

javasource/administration/proxies/AccountPasswordData.java

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public enum MemberNames
2525
ConfirmPassword("ConfirmPassword"),
2626
AccountPasswordData_Account("Administration.AccountPasswordData_Account");
2727

28-
private java.lang.String metaName;
28+
private final java.lang.String metaName;
2929

3030
MemberNames(java.lang.String s)
3131
{
@@ -41,15 +41,17 @@ public java.lang.String toString()
4141

4242
public AccountPasswordData(com.mendix.systemwideinterfaces.core.IContext context)
4343
{
44-
this(context, com.mendix.core.Core.instantiate(context, "Administration.AccountPasswordData"));
44+
this(context, com.mendix.core.Core.instantiate(context, entityName));
4545
}
4646

4747
protected AccountPasswordData(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject accountPasswordDataMendixObject)
4848
{
49-
if (accountPasswordDataMendixObject == null)
49+
if (accountPasswordDataMendixObject == null) {
5050
throw new java.lang.IllegalArgumentException("The given object cannot be null.");
51-
if (!com.mendix.core.Core.isSubClassOf("Administration.AccountPasswordData", accountPasswordDataMendixObject.getType()))
52-
throw new java.lang.IllegalArgumentException("The given object is not a Administration.AccountPasswordData");
51+
}
52+
if (!com.mendix.core.Core.isSubClassOf(entityName, accountPasswordDataMendixObject.getType())) {
53+
throw new java.lang.IllegalArgumentException(String.format("The given object is not a %s", entityName));
54+
}
5355

5456
this.accountPasswordDataMendixObject = accountPasswordDataMendixObject;
5557
this.context = context;
@@ -67,6 +69,9 @@ public static administration.proxies.AccountPasswordData initialize(com.mendix.s
6769
/**
6870
* Initialize a proxy using context (recommended). This context will be used for security checking when the get- and set-methods without context parameters are called.
6971
* The get- and set-methods with context parameter should be used when for instance sudo access is necessary (IContext.createSudoClone() can be used to obtain sudo access).
72+
* @param context The context to be used
73+
* @param mendixObject The Mendix object for the new instance
74+
* @return a new instance of this proxy class
7075
*/
7176
public static administration.proxies.AccountPasswordData initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject)
7277
{
@@ -81,6 +86,7 @@ public static administration.proxies.AccountPasswordData load(com.mendix.systemw
8186

8287
/**
8388
* Commit the changes made on this proxy object.
89+
* @throws com.mendix.core.CoreException
8490
*/
8591
public final void commit() throws com.mendix.core.CoreException
8692
{
@@ -89,6 +95,7 @@ public final void commit() throws com.mendix.core.CoreException
8995

9096
/**
9197
* Commit the changes made on this proxy object using the specified context.
98+
* @throws com.mendix.core.CoreException
9299
*/
93100
public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException
94101
{
@@ -219,6 +226,7 @@ public final void setConfirmPassword(com.mendix.systemwideinterfaces.core.IConte
219226
}
220227

221228
/**
229+
* @throws com.mendix.core.CoreException
222230
* @return value of AccountPasswordData_Account
223231
*/
224232
public final administration.proxies.Account getAccountPasswordData_Account() throws com.mendix.core.CoreException
@@ -229,13 +237,15 @@ public final administration.proxies.Account getAccountPasswordData_Account() thr
229237
/**
230238
* @param context
231239
* @return value of AccountPasswordData_Account
240+
* @throws com.mendix.core.CoreException
232241
*/
233242
public final administration.proxies.Account getAccountPasswordData_Account(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException
234243
{
235244
administration.proxies.Account result = null;
236245
com.mendix.systemwideinterfaces.core.IMendixIdentifier identifier = getMendixObject().getValue(context, MemberNames.AccountPasswordData_Account.toString());
237-
if (identifier != null)
246+
if (identifier != null) {
238247
result = administration.proxies.Account.load(context, identifier);
248+
}
239249
return result;
240250
}
241251

@@ -255,10 +265,11 @@ public final void setAccountPasswordData_Account(administration.proxies.Account
255265
*/
256266
public final void setAccountPasswordData_Account(com.mendix.systemwideinterfaces.core.IContext context, administration.proxies.Account accountpassworddata_account)
257267
{
258-
if (accountpassworddata_account == null)
268+
if (accountpassworddata_account == null) {
259269
getMendixObject().setValue(context, MemberNames.AccountPasswordData_Account.toString(), null);
260-
else
270+
} else {
261271
getMendixObject().setValue(context, MemberNames.AccountPasswordData_Account.toString(), accountpassworddata_account.getMendixObject().getId());
272+
}
262273
}
263274

264275
/**
@@ -280,9 +291,9 @@ public final com.mendix.systemwideinterfaces.core.IContext getContext()
280291
@java.lang.Override
281292
public boolean equals(Object obj)
282293
{
283-
if (obj == this)
294+
if (obj == this) {
284295
return true;
285-
296+
}
286297
if (obj != null && getClass().equals(obj.getClass()))
287298
{
288299
final administration.proxies.AccountPasswordData that = (administration.proxies.AccountPasswordData) obj;
@@ -302,7 +313,7 @@ public int hashCode()
302313
*/
303314
public static java.lang.String getType()
304315
{
305-
return "Administration.AccountPasswordData";
316+
return entityName;
306317
}
307318

308319
/**

javasource/administration/proxies/microflows/Microflows.java

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@
77
import java.util.HashMap;
88
import java.util.Map;
99
import com.mendix.core.Core;
10-
import com.mendix.core.CoreException;
11-
import com.mendix.systemwideinterfaces.MendixRuntimeException;
1210
import com.mendix.systemwideinterfaces.core.IContext;
1311
import com.mendix.systemwideinterfaces.core.IMendixObject;
1412

1513
public class Microflows
1614
{
15+
/**
16+
* @deprecated
17+
* The default constructor of the Microflows class should not be used.
18+
* Use the static microflow invocation methods instead.
19+
*/
20+
@java.lang.Deprecated(since = "9.12", forRemoval = true)
21+
public Microflows() {}
22+
1723
// These are the microflows for the Administration module
1824
public static void changeMyPassword(IContext context, administration.proxies.AccountPasswordData _accountPasswordData)
1925
{
@@ -50,14 +56,13 @@ public static java.util.List<system.proxies.TimeZone> retrieveTimeZones(IContext
5056
{
5157
Map<java.lang.String, Object> params = new HashMap<>();
5258
java.util.List<IMendixObject> objs = Core.microflowCall("Administration.RetrieveTimeZones").withParams(params).execute(context);
53-
java.util.List<system.proxies.TimeZone> result = null;
54-
if (objs != null)
55-
{
56-
result = new java.util.ArrayList<>();
57-
for (IMendixObject obj : objs)
58-
result.add(system.proxies.TimeZone.initialize(context, obj));
59+
if (objs == null) {
60+
return null;
61+
} else {
62+
return objs.stream()
63+
.map(obj -> system.proxies.TimeZone.initialize(context, obj))
64+
.collect(java.util.stream.Collectors.toList());
5965
}
60-
return result;
6166
}
6267
public static void saveNewAccount(IContext context, administration.proxies.AccountPasswordData _accountPasswordData)
6368
{
@@ -77,4 +82,4 @@ public static void showPasswordForm(IContext context, administration.proxies.Acc
7782
params.put("Account", _account == null ? null : _account.getMendixObject());
7883
Core.microflowCall("Administration.ShowPasswordForm").withParams(params).execute(context);
7984
}
80-
}
85+
}

javasource/atlas_ui_resources/proxies/constants/Constants.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

javasource/communitycommons/Logging.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static void debug(String lognode, String message) {
2525
}
2626

2727
public static void warn(String lognode, String message, Throwable e) {
28-
log(lognode, LogLevel.Debug, message, e);
28+
log(lognode, LogLevel.Warning, message, e);
2929
}
3030

3131
public static void warn(String lognode, String message) {

javasource/communitycommons/Misc.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ public void run() {
592592
* @return
593593
* @deprecated Native Java function Objects.equals() is available since Java 7
594594
*/
595+
@Deprecated
595596
public static boolean objectsAreEqual(Object left, Object right) {
596597
if (left == null && right == null) {
597598
return true;

0 commit comments

Comments
 (0)