Skip to content

Commit c099890

Browse files
authored
Merge pull request #7 from mendix/release/2.1.0
Release of Workflow Commons 2.1.0
2 parents 88ff8a5 + 1a04c47 commit c099890

File tree

244 files changed

+1822
-4414
lines changed

Some content is hidden

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

244 files changed

+1822
-4414
lines changed

Releases/WorkflowCommons-2-1-0.mpk

7.14 MB
Binary file not shown.
3.52 MB
Binary file not shown.

Source/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
/**

Source/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
/**

Source/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
{
@@ -77,14 +83,13 @@ public static java.util.List<system.proxies.TimeZone> retrieveTimeZones(IContext
7783
{
7884
Map<java.lang.String, Object> params = new HashMap<>();
7985
java.util.List<IMendixObject> objs = Core.microflowCall("Administration.RetrieveTimeZones").withParams(params).execute(context);
80-
java.util.List<system.proxies.TimeZone> result = null;
81-
if (objs != null)
82-
{
83-
result = new java.util.ArrayList<>();
84-
for (IMendixObject obj : objs)
85-
result.add(system.proxies.TimeZone.initialize(context, obj));
86+
if (objs == null) {
87+
return null;
88+
} else {
89+
return objs.stream()
90+
.map(obj -> system.proxies.TimeZone.initialize(context, obj))
91+
.collect(java.util.stream.Collectors.toList());
8692
}
87-
return result;
8893
}
8994
public static void saveNewAccount(IContext context, administration.proxies.AccountPasswordData _accountPasswordData)
9095
{
@@ -104,4 +109,4 @@ public static void showPasswordForm(IContext context, administration.proxies.Acc
104109
params.put("Account", _account == null ? null : _account.getMendixObject());
105110
Core.microflowCall("Administration.ShowPasswordForm").withParams(params).execute(context);
106111
}
107-
}
112+
}

Source/javasource/atlas_core/proxies/constants/Constants.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88

99
public class Constants
1010
{
11+
/**
12+
* @deprecated
13+
* The default constructor of the Constants class should not be used.
14+
* Use the static get methods instead.
15+
*/
16+
@java.lang.Deprecated(since = "9.12", forRemoval = true)
17+
public Constants() {}
18+
1119
// These are the constants for the Atlas_Core module
1220

1321
public static java.lang.String getAtlas_Core_Version()

Source/javasource/atlas_web_content/proxies/constants/Constants.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88

99
public class Constants
1010
{
11+
/**
12+
* @deprecated
13+
* The default constructor of the Constants class should not be used.
14+
* Use the static get methods instead.
15+
*/
16+
@java.lang.Deprecated(since = "9.12", forRemoval = true)
17+
public Constants() {}
18+
1119
// These are the constants for the Atlas_Web_Content module
1220

1321
public static java.lang.String getAtlas_Web_Content_Version()

Source/javasource/communitycommons/actions/Base64Decode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public java.lang.String executeAction() throws Exception
3636

3737
/**
3838
* Returns a string representation of this action
39+
* @return a string representation of this action
3940
*/
4041
@java.lang.Override
4142
public java.lang.String toString()

Source/javasource/communitycommons/actions/Base64DecodeToFile.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public Base64DecodeToFile(IContext context, java.lang.String encoded, IMendixObj
3535
@java.lang.Override
3636
public java.lang.Boolean executeAction() throws Exception
3737
{
38-
this.targetFile = __targetFile == null ? null : system.proxies.FileDocument.initialize(getContext(), __targetFile);
38+
this.targetFile = this.__targetFile == null ? null : system.proxies.FileDocument.initialize(getContext(), __targetFile);
3939

4040
// BEGIN USER CODE
4141
StringUtils.base64DecodeToFile(getContext(), encoded, targetFile);
@@ -45,6 +45,7 @@ public java.lang.Boolean executeAction() throws Exception
4545

4646
/**
4747
* Returns a string representation of this action
48+
* @return a string representation of this action
4849
*/
4950
@java.lang.Override
5051
public java.lang.String toString()

Source/javasource/communitycommons/actions/Base64Encode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public java.lang.String executeAction() throws Exception
3636

3737
/**
3838
* Returns a string representation of this action
39+
* @return a string representation of this action
3940
*/
4041
@java.lang.Override
4142
public java.lang.String toString()

0 commit comments

Comments
 (0)