diff --git a/Gruntfile.js b/Gruntfile.js index 365ea18..ba46fcd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,4 +1,4 @@ -// Generated on 2016-07-14 using generator-mendix 1.3.6 :: git+https://github.com/mendix/generator-mendix.git +// Generated on 2018-03-08 using generator-mendix 2.0.4 :: git+https://github.com/mendix/generator-mendix.git /*jshint -W069*/ /*global module*/ "use strict"; @@ -13,18 +13,18 @@ var MODELER_ARGS = "/file:{path}"; ********************************************************************************/ var path = require("path"), - mendixApp = require("node-mendix-modeler-path"), - base64 = require("node-base64-image"), - semver = require("semver"), - xml2js = require("xml2js"), - parser = new xml2js.Parser(), - builder = new xml2js.Builder({ - renderOpts: {pretty: true, indent: " ", newline: "\n"}, - xmldec: {standalone: null, encoding: "utf-8"} - }), - shelljs = require("shelljs"), - pkg = require("./package.json"), - currentFolder = shelljs.pwd().toString(); + mendixApp = require("node-mendix-modeler-path"), + base64 = require("node-base64-image"), + semver = require("semver"), + xml2js = require("xml2js"), + parser = new xml2js.Parser(), + builder = new xml2js.Builder({ + renderOpts: { pretty: true, indent: " ", newline: "\n" }, + xmldec: { standalone: null, encoding: "utf-8" } + }), + shelljs = require("shelljs"), + pkg = require("./package.json"), + currentFolder = shelljs.pwd().toString(); var TEST_PATH = path.join(currentFolder, "/test/Test.mpr"); var WIDGET_XML = path.join(currentFolder, "/src/", pkg.name, "/", pkg.name + ".xml"); @@ -55,8 +55,8 @@ module.exports = function (grunt) { grunt.initConfig({ watch: { autoDeployUpdate: { - "files": ["./src/**/*"], - "tasks": ["compress", "newer:copy"], + "files": [ "./src/**/*" ], + "tasks": [ "compress", "newer:copy" ], options: { debounceDelay: 250, livereload: true @@ -69,24 +69,24 @@ module.exports = function (grunt) { archive: "./dist/" + pkg.name + ".mpk", mode: "zip" }, - files: [{ - expand: true, - date: new Date(), - store: false, - cwd: "./src", - src: ["**/*"] - }] + files: [{ + expand: true, + date: new Date(), + store: false, + cwd: "./src", + src: ["**/*"] + }] } }, copy: { deployment: { files: [ - {dest: TEST_WIDGETS_DEPLOYMENT_FOLDER, cwd: "./src/", src: ["**/*"], expand: true} + { dest: TEST_WIDGETS_DEPLOYMENT_FOLDER, cwd: "./src/", src: ["**/*"], expand: true } ] }, mpks: { files: [ - {dest: TEST_WIDGETS_FOLDER, cwd: "./dist/", src: [pkg.name + ".mpk"], expand: true} + { dest: TEST_WIDGETS_FOLDER, cwd: "./dist/", src: [ pkg.name + ".mpk"], expand: true } ] } }, @@ -97,16 +97,10 @@ module.exports = function (grunt) { }, csslint: { strict: { - options: { - import: 2 - }, - src: ["src/" + pkg.name + "/widget/ui/*.css"] - } - }, - jsdoc2md: { - oneOutputFile: { - src: "src/" + pkg.name + "/widget/" + pkg.name + ".js", - dest: "doc/documentation.md" + options: { + import: 2 + }, + src: ["src/" + pkg.name + "/widget/ui/*.css"] } } }); @@ -117,7 +111,6 @@ module.exports = function (grunt) { grunt.loadNpmTasks("grunt-contrib-copy"); grunt.loadNpmTasks("grunt-newer"); grunt.loadNpmTasks("grunt-contrib-csslint"); - grunt.loadNpmTasks('grunt-jsdoc-to-markdown'); grunt.registerTask("start-modeler", function () { var done = this.async(); @@ -178,10 +171,10 @@ module.exports = function (grunt) { grunt.registerTask("generate-icon", function () { var iconPath = path.join(currentFolder, "/icon.png"), - options = {localFile: true, string: true}, - done = this.async(); + options = {localFile: true, string: true}, + done = this.async(); - grunt.log.writeln("Processing icon"); + grunt.log.writeln("Processing icon"); if (!grunt.file.exists(iconPath) || !grunt.file.exists(WIDGET_XML)) { grunt.log.error("can\'t generate icon"); @@ -219,22 +212,22 @@ module.exports = function (grunt) { return done(); }); - grunt.registerTask("start-mendix", ["start-modeler"]); + grunt.registerTask("start-mendix", [ "start-modeler" ]); grunt.registerTask( - "default", - "Watches for changes and automatically creates an MPK file, as well as copying the changes to your deployment folder", - ["watch"] - ); + "default", + "Watches for changes and automatically creates an MPK file, as well as copying the changes to your deployment folder", + [ "watch" ] + ); grunt.registerTask( - "clean build", - "Compiles all the assets and copies the files to the build directory.", - ["clean", "compress", "copy"] - ); + "clean build", + "Compiles all the assets and copies the files to the build directory.", + [ "clean", "compress", "copy" ] + ); grunt.registerTask( - "build", - ["clean build"] - ); + "build", + [ "clean build" ] + ); }; diff --git a/dev/.classpath b/dev/.classpath index 1703b53..0dab67b 100644 --- a/dev/.classpath +++ b/dev/.classpath @@ -2,7 +2,7 @@ - + diff --git a/dev/DropZone5.mpr b/dev/DropZone5.mpr index 4624695..af1403f 100644 Binary files a/dev/DropZone5.mpr and b/dev/DropZone5.mpr differ diff --git a/dev/javasource/administration/proxies/microflows/Microflows.java b/dev/javasource/administration/proxies/microflows/Microflows.java index c30f644..dcb7003 100644 --- a/dev/javasource/administration/proxies/microflows/Microflows.java +++ b/dev/javasource/administration/proxies/microflows/Microflows.java @@ -1,4 +1,4 @@ -// This file was generated by Mendix Modeler 7.0. +// This file was generated by Mendix Modeler 7.12. // // WARNING: Code you write here will be lost the next time you deploy the project. diff --git a/dev/javasource/myfirstmodule/proxies/CustomerImage.java b/dev/javasource/myfirstmodule/proxies/CustomerImage.java index 374fd00..1390daa 100644 --- a/dev/javasource/myfirstmodule/proxies/CustomerImage.java +++ b/dev/javasource/myfirstmodule/proxies/CustomerImage.java @@ -23,6 +23,7 @@ public enum MemberNames DeleteAfterDownload("DeleteAfterDownload"), Contents("Contents"), HasContents("HasContents"), + Size("Size"), CustomerImage_Customer("MyFirstModule.CustomerImage_Customer"); private java.lang.String metaName; diff --git a/dev/javasource/myfirstmodule/proxies/Image.java b/dev/javasource/myfirstmodule/proxies/Image.java index 7270a4c..7dc705f 100644 --- a/dev/javasource/myfirstmodule/proxies/Image.java +++ b/dev/javasource/myfirstmodule/proxies/Image.java @@ -22,7 +22,8 @@ public enum MemberNames Name("Name"), DeleteAfterDownload("DeleteAfterDownload"), Contents("Contents"), - HasContents("HasContents"); + HasContents("HasContents"), + Size("Size"); private java.lang.String metaName; diff --git a/dev/javasource/myfirstmodule/proxies/microflows/Microflows.java b/dev/javasource/myfirstmodule/proxies/microflows/Microflows.java index b8ce1e1..febc6b2 100644 --- a/dev/javasource/myfirstmodule/proxies/microflows/Microflows.java +++ b/dev/javasource/myfirstmodule/proxies/microflows/Microflows.java @@ -1,4 +1,4 @@ -// This file was generated by Mendix Modeler 7.0. +// This file was generated by Mendix Modeler 7.12. // // WARNING: Code you write here will be lost the next time you deploy the project. diff --git a/dev/javasource/system/proxies/FileDocument.java b/dev/javasource/system/proxies/FileDocument.java index 7077a04..07ee989 100644 --- a/dev/javasource/system/proxies/FileDocument.java +++ b/dev/javasource/system/proxies/FileDocument.java @@ -24,7 +24,8 @@ public enum MemberNames Name("Name"), DeleteAfterDownload("DeleteAfterDownload"), Contents("Contents"), - HasContents("HasContents"); + HasContents("HasContents"), + Size("Size"); private java.lang.String metaName; @@ -297,6 +298,42 @@ public final void setHasContents(com.mendix.systemwideinterfaces.core.IContext c getMendixObject().setValue(context, MemberNames.HasContents.toString(), hascontents); } + /** + * @return value of Size + */ + public final java.lang.Long getSize() + { + return getSize(getContext()); + } + + /** + * @param context + * @return value of Size + */ + public final java.lang.Long getSize(com.mendix.systemwideinterfaces.core.IContext context) + { + return (java.lang.Long) getMendixObject().getValue(context, MemberNames.Size.toString()); + } + + /** + * Set value of Size + * @param size + */ + public final void setSize(java.lang.Long size) + { + setSize(getContext(), size); + } + + /** + * Set value of Size + * @param context + * @param size + */ + public final void setSize(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Long size) + { + getMendixObject().setValue(context, MemberNames.Size.toString(), size); + } + /** * @return the IMendixObject instance of this proxy for use in the Core interface. */ diff --git a/dev/javasource/system/proxies/HttpHeader.java b/dev/javasource/system/proxies/HttpHeader.java index 7a87aa0..61b8a12 100644 --- a/dev/javasource/system/proxies/HttpHeader.java +++ b/dev/javasource/system/proxies/HttpHeader.java @@ -184,7 +184,7 @@ public final void setValue(com.mendix.systemwideinterfaces.core.IContext context /** * @return value of HttpHeaders */ - public final system.proxies.HttpResponse getHttpHeaders() throws com.mendix.core.CoreException + public final system.proxies.HttpMessage getHttpHeaders() throws com.mendix.core.CoreException { return getHttpHeaders(getContext()); } @@ -193,12 +193,12 @@ public final system.proxies.HttpResponse getHttpHeaders() throws com.mendix.core * @param context * @return value of HttpHeaders */ - public final system.proxies.HttpResponse getHttpHeaders(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException + public final system.proxies.HttpMessage getHttpHeaders(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException { - system.proxies.HttpResponse result = null; + system.proxies.HttpMessage result = null; com.mendix.systemwideinterfaces.core.IMendixIdentifier identifier = getMendixObject().getValue(context, MemberNames.HttpHeaders.toString()); if (identifier != null) - result = system.proxies.HttpResponse.load(context, identifier); + result = system.proxies.HttpMessage.load(context, identifier); return result; } @@ -206,7 +206,7 @@ public final system.proxies.HttpResponse getHttpHeaders(com.mendix.systemwideint * Set value of HttpHeaders * @param httpheaders */ - public final void setHttpHeaders(system.proxies.HttpResponse httpheaders) + public final void setHttpHeaders(system.proxies.HttpMessage httpheaders) { setHttpHeaders(getContext(), httpheaders); } @@ -216,7 +216,7 @@ public final void setHttpHeaders(system.proxies.HttpResponse httpheaders) * @param context * @param httpheaders */ - public final void setHttpHeaders(com.mendix.systemwideinterfaces.core.IContext context, system.proxies.HttpResponse httpheaders) + public final void setHttpHeaders(com.mendix.systemwideinterfaces.core.IContext context, system.proxies.HttpMessage httpheaders) { if (httpheaders == null) getMendixObject().setValue(context, MemberNames.HttpHeaders.toString(), null); diff --git a/dev/javasource/system/proxies/HttpMessage.java b/dev/javasource/system/proxies/HttpMessage.java new file mode 100644 index 0000000..0cbbece --- /dev/null +++ b/dev/javasource/system/proxies/HttpMessage.java @@ -0,0 +1,242 @@ +// This file was generated by Mendix Modeler. +// +// WARNING: Code you write here will be lost the next time you deploy the project. + +package system.proxies; + +public class HttpMessage +{ + private final com.mendix.systemwideinterfaces.core.IMendixObject httpMessageMendixObject; + + private final com.mendix.systemwideinterfaces.core.IContext context; + + /** + * Internal name of this entity + */ + public static final java.lang.String entityName = "System.HttpMessage"; + + /** + * Enum describing members of this entity + */ + public enum MemberNames + { + HttpVersion("HttpVersion"), + Content("Content"); + + private java.lang.String metaName; + + MemberNames(java.lang.String s) + { + metaName = s; + } + + @Override + public java.lang.String toString() + { + return metaName; + } + } + + public HttpMessage(com.mendix.systemwideinterfaces.core.IContext context) + { + this(context, com.mendix.core.Core.instantiate(context, "System.HttpMessage")); + } + + protected HttpMessage(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject httpMessageMendixObject) + { + if (httpMessageMendixObject == null) + throw new java.lang.IllegalArgumentException("The given object cannot be null."); + if (!com.mendix.core.Core.isSubClassOf("System.HttpMessage", httpMessageMendixObject.getType())) + throw new java.lang.IllegalArgumentException("The given object is not a System.HttpMessage"); + + this.httpMessageMendixObject = httpMessageMendixObject; + this.context = context; + } + + /** + * @deprecated Use 'HttpMessage.load(IContext, IMendixIdentifier)' instead. + */ + @Deprecated + public static system.proxies.HttpMessage initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException + { + return system.proxies.HttpMessage.load(context, mendixIdentifier); + } + + /** + * 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. + * 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). + */ + public static system.proxies.HttpMessage initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject) + { + if (com.mendix.core.Core.isSubClassOf("System.HttpRequest", mendixObject.getType())) + return system.proxies.HttpRequest.initialize(context, mendixObject); + + if (com.mendix.core.Core.isSubClassOf("System.HttpResponse", mendixObject.getType())) + return system.proxies.HttpResponse.initialize(context, mendixObject); + + return new system.proxies.HttpMessage(context, mendixObject); + } + + public static system.proxies.HttpMessage load(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException + { + com.mendix.systemwideinterfaces.core.IMendixObject mendixObject = com.mendix.core.Core.retrieveId(context, mendixIdentifier); + return system.proxies.HttpMessage.initialize(context, mendixObject); + } + + /** + * Commit the changes made on this proxy object. + */ + public final void commit() throws com.mendix.core.CoreException + { + com.mendix.core.Core.commit(context, getMendixObject()); + } + + /** + * Commit the changes made on this proxy object using the specified context. + */ + public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException + { + com.mendix.core.Core.commit(context, getMendixObject()); + } + + /** + * Delete the object. + */ + public final void delete() + { + com.mendix.core.Core.delete(context, getMendixObject()); + } + + /** + * Delete the object using the specified context. + */ + public final void delete(com.mendix.systemwideinterfaces.core.IContext context) + { + com.mendix.core.Core.delete(context, getMendixObject()); + } + /** + * @return value of HttpVersion + */ + public final java.lang.String getHttpVersion() + { + return getHttpVersion(getContext()); + } + + /** + * @param context + * @return value of HttpVersion + */ + public final java.lang.String getHttpVersion(com.mendix.systemwideinterfaces.core.IContext context) + { + return (java.lang.String) getMendixObject().getValue(context, MemberNames.HttpVersion.toString()); + } + + /** + * Set value of HttpVersion + * @param httpversion + */ + public final void setHttpVersion(java.lang.String httpversion) + { + setHttpVersion(getContext(), httpversion); + } + + /** + * Set value of HttpVersion + * @param context + * @param httpversion + */ + public final void setHttpVersion(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String httpversion) + { + getMendixObject().setValue(context, MemberNames.HttpVersion.toString(), httpversion); + } + + /** + * @return value of Content + */ + public final java.lang.String getContent() + { + return getContent(getContext()); + } + + /** + * @param context + * @return value of Content + */ + public final java.lang.String getContent(com.mendix.systemwideinterfaces.core.IContext context) + { + return (java.lang.String) getMendixObject().getValue(context, MemberNames.Content.toString()); + } + + /** + * Set value of Content + * @param content + */ + public final void setContent(java.lang.String content) + { + setContent(getContext(), content); + } + + /** + * Set value of Content + * @param context + * @param content + */ + public final void setContent(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String content) + { + getMendixObject().setValue(context, MemberNames.Content.toString(), content); + } + + /** + * @return the IMendixObject instance of this proxy for use in the Core interface. + */ + public final com.mendix.systemwideinterfaces.core.IMendixObject getMendixObject() + { + return httpMessageMendixObject; + } + + /** + * @return the IContext instance of this proxy, or null if no IContext instance was specified at initialization. + */ + public final com.mendix.systemwideinterfaces.core.IContext getContext() + { + return context; + } + + @Override + public boolean equals(Object obj) + { + if (obj == this) + return true; + + if (obj != null && getClass().equals(obj.getClass())) + { + final system.proxies.HttpMessage that = (system.proxies.HttpMessage) obj; + return getMendixObject().equals(that.getMendixObject()); + } + return false; + } + + @Override + public int hashCode() + { + return getMendixObject().hashCode(); + } + + /** + * @return String name of this class + */ + public static java.lang.String getType() + { + return "System.HttpMessage"; + } + + /** + * @return String GUID from this object, format: ID_0000000000 + * @deprecated Use getMendixObject().getId().toLong() to get a unique identifier for this object. + */ + @Deprecated + public java.lang.String getGUID() + { + return "ID_" + getMendixObject().getId().toLong(); + } +} diff --git a/dev/javasource/system/proxies/HttpRequest.java b/dev/javasource/system/proxies/HttpRequest.java new file mode 100644 index 0000000..a27b0e0 --- /dev/null +++ b/dev/javasource/system/proxies/HttpRequest.java @@ -0,0 +1,147 @@ +// This file was generated by Mendix Modeler. +// +// WARNING: Code you write here will be lost the next time you deploy the project. + +package system.proxies; + +public class HttpRequest extends system.proxies.HttpMessage +{ + /** + * Internal name of this entity + */ + public static final java.lang.String entityName = "System.HttpRequest"; + + /** + * Enum describing members of this entity + */ + public enum MemberNames + { + Uri("Uri"), + HttpVersion("HttpVersion"), + Content("Content"); + + private java.lang.String metaName; + + MemberNames(java.lang.String s) + { + metaName = s; + } + + @Override + public java.lang.String toString() + { + return metaName; + } + } + + public HttpRequest(com.mendix.systemwideinterfaces.core.IContext context) + { + this(context, com.mendix.core.Core.instantiate(context, "System.HttpRequest")); + } + + protected HttpRequest(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject httpRequestMendixObject) + { + super(context, httpRequestMendixObject); + if (!com.mendix.core.Core.isSubClassOf("System.HttpRequest", httpRequestMendixObject.getType())) + throw new java.lang.IllegalArgumentException("The given object is not a System.HttpRequest"); + } + + /** + * @deprecated Use 'HttpRequest.load(IContext, IMendixIdentifier)' instead. + */ + @Deprecated + public static system.proxies.HttpRequest initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException + { + return system.proxies.HttpRequest.load(context, mendixIdentifier); + } + + /** + * 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. + * 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). + */ + public static system.proxies.HttpRequest initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject) + { + return new system.proxies.HttpRequest(context, mendixObject); + } + + public static system.proxies.HttpRequest load(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException + { + com.mendix.systemwideinterfaces.core.IMendixObject mendixObject = com.mendix.core.Core.retrieveId(context, mendixIdentifier); + return system.proxies.HttpRequest.initialize(context, mendixObject); + } + + /** + * @return value of Uri + */ + public final java.lang.String getUri() + { + return getUri(getContext()); + } + + /** + * @param context + * @return value of Uri + */ + public final java.lang.String getUri(com.mendix.systemwideinterfaces.core.IContext context) + { + return (java.lang.String) getMendixObject().getValue(context, MemberNames.Uri.toString()); + } + + /** + * Set value of Uri + * @param uri + */ + public final void setUri(java.lang.String uri) + { + setUri(getContext(), uri); + } + + /** + * Set value of Uri + * @param context + * @param uri + */ + public final void setUri(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String uri) + { + getMendixObject().setValue(context, MemberNames.Uri.toString(), uri); + } + + @Override + public boolean equals(Object obj) + { + if (obj == this) + return true; + + if (obj != null && getClass().equals(obj.getClass())) + { + final system.proxies.HttpRequest that = (system.proxies.HttpRequest) obj; + return getMendixObject().equals(that.getMendixObject()); + } + return false; + } + + @Override + public int hashCode() + { + return getMendixObject().hashCode(); + } + + /** + * @return String name of this class + */ + public static java.lang.String getType() + { + return "System.HttpRequest"; + } + + /** + * @return String GUID from this object, format: ID_0000000000 + * @deprecated Use getMendixObject().getId().toLong() to get a unique identifier for this object. + */ + @Override + @Deprecated + public java.lang.String getGUID() + { + return "ID_" + getMendixObject().getId().toLong(); + } +} diff --git a/dev/javasource/system/proxies/HttpResponse.java b/dev/javasource/system/proxies/HttpResponse.java index bf6c718..390bd6b 100644 --- a/dev/javasource/system/proxies/HttpResponse.java +++ b/dev/javasource/system/proxies/HttpResponse.java @@ -4,12 +4,8 @@ package system.proxies; -public class HttpResponse +public class HttpResponse extends system.proxies.HttpMessage { - private final com.mendix.systemwideinterfaces.core.IMendixObject httpResponseMendixObject; - - private final com.mendix.systemwideinterfaces.core.IContext context; - /** * Internal name of this entity */ @@ -20,9 +16,9 @@ public class HttpResponse */ public enum MemberNames { - HttpVersion("HttpVersion"), StatusCode("StatusCode"), ReasonPhrase("ReasonPhrase"), + HttpVersion("HttpVersion"), Content("Content"); private java.lang.String metaName; @@ -46,13 +42,9 @@ public HttpResponse(com.mendix.systemwideinterfaces.core.IContext context) protected HttpResponse(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject httpResponseMendixObject) { - if (httpResponseMendixObject == null) - throw new java.lang.IllegalArgumentException("The given object cannot be null."); + super(context, httpResponseMendixObject); if (!com.mendix.core.Core.isSubClassOf("System.HttpResponse", httpResponseMendixObject.getType())) throw new java.lang.IllegalArgumentException("The given object is not a System.HttpResponse"); - - this.httpResponseMendixObject = httpResponseMendixObject; - this.context = context; } /** @@ -79,73 +71,6 @@ public static system.proxies.HttpResponse load(com.mendix.systemwideinterfaces.c return system.proxies.HttpResponse.initialize(context, mendixObject); } - /** - * Commit the changes made on this proxy object. - */ - public final void commit() throws com.mendix.core.CoreException - { - com.mendix.core.Core.commit(context, getMendixObject()); - } - - /** - * Commit the changes made on this proxy object using the specified context. - */ - public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException - { - com.mendix.core.Core.commit(context, getMendixObject()); - } - - /** - * Delete the object. - */ - public final void delete() - { - com.mendix.core.Core.delete(context, getMendixObject()); - } - - /** - * Delete the object using the specified context. - */ - public final void delete(com.mendix.systemwideinterfaces.core.IContext context) - { - com.mendix.core.Core.delete(context, getMendixObject()); - } - /** - * @return value of HttpVersion - */ - public final java.lang.String getHttpVersion() - { - return getHttpVersion(getContext()); - } - - /** - * @param context - * @return value of HttpVersion - */ - public final java.lang.String getHttpVersion(com.mendix.systemwideinterfaces.core.IContext context) - { - return (java.lang.String) getMendixObject().getValue(context, MemberNames.HttpVersion.toString()); - } - - /** - * Set value of HttpVersion - * @param httpversion - */ - public final void setHttpVersion(java.lang.String httpversion) - { - setHttpVersion(getContext(), httpversion); - } - - /** - * Set value of HttpVersion - * @param context - * @param httpversion - */ - public final void setHttpVersion(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String httpversion) - { - getMendixObject().setValue(context, MemberNames.HttpVersion.toString(), httpversion); - } - /** * @return value of StatusCode */ @@ -218,58 +143,6 @@ public final void setReasonPhrase(com.mendix.systemwideinterfaces.core.IContext getMendixObject().setValue(context, MemberNames.ReasonPhrase.toString(), reasonphrase); } - /** - * @return value of Content - */ - public final java.lang.String getContent() - { - return getContent(getContext()); - } - - /** - * @param context - * @return value of Content - */ - public final java.lang.String getContent(com.mendix.systemwideinterfaces.core.IContext context) - { - return (java.lang.String) getMendixObject().getValue(context, MemberNames.Content.toString()); - } - - /** - * Set value of Content - * @param content - */ - public final void setContent(java.lang.String content) - { - setContent(getContext(), content); - } - - /** - * Set value of Content - * @param context - * @param content - */ - public final void setContent(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String content) - { - getMendixObject().setValue(context, MemberNames.Content.toString(), content); - } - - /** - * @return the IMendixObject instance of this proxy for use in the Core interface. - */ - public final com.mendix.systemwideinterfaces.core.IMendixObject getMendixObject() - { - return httpResponseMendixObject; - } - - /** - * @return the IContext instance of this proxy, or null if no IContext instance was specified at initialization. - */ - public final com.mendix.systemwideinterfaces.core.IContext getContext() - { - return context; - } - @Override public boolean equals(Object obj) { @@ -302,6 +175,7 @@ public static java.lang.String getType() * @return String GUID from this object, format: ID_0000000000 * @deprecated Use getMendixObject().getId().toLong() to get a unique identifier for this object. */ + @Override @Deprecated public java.lang.String getGUID() { diff --git a/dev/javasource/system/proxies/Image.java b/dev/javasource/system/proxies/Image.java index 9f41515..7229920 100644 --- a/dev/javasource/system/proxies/Image.java +++ b/dev/javasource/system/proxies/Image.java @@ -21,7 +21,8 @@ public enum MemberNames Name("Name"), DeleteAfterDownload("DeleteAfterDownload"), Contents("Contents"), - HasContents("HasContents"); + HasContents("HasContents"), + Size("Size"); private java.lang.String metaName; diff --git a/dev/javasource/system/proxies/UserReportInfo.java b/dev/javasource/system/proxies/UserReportInfo.java new file mode 100644 index 0000000..162702b --- /dev/null +++ b/dev/javasource/system/proxies/UserReportInfo.java @@ -0,0 +1,296 @@ +// This file was generated by Mendix Modeler. +// +// WARNING: Code you write here will be lost the next time you deploy the project. + +package system.proxies; + +public class UserReportInfo +{ + private final com.mendix.systemwideinterfaces.core.IMendixObject userReportInfoMendixObject; + + private final com.mendix.systemwideinterfaces.core.IContext context; + + /** + * Internal name of this entity + */ + public static final java.lang.String entityName = "System.UserReportInfo"; + + /** + * Enum describing members of this entity + */ + public enum MemberNames + { + UserType("UserType"), + Hash("Hash"), + UserReportInfo_User("System.UserReportInfo_User"); + + private java.lang.String metaName; + + MemberNames(java.lang.String s) + { + metaName = s; + } + + @Override + public java.lang.String toString() + { + return metaName; + } + } + + public UserReportInfo(com.mendix.systemwideinterfaces.core.IContext context) + { + this(context, com.mendix.core.Core.instantiate(context, "System.UserReportInfo")); + } + + protected UserReportInfo(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject userReportInfoMendixObject) + { + if (userReportInfoMendixObject == null) + throw new java.lang.IllegalArgumentException("The given object cannot be null."); + if (!com.mendix.core.Core.isSubClassOf("System.UserReportInfo", userReportInfoMendixObject.getType())) + throw new java.lang.IllegalArgumentException("The given object is not a System.UserReportInfo"); + + this.userReportInfoMendixObject = userReportInfoMendixObject; + this.context = context; + } + + /** + * @deprecated Use 'UserReportInfo.load(IContext, IMendixIdentifier)' instead. + */ + @Deprecated + public static system.proxies.UserReportInfo initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException + { + return system.proxies.UserReportInfo.load(context, mendixIdentifier); + } + + /** + * 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. + * 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). + */ + public static system.proxies.UserReportInfo initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject) + { + return new system.proxies.UserReportInfo(context, mendixObject); + } + + public static system.proxies.UserReportInfo load(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixIdentifier mendixIdentifier) throws com.mendix.core.CoreException + { + com.mendix.systemwideinterfaces.core.IMendixObject mendixObject = com.mendix.core.Core.retrieveId(context, mendixIdentifier); + return system.proxies.UserReportInfo.initialize(context, mendixObject); + } + + public static java.util.List load(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String xpathConstraint) throws com.mendix.core.CoreException + { + java.util.List result = new java.util.ArrayList(); + for (com.mendix.systemwideinterfaces.core.IMendixObject obj : com.mendix.core.Core.retrieveXPathQuery(context, "//System.UserReportInfo" + xpathConstraint)) + result.add(system.proxies.UserReportInfo.initialize(context, obj)); + return result; + } + + /** + * Commit the changes made on this proxy object. + */ + public final void commit() throws com.mendix.core.CoreException + { + com.mendix.core.Core.commit(context, getMendixObject()); + } + + /** + * Commit the changes made on this proxy object using the specified context. + */ + public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException + { + com.mendix.core.Core.commit(context, getMendixObject()); + } + + /** + * Delete the object. + */ + public final void delete() + { + com.mendix.core.Core.delete(context, getMendixObject()); + } + + /** + * Delete the object using the specified context. + */ + public final void delete(com.mendix.systemwideinterfaces.core.IContext context) + { + com.mendix.core.Core.delete(context, getMendixObject()); + } + /** + * Set value of UserType + * @param usertype + */ + public final system.proxies.UserType getUserType() + { + return getUserType(getContext()); + } + + /** + * @param context + * @return value of UserType + */ + public final system.proxies.UserType getUserType(com.mendix.systemwideinterfaces.core.IContext context) + { + Object obj = getMendixObject().getValue(context, MemberNames.UserType.toString()); + if (obj == null) + return null; + + return system.proxies.UserType.valueOf((java.lang.String) obj); + } + + /** + * Set value of UserType + * @param usertype + */ + public final void setUserType(system.proxies.UserType usertype) + { + setUserType(getContext(), usertype); + } + + /** + * Set value of UserType + * @param context + * @param usertype + */ + public final void setUserType(com.mendix.systemwideinterfaces.core.IContext context, system.proxies.UserType usertype) + { + if (usertype != null) + getMendixObject().setValue(context, MemberNames.UserType.toString(), usertype.toString()); + else + getMendixObject().setValue(context, MemberNames.UserType.toString(), null); + } + + /** + * @return value of Hash + */ + public final java.lang.String getHash() + { + return getHash(getContext()); + } + + /** + * @param context + * @return value of Hash + */ + public final java.lang.String getHash(com.mendix.systemwideinterfaces.core.IContext context) + { + return (java.lang.String) getMendixObject().getValue(context, MemberNames.Hash.toString()); + } + + /** + * Set value of Hash + * @param hash + */ + public final void setHash(java.lang.String hash) + { + setHash(getContext(), hash); + } + + /** + * Set value of Hash + * @param context + * @param hash + */ + public final void setHash(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String hash) + { + getMendixObject().setValue(context, MemberNames.Hash.toString(), hash); + } + + /** + * @return value of UserReportInfo_User + */ + public final system.proxies.User getUserReportInfo_User() throws com.mendix.core.CoreException + { + return getUserReportInfo_User(getContext()); + } + + /** + * @param context + * @return value of UserReportInfo_User + */ + public final system.proxies.User getUserReportInfo_User(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException + { + system.proxies.User result = null; + com.mendix.systemwideinterfaces.core.IMendixIdentifier identifier = getMendixObject().getValue(context, MemberNames.UserReportInfo_User.toString()); + if (identifier != null) + result = system.proxies.User.load(context, identifier); + return result; + } + + /** + * Set value of UserReportInfo_User + * @param userreportinfo_user + */ + public final void setUserReportInfo_User(system.proxies.User userreportinfo_user) + { + setUserReportInfo_User(getContext(), userreportinfo_user); + } + + /** + * Set value of UserReportInfo_User + * @param context + * @param userreportinfo_user + */ + public final void setUserReportInfo_User(com.mendix.systemwideinterfaces.core.IContext context, system.proxies.User userreportinfo_user) + { + if (userreportinfo_user == null) + getMendixObject().setValue(context, MemberNames.UserReportInfo_User.toString(), null); + else + getMendixObject().setValue(context, MemberNames.UserReportInfo_User.toString(), userreportinfo_user.getMendixObject().getId()); + } + + /** + * @return the IMendixObject instance of this proxy for use in the Core interface. + */ + public final com.mendix.systemwideinterfaces.core.IMendixObject getMendixObject() + { + return userReportInfoMendixObject; + } + + /** + * @return the IContext instance of this proxy, or null if no IContext instance was specified at initialization. + */ + public final com.mendix.systemwideinterfaces.core.IContext getContext() + { + return context; + } + + @Override + public boolean equals(Object obj) + { + if (obj == this) + return true; + + if (obj != null && getClass().equals(obj.getClass())) + { + final system.proxies.UserReportInfo that = (system.proxies.UserReportInfo) obj; + return getMendixObject().equals(that.getMendixObject()); + } + return false; + } + + @Override + public int hashCode() + { + return getMendixObject().hashCode(); + } + + /** + * @return String name of this class + */ + public static java.lang.String getType() + { + return "System.UserReportInfo"; + } + + /** + * @return String GUID from this object, format: ID_0000000000 + * @deprecated Use getMendixObject().getId().toLong() to get a unique identifier for this object. + */ + @Deprecated + public java.lang.String getGUID() + { + return "ID_" + getMendixObject().getId().toLong(); + } +} diff --git a/dev/javasource/system/proxies/UserType.java b/dev/javasource/system/proxies/UserType.java new file mode 100644 index 0000000..f4abf21 --- /dev/null +++ b/dev/javasource/system/proxies/UserType.java @@ -0,0 +1,32 @@ +// This file was generated by Mendix Modeler. +// +// WARNING: Code you write here will be lost the next time you deploy the project. + +package system.proxies; + +public enum UserType +{ + Internal(new java.lang.String[][] { new java.lang.String[] { "en_US", "Internal" }, new java.lang.String[] { "nl_NL", "Intern" } }), + External(new java.lang.String[][] { new java.lang.String[] { "en_US", "External" }, new java.lang.String[] { "nl_NL", "Extern" } }); + + private java.util.Map captions; + + private UserType(java.lang.String[][] captionStrings) + { + this.captions = new java.util.HashMap(); + for (java.lang.String[] captionString : captionStrings) + captions.put(captionString[0], captionString[1]); + } + + public java.lang.String getCaption(java.lang.String languageCode) + { + if (captions.containsKey(languageCode)) + return captions.get(languageCode); + return captions.get("en_US"); + } + + public java.lang.String getCaption() + { + return captions.get("en_US"); + } +} diff --git a/dev/javasource/system/proxies/microflows/Microflows.java b/dev/javasource/system/proxies/microflows/Microflows.java index 385e01f..75e3876 100644 --- a/dev/javasource/system/proxies/microflows/Microflows.java +++ b/dev/javasource/system/proxies/microflows/Microflows.java @@ -1,4 +1,4 @@ -// This file was generated by Mendix Modeler 7.0. +// This file was generated by Mendix Modeler 7.12. // // WARNING: Code you write here will be lost the next time you deploy the project. diff --git a/dev/widgets/SprintrFeedbackWidget.mpk b/dev/widgets/SprintrFeedbackWidget.mpk index 96dd6cc..656800d 100644 Binary files a/dev/widgets/SprintrFeedbackWidget.mpk and b/dev/widgets/SprintrFeedbackWidget.mpk differ diff --git a/dist/DropZone.mpk b/dist/DropZone.mpk index 6d57274..7c5f93f 100644 Binary files a/dist/DropZone.mpk and b/dist/DropZone.mpk differ diff --git a/package.json b/package.json index 108d997..93fa05b 100644 --- a/package.json +++ b/package.json @@ -1,30 +1,35 @@ { "name": "DropZone", - "version": "3.1.0", + "version": "4.0.2", "description": "Drop multiple images or documents and upload", - "private": false, - "dependencies": {}, + "license": "", + "author": "", + "private": true, + "dependencies": { + }, "devDependencies": { - "grunt": "0.4.5", - "grunt-contrib-clean": "^0.6.0", - "grunt-contrib-compress": "^0.14.0", - "grunt-contrib-copy": "^0.8.2", - "grunt-contrib-watch": "^0.6.1", - "grunt-jsdoc-to-markdown": "^1.2.1", - "grunt-newer": "^1.1.1", - "node-base64-image": "^0.1.0", + "grunt": "^1.0.1", + "grunt-contrib-clean": "^1.0.0", + "grunt-contrib-compress": "^1.3.0", + "grunt-contrib-copy": "^1.0.0", + "grunt-contrib-csslint": "^1.0.0", + "grunt-contrib-watch": "^1.0.0", + "grunt-newer": "^1.2.0", + "node-base64-image": "^0.1.2", "node-mendix-modeler-path": "https://github.com/JelteMX/node-mendix-modeler-path/archive/v1.0.0.tar.gz", - "shelljs": "^0.5.3", - "xml2js": "^0.4.15" - }, - "repository": { - "type": "git", - "url": "https://github.com/ChrisDeG/DropZone" + "semver": "^5.1.0", + "shelljs": "^0.7.4", + "xml2js": "^0.4.17" }, "engines": { - "node": ">=0.12.0" + "node": ">=5" + }, + "generatorVersion": "2.0.4", + "paths": { + "testProjectFolder": "./test/", + "testProjectFileName": "Test.mpr" }, "scripts": { - "test": "grunt test" + "build": "grunt build" } } diff --git a/src/DropZone/widget/DropZone.js b/src/DropZone/widget/DropZone.js index 7f3fa17..739d77f 100644 --- a/src/DropZone/widget/DropZone.js +++ b/src/DropZone/widget/DropZone.js @@ -5,7 +5,7 @@ DropZone ======================== @file : Dropzone.js - @version : 4.0.2 + @version : 4.0.3 @author : Andries Smit & Chris de Gelder @date : 06-09-2017 @license : Apache V2 @@ -13,8 +13,9 @@ Documentation ======================== Drop multiple images or documents and upload. - Mendix 7.x version. - + Mendix 7.12 version. + - 8-3-2018 mxui.dom. functions replaced with domConstruct.create + - 8-3-2018 Merge csrftoken (Thanks Jelte) To be done: - fix, upload button image @@ -88,7 +89,7 @@ define([ logger.debug(this.id + ".initDropZone"); domConstruct.empty(this.domNode); if (!this.autoUpload) { - this.uploadButton = new mxui.dom.create('Button', { + this.uploadButton = domConstruct.create('button', { type: 'button', class: 'btn mx-button btn-default', icon: "mxclientsystem/mxui/widget/styles/images/MxFileInput/uploading.gif" @@ -104,7 +105,7 @@ define([ height = "100%"; width = "100%"; } - this.domNode.appendChild(mxui.dom.create("div", { + this.domNode.appendChild(domConstruct.create("div", { "id": this.id + "_zone", "class": "dropzone", "style": "height: " + height + "; width: " + width + ";" @@ -359,7 +360,7 @@ define([ logger.error("callOnChange", e); } }); - } + } }, /** * mxui.widget._WidgetBase.uninitialize is called when the widget is destroyed. Implement to do special tear-down work. diff --git a/src/package.xml b/src/package.xml index 065e7c1..1124e13 100644 --- a/src/package.xml +++ b/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/test/DropZone6.mpr b/test/DropZone6.mpr index b0fafbe..54e409d 100644 Binary files a/test/DropZone6.mpr and b/test/DropZone6.mpr differ diff --git a/test/widgets/DropZone.mpk b/test/widgets/DropZone.mpk index 6d57274..7c5f93f 100644 Binary files a/test/widgets/DropZone.mpk and b/test/widgets/DropZone.mpk differ