├── .gitignore ├── LICENSE ├── README.md ├── core ├── pom.xml ├── repository │ └── com │ │ └── adobe │ │ └── granite │ │ └── translation │ │ └── bootstrap-tms.core │ │ ├── 4.0 │ │ ├── bootstrap-tms.core-4.0.jar │ │ └── bootstrap-tms.core-4.0.pom │ │ └── maven-metadata-local.xml └── src │ └── main │ └── java │ └── com │ └── adobe │ └── granite │ └── translation │ └── connector │ └── bootstrap │ ├── core │ ├── BootstrapTranslationCloudConfig.java │ ├── impl │ │ ├── BootstrapConstants.java │ │ ├── BootstrapServiceConfiguration.java │ │ ├── BootstrapTranslationServiceFactoryImpl.java │ │ ├── BootstrapTranslationServiceImpl.java │ │ └── config │ │ │ ├── BootstrapTranslationAdapterFactory.java │ │ │ └── BootstrapTranslationCloudConfigImpl.java │ └── package-info.java │ └── ui │ └── models │ ├── BootStrapModelUtils.java │ └── BootStrapTranslationConnectorModel.java ├── pom.xml ├── ui.apps ├── pom.xml ├── repository │ └── com │ │ └── adobe │ │ └── granite │ │ └── translation │ │ └── bootstrap-tms.core │ │ ├── 4.0 │ │ ├── bootstrap-tms.core-4.0.jar │ │ └── bootstrap-tms.core-4.0.pom │ │ └── maven-metadata-local.xml └── src │ └── main │ └── content │ ├── META-INF │ └── vault │ │ ├── config.xml │ │ ├── definition │ │ ├── .content.xml │ │ ├── screenshots │ │ │ ├── screenshot-01.png │ │ │ │ ├── file │ │ │ │ └── file.dir │ │ │ │ │ └── .content.xml │ │ │ ├── screenshot-02.png │ │ │ │ ├── file │ │ │ │ └── file.dir │ │ │ │ │ └── .content.xml │ │ │ └── screenshot-03.png │ │ │ │ ├── file │ │ │ │ └── file.dir │ │ │ │ └── .content.xml │ │ └── thumbnail.png │ │ ├── filter.xml │ │ └── settings.xml │ └── jcr_root │ └── apps │ ├── .content.xml │ ├── bootstrap-connector │ ├── clientlibs │ │ └── aem-bootstrap-connector │ │ │ ├── .content.xml │ │ │ ├── css.txt │ │ │ ├── css │ │ │ └── styles.css │ │ │ ├── js.txt │ │ │ └── js │ │ │ ├── bootstrapConnector.js │ │ │ └── bootstrapConnector.js.dir │ │ │ └── .content.xml │ ├── config │ │ ├── com.day.cq.security.ACLSetup.xml │ │ ├── org.apache.sling.commons.log.LogManager.factory.config-bootstrap-connector.xml │ │ ├── org.apache.sling.commons.log.LogManager.factory.writer-bootstrap-connector.xml │ │ └── org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-bootstrap.xml │ └── templates │ │ ├── bootstrap-connector-servicepage │ │ ├── .content.xml │ │ └── thumbnail.png │ │ └── forms │ │ ├── description.html │ │ ├── editFormWithTabs.html │ │ └── editform.html │ └── settings │ └── cloudconfigs │ ├── .content.xml │ └── translation │ ├── .content.xml │ └── bootstrap-translation │ └── .content.xml └── ui.content ├── pom.xml └── src └── main └── content ├── META-INF └── vault │ ├── config.xml │ ├── definition │ └── .content.xml │ ├── filter.xml │ └── settings.xml └── jcr_root ├── home └── users │ └── system │ └── bootstrap-service │ └── .content.xml └── var └── bootstrap-tms └── .content.xml /.gitignore: -------------------------------------------------------------------------------- 1 | ### File system 2 | .DS_Store 3 | *_BAK* 4 | *.LCK 5 | *.TMP 6 | *.local 7 | 8 | ### Intellij ignores 9 | 10 | # Directory-based project format 11 | .idea/ 12 | 13 | # File-based project format 14 | *.ipr 15 | *.iml 16 | *.iws 17 | 18 | # Additional for IntelliJ 19 | out/ 20 | target/ 21 | 22 | # Debug Setup 23 | web.xml 24 | 25 | 26 | 27 | ### Eclipse ignores 28 | *.pydevproject 29 | .metadata 30 | .gradle 31 | bin/ 32 | tmp/ 33 | *.tmp 34 | *.bak 35 | *.swp 36 | *~.nib 37 | local.properties 38 | .settings/ 39 | .loadpath 40 | .project 41 | .classpath 42 | *.prefs 43 | ui.apps/src/main/content/jcr_root/META-INF/ 44 | 45 | 46 | # External tool builders 47 | .externalToolBuilders/ 48 | 49 | # Locally stored "Eclipse launch configurations" 50 | *.launch 51 | 52 | # CDT-specific 53 | .cproject 54 | 55 | # PDT-specific 56 | .buildpath 57 | 58 | # sbteclipse plugin 59 | .target 60 | 61 | # TeXlipse plugin 62 | .texlipse 63 | 64 | # vlt files 65 | *.vlt 66 | 67 | # less/css directories 68 | generated/ 69 | 70 | build.bat 71 | build163.bat 72 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ADOBE SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT Effective Date: first date you 2 | select “I Agree” or use the SDK 3 | 4 | Last Updated: 13 March 2014 The SDK is licensed to you subject to the terms and 5 | conditions below which form a binding agreement between you and Adobe. By 6 | selecting “I Agree”, or by downloading, installing, or making use of any portion 7 | of the SDK, you are agreeing to the following terms and conditions. If you do 8 | not agree to the terms and conditions below, do not use the SDK. If you agree 9 | to be bound by this agreement behalf of your employer or other entity, you must 10 | have the legal authority to do so. If you are not authorized to so bind your 11 | employer or such entity, do not select “I Agree” to accept this agreement and do 12 | not use the SDK. 13 | 14 | 15 | AGREED TERMS AND CONDITIONS 16 | 17 | 1. DEFINITIONS. 1.1 “Adobe” means collectively, Adobe Systems Incorporated, a 18 | company incorporated in Delaware, U.S.A., having a place of business at 345 Park 19 | Avenue, San Jose, California USA 95110-2704, U.S.A. (“Adobe US”) and Adobe 20 | Systems Software Ireland, company incorporated in Ireland, having a place of 21 | business 4-6 Riverwalk, City West Business Campus, Saggart, Dublin 24, Ireland 22 | (“Adobe Ireland”). 1.2 “Adobe Product(s)” means software applications, programs 23 | and other technologies not included in or with the SDK which are or may be made 24 | available by Adobe for licensing to the general public. This agreement does not 25 | govern use of Adobe Products. See the end user license agreement accompanying an 26 | Adobe Product for terms governing its use. 1.3 “Developer Product(s)” means any 27 | software application(s), program(s) and other teconolog(y/ies) you develop with 28 | use of the SDK to function or interoperate with Adobe Products. 1.4 29 | “Intellectual Property Rights” means copyright, moral rights, trademark, trade 30 | dress, patent, trade secret, unfair competition, and any other intellectual and 31 | proprietary rights. 1.5 “SDK” or “Software Development Kit” means all items 32 | comprising the software development kit and all associated materials licensed to 33 | you by Adobe as part of the SDK, including all SDK system files, tools, programs 34 | and utilities, as well as any plug-ins or other application programming 35 | interfaces, header or JAR files (“API”), sample images, sounds, or similar 36 | assets (“Content Files”), software code samples, runtimes and libraries, 37 | including any portion(s) that is modified by you, or merged or incorporated with 38 | your Developer Products (“Sample Code”), and any related documentation, 39 | technical specifications, notes and explanatory materials, as well any 40 | modifications, updates, upgrades, or copies of, any of the foregoing items, that 41 | may be made available by Adobe, whether online or recorded on media, or manually 42 | downloaded by you or otherwise placed on your computer by executing the SDK 43 | installer. 44 | 45 | 2. LICENSES GRANTED TO YOU. 2.1 SDK. Subject to your compliance with terms of 46 | this agreement, Adobe grants to you a non-exclusive, non-sublicensable, non- 47 | transferable license to install and use the SDK solely for your internal design, 48 | development and testing of your Developer Products, subject further to the 49 | requirements and limitations below. 2.2 API. Subject to your compliance with 50 | terms of this agreement, Adobe grants to you a non-exclusive, non-sublicensable, 51 | non-transferable license to use the API only as provided in or by the applicable 52 | specification and to distribute the API solely in, with, and on the same media 53 | as, your Developer Products. For clarification, you may not modify the API. 2.3 54 | Content Files. You may not use, modify, reproduce or distribute any of the 55 | Content Files. For the avoidance of doubt, the Content Files are included as 56 | examples only. You acquire no rights to the Content Files. 2.4 Sample Code. 57 | Subject to your compliance with terms of this agreement, Adobe grants to you a 58 | non-exclusive, non-sublicensable, non-transferable license to use, modify, 59 | merge, and redistribute (in object code form only) all or any portions of the 60 | Sample Code solely as part of, and as necessary to properly implement, the SDK 61 | in your Developer Products. All and any portion of the Sample code that is 62 | modified or merged by you in your Developer Products is subject to the terms of 63 | this agreement. 64 | 65 | 3. SCOPE OF LICENSE; LIMITATIONS AND RESTRICTIONS 3.1 You may not distribute 66 | the SDK or any of its component parts to interoperate with or to run on a 67 | platform other than the Adobe-approved platform. 3.2 Third-Party Software. The 68 | SDK may contain third-party software, subject to additional terms and 69 | conditions, available at http://www.adobe.com/go/thirdparty; and 3.3 You may not 70 | modify, port, adapt, creative derivate works, redistribute, or translate any 71 | portion of this SDK; or add or delete any SDK program files that would in any 72 | way result in modifying the functionality or appearance of any element of the 73 | Adobe Products. 3.4 You may not reverse engineer, decompile, disassemble, or 74 | otherwise attempt to discover the source code of, any portion of the SDK, except 75 | and only to the extent that applicable laws of the jurisdiction where you are 76 | located grant you the right to decompile SDK in order to obtain information 77 | necessary to render the SDK interoperable with other software; in which case you 78 | must first request the information from Adobe in writing and Adobe may, in its 79 | discretion, either provide such information to you or impose reasonable 80 | conditions, including reasonable fees, on your use of the SDK software to ensure 81 | that Adobe’s and its licensors’ Intellectual Proprietary Rights in the SDK are 82 | protected. 3.5 You may not unbundle, repackage, distribute, rent, lease, offer, 83 | sell, resale, sublicense, assign or transfer all, or any component parts of the 84 | SDK, or any of your rights in the SDK, nor authorize any portion of the SDK to 85 | be copied onto another’s device, computer or platform, including on a service 86 | bureau basis to other providers (i.e., volume printing, banking, payroll service 87 | providers, etc) who provide you free or fee-based business services. 88 | 89 | 4. VIRAL OPEN SOURCE SOFTWARE AND SERVICES You are not license to (and you 90 | agree that you will not) merge, integrate or use the SDK with any Viral Open 91 | Source Software or Viral Service, or otherwise take any action that could 92 | require disclosure, distribution, or licensing of all or any part of the SDK in 93 | source code form for any purpose whatsoever. For purposes of this Section, 94 | “Viral Open Source Software” means software licensed under the GNU General 95 | Public License, the GNU Affero General Public License (AGPL), the GNU Lesser 96 | General Public License (LGPL), or any other license terms that would require, or 97 | condition your use, modification, or distribution of such licensed software on 98 | the disclosure, distribution, or licensing of any other software in source code 99 | form, for the purpose of making derivative works, or at no charge, and “Viral 100 | Service” means any service that contains any viruses, Trojan horses, worms, time 101 | bombs, cancelbots or other computer programming routines that are intended to 102 | damage, detrimentally interfere with, surreptitiously intercept, expropriate or 103 | deprive owners’ possession of any system, data or personal information, or that 104 | in any way violates any law, statute, ordinance, regulation or rights (including 105 | any law, regulations or rights respecting intellectual property, computer 106 | spyware, privacy, export control, unfair competition, antidiscrimination or 107 | false advertising), or otherwise interferes with the operability of Adobe 108 | Products or third-party programs or software. 109 | 110 | 5. NON-BLOCKING OF ADOBE DEVELOPMENT You acknowledge that Adobe is currently 111 | developing or may develop technologies and Adobe Products in the future that 112 | have, or may have, design or functionality similar to Developer Products that 113 | you may develop based on the license granted to you in this agreement. Nothing 114 | in this agreement will impair, limit or curtail Adobe’s right to continue with 115 | its development, maintenance or distribution of Adobe Products. You agree that 116 | you will not assert in any way any patent owned by you arising out of or in 117 | connection with your use of the SDK, or any SDK modifications made by you, 118 | against Adobe, its customers, subsidiaries or affiliates, or any of their 119 | customers, direct or indirect, agents and contractors for the manufacture, use, 120 | import, license, offer for sale, or sale of any Adobe Products. 121 | 122 | 6. OWNERSHIP; INTELLECTUAL PROPERTY RIGHTS 6.1 The items contained in the SDK 123 | are the Intellectual Property of Adobe and its licensors and are protected by 124 | United States copyright and patent law, international treaty provisions and 125 | applicable laws of the country in which it is being used. Adobe and its 126 | licensors reserve all rights not expressly granted to you under this agreement, 127 | and retain all right, title, and interest in the SDK, including all Intellectual 128 | Property Rights. 6.2 The SDK, or any of its component parts, may be supplied to 129 | you with certain accompanying proprietary notices, including patent, copyright 130 | and trademark notices. You agree to protect all copyright and other ownership 131 | interests of Adobe and its licensors in the SDK supplied to you under this 132 | agreement; to preserve exactly (and not remove or alter) all proprietary notices 133 | displayed in or on the SDK; to reproduce the same proprietary notices in all 134 | copies you make of any portion of the SDK. 6.3 You agree to include in your 135 | Developer Products Adobe’s copyright notices, wherever such notices are 136 | customarily posted, in substantially the following form: Portions of software 137 | used to develop this product copyrighted by Adobe and its licensors. All Rights 138 | Reserved. 6.4 Nothing in this agreement gives you a right to use the name, logo 139 | or trademarks of Adobe or its licensors to market your Developer Products. 140 | 141 | 7. CONFIDENTIAL INFORMATION With respect to the API, and any portion, included 142 | in the SDK (for purposes of this Section, “Adobe Confidential Information”), you 143 | will treat the Adobe Confidential Information, and exercise the same degree of 144 | care to protect it, as you afford to your own confidential information. Your 145 | obligations under this Section will terminate when you can document that (a) the 146 | Adobe Confidential Information was in the public domain at or subsequent to the 147 | time Adobe communicated or provided it to you with no fault of your own; (b) 148 | your employees or agents developed independently without reference to any Adobe 149 | Confidential Information Adobe communicated or provided to you; or (c) your 150 | communication of Adobe Confidential Information was in response to a valid order 151 | by a court or other governmental body, was otherwise required by law, or was 152 | necessary to establish the rights of a party under this agreement. 153 | 154 | 8. TERM; TERMINATION This agreement will commence on the Effective Date and 155 | will continue unless terminated. Adobe may terminate this agreement immediately 156 | upon notice to you, and without judicial intervention, if you fail to comply 157 | with any term of its terms. You may terminate this agreement at any time by 158 | discontinuing all your use(s) of the SDK and you agree to destroying or removing 159 | all full and partial copies of the SDK from your computer. If requested by 160 | Adobe, you must demonstrate proof of your compliance with the terms of this 161 | Section. In the event of termination, the terms of this agreement that, by their 162 | nature, are meant to survive termination, including all terms relating to viral 163 | open source software and services, ownership, confidential information, 164 | indemnity obligations and procedures, disclaimers of warranty, limitations on 165 | and exclusions of remedies and damages, dispute resolution, and waiver, , will 166 | survive termination of this agreement. 167 | 168 | 9. DISCLAIMER OF WARRANTY; LIMITATION OF LIABILITY You expressly understand and 169 | agree that, to the maximum extent permitted by applicable law: 9.1 Use OF THE 170 | SDK is entirely at your own risk. The SDK is provided by Adobe “AS-IS” and with 171 | all faults. Adobe and its licensors are not liable to you or anyone else for any 172 | special, incidental, indirect, consequential, or punitive damages whatsoever 173 | (even if Adobe has been advised of the possibility of such damages), including 174 | (a) damages resulting from loss of use, data, or profits, whether or not 175 | foreseeable, (b) damages based on any theory of liability, including breach of 176 | contract or warranty, negligence or other tortious action, or (c) damages 177 | arising from any other claim arising out of or in connection with your use of 178 | the SDK. 9.2 Adobe’s total liability in any matter arising out of or related to 179 | these terms is limited to US $100 or the aggregate amount that you paid for use 180 | of the SDK during the 12 months prior to the event giving rise to the damages, 181 | whichever is larger. This limitation will apply even if Adobe has been advised 182 | of the possibility of such damages and regardless of any failure of the 183 | essential purpose of any limited remedy. 184 | 185 | 10. INDEMNIFICATION To the maximum extent permitted by law, you agree to 186 | indemnify Adobe, its subsidiaries, affiliates, officers, agents, employees, 187 | partners, licensors, or suppliers from any claim or demand, including reasonable 188 | attorneys’ fees, that arise from the use and distribution of your Developer 189 | Products that contain or are based upon any portion of the SDK, or from your 190 | violation of the terms of this agreement. 191 | 192 | 11. DISPUTE RESOLUTION 11.1 Choice of Law. If you are a resident of North 193 | America (or if your organization is headquartered in North America), your 194 | relationship is with Adobe Systems Incorporated, a United States company, and 195 | the SDK is governed by the law of California, U.S.A. If you reside outside of 196 | North America, your relationship is with Adobe Systems Software Ireland Limited, 197 | and the SDK is governed by the law of Ireland. 11.2 Venue. You agree that 198 | any claim or dispute you may have against Adobe must be resolved by a court 199 | located in Santa Clara County, California, United States of America. You agree 200 | to submit to the personal jurisdiction of the courts located in Santa Clara 201 | County, California, United States of America when the laws of California apply, 202 | and the courts of Dublin, Ireland, when the laws of Ireland applies, for the 203 | purpose of litigating such claims or disputes. The parties specifically disclaim 204 | the U.N. Convention on Contracts for the International Sale of Goods. 11.3 205 | Injunctive Relief. Notwithstanding the foregoing, in the event of your or 206 | others’ unauthorized access to or use of the SDK in violation of this Agreement, 207 | you agree that Adobe is entitled to apply for injunctive remedies (or an 208 | equivalent type of urgent legal relief) in any jurisdiction. 209 | 210 | 12. EXPORT RULES The SDK and your use of the SDK are subject to U.S. and 211 | international laws, restrictions, and regulations that may govern the import, 212 | export, and use of the SDK. You agree to comply with all such laws, 213 | restrictions, and regulations. 214 | 215 | 13. NOTICE TO U.S. GOVERNMENT END USERS For U.S. Government procurements, the 216 | SDK is a commercial computer software as defined in FAR 12.212 and subject to 217 | restricted rights as defined in FAR Section 52.227-19 "Commercial Computer 218 | Software - Restricted Rights" and DFARS 227.7202, “Rights in Commercial Computer 219 | Software or Commercial Computer Software Documentation”, as applicable, and any 220 | successor regulations. Any use, modification, reproduction release, performance, 221 | display or disclosure of the SDK by the U.S. Government shall be solely in 222 | accordance with license rights and restrictions described herein. 223 | 224 | 14. GENERAL PROVISIONS 14.1 Severability. If it turns out that a particular 225 | term is not enforceable, the unenforceability of that term will not affect any 226 | other terms. 14.2 Modification; Waiver. No provision of this agreement will 227 | be deemed to have been modified or waived by any act or acquiescence on the part 228 | of Adobe, its agents, or employees, but only by any instrument in writing, 229 | signed by an authorized officer of Adobe. 14.3 English Version. The English 230 | language version of this agreement will be the version used when interpreting or 231 | construing its terms. 14.4 Entire Agreement. This Agreement is the entire 232 | agreement, superseding any prior written or oral agreements, between you and 233 | Adobe relating to the SDK. 234 | 235 | SDK_EULA_en_US-20140313_1200 236 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AEM Translation Framework Bootstrap Connector 2 | 3 | The Bootstrap connector is built using the Translation Framework API. The purpose of the connector is to 4 | 5 | * Provide sample code to Translation partners and Service providers to start building their connector 6 | * Provide best practices for building/packaging the connector 7 | * Highlight the coding standards for the Connector certification process 8 | * Serve as a reference implementation of the Translation API 9 | 10 | ## Modules 11 | 12 | The main parts of the template are: 13 | 14 | * core: Java bundle containing all core functionality like OSGi service as well as component-related Java code. 15 | * ui.apps: contains the /apps (immutable content) parts of the project, components, templates, configurations. 16 | * ui.content: contains the /content (mutable content) parts of the project. 17 | 18 | ## Accessing the AEM Cloud Service SDK 19 | 20 | The Java Jar/Maven Dependency that exposes all allowed Java APIs that can be used to develop against AEM as as Cloud Service. 21 | 22 | ``` 23 | 24 | com.adobe.aem 25 | aem-sdk-api 26 | 2020.7.3902.20200716T022312Z-200604 27 | provided 28 | 29 | ``` 30 | 31 | It is recommended that the version entry for the SDK should match the version of AEM as a Cloud Service. 32 | You can see what version you are using by logging in to AEM, then going to the question mark in the top right corner of 33 | the screen and selecting About Adobe Experience Manager 34 | 35 | Please have a look on the document to see when is it recommended to refresh the project with a new SDK. 36 | 37 | https://docs.adobe.com/content/help/en/experience-manager-cloud-service/implementing/developing/aem-as-a-cloud-service-sdk.html 38 | 39 | ## How to build 40 | 41 | Switch to the designated branch based on the AEM version. For instance, checkout the "aem650" branch for AEM 6.5 and for AEM as a Cloud Service, opt for the "master" branch. 42 | 43 | To build all the modules run in the project root directory the following command with Maven 3: 44 | 45 | mvn clean install 46 | 47 | If you have a running AEM instance you can build and package the whole project and deploy into AEM with 48 | 49 | mvn clean install -PautoInstallPackage 50 | 51 | Or to deploy it to a publish instance, run 52 | 53 | mvn clean install -PautoInstallPackagePublish 54 | 55 | Or alternatively 56 | 57 | mvn clean install -PautoInstallPackage -Daem.port=4503 58 | 59 | Or to deploy only the bundle to the author, run 60 | 61 | mvn clean install -PautoInstallBundle 62 | 63 | ## Additional Details 64 | 65 | For detailed information visit: 66 | 67 | [Overview of Translation Framework](https://docs.adobe.com/docs/en/aem/6-1/administer/sites/translation/tc-tic.html) 68 | 69 | [Bootstrap connector Installation steps](https://helpx.adobe.com/experience-manager/using/bootstrap.html) 70 | 71 | [State diagram](https://files.acrobat.com/a/preview/32824bd9-6cc6-41b4-bc7b-8e7c4d2c7d65) showing different states of translation as noted in the API 72 | 73 | -------------------------------------------------------------------------------- /core/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 4.0.0 20 | 21 | com.adobe.granite.translation.connector 22 | bootstrap-connector 23 | 2.0-SNAPSHOT 24 | ../pom.xml 25 | 26 | bootstrap-connector.core 27 | bundle 28 | Bootstrap Translation Connector - Core 29 | Core bundle for Bootstrap Translation Connector 30 | 31 | 32 | 33 | org.apache.felix 34 | maven-scr-plugin 35 | 36 | 37 | org.apache.sling 38 | maven-sling-plugin 39 | 40 | 41 | org.apache.felix 42 | maven-bundle-plugin 43 | true 44 | 45 | 46 | 47 | javax.inject;version=0.0.0,* 48 | 49 | com.adobe.granite.translation.connector.bootstrap.* 50 | 51 | 52 | com.adobe.granite.translation.connector.bootstrap.ui.models 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | org.apache.felix 64 | org.apache.felix.scr.annotations 65 | 66 | 67 | org.osgi 68 | osgi.core 69 | 70 | 71 | org.osgi 72 | osgi.cmpn 73 | 74 | 75 | org.osgi 76 | osgi.annotation 77 | 78 | 79 | 80 | org.slf4j 81 | slf4j-api 82 | 83 | 84 | javax.jcr 85 | jcr 86 | 87 | 88 | javax.servlet 89 | servlet-api 90 | 91 | 92 | com.adobe.aem 93 | aem-sdk-api 94 | 95 | 96 | org.apache.sling 97 | org.apache.sling.models.api 98 | 1.1.0 99 | provided 100 | 101 | 102 | javax.annotation 103 | javax.annotation-api 104 | 1.3.2 105 | 106 | 107 | com.adobe.granite.translation 108 | bootstrap-tms.core 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /core/repository/com/adobe/granite/translation/bootstrap-tms.core/4.0/bootstrap-tms.core-4.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector/7600a6427561e4062e1b2b4da17aa85ef3dbcb67/core/repository/com/adobe/granite/translation/bootstrap-tms.core/4.0/bootstrap-tms.core-4.0.jar -------------------------------------------------------------------------------- /core/repository/com/adobe/granite/translation/bootstrap-tms.core/4.0/bootstrap-tms.core-4.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | com.adobe.granite.translation 6 | bootstrap-tms.core 7 | 4.0 8 | POM was created from install:install-file 9 | 10 | -------------------------------------------------------------------------------- /core/repository/com/adobe/granite/translation/bootstrap-tms.core/maven-metadata-local.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.adobe.granite.translation 4 | bootstrap-tms.core 5 | 6 | 4.0 7 | 8 | 4.0 9 | 10 | 20200730102223 11 | 12 | 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/adobe/granite/translation/connector/bootstrap/core/BootstrapTranslationCloudConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | ************************************************************************* 3 | ADOBE SYSTEMS INCORPORATED 4 | Copyright [first year code created] Adobe Systems Incorporated 5 | All Rights Reserved. 6 | 7 | NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the 8 | terms of the Adobe license agreement accompanying it. If you have received this file from a 9 | source other than Adobe, then your use, modification, or distribution of it requires the prior 10 | written permission of Adobe. 11 | ************************************************************************* 12 | */ 13 | 14 | package com.adobe.granite.translation.connector.bootstrap.core; 15 | 16 | public interface BootstrapTranslationCloudConfig { 17 | 18 | public static final String PROPERTY_DUMMY_SERVER_URL = "dummyserverurl"; 19 | public static final String PROPERTY_DUMMY_CONFIG_ID = "dummyconfigid"; 20 | public static final String PROPERTY_PREVIEW_PATH = "previewPath"; 21 | 22 | public static final String RESOURCE_TYPE = "cq/translation/components/mt-cloudconfig"; 23 | public static final String ROOT_PATH = "/etc/cloudservices/bootstrap-translation"; 24 | 25 | String getDummyServerUrl(); 26 | 27 | String getDummyConfigId(); 28 | 29 | String getPreviewPath(); 30 | } -------------------------------------------------------------------------------- /core/src/main/java/com/adobe/granite/translation/connector/bootstrap/core/impl/BootstrapConstants.java: -------------------------------------------------------------------------------- 1 | package com.adobe.granite.translation.connector.bootstrap.core.impl; 2 | 3 | // TODO: Auto-generated Javadoc 4 | /** 5 | * The Class BootstrapConstants. 6 | */ 7 | public class BootstrapConstants { 8 | 9 | /** The Constant EXPORT_FORMAT_FIELD. */ 10 | public static final String EXPORT_FORMAT_FIELD = "export.format"; 11 | 12 | /** The Constant EXPORT_FORMAT_XML. */ 13 | public static final String EXPORT_FORMAT_XML = "xml"; 14 | 15 | /** The Constant EXPORT_FORMAT_XLIFF_1_2. */ 16 | public static final String EXPORT_FORMAT_XLIFF_1_2 = "xliff_1.2"; 17 | 18 | /** The Constant EXPORT_FORMAT_XLIFF_2_0. */ 19 | public static final String EXPORT_FORMAT_XLIFF_2_0 = "xliff_2.0"; 20 | 21 | /** The Constant EXPORT JSON */ 22 | public static final String EXPORT_FORMAT_JSON = "json"; 23 | 24 | /** The Constant PREVIEW_ENABLED. */ 25 | public static final String PREVIEW_ENABLED = "preview.enabled"; 26 | 27 | /** The Constant PSEUDO_L10N_ENABLED. */ 28 | public static final String PSEUDO_L10N_DISABLED = "pseudo.localization.disabled"; 29 | } 30 | -------------------------------------------------------------------------------- /core/src/main/java/com/adobe/granite/translation/connector/bootstrap/core/impl/BootstrapServiceConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.adobe.granite.translation.connector.bootstrap.core.impl; 2 | 3 | import org.osgi.service.metatype.annotations.AttributeDefinition; 4 | import org.osgi.service.metatype.annotations.ObjectClassDefinition; 5 | import org.osgi.service.metatype.annotations.Option; 6 | 7 | @ObjectClassDefinition(name = "Bootstrap Translation Service", description = "Bootstrap Translation Service Configuration") 8 | public @interface BootstrapServiceConfiguration { 9 | 10 | @AttributeDefinition(name = "Bootstrap Translation Factory Name", description = "The Unique ID associated with this Translation Factory Connector") 11 | String getTranslationFactory() default "Bootstrap Connector"; 12 | 13 | @AttributeDefinition(name = "Enable Preview", description="Preview Enabled for Translation Objects") 14 | boolean isPreviewEnabled() default false; 15 | 16 | @AttributeDefinition(name = "Disable Psuedo L10n", description = "Disable Pseudo localization for Machine translations and use a simple Language prefix instead") 17 | boolean isPseudoLocalizationDisabled() default false; 18 | 19 | @AttributeDefinition(name = "Export Format", description = "Number values", options = { @Option(label = "XML", value = BootstrapConstants.EXPORT_FORMAT_XML), 20 | @Option(label = "XLIFF 1.2", value = BootstrapConstants.EXPORT_FORMAT_XLIFF_1_2), 21 | @Option(label = "XLIFF 2.0", value = BootstrapConstants.EXPORT_FORMAT_XLIFF_2_0), 22 | @Option(label = "JSON", value = BootstrapConstants.EXPORT_FORMAT_JSON)}) 23 | String getExportFormat() default BootstrapConstants.EXPORT_FORMAT_XML; 24 | 25 | } -------------------------------------------------------------------------------- /core/src/main/java/com/adobe/granite/translation/connector/bootstrap/core/impl/BootstrapTranslationServiceFactoryImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | ************************************************************************* 3 | ADOBE SYSTEMS INCORPORATED 4 | Copyright [first year code created] Adobe Systems Incorporated 5 | All Rights Reserved. 6 | 7 | NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the 8 | terms of the Adobe license agreement accompanying it. If you have received this file from a 9 | source other than Adobe, then your use, modification, or distribution of it requires the prior 10 | written permission of Adobe. 11 | ************************************************************************* 12 | */ 13 | 14 | package com.adobe.granite.translation.connector.bootstrap.core.impl; 15 | 16 | import java.util.ArrayList; 17 | import java.util.HashMap; 18 | import java.util.List; 19 | import java.util.Map; 20 | 21 | import org.osgi.framework.Constants; 22 | import org.osgi.service.component.annotations.Activate; 23 | import org.osgi.service.component.annotations.Component; 24 | import org.osgi.service.component.annotations.Reference; 25 | import org.osgi.service.metatype.annotations.Designate; 26 | import org.slf4j.Logger; 27 | import org.slf4j.LoggerFactory; 28 | 29 | import com.adobe.granite.crypto.CryptoException; 30 | import com.adobe.granite.crypto.CryptoSupport; 31 | import com.adobe.granite.translation.api.TranslationConfig; 32 | import com.adobe.granite.translation.api.TranslationConstants.TranslationMethod; 33 | import com.adobe.granite.translation.api.TranslationException; 34 | import com.adobe.granite.translation.api.TranslationService; 35 | import com.adobe.granite.translation.api.TranslationServiceFactory; 36 | import com.adobe.granite.translation.bootstrap.tms.core.BootstrapTmsService; 37 | import com.adobe.granite.translation.connector.bootstrap.core.BootstrapTranslationCloudConfig; 38 | import com.adobe.granite.translation.core.TranslationCloudConfigUtil; 39 | 40 | @Component(service = TranslationServiceFactory.class, immediate = true, configurationPid = "com.adobe.granite.translation.connector.bootstrap.core.impl.BootstrapTranslationServiceFactoryImpl", property = { 41 | Constants.SERVICE_DESCRIPTION + "=Configurable settings for the Bootstrap Translation connector", 42 | "label" + "=Bootstrap Translation Connector Factory" }) 43 | 44 | @Designate(ocd=BootstrapServiceConfiguration.class) 45 | public class BootstrapTranslationServiceFactoryImpl implements TranslationServiceFactory { 46 | 47 | protected String factoryName; 48 | 49 | protected Boolean isPreviewEnabled; 50 | 51 | protected Boolean isPseudoLocalizationDisabled; 52 | 53 | protected String exportFormat; 54 | 55 | @Reference 56 | TranslationCloudConfigUtil cloudConfigUtil; 57 | 58 | @Reference 59 | TranslationConfig translationConfig; 60 | 61 | @Reference 62 | CryptoSupport cryptoSupport; 63 | 64 | @Reference 65 | BootstrapTmsService bootstrapTmsService; 66 | 67 | private List supportedTranslationMethods; 68 | 69 | private BootstrapServiceConfiguration config; 70 | 71 | 72 | public BootstrapTranslationServiceFactoryImpl() { 73 | log.trace("BootstrapTranslationServiceFactoryImpl."); 74 | 75 | supportedTranslationMethods = new ArrayList(); 76 | supportedTranslationMethods.add(TranslationMethod.HUMAN_TRANSLATION); 77 | supportedTranslationMethods.add(TranslationMethod.MACHINE_TRANSLATION); 78 | } 79 | 80 | private static final Logger log = LoggerFactory.getLogger(BootstrapTranslationServiceFactoryImpl.class); 81 | 82 | @Override 83 | public TranslationService createTranslationService(TranslationMethod translationMethod, String cloudConfigPath) 84 | throws TranslationException { 85 | log.trace("BootstrapTranslationServiceFactoryImpl.createTranslationService"); 86 | 87 | BootstrapTranslationCloudConfig bootstrapCloudConfg = (BootstrapTranslationCloudConfig) cloudConfigUtil 88 | .getCloudConfigObjectFromPath(BootstrapTranslationCloudConfig.class, cloudConfigPath); 89 | 90 | String dummyConfigId = ""; 91 | String dummyServerUrl = ""; 92 | String previewPath = ""; 93 | 94 | if (bootstrapCloudConfg != null) { 95 | dummyConfigId = bootstrapCloudConfg.getDummyConfigId(); 96 | dummyServerUrl = bootstrapCloudConfg.getDummyServerUrl(); 97 | previewPath = bootstrapCloudConfg.getPreviewPath(); 98 | 99 | } 100 | 101 | if (cryptoSupport != null) { 102 | try { 103 | if (cryptoSupport.isProtected(dummyConfigId)) { 104 | dummyConfigId = cryptoSupport.unprotect(dummyConfigId); 105 | } else { 106 | log.trace("Dummy Config ID is not protected"); 107 | } 108 | } catch (CryptoException e) { 109 | log.error("Error while decrypting the client secret {}", e); 110 | } 111 | } 112 | 113 | Map availableLanguageMap = new HashMap(); 114 | Map availableCategoryMap = new HashMap(); 115 | return new BootstrapTranslationServiceImpl(availableLanguageMap, availableCategoryMap, factoryName, 116 | isPreviewEnabled, isPseudoLocalizationDisabled, exportFormat, dummyConfigId, dummyServerUrl, 117 | previewPath, translationConfig, bootstrapTmsService); 118 | } 119 | 120 | @Override 121 | public List getSupportedTranslationMethods() { 122 | log.trace("BootstrapTranslationServiceFactoryImpl.getSupportedTranslationMethods"); 123 | return supportedTranslationMethods; 124 | } 125 | 126 | @Override 127 | public Class getServiceCloudConfigClass() { 128 | log.trace("BootstrapTranslationServiceFactoryImpl.getServiceCloudConfigClass"); 129 | return BootstrapTranslationCloudConfig.class; 130 | } 131 | 132 | @Activate 133 | protected void activate(BootstrapServiceConfiguration config) { 134 | log.trace("Starting function: activate"); 135 | 136 | this.config = config; 137 | 138 | factoryName = config.getTranslationFactory(); 139 | 140 | isPreviewEnabled = config.isPreviewEnabled(); 141 | 142 | isPseudoLocalizationDisabled = config.isPseudoLocalizationDisabled(); 143 | 144 | exportFormat = config.getExportFormat(); 145 | 146 | if (log.isTraceEnabled()) { 147 | log.trace("Activated TSF with the following:"); 148 | log.trace("Factory Name: {}", factoryName); 149 | log.trace("Preview Enabled: {}", isPreviewEnabled); 150 | log.trace("Psuedo Localization Disabled: {}", isPseudoLocalizationDisabled); 151 | log.trace("Export Format: {}", exportFormat); 152 | } 153 | } 154 | 155 | @Override 156 | public String getServiceFactoryName() { 157 | log.trace("Starting function: getServiceFactoryName"); 158 | return factoryName; 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /core/src/main/java/com/adobe/granite/translation/connector/bootstrap/core/impl/BootstrapTranslationServiceImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | ************************************************************************* 3 | ADOBE SYSTEMS INCORPORATED 4 | Copyright [first year code created] Adobe Systems Incorporated 5 | All Rights Reserved. 6 | 7 | NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the 8 | terms of the Adobe license agreement accompanying it. If you have received this file from a 9 | source other than Adobe, then your use, modification, or distribution of it requires the prior 10 | written permission of Adobe. 11 | ************************************************************************* 12 | */ 13 | 14 | package com.adobe.granite.translation.connector.bootstrap.core.impl; 15 | 16 | import java.io.File; 17 | import java.io.FileNotFoundException; 18 | import java.io.FileOutputStream; 19 | import java.io.IOException; 20 | import java.io.InputStream; 21 | import java.util.Arrays; 22 | import java.util.Collections; 23 | import java.util.Date; 24 | import java.util.LinkedHashMap; 25 | import java.util.Map; 26 | import java.util.Random; 27 | import java.util.zip.ZipEntry; 28 | import java.util.zip.ZipInputStream; 29 | 30 | import org.slf4j.Logger; 31 | import org.slf4j.LoggerFactory; 32 | 33 | import com.adobe.granite.comments.Comment; 34 | import com.adobe.granite.comments.CommentCollection; 35 | import com.adobe.granite.translation.api.TranslationConfig; 36 | import com.adobe.granite.translation.api.TranslationConstants; 37 | import com.adobe.granite.translation.api.TranslationConstants.TranslationMethod; 38 | import com.adobe.granite.translation.api.TranslationConstants.TranslationStatus; 39 | import com.adobe.granite.translation.api.TranslationException; 40 | import com.adobe.granite.translation.api.TranslationMetadata; 41 | import com.adobe.granite.translation.api.TranslationObject; 42 | import com.adobe.granite.translation.api.TranslationResult; 43 | import com.adobe.granite.translation.api.TranslationScope; 44 | import com.adobe.granite.translation.api.TranslationService; 45 | import com.adobe.granite.translation.api.TranslationState; 46 | import com.adobe.granite.translation.bootstrap.tms.core.BootstrapTmsConstants; 47 | import com.adobe.granite.translation.bootstrap.tms.core.BootstrapTmsService; 48 | import com.adobe.granite.translation.connector.bootstrap.core.impl.config.BootstrapTranslationCloudConfigImpl; 49 | import com.adobe.granite.translation.core.common.AbstractTranslationService; 50 | import com.adobe.granite.translation.core.common.TranslationResultImpl; 51 | 52 | 53 | public class BootstrapTranslationServiceImpl extends AbstractTranslationService implements TranslationService { 54 | private static final Logger log = LoggerFactory.getLogger(BootstrapTranslationServiceImpl.class); 55 | 56 | private static final String TAG_METADATA = "/tag-metadata"; 57 | 58 | private static final String ASSET_METADATA = "/asset-metadata"; 59 | 60 | private static final String I18NCOMPONENTSTRINGDICT = "/i18n-dictionary"; 61 | private static final String SERVICE_LABEL = "bootstrap"; 62 | private static final String SERVICE_ATTRIBUTION = "Translation By Bootstrap"; 63 | private String dummyConfigId = ""; 64 | private String dummyServerUrl = ""; 65 | private String previewPath = ""; 66 | private Boolean isPreviewEnabled = false; 67 | private Boolean isPseudoLocalizationDisabled = false; 68 | private String exportFormat = BootstrapConstants.EXPORT_FORMAT_XML; 69 | private BootstrapTmsService bootstrapTmsService; 70 | private final static String BOOTSTRAP_SERVICE = "bootstrap-service"; 71 | 72 | 73 | class TranslationJobDetails { 74 | String strName; 75 | String strDescprition; 76 | String strSourceLang; 77 | String strDestinationLang; 78 | }; 79 | 80 | class TranslationScopeImpl implements TranslationScope { 81 | @Override 82 | public int getWordCount() { 83 | log.trace("TranslationScopeImpl.getWordCount"); 84 | 85 | Random rand = new Random(); 86 | return rand.nextInt(100); 87 | } 88 | 89 | @Override 90 | public int getImageCount() { 91 | log.trace("TranslationScopeImpl.getImageCount"); 92 | 93 | Random rand = new Random(); 94 | return rand.nextInt(100); 95 | } 96 | 97 | @Override 98 | public int getVideoCount() { 99 | log.trace("TranslationScopeImpl.getVideoCount"); 100 | 101 | Random rand = new Random(); 102 | return rand.nextInt(100); 103 | } 104 | 105 | @Override 106 | public Map getFinalScope() { 107 | log.trace("TranslationScopeImpl.getFinalScope"); 108 | 109 | Map newScope = new LinkedHashMap(); 110 | newScope.put("ICE Words", "0"); 111 | newScope.put("100% Words", "0"); 112 | newScope.put("New Words", Integer.toString(getWordCount())); 113 | newScope.put("Repeated Words", "0"); 114 | newScope.put("TranslationScope:CostEstimate", "USD 73.00"); 115 | newScope.put("TranslationScope:DetailsLink","https://github.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector"); 116 | 117 | return newScope; 118 | } 119 | } 120 | 121 | // Constructor 122 | public BootstrapTranslationServiceImpl(Map availableLanguageMap, 123 | Map availableCategoryMap, String name, Boolean isPreviewEnabled, Boolean isPseudoLocalizationDisabled, String exportFormat, String dummyConfigId, String dummyServerUrl, String previewPath, 124 | TranslationConfig translationConfig, BootstrapTmsService bootstrapTmsService) { 125 | super(availableLanguageMap, availableCategoryMap, name, SERVICE_LABEL, SERVICE_ATTRIBUTION, 126 | BootstrapTranslationCloudConfigImpl.ROOT_PATH, TranslationMethod.MACHINE_TRANSLATION, translationConfig); 127 | 128 | log.trace("BootstrapTranslationServiceImpl."); 129 | log.trace("dummyConfigId: {}",dummyConfigId); 130 | log.trace("dummyServerUrl: {}",dummyServerUrl); 131 | log.trace("previewPath: {}",previewPath); 132 | log.trace("isPreviewEnabled: {}",isPreviewEnabled); 133 | log.trace("isPseudoLocalizationDisabled: {}", isPseudoLocalizationDisabled); 134 | log.trace("exportFormat: {}",exportFormat); 135 | this.dummyConfigId = dummyConfigId; 136 | this.dummyServerUrl = dummyServerUrl; 137 | this.previewPath = previewPath; 138 | this.bootstrapTmsService = bootstrapTmsService; 139 | this.isPseudoLocalizationDisabled = isPseudoLocalizationDisabled; 140 | this.isPreviewEnabled = isPreviewEnabled; 141 | this.exportFormat=exportFormat; 142 | } 143 | 144 | @Override 145 | public Map supportedLanguages() { 146 | log.trace("BootstrapTranslationServiceImpl.supportedLanguages"); 147 | 148 | if (availableLanguageMap.size() <= 0) { 149 | availableLanguageMap.put("en", "en"); 150 | availableLanguageMap.put("de", "de"); 151 | availableLanguageMap.put("fr", "fr"); 152 | availableLanguageMap.put("ja", "ja"); 153 | availableLanguageMap.put("ko", "ko"); 154 | } 155 | 156 | return Collections.unmodifiableMap(availableLanguageMap); 157 | } 158 | 159 | @Override 160 | public boolean isDirectionSupported(String sourceLanguage, String targetLanguage) throws TranslationException { 161 | log.trace("BootstrapTranslationServiceImpl.isDirectionSupported"); 162 | // It should return true, if translation provider provides translation from sourceLanguage to targetLanguage 163 | // otherwise false 164 | return true; 165 | } 166 | 167 | @Override 168 | public String detectLanguage(String toDetectSource, TranslationConstants.ContentType contentType) 169 | throws TranslationException { 170 | log.trace("BootstrapTranslationServiceImpl.detectLanguage"); 171 | 172 | // French language code 173 | return "fr"; 174 | } 175 | 176 | @Override 177 | public TranslationResult translateString(String sourceString, String sourceLanguage, String targetLanguage, 178 | TranslationConstants.ContentType contentType, String contentCategory) throws TranslationException { 179 | log.trace("BootstrapTranslationServiceImpl.translateString"); 180 | String translatedString = ""; 181 | if(isPseudoLocalizationDisabled == true){ 182 | translatedString = String.format("%s_%s_%s", sourceLanguage, sourceString, targetLanguage); 183 | }else { 184 | // Using Pseudo translation here using accented characters 185 | translatedString = bootstrapTmsService.getAccentedText(sourceString); 186 | } 187 | return new TranslationResultImpl(translatedString, sourceLanguage, targetLanguage, contentType, 188 | contentCategory, sourceString, TranslationResultImpl.UNKNOWN_RATING, null); 189 | } 190 | 191 | @Override 192 | public TranslationResult[] translateArray(String[] sourceStringArr, String sourceLanguage, String targetLanguage, 193 | TranslationConstants.ContentType contentType, String contentCategory) throws TranslationException { 194 | log.trace("BootstrapTranslationServiceImpl.translateArray"); 195 | 196 | TranslationResult arrResults[] = new TranslationResultImpl[sourceStringArr.length]; 197 | for (int i = 0; i < sourceStringArr.length; i++) { 198 | arrResults[i] = 199 | translateString(sourceStringArr[i], sourceLanguage, targetLanguage, contentType, contentCategory); 200 | } 201 | return arrResults; 202 | } 203 | 204 | @Override 205 | public TranslationResult[] getAllStoredTranslations(String sourceString, String sourceLanguage, 206 | String targetLanguage, TranslationConstants.ContentType contentType, String contentCategory, String userId, 207 | int maxTranslations) throws TranslationException { 208 | log.trace("BootstrapTranslationServiceImpl.getAllStoredTranslations"); 209 | 210 | throw new TranslationException("This function is not implemented", 211 | TranslationException.ErrorCode.SERVICE_NOT_IMPLEMENTED); 212 | } 213 | 214 | @Override 215 | public void storeTranslation(String[] originalText, String sourceLanguage, String targetLanguage, 216 | String[] updatedTranslation, TranslationConstants.ContentType contentType, String contentCategory, 217 | String userId, int rating, String path) throws TranslationException { 218 | log.trace("BootstrapTranslationServiceImpl.storeTranslation[]"); 219 | log.debug("OriginalText is {}. Updated Transation is {}",Arrays.toString(originalText),updatedTranslation); 220 | } 221 | 222 | @Override 223 | public void storeTranslation(String originalText, String sourceLanguage, String targetLanguage, 224 | String updatedTranslation, TranslationConstants.ContentType contentType, String contentCategory, 225 | String userId, int rating, String path) throws TranslationException { 226 | log.trace("BootstrapTranslationServiceImpl.storeTranslation"); 227 | } 228 | 229 | @Override 230 | public String createTranslationJob(String name, String description, String strSourceLanguage, 231 | String strTargetLanguage, Date dueDate, TranslationState state, TranslationMetadata jobMetadata) 232 | throws TranslationException { 233 | log.trace("BootstrapTranslationServiceImpl.createTranslationJob"); 234 | return bootstrapTmsService.createBootstrapTmsJob(name, strSourceLanguage, strTargetLanguage, dueDate); 235 | } 236 | 237 | @Override 238 | public TranslationScope getFinalScope(String strTranslationJobID) throws TranslationException { 239 | log.trace("BootstrapTranslationServiceImpl.getFinalScope"); 240 | 241 | return new TranslationScopeImpl(); 242 | } 243 | 244 | @Override 245 | public TranslationStatus updateTranslationJobState(String strTranslationJobID, TranslationState state) 246 | throws TranslationException { 247 | if(strTranslationJobID=="dummy"){ 248 | log.debug("Dummy Translation job detected"); 249 | } else if(strTranslationJobID == null) { 250 | log.debug("Job was never sent to TMS. Updated using Export/Import"); 251 | } else { 252 | bootstrapTmsService.setTmsProperty(strTranslationJobID, BootstrapTmsConstants.BOOTSTRAP_TMS_STATUS, state.getStatus().toString()); 253 | log.warn("JOB ID is {}",strTranslationJobID); 254 | } 255 | if(state.getStatus() == TranslationStatus.COMMITTED_FOR_TRANSLATION) { 256 | log.trace("Uploaded all Translation Objects in job {}",strTranslationJobID); 257 | } 258 | return state.getStatus(); 259 | } 260 | 261 | @Override 262 | public TranslationStatus getTranslationJobStatus(String strTranslationJobID) throws TranslationException { 263 | log.trace("BootstrapTranslationServiceImpl.getTranslationJobStatus"); 264 | String status = bootstrapTmsService.getTmsJobStatus(strTranslationJobID); 265 | log.debug("Status for Job {} is {}", strTranslationJobID, status); 266 | return TranslationStatus.fromString(status); 267 | } 268 | 269 | @Override 270 | public CommentCollection getTranslationJobCommentCollection(String strTranslationJobID) { 271 | log.trace("BootstrapTranslationServiceImpl.getTranslationJobCommentCollection"); 272 | return null; 273 | } 274 | 275 | @Override 276 | public void addTranslationJobComment(String strTranslationJobID, Comment comment) throws TranslationException { 277 | log.trace("BootstrapTranslationServiceImpl.addTranslationJobComment"); 278 | 279 | throw new TranslationException("This function is not implemented", 280 | TranslationException.ErrorCode.SERVICE_NOT_IMPLEMENTED); 281 | } 282 | 283 | @Override 284 | public InputStream getTranslatedObject(String strTranslationJobID, TranslationObject translationObj) 285 | throws TranslationException { 286 | log.trace("BootstrapTranslationServiceImpl.getTranslatedObject"); 287 | return bootstrapTmsService.getTmsObjectTranslatedInputStream(strTranslationJobID, getObjectPath(translationObj)); 288 | } 289 | 290 | @Override 291 | public String uploadTranslationObject(String strTranslationJobID, TranslationObject translationObject) 292 | throws TranslationException { 293 | 294 | InputStream inputStream; 295 | log.trace("Using {} InputStream", exportFormat); 296 | if (exportFormat.equalsIgnoreCase(BootstrapConstants.EXPORT_FORMAT_XLIFF_1_2)) { 297 | inputStream = translationObject.getTranslationObjectXLIFFInputStream("1.2"); 298 | } else if (exportFormat.equalsIgnoreCase(BootstrapConstants.EXPORT_FORMAT_XLIFF_2_0)) { 299 | inputStream = translationObject.getTranslationObjectXLIFFInputStream("2.0"); 300 | } else if (exportFormat.equalsIgnoreCase(BootstrapConstants.EXPORT_FORMAT_JSON)) { 301 | inputStream = translationObject.getTranslationObjectJSONInputStream(); 302 | } else { 303 | inputStream = translationObject.getTranslationObjectXMLInputStream(); 304 | } 305 | 306 | String objectPath = bootstrapTmsService.uploadBootstrapTmsObject(strTranslationJobID, getObjectPath(translationObject), inputStream, translationObject.getMimeType(), exportFormat); 307 | 308 | // Generate Preview 309 | if(isPreviewEnabled) { 310 | try { 311 | ZipInputStream zipInputStream = translationObject.getTranslationObjectPreview(); 312 | if (zipInputStream != null) { 313 | unzipFileFromStream(zipInputStream, previewPath); 314 | } else { 315 | log.error("Got null for zipInputStream for " + getObjectPath(translationObject)); 316 | } 317 | } catch (FileNotFoundException e) { 318 | log.error(e.getLocalizedMessage(), e); 319 | } catch (IOException e) { 320 | log.error(e.getLocalizedMessage(), e); 321 | } 322 | } 323 | log.trace("Preview Directory is: {}", previewPath); 324 | 325 | return objectPath; 326 | } 327 | 328 | @Override 329 | public TranslationStatus updateTranslationObjectState(String strTranslationJobID, 330 | TranslationObject translationObject, TranslationState state) throws TranslationException { 331 | log.trace("BootstrapTranslationServiceImpl.updateTranslationObjectState"); 332 | bootstrapTmsService.setTmsProperty(strTranslationJobID+getObjectPath(translationObject), BootstrapTmsConstants.BOOTSTRAP_TMS_STATUS, state.getStatus().toString()); 333 | return state.getStatus(); 334 | } 335 | 336 | @Override 337 | public TranslationStatus getTranslationObjectStatus(String strTranslationJobID, 338 | TranslationObject translationObject) throws TranslationException { 339 | String status = bootstrapTmsService.getTmsObjectStatus(strTranslationJobID, getObjectPath(translationObject)); 340 | return TranslationConstants.TranslationStatus.fromString(status); 341 | } 342 | 343 | @Override 344 | public TranslationStatus[] updateTranslationObjectsState(String strTranslationJobID, 345 | TranslationObject[] translationObjects, TranslationState[] states) throws TranslationException { 346 | log.trace("BootstrapTranslationServiceImpl.updateTranslationObjectsState"); 347 | 348 | TranslationStatus[] retStatus = new TranslationStatus[states.length]; 349 | for (int index = 0; index < states.length; index++) { 350 | retStatus[index] = 351 | updateTranslationObjectState(strTranslationJobID, translationObjects[index], states[index]); 352 | } 353 | return retStatus; 354 | } 355 | 356 | @Override 357 | public TranslationStatus[] getTranslationObjectsStatus(String strTranslationJobID, 358 | TranslationObject[] translationObjects) throws TranslationException { 359 | log.trace("BootstrapTranslationServiceImpl.getTranslationObjectsStatus"); 360 | 361 | TranslationStatus[] retStatus = new TranslationStatus[translationObjects.length]; 362 | for (int index = 0; index < translationObjects.length; index++) { 363 | retStatus[index] = getTranslationObjectStatus(strTranslationJobID, translationObjects[index]); 364 | } 365 | return retStatus; 366 | } 367 | 368 | @Override 369 | public CommentCollection getTranslationObjectCommentCollection(String strTranslationJobID, 370 | TranslationObject translationObject) throws TranslationException { 371 | log.trace("BootstrapTranslationServiceImpl.getTranslationObjectCommentCollection"); 372 | 373 | throw new TranslationException("This function is not implemented", 374 | TranslationException.ErrorCode.SERVICE_NOT_IMPLEMENTED); 375 | } 376 | 377 | @Override 378 | public void addTranslationObjectComment(String strTranslationJobID, TranslationObject translationObject, 379 | Comment comment) throws TranslationException { 380 | log.trace("BootstrapTranslationServiceImpl.addTranslationObjectComment"); 381 | 382 | throw new TranslationException("This function is not implemented", 383 | TranslationException.ErrorCode.SERVICE_NOT_IMPLEMENTED); 384 | } 385 | 386 | @Override 387 | public void updateTranslationJobMetadata(String strTranslationJobID, TranslationMetadata jobMetadata, 388 | TranslationMethod translationMethod) throws TranslationException { 389 | log.trace("BootstrapTranslationServiceImpl.updateTranslationJobMetadata"); 390 | 391 | throw new TranslationException("This function is not implemented", 392 | TranslationException.ErrorCode.SERVICE_NOT_IMPLEMENTED); 393 | } 394 | 395 | 396 | private String getObjectPath (TranslationObject translationObject){ 397 | 398 | if(translationObject.getTranslationObjectSourcePath()!= null && !translationObject.getTranslationObjectSourcePath().isEmpty()){ 399 | return translationObject.getTranslationObjectSourcePath(); 400 | } 401 | else if(translationObject.getTitle().equals("TAGMETADATA")){ 402 | return TAG_METADATA; 403 | } 404 | else if(translationObject.getTitle().equals("ASSETMETADATA")){ 405 | return ASSET_METADATA; 406 | } 407 | else if(translationObject.getTitle().equals("I18NCOMPONENTSTRINGDICT")){ 408 | return I18NCOMPONENTSTRINGDICT; 409 | } 410 | return null; 411 | } 412 | 413 | public void updateDueDate(String strTranslationJobID, Date date) 414 | throws TranslationException { 415 | log.debug("NEW DUE DATE:{}",date); 416 | bootstrapTmsService.setTmsJobDuedate(strTranslationJobID, date); 417 | } 418 | 419 | private static void unzipFileFromStream(ZipInputStream zipInputStream, String targetPath) throws IOException { 420 | File dirFile = new File(targetPath + File.separator); 421 | if (!dirFile.exists()) { 422 | dirFile.mkdirs(); 423 | log.trace("Created directory: {}",dirFile); 424 | } 425 | 426 | ZipEntry zipEntry = null; 427 | while (null != (zipEntry = zipInputStream.getNextEntry())) { 428 | String zipFileName = zipEntry.getName(); 429 | if (zipEntry.isDirectory()) { 430 | File zipFolder = new File(targetPath + File.separator + zipFileName); 431 | if (!zipFolder.exists()) { 432 | zipFolder.mkdirs(); 433 | log.trace("Created directory: {}",zipFolder); 434 | } 435 | } else { 436 | File file = new File(targetPath + File.separator + zipFileName); 437 | 438 | File parent = file.getParentFile(); 439 | if (!parent.exists()) { 440 | parent.mkdirs(); 441 | } 442 | 443 | FileOutputStream fos = null; 444 | try { 445 | fos = new FileOutputStream(file); 446 | } catch (FileNotFoundException e) { 447 | log.error(e.getLocalizedMessage(),e); 448 | } 449 | int readLen = 0; 450 | byte buffer[] = new byte[1024]; 451 | while (-1 != (readLen = zipInputStream.read(buffer))) { 452 | fos.write(buffer, 0, readLen); 453 | } 454 | fos.close(); 455 | } 456 | } 457 | zipInputStream.close(); 458 | } 459 | 460 | } 461 | -------------------------------------------------------------------------------- /core/src/main/java/com/adobe/granite/translation/connector/bootstrap/core/impl/config/BootstrapTranslationAdapterFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | ************************************************************************* 3 | ADOBE SYSTEMS INCORPORATED 4 | Copyright [first year code created] Adobe Systems Incorporated 5 | All Rights Reserved. 6 | 7 | NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the 8 | terms of the Adobe license agreement accompanying it. If you have received this file from a 9 | source other than Adobe, then your use, modification, or distribution of it requires the prior 10 | written permission of Adobe. 11 | ************************************************************************* 12 | */ 13 | 14 | package com.adobe.granite.translation.connector.bootstrap.core.impl.config; 15 | 16 | import com.adobe.granite.translation.api.TranslationException; 17 | import com.adobe.granite.translation.connector.bootstrap.core.BootstrapTranslationCloudConfig; 18 | import com.adobe.granite.translation.core.TranslationCloudConfigUtil; 19 | 20 | import org.apache.felix.scr.annotations.Component; 21 | import org.apache.felix.scr.annotations.Property; 22 | import org.apache.felix.scr.annotations.Reference; 23 | import org.apache.felix.scr.annotations.Service; 24 | import org.apache.sling.api.adapter.AdapterFactory; 25 | import org.apache.sling.api.resource.Resource; 26 | import org.slf4j.Logger; 27 | import org.slf4j.LoggerFactory; 28 | 29 | import javax.jcr.Node; 30 | 31 | @Component 32 | @Service(value = AdapterFactory.class) 33 | public class BootstrapTranslationAdapterFactory implements AdapterFactory 34 | { 35 | @Reference 36 | TranslationCloudConfigUtil cloudConfigUtil; 37 | 38 | private final Logger log = LoggerFactory.getLogger(getClass()); 39 | 40 | private static final Class RESOURCE_CLASS = Resource.class; 41 | private static final Class NODE_CLASS = Node.class; 42 | private static final Class TRANSLATION_CLOUD_CONFIG_CLASS = 43 | BootstrapTranslationCloudConfig.class; 44 | 45 | @Property(name = "adapters") 46 | protected static final String[] ADAPTER_CLASSES = {TRANSLATION_CLOUD_CONFIG_CLASS.getName()}; 47 | 48 | @Property(name = "adaptables") 49 | protected static final String[] ADAPTABLE_CLASSES = {RESOURCE_CLASS.getName(), NODE_CLASS.getName()}; 50 | 51 | // ---------- AdapterFactory ----------------------------------------------- 52 | 53 | public AdapterType getAdapter(Object adaptable, Class type) 54 | { 55 | log.trace("In function: getAdapter(Object,Claass"); 56 | 57 | if (adaptable instanceof Resource) { 58 | return getAdapter((Resource) adaptable, type); 59 | } 60 | if (adaptable instanceof Node) { 61 | return getAdapter((Node) adaptable, type); 62 | } 63 | log.warn("Unable to handle adaptable {}", adaptable.getClass().getName()); 64 | return null; 65 | } 66 | 67 | public void setTranslationCloudConfigUtil(TranslationCloudConfigUtil configUtil) 68 | { 69 | cloudConfigUtil = configUtil; 70 | } 71 | 72 | /* 73 | * Adapter for Resource 74 | */ 75 | @SuppressWarnings("unchecked") 76 | private AdapterType getAdapter(Resource resource, Class type) 77 | { 78 | log.trace("In function: getAdapter(Resource,Class"); 79 | 80 | if (type == TRANSLATION_CLOUD_CONFIG_CLASS 81 | && cloudConfigUtil.isCloudConfigAppliedOnImmediateResource(resource, 82 | BootstrapTranslationCloudConfig.RESOURCE_TYPE)) 83 | { 84 | try 85 | { 86 | return (AdapterType) new BootstrapTranslationCloudConfigImpl(resource); 87 | } 88 | catch (TranslationException te) 89 | { 90 | log.error(te.getMessage(), te); 91 | return null; 92 | } 93 | } 94 | 95 | log.warn("Unable to adapt to resource of type {}", type.getName()); 96 | return null; 97 | } 98 | } -------------------------------------------------------------------------------- /core/src/main/java/com/adobe/granite/translation/connector/bootstrap/core/impl/config/BootstrapTranslationCloudConfigImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | ************************************************************************* 3 | ADOBE SYSTEMS INCORPORATED 4 | Copyright [first year code created] Adobe Systems Incorporated 5 | All Rights Reserved. 6 | 7 | NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the 8 | terms of the Adobe license agreement accompanying it. If you have received this file from a 9 | source other than Adobe, then your use, modification, or distribution of it requires the prior 10 | written permission of Adobe. 11 | ************************************************************************* 12 | */ 13 | 14 | package com.adobe.granite.translation.connector.bootstrap.core.impl.config; 15 | 16 | import com.adobe.granite.translation.api.TranslationException; 17 | import com.adobe.granite.translation.connector.bootstrap.core.BootstrapTranslationCloudConfig; 18 | 19 | import org.apache.jackrabbit.JcrConstants; 20 | import org.apache.sling.api.resource.Resource; 21 | import org.apache.sling.api.resource.ValueMap; 22 | import org.slf4j.Logger; 23 | import org.slf4j.LoggerFactory; 24 | 25 | public class BootstrapTranslationCloudConfigImpl implements BootstrapTranslationCloudConfig { 26 | private static final Logger log = LoggerFactory.getLogger(BootstrapTranslationCloudConfigImpl.class); 27 | 28 | private String dummyServerUrl; 29 | private String dummyConfigId; 30 | private String previewPath; 31 | 32 | public BootstrapTranslationCloudConfigImpl(Resource translationConfigResource) throws TranslationException { 33 | log.trace("BootstrapTranslationCloudConfigImpl."); 34 | 35 | Resource configContent; 36 | if (JcrConstants.JCR_CONTENT.equals(translationConfigResource.getName())) { 37 | configContent = translationConfigResource; 38 | } else { 39 | configContent = translationConfigResource.getChild(JcrConstants.JCR_CONTENT); 40 | } 41 | 42 | if (configContent != null) { 43 | ValueMap properties = configContent.adaptTo(ValueMap.class); 44 | 45 | this.dummyServerUrl = properties.get(PROPERTY_DUMMY_SERVER_URL, ""); 46 | this.dummyConfigId = properties.get(PROPERTY_DUMMY_CONFIG_ID, ""); 47 | this.previewPath = properties.get(PROPERTY_PREVIEW_PATH, ""); 48 | 49 | if (log.isTraceEnabled()) { 50 | log.trace("Created Bootstrap Cloud Config with the following:"); 51 | log.trace("dummyServerUrl: {}", dummyServerUrl); 52 | log.trace("dummyConfigId: {}", dummyConfigId); 53 | log.trace("previewPath: {}", previewPath); 54 | 55 | } 56 | } else { 57 | throw new TranslationException("Error getting Cloud Config credentials", 58 | TranslationException.ErrorCode.MISSING_CREDENTIALS); 59 | } 60 | } 61 | 62 | public String getDummyServerUrl() { 63 | log.trace("BootstrapTranslationCloudConfigImpl.getDummyServerUrl"); 64 | return dummyServerUrl; 65 | } 66 | 67 | public String getDummyConfigId() { 68 | log.trace("BootstrapTranslationCloudConfigImpl.getDummyConfigId"); 69 | return dummyConfigId; 70 | } 71 | 72 | public String getPreviewPath(){ 73 | log.trace("BootstrapTranslationCloudConfigImpl.gePreviewPath"); 74 | return previewPath; 75 | } 76 | } -------------------------------------------------------------------------------- /core/src/main/java/com/adobe/granite/translation/connector/bootstrap/core/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Adobe Systems Incorporated 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | @Version("1.0") 17 | package com.adobe.granite.translation.connector.bootstrap.core; 18 | 19 | import org.osgi.annotation.versioning.Version; -------------------------------------------------------------------------------- /core/src/main/java/com/adobe/granite/translation/connector/bootstrap/ui/models/BootStrapModelUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | ADOBE CONFIDENTIAL 3 | Copyright 2018 Adobe Systems Incorporated 4 | All Rights Reserved. 5 | NOTICE: All information contained herein is, and remains 6 | the property of Adobe Systems Incorporated and its suppliers, 7 | if any. The intellectual and technical concepts contained 8 | herein are proprietary to Adobe Systems Incorporated and its 9 | suppliers and may be covered by U.S. and Foreign Patents, 10 | patents in process, and are protected by trade secret or copyright law. 11 | Dissemination of this information or reproduction of this material 12 | is strictly forbidden unless prior written permission is obtained 13 | from Adobe Systems Incorporated. 14 | */ 15 | 16 | package com.adobe.granite.translation.connector.bootstrap.ui.models; 17 | 18 | import org.apache.jackrabbit.JcrConstants; 19 | import org.apache.sling.api.resource.Resource; 20 | import org.slf4j.Logger; 21 | 22 | import javax.jcr.Node; 23 | import javax.jcr.RepositoryException; 24 | 25 | /** 26 | * Utility class for Bootstrap connector sling model 27 | */ 28 | 29 | public class BootStrapModelUtils { 30 | 31 | // Helper for fetching properties from content node 32 | static String getStringPropertyFromContent(Resource resource, String property, Logger logger) { 33 | try { 34 | if (resource != null) { 35 | Resource contentResource = resource.getChild(JcrConstants.JCR_CONTENT); 36 | if (contentResource != null) { 37 | Node content = contentResource.adaptTo(Node.class); 38 | if (content != null && content.hasProperty(property)) { 39 | return content.getProperty(property).getString(); 40 | } 41 | } 42 | } 43 | } catch (RepositoryException e) { 44 | logger.error("Error fetching Property {} from {}", property, resource.getPath()); 45 | } 46 | return ""; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /core/src/main/java/com/adobe/granite/translation/connector/bootstrap/ui/models/BootStrapTranslationConnectorModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | ADOBE CONFIDENTIAL 3 | Copyright 2018 Adobe Systems Incorporated 4 | All Rights Reserved. 5 | NOTICE: All information contained herein is, and remains 6 | the property of Adobe Systems Incorporated and its suppliers, 7 | if any. The intellectual and technical concepts contained 8 | herein are proprietary to Adobe Systems Incorporated and its 9 | suppliers and may be covered by U.S. and Foreign Patents, 10 | patents in process, and are protected by trade secret or copyright law. 11 | Dissemination of this information or reproduction of this material 12 | is strictly forbidden unless prior written permission is obtained 13 | from Adobe Systems Incorporated. 14 | */ 15 | 16 | package com.adobe.granite.translation.connector.bootstrap.ui.models; 17 | 18 | import com.adobe.granite.translation.connector.bootstrap.core.BootstrapTranslationCloudConfig; 19 | import com.day.cq.commons.jcr.JcrConstants; 20 | import org.apache.sling.api.SlingHttpServletRequest; 21 | import org.apache.sling.api.resource.Resource; 22 | import org.apache.sling.api.resource.ResourceResolver; 23 | import org.apache.sling.models.annotations.Model; 24 | import org.apache.sling.models.annotations.injectorspecific.Self; 25 | import org.slf4j.Logger; 26 | import org.slf4j.LoggerFactory; 27 | 28 | import javax.annotation.PostConstruct; 29 | 30 | /* 31 | * Sling Model used in editform.html sightly file for fetching the bootstrap cloud config input fields for populating the form 32 | * For more info about Sling Model refer https://sling.apache.org/documentation/bundles/models.html#osgi-service-filters 33 | */ 34 | 35 | @Model(adaptables = SlingHttpServletRequest.class) 36 | public class BootStrapTranslationConnectorModel { 37 | 38 | private static final Logger logger = LoggerFactory.getLogger(BootStrapTranslationConnectorModel.class); 39 | 40 | @Self 41 | private SlingHttpServletRequest request; 42 | 43 | private ResourceResolver resourceResolver; 44 | private String bootStrapConfigPath; 45 | private Resource bootStrapConfigResource; 46 | 47 | @PostConstruct 48 | public void postConstruct() throws Exception { 49 | bootStrapConfigPath = request.getRequestPathInfo().getSuffix(); 50 | resourceResolver = request.getResourceResolver(); 51 | bootStrapConfigResource = resourceResolver.getResource(bootStrapConfigPath); 52 | } 53 | 54 | /* 55 | * Get the server url for the configuration 56 | */ 57 | public String getServerUrl() { 58 | return BootStrapModelUtils.getStringPropertyFromContent(bootStrapConfigResource, BootstrapTranslationCloudConfig.PROPERTY_DUMMY_SERVER_URL, logger); 59 | } 60 | 61 | public String getServiceId() { 62 | return BootStrapModelUtils.getStringPropertyFromContent(bootStrapConfigResource, BootstrapTranslationCloudConfig.PROPERTY_DUMMY_CONFIG_ID, logger); 63 | } 64 | 65 | public String getPreviewDirectory() { 66 | return BootStrapModelUtils.getStringPropertyFromContent(bootStrapConfigResource, BootstrapTranslationCloudConfig.PROPERTY_PREVIEW_PATH, logger); 67 | } 68 | 69 | /* 70 | * form action attribute (post path where the configuration input values would be saved), jcr:content node of the configuration for bootstrap 71 | */ 72 | public String getFormPostPath() { 73 | return bootStrapConfigPath + '/' + JcrConstants.JCR_CONTENT; 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 4.0.0 19 | com.adobe.granite.translation.connector 20 | bootstrap-connector 21 | Bootstrap Translation Connector 22 | pom 23 | 2.0-SNAPSHOT 24 | Bootstrap Translation Connector 25 | 26 | 27 | core 28 | ui.apps 29 | ui.content 30 | 31 | 32 | 33 | scm:git:https://github.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector.git 34 | scm:git:https://github.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector.git 35 | https://github.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector 36 | HEAD 37 | 38 | 39 | 40 | 41 | 42 | project.local 43 | project 44 | file:///${project.basedir}/repository 45 | 46 | 47 | 48 | 49 | localhost 50 | 4502 51 | localhost 52 | 4503 53 | admin 54 | admin 55 | admin 56 | admin 57 | 58 | UTF-8 59 | UTF-8 60 | 61 | 62 | 63 | 64 | 65 | 66 | org.apache.maven.plugins 67 | maven-release-plugin 68 | 2.5.3 69 | 70 | [maven-scm] : 71 | clean install 72 | install 73 | release 74 | 75 | 76 | 77 | 78 | org.apache.maven.plugins 79 | maven-source-plugin 80 | 3.0.1 81 | true 82 | 83 | 84 | 85 | org.apache.maven.plugins 86 | maven-jar-plugin 87 | 3.0.2 88 | 89 | 90 | 91 | org.apache.maven.plugins 92 | maven-enforcer-plugin 93 | 94 | 95 | enforce-maven 96 | 97 | enforce 98 | 99 | 100 | 101 | 102 | [3.3.9,) 103 | 104 | 105 | Project must be compiled with Java 8 or higher 106 | 1.8.0 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | org.apache.maven.plugins 116 | maven-compiler-plugin 117 | 118 | 1.8 119 | 1.8 120 | 121 | 122 | 123 | 124 | org.apache.maven.plugins 125 | maven-idea-plugin 126 | 2.2.1 127 | 128 | 1.8 129 | true 130 | true 131 | 132 | 133 | 134 | 135 | org.apache.maven.plugins 136 | maven-eclipse-plugin 137 | 2.10 138 | 139 | true 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | org.apache.maven.plugins 148 | maven-clean-plugin 149 | 3.0.0 150 | 151 | 152 | 153 | org.apache.felix 154 | maven-scr-plugin 155 | 156 | 157 | generate-scr-scrdescriptor 158 | 159 | scr 160 | 161 | 162 | 163 | Adobe Systems Incorporated 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | org.apache.maven.plugins 172 | maven-resources-plugin 173 | 3.0.2 174 | 175 | 176 | 177 | org.apache.maven.plugins 178 | maven-compiler-plugin 179 | 3.6.1 180 | 181 | 182 | 183 | org.apache.maven.plugins 184 | maven-install-plugin 185 | 2.5.2 186 | 187 | 188 | 189 | org.apache.maven.plugins 190 | maven-surefire-plugin 191 | 2.20 192 | 193 | 194 | 195 | org.apache.maven.plugins 196 | maven-failsafe-plugin 197 | 2.20 198 | 199 | 200 | 201 | org.apache.maven.plugins 202 | maven-deploy-plugin 203 | 2.8.2 204 | 205 | 206 | 207 | org.apache.sling 208 | maven-sling-plugin 209 | 2.2.0 210 | 211 | http://${aem.host}:${aem.port}/system/console 212 | WebConsole 213 | 214 | 215 | 216 | 217 | org.apache.sling 218 | htl-maven-plugin 219 | 1.0.6 220 | 221 | true 222 | 223 | 224 | 225 | 226 | validate 227 | 228 | 229 | 230 | 231 | 232 | 233 | com.day.jcr.vault 234 | content-package-maven-plugin 235 | 0.5.1 236 | 237 | http://${aem.host}:${aem.port}/crx/packmgr/service.jsp 238 | true 239 | true 240 | ${vault.user} 241 | ${vault.password} 242 | 243 | 244 | 245 | 246 | org.apache.felix 247 | maven-bundle-plugin 248 | 3.3.0 249 | true 250 | 251 | 252 | 253 | org.apache.maven.plugins 254 | maven-enforcer-plugin 255 | 1.4.1 256 | 257 | 258 | 259 | org.apache.maven.plugins 260 | maven-dependency-plugin 261 | 3.0.0 262 | 263 | 264 | 265 | org.codehaus.mojo 266 | build-helper-maven-plugin 267 | 3.0.0 268 | 269 | 270 | 271 | org.eclipse.m2e 272 | lifecycle-mapping 273 | 1.0.0 274 | 275 | 276 | 277 | 278 | 279 | org.apache.maven.plugins 280 | maven-enforcer-plugin 281 | [1.0.0,) 282 | 283 | enforce 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | org.apache.maven.plugins 294 | 295 | 296 | maven-dependency-plugin 297 | 298 | 299 | [2.2,) 300 | 301 | 302 | copy-dependencies 303 | unpack 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | org.codehaus.mojo 314 | 315 | 316 | build-helper-maven-plugin 317 | 318 | 319 | [1.5,) 320 | 321 | 322 | 323 | reserve-network-port 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | adobe-public 345 | 346 | 347 | true 348 | 349 | 350 | 351 | adobe-public-releases 352 | Adobe Public Releases 353 | https://repo.adobe.com/nexus/content/groups/public 354 | 355 | 356 | 357 | 358 | adobe-public-releases 359 | Adobe Public Repository 360 | https://repo.adobe.com/nexus/content/groups/public 361 | 362 | true 363 | never 364 | 365 | 366 | false 367 | 368 | 369 | 370 | localinstance 371 | AEM local repository 372 | http://localhost:4502/maven/repository 373 | 374 | true 375 | 376 | 377 | true 378 | 379 | 380 | 381 | 382 | 383 | 384 | adobe-public-releases 385 | Adobe Public Repository 386 | https://repo.adobe.com/nexus/content/groups/public 387 | 388 | true 389 | never 390 | 391 | 392 | false 393 | 394 | 395 | 396 | localinstance 397 | AEM local repository 398 | http://localhost:4502/maven/repository 399 | 400 | true 401 | 402 | 403 | true 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | autoInstallBundle 412 | 421 | 422 | false 423 | 424 | 425 | 426 | 427 | 428 | org.apache.sling 429 | maven-sling-plugin 430 | 431 | 432 | install-bundle 433 | 434 | install 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | autoInstallPackage 446 | 447 | false 448 | 449 | 450 | 451 | 452 | 453 | com.day.jcr.vault 454 | content-package-maven-plugin 455 | 456 | 457 | install-package 458 | 459 | install 460 | 461 | 462 | http://${aem.host}:${aem.port}/crx/packmgr/service.jsp 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | autoInstallPackagePublish 474 | 475 | false 476 | 477 | 478 | 479 | 480 | 481 | com.day.jcr.vault 482 | content-package-maven-plugin 483 | 484 | 485 | install-package-publish 486 | 487 | install 488 | 489 | 490 | http://${aem.publish.host}:${aem.publish.port}/crx/packmgr/service.jsp 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | org.apache.felix 511 | org.apache.felix.scr.annotations 512 | 1.9.6 513 | provided 514 | 515 | 516 | org.osgi 517 | osgi.core 518 | 6.0.0 519 | provided 520 | 521 | 522 | org.osgi 523 | osgi.cmpn 524 | 6.0.0 525 | provided 526 | 527 | 528 | org.osgi 529 | osgi.annotation 530 | 6.0.1 531 | provided 532 | 533 | 534 | 535 | org.slf4j 536 | slf4j-api 537 | 1.5.11 538 | provided 539 | 540 | 541 | 542 | com.adobe.aem 543 | aem-sdk-api 544 | 2020.7.3902.20200716T022312Z-200604 545 | provided 546 | 547 | 548 | 549 | 550 | javax.servlet 551 | servlet-api 552 | 2.5 553 | provided 554 | 555 | 556 | javax.servlet.jsp 557 | jsp-api 558 | 2.1 559 | provided 560 | 561 | 562 | 563 | javax.jcr 564 | jcr 565 | 2.0 566 | provided 567 | 568 | 569 | 570 | com.day.cq.wcm 571 | cq-wcm-taglib 572 | 5.7.4 573 | provided 574 | 575 | 576 | 577 | com.adobe.granite.translation 578 | bootstrap-tms.core 579 | 4.0 580 | 581 | 582 | 583 | 584 | -------------------------------------------------------------------------------- /ui.apps/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 4.0.0 19 | 20 | 21 | 22 | 23 | 24 | com.adobe.granite.translation.connector 25 | bootstrap-connector 26 | 2.0-SNAPSHOT 27 | ../pom.xml 28 | 29 | 30 | 31 | 32 | 33 | bootstrap-connector.ui.apps 34 | content-package 35 | Bootstrap Translation Connector - UI apps 36 | Bootstrap connector implementation for the Granite Translation API. This connector provides a reference implementation of the API. Please visit www.adobe.com for more details. 37 | 38 | 39 | 40 | 41 | 42 | src/main/content/jcr_root 43 | 44 | 45 | 47 | ${basedir}/src/main/content/META-INF 48 | ../vault-work/META-INF 49 | 50 | 51 | 52 | ${basedir}/src/main/content/jcr_root 53 | 54 | 55 | **/.vlt 56 | **/.vltignore 57 | **/.gitignore 58 | **/*.iml 59 | **/.classpath 60 | **/.project 61 | **/.settings 62 | **/.DS_Store 63 | **/target/** 64 | **/pom.xml 65 | 66 | 67 | 68 | 69 | 75 | 76 | maven-resources-plugin 77 | 78 | 79 | true 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | com.day.jcr.vault 88 | content-package-maven-plugin 89 | true 90 | 91 | src/main/content/META-INF/vault/filter.xml 92 | true 93 | true 94 | com.adobe.granite.translation.connector 95 | 96 | 97 | com.adobe.granite.translation.connector 98 | bootstrap-connector.core 99 | /apps/bootstrap-connector/install 100 | 101 | 102 | com.adobe.granite.translation 103 | bootstrap-tms.core 104 | /apps/bootstrap-connector/install 105 | 106 | 107 | 108 | 109 | com.adobe.granite.translation.connector 110 | bootstrap-connector.ui.content 111 | [${project.version},) 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | com.adobe.granite.translation.connector 125 | bootstrap-connector.core 126 | 2.0-SNAPSHOT 127 | 128 | 129 | 130 | com.adobe.aem 131 | aem-sdk-api 132 | 133 | 134 | 135 | javax.jcr 136 | jcr 137 | 138 | 139 | 140 | javax.servlet 141 | servlet-api 142 | 143 | 144 | 145 | com.day.cq.wcm 146 | cq-wcm-taglib 147 | 148 | 149 | 150 | com.adobe.granite.translation 151 | bootstrap-tms.core 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /ui.apps/repository/com/adobe/granite/translation/bootstrap-tms.core/4.0/bootstrap-tms.core-4.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector/7600a6427561e4062e1b2b4da17aa85ef3dbcb67/ui.apps/repository/com/adobe/granite/translation/bootstrap-tms.core/4.0/bootstrap-tms.core-4.0.jar -------------------------------------------------------------------------------- /ui.apps/repository/com/adobe/granite/translation/bootstrap-tms.core/4.0/bootstrap-tms.core-4.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | com.adobe.granite.translation 6 | bootstrap-tms.core 7 | 4.0 8 | POM was created from install:install-file 9 | 10 | -------------------------------------------------------------------------------- /ui.apps/repository/com/adobe/granite/translation/bootstrap-tms.core/maven-metadata-local.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.adobe.granite.translation 4 | bootstrap-tms.core 5 | 6 | 4.0 7 | 8 | 4.0 9 | 10 | 20200730102420 11 | 12 | 13 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 17 | 18 | 19 | 23 | 24 | 25 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/definition/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/definition/screenshots/screenshot-01.png/file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector/7600a6427561e4062e1b2b4da17aa85ef3dbcb67/ui.apps/src/main/content/META-INF/vault/definition/screenshots/screenshot-01.png/file -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/definition/screenshots/screenshot-01.png/file.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/definition/screenshots/screenshot-02.png/file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector/7600a6427561e4062e1b2b4da17aa85ef3dbcb67/ui.apps/src/main/content/META-INF/vault/definition/screenshots/screenshot-02.png/file -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/definition/screenshots/screenshot-02.png/file.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/definition/screenshots/screenshot-03.png/file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector/7600a6427561e4062e1b2b4da17aa85ef3dbcb67/ui.apps/src/main/content/META-INF/vault/definition/screenshots/screenshot-03.png/file -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/definition/screenshots/screenshot-03.png/file.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/definition/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector/7600a6427561e4062e1b2b4da17aa85ef3dbcb67/ui.apps/src/main/content/META-INF/vault/definition/thumbnail.png -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/clientlibs/aem-bootstrap-connector/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/clientlibs/aem-bootstrap-connector/css.txt: -------------------------------------------------------------------------------- 1 | css/styles.css -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/clientlibs/aem-bootstrap-connector/css/styles.css: -------------------------------------------------------------------------------- 1 | .form-legend { 2 | display: block; 3 | margin: .5rem 0 .625rem 0; 4 | font-family: adobe-clean,Helvetica,Arial,sans-serif; 5 | font-weight: 700; 6 | font-style: normal; 7 | font-size: 1.125rem; 8 | line-height: 1.25rem; 9 | } 10 | 11 | .fieldlabel { 12 | color: #707070; 13 | display: block; 14 | line-height: 1.6875rem; 15 | } 16 | 17 | .inputTextField { 18 | display: block; 19 | width: 100%; 20 | margin: 0 0 .375rem; 21 | box-sizing: border-box; 22 | border: .0625rem solid; 23 | padding: .625rem; 24 | min-width: 6.875rem; 25 | height: 2.375rem; 26 | font-family: adobe-clean,Helvetica,Arial,sans-serif; 27 | font-weight: normal; 28 | font-style: normal; 29 | vertical-align: top; 30 | font-size: .8125rem; 31 | line-height: 1.0625rem; 32 | border-color: #d0d0d0; 33 | background-color: #fff; 34 | color: #323232; 35 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/clientlibs/aem-bootstrap-connector/js.txt: -------------------------------------------------------------------------------- 1 | js/bootstrapConnector.js -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/clientlibs/aem-bootstrap-connector/js/bootstrapConnector.js: -------------------------------------------------------------------------------- 1 | /* 2 | ADOBE CONFIDENTIAL 3 | Copyright 2016 Adobe Systems Incorporated 4 | All Rights Reserved. 5 | NOTICE: All information contained herein is, and remains 6 | the property of Adobe Systems Incorporated and its suppliers, 7 | if any. The intellectual and technical concepts contained 8 | herein are proprietary to Adobe Systems Incorporated and its 9 | suppliers and may be covered by U.S. and Foreign Patents, 10 | patents in process, and are protected by trade secret or copyright law. 11 | Dissemination of this information or reproduction of this material 12 | is strictly forbidden unless prior written permission is obtained 13 | from Adobe Systems Incorporated. 14 | */ 15 | (function(document, XSS, $) { 16 | 17 | "use strict"; 18 | var subscriptionKeyComponent = ".bootStrapServerID"; 19 | 20 | /* 21 | Registering a custom validator before form is submitted via save and close 22 | */ 23 | $(window).adaptTo("foundation-registry").register("foundation.validation.validator", { 24 | selector: subscriptionKeyComponent, 25 | validate: function(e) { 26 | return verifySubscriptionKey(e); 27 | } 28 | }); 29 | 30 | 31 | function verifySubscriptionKey(e) { 32 | var key = $(subscriptionKeyComponent)[0].value; 33 | // Partners may write their own logic to verify that the key or other identifier is valid via any ajax call to their server 34 | var keyValid = false; 35 | /* 36 | Some code to check if the key is valid 37 | */ 38 | keyValid = true; 39 | if (keyValid) { 40 | return ""; 41 | } else { 42 | return Granite.I18n.get("Key invalid"); 43 | } 44 | 45 | } 46 | 47 | })(document, _g.XSS, Granite.$); -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/clientlibs/aem-bootstrap-connector/js/bootstrapConnector.js.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/config/com.day.cq.security.ACLSetup.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/config/org.apache.sling.commons.log.LogManager.factory.config-bootstrap-connector.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/config/org.apache.sling.commons.log.LogManager.factory.writer-bootstrap-connector.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/config/org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-bootstrap.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/templates/bootstrap-connector-servicepage/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/templates/bootstrap-connector-servicepage/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector/7600a6427561e4062e1b2b4da17aa85ef3dbcb67/ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/templates/bootstrap-connector-servicepage/thumbnail.png -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/templates/forms/description.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | To get a free trial account visit www.adobe.com/bootstrap.html 4 |
-------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/templates/forms/editFormWithTabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

