@cronapp/templates 2.9.5-SP.1 → 2.9.5-SP.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@cronapp/templates",
3
- "version": "2.9.5-SP.1",
3
+ "version": "2.9.5-SP.10",
4
4
  "cronapp-ide-minimum-version": "2.5.0"
5
5
  }
@@ -544,7 +544,7 @@
544
544
  },
545
545
  {
546
546
  "name": "date",
547
- "type": "java.sql.Timestamp",
547
+ "type": "java.sql.Date",
548
548
  "dbName": "dateCreated",
549
549
  "dbLength": "",
550
550
  "dbPrecision": "",
@@ -177,7 +177,7 @@
177
177
  },
178
178
  {
179
179
  "name": "date",
180
- "type": "java.sql.Timestamp",
180
+ "type": "java.sql.Date",
181
181
  "dbName": "dateCreated",
182
182
  "dbLength": "",
183
183
  "dbPrecision": "",
@@ -6,7 +6,7 @@ file=device.datasource.json
6
6
  file=appUserManager.datasource.json
7
7
  file=auth.datasource.json
8
8
  <#if mutual?? && mutual?lower_case == "sim">
9
- keyManager.datasource.json
9
+ file=keyManager.datasource.json
10
10
  </#if>
11
11
  file=roleManager.datasource.json
12
12
  file=roleSecurableManager.datasource.json
@@ -52,7 +52,7 @@ public class AuditLog implements Serializable {
52
52
  * @generated
53
53
  */
54
54
  @Temporal(TemporalType.TIMESTAMP)
55
- @Column(name = "dateCreated", nullable = false, unique = false, insertable=true, updatable=true, columnDefinition = "TIMESTAMP")
55
+ @Column(name = "dateCreated", nullable = false, unique = false, insertable=true, updatable=true)
56
56
 
57
57
  private java.util.Date date;
58
58
 
@@ -20,6 +20,33 @@ import cronapi.CronapiMetaData.*;
20
20
  @CronapiMetaData(categoryName = "${className?replace("REST", "")?replace("API", "")}")
21
21
  public class ${className} {
22
22
 
23
+ private static void setAuth(org.apache.axis2.client.ServiceClient client) {
24
+ <#if hasAuth>
25
+ <#if isBasicAuth>
26
+ var authorization = "Basic " + java.util.Base64.getEncoder().encodeToString(("${wssUser}"+ ":" + "${wssPwd}").getBytes());
27
+ var namedValuePairs = new java.util.ArrayList<org.apache.axis2.context.NamedValue>();
28
+ namedValuePairs.add(new org.apache.axis2.context.NamedValue("Authorization", authorization));
29
+ client.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.HTTP_HEADERS, namedValuePairs);
30
+ <#else>
31
+ OMFactory fac = OMAbstractFactory.getOMFactory();
32
+ SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
33
+ OMNamespace nsWSSE = fac.createOMNamespace("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "wsse");
34
+ org.apache.axiom.soap.SOAPHeaderBlock header = factory.createSOAPHeaderBlock("Security", nsWSSE);
35
+ header.setMustUnderstand(true);
36
+ OMElement usernameToken = fac.createOMElement("UsernameToken", nsWSSE);
37
+ OMElement username = fac.createOMElement("Username", nsWSSE);
38
+ username.setText("${wssUser}");
39
+ usernameToken.addChild(username);
40
+ OMElement password = fac.createOMElement("Password", nsWSSE);
41
+ password.addAttribute("Type", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText", null);
42
+ password.setText("${wssPwd}");
43
+ usernameToken.addChild(password);
44
+ header.addChild(usernameToken);
45
+ client.addHeader(header);
46
+ </#if>
47
+ </#if>
48
+ }
49
+
23
50
  <#list baseInfo.methods as method>
24
51
  @CronapiMetaData(type = "function", returnType = ObjectType.OBJECT)
25
52
  public static Var ${method.methodName} (
@@ -36,30 +63,8 @@ ${method.returnType} respn = null;
36
63
 
37
64
 
38
65
  ${baseInfo.stubClass} stub = new ${baseInfo.stubClass}();
66
+ ${className}.setAuth(stub._getServiceClient());
39
67
 
40
- <#if hasAuth>
41
- OMFactory fac = OMAbstractFactory.getOMFactory();
42
- SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
43
- OMNamespace nsWSSE = fac.createOMNamespace("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "wsse");
44
-
45
- org.apache.axiom.soap.SOAPHeaderBlock header = factory.createSOAPHeaderBlock("Security", nsWSSE);
46
- header.setMustUnderstand(true);
47
-
48
- OMElement usernameToken = fac.createOMElement("UsernameToken", nsWSSE);
49
-
50
- OMElement username = fac.createOMElement("Username", nsWSSE);
51
- username.setText("${wssUser}");
52
-
53
- usernameToken.addChild(username);
54
-
55
- OMElement password = fac.createOMElement("Password", nsWSSE);
56
- password.addAttribute("Type", "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText", null);
57
- password.setText("${wssPwd}");
58
- usernameToken.addChild(password);
59
- header.addChild(usernameToken);
60
- ServiceClient sender = stub._getServiceClient();
61
- sender.addHeader(header);
62
- </#if>
63
68
  <#list baseInfo.getAllObjectsToInstance(method) as param>
64
69
  <#if param.hasArgumentsInConstructor>
65
70
  //Constructor has arguments - requires manual implementation