|
1 | | -// This file was generated by Mendix Studio Pro. |
2 | | -// |
3 | | -// WARNING: Only the following code will be retained when actions are regenerated: |
4 | | -// - the import list |
5 | | -// - the code between BEGIN USER CODE and END USER CODE |
6 | | -// - the code between BEGIN EXTRA CODE and END EXTRA CODE |
7 | | -// Other code you write will be lost the next time you deploy the project. |
8 | | -// Special characters, e.g., é, ö, à, etc. are supported in comments. |
9 | | - |
10 | | -package communitycommons.actions; |
11 | | - |
12 | | -import com.mendix.systemwideinterfaces.core.IMendixObject; |
13 | | -import communitycommons.StringUtils; |
14 | | -import com.mendix.systemwideinterfaces.core.IContext; |
15 | | -import com.mendix.systemwideinterfaces.core.UserAction; |
16 | | - |
17 | | -/** |
18 | | - * Stores an base 64 encoded string plain in the provided target file document |
19 | | - * |
20 | | - * Note that targetFile will be committed. |
21 | | - */ |
22 | | -public class Base64DecodeToFile extends UserAction<java.lang.Boolean> |
23 | | -{ |
24 | | - private final java.lang.String encoded; |
25 | | - /** @deprecated use targetFile.getMendixObject() instead. */ |
26 | | - @java.lang.Deprecated(forRemoval = true) |
27 | | - private final IMendixObject __targetFile; |
28 | | - private final system.proxies.FileDocument targetFile; |
29 | | - |
30 | | - public Base64DecodeToFile( |
31 | | - IContext context, |
32 | | - java.lang.String _encoded, |
33 | | - IMendixObject _targetFile |
34 | | - ) |
35 | | - { |
36 | | - super(context); |
37 | | - this.encoded = _encoded; |
38 | | - this.__targetFile = _targetFile; |
39 | | - this.targetFile = _targetFile == null ? null : system.proxies.FileDocument.initialize(getContext(), _targetFile); |
40 | | - } |
41 | | - |
42 | | - @java.lang.Override |
43 | | - public java.lang.Boolean executeAction() throws Exception |
44 | | - { |
45 | | - // BEGIN USER CODE |
46 | | - StringUtils.base64DecodeToFile(getContext(), encoded, targetFile); |
47 | | - return true; |
48 | | - // END USER CODE |
49 | | - } |
50 | | - |
51 | | - /** |
52 | | - * Returns a string representation of this action |
53 | | - * @return a string representation of this action |
54 | | - */ |
55 | | - @java.lang.Override |
56 | | - public java.lang.String toString() |
57 | | - { |
58 | | - return "Base64DecodeToFile"; |
59 | | - } |
60 | | - |
61 | | - // BEGIN EXTRA CODE |
62 | | - // END EXTRA CODE |
63 | | -} |
| 1 | +// This file was generated by Mendix Studio Pro. |
| 2 | +// |
| 3 | +// WARNING: Only the following code will be retained when actions are regenerated: |
| 4 | +// - the import list |
| 5 | +// - the code between BEGIN USER CODE and END USER CODE |
| 6 | +// - the code between BEGIN EXTRA CODE and END EXTRA CODE |
| 7 | +// Other code you write will be lost the next time you deploy the project. |
| 8 | +// Special characters, e.g., é, ö, à, etc. are supported in comments. |
| 9 | + |
| 10 | +package communitycommons.actions; |
| 11 | + |
| 12 | +import com.mendix.systemwideinterfaces.core.IMendixObject; |
| 13 | +import communitycommons.StringUtils; |
| 14 | +import com.mendix.systemwideinterfaces.core.IContext; |
| 15 | +import com.mendix.systemwideinterfaces.core.UserAction; |
| 16 | + |
| 17 | +/** |
| 18 | + * Stores an base 64 encoded string plain in the provided target file document |
| 19 | + * |
| 20 | + * Note that targetFile will be committed. |
| 21 | + */ |
| 22 | +public class Base64DecodeToFile extends UserAction<java.lang.Boolean> |
| 23 | +{ |
| 24 | + private final java.lang.String encoded; |
| 25 | + /** @deprecated use targetFile.getMendixObject() instead. */ |
| 26 | + @java.lang.Deprecated(forRemoval = true) |
| 27 | + private final IMendixObject __targetFile; |
| 28 | + private final system.proxies.FileDocument targetFile; |
| 29 | + |
| 30 | + public Base64DecodeToFile( |
| 31 | + IContext context, |
| 32 | + java.lang.String _encoded, |
| 33 | + IMendixObject _targetFile |
| 34 | + ) |
| 35 | + { |
| 36 | + super(context); |
| 37 | + this.encoded = _encoded; |
| 38 | + this.__targetFile = _targetFile; |
| 39 | + this.targetFile = _targetFile == null ? null : system.proxies.FileDocument.initialize(getContext(), _targetFile); |
| 40 | + } |
| 41 | + |
| 42 | + @java.lang.Override |
| 43 | + public java.lang.Boolean executeAction() throws Exception |
| 44 | + { |
| 45 | + // BEGIN USER CODE |
| 46 | + StringUtils.base64DecodeToFile(getContext(), encoded, targetFile); |
| 47 | + return true; |
| 48 | + // END USER CODE |
| 49 | + } |
| 50 | + |
| 51 | + /** |
| 52 | + * Returns a string representation of this action |
| 53 | + * @return a string representation of this action |
| 54 | + */ |
| 55 | + @java.lang.Override |
| 56 | + public java.lang.String toString() |
| 57 | + { |
| 58 | + return "Base64DecodeToFile"; |
| 59 | + } |
| 60 | + |
| 61 | + // BEGIN EXTRA CODE |
| 62 | + // END EXTRA CODE |
| 63 | +} |
0 commit comments