b4c98816 by acetousk

First commit

1 parent e4712112
1 .*.sw? 1 .*.sw?
2
3 # runtime added files
4 build
5 lib/example-*.jar
6
7 # IntelliJ IDEA files
8 .idea/
9 out/
10 *.ipr
11 *.iws
12 *.iml
13
14 # Eclipse files (and some general ones also used by Eclipse)
15 .metadata
16 .gradle
17 bin/
18 tmp/
19 *.tmp
20 *.bak
21 *.swp
22 *~.nib
23 local.properties
24 .settings/
25 .loadpath
26
27 # NetBeans files
28 nbproject/private/
29 nbbuild/
30 .nb-gradle/
31 dist/
32 nbdist/
33 nbactions.xml
34 nb-configuration.xml
35
36 # OSX auto files
37 .DS_Store
38 .AppleDouble
39 .LSOverride
40 ._*
41
42 # Windows auto files
43 Thumbs.db
44 ehthumbs.db
45 Desktop.ini
46
47 # Linux auto files
48 *~
......
1 Mantle Business Artifacts (http://github.com/moqui/mantle)
2
3 This software is in the public domain under CC0 1.0 Universal plus a
4 Grant of Patent License.
5
6 To the extent possible under law, the author(s) have dedicated all
7 copyright and related and neighboring rights to this software to the
8 public domain worldwide. This software is distributed without any
9 warranty.
10
11 You should have received a copy of the CC0 Public Domain Dedication
12 along with this software (see the LICENSE.md file). If not, see
13 <http://creativecommons.org/publicdomain/zero/1.0/>.
14
15 ===========================================================================
16
17 Copyright Waiver
18
19 I dedicate any and all copyright interest in this software to the
20 public domain. I make this dedication for the benefit of the public at
21 large and to the detriment of my heirs and successors. I intend this
22 dedication to be an overt act of relinquishment in perpetuity of all
23 present and future rights to this software under copyright law.
24
25 To the best of my knowledge and belief, my contributions are either
26 originally authored by me or are derived from prior works which I have
27 verified are also in the public domain and are not subject to claims
28 of copyright by other parties.
29
30 To the best of my knowledge and belief, no individual, business,
31 organization, government, or other entity has any copyright interest
32 in my contributions, and I affirm that I will not make contributions
33 that are otherwise encumbered.
34
35 Signed by git commit adding my legal name and git username:
36
37 Written in 2024 by Michael Jones - acetousk
38
39 ===========================================================================
40
41 Grant of Patent License
42
43 I hereby grant to recipients of software a perpetual, worldwide,
44 non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
45 this section) patent license to make, have made, use, offer to sell, sell,
46 import, and otherwise transfer the Work, where such license applies only to
47 those patent claims licensable by me that are necessarily infringed by my
48 Contribution(s) alone or by combination of my Contribution(s) with the
49 Work to which such Contribution(s) was submitted. If any entity institutes
50 patent litigation against me or any other entity (including a cross-claim
51 or counterclaim in a lawsuit) alleging that my Contribution, or the Work to
52 which I have contributed, constitutes direct or contributory patent
53 infringement, then any patent licenses granted to that entity under this
54 Agreement for that Contribution or Work shall terminate as of the date such
55 litigation is filed.
56
57 Signed by git commit adding my legal name and git username:
58
59 Written in 2024 by Michael Jones - acetousk
1 Because of a lack of patent licensing in CC0 1.0 this software includes a
2 separate Grant of Patent License adapted from Apache License 2.0.
3
4 ===========================================================================
5
6 Creative Commons Legal Code
7
8 CC0 1.0 Universal
9
10 CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
11 LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
12 ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
13 INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
14 REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
15 PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
16 THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
17 HEREUNDER.
18
19 Statement of Purpose
20
21 The laws of most jurisdictions throughout the world automatically confer
22 exclusive Copyright and Related Rights (defined below) upon the creator
23 and subsequent owner(s) (each and all, an "owner") of an original work of
24 authorship and/or a database (each, a "Work").
25
26 Certain owners wish to permanently relinquish those rights to a Work for
27 the purpose of contributing to a commons of creative, cultural and
28 scientific works ("Commons") that the public can reliably and without fear
29 of later claims of infringement build upon, modify, incorporate in other
30 works, reuse and redistribute as freely as possible in any form whatsoever
31 and for any purposes, including without limitation commercial purposes.
32 These owners may contribute to the Commons to promote the ideal of a free
33 culture and the further production of creative, cultural and scientific
34 works, or to gain reputation or greater distribution for their Work in
35 part through the use and efforts of others.
36
37 For these and/or other purposes and motivations, and without any
38 expectation of additional consideration or compensation, the person
39 associating CC0 with a Work (the "Affirmer"), to the extent that he or she
40 is an owner of Copyright and Related Rights in the Work, voluntarily
41 elects to apply CC0 to the Work and publicly distribute the Work under its
42 terms, with knowledge of his or her Copyright and Related Rights in the
43 Work and the meaning and intended legal effect of CC0 on those rights.
44
45 1. Copyright and Related Rights. A Work made available under CC0 may be
46 protected by copyright and related or neighboring rights ("Copyright and
47 Related Rights"). Copyright and Related Rights include, but are not
48 limited to, the following:
49
50 i. the right to reproduce, adapt, distribute, perform, display,
51 communicate, and translate a Work;
52 ii. moral rights retained by the original author(s) and/or performer(s);
53 iii. publicity and privacy rights pertaining to a person's image or
54 likeness depicted in a Work;
55 iv. rights protecting against unfair competition in regards to a Work,
56 subject to the limitations in paragraph 4(a), below;
57 v. rights protecting the extraction, dissemination, use and reuse of data
58 in a Work;
59 vi. database rights (such as those arising under Directive 96/9/EC of the
60 European Parliament and of the Council of 11 March 1996 on the legal
61 protection of databases, and under any national implementation
62 thereof, including any amended or successor version of such
63 directive); and
64 vii. other similar, equivalent or corresponding rights throughout the
65 world based on applicable law or treaty, and any national
66 implementations thereof.
67
68 2. Waiver. To the greatest extent permitted by, but not in contravention
69 of, applicable law, Affirmer hereby overtly, fully, permanently,
70 irrevocably and unconditionally waives, abandons, and surrenders all of
71 Affirmer's Copyright and Related Rights and associated claims and causes
72 of action, whether now known or unknown (including existing as well as
73 future claims and causes of action), in the Work (i) in all territories
74 worldwide, (ii) for the maximum duration provided by applicable law or
75 treaty (including future time extensions), (iii) in any current or future
76 medium and for any number of copies, and (iv) for any purpose whatsoever,
77 including without limitation commercial, advertising or promotional
78 purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
79 member of the public at large and to the detriment of Affirmer's heirs and
80 successors, fully intending that such Waiver shall not be subject to
81 revocation, rescission, cancellation, termination, or any other legal or
82 equitable action to disrupt the quiet enjoyment of the Work by the public
83 as contemplated by Affirmer's express Statement of Purpose.
84
85 3. Public License Fallback. Should any part of the Waiver for any reason
86 be judged legally invalid or ineffective under applicable law, then the
87 Waiver shall be preserved to the maximum extent permitted taking into
88 account Affirmer's express Statement of Purpose. In addition, to the
89 extent the Waiver is so judged Affirmer hereby grants to each affected
90 person a royalty-free, non transferable, non sublicensable, non exclusive,
91 irrevocable and unconditional license to exercise Affirmer's Copyright and
92 Related Rights in the Work (i) in all territories worldwide, (ii) for the
93 maximum duration provided by applicable law or treaty (including future
94 time extensions), (iii) in any current or future medium and for any number
95 of copies, and (iv) for any purpose whatsoever, including without
96 limitation commercial, advertising or promotional purposes (the
97 "License"). The License shall be deemed effective as of the date CC0 was
98 applied by Affirmer to the Work. Should any part of the License for any
99 reason be judged legally invalid or ineffective under applicable law, such
100 partial invalidity or ineffectiveness shall not invalidate the remainder
101 of the License, and in such case Affirmer hereby affirms that he or she
102 will not (i) exercise any of his or her remaining Copyright and Related
103 Rights in the Work or (ii) assert any associated claims and causes of
104 action with respect to the Work, in either case contrary to Affirmer's
105 express Statement of Purpose.
106
107 4. Limitations and Disclaimers.
108
109 a. No trademark or patent rights held by Affirmer are waived, abandoned,
110 surrendered, licensed or otherwise affected by this document.
111 b. Affirmer offers the Work as-is and makes no representations or
112 warranties of any kind concerning the Work, express, implied,
113 statutory or otherwise, including without limitation warranties of
114 title, merchantability, fitness for a particular purpose, non
115 infringement, or the absence of latent or other defects, accuracy, or
116 the present or absence of errors, whether or not discoverable, all to
117 the greatest extent permissible under applicable law.
118 c. Affirmer disclaims responsibility for clearing rights of other persons
119 that may apply to the Work or any use thereof, including without
120 limitation any person's Copyright and Related Rights in the Work.
121 Further, Affirmer disclaims responsibility for obtaining any necessary
122 consents, permissions or other rights required for any use of the
123 Work.
124 d. Affirmer understands and acknowledges that Creative Commons is not a
125 party to this document and has no duty or obligation with respect to
126 this CC0 or use of the Work.
127
128
129 ===========================================================================
130
131 Grant of Patent License
132
133 "License" shall mean the terms and conditions for use, reproduction, and
134 distribution.
135
136 "Licensor" shall mean the original copyright owner or entity authorized by
137 the original copyright owner that is granting the License.
138
139 "Legal Entity" shall mean the union of the acting entity and all other
140 entities that control, are controlled by, or are under common control with
141 that entity. For the purposes of this definition, "control" means (i) the
142 power, direct or indirect, to cause the direction or management of such
143 entity, whether by contract or otherwise, or (ii) ownership of fifty
144 percent (50%) or more of the outstanding shares, or (iii) beneficial
145 ownership of such entity.
146
147 "You" (or "Your") shall mean an individual or Legal Entity exercising
148 permissions granted by this License.
149
150 "Source" form shall mean the preferred form for making modifications,
151 including but not limited to software source code, documentation source,
152 and configuration files.
153
154 "Object" form shall mean any form resulting from mechanical transformation
155 or translation of a Source form, including but not limited to compiled
156 object code, generated documentation, and conversions to other media types.
157
158 "Work" shall mean the work of authorship, whether in Source or Object form,
159 made available under the License, as indicated by a copyright notice that
160 is included in or attached to the work.
161
162 "Derivative Works" shall mean any work, whether in Source or Object form,
163 that is based on (or derived from) the Work and for which the editorial
164 revisions, annotations, elaborations, or other modifications represent, as
165 a whole, an original work of authorship. For the purposes of this License,
166 Derivative Works shall not include works that remain separable from, or
167 merely link (or bind by name) to the interfaces of, the Work and
168 Derivative Works thereof.
169
170 "Contribution" shall mean any work of authorship, including the original
171 version of the Work and any modifications or additions to that Work or
172 Derivative Works thereof, that is intentionally submitted to Licensor for
173 inclusion in the Work by the copyright owner or by an individual or Legal
174 Entity authorized to submit on behalf of the copyright owner. For the
175 purposes of this definition, "submitted" means any form of electronic,
176 verbal, or written communication sent to the Licensor or its
177 representatives, including but not limited to communication on electronic
178 mailing lists, source code control systems, and issue tracking systems that
179 are managed by, or on behalf of, the Licensor for the purpose of discussing
180 and improving the Work, but excluding communication that is conspicuously
181 marked or otherwise designated in writing by the copyright owner as "Not a
182 Contribution."
183
184 "Contributor" shall mean Licensor and any individual or Legal Entity on
185 behalf of whom a Contribution has been received by Licensor and
186 subsequently incorporated within the Work.
187
188 Each Contributor hereby grants to You a perpetual, worldwide,
189 non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
190 this section) patent license to make, have made, use, offer to sell, sell,
191 import, and otherwise transfer the Work, where such license applies only to
192 those patent claims licensable by such Contributor that are necessarily
193 infringed by their Contribution(s) alone or by combination of their
194 Contribution(s) with the Work to which such Contribution(s) was submitted.
195 If You institute patent litigation against any entity (including a
196 cross-claim or counterclaim in a lawsuit) alleging that the Work or a
197 Contribution incorporated within the Work constitutes direct or
198 contributory patent infringement, then any patent licenses granted to You
199 under this License for that Work shall terminate as of the date such
200 litigation is filed.
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!-- No copyright or license for configuration file, details here are not considered a creative work. -->
3 <moqui-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/moqui-conf-3.xsd">
4 <screen-facade>
5 <screen location="component://webroot/screen/webroot/apps.xml">
6 <subscreens-item name="mjml" menu-title="Moqui Mjml" menu-index="97" location="component://moqui-mjml/screen/MjmlApp.xml"/>
7 </screen>
8 </screen-facade>
9 </moqui-conf>
1 ## Moqui Mjml
2
3 Mjml Component with:
4
5 - way to edit email templates with mjml
6
7 To install run (with moqui-framework):
8
9 $ ./gradlew getComponent -Pcomponent=moqui-mjml
1 /*
2 * This software is in the public domain under CC0 1.0 Universal plus a
3 * Grant of Patent License.
4 *
5 * To the extent possible under law, the author(s) have dedicated all
6 * copyright and related and neighboring rights to this software to the
7 * public domain worldwide. This software is distributed without any
8 * warranty.
9 *
10 * You should have received a copy of the CC0 Public Domain Dedication
11 * along with this software (see the LICENSE.md file). If not, see
12 * <http://creativecommons.org/publicdomain/zero/1.0/>.
13 */
14
15 apply plugin: 'groovy'
16
17 version = '3.0.0'
18 // sourceCompatibility = '1.8'
19 def moquiDir = file(projectDir.absolutePath + '/../../..')
20 def frameworkDir = file(moquiDir.absolutePath + '/framework')
21
22 repositories {
23 flatDir name: 'localLib', dirs: frameworkDir.absolutePath + '/lib'
24 mavenCentral()
25 }
26
27 // Log4J has annotation processors, disable to avoid warning
28 tasks.withType(JavaCompile) { options.compilerArgs << "-proc:none" }
29 tasks.withType(GroovyCompile) { options.compilerArgs << "-proc:none" }
30
31 dependencies {
32 implementation project(':framework')
33 testImplementation project(':framework').configurations.testImplementation.allDependencies
34 }
35
36 // by default the Java plugin runs test on build, change to not do that (only run test if explicit task)
37 // no longer workds as of gradle 4.8 or possibly earlier, use clear() instead: check.dependsOn.remove(test)
38 check.dependsOn.clear()
39
40 jar {
41 destinationDirectory = file(projectDir.absolutePath + '/lib')
42 // this is required to change from the default that includes the path to this module (ie 'runtime/component/mjml')
43 archiveBaseName = 'moqui-mjml'
44 }
45 task cleanLib(type: Delete) { delete file(jar.archivePath) }
46 clean.dependsOn cleanLib
47
48 test {
49 useJUnitPlatform()
50 testLogging { events "passed", "skipped", "failed" }
51 testLogging.showStandardStreams = true; testLogging.showExceptions = true
52 maxParallelForks 1
53
54 dependsOn cleanTest
55
56 systemProperty 'moqui.runtime', moquiDir.absolutePath + '/runtime'
57 systemProperty 'moqui.conf', 'conf/MoquiDevConf.xml'
58 systemProperty 'moqui.init.static', 'true'
59 maxHeapSize = "512M"
60
61 classpath += files(sourceSets.main.output.classesDirs)
62 // filter out classpath entries that don't exist (gradle adds a bunch of these), or ElasticSearch JarHell will blow up
63 classpath = classpath.filter { it.exists() }
64
65 beforeTest { descriptor ->
66 logger.lifecycle("Running test: ${descriptor}")
67 }
68 }
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 This software is in the public domain under CC0 1.0 Universal plus a
4 Grant of Patent License.
5
6 To the extent possible under law, the author(s) have dedicated all
7 copyright and related and neighboring rights to this software to the
8 public domain worldwide. This software is distributed without any
9 warranty.
10
11 You should have received a copy of the CC0 Public Domain Dedication
12 along with this software (see the LICENSE.md file). If not, see
13 <http://creativecommons.org/publicdomain/zero/1.0/>.
14 -->
15 <entity-facade-xml type="seed-initial">
16 <!-- NOTE: subscreen configuration is now in the MoquiConf.xml file instead of DB records
17 <moqui.screen.SubscreensItem screenLocation="component://webroot/screen/webroot/apps.xml" subscreenName="mjml" menuTitle="Example"
18 menuIndex="97" menuInclude="Y" subscreenLocation="component://mjml/screen/MjmlApp.xml"/>
19 -->
20
21 <!-- Artifact group for all of the Moqui Mjml application via the MoquiMjmlApp screen (the root screen for the app) -->
22 <moqui.security.ArtifactGroup artifactGroupId="MOQUI_MJML_APP" description="Moqui Mjml App (via root screen)"/>
23 <moqui.security.ArtifactGroupMember artifactGroupId="MOQUI_MJML_APP" artifactTypeEnumId="AT_XML_SCREEN"
24 inheritAuthz="Y" artifactName="component://moqui-mjml/screen/MjmlApp.xml"/>
25 <!-- Full permissions for the ADMIN user group -->
26 <moqui.security.ArtifactAuthz artifactAuthzId="MOQUI_MJML_AUTHZ_ALL" userGroupId="ADMIN" artifactGroupId="MOQUI_MJML_APP"
27 authzTypeEnumId="AUTHZT_ALWAYS" authzActionEnumId="AUTHZA_ALL"/>
28
29 <!-- Artifact group for all of the Moqui Mjml REST API via the mjml resource (the root resource) -->
30 <moqui.security.ArtifactGroup artifactGroupId="MOQUI_MJML_API" description="Example REST API (via root resource)"/>
31 <moqui.security.ArtifactGroupMember artifactGroupId="MOQUI_MJML_API" artifactTypeEnumId="AT_REST_PATH"
32 inheritAuthz="Y" artifactName="/example"/>
33 <!-- Full permissions for the ADMIN user group -->
34 <moqui.security.ArtifactAuthz artifactAuthzId="MOQUI_MJML_API_AUTHZ_ALL" userGroupId="ADMIN" artifactGroupId="MOQUI_MJML_API"
35 authzTypeEnumId="AUTHZT_ALWAYS" authzActionEnumId="AUTHZA_ALL"/>
36 </entity-facade-xml>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 This software is in the public domain under CC0 1.0 Universal plus a
4 Grant of Patent License.
5
6 To the extent possible under law, the author(s) have dedicated all
7 copyright and related and neighboring rights to this software to the
8 public domain worldwide. This software is distributed without any
9 warranty.
10
11 You should have received a copy of the CC0 Public Domain Dedication
12 along with this software (see the LICENSE.md file). If not, see
13 <http://creativecommons.org/publicdomain/zero/1.0/>.
14 -->
15 <entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/entity-definition-3.xsd">
16
17 </entities>
1 JAR files go in this directory and are picked up automatically by Moqui Framework based on the convention of the directory name 'lib'.
2
3 The build.gradle file uses this directory as the target for the built jar file, and deletes the built jar file as part of the clean task.
4
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 This software is in the public domain under CC0 1.0 Universal plus a
4 Grant of Patent License.
5
6 To the extent possible under law, the author(s) have dedicated all
7 copyright and related and neighboring rights to this software to the
8 public domain worldwide. This software is distributed without any
9 warranty.
10
11 You should have received a copy of the CC0 Public Domain Dedication
12 along with this software (see the LICENSE.md file). If not, see
13 <http://creativecommons.org/publicdomain/zero/1.0/>.
14 -->
15 <screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16 xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
17 menu-image="fa fa-flash" menu-image-type="icon" standalone="true">
18
19
20
21 <widgets>
22
23 </widgets>
24 </screen>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 This software is in the public domain under CC0 1.0 Universal plus a
4 Grant of Patent License.
5
6 To the extent possible under law, the author(s) have dedicated all
7 copyright and related and neighboring rights to this software to the
8 public domain worldwide. This software is distributed without any
9 warranty.
10
11 You should have received a copy of the CC0 Public Domain Dedication
12 along with this software (see the LICENSE.md file). If not, see
13 <http://creativecommons.org/publicdomain/zero/1.0/>.
14 -->
15
16 <!-- General Guideline Verbs: GET=find, POST=create, PUT=store (create or update), PATCH=update, DELETE=delete -->
17
18 <resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/rest-api-3.xsd"
19 name="moqui-mjml" displayName="Mjml REST API" version="2.0.0">
20
21 </resource>
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 This software is in the public domain under CC0 1.0 Universal plus a
4 Grant of Patent License.
5
6 To the extent possible under law, the author(s) have dedicated all
7 copyright and related and neighboring rights to this software to the
8 public domain worldwide. This software is distributed without any
9 warranty.
10
11 You should have received a copy of the CC0 Public Domain Dedication
12 along with this software (see the LICENSE.md file). If not, see
13 <http://creativecommons.org/publicdomain/zero/1.0/>.
14 -->
15 <services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/service-definition-3.xsd">
16
17
18 </services>