${'Bootstrap Translation Connector Settings' @i18n, locale=request.locale}

16 | 17 | 18 | 19 | 20 | ${'Basic' @i18n, locale=request.locale} 21 | ${'Advanced' @i18n, locale=request.locale} 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
51 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/bootstrap-connector/templates/forms/editform.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

${'Bootstrap Translation Connector Settings' @i18n, locale=request.locale}

14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
-------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/settings/cloudconfigs/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/settings/cloudconfigs/translation/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/settings/cloudconfigs/translation/bootstrap-translation/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 25 | 26 | -------------------------------------------------------------------------------- /ui.content/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 4.0.0 19 | 20 | 21 | 22 | 23 | 24 | bootstrap-connector 25 | com.adobe.granite.translation.connector 26 | 2.0-SNAPSHOT 27 | 28 | 29 | 30 | 31 | 32 | com.adobe.granite.translation.connector 33 | bootstrap-connector.ui.content 34 | 2.0-SNAPSHOT 35 | content-package 36 | Bootstrap Translation Connector - UI contents 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | org.apache.jackrabbit 48 | filevault-package-maven-plugin 49 | true 50 | 51 | merge_preserve 52 | com.adobe.granite.translation.connector 53 | 54 | 55 | 56 | com.day.jcr.vault 57 | content-package-maven-plugin 58 | true 59 | 60 | true 61 | true 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | javax.jcr 73 | jcr 74 | 75 | 76 | 77 | javax.servlet 78 | servlet-api 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /ui.content/src/main/content/META-INF/vault/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 17 | 18 | 19 | 23 | 24 | 25 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /ui.content/src/main/content/META-INF/vault/definition/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /ui.content/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ui.content/src/main/content/META-INF/vault/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/home/users/system/bootstrap-service/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/bootstrap-tms/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | --------------------------------------------------------------------------